|
|
|
|
@ -399,9 +399,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<div class="contract-add-plan" style="width: 300px;" @click="isShowContractToContracts = true">
|
|
|
|
|
<template v-if="form.plan.length > 0">
|
|
|
|
|
<template v-for="item in form.plan">
|
|
|
|
|
<Tag closable color="primary" @on-close="delPlan(item)">{{ item.label }}</Tag>
|
|
|
|
|
<template v-if="selections.length > 0">
|
|
|
|
|
<template v-for="item in selections">
|
|
|
|
|
<Tag closable color="primary" @on-close="delSelections(item)">{{ item.name }}</Tag>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
@ -435,7 +435,7 @@
|
|
|
|
|
|
|
|
|
|
<!-- 搜索使用 预算计划 -->
|
|
|
|
|
<xy-dialog :is-show.sync="isShowPlanForSearch" title="预算计划" :width="720" @on-ok="planSelectForSearch">
|
|
|
|
|
<template v-slot:normalContent>
|
|
|
|
|
<template>
|
|
|
|
|
<Input v-model="planSearch.name" search enter-button="搜 索" placeholder="搜索预算计划.."
|
|
|
|
|
@on-search="searchBudgets"/>
|
|
|
|
|
<div style="margin: 10px 0;display: flex;justify-content: space-between;
|
|
|
|
|
@ -490,7 +490,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<template v-slot:footerContent>
|
|
|
|
|
<Button type="primary" @click="isShowPlan = false">确定</Button>
|
|
|
|
|
<Button type="primary" @click="planSelect">确定</Button>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-dialog>
|
|
|
|
|
|
|
|
|
|
@ -517,7 +517,7 @@
|
|
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="isShowContractToContracts = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="submit">确 定</el-button>
|
|
|
|
|
<el-button type="primary" @click="isShowContractToContracts = false">确 定</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
@ -544,7 +544,8 @@ import {
|
|
|
|
|
getContract,
|
|
|
|
|
addContrant,
|
|
|
|
|
delContract,
|
|
|
|
|
checkContractName
|
|
|
|
|
checkContractName,
|
|
|
|
|
updateStatus
|
|
|
|
|
} from "@/api/contract/contract"
|
|
|
|
|
import {
|
|
|
|
|
getparameter
|
|
|
|
|
@ -570,6 +571,7 @@ import {
|
|
|
|
|
import {
|
|
|
|
|
getToken
|
|
|
|
|
} from '@/utils/auth'
|
|
|
|
|
import { getOutDetail } from "@/api/out"
|
|
|
|
|
import editor from "./components/editorContract"
|
|
|
|
|
import detail from "./components/detailContract"
|
|
|
|
|
import paymentRegistration from "./components/paymentRegistration";
|
|
|
|
|
@ -673,6 +675,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
userList: ["liuxiangyu", "zhushulan", "admin", "jiangjiao"],
|
|
|
|
|
nowContract: {},
|
|
|
|
|
window: {
|
|
|
|
|
width: 0,
|
|
|
|
|
height: 0,
|
|
|
|
|
@ -1491,6 +1494,13 @@ export default {
|
|
|
|
|
this.getContracts();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
setNowContract(contract,tbname) {
|
|
|
|
|
this.nowContract = {
|
|
|
|
|
...contract,
|
|
|
|
|
tbname
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//点击付款计划查看
|
|
|
|
|
showPaymentPlan(row, column, cell) {
|
|
|
|
|
if (column.property === 'sign_plan_count') {
|
|
|
|
|
@ -1509,7 +1519,7 @@ export default {
|
|
|
|
|
"项目名称": row?.name,
|
|
|
|
|
"项目预算(元)": row?.plan_price
|
|
|
|
|
}
|
|
|
|
|
let res = await getOatoken()
|
|
|
|
|
//let res = await getOatoken()
|
|
|
|
|
let url =
|
|
|
|
|
`${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/8&oatoken=${res.oatoken}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
|
|
|
|
|
let bidding = window.open(url, 'bidding',
|
|
|
|
|
@ -1519,10 +1529,12 @@ export default {
|
|
|
|
|
|
|
|
|
|
//采购流程
|
|
|
|
|
async buyProcess(row) {
|
|
|
|
|
this.setNowContract(row,'caigou')
|
|
|
|
|
let baseInfo = {
|
|
|
|
|
"title": row?.name,
|
|
|
|
|
//"采购形式": row?.purchase_type?.value,
|
|
|
|
|
"iszhengfucaigou": row.purchase_type.value === "政府采购" ? "是" : "否",
|
|
|
|
|
"iszhengfucaigou": row.purchase_type.value === "政府采购" ? "政府采购" : "否",
|
|
|
|
|
"out_caigou_id": row.id,
|
|
|
|
|
"type": this.type.filter(item => {
|
|
|
|
|
return item.value === row.type
|
|
|
|
|
})[0]?.label,
|
|
|
|
|
@ -1535,9 +1547,9 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},"")
|
|
|
|
|
}
|
|
|
|
|
let res = await getOatoken()
|
|
|
|
|
// let res = await getOatoken()
|
|
|
|
|
let url =
|
|
|
|
|
`${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/8&username=${this.$store.state.user.username}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
|
|
|
|
|
`${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/8&id=${this.$store.state.user.userId}&username=${this.$store.state.user.username}&out_caigou_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
|
|
|
|
|
let buyProcess = window.open(url, 'buyProcess',
|
|
|
|
|
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
|
|
|
|
|
)
|
|
|
|
|
@ -1550,7 +1562,7 @@ export default {
|
|
|
|
|
"total": row?.money,
|
|
|
|
|
//"承包商\\供应商":row.supply
|
|
|
|
|
}
|
|
|
|
|
let res = await getOatoken()
|
|
|
|
|
// let res = await getOatoken()
|
|
|
|
|
let url =
|
|
|
|
|
`${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/9&username=${this.$store.state.user.username}&out_contract_id=${row.id}&contract_json=${JSON.stringify(baseInfo)}`
|
|
|
|
|
let signProcess = window.open(url, 'signProcess',
|
|
|
|
|
@ -1761,6 +1773,13 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
delSelections(val) {
|
|
|
|
|
this.selections.map((item, index) => {
|
|
|
|
|
if (item.id === val.id) {
|
|
|
|
|
this.selections.splice(index, 1)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//确认计划选择搜索
|
|
|
|
|
planSelectForSearch() {
|
|
|
|
|
if (this.select.plan_id == "") {
|
|
|
|
|
@ -1805,13 +1824,14 @@ export default {
|
|
|
|
|
is_simple:this.form.is_simple,
|
|
|
|
|
supply:this.form.supply,
|
|
|
|
|
money:this.form?.money,
|
|
|
|
|
status:this.form?.is_simple ? 2 : 1
|
|
|
|
|
status:this.form?.is_simple ? 2 : 1,
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.isShowAdd = false
|
|
|
|
|
Message({
|
|
|
|
|
type: 'success',
|
|
|
|
|
message: '操作成功'
|
|
|
|
|
})
|
|
|
|
|
this.selections = [];
|
|
|
|
|
this.$refs['addContract'].reset()
|
|
|
|
|
this.$refs['planTable'].clearSelection()
|
|
|
|
|
this.getContracts()
|
|
|
|
|
@ -1836,16 +1856,21 @@ export default {
|
|
|
|
|
//框架合同
|
|
|
|
|
async getContractToContracts() {
|
|
|
|
|
const res = await getContract(this.contractSelect)
|
|
|
|
|
this.contractList = res.list.data
|
|
|
|
|
let selectedIds = this.selections.map(i => i.id)
|
|
|
|
|
this.contractList = res.list.data.map(item => {
|
|
|
|
|
return {
|
|
|
|
|
...item,
|
|
|
|
|
_checked: !!selectedIds.find(i => i === item.id),
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.contractTotal = res.list.total
|
|
|
|
|
},
|
|
|
|
|
selectionChange(selection) {
|
|
|
|
|
this.selections = Array.from(
|
|
|
|
|
new Set(
|
|
|
|
|
selection.map((item) => item.id)
|
|
|
|
|
selection
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
console.log(this.selections);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
@ -1853,7 +1878,6 @@ export default {
|
|
|
|
|
if(val){
|
|
|
|
|
this.getContractToContracts();
|
|
|
|
|
}else{
|
|
|
|
|
this.selections = [];
|
|
|
|
|
resetSelect(this.contractSelect);
|
|
|
|
|
this.contractList = [];
|
|
|
|
|
this.contractTotal = 0;
|
|
|
|
|
@ -1883,8 +1907,32 @@ export default {
|
|
|
|
|
this.getPurchaseWay()
|
|
|
|
|
this.getMoneyWay()
|
|
|
|
|
//页面激活后刷新合同列表
|
|
|
|
|
window.onfocus = () => {
|
|
|
|
|
this.getContracts()
|
|
|
|
|
window.onfocus = async () => {
|
|
|
|
|
if(this.nowContract?.tbname && this.nowContract?.id) {
|
|
|
|
|
const res = await getOutDetail({tbname:this.nowContract.tbname,out_caigou_id:this.nowContract.id})
|
|
|
|
|
let flowIdMap = new Map([
|
|
|
|
|
['caigou',8]
|
|
|
|
|
])
|
|
|
|
|
let flowTypeMap = new Map([
|
|
|
|
|
['caigou',2]
|
|
|
|
|
])
|
|
|
|
|
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)
|
|
|
|
|
})
|
|
|
|
|
await this.getContracts()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
|