Ver Fonte

no message

linwenxin há 7 meses atrás
pai
commit
6ab80d7b17

+ 13 - 28
src/views/partsManagement/accessoryWebsite/website-old-parts-shop-refund/index.vue

@@ -65,16 +65,13 @@ export default {
         partsNumber: '',
         qty: '',
         applyNo: '',
-        materialGroupId: '',
         materialGroupName: '',
         remark: '',
-        unitId: '',
-        unitName: '',
+        goodsStockUnit: '',
         voucherNo: '',
         totalNumber: 0,
-        websitId: '',
-        websitName: '',
-        partsWebsitId: ''
+        sendWebsitId: '',
+        sendWebsitName: ''
       }
     }
   },
@@ -115,10 +112,8 @@ export default {
             change: val => {
               this.formData.partsNumber = ''
               this.formData.partsName = ''
-              this.formData.materialGroupId = ''
               this.formData.materialGroupName = ''
-              this.formData.unitId = ''
-              this.formData.unitName = ''
+              this.formData.goodsStockUnit = ''
               this.formData.totalNumber = ''
               if (val) {
                 this.formData.objectTypeName = this.objectTypeList.find(item => item.value === val)?.label || ''
@@ -139,24 +134,21 @@ export default {
           },
           formItemAttributes: {
             label: '网点',
-            prop: 'websitId',
+            prop: 'sendWebsitId',
             rules: [{ required: true, message: '请选择', trigger: 'blur' }]
           },
           events: {
             change: v => {
               var data = this.websitList.find(item => item.websitId === v)
               if (data) {
-                this.formData.websitName = data?.name
-                this.formData.partsWebsitId = data?.partsWebsitId
+                this.formData.sendWebsitName = data?.name
               } else {
-                this.formData.websitName = ''
-                this.formData.partsWebsitId = ''
+                this.formData.sendWebsitName = ''
               }
               this.getOptions(v)
             }
           }
         },
-
         {
           name: 'el-select',
           md: 24,
@@ -177,13 +169,11 @@ export default {
                 var item = this.partsList.find(item => item.value === val)
                 if (item) {
                   this.formData.partsName = item?.label
-                  this.formData.materialGroupId = item.data.materialGroupId
                   this.formData.materialGroupName = item.data.materialGroupName
-                  this.formData.unitId = item.data.unitId
-                  this.formData.unitName = item.data.unitName
+                  this.formData.goodsStockUnit = item.data.goodsStockUnit
                   this.formData.totalNumber = (() => {
                     if (!!~['新件退库'].indexOf(this.formData.objectType)) {
-                      return item.data.newQty
+                      return item.data.qty
                     } else if (!!~['退旧件', '无件返回'].indexOf(this.formData.objectType)) {
                       return item.data.oldQty
                     } else {
@@ -194,15 +184,12 @@ export default {
                 }
               }
               this.formData.partsName = ''
-              this.formData.materialGroupId = ''
               this.formData.materialGroupName = ''
-              this.formData.unitId = ''
-              this.formData.unitName = ''
+              this.formData.goodsStockUnit = ''
               this.formData.totalNumber = 0
             }
           }
         },
-
         {
           name: 'el-input',
           md: 24,
@@ -213,7 +200,7 @@ export default {
           name: 'el-input',
           md: 24,
           attributes: { placeholder: '请输入', disabled: true },
-          formItemAttributes: { label: '单位名称', prop: 'unitName' }
+          formItemAttributes: { label: '单位名称', prop: 'goodsStockUnit' }
         },
         {
           name: 'el-input',
@@ -281,7 +268,7 @@ export default {
           type: 'P',
           websitId: websitId
         }).then(res => {
-          this.partsList = res.data.map(item => ({ label: item.partsNumber, value: item.id, data: item }))
+          this.partsList = res.data.map(item => ({ label: item.partsName, value: item.partsNumber, data: item }))
         })
       } else {
         this.partsList = []
@@ -295,11 +282,9 @@ export default {
         partsNumber: '',
         qty: '',
         applyNo: '',
-        materialGroupId: '',
         materialGroupName: '',
         remark: '',
-        unitId: '',
-        unitName: '',
+        goodsStockUnit: '',
         voucherNo: '',
         totalNumber: 0
       }