From da3dbb56388ae49097e50ded584ed2abb7f5022d Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期二, 17 十月 2023 14:16:25 +0800
Subject: [PATCH] bug修复(5243)
---
src/views/sales/salesReturn/AddSalesReturnDialog.vue | 34 ++++++++++++++++++++++++----------
1 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/src/views/sales/salesReturn/AddSalesReturnDialog.vue b/src/views/sales/salesReturn/AddSalesReturnDialog.vue
index c59f472..fc4697f 100644
--- a/src/views/sales/salesReturn/AddSalesReturnDialog.vue
+++ b/src/views/sales/salesReturn/AddSalesReturnDialog.vue
@@ -233,7 +233,7 @@
:edit-common-config="editSelectClientConfig"
@selClient="selClient"
/>
- <!-- 閫夋嫨鍚堝悓璁㈠崟 -->
+ <!-- 閿�鍞槑缁嗗崟 -->
<SelectCommonDialog
v-if="editSelCommonConfig.editVisible"
:edit-common-config="editSelCommonConfig"
@@ -307,8 +307,9 @@
},
editSelCommonConfig: {
editVisible: false,
- title: "",
- infomation: {}
+ title: "閿�鍞槑缁嗗崟",
+ infomation: {},
+ clientId: ""
},
productId: 1,
isNoProduct: true,
@@ -372,6 +373,7 @@
// 淇濆瓨
saveClick(formName) {
this.$refs[formName].validate((valid) => {
+ this.validateFormNumber()
if (valid) {
console.log(this.editConfig.infomation)
// for (let i = 0; i < this.tableData.length; i++) {
@@ -427,9 +429,9 @@
returnDate: data.returnDate || "",
salesReturnStatusId: data.salesReturnStatusId || 0,
sourceId: this.SalesDetailsId,
- sourceType: 1
- },
- codeRule: this.codeRule
+ sourceType: 1,
+ codeRule: this.codeRule
+ }
}
return params
},
@@ -459,13 +461,13 @@
async handleSelectClient(value, item) {
if (value === "client") {
this.clientId = item.id
+ this.editSelCommonConfig.clientId = item.id
await getSalesDetailsList({
clientId: this.clientId
}).then((res) => {
this.getSalesDetailsFliter(res.data.list)
})
} else if (value === "contract") {
- console.log(item, item.number, "閫夋嫨妗�66")
this.productTableList.tableData = item.products
this.tableData = item.products
this.SalesDetailsId = item.id
@@ -478,25 +480,37 @@
} else if (value === "contract") {
this.editSelCommonConfig.title = "閿�鍞槑缁嗗崟"
this.editSelCommonConfig.editVisible = true
+ this.editSelCommonConfig.client_name = this.editConfig.infomation.client_name
}
},
- selClient(row, value) {
+ async selClient(row, value) {
console.log(row, value)
if (value === "client") {
this.editConfig.infomation.client_name = row.name
this.clientId = row.id
+ this.editSelCommonConfig.clientId = row.id
+ await getSalesDetailsList({
+ clientId: row.id
+ }).then((res) => {
+ this.getSalesDetailsFliter(res.data.list)
+ })
} else if (value === "contract") {
this.editConfig.infomation.salesDetailNumber = row.number
this.SalesDetailsId = row.id
+ this.productTableList.tableData = row.products
+ this.tableData = row.products
}
},
// 娓呴櫎宸查�夋嫨鐢ㄦ埛
clearupClient(value) {
if (value === "client") {
- this.editConfig.infomation.client_name = ""
- this.clientId = 0
+ this.editConfig.infomation = {}
+ // this.editConfig.infomation.client_name = ""
+ // this.clientId = 0
} else if (value === "contract") {
this.editConfig.infomation.salesDetailNumber = ""
+ this.productTableList.tableData = []
+ this.tableData = []
this.SalesDetailsId = 0
}
},
--
Gitblit v1.8.0