|
|
|
|
@ -245,31 +245,13 @@
|
|
|
|
|
</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div>-->
|
|
|
|
|
<!-- <span style="padding: 0 6px; word-break: keep-all">-->
|
|
|
|
|
<!-- 请示流程状态-->
|
|
|
|
|
<!-- </span>-->
|
|
|
|
|
<!-- <Select-->
|
|
|
|
|
<!-- v-model="select.req_status"-->
|
|
|
|
|
<!-- clearable-->
|
|
|
|
|
<!-- placeholder="请选择"-->
|
|
|
|
|
<!-- style="width: 100px"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <Option-->
|
|
|
|
|
<!-- v-for="item in options"-->
|
|
|
|
|
<!-- :key="item.value"-->
|
|
|
|
|
<!-- :value="item.value"-->
|
|
|
|
|
<!-- >{{ item.label }}-->
|
|
|
|
|
<!-- </Option>-->
|
|
|
|
|
<!-- </Select>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
</div>
|
|
|
|
|
</xy-selectors>
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
style="margin-left: 10px"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="new RegExp(/contractLedger/g).test($route.path) ? ($refs['addContractLedger'].setType('add'),$refs['addContractLedger'].show()) : isShowAdd = true"
|
|
|
|
|
@click="new RegExp(/contractLedger/g).test($route.path) ? ($refs['addContractLedger'].setType('add'),$refs['addContractLedger'].show()) : $router.push('/contract/contractEdit')"
|
|
|
|
|
>新增</Button
|
|
|
|
|
>
|
|
|
|
|
<Button style="margin-left: 10px" type="primary" @click="getContracts"
|
|
|
|
|
@ -303,10 +285,10 @@
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<div class="slot-btns">
|
|
|
|
|
<template v-if="(scope.row.status === 2 && scope.row.is_end === 0) || (!scope.row.is_contract && ((scope.row.purchase_way && scope.row.purchase_way.value === '网上商城') || scope.row.purchase_status === 3))">
|
|
|
|
|
<template v-if="scope.row.is_assurance == 1 || (!scope.row.is_contract && scope.row.purchase_way && scope.row.purchase_way.value === '网上商城' && scope.row.purchase_status === 3)">
|
|
|
|
|
<template v-if="scope.row.FLOWSTATUS['zhifu'].isEnabled()">
|
|
|
|
|
<template v-if="scope.row.is_assurance === 1">
|
|
|
|
|
<!-- 如果是 履约文件-->
|
|
|
|
|
<template v-if="scope.row.assurance_status == 1 || (!scope.row.is_contract && scope.row.purchase_way && scope.row.purchase_way.value === '网上商城' && scope.row.purchase_status === 3)">
|
|
|
|
|
<template v-if="scope.row.assurance_status === 1">
|
|
|
|
|
<!-- 那么必须财务审核通过-->
|
|
|
|
|
<Button
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
@ -319,8 +301,6 @@
|
|
|
|
|
].isShowPaymentRegistration = true)
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<!-- paying(scope.row) @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"-->
|
|
|
|
|
|
|
|
|
|
付款登记
|
|
|
|
|
</Button>
|
|
|
|
|
</template>
|
|
|
|
|
@ -336,16 +316,11 @@
|
|
|
|
|
'paymentRegistration'
|
|
|
|
|
].isShowPaymentRegistration = true)
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<!-- @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"-->
|
|
|
|
|
付款登记
|
|
|
|
|
>付款登记
|
|
|
|
|
</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template
|
|
|
|
|
v-if="(scope.row.status === 1 && scope.row.join_status === 3 && !/contractLedger/g.test($route.path)) && (scope.row.is_contract && scope.row.purchase_way && scope.row.purchase_way.value !== '网上商城')"
|
|
|
|
|
>
|
|
|
|
|
<template v-if="scope.row.FLOWSTATUS['qianding'].isEnabled()">
|
|
|
|
|
<Button
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
size="small"
|
|
|
|
|
@ -358,17 +333,7 @@
|
|
|
|
|
签订合同
|
|
|
|
|
</Button>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- 采购完成 -->
|
|
|
|
|
<template
|
|
|
|
|
v-if="
|
|
|
|
|
(scope.row.invite_status === 1 &&
|
|
|
|
|
scope.row.purchase_status === 3 &&
|
|
|
|
|
(scope.row.purchase_way
|
|
|
|
|
? scope.row.purchase_way.remark === 'true'
|
|
|
|
|
: false) &&
|
|
|
|
|
!scope.row.is_substitute) && (scope.row.is_contract && scope.row.purchase_way && scope.row.purchase_way.value !== '网上商城')
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<template v-if="scope.row.FLOWSTATUS['zhaobiao'].isEnabled()">
|
|
|
|
|
<Button
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
size="small"
|
|
|
|
|
@ -377,68 +342,151 @@
|
|
|
|
|
$refs['biddingUpload'].setId(scope.row.id),
|
|
|
|
|
$refs['biddingUpload'].show()
|
|
|
|
|
"
|
|
|
|
|
>招标审查</Button
|
|
|
|
|
>招标审查</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <Button class="slot-btns-item" type="primary" size="small">附件管理</Button>-->
|
|
|
|
|
<!-- <template-->
|
|
|
|
|
<!-- v-if="-->
|
|
|
|
|
<!-- scope.row.req_status === 1 &&-->
|
|
|
|
|
<!-- scope.row.is_plan === 0 &&-->
|
|
|
|
|
<!-- !scope.row.is_substitute-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <Button-->
|
|
|
|
|
<!-- class="slot-btns-item"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- @click="askProcess(scope.row)"-->
|
|
|
|
|
<!-- >请示流程-->
|
|
|
|
|
<!-- </Button>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
|
|
|
|
|
<!-- 中标-->
|
|
|
|
|
<!-- <template v-if="false">-->
|
|
|
|
|
<!-- <Button class="slot-btns-item" size="small" type="primary" @click="">中标公告上传</Button>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
|
|
|
|
|
<!--不需要走采购流程那么直接就是会签,如果采购方式不需要招标的也是直接会签-->
|
|
|
|
|
<template
|
|
|
|
|
v-if="
|
|
|
|
|
((scope.row.join_status === 1 &&
|
|
|
|
|
(scope.row.invite_status === 3 ||
|
|
|
|
|
((scope.row.purchase_way
|
|
|
|
|
? scope.row.purchase_way.remark === 'false'
|
|
|
|
|
: false) &&
|
|
|
|
|
scope.row.purchase_status === 3))) ||
|
|
|
|
|
(scope.row.is_substitute && scope.row.join_status === 1)) && (scope.row.is_contract && scope.row.purchase_way && scope.row.purchase_way.value !== '网上商城')
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<template v-if="scope.row.FLOWSTATUS['shenpi'].isEnabled()">
|
|
|
|
|
<Button
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="signProcess(scope.row)"
|
|
|
|
|
>合同审批
|
|
|
|
|
>合同审批
|
|
|
|
|
</Button>
|
|
|
|
|
</template>
|
|
|
|
|
<template
|
|
|
|
|
v-if="
|
|
|
|
|
scope.row.is_simple !== 1 &&
|
|
|
|
|
scope.row.purchase_status === 1 &&
|
|
|
|
|
((scope.row.req_status === 3 && scope.row.is_plan === 0) ||
|
|
|
|
|
scope.row.is_plan === 1) &&
|
|
|
|
|
!scope.row.is_substitute
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<template v-if="scope.row.FLOWSTATUS['caigou'].isEnabled()">
|
|
|
|
|
<Button
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="buyProcess(scope.row)"
|
|
|
|
|
>采购流程
|
|
|
|
|
>采购流程
|
|
|
|
|
</Button>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-if="((scope.row.status === 2) ||-->
|
|
|
|
|
<!-- (!scope.row.is_contract && (scope.row.is_simple)) ||-->
|
|
|
|
|
<!-- ((scope.row.purchase_way && scope.row.purchase_way.value === '网上商城')-->
|
|
|
|
|
<!-- && scope.row.purchase_status === 3) ) && scope.row.is_end === 0">-->
|
|
|
|
|
<!-- <template v-if="scope.row.is_assurance == 1">-->
|
|
|
|
|
<!-- <!– 如果是 履约文件–>-->
|
|
|
|
|
<!-- <template v-if="scope.row.assurance_status == 1">-->
|
|
|
|
|
<!-- <!– 那么必须财务审核通过–>-->
|
|
|
|
|
<!-- <Button-->
|
|
|
|
|
<!-- class="slot-btns-item"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- @click="-->
|
|
|
|
|
<!-- $refs['paymentRegistration'].getContract(scope.row),-->
|
|
|
|
|
<!-- ($refs[-->
|
|
|
|
|
<!-- 'paymentRegistration'-->
|
|
|
|
|
<!-- ].isShowPaymentRegistration = true)-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <!– paying(scope.row) @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"–>-->
|
|
|
|
|
|
|
|
|
|
<!-- 付款登记-->
|
|
|
|
|
<!-- </Button>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- <template v-else>-->
|
|
|
|
|
<!-- <Button-->
|
|
|
|
|
<!-- class="slot-btns-item"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- @click="-->
|
|
|
|
|
<!-- $refs['paymentRegistration'].getContract(scope.row),-->
|
|
|
|
|
<!-- ($refs[-->
|
|
|
|
|
<!-- 'paymentRegistration'-->
|
|
|
|
|
<!-- ].isShowPaymentRegistration = true)-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <!– @click="$refs['paymentRegistration'].getContract(scope.row),$refs['paymentRegistration'].isShowPaymentRegistration = true"–>-->
|
|
|
|
|
<!-- 付款登记-->
|
|
|
|
|
<!-- </Button>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
|
|
|
|
|
<!-- <template-->
|
|
|
|
|
<!-- v-if="-->
|
|
|
|
|
<!-- (scope.row.status === 1 && scope.row.join_status === 3 && !/contractLedger/g.test($route.path)) &&-->
|
|
|
|
|
<!-- (scope.row.is_contract && scope.row.purchase_way && scope.row.purchase_way.value !== '网上商城')"-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <Button-->
|
|
|
|
|
<!-- class="slot-btns-item"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- @click="-->
|
|
|
|
|
<!-- ($refs['contractSign'].isShow = true),-->
|
|
|
|
|
<!-- ($refs['contractSign'].contractId = scope.row.id)-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- 签订合同-->
|
|
|
|
|
<!-- </Button>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- <!– 采购完成 –>-->
|
|
|
|
|
<!-- <template-->
|
|
|
|
|
<!-- v-if="-->
|
|
|
|
|
<!-- (scope.row.invite_status === 1 &&-->
|
|
|
|
|
<!-- scope.row.purchase_status === 3 &&-->
|
|
|
|
|
<!-- (scope.row.purchase_way-->
|
|
|
|
|
<!-- ? scope.row.purchase_way.remark === 'true'-->
|
|
|
|
|
<!-- : false) &&-->
|
|
|
|
|
<!-- !scope.row.is_substitute) &&-->
|
|
|
|
|
<!-- (scope.row.is_contract && scope.row.purchase_way-->
|
|
|
|
|
<!-- && scope.row.purchase_way.value !== '网上商城')-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <Button-->
|
|
|
|
|
<!-- class="slot-btns-item"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- @click="-->
|
|
|
|
|
<!-- $refs['biddingUpload'].setId(scope.row.id),-->
|
|
|
|
|
<!-- $refs['biddingUpload'].show()-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- >招标审查</Button-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
|
|
|
|
|
<!-- <!–不需要走采购流程那么直接就是会签,如果采购方式不需要招标的也是直接会签–>-->
|
|
|
|
|
<!-- <template-->
|
|
|
|
|
<!-- v-if="-->
|
|
|
|
|
<!-- scope.row.is_contract &&-->
|
|
|
|
|
<!-- ((scope.row.join_status === 1 &&-->
|
|
|
|
|
<!-- (scope.row.invite_status === 3 ||-->
|
|
|
|
|
<!-- ((scope.row.purchase_way-->
|
|
|
|
|
<!-- ? scope.row.purchase_way.remark === 'false'-->
|
|
|
|
|
<!-- : false) &&-->
|
|
|
|
|
<!-- scope.row.purchase_status === 3))) ||-->
|
|
|
|
|
<!-- (scope.row.is_substitute && scope.row.join_status === 1))-->
|
|
|
|
|
<!-- && (scope.row.purchase_way && scope.row.purchase_way.value !== '网上商城')-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <Button-->
|
|
|
|
|
<!-- class="slot-btns-item"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- @click="signProcess(scope.row)"-->
|
|
|
|
|
<!-- >合同审批-->
|
|
|
|
|
<!-- </Button>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<!-- <template-->
|
|
|
|
|
<!-- v-if="-->
|
|
|
|
|
<!-- scope.row.is_simple !== 1 &&-->
|
|
|
|
|
<!-- scope.row.purchase_status === 1 &&-->
|
|
|
|
|
<!-- ((scope.row.req_status === 3 && scope.row.is_plan === 0) ||-->
|
|
|
|
|
<!-- scope.row.is_plan === 1) &&-->
|
|
|
|
|
<!-- !scope.row.is_substitute-->
|
|
|
|
|
<!-- "-->
|
|
|
|
|
<!-- >-->
|
|
|
|
|
<!-- <Button-->
|
|
|
|
|
<!-- class="slot-btns-item"-->
|
|
|
|
|
<!-- size="small"-->
|
|
|
|
|
<!-- type="primary"-->
|
|
|
|
|
<!-- @click="buyProcess(scope.row)"-->
|
|
|
|
|
<!-- >采购流程-->
|
|
|
|
|
<!-- </Button>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
|
|
|
|
|
<Poptip trigger="hover" placement="bottom" transfer>
|
|
|
|
|
<Button ghost size="small" type="primary">更多</Button>
|
|
|
|
|
@ -1520,66 +1568,6 @@ export default {
|
|
|
|
|
{
|
|
|
|
|
label: "采购流程",
|
|
|
|
|
multiHd: [
|
|
|
|
|
// {
|
|
|
|
|
// label: "请示流程",
|
|
|
|
|
// width: 140,
|
|
|
|
|
// prop: "req_status",
|
|
|
|
|
// formatter: (cell, data, value) => {
|
|
|
|
|
// if (cell.is_substitute) {
|
|
|
|
|
// return "无";
|
|
|
|
|
// }
|
|
|
|
|
// if (cell.is_plan === 1) {
|
|
|
|
|
// return "无";
|
|
|
|
|
// }
|
|
|
|
|
// switch (value) {
|
|
|
|
|
// case 1:
|
|
|
|
|
// return "待申请";
|
|
|
|
|
// break;
|
|
|
|
|
// case 2:
|
|
|
|
|
// return "流转中";
|
|
|
|
|
// break;
|
|
|
|
|
// case 3:
|
|
|
|
|
// return "已办结";
|
|
|
|
|
// break;
|
|
|
|
|
// default:
|
|
|
|
|
// return "异常";
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
// customFn:row => {
|
|
|
|
|
// const getDate = (value) => {
|
|
|
|
|
// if (row.is_substitute) {
|
|
|
|
|
// return "无";
|
|
|
|
|
// }
|
|
|
|
|
// if (row.is_plan === 1) {
|
|
|
|
|
// return "无";
|
|
|
|
|
// }
|
|
|
|
|
// switch (value) {
|
|
|
|
|
// case 1:
|
|
|
|
|
// return "待申请";
|
|
|
|
|
// break;
|
|
|
|
|
// case 2:
|
|
|
|
|
// return "流转中";
|
|
|
|
|
// break;
|
|
|
|
|
// case 3:
|
|
|
|
|
// return "已办结";
|
|
|
|
|
// break;
|
|
|
|
|
// default:
|
|
|
|
|
// return "异常";
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// return (
|
|
|
|
|
// <div>
|
|
|
|
|
// <span>{ getDate(row.purchase_status) }</span>
|
|
|
|
|
// <br/>
|
|
|
|
|
// {
|
|
|
|
|
// (row.purchase_status === 1 || row.is_substitute || row.is_plan === 1) ? '' : <a style="color: #333" on={{['click']:this.toOaDetail}}>查看</a>
|
|
|
|
|
// }
|
|
|
|
|
// </div>
|
|
|
|
|
// )
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
label: "采购业务审批流程",
|
|
|
|
|
width: 158,
|
|
|
|
|
@ -1664,7 +1652,7 @@ export default {
|
|
|
|
|
width: 145,
|
|
|
|
|
prop: "join_status",
|
|
|
|
|
customFn:row => {
|
|
|
|
|
if (row.is_simple || !row.is_contract) {
|
|
|
|
|
if (row.is_simple || !row.is_contract || (row.purchase_way && row.purchase_way.value === '网上商城')) {
|
|
|
|
|
return (<span>无</span>);
|
|
|
|
|
}
|
|
|
|
|
const getDate = (value) => {
|
|
|
|
|
@ -1688,7 +1676,7 @@ export default {
|
|
|
|
|
<span>{ getDate(row.join_status) }</span>
|
|
|
|
|
<br/>
|
|
|
|
|
{
|
|
|
|
|
(row.is_simple || row.join_status === 1) ? '' : <a style="color: #333" on={{['click']:()=>this.toOaDetail('hetong',row)}}>查看</a>
|
|
|
|
|
row.join_status === 1 ? '' : <a style="color: #333" on={{['click']:()=>this.toOaDetail('hetong',row)}}>查看</a>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
@ -2343,7 +2331,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (column.property === "join_status") {
|
|
|
|
|
if (row.is_simple) {
|
|
|
|
|
if (row.is_simple || (row.purchase_way && row.purchase_way.value === '网上商城')) {
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(140,140,140)",
|
|
|
|
|
};
|
|
|
|
|
@ -2622,7 +2610,7 @@ export default {
|
|
|
|
|
this.select.is_export = 0;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
res.list.data.forEach(i => this.handleContractFlow(i))
|
|
|
|
|
this.list = res.list.data;
|
|
|
|
|
this.total = res.list.total;
|
|
|
|
|
this.tableTotal.fundLogTotal = res.fund_log_total;
|
|
|
|
|
@ -2633,7 +2621,7 @@ export default {
|
|
|
|
|
.toFixed(2)
|
|
|
|
|
.replace(/(\d)(?=(\d{3})+\.)/g, "$1,");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(this.list)
|
|
|
|
|
|
|
|
|
|
//新增时打开oa采购录入
|
|
|
|
|
if (isopenOa) {
|
|
|
|
|
@ -2645,9 +2633,8 @@ export default {
|
|
|
|
|
res.list.data[0].is_plan === 1) &&
|
|
|
|
|
!res.list.data[0].is_substitute
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
|
|
await this.buyProcess(res.list.data[0])
|
|
|
|
|
}
|
|
|
|
|
await this.buyProcess(res.list.data[0])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
@ -2857,6 +2844,88 @@ export default {
|
|
|
|
|
selectionChange(selection) {
|
|
|
|
|
this.selections = Array.from(new Set(selection));
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//数据流程状态处理
|
|
|
|
|
handleContractFlow (item) {
|
|
|
|
|
class Flow {
|
|
|
|
|
status = 0
|
|
|
|
|
executable = false
|
|
|
|
|
constructor(status=0, executable=false) {
|
|
|
|
|
this.status = status
|
|
|
|
|
this.executable = executable
|
|
|
|
|
}
|
|
|
|
|
setStatus (status) {
|
|
|
|
|
this.status = status
|
|
|
|
|
}
|
|
|
|
|
setExecutable (executable) {
|
|
|
|
|
if (typeof executable === 'boolean') {
|
|
|
|
|
this.executable = executable
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
getStatus () {
|
|
|
|
|
return this.status
|
|
|
|
|
}
|
|
|
|
|
isEnabled () {
|
|
|
|
|
return this.executable && this.status === 1
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//0无该流程,1未开始,2进行中,3已完成(合同签订1待签订,2已签订)
|
|
|
|
|
let flowStatus = {
|
|
|
|
|
"caigou": new Flow(),
|
|
|
|
|
"zhaobiao": new Flow(),
|
|
|
|
|
"shenpi": new Flow(),
|
|
|
|
|
"qianding": new Flow(),
|
|
|
|
|
"zhifu": new Flow()
|
|
|
|
|
}
|
|
|
|
|
if (item.is_simple !== 1 && !item.is_substitute) {
|
|
|
|
|
//不为简易 采购未开始 不为代建
|
|
|
|
|
|
|
|
|
|
flowStatus["caigou"].setStatus(item.purchase_status)
|
|
|
|
|
if (item.purchase_status === 1) {
|
|
|
|
|
//采购未开始
|
|
|
|
|
if (item.is_plan === 1 || (item.is_plan === 0 && item.req_status === 3)) {
|
|
|
|
|
//不为预算时,请示流程完成
|
|
|
|
|
flowStatus["caigou"].setExecutable(true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.purchase_way?.value !== '网上商城' && item.is_contract && !item.is_substitute && item.purchase_way?.remark === 'true') {
|
|
|
|
|
//不为网上商场 是合同 不为代建
|
|
|
|
|
flowStatus["zhaobiao"].setStatus(item.invite_status)
|
|
|
|
|
if (item.invite_status === 1 && item.purchase_status === 3) {
|
|
|
|
|
//采购完成,招标未开始
|
|
|
|
|
flowStatus["zhaobiao"].setExecutable(true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.is_contract && item.purchase_way?.value !== "网上商城") {
|
|
|
|
|
//为合同 不为网上商城
|
|
|
|
|
flowStatus["shenpi"].setStatus(item.join_status)
|
|
|
|
|
if (item.join_status === 1 && (item.invite_status === 3 ||
|
|
|
|
|
(item.purchase_way?.remark === 'false' && item.purchase_status === 3) ||
|
|
|
|
|
item.is_substitute)) {
|
|
|
|
|
//审批未开始 为代建或走招标招标完成或不走招标采购完成
|
|
|
|
|
flowStatus["shenpi"].setExecutable(true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.is_contract && item.purchase_way?.value !== "网上商城" && !/contractLedger/g.test(this.$route.path)) {
|
|
|
|
|
flowStatus["qianding"].setStatus(item.status)
|
|
|
|
|
if (item.join_status === 3 && item.status === 1) {
|
|
|
|
|
flowStatus["qianding"].setExecutable(true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.is_end === 0) {
|
|
|
|
|
flowStatus["zhifu"].setStatus(1)
|
|
|
|
|
//最后一笔没付完
|
|
|
|
|
if ((item.purchase_way?.value === "网上商城" && item.purchase_status === 3) ||
|
|
|
|
|
item.status === 2 ||
|
|
|
|
|
(!item.is_contract && item.is_simple)) {
|
|
|
|
|
//网上商场的话采购完成 合同签订完成 不为合同并且为简易
|
|
|
|
|
flowStatus["zhifu"].setExecutable(true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
item.FLOWSTATUS = flowStatus
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
purchaseWayFormat() {
|
|
|
|
|
@ -2907,66 +2976,18 @@ export default {
|
|
|
|
|
this.getDepartment();
|
|
|
|
|
this.getPurchaseWay();
|
|
|
|
|
this.getMoneyWay();
|
|
|
|
|
updateFlow().then(_ => this.getContracts())
|
|
|
|
|
this.getContracts();
|
|
|
|
|
//页面激活后刷新合同列表
|
|
|
|
|
window.onfocus = async () => {
|
|
|
|
|
await updateFlow();
|
|
|
|
|
await this.getContracts(false,true)
|
|
|
|
|
// if (this.nowContract?.tbname && this.nowContract?.id) {
|
|
|
|
|
// let select = {};
|
|
|
|
|
// select["tbname"] = this.nowContract.tbname;
|
|
|
|
|
// switch (this.nowContract.tbname) {
|
|
|
|
|
// case "caigou":
|
|
|
|
|
// select["out_caigou_id"] = this.nowContract.id;
|
|
|
|
|
// break;
|
|
|
|
|
// case "hetong":
|
|
|
|
|
// select["out_contract_id"] = this.nowContract.id;
|
|
|
|
|
// break;
|
|
|
|
|
// case "zhaobiao":
|
|
|
|
|
// select["out_zhaobiao_id"] = this.nowContract.id;
|
|
|
|
|
// break;
|
|
|
|
|
// }
|
|
|
|
|
// const res = await httpCurl(select);
|
|
|
|
|
// let flowIdMap = new Map([
|
|
|
|
|
// ["caigou", 8],
|
|
|
|
|
// ["hetong", 9],
|
|
|
|
|
// ["zhaobiao", 30],
|
|
|
|
|
// ]);
|
|
|
|
|
// let flowTypeMap = new Map([
|
|
|
|
|
// ["caigou", 2],
|
|
|
|
|
// ["hetong", 3],
|
|
|
|
|
// ["zhaobiao", 27],
|
|
|
|
|
// ]);
|
|
|
|
|
// let getStatus = (status) => {
|
|
|
|
|
// if (status === "end") {
|
|
|
|
|
// return 1;
|
|
|
|
|
// }
|
|
|
|
|
// if (Number(status)) {
|
|
|
|
|
// return 0;
|
|
|
|
|
// }
|
|
|
|
|
// return -1;
|
|
|
|
|
// };
|
|
|
|
|
// await updateStatus({
|
|
|
|
|
// flow_id: flowIdMap.get(this.nowContract.tbname),
|
|
|
|
|
// flow_type: flowTypeMap.get(this.nowContract.tbname),
|
|
|
|
|
// out_contract_id: this.nowContract.id,
|
|
|
|
|
// status: getStatus(res.flow?.current_step),
|
|
|
|
|
// },true);
|
|
|
|
|
// await this.getContracts(false,true);
|
|
|
|
|
// }
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getBudgets();
|
|
|
|
|
this.select.keyword = this.$route.query.keyword;
|
|
|
|
|
// iframe = document.createElement("iframe");
|
|
|
|
|
// iframe.src = `${process.env.VUE_APP_OUT_OLD}/login/oss_login?id=${this.$store.state.user.userId}&username=${this.$store.state.user.username}`;
|
|
|
|
|
// iframe.style.display = "none";
|
|
|
|
|
// document.body.appendChild(iframe);
|
|
|
|
|
},
|
|
|
|
|
destroyed() {
|
|
|
|
|
window.onfocus = null;
|
|
|
|
|
//document.body.removeChild(iframe);
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|