|
|
|
|
@ -272,7 +272,6 @@
|
|
|
|
|
|
|
|
|
|
<xy-table
|
|
|
|
|
ref="xyTable"
|
|
|
|
|
:cell-style="cellStyle"
|
|
|
|
|
:list="list"
|
|
|
|
|
:show-summary="true"
|
|
|
|
|
:summary-method="summary"
|
|
|
|
|
@ -545,6 +544,10 @@
|
|
|
|
|
>
|
|
|
|
|
查看
|
|
|
|
|
</Button>
|
|
|
|
|
<!-- (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))-->
|
|
|
|
|
<template v-if="scope.row.status != 2 || hasEdit">
|
|
|
|
|
<Button
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
@ -552,9 +555,18 @@
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="
|
|
|
|
|
(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))
|
|
|
|
|
$router.push({
|
|
|
|
|
path: '/contract/contractEdit',
|
|
|
|
|
query: {
|
|
|
|
|
isLedger: 1,
|
|
|
|
|
contractId: scope.row.id
|
|
|
|
|
}
|
|
|
|
|
}) : $router.push({
|
|
|
|
|
path: '/contract/contractEdit',
|
|
|
|
|
query: {
|
|
|
|
|
contractId: scope.row.id
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
"
|
|
|
|
|
>编辑
|
|
|
|
|
</Button>
|
|
|
|
|
@ -811,18 +823,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<!-- <template v-slot:isBudget>-->
|
|
|
|
|
<!-- <div class="xy-table-item">-->
|
|
|
|
|
<!-- <div class="xy-table-item-label" style="width: 200px">-->
|
|
|
|
|
<!-- <span style="color: red; font-weight: 600; padding-right: 4px"-->
|
|
|
|
|
<!-- >*</span-->
|
|
|
|
|
<!-- >是否为预算内确定项目-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- <div class="xy-table-item-content">-->
|
|
|
|
|
<!-- <el-switch v-model="form.isBudget" />-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </div>-->
|
|
|
|
|
<!-- </template>-->
|
|
|
|
|
<template v-slot:is_substitute v-if="!form.is_simple">
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label" style="width: 200px">
|
|
|
|
|
@ -1306,14 +1306,12 @@ export default {
|
|
|
|
|
select: {
|
|
|
|
|
keyword: "",
|
|
|
|
|
showDatePicker: "",
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10,
|
|
|
|
|
startDate: "",
|
|
|
|
|
endDate: "",
|
|
|
|
|
type: "",
|
|
|
|
|
department_id: "",
|
|
|
|
|
purchaseModality: "",
|
|
|
|
|
purchaseMethods: "",
|
|
|
|
|
status: "",
|
|
|
|
|
year: "",
|
|
|
|
|
plan_id: "",
|
|
|
|
|
@ -1326,14 +1324,12 @@ export default {
|
|
|
|
|
selectCopy: {
|
|
|
|
|
keyword: "",
|
|
|
|
|
showDatePicker: "",
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10,
|
|
|
|
|
startDate: "",
|
|
|
|
|
endDate: "",
|
|
|
|
|
type: "",
|
|
|
|
|
department_id: "",
|
|
|
|
|
purchaseModality: "",
|
|
|
|
|
purchaseMethods: "",
|
|
|
|
|
status: "",
|
|
|
|
|
year: "",
|
|
|
|
|
plan_id: "",
|
|
|
|
|
@ -1526,6 +1522,18 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
flowStatus: new Map([
|
|
|
|
|
[0, "-"],
|
|
|
|
|
[1, "待申请"],
|
|
|
|
|
[2, "流转中"],
|
|
|
|
|
[3, "已办结"]
|
|
|
|
|
]),
|
|
|
|
|
flowStatusColor: new Map([
|
|
|
|
|
[0, "rgb(140, 140, 140)"],
|
|
|
|
|
[1, "rgb(96, 109, 241)"],
|
|
|
|
|
[2, "rgb(219, 122, 122)"],
|
|
|
|
|
[3, "rgb(147, 201, 134)"]
|
|
|
|
|
]),
|
|
|
|
|
table: [
|
|
|
|
|
{
|
|
|
|
|
label: "项目名称",
|
|
|
|
|
@ -1559,13 +1567,10 @@ export default {
|
|
|
|
|
switch (value) {
|
|
|
|
|
case 1:
|
|
|
|
|
return "服务";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return "货物";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return "工程";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return "无";
|
|
|
|
|
}
|
|
|
|
|
@ -1579,31 +1584,15 @@ export default {
|
|
|
|
|
width: 158,
|
|
|
|
|
prop: "purchase_status",
|
|
|
|
|
customFn:row => {
|
|
|
|
|
if (row.is_substitute || row.is_simple) {
|
|
|
|
|
return (<span>无</span>);
|
|
|
|
|
}
|
|
|
|
|
const getDate = (value) => {
|
|
|
|
|
switch (value) {
|
|
|
|
|
case 1:
|
|
|
|
|
return "待申请";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return "流转中";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return "已办结";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return "异常";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!row.FLOWSTATUS.caigou.getStatus()) {
|
|
|
|
|
return (<span style="color: rgb(140, 140, 140)">无</span>);
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<span>{ getDate(row.purchase_status) }</span>
|
|
|
|
|
<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.caigou.getStatus()) }}>{ this.flowStatus.get(row.FLOWSTATUS.caigou.getStatus()) }</span>
|
|
|
|
|
<br/>
|
|
|
|
|
{
|
|
|
|
|
(row.purchase_status === 1 || row.is_substitute || row.is_simple) ? '' : <a style="color: #333" on={{['click']:()=>this.toOaDetail('caigou',row)}}>查看</a>
|
|
|
|
|
(row.FLOWSTATUS.caigou.getStatus() > 1) ? <a style="color: #333" on={{['click']:()=>this.toOaDetail('caigou',row)}}>查看</a> : ''
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
@ -1614,40 +1603,18 @@ export default {
|
|
|
|
|
width: 145,
|
|
|
|
|
prop: "invite_status",
|
|
|
|
|
customFn:row => {
|
|
|
|
|
if (row.is_substitute || row.is_simple || !row.is_contract) {
|
|
|
|
|
return (<span>无</span>);
|
|
|
|
|
}
|
|
|
|
|
if (row.purchase_way?.remark === "false") {
|
|
|
|
|
return (<span>无</span>);
|
|
|
|
|
}
|
|
|
|
|
const getDate = (value) => {
|
|
|
|
|
switch (value) {
|
|
|
|
|
case 1:
|
|
|
|
|
return "待申请";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return "流转中";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return "已办结";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return "异常";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!row.FLOWSTATUS.zhaobiao.getStatus()) {
|
|
|
|
|
return (<span style="color: rgb(140, 140, 140)">无</span>);
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<span>{ getDate(row.invite_status) }</span>
|
|
|
|
|
<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.zhaobiao.getStatus()) }}>{ this.flowStatus.get(row.FLOWSTATUS.zhaobiao.getStatus()) }</span>
|
|
|
|
|
<br/>
|
|
|
|
|
{
|
|
|
|
|
(row.is_substitute || row.is_simple || row.purchase_way?.remark === "false" || row.invite_status === 1)
|
|
|
|
|
? '' :
|
|
|
|
|
<a style="color: #333"
|
|
|
|
|
on={{['click']:()=>{
|
|
|
|
|
this.$refs['biddingUpload'].setId(row.id)
|
|
|
|
|
this.$refs['biddingUpload'].show()
|
|
|
|
|
}}}>查看</a>
|
|
|
|
|
(row.FLOWSTATUS.zhaobiao.getStatus() > 1) ? <a style="color: #333" on={{['click']:()=>{
|
|
|
|
|
this.$refs['biddingUpload'].setId(row.id)
|
|
|
|
|
this.$refs['biddingUpload'].show()
|
|
|
|
|
}}}>查看</a> : ''
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
@ -1658,31 +1625,15 @@ export default {
|
|
|
|
|
width: 145,
|
|
|
|
|
prop: "join_status",
|
|
|
|
|
customFn:row => {
|
|
|
|
|
if (row.is_simple || !row.is_contract || (row.purchase_way && row.purchase_way.value === '网上商城')) {
|
|
|
|
|
return (<span>无</span>);
|
|
|
|
|
}
|
|
|
|
|
const getDate = (value) => {
|
|
|
|
|
switch (value) {
|
|
|
|
|
case 1:
|
|
|
|
|
return "待申请";
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return "流转中";
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return "已办结";
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return "异常";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (!row.FLOWSTATUS.shenpi.getStatus()) {
|
|
|
|
|
return (<span style="color: rgb(140, 140, 140)">无</span>);
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<span>{ getDate(row.join_status) }</span>
|
|
|
|
|
<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.shenpi.getStatus()) }}>{ this.flowStatus.get(row.FLOWSTATUS.shenpi.getStatus()) }</span>
|
|
|
|
|
<br/>
|
|
|
|
|
{
|
|
|
|
|
row.join_status === 1 ? '' : <a style="color: #333" on={{['click']:()=>this.toOaDetail('hetong',row)}}>查看</a>
|
|
|
|
|
(row.FLOWSTATUS.shenpi.getStatus() > 1) ? <a style="color: #333" on={{['click']:()=>this.toOaDetail('hetong',row)}}>查看</a> : ''
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
@ -2247,124 +2198,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
return sums;
|
|
|
|
|
},
|
|
|
|
|
cellStyle({ row, column, rowIndex, columnIndex }) {
|
|
|
|
|
if (column.property === "req_status") {
|
|
|
|
|
if (row.is_plan || row.is_substitute || row.is_simple || !row.is_contract) {
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(140,140,140)",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
switch (row.req_status) {
|
|
|
|
|
case 1:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(96,109,241)",
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(219,122,122)",
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(147,201,134)",
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(220,185,126)",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (column.property === "purchase_status") {
|
|
|
|
|
if (row.is_substitute || row.is_simple) {
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(140,140,140)",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
switch (row.purchase_status) {
|
|
|
|
|
case 1:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(96,109,241)",
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(219,122,122)",
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(147,201,134)",
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(220,185,126)",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (column.property === "invite_status") {
|
|
|
|
|
if (
|
|
|
|
|
row.purchase_way?.remark === "false" ||
|
|
|
|
|
row.is_substitute ||
|
|
|
|
|
row.is_simple
|
|
|
|
|
) {
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(140,140,140)",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
switch (row.invite_status) {
|
|
|
|
|
case 1:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(96,109,241)",
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(219,122,122)",
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(147,201,134)",
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(220,185,126)",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (column.property === "join_status") {
|
|
|
|
|
if (row.is_simple || (row.purchase_way && row.purchase_way.value === '网上商城')) {
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(140,140,140)",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
switch (row.join_status) {
|
|
|
|
|
case 1:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(96,109,241)",
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(219,122,122)",
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
case 3:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(147,201,134)",
|
|
|
|
|
};
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
return {
|
|
|
|
|
color: "rgb(220,185,126)",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//y验证合同的名称是否存在重复
|
|
|
|
|
checkName(e) {
|
|
|
|
|
checkContractName({ name: e }).then((res) => {
|
|
|
|
|
@ -2518,7 +2352,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
//翻页
|
|
|
|
|
pageChange(e) {
|
|
|
|
|
this.select.pageIndex = e;
|
|
|
|
|
this.select.page = e;
|
|
|
|
|
this.getContracts();
|
|
|
|
|
},
|
|
|
|
|
planPageChange(e) {
|
|
|
|
|
@ -2586,8 +2420,8 @@ export default {
|
|
|
|
|
).detail;
|
|
|
|
|
},
|
|
|
|
|
pageSizeChange(e) {
|
|
|
|
|
this.select.pageSize = e;
|
|
|
|
|
this.select.pageIndex = 1;
|
|
|
|
|
this.select.page_size = e;
|
|
|
|
|
this.select.page = 1;
|
|
|
|
|
this.getContracts();
|
|
|
|
|
},
|
|
|
|
|
//获取合同列表
|
|
|
|
|
@ -2597,18 +2431,17 @@ export default {
|
|
|
|
|
} else {
|
|
|
|
|
this.select.is_contract = ""
|
|
|
|
|
}
|
|
|
|
|
const res = await getContract({
|
|
|
|
|
page_size: this.select.pageSize,
|
|
|
|
|
page: this.select.pageIndex,
|
|
|
|
|
is_auth: 1,
|
|
|
|
|
...this.select,
|
|
|
|
|
},noloading);
|
|
|
|
|
|
|
|
|
|
let tokens = getToken();
|
|
|
|
|
if (is_export && this.select.is_export == 1) {
|
|
|
|
|
var url = "/api/admin/contract/index?is_auth=1&token=" + tokens;
|
|
|
|
|
Object.keys(this.select).map((key, item) => {
|
|
|
|
|
url += "&" + key + "=" + this.select[key];
|
|
|
|
|
Object.keys(this.select).forEach((key, item) => {
|
|
|
|
|
if (key === 'page') {
|
|
|
|
|
url += '&page=1';
|
|
|
|
|
} else if (key === 'page_size') {
|
|
|
|
|
url += '&page_size=9999';
|
|
|
|
|
} else {
|
|
|
|
|
url += "&" + key + "=" + this.select[key];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
url = location.host + url;
|
|
|
|
|
console.log(url);
|
|
|
|
|
@ -2616,6 +2449,11 @@ export default {
|
|
|
|
|
this.select.is_export = 0;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const res = await getContract({
|
|
|
|
|
...this.select,
|
|
|
|
|
is_auth: 1,
|
|
|
|
|
},noloading);
|
|
|
|
|
|
|
|
|
|
res.list.data.forEach(i => this.handleContractFlow(i))
|
|
|
|
|
this.list = res.list.data;
|
|
|
|
|
this.total = res.list.total;
|
|
|
|
|
@ -2990,7 +2828,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getBudgets();
|
|
|
|
|
this.select.keyword = this.$route.query.keyword;
|
|
|
|
|
this.select.keyword = this.$route.query.keyword || "";
|
|
|
|
|
},
|
|
|
|
|
destroyed() {
|
|
|
|
|
window.onfocus = null;
|
|
|
|
|
|