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

@ -5,7 +5,6 @@
:is-show.sync="isShowDetail"
type="normal"
title="详情"
class="contract-detail"
>
<template v-slot:default>
@ -15,20 +14,28 @@
<div class="base-info-item-title">项目名称</div>
<div class="base-info-item-content">{{ detail.name }}</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-content">
{{ typeFormatter(detail.type) }}
</div>
</div>
<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-content" v-if="detail.purchase_way">
{{ detail.purchase_way.value }}
</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-content" v-if="detail.purchase_type">
{{ detail.purchase_type.value }}
@ -36,32 +43,54 @@
</div>
</div>
<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-content">{{ detail.date }}</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-content">
{{ detail.start_date }}{{ detail.end_date }}
</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-content">
{{ moneyFormat(detail.plan_price) }}
</div>
<div class="base-info-item-unit">()</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-content">
{{ moneyWayFormatter(detail.money_way_detail) }}
</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 class="link-budget-plan">
<div class="link-budget-plan" v-if="detail.outcome_type === 1">
<div class="link-budget-plan-title">关联预算计划</div>
<xy-table
:height="260"
@ -74,7 +103,7 @@
</template>
</xy-table>
</div>
<div class="sign-info">
<div class="sign-info" style="margin-top: 20px">
<div class="sign-info-title">签订信息</div>
<div class="sign-info-item">
<div class="sign-info-item-title">合同金额</div>
@ -84,7 +113,11 @@
<div class="sign-info-item-unit"></div>
</div>
<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-content">{{ detail.supply }}</div>
</div>
@ -184,6 +217,21 @@
</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-title">付款计划</div>
<xy-table
@ -259,6 +307,22 @@
ref="detailContractSign"
@editorSuccess="getDetail(id)"
></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>
</template>
@ -282,6 +346,8 @@ export default {
},
data() {
return {
showModal: false,
codeUri: '',
window: {
width: 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: {
typeFormatter() {
@ -591,16 +665,12 @@ export default {
watch: {
isShowDetail(val) {
if (val) {
httpCurl({ tbname: "hetong", out_contract_id: this.id }).then(
(res) => {
this.outContractDetail = res;
}
);
httpCurl({ tbname: "caigou", out_caigou_id: this.id }).then(
(res) => {
this.outCaigouDetail = res;
}
);
httpCurl({ tbname: "hetong", out_contract_id: this.id }).then((res) => {
this.outContractDetail = res;
});
httpCurl({ tbname: "caigou", out_caigou_id: this.id }).then((res) => {
this.outCaigouDetail = res;
});
httpCurl({ tbname: "pay", out_pay_id: this.id }).then((res) => {
this.outPayDetail = res;
});
@ -717,4 +787,12 @@ export default {
}
}
}
a {
color: red;
&:hover {
color: red;
text-decoration: underline;
}
}
</style>

@ -85,6 +85,53 @@
</div>
</div>
</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>
<div class="xy-table-item">
<div class="xy-table-item-label">
@ -152,6 +199,7 @@
</template>
<script>
import { getToken } from "@/utils/auth"
import { getparameter } from "@/api/system/dictionary";
import {
addContrant,
@ -232,12 +280,16 @@ export default {
id: "",
type: "",
fileList: [],
action: process.env.VUE_APP_UPLOAD_API,
form: {
name: "",
outcome_type: "",
report_type: "",
other_type: "",
money: undefined,
files: [],
remark: "",
oa: [],
},
rules: {
@ -257,6 +309,25 @@ export default {
};
},
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() {
this.isShow = true;
},
@ -308,16 +379,22 @@ export default {
async getDetail() {
const res = await show({ id: this.id });
this.$integrateData(this.form, res);
this.fileList = res.files_detail.map(i => {
return {
url: i.url,
name: i.original_name,
response: i
}
})
},
submit() {
this.form.outcome_type = this.outcomeType;
this.form.files = this.fileList.map(i => i.response?.id);
if (this.type === "add") {
if (this.form.hasOwnProperty("id")) {
delete this.form.id;
}
addContrant(this.form).then((res) => {
this.$message({
type: "success",

Loading…
Cancel
Save