|
|
|
|
@ -380,6 +380,15 @@
|
|
|
|
|
>采购流程
|
|
|
|
|
</Button>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="scope.row.FLOWSTATUS['other'].isEnabled()">
|
|
|
|
|
<Button
|
|
|
|
|
class="slot-btns-item"
|
|
|
|
|
size="small"
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="buyProcess(scope.row)">
|
|
|
|
|
{{ otherFlowBtn(scope.row.flow_mod_id) }}
|
|
|
|
|
</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">-->
|
|
|
|
|
@ -1136,6 +1145,7 @@
|
|
|
|
|
<editor
|
|
|
|
|
ref="editor"
|
|
|
|
|
:is-show-editor.sync="isShowEditor"
|
|
|
|
|
:flow-ids="flowIds"
|
|
|
|
|
:group-type="groupType"
|
|
|
|
|
:money-way="moneyWay"
|
|
|
|
|
:purchase-type="purchaseType"
|
|
|
|
|
@ -1180,7 +1190,7 @@ import { getparameter } from "@/api/system/dictionary";
|
|
|
|
|
import { listdeptNoAuth } from "@/api/system/department";
|
|
|
|
|
import { getBudget } from "@/api/budget/budget";
|
|
|
|
|
import { getOatoken } from "@/api/oatoken";
|
|
|
|
|
import { deepCopy, parseTime, resetSelect,moneyFormatter } from '@/utils'
|
|
|
|
|
import { deepCopy, parseTime, resetSelect, moneyFormatter, throttle } from '@/utils'
|
|
|
|
|
import { Message } from "element-ui";
|
|
|
|
|
import { getInfo } from "@/api/user.js";
|
|
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
@ -1381,7 +1391,8 @@ export default {
|
|
|
|
|
plan_name: "请选择预算计划",
|
|
|
|
|
start_plan_price: undefined,
|
|
|
|
|
end_plan_price: undefined,
|
|
|
|
|
is_myself: 0
|
|
|
|
|
is_myself: 0,
|
|
|
|
|
is_purchase: 1,
|
|
|
|
|
},
|
|
|
|
|
selectCopy: {
|
|
|
|
|
keyword: "",
|
|
|
|
|
@ -1401,6 +1412,8 @@ export default {
|
|
|
|
|
plan_name: "请选择预算计划",
|
|
|
|
|
start_plan_price: undefined,
|
|
|
|
|
end_plan_price: undefined,
|
|
|
|
|
is_myself: 0,
|
|
|
|
|
is_purchase: 1,
|
|
|
|
|
},
|
|
|
|
|
type: [
|
|
|
|
|
{
|
|
|
|
|
@ -1652,10 +1665,19 @@ export default {
|
|
|
|
|
customFn:row => {
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<p>{
|
|
|
|
|
this.flowIds.find(i => i.id === row.flow_mod_id)?.name
|
|
|
|
|
}</p>
|
|
|
|
|
<a>查看</a>
|
|
|
|
|
<p>
|
|
|
|
|
<span>
|
|
|
|
|
{
|
|
|
|
|
this.flowIds.find(i => i.id === row.flow_mod_id)?.name
|
|
|
|
|
}
|
|
|
|
|
</span>
|
|
|
|
|
{
|
|
|
|
|
row.is_purchase ? "" : (<span style={{ 'color': this.flowStatusColor.get(row.FLOWSTATUS.other.getStatus()) }}>[{ this.flowStatus.get(row.FLOWSTATUS.other.getStatus()) }]</span>)
|
|
|
|
|
}
|
|
|
|
|
</p>
|
|
|
|
|
{
|
|
|
|
|
row.is_purchase ? "" : (<a on={{['click']:()=>this.toOaDetail('other',row)}}>查看</a>)
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
@ -2178,6 +2200,9 @@ export default {
|
|
|
|
|
case "hetong":
|
|
|
|
|
url += row.join_last_flow_id
|
|
|
|
|
break;
|
|
|
|
|
case "other":
|
|
|
|
|
url += row.other_flow_id
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
url = `${process.env.VUE_APP_OUT_URL}/admin/flow/list/todo`
|
|
|
|
|
}
|
|
|
|
|
@ -2302,11 +2327,13 @@ export default {
|
|
|
|
|
switch (row.flow_mod_id) {
|
|
|
|
|
case 12:
|
|
|
|
|
baseInfo = {
|
|
|
|
|
"工作名称": row.name || "",
|
|
|
|
|
"6583b42c5c29a": row.name,
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 5:
|
|
|
|
|
baseInfo = {
|
|
|
|
|
"工作名称": row.name || "",
|
|
|
|
|
"65b37c797845d": row.name,
|
|
|
|
|
"65b37c8facfc9": row.content,
|
|
|
|
|
}
|
|
|
|
|
@ -2324,6 +2351,10 @@ export default {
|
|
|
|
|
"65852a7d0c9b4": this.groupType.find(i => i.id === row.group_type)?.value || ""
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
baseInfo = {
|
|
|
|
|
"工作名称": row.name || ""
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// let res = await getOatoken()
|
|
|
|
|
let url = `${process.env.VUE_APP_OUT_OLD}/flow/create/${row.flow_mod_id}?auth_token=${this.$store.getters.oa_token}&out_contract_id=${
|
|
|
|
|
@ -2439,7 +2470,7 @@ export default {
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
//事前流程
|
|
|
|
|
async getFlowIds () {
|
|
|
|
|
async getFlowIds () {``
|
|
|
|
|
let copy = deepCopy(this.flowIds)
|
|
|
|
|
const res = await getparameter({
|
|
|
|
|
number: "flow_ids"
|
|
|
|
|
@ -2504,7 +2535,7 @@ export default {
|
|
|
|
|
this.getContracts();
|
|
|
|
|
},
|
|
|
|
|
//获取合同列表
|
|
|
|
|
async getContracts(is_export,noloading=false,isopenOa=false) {
|
|
|
|
|
getContracts: throttle(async function (is_export,noloading=false,isopenOa=false) {
|
|
|
|
|
if (/contractLedger/g.test(this.$route.path)) {
|
|
|
|
|
this.select.is_contract = 1
|
|
|
|
|
} else {
|
|
|
|
|
@ -2558,7 +2589,7 @@ export default {
|
|
|
|
|
await this.buyProcess(res.list.data[0])
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
},1000),
|
|
|
|
|
|
|
|
|
|
//新建合同
|
|
|
|
|
//显示
|
|
|
|
|
@ -2787,7 +2818,7 @@ export default {
|
|
|
|
|
return this.status
|
|
|
|
|
}
|
|
|
|
|
isEnabled () {
|
|
|
|
|
return this.executable && this.status === 1
|
|
|
|
|
return this.executable && (this.status === 1 || this.status === "")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//0无该流程,1未开始,2进行中,3已完成(合同签订1待签订,2已签订)
|
|
|
|
|
@ -2796,47 +2827,57 @@ export default {
|
|
|
|
|
"zhaobiao": new Flow(),
|
|
|
|
|
"shenpi": new Flow(),
|
|
|
|
|
"qianding": new Flow(),
|
|
|
|
|
"zhifu": new Flow()
|
|
|
|
|
"zhifu": new Flow(),
|
|
|
|
|
"other": 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.is_purchase) {
|
|
|
|
|
//为采购项目
|
|
|
|
|
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.purchase_way?.remark === 'true' && !item.is_substitute) {
|
|
|
|
|
//不为网上商场 是合同\
|
|
|
|
|
flowStatus["zhaobiao"].setStatus(item.invite_status)
|
|
|
|
|
if (item.invite_status === 1 && item.purchase_status === 3) {
|
|
|
|
|
//采购完成,招标未开始
|
|
|
|
|
flowStatus["zhaobiao"].setExecutable(true)
|
|
|
|
|
if (item.purchase_way?.value !== '网上商城' && item.is_contract && item.purchase_way?.remark === 'true' && !item.is_substitute) {
|
|
|
|
|
//不为网上商场 是合同\
|
|
|
|
|
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))) {
|
|
|
|
|
//审批未开始 走招标招标完成或不走招标采购完成
|
|
|
|
|
flowStatus["shenpi"].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))) {
|
|
|
|
|
//审批未开始 走招标招标完成或不走招标采购完成
|
|
|
|
|
flowStatus["shenpi"].setExecutable(true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.is_contract && item.purchase_way?.value !== "网上商城" && !item.is_substitute) {
|
|
|
|
|
flowStatus["qianding"].setStatus(item.status)
|
|
|
|
|
if (item.join_status === 3 && item.status === 1) {
|
|
|
|
|
flowStatus["qianding"].setExecutable(true)
|
|
|
|
|
if (item.is_contract && item.purchase_way?.value !== "网上商城" && !item.is_substitute) {
|
|
|
|
|
flowStatus["qianding"].setStatus(item.status)
|
|
|
|
|
if (item.join_status === 3 && item.status === 1) {
|
|
|
|
|
flowStatus["qianding"].setExecutable(true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
//非采购事前流程
|
|
|
|
|
flowStatus["other"].setStatus(item.other_flow_status)
|
|
|
|
|
if (item.other_flow_status === 1 || !item.other_flow_status) {
|
|
|
|
|
flowStatus["other"].setExecutable(true)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (item.is_end === 0) {
|
|
|
|
|
flowStatus["zhifu"].setStatus(1)
|
|
|
|
|
//最后一笔没付完
|
|
|
|
|
if ((!item.is_contract && !item.is_substitute && item.purchase_status === 3) || (item.purchase_way?.value === "网上商城" && item.purchase_status === 3) ||
|
|
|
|
|
if ((item.is_purchase === 0 && item.other_flow_status === 3) || (!item.is_contract && !item.is_substitute && item.purchase_status === 3) || (item.purchase_way?.value === "网上商城" && item.purchase_status === 3) ||
|
|
|
|
|
item.status === 2 ||
|
|
|
|
|
(!item.is_contract && item.is_simple) || (item.is_contract && item.is_substitute && item.join_status === 3)) {
|
|
|
|
|
//网上商场的话采购完成 合同签订完成 不为合同并且为简易
|
|
|
|
|
@ -2859,6 +2900,12 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
otherFlowBtn () {
|
|
|
|
|
return function (flowModId) {
|
|
|
|
|
return this.flowIds.find(i => i.id === flowModId)?.name
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
isShowContractToContracts(val) {
|
|
|
|
|
@ -2916,6 +2963,7 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
if (/contractAll/g.test(this.$route.path)) {
|
|
|
|
|
this.select.is_simple = "";
|
|
|
|
|
this.select.is_purchase = 0;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
destroyed() {
|
|
|
|
|
|