master
xy 2 years ago
parent c6e928a526
commit b2ca9e61eb

@ -15,12 +15,13 @@ export function getOutDetail({ tbname,out_caigou_id,out_contract_id,out_pay_id,o
}) })
} }
export function httpCurl(params,noloading = true,s= '/Api/flowDetail') { export function httpCurl(params,noloading = true,s= '/Api/flowDetail',method='GET') {
return request({ return request({
method: 'post', method: 'post',
url: '/api/admin/other/http-curl', url: '/api/admin/other/http-curl',
data: { data: {
url: process.env.VUE_APP_OUT_OLD, url: process.env.VUE_APP_OUT_OLD,
method,
params: { params: {
s, s,
...params ...params

@ -0,0 +1,136 @@
<template>
<div>
<Drawer title="查看详情" :closable="false" :width="54" v-model="isShow" class-name="upload-drawer__container">
<div class="item">
<div class="item__title">
所属年份
</div>
<div class="item__value">
{{ detail.year }}
</div>
</div>
<div class="item">
<div class="item__title">
相关部门
</div>
<div class="item__value">
{{ detail.department ? detail.department.name : '无' }}
</div>
</div>
<div class="item">
<div class="item__title">
上传时间
</div>
<div class="item__value">
{{ detail.created_at }}
</div>
</div>
<div class="item">
<div class="item__title">备注</div>
<div class="item__value">{{ detail.remark }}</div>
</div>
<div class="item">
<div class="item__title">附件</div>
<div v-for="i in detail.files">
<a @click="open(i)">{{ i.original_name }}</a>
</div>
</div>
</Drawer>
<Modal
:width="76"
transfer
v-model="showModal"
:footer-hide="true"
title="预览"
>
<template>
<iframe
style="width: 100%; height: 57vh"
:src="codeUri"
border="0"
></iframe>
</template>
</Modal>
</div>
</template>
<script>
import { show } from "@/api/budget/prePlan";
export default {
data() {
return {
showModal: false,
codeUri: '',
id: '',
isShow: false,
detail: {},
}
},
methods: {
setId (id) {
this.id = id
},
show () {
this.isShow = true
},
hide () {
this.isShow = false
},
async getDetail () {
const res = await show({
id: this.id
})
this.detail = res
console.log(this.detail)
},
open(e) {
this.codeUri = `http://view.ali251.langye.net:8012/onlinePreview?url=${encodeURIComponent(
new Buffer(e.url).toString("base64")
)}`;
this.showModal = true;
}
},
computed: {},
watch: {
isShow (newVal) {
if (newVal) {
this.getDetail()
} else {
this.id = ''
}
}
}
}
</script>
<style scoped lang="scss">
::v-deep .ivu-drawer {
top: 51px!important;
}
.item {
&__title {
font-weight: 600;
font-size: 15px;
padding: 20px 0;
}
a {
color: red;
&:hover {
text-decoration: underline;
}
}
}
</style>

@ -1,102 +1,177 @@
<template> <template>
<div style="padding: 0 20px;"> <div style="padding: 0 20px">
<lx-header icon="md-apps" style="margin-bottom: 10px; border: 0px; margin-top: 15px" text="预算计划"> <lx-header
icon="md-apps"
style="margin-bottom: 10px; border: 0px; margin-top: 15px"
text="预算计划"
>
<div slot="content"></div> <div slot="content"></div>
<slot> <slot>
<div class="selects"> <div class="selects">
<div> <div>
<span style="padding: 0 6px;word-break: keep-all;"> <span style="padding: 0 6px; word-break: keep-all"> 关键字 </span>
关键字 <Input
</span> v-model="select.keyword"
<Input v-model="select.keyword" placeholder="请输入关键字" style="width: 180px"></Input> placeholder="请输入关键字"
style="width: 180px"
></Input>
</div> </div>
<Button style="margin-left: 10px" type="primary" <Button style="margin-left: 10px" type="primary" @click=""
@click="">重置 >重置
</Button> </Button>
<Button style="margin-left: 10px" type="primary" @click="getList"></Button> <Button style="margin-left: 10px" type="primary" @click="getList"
<Button style="margin-left: 10px" type="primary" @click="$refs['addUpload'].type = 'add',$refs['addUpload'].show()">新增</Button> >查询</Button
>
<Button
style="margin-left: 10px"
type="primary"
@click="
($refs['addUpload'].type = 'add'), $refs['addUpload'].show()
"
>新增</Button
>
</div> </div>
</slot> </slot>
</lx-header> </lx-header>
<xy-table :list="list" <xy-table
:table-item="table" :list="list"
@editor="row => { :table-item="table"
$refs['addUpload'].id = row.id; >
$refs['addUpload'].type = 'editor'; <template #btns>
$refs['addUpload'].show(); <el-table-column fixed="right" label="操作" align="left" width="200">
}" <template #default="{ row }">
@delete=""> <div style="display: flex;align-items: flex-start;">
<Button
ghost
size="small"
type="primary"
@click="
($refs['addUpload'].id = row.id),
($refs['addUpload'].type = 'editor'),
$refs['addUpload'].show()
"
>编辑</Button
>
<Button style="margin-left: 4px;" size="small" type="primary" ghost @click="$refs['uploadDrawer'].setId(row.id),$refs['uploadDrawer'].show()"></Button>
<Poptip
:transfer="true"
confirm
placement="bottom"
title="确认要删除吗"
@on-ok="destroy(row)"
>
<Button style="margin-left: 4px;" size="small" type="error" ghost>删除</Button>
</Poptip>
</div>
</template>
</el-table-column>
</template>
</xy-table> </xy-table>
<div style="display: flex;justify-content: flex-end;"> <div style="display: flex; justify-content: flex-end">
<Page :total="total" @on-change="" show-elevator show-sizer @on-page-size-change="" /> <Page
:total="total"
@on-change="e => {
select.page = e;
getList()
}"
show-elevator
show-sizer
@on-page-size-change="e => {
select.page = 1;
select.page_size = e;
getList();
}"
/>
</div> </div>
<addUpload :plan_department_ids="depts" ref="addUpload" @refresh="getList"></addUpload> <addUpload
:plan_department_ids="depts"
ref="addUpload"
@refresh="getList"
></addUpload>
<uploadDrawer ref="uploadDrawer"></uploadDrawer>
</div> </div>
</template> </template>
<script> <script>
import { index,destroy } from "@/api/budget/prePlan" import { index, destroy } from "@/api/budget/prePlan";
import { listdeptNoAuth } from "@/api/system/department" import { listdeptNoAuth } from "@/api/system/department";
import addUpload from "./components/addUpload.vue" import addUpload from "./components/addUpload.vue";
import uploadDrawer from '@/views/budget/components/uploadDrawer.vue'
export default { export default {
components:{ components: {
addUpload addUpload,
uploadDrawer
}, },
data() { data() {
return { return {
depts: [], depts: [],
select: { select: {
page: 1, page: 1,
page_size: 10 page_size: 10,
}, },
total: 0, total: 0,
table: [ table: [
{ {
label: "所属年份", label: "所属年份",
prop: "year", prop: "year",
width:160 width: 120,
}, },
{ {
label: "备注", label: "相关部门",
prop: "remark", prop: "department.name",
align: "left", width: 180,
minWidth: 200
}, },
{ {
label: "上传时间", label: "上传时间",
prop: "created_at", prop: "created_at",
width: 200 width: 200,
} },
{
label: "备注",
prop: "remark",
align: "left",
minWidth: 200,
},
], ],
list: [] list: [],
} };
}, },
methods: { methods: {
async getDept() { async getDept() {
const res = await listdeptNoAuth({page:1,page_size:999}) const res = await listdeptNoAuth({ page: 1, page_size: 999 });
this.depts = res.data this.depts = res.data;
}, },
async getList() { async getList() {
const res = await index(this.select) const res = await index(this.select);
this.list = res.data this.list = res.data;
this.total = res.total || 0 this.total = res.total || 0;
},
destroy (row) {
destroy({
id: row.id
}).then(res => {
this.$message({
type: 'success',
message: '删除成功'
})
this.getList()
})
} }
}, },
computed: {}, computed: {},
created() { created() {
this.getList(); this.getList();
this.getDept(); this.getDept();
} },
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.selects{ .selects {
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;

@ -5,7 +5,6 @@
:is-show.sync="isShowDetail" :is-show.sync="isShowDetail"
type="normal" type="normal"
title="详情" title="详情"
class="contract-detail" class="contract-detail"
> >
<template v-slot:default> <template v-slot:default>
@ -15,20 +14,28 @@
<div class="base-info-item-title">项目名称</div> <div class="base-info-item-title">项目名称</div>
<div class="base-info-item-content">{{ detail.name }}</div> <div class="base-info-item-content">{{ detail.name }}</div>
</div> </div>
<div class="base-info-item"> <div class="base-info-item" v-if="detail.outcome_type === 1">
<div class="base-info-item-title">项目类型</div> <div class="base-info-item-title">项目类型</div>
<div class="base-info-item-content"> <div class="base-info-item-content">
{{ typeFormatter(detail.type) }} {{ typeFormatter(detail.type) }}
</div> </div>
</div> </div>
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<div class="base-info-item" style="flex-basis: 50%"> <div
class="base-info-item"
style="flex-basis: 50%"
v-if="detail.outcome_type === 1"
>
<div class="base-info-item-title">采购形式</div> <div class="base-info-item-title">采购形式</div>
<div class="base-info-item-content" v-if="detail.purchase_way"> <div class="base-info-item-content" v-if="detail.purchase_way">
{{ detail.purchase_way.value }} {{ detail.purchase_way.value }}
</div> </div>
</div> </div>
<div class="base-info-item" style="flex-basis: 50%"> <div
class="base-info-item"
style="flex-basis: 50%"
v-if="detail.outcome_type === 1"
>
<div class="base-info-item-title">采购方式</div> <div class="base-info-item-title">采购方式</div>
<div class="base-info-item-content" v-if="detail.purchase_type"> <div class="base-info-item-content" v-if="detail.purchase_type">
{{ detail.purchase_type.value }} {{ detail.purchase_type.value }}
@ -36,32 +43,54 @@
</div> </div>
</div> </div>
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<div class="base-info-item" style="flex-basis: 50%"> <div
class="base-info-item"
style="flex-basis: 50%"
v-if="detail.outcome_type === 1"
>
<div class="base-info-item-title">签订时间</div> <div class="base-info-item-title">签订时间</div>
<div class="base-info-item-content">{{ detail.date }}</div> <div class="base-info-item-content">{{ detail.date }}</div>
</div> </div>
<div class="base-info-item" style="flex-basis: 50%"> <div
class="base-info-item"
style="flex-basis: 50%"
v-if="detail.outcome_type === 1"
>
<div class="base-info-item-title">服务时间</div> <div class="base-info-item-title">服务时间</div>
<div class="base-info-item-content"> <div class="base-info-item-content">
{{ detail.start_date }}{{ detail.end_date }} {{ detail.start_date }}{{ detail.end_date }}
</div> </div>
</div> </div>
</div> </div>
<div class="base-info-item"> <div class="base-info-item" v-if="detail.outcome_type === 1">
<div class="base-info-item-title">项目预算</div> <div class="base-info-item-title">项目预算</div>
<div class="base-info-item-content"> <div class="base-info-item-content">
{{ moneyFormat(detail.plan_price) }} {{ moneyFormat(detail.plan_price) }}
</div> </div>
<div class="base-info-item-unit">()</div> <div class="base-info-item-unit">()</div>
</div> </div>
<div class="base-info-item"> <div class="base-info-item" v-if="detail.outcome_type === 1">
<div class="base-info-item-title">资金渠道</div> <div class="base-info-item-title">资金渠道</div>
<div class="base-info-item-content"> <div class="base-info-item-content">
{{ moneyWayFormatter(detail.money_way_detail) }} {{ moneyWayFormatter(detail.money_way_detail) }}
</div> </div>
</div> </div>
<div class="base-info-item" v-if="detail.outcome_type !== 1">
<div class="base-info-item-title">备注</div>
<div class="base-info-item-content">
{{ detail.remark }}
</div>
</div>
<div class="base-info-item" v-if="detail.outcome_type !== 1">
<div class="base-info-item-title">附件</div>
<div class="base-info-item-content">
<div v-for="i in detail.files_detail">
<a @click="open(i)">{{ i.original_name }}</a>
</div>
</div>
</div>
</div> </div>
<div class="link-budget-plan"> <div class="link-budget-plan" v-if="detail.outcome_type === 1">
<div class="link-budget-plan-title">关联预算计划</div> <div class="link-budget-plan-title">关联预算计划</div>
<xy-table <xy-table
:height="260" :height="260"
@ -74,7 +103,7 @@
</template> </template>
</xy-table> </xy-table>
</div> </div>
<div class="sign-info"> <div class="sign-info" style="margin-top: 20px">
<div class="sign-info-title">签订信息</div> <div class="sign-info-title">签订信息</div>
<div class="sign-info-item"> <div class="sign-info-item">
<div class="sign-info-item-title">合同金额</div> <div class="sign-info-item-title">合同金额</div>
@ -84,7 +113,11 @@
<div class="sign-info-item-unit"></div> <div class="sign-info-item-unit"></div>
</div> </div>
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<div class="sign-info-item" style="flex-basis: 50%"> <div
class="sign-info-item"
style="flex-basis: 50%"
v-if="detail.outcome_type === 1"
>
<div class="sign-info-item-title">承包商\供应商</div> <div class="sign-info-item-title">承包商\供应商</div>
<div class="sign-info-item-content">{{ detail.supply }}</div> <div class="sign-info-item-content">{{ detail.supply }}</div>
</div> </div>
@ -184,6 +217,21 @@
</div> </div>
</div> </div>
</div> </div>
<div class="pay-plan" v-if="detail.outcome_type !== 1">
<div class="pay-plan-title">关联审批单</div>
<xy-table
:height="240"
:table-item="[
{ label: '名称', prop: 'title', minWidth: 140, align: 'left' },
]"
:list="detail.oa"
:show-index="false"
>
<template v-slot:btns>
<div></div>
</template>
</xy-table>
</div>
<div class="pay-plan"> <div class="pay-plan">
<div class="pay-plan-title">付款计划</div> <div class="pay-plan-title">付款计划</div>
<xy-table <xy-table
@ -259,6 +307,22 @@
ref="detailContractSign" ref="detailContractSign"
@editorSuccess="getDetail(id)" @editorSuccess="getDetail(id)"
></detailContractSign> ></detailContractSign>
<Modal
:width="76"
transfer
v-model="showModal"
:footer-hide="true"
title="预览"
>
<template>
<iframe
style="width: 100%; height: 57vh"
:src="codeUri"
border="0"
></iframe>
</template>
</Modal>
</div> </div>
</template> </template>
@ -282,6 +346,8 @@ export default {
}, },
data() { data() {
return { return {
showModal: false,
codeUri: '',
window: { window: {
width: 0, width: 0,
height: 0, height: 0,
@ -541,6 +607,14 @@ export default {
}); });
}); });
}, },
open(e) {
this.codeUri = `http://view.ali251.langye.net:8012/onlinePreview?url=${encodeURIComponent(
new Buffer(e.url).toString("base64")
)}`;
this.showModal = true;
}
}, },
computed: { computed: {
typeFormatter() { typeFormatter() {
@ -591,16 +665,12 @@ export default {
watch: { watch: {
isShowDetail(val) { isShowDetail(val) {
if (val) { if (val) {
httpCurl({ tbname: "hetong", out_contract_id: this.id }).then( httpCurl({ tbname: "hetong", out_contract_id: this.id }).then((res) => {
(res) => { this.outContractDetail = res;
this.outContractDetail = res; });
} httpCurl({ tbname: "caigou", out_caigou_id: this.id }).then((res) => {
); this.outCaigouDetail = res;
httpCurl({ tbname: "caigou", out_caigou_id: this.id }).then( });
(res) => {
this.outCaigouDetail = res;
}
);
httpCurl({ tbname: "pay", out_pay_id: this.id }).then((res) => { httpCurl({ tbname: "pay", out_pay_id: this.id }).then((res) => {
this.outPayDetail = res; this.outPayDetail = res;
}); });
@ -717,4 +787,12 @@ export default {
} }
} }
} }
a {
color: red;
&:hover {
color: red;
text-decoration: underline;
}
}
</style> </style>

@ -85,6 +85,53 @@
</div> </div>
</div> </div>
</template> </template>
<template #remark>
<div class="xy-table-item">
<div class="xy-table-item-label">
备注
</div>
<div class="xy-table-item-content">
<el-input style="width: 300px" type="textarea" v-model="form.remark" :autosize="{ minRows: 2 }"></el-input>
</div>
</div>
</template>
<template #files>
<div class="xy-table-item">
<div class="xy-table-item-label">文件 </div>
<div class="xy-table-item-content">
<el-upload
style="width: 300px"
ref="upload"
multiple
:headers="{
'Authorization':'Bearer ' + getToken()
}"
:on-success="successHandle"
:before-upload="uploadBefore"
accept="application/x-rar-compressed,application/zip,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf"
:action="action"
:file-list="fileList"
:auto-upload="false"
:on-remove="removeHande"
>
<el-button slot="trigger" size="small" type="primary"
>选取文件</el-button
>
<el-button
style="margin-left: 10px"
size="small"
type="success"
@click="$refs['upload'].submit()"
>开始上传</el-button
>
<div slot="tip" class="el-upload__tip">
支持文件格式.rar .zip .doc .docx .pdf
<br />单个文件不能超过500kb
</div>
</el-upload>
</div>
</div>
</template>
<template v-slot:oa> <template v-slot:oa>
<div class="xy-table-item"> <div class="xy-table-item">
<div class="xy-table-item-label"> <div class="xy-table-item-label">
@ -152,6 +199,7 @@
</template> </template>
<script> <script>
import { getToken } from "@/utils/auth"
import { getparameter } from "@/api/system/dictionary"; import { getparameter } from "@/api/system/dictionary";
import { import {
addContrant, addContrant,
@ -232,12 +280,16 @@ export default {
id: "", id: "",
type: "", type: "",
fileList: [],
action: process.env.VUE_APP_UPLOAD_API,
form: { form: {
name: "", name: "",
outcome_type: "", outcome_type: "",
report_type: "", report_type: "",
other_type: "", other_type: "",
money: undefined, money: undefined,
files: [],
remark: "",
oa: [], oa: [],
}, },
rules: { rules: {
@ -257,6 +309,25 @@ export default {
}; };
}, },
methods: { methods: {
getToken,
//
successHandle(response, file, fileList) {
this.fileList = fileList;
},
removeHande(file, fileList) {
this.fileList = fileList;
},
uploadBefore(file) {
console.log(file);
if (file.size / 1000 > 500) {
this.$message({
type: "warning",
message: "上传文件大小超过500kb",
});
return false;
}
},
show() { show() {
this.isShow = true; this.isShow = true;
}, },
@ -308,16 +379,22 @@ export default {
async getDetail() { async getDetail() {
const res = await show({ id: this.id }); const res = await show({ id: this.id });
this.$integrateData(this.form, res); this.$integrateData(this.form, res);
this.fileList = res.files_detail.map(i => {
return {
url: i.url,
name: i.original_name,
response: i
}
})
}, },
submit() { submit() {
this.form.outcome_type = this.outcomeType; this.form.outcome_type = this.outcomeType;
this.form.files = this.fileList.map(i => i.response?.id);
if (this.type === "add") { if (this.type === "add") {
if (this.form.hasOwnProperty("id")) { if (this.form.hasOwnProperty("id")) {
delete this.form.id; delete this.form.id;
} }
addContrant(this.form).then((res) => { addContrant(this.form).then((res) => {
this.$message({ this.$message({
type: "success", type: "success",

Loading…
Cancel
Save