|
|
|
|
@ -269,7 +269,7 @@
|
|
|
|
|
<Button
|
|
|
|
|
style="margin-left: 10px"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="isShowAdd = true"
|
|
|
|
|
@click="new RegExp(/contractLedger/g).test($route.path) ? ($refs['addContractLedger'].setType('add'),$refs['addContractLedger'].show()) : isShowAdd = true"
|
|
|
|
|
>新增</Button
|
|
|
|
|
>
|
|
|
|
|
<Button style="margin-left: 10px" type="primary" @click="getContracts"
|
|
|
|
|
@ -289,7 +289,7 @@
|
|
|
|
|
:list="list"
|
|
|
|
|
:show-summary="true"
|
|
|
|
|
:summary-method="summary"
|
|
|
|
|
:table-item="table"
|
|
|
|
|
:table-item="/contractLedger/g.test($route.path) ? ledgerTable : table"
|
|
|
|
|
@cellClick="showPaymentPlan"
|
|
|
|
|
@delete="(row) => deleteContract(row.id)"
|
|
|
|
|
@editor=""
|
|
|
|
|
@ -344,7 +344,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template
|
|
|
|
|
v-if="scope.row.status === 1 && scope.row.join_status === 3"
|
|
|
|
|
v-if="scope.row.status === 1 && scope.row.join_status === 3 && !/contractLedger/g.test($route.path)"
|
|
|
|
|
>
|
|
|
|
|
<Button
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
@ -498,8 +498,10 @@
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="
|
|
|
|
|
($refs['editor'].isShowEditor = true),
|
|
|
|
|
$refs['editor'].getDetail(scope.row.id)
|
|
|
|
|
(new RegExp(/contractLedger/g).test($route.path)) ?
|
|
|
|
|
($refs['addContractLedger'].setId(scope.row.id),$refs['addContractLedger'].setType('editor'),$refs['addContractLedger'].show()) :
|
|
|
|
|
($refs['editor'].isShowEditor = true,
|
|
|
|
|
$refs['editor'].getDetail(scope.row.id))
|
|
|
|
|
"
|
|
|
|
|
>编辑
|
|
|
|
|
</Button>
|
|
|
|
|
@ -562,6 +564,26 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:is_contract>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red; font-weight: 600; padding-right: 4px"
|
|
|
|
|
>*</span
|
|
|
|
|
>是否为合同
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<div style="display: flex; width: 300px; align-items: center">
|
|
|
|
|
<el-switch
|
|
|
|
|
v-model="form.is_contract"
|
|
|
|
|
active-text="是"
|
|
|
|
|
inactive-text="否"
|
|
|
|
|
:active-value="1"
|
|
|
|
|
:inactive-value="0"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:is_simple>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
@ -919,12 +941,19 @@
|
|
|
|
|
<!-- 新增表 预算计划 -->
|
|
|
|
|
<xy-dialog
|
|
|
|
|
:is-show.sync="isShowPlan"
|
|
|
|
|
:width="820"
|
|
|
|
|
:width="840"
|
|
|
|
|
title="预算计划"
|
|
|
|
|
@on-ok="planSelect"
|
|
|
|
|
>
|
|
|
|
|
<template>
|
|
|
|
|
<div style="display: flex">
|
|
|
|
|
<div style="display: flex;width: 100%;">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="planSearch.year"
|
|
|
|
|
type="year"
|
|
|
|
|
placeholder="年份"
|
|
|
|
|
value-format="yyyy"
|
|
|
|
|
style="width: 90px"
|
|
|
|
|
size="small"></el-date-picker>
|
|
|
|
|
<el-select
|
|
|
|
|
placeholder="科室选择"
|
|
|
|
|
clearable
|
|
|
|
|
@ -941,6 +970,7 @@
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<Input
|
|
|
|
|
style="flex: 1;"
|
|
|
|
|
v-model="planSearch.name"
|
|
|
|
|
enter-button="搜 索"
|
|
|
|
|
placeholder="搜索预算计划.."
|
|
|
|
|
@ -1055,6 +1085,8 @@
|
|
|
|
|
<biddingUpload ref="biddingUpload" @refresh="getContracts"></biddingUpload>
|
|
|
|
|
|
|
|
|
|
<oaFiles ref="oaFiles"></oaFiles>
|
|
|
|
|
|
|
|
|
|
<addContractLedger ref="addContractLedger" @refresh="getContracts"></addContractLedger>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@ -1082,9 +1114,11 @@ import contractSign from "@/views/contract/components/contractSign";
|
|
|
|
|
import contractPaymentRegistration from "@/views/contract/components/contractPaymentRegistration";
|
|
|
|
|
import biddingUpload from "./components/biddingUpload.vue";
|
|
|
|
|
import oaFiles from './components/oaFiles.vue';
|
|
|
|
|
import addContractLedger from '@/views/contract/components/addContractLedger.vue'
|
|
|
|
|
let iframe;
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
addContractLedger,
|
|
|
|
|
editor,
|
|
|
|
|
detail,
|
|
|
|
|
paymentRegistration,
|
|
|
|
|
@ -1181,7 +1215,7 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
userList: ["liuxiangyu", "zhushulan", "admin", "jiangjiao"],
|
|
|
|
|
userList: ["ma_sm", "admin", "yu_l","wang_yx","li_f","chen_y"],
|
|
|
|
|
nowContract: {},
|
|
|
|
|
window: {
|
|
|
|
|
width: 0,
|
|
|
|
|
@ -1271,6 +1305,81 @@ export default {
|
|
|
|
|
list: [], //数据
|
|
|
|
|
total: 0,
|
|
|
|
|
//表格
|
|
|
|
|
ledgerTable: [
|
|
|
|
|
{
|
|
|
|
|
label: "项目名称",
|
|
|
|
|
width: 380,
|
|
|
|
|
prop: "name",
|
|
|
|
|
fixed: "left",
|
|
|
|
|
align: "left",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "合同编号",
|
|
|
|
|
width: 200,
|
|
|
|
|
prop: 'number',
|
|
|
|
|
align: 'center'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "合同签订价(元)",
|
|
|
|
|
width: 140,
|
|
|
|
|
prop: "money",
|
|
|
|
|
align: "right",
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
return Number(value)
|
|
|
|
|
.toFixed(2)
|
|
|
|
|
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "供应商/服务商",
|
|
|
|
|
width: 220,
|
|
|
|
|
prop: "supply",
|
|
|
|
|
align: "left",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "业务科室",
|
|
|
|
|
width: 140,
|
|
|
|
|
prop: "department.name",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "经办人",
|
|
|
|
|
width: 140,
|
|
|
|
|
prop: "admin.name",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "合同服务日期",
|
|
|
|
|
width: 200,
|
|
|
|
|
customFn: (row) => {
|
|
|
|
|
if (row.start_date && row.end_date) {
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<span>
|
|
|
|
|
{row.start_date} ~ {row.end_date}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
return <span></span>;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "签订日期",
|
|
|
|
|
width: 160,
|
|
|
|
|
prop: "date",
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
if (value) return parseTime(new Date(value), "{y}-{m}-{d}");
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "创建日期",
|
|
|
|
|
width: 160,
|
|
|
|
|
prop: "created_at",
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
return parseTime(new Date(value), "{y}-{m}-{d}");
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
table: [
|
|
|
|
|
{
|
|
|
|
|
label: "项目名称",
|
|
|
|
|
@ -1374,30 +1483,11 @@ export default {
|
|
|
|
|
label: "采购业务审批流程",
|
|
|
|
|
width: 158,
|
|
|
|
|
prop: "purchase_status",
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
if (cell.is_substitute || cell.is_simple) {
|
|
|
|
|
return "无";
|
|
|
|
|
}
|
|
|
|
|
switch (value) {
|
|
|
|
|
case 1:
|
|
|
|
|
return "待申请";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return "流转中";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return "已办结";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return "异常";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
customFn:row => {
|
|
|
|
|
if (row.is_substitute || row.is_simple || !row.is_contract) {
|
|
|
|
|
return (<span>无</span>);
|
|
|
|
|
}
|
|
|
|
|
const getDate = (value) => {
|
|
|
|
|
if (row.is_substitute || row.is_simple) {
|
|
|
|
|
return "无";
|
|
|
|
|
}
|
|
|
|
|
switch (value) {
|
|
|
|
|
case 1:
|
|
|
|
|
return "待申请";
|
|
|
|
|
@ -1428,36 +1518,14 @@ export default {
|
|
|
|
|
label: "招标审核流程",
|
|
|
|
|
width: 145,
|
|
|
|
|
prop: "invite_status",
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
if (cell.is_substitute || cell.is_simple) {
|
|
|
|
|
return "无";
|
|
|
|
|
}
|
|
|
|
|
if (cell.purchase_way?.remark === "false") {
|
|
|
|
|
return "无";
|
|
|
|
|
customFn:row => {
|
|
|
|
|
if (row.is_substitute || row.is_simple || !row.is_contract) {
|
|
|
|
|
return (<span>无</span>);
|
|
|
|
|
}
|
|
|
|
|
switch (value) {
|
|
|
|
|
case 1:
|
|
|
|
|
return "待申请";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return "流转中";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return "已办结";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return "异常";
|
|
|
|
|
break;
|
|
|
|
|
if (row.purchase_way?.remark === "false") {
|
|
|
|
|
return (<span>无</span>);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
customFn:row => {
|
|
|
|
|
const getDate = (value) => {
|
|
|
|
|
if (row.is_substitute || row.is_simple) {
|
|
|
|
|
return "无";
|
|
|
|
|
}
|
|
|
|
|
if (row.purchase_way?.remark === "false") {
|
|
|
|
|
return "无";
|
|
|
|
|
}
|
|
|
|
|
switch (value) {
|
|
|
|
|
case 1:
|
|
|
|
|
return "待申请";
|
|
|
|
|
@ -1494,30 +1562,11 @@ export default {
|
|
|
|
|
label: "合同审批流程",
|
|
|
|
|
width: 145,
|
|
|
|
|
prop: "join_status",
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
if (cell.is_simple) {
|
|
|
|
|
return "无";
|
|
|
|
|
}
|
|
|
|
|
switch (value) {
|
|
|
|
|
case 1:
|
|
|
|
|
return "待申请";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return "流转中";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return "已办结";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return "异常";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
customFn:row => {
|
|
|
|
|
if (row.is_simple || !row.is_contract) {
|
|
|
|
|
return (<span>无</span>);
|
|
|
|
|
}
|
|
|
|
|
const getDate = (value) => {
|
|
|
|
|
if (row.is_simple) {
|
|
|
|
|
return "无";
|
|
|
|
|
}
|
|
|
|
|
switch (value) {
|
|
|
|
|
case 1:
|
|
|
|
|
return "待申请";
|
|
|
|
|
@ -1739,13 +1788,7 @@ export default {
|
|
|
|
|
planTableSearch: [
|
|
|
|
|
{
|
|
|
|
|
label: "分类",
|
|
|
|
|
prop: "type",
|
|
|
|
|
formatter: (cell, data, value) => {
|
|
|
|
|
let res = this.moneyWay.filter((item) => {
|
|
|
|
|
return item.id === value;
|
|
|
|
|
});
|
|
|
|
|
return res[0]?.value || "未知";
|
|
|
|
|
},
|
|
|
|
|
prop: "type_detail.value",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "年份",
|
|
|
|
|
@ -1800,12 +1843,6 @@ export default {
|
|
|
|
|
width: 80,
|
|
|
|
|
align: "center",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "隶属",
|
|
|
|
|
prop: "pid_info.name",
|
|
|
|
|
width: 180,
|
|
|
|
|
align: "left",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "名称",
|
|
|
|
|
prop: "name",
|
|
|
|
|
@ -1842,6 +1879,7 @@ export default {
|
|
|
|
|
isShowAdd: false,
|
|
|
|
|
form: {
|
|
|
|
|
name: "",
|
|
|
|
|
is_contract: 1,
|
|
|
|
|
is_simple: 0,
|
|
|
|
|
supply: "",
|
|
|
|
|
money: 0,
|
|
|
|
|
@ -1920,6 +1958,7 @@ export default {
|
|
|
|
|
planSearch: {
|
|
|
|
|
name: "",
|
|
|
|
|
plan_department_id: "",
|
|
|
|
|
year: ""
|
|
|
|
|
},
|
|
|
|
|
planTotal: 0,
|
|
|
|
|
plansPageIndex: 1,
|
|
|
|
|
@ -2005,7 +2044,7 @@ export default {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res && res.flow?.id) {
|
|
|
|
|
window.open(
|
|
|
|
|
`http://hjjc-szemcold-test.ali251.langye.net/index.php?s=/flow/edit/id/${res.flow.id}&auth_token=${this.$store.getters.oa_token}`,
|
|
|
|
|
`${process.env.VUE_APP_OUT_OLD}/index.php?s=/flow/edit/id/${res.flow.id}&auth_token=${this.$store.getters.oa_token}`,
|
|
|
|
|
"bidding",
|
|
|
|
|
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
|
|
|
|
|
)
|
|
|
|
|
@ -2104,7 +2143,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
cellStyle({ row, column, rowIndex, columnIndex }) {
|
|
|
|
|
if (column.property === "req_status") {
|
|
|
|
|
if (row.is_plan || row.is_substitute || row.is_simple) {
|
|
|
|
|
if (row.is_plan || row.is_substitute || row.is_simple || !row.is_contract) {
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(140,140,140)",
|
|
|
|
|
};
|
|
|
|
|
@ -2273,9 +2312,6 @@ export default {
|
|
|
|
|
|
|
|
|
|
//采购流程
|
|
|
|
|
async buyProcess(row) {
|
|
|
|
|
let zijinlaiyuanjuti = row.plans?.map(plan => {
|
|
|
|
|
return this.plans.find(p => p.id === plan.pid)?.name
|
|
|
|
|
})
|
|
|
|
|
this.setNowContract(row, "caigou");
|
|
|
|
|
let baseInfo = {
|
|
|
|
|
title: row?.name,
|
|
|
|
|
@ -2291,11 +2327,12 @@ export default {
|
|
|
|
|
if (index === 0) {
|
|
|
|
|
return cur?.value;
|
|
|
|
|
} else {
|
|
|
|
|
return prev + "," + cur?.value;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}, ""),
|
|
|
|
|
zijinlaiyuanjuti: zijinlaiyuanjuti.toString()
|
|
|
|
|
zijinlaiyuanjuti: row?.plans.reduce((pre,cur,index)=>(index === 0 ? cur?.name : pre+cur?.name+","),"")
|
|
|
|
|
};
|
|
|
|
|
console.log(baseInfo.zijinlaiyuanjuti)
|
|
|
|
|
// let res = await getOatoken()
|
|
|
|
|
let url = `${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/8&auth_token=${this.$store.getters.oa_token}&out_caigou_id=${
|
|
|
|
|
row.id
|
|
|
|
|
@ -2394,7 +2431,8 @@ export default {
|
|
|
|
|
page: this.plansPageIndex,
|
|
|
|
|
plan_department_id: this.planSearch.plan_department_id,
|
|
|
|
|
top_pid: '',
|
|
|
|
|
is_tree: 1
|
|
|
|
|
is_tree: 1,
|
|
|
|
|
year: this.planSearch.year
|
|
|
|
|
});
|
|
|
|
|
this.plans = res.list;
|
|
|
|
|
|
|
|
|
|
@ -2446,6 +2484,11 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
//获取合同列表
|
|
|
|
|
async getContracts(is_export,noloading=false) {
|
|
|
|
|
if (/contractLedger/g.test(this.$route.path)) {
|
|
|
|
|
this.select.is_contract = 1
|
|
|
|
|
} else {
|
|
|
|
|
this.select.is_contract = ""
|
|
|
|
|
}
|
|
|
|
|
const res = await getContract({
|
|
|
|
|
page_size: this.select.pageSize,
|
|
|
|
|
page: this.select.pageIndex,
|
|
|
|
|
|