From c94e8984b4cf1616cc6c97b756bd57d3cad84693 Mon Sep 17 00:00:00 2001
From: xy <271556543@qq.com>
Date: Thu, 12 Dec 2024 18:17:00 +0800
Subject: [PATCH] init
---
src/views/away/index.vue | 9 +
src/views/contract/contractEdit.vue | 642 +++++++++---------
src/views/contract/contractList.vue | 58 +-
.../contract/paymentRegistrationList.vue | 9 +
src/views/dashboard/index.vue | 2 +-
5 files changed, 371 insertions(+), 349 deletions(-)
diff --git a/src/views/away/index.vue b/src/views/away/index.vue
index c158d67..8b8fc4d 100644
--- a/src/views/away/index.vue
+++ b/src/views/away/index.vue
@@ -612,6 +612,15 @@ export default {
}
}
},
+ watch: {
+ isShowOaModal(newVal) {
+ if (newVal) {
+
+ } else {
+ this.oaUrl = ''
+ }
+ }
+ },
created() {
this.window.width = screen.availWidth * 0.95;
this.window.height = screen.availHeight * 0.95;
diff --git a/src/views/contract/contractEdit.vue b/src/views/contract/contractEdit.vue
index cf01ce5..4ec115f 100644
--- a/src/views/contract/contractEdit.vue
+++ b/src/views/contract/contractEdit.vue
@@ -1,6 +1,6 @@
-
+
@@ -119,7 +119,7 @@
-
+
-
-
-
-
-
-
-
-
+
+
+
-
-
- (无需采购流程,如水电邮寄费等)
-
+
+
+
+
-
-
-
+
+
+ (无需采购流程,如水电邮寄费等)
+
-
-
-
-
-
+
+
+
-
-
+
+
+
+
+
+
+ {
form.money_way_id = e.length > 0 ? e.toString() : '';
}
"
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+ 请选择关联的框架协议合同
+
+
+ {{ i.name.slice(0,17) }}
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
- 请选择关联的框架协议合同
-
-
- {{ i.name.slice(0,17) }}
-
-
-
-
-
-
+
+
+
+
+
+
+
+ form.name = `${e}(${$moment().format('YYYY-MM-DD HH:mm')})`"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ />
-
-
-
+
-
-
+
+
- 上一步
diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue
index 8f863d8..55f5e34 100644
--- a/src/views/contract/contractList.vue
+++ b/src/views/contract/contractList.vue
@@ -1711,7 +1711,7 @@ 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.flow_list.find(i => i.tag === 'caigou')
+ let caigou = row.is_common_purchase ? row.flow_list.find(i => i.tag === 'common_purchase') : row.flow_list.find(i => i.tag === 'caigou')
//url += `&to=/flow/detail?flow_id=${caigou.id}`
url += caigou?.flow_id
break;
@@ -1841,6 +1841,11 @@ export default {
//采购流程
async buyProcess(row,type=1) {
let baseInfo = {}
+ if (row.is_common_purchase) {
+ baseInfo = {
+ "caigouneirong": row.name || "",
+ }
+ }
switch (row.flow_mod_id) {
case 12:
baseInfo = {
@@ -1866,13 +1871,8 @@ export default {
"caigouxingshi": row.purchase_type.value
}
break;
-
- default:
- baseInfo = {
- "flow_title": row.name || ""
- }
}
- let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=${row.flow_mod_id}&out_contract_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;
+ let url = `${process.env.VUE_APP_OUT_OLD}/#/flow/create?auth_token=${window.encodeURIComponent(getToken())}&module_name=oa&isSinglePage=1&module_id=${row.is_common_purchase ? 99 : row.flow_mod_id}&out_contract_id=${row.id}&default_json=${JSON.stringify(baseInfo)}`;
console.log('url',url)
this.oaUrl = url
this.isShowOaModal = true
@@ -1975,13 +1975,6 @@ export default {
const res = await getparameter({
number: "flow_ids"
})
- console.log(345, res?.detail?.filter(i => i.status)?.map(i => {
- let data = JSON.parse(i.remark)
- return {
- name: i.value,
- ...data
- }
- }))
try {
this.flowIds = res?.detail?.filter(i => i.status)?.map(i => {
let data = JSON.parse(i.remark)
@@ -1990,8 +1983,7 @@ export default {
...data
}
})
- console.log(333, this.flowIds)
- }catch (e) {
+ } catch (e) {
console.log(e)
this.flowIds = copy
}
@@ -2343,19 +2335,27 @@ 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.tag === 'caigou')
const shenpi = item.flow_list.find(i => i.tag === 'contract')
if (item.is_purchase) {
//为采购项目
- if (item.is_simple !== 1 && !item.is_substitute) {
- //不为简易 采购未开始
- flowStatus["caigou"].setStatus(caigou?.flow_status ?? 2)
- if (!caigou) {
- //采购未开始
- if (item.is_plan === 1) {
- flowStatus["caigou"].setExecutable(true)
+ if (!item.is_common_purchase) {
+ if (item.is_simple !== 1 && !item.is_substitute) {
+ //不为简易 采购未开始
+ flowStatus["caigou"].setStatus(caigou?.flow_status ?? 2)
+ if (!caigou) {
+ //采购未开始
+ if (item.is_plan === 1) {
+ flowStatus["caigou"].setExecutable(true)
+ }
}
}
+ } else {
+ flowStatus["caigou"].setStatus(common_purchase?.flow_status ?? 2)
+ if (!common_purchase || common_purchase.flow_status === 2) {
+ flowStatus["caigou"].setExecutable(true)
+ }
}
if (item.purchase_way?.value !== '网上商城' && item.is_contract && item.purchase_way?.remark === 'true' && !item.is_substitute) {
//不为网上商场 是合同\
@@ -2382,9 +2382,10 @@ export default {
}
} else {
if (item.flow_mod_id) {
+ const other = item.flow_list.find(i => i.custom_model_id === item.flow_mod_id)
//非采购事前流程
- flowStatus["other"].setStatus(item.other_flow_status??1)
- if (item.other_flow_status === 1 || !item.other_flow_status) {
+ flowStatus["other"].setStatus(other?.flow_status ?? 2)
+ if (!other || other.flow_status === 2) {
flowStatus["other"].setExecutable(true)
}
}
@@ -2436,6 +2437,13 @@ export default {
this.contractTotal = 0;
}
},
+ isShowOaModal(newVal) {
+ if (newVal) {
+
+ } else {
+ this.oaUrl = ''
+ }
+ }
},
mounted() {
this.window.width = screen.availWidth * 0.95;
diff --git a/src/views/contract/paymentRegistrationList.vue b/src/views/contract/paymentRegistrationList.vue
index 6a32874..150d771 100644
--- a/src/views/contract/paymentRegistrationList.vue
+++ b/src/views/contract/paymentRegistrationList.vue
@@ -439,6 +439,15 @@ export default {
}
}
},
+ watch: {
+ isShowOaModal(newVal) {
+ if (newVal) {
+
+ } else {
+ this.oaUrl = ''
+ }
+ }
+ },
mounted() {
this.getFundLogs();
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 69b70a4..1412450 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -821,7 +821,7 @@ export default {
},
toContract(row) {
- this.$refs["detailContract"].getDetail(row.contract_id);
+ this.$refs["detailContract"].getDetail(row.data.other.contract_id);
this.$refs["detailContract"].isShowDetail = true;
},