@@ -1074,7 +1074,7 @@ import { deepCopy, parseTime, resetSelect } from '@/utils'
import { Message } from "element-ui";
import { getInfo } from "@/api/user.js";
import { getToken } from "@/utils/auth";
-import { getOutDetail, httpCurl } from "@/api/out";
+import { getOutDetail, httpCurl, updateFlow } from "@/api/out";
import editor from "./components/editorContract";
import detail from "./components/detailContract";
import paymentRegistration from "./components/paymentRegistration";
@@ -1310,66 +1310,66 @@ 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 (
-
-
{ getDate(row.purchase_status) }
-
- {
- (row.purchase_status === 1 || row.is_substitute || row.is_plan === 1) ? '' :
查看
- }
-
- )
- }
- },
+ // {
+ // 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 (
+ //
+ //
{ getDate(row.purchase_status) }
+ //
+ // {
+ // (row.purchase_status === 1 || row.is_substitute || row.is_plan === 1) ? '' :
查看
+ // }
+ //
+ // )
+ // }
+ // },
{
label: "采购业务审批流程",
width: 158,
@@ -2328,23 +2328,30 @@ export default {
},
//付款流程
async paying(row) {
- console.log(11);
+ let typeMap = new Map([
+ ['货物','货物采购'],
+ ['服务','服务采购'],
+ ['其他','其他项目']
+ ])
// this.setNowContract(row,'pay')
let baseInfo = {
title: row?.name,
- type: this.type.filter((item) => {
+ xiangmuleibie: typeMap.get(this.type.find((item) => {
return item.value === row.type;
- })[0]?.label,
+ })?.label),
+ things: row?.name,
hetongbianhao: row?.number,
- out_pay_id: row.id,
+ out_pay_id: row?.out_pay_id,
reason: row?.reason,
yizhifucishu: row?.yizhifucishu,
yizhifujine: row?.yizhifujine,
zongjia: row?.zongjia,
+ zhifucishu: row?.zhifucishu,
+ total: row?.total
//"承包商\\供应商":row.supply
};
- let url = `${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/24&auth_token=${this.$store.getters.oa_token}&out_contract_id=${
- row.id
+ let url = `${process.env.VUE_APP_OUT_OLD}?s=/flow/add/modid/24&auth_token=${this.$store.getters.oa_token}&out_pay_id=${
+ row?.out_pay_id
}&contract_json=${JSON.stringify(baseInfo)}`;
let signProcess = window.open(
url,
@@ -2715,54 +2722,56 @@ export default {
.catch((error) => {});
this.getPurchaseType();
this.select.is_myself = this.$route.path.split('_')[1] ? Number(this.$route.path.split('_')[1]) : 0
- this.getContracts();
this.getDepartment();
this.getPurchaseWay();
this.getMoneyWay();
+ updateFlow().then(_ => this.getContracts())
//页面激活后刷新合同列表
window.onfocus = async () => {
- 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);
- }
+ 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() {
diff --git a/src/views/contract/paymentRegistrationList.vue b/src/views/contract/paymentRegistrationList.vue
index eee43be..ec71471 100644
--- a/src/views/contract/paymentRegistrationList.vue
+++ b/src/views/contract/paymentRegistrationList.vue
@@ -1,240 +1,413 @@
-