linwenxin 8 месяцев назад
Родитель
Сommit
cd06b7532b

+ 7 - 5
src/views/partsManagement/accessoryWebsite/website-parts-shop-sales-manage/website-parts-shop-sales/components/website-parts-shop-sales-information.vue

@@ -552,7 +552,10 @@ export default {
   watch: {
     'form.buyPeople'(newval, oldval) {
       if (oldval !== undefined && oldval !== '') {
-        this.col()
+        this.form.identity = ''
+        this.form.mobile = ''
+        this.form.workerId = ''
+        this.form.workerName = ''
       }
     }
   },
@@ -682,10 +685,6 @@ export default {
         })
     },
 
-    col() {
-      this.$data.form = this.$options.data().form
-    },
-
     add() {
       this.form.itemList.push({ remark: '', stockQty: '', partsNumber: '', qty: '' })
     },
@@ -699,6 +698,9 @@ export default {
     },
 
     update(item, index) {
+      if (!(item.websitId || this.form.websitId) || !(item.partsWebsitId || this.form.partsWebsitId)) {
+        return
+      }
       var { id, partsNumber, qty, ...data } = this.partsList.find(item => item.id === this.form.itemList[index].partsId)
       partsPartssalesorderQueryPartsNewQty({
         websitId: item.websitId || this.form.websitId,