From 44dd6cad4e995f14a7bcb40410334867fdf95b7b Mon Sep 17 00:00:00 2001
From: guoxing <1369478551@qq.com>
Date: Tue, 3 Sep 2024 17:40:55 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=97=A7=E4=BB=B6=E5=85=A5?=
=?UTF-8?q?=E5=BA=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../oldPartsRecovery/oldPartsRecoveryAdd.vue | 80 +++++++++++++++++--
.../oldPartsRecovery/repairbillInfo.vue | 2 +-
2 files changed, 74 insertions(+), 8 deletions(-)
diff --git a/yxt-as-ui/src/views/storage/oldPartsRecovery/oldPartsRecoveryAdd.vue b/yxt-as-ui/src/views/storage/oldPartsRecovery/oldPartsRecoveryAdd.vue
index bf13192a6e..af2256e1d7 100644
--- a/yxt-as-ui/src/views/storage/oldPartsRecovery/oldPartsRecoveryAdd.vue
+++ b/yxt-as-ui/src/views/storage/oldPartsRecovery/oldPartsRecoveryAdd.vue
@@ -38,11 +38,15 @@
-
+
-
+
+
+
+
+
@@ -98,7 +102,14 @@
return {
listLoading: false,
submitdisabled: false,
- formobj: {},
+ formobj: {
+ billNo: "",
+ customerName: "",
+ vehMark: "",
+ vinNo: "",
+
+ },
+ list: [],
warehouseList: [],
warehouseAreaList: [],
warehouseRackList: []
@@ -180,8 +191,56 @@
this.$refs['form_obj'].validate((valid) => {
if (valid) {
+
+ for (var i in this.list) {
+
+ var item = this.list[i]
+
+ if (item.goodsSkuCode == '') {
+ this.$message({
+ showClose: true,
+ type: 'warning',
+ message: '商品编码不能为空'
+ })
+ return
+ }
+
+ if (item.warehouseSid == '' || item.warehouseName == '') {
+ this.$message({
+ showClose: true,
+ type: 'warning',
+ message: '仓库不能为空'
+ })
+ return
+ }
+ if (item.warehouseAreaSid == '' || item.warehouseAreaName == '') {
+ this.$message({
+ showClose: true,
+ type: 'warning',
+ message: '库区不能为空'
+ })
+ return
+ }
+ if (item.warehouseRackSid == '' || item.warehouseRackCode == '') {
+ this.$message({
+ showClose: true,
+ type: 'warning',
+ message: '库位不能为空'
+ })
+ return
+ }
+
+
+ }
+
+ var info = {
+ createBySid: window.sessionStorage.getItem('userSid'),
+ orgPath: window.sessionStorage.getItem('defaultOrgPath'),
+ oldList: this.list
+ }
+
this.submitdisabled = true
- req.saveInventory(this.formobj).then((res) => {
+ req.saveInventory(info).then((res) => {
if (res.success) {
this.$message({
showClose: true,
@@ -202,8 +261,14 @@
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj = {
+ billNo: "",
+ customerName: "",
+ vehMark: "",
+ vinNo: "",
+
+ },
+ this.list = []
- }
this.submitdisabled = false
this.$emit('doback')
},
@@ -214,15 +279,16 @@
var params = {
busRepairBillSid: row.billSid
}
+ this.formobj = row
req.getOldDetailsByBillSid(params)
.then(resp => {
if (resp.success) {
- this.formobj = resp.data
+ this.list = resp.data
}
})
.catch(e => {
- this.formobj = {}
+ this.list = []
})
},
}
diff --git a/yxt-as-ui/src/views/storage/oldPartsRecovery/repairbillInfo.vue b/yxt-as-ui/src/views/storage/oldPartsRecovery/repairbillInfo.vue
index 954391767b..ce6f0f2718 100644
--- a/yxt-as-ui/src/views/storage/oldPartsRecovery/repairbillInfo.vue
+++ b/yxt-as-ui/src/views/storage/oldPartsRecovery/repairbillInfo.vue
@@ -463,7 +463,7 @@
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
- req.fetchBySid(row.sid).then((res) => {
+ req.fetchBySid(row.billSid).then((res) => {
if (res.success) {
this.formobj = res.data
if (this.formobj.sitemVos.length > 0) {