فهرست منبع

【修改】提货管理

howie 2 سال پیش
والد
کامیت
f42bdc9d4d
1فایلهای تغییر یافته به همراه33 افزوده شده و 4 حذف شده
  1. 33 4
      src/views/supply/pickup/components/pickup_form.vue

+ 33 - 4
src/views/supply/pickup/components/pickup_form.vue

@@ -133,17 +133,29 @@
           <template v-if="mainForm.pickupWay == 2 && logisticsNumber == '001'">
             <el-table-column align="left" label="收货客户" prop="orderTime" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
-                <el-input v-model="scope.row.receivingName" size="mini"></el-input>
+                <el-input
+                  v-model="scope.row.receivingName"
+                  size="mini"
+                  @input="handleInput($event, scope.row.invoiceId, 1)"
+                ></el-input>
               </template>
             </el-table-column>
             <el-table-column align="left" label="电话" prop="orderTime" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
-                <el-input v-model="scope.row.phone" size="mini"></el-input>
+                <el-input
+                  v-model="scope.row.phone"
+                  size="mini"
+                  @input="handleInput($event, scope.row.invoiceId, 2)"
+                ></el-input>
               </template>
             </el-table-column>
             <el-table-column align="left" label="收货地址" prop="orderTime" min-width="120" show-overflow-tooltip>
               <template slot-scope="scope">
-                <el-input v-model="scope.row.address" size="mini"></el-input>
+                <el-input
+                  v-model="scope.row.address"
+                  size="mini"
+                  @input="handleInput($event, scope.row.invoiceId, 3)"
+                ></el-input>
               </template>
             </el-table-column>
           </template>
@@ -329,7 +341,23 @@ export default {
     goBack() {
       this.$emit('backListFormDetail')
     },
-
+    handleInput(e, id, type) {
+      console.log(e)
+      this.deliverList.forEach(k => {
+        if (k.invoiceId === id) {
+          switch (type) {
+            case 1:
+              k.receivingName = e
+              break
+            case 2:
+              k.phone = e
+              break
+            default:
+              k.address = e
+          }
+        }
+      })
+    },
     // 获取详情
     getDetail() {
       getDetail({ id: this.listItem.id }).then(res => {
@@ -408,6 +436,7 @@ export default {
           this.$set(k, 'address', '')
         })
       } else {
+        if (this.deliverList && !this.deliverList.length) return
         this.deliverList.forEach(k => {
           delete k.receivingName
           delete k.phone