From 70cb947f049f685e62c7d2f0f29ee54cd2253dc3 Mon Sep 17 00:00:00 2001
From: fengyuan_yang <1976974459@qq.com>
Date: Fri, 29 May 2026 10:18:52 +0800
Subject: [PATCH] =?UTF-8?q?2026-05-29=20=E5=88=80=E5=85=B7=E7=94=B3?=
=?UTF-8?q?=E8=AF=B7=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/modules/tooling/searchToolApply.vue | 92 +++++++++++++++++--
src/views/modules/tooling/toolingInfo.vue | 16 +++-
2 files changed, 96 insertions(+), 12 deletions(-)
diff --git a/src/views/modules/tooling/searchToolApply.vue b/src/views/modules/tooling/searchToolApply.vue
index 8da350e..2a0b72d 100644
--- a/src/views/modules/tooling/searchToolApply.vue
+++ b/src/views/modules/tooling/searchToolApply.vue
@@ -315,11 +315,20 @@
- CS
-
+ CS
+ CS
+
+
+
+
-
+
@@ -435,8 +444,17 @@
- CS
-
+ CS
+ CS
+
+
+
+
@@ -501,12 +519,20 @@
- CS
+ CS
CS
-
+
+
+
+
-
+
@@ -628,9 +654,17 @@
- CS
+ CS
CS
-
+
+
+
+
@@ -2154,6 +2188,11 @@ export default {
//
// }
// }
+ 'dataForm.offsetOfExpenses'(newV) {
+ if (newV !== 'Charge Back To Customer') {
+ this.clearCsSelection()
+ }
+ },
visibleU (newV, oldV) {
if (newV === true){
const tryCall = () => {
@@ -2245,6 +2284,9 @@ export default {
methods: {
isAuth,
+ isChargeBackToCustomer() {
+ return this.dataForm.offsetOfExpenses === 'Charge Back To Customer'
+ },
fetchNodeOptions() {
getNodeList(this.searchData).then(({ data }) => {
@@ -2324,6 +2366,9 @@ export default {
// 获取基础数据列表S
getBaseList(val, type) {
+ if (val === 2051 && !this.isChargeBackToCustomer()) {
+ return
+ }
this.tagNo = val
this.tagNo2 = type
this.$nextTick(() => {
@@ -2377,6 +2422,10 @@ export default {
this.$triggerInputEvent(this.$refs.purchaserName);
});
} else if (this.tagNo === 2051) {
+ if (!this.isChargeBackToCustomer()) {
+ this.clearCsSelection()
+ return
+ }
this.dataForm.cs = val.username
this.dataForm.csName = val.user_display
this.$nextTick(() => {
@@ -2384,6 +2433,10 @@ export default {
});
}
},
+ clearCsSelection() {
+ this.dataForm.cs = ''
+ this.dataForm.csName = ''
+ },
//导出excel
async createExportData() {
@@ -3060,6 +3113,12 @@ export default {
},
saveData() {
+ if (this.isChargeBackToCustomer() && !this.dataForm.cs) {
+ this.$alert('当费用抵消为"Charge Back To Customer"时,CS必填!', '错误', {
+ confirmButtonText: '确定'
+ })
+ return
+ }
this.dataForm.detailList = this.toolData
editToolApplication(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
@@ -3160,9 +3219,22 @@ export default {
searchProjectToolApplyHeaderByAnyField(params).then(({data})=>{
if (data && data.code === 0){
this.dataList1 = data.page.list
+ this.pageIndex = data.page.currPage
+ this.pageSize = data.page.pageSize
this.totalPage = data.page.totalCount
// 加载每条记录的首条工具明细信息
this.loadToolDetailInfo()
+ if (this.dataList1.length > 0) {
+ this.currentRow = JSON.parse(JSON.stringify(this.dataList1[0]));
+ this.$nextTick(() => {
+ if (this.$refs.mainTable) {
+ this.$refs.mainTable.setCurrentRow(this.dataList1[0]);
+ }
+ })
+ } else {
+ this.currentRow = {}
+ }
+ this.refreshCurrentTabTable()
}else {
this.$message.warning(data.msg)
}
diff --git a/src/views/modules/tooling/toolingInfo.vue b/src/views/modules/tooling/toolingInfo.vue
index 80c3358..c1a0fe2 100644
--- a/src/views/modules/tooling/toolingInfo.vue
+++ b/src/views/modules/tooling/toolingInfo.vue
@@ -448,6 +448,10 @@ export default {
});
}
},
+ clearCsSelection() {
+ this.dataForm.cs = ''
+ this.dataForm.csName = ''
+ },
changeSum(row){
if (row.standardCost < 0 || row.standardCost == null || row.standardCost == '') {
row.standardCost = 0
@@ -783,12 +787,20 @@ export default {
CS
-
+
+
+
+
-
+