|
|
|
|
@ -19,6 +19,31 @@
|
|
|
|
|
/>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<el-popover
|
|
|
|
|
placement="bottom"
|
|
|
|
|
title="流程状态"
|
|
|
|
|
width="440"
|
|
|
|
|
trigger="click">
|
|
|
|
|
<template #default>
|
|
|
|
|
<div>
|
|
|
|
|
<div style="display: flex;align-items: center;margin-top: 4px;" v-for="(item, index) in select.flow_link">
|
|
|
|
|
<el-select size="small" v-model="item.custom_model_id" placeholder="流程选择">
|
|
|
|
|
<el-option v-for="flow in flowConfig.filter(j => ['chuchai', 'pay', 'chuchaibaoxiao'].indexOf(j.tag) === -1)" :value="flow.custom_model_id" :label="flow.name"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-select style="margin-left: 6px;" size="small" v-model="item.flow_status" placeholder="状态选择">
|
|
|
|
|
<el-option value="" label="待申请"></el-option>
|
|
|
|
|
<el-option :value="0" label="流转中"></el-option>
|
|
|
|
|
<el-option :value="1" label="已办结"></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
<el-button style="margin-left: 6px;" size="small" circle icon="el-icon-delete" type="danger" @click="select.flow_link.splice(index, 1)"></el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: flex;justify-content: center;margin-top: 4px;">
|
|
|
|
|
<el-button type="primary" size="small" round icon="el-icon-plus" @click="select.flow_link.push({ custom_model_id: '',flow_status: '' })"></el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<el-button slot="reference" style="margin-left: 10px" size="small" type="primary">流程状态</el-button>
|
|
|
|
|
</el-popover>
|
|
|
|
|
<xy-selectors style="margin-left: 10px;" @search="getContracts" @reset="reset">
|
|
|
|
|
<div class="select-content">
|
|
|
|
|
<div>
|
|
|
|
|
@ -254,7 +279,7 @@
|
|
|
|
|
@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="select.pageIndex=1,getContracts()"
|
|
|
|
|
<Button style="margin-left: 10px" type="primary" @click="select.page=1,getContracts()"
|
|
|
|
|
>查询</Button
|
|
|
|
|
>
|
|
|
|
|
<Button type="primary" @click="toExport()" style="margin-left: 10px"
|
|
|
|
|
@ -376,7 +401,7 @@
|
|
|
|
|
<Button ghost size="small" type="primary">更多</Button>
|
|
|
|
|
<div slot="content">
|
|
|
|
|
<template
|
|
|
|
|
v-if="scope.row.flow_list.length === 0"
|
|
|
|
|
v-if="scope.row.contract_flow_links.length === 0"
|
|
|
|
|
>
|
|
|
|
|
<Poptip
|
|
|
|
|
:transfer="true"
|
|
|
|
|
@ -530,6 +555,7 @@
|
|
|
|
|
:purchase-way="purchaseWay"
|
|
|
|
|
:common-purchase-type="commonPurchaseType"
|
|
|
|
|
:types="type"
|
|
|
|
|
:flow-config="flowConfig"
|
|
|
|
|
:departments="departments"
|
|
|
|
|
:is-show.sync="isShowEdit"
|
|
|
|
|
@refresh="getContracts" />
|
|
|
|
|
@ -601,6 +627,7 @@ import oaFiles from './components/oaFiles.vue';
|
|
|
|
|
import addContractLedger from '@/views/contract/components/addContractLedger.vue'
|
|
|
|
|
import EditContract from './components/EditContract.vue'
|
|
|
|
|
import { show } from "@/api/away";
|
|
|
|
|
import {flowStatusConfig} from "@/api/common";
|
|
|
|
|
let iframe;
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
@ -656,14 +683,10 @@ export default {
|
|
|
|
|
select: {
|
|
|
|
|
keyword: "",
|
|
|
|
|
showDatePicker: "",
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
startDate: "",
|
|
|
|
|
endDate: "",
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10,
|
|
|
|
|
type: "",
|
|
|
|
|
department_id: "",
|
|
|
|
|
purchaseModality: "",
|
|
|
|
|
purchaseMethods: "",
|
|
|
|
|
status: "",
|
|
|
|
|
year: "",
|
|
|
|
|
plan_id: "",
|
|
|
|
|
@ -673,18 +696,15 @@ export default {
|
|
|
|
|
end_plan_price: undefined,
|
|
|
|
|
is_myself: 0,
|
|
|
|
|
is_purchase: 1,
|
|
|
|
|
flow_link: []
|
|
|
|
|
},
|
|
|
|
|
selectCopy: {
|
|
|
|
|
keyword: "",
|
|
|
|
|
showDatePicker: "",
|
|
|
|
|
pageIndex: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
startDate: "",
|
|
|
|
|
endDate: "",
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 10,
|
|
|
|
|
type: "",
|
|
|
|
|
department_id: "",
|
|
|
|
|
purchaseModality: "",
|
|
|
|
|
purchaseMethods: "",
|
|
|
|
|
status: "",
|
|
|
|
|
year: "",
|
|
|
|
|
plan_id: "",
|
|
|
|
|
@ -694,6 +714,7 @@ export default {
|
|
|
|
|
end_plan_price: undefined,
|
|
|
|
|
is_myself: 0,
|
|
|
|
|
is_purchase: 1,
|
|
|
|
|
flow_link: []
|
|
|
|
|
},
|
|
|
|
|
type: [
|
|
|
|
|
{
|
|
|
|
|
@ -721,7 +742,7 @@ export default {
|
|
|
|
|
ledgerTable: [
|
|
|
|
|
{
|
|
|
|
|
label: "项目名称",
|
|
|
|
|
width: 380,
|
|
|
|
|
width: 300,
|
|
|
|
|
prop: "name",
|
|
|
|
|
fixed: "left",
|
|
|
|
|
align: "left",
|
|
|
|
|
@ -798,11 +819,13 @@ export default {
|
|
|
|
|
label: "业务科室",
|
|
|
|
|
width: 140,
|
|
|
|
|
prop: "department.name",
|
|
|
|
|
fixed: "left"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "经办人",
|
|
|
|
|
width: 140,
|
|
|
|
|
prop: "admin.name",
|
|
|
|
|
fixed: "left"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "合同服务日期",
|
|
|
|
|
@ -898,7 +921,7 @@ export default {
|
|
|
|
|
table: [
|
|
|
|
|
{
|
|
|
|
|
label: "项目名称",
|
|
|
|
|
width: 380,
|
|
|
|
|
width: 300,
|
|
|
|
|
prop: "name",
|
|
|
|
|
fixed: "left",
|
|
|
|
|
align: "left",
|
|
|
|
|
@ -1213,11 +1236,13 @@ export default {
|
|
|
|
|
label: "业务科室",
|
|
|
|
|
width: 140,
|
|
|
|
|
prop: "department.name",
|
|
|
|
|
fixed: "left"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "经办人",
|
|
|
|
|
width: 140,
|
|
|
|
|
prop: "admin.name",
|
|
|
|
|
fixed: "left"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: "合同服务日期",
|
|
|
|
|
@ -1436,6 +1461,7 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
selections: [], //已选择的框架合同
|
|
|
|
|
|
|
|
|
|
flowConfig: [],
|
|
|
|
|
isShowEditor: false,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
@ -1470,12 +1496,12 @@ export default {
|
|
|
|
|
let url = `${process.env.VUE_APP_OUT_URL}/#/flow/detail?auth_token=${window.encodeURIComponent(getToken())}&isSinglePage=1&flow_id=`
|
|
|
|
|
switch (tbname) {
|
|
|
|
|
case "caigou":
|
|
|
|
|
let caigou = row.is_common_purchase ? row.flow_list.find(i => i.tag === 'common_purchase') : row.flow_list.find(i => i.custom_model_id === row.flow_mod_id)
|
|
|
|
|
let caigou = row.is_common_purchase ? row.contract_flow_links.find(i => i.tag === 'common_purchase') : row.contract_flow_links.find(i => i.custom_model_id === row.flow_mod_id)
|
|
|
|
|
//url += `&to=/flow/detail?flow_id=${caigou.id}`
|
|
|
|
|
url += caigou?.flow_id
|
|
|
|
|
break;
|
|
|
|
|
case "hetong":
|
|
|
|
|
let contract = row.flow_list.find(i => i.tag === 'contract')
|
|
|
|
|
let contract = row.contract_flow_links.find(i => i.tag === 'contract')
|
|
|
|
|
//url += `&to=/flow/detail?flow_id=${caigou.id}`
|
|
|
|
|
url += contract?.flow_id
|
|
|
|
|
break;
|
|
|
|
|
@ -1640,7 +1666,7 @@ export default {
|
|
|
|
|
out_contract_id: row.id,
|
|
|
|
|
"zhuyaoneirong": row.content,
|
|
|
|
|
"jiafang": row.supply,
|
|
|
|
|
"xiangguanliucheng": [row.flow_list?.find(i => i.custom_model_id === (row.is_common_purchase ? 99 : row.flow_mod_id))?.flow_id]
|
|
|
|
|
"xiangguanliucheng": [row.contract_flow_links?.find(i => i.custom_model_id === (row.is_common_purchase ? 99 : row.flow_mod_id))?.flow_id]
|
|
|
|
|
};
|
|
|
|
|
let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=72&out_contract_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;
|
|
|
|
|
|
|
|
|
|
@ -1688,7 +1714,7 @@ export default {
|
|
|
|
|
|
|
|
|
|
//翻页
|
|
|
|
|
pageChange(e) {
|
|
|
|
|
this.select.pageIndex = e;
|
|
|
|
|
this.select.page = e;
|
|
|
|
|
this.getContracts();
|
|
|
|
|
},
|
|
|
|
|
planPageChange(e) {
|
|
|
|
|
@ -1723,6 +1749,16 @@ export default {
|
|
|
|
|
1
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async getFlowConfig() {
|
|
|
|
|
try {
|
|
|
|
|
const res = await flowStatusConfig()
|
|
|
|
|
this.flowConfig = res.map(i => JSON.parse(i.value))
|
|
|
|
|
console.log( this.flowConfig)
|
|
|
|
|
} catch (err) {
|
|
|
|
|
this.flowConfig = []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//事前流程
|
|
|
|
|
async getFlowIds () {
|
|
|
|
|
let copy = deepCopy(this.flowIds)
|
|
|
|
|
@ -1807,8 +1843,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();
|
|
|
|
|
},
|
|
|
|
|
//获取合同列表
|
|
|
|
|
@ -1831,8 +1867,6 @@ export default {
|
|
|
|
|
this.select.is_contract = ""
|
|
|
|
|
}
|
|
|
|
|
const res = await getContract({
|
|
|
|
|
page_size: this.select.pageSize,
|
|
|
|
|
page: this.select.pageIndex,
|
|
|
|
|
is_auth: 1,
|
|
|
|
|
...this.select,
|
|
|
|
|
},noloading);
|
|
|
|
|
@ -2066,10 +2100,10 @@ export default {
|
|
|
|
|
"zhifu": new Flow(),
|
|
|
|
|
"other": new Flow()
|
|
|
|
|
}
|
|
|
|
|
const common_purchase = item.flow_list.find(i => i.tag === 'common_purchase')
|
|
|
|
|
const caigou = item.flow_list.find(i => i.custom_model_id === item.flow_mod_id)
|
|
|
|
|
const shenpi = item.flow_list.find(i => i.tag === 'contract')
|
|
|
|
|
const other = item.flow_list.find(i => i.custom_model_id === item.flow_mod_id)
|
|
|
|
|
const common_purchase = item.contract_flow_links.find(i => i.tag === 'common_purchase')
|
|
|
|
|
const caigou = item.contract_flow_links.find(i => i.custom_model_id === item.flow_mod_id)
|
|
|
|
|
const shenpi = item.contract_flow_links.find(i => i.tag === 'contract')
|
|
|
|
|
const other = item.contract_flow_links.find(i => i.custom_model_id === item.flow_mod_id)
|
|
|
|
|
if (item.is_purchase) {
|
|
|
|
|
//为采购项目
|
|
|
|
|
if (!item.is_common_purchase) {
|
|
|
|
|
@ -2203,6 +2237,7 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getFlowConfig();
|
|
|
|
|
this.getCommonPurchaseType();
|
|
|
|
|
this.getPurchaseType();
|
|
|
|
|
this.getDepartment();
|
|
|
|
|
|