Browse Source

发货单发货数量控制

qymljy 2 years ago
parent
commit
2a3256ba59

+ 18 - 11
src/HDrpManagement/dispatch/modules/productlist.vue

@@ -209,21 +209,28 @@ export default {
         val.qty = val.undeliqty
       }
       console.log(val,index)
+
       // this.$nextTick(()=>{
       //   this.$set(this.tableData,index,val)
       // })
       // // 防抖
-      that.updateOrder({
-        "sa_dispatchid": this.$route.query.id, //订单ID
-        "iteminfos": [{
-          "sa_dispatch_itemsid": val.sa_dispatch_itemsid,//0表示新增
-          "qty": val.qty, //数量
-          "remarks":val.remarks,
-          "batchno":val.batchno
-        }]
-      },()=>{
-        this.listData()
-      })
+      if(this.time !== null){
+        clearTimeout(this.time);
+      }
+      this.time = setTimeout(() => {
+        that.updateOrder({
+          "sa_dispatchid": this.$route.query.id, //订单ID
+          "iteminfos": [{
+            "sa_dispatch_itemsid": val.sa_dispatch_itemsid,//0表示新增
+            "qty": val.qty, //数量
+            "remarks":val.remarks,
+            "batchno":val.batchno
+          }]
+        },()=>{
+          this.listData()
+        })
+      },1000)
+
     },
     async updateOrder (val,fn) {
       const res  = await this.$api.requested({

+ 9 - 1
src/HDrpManagement/orderManage/index.vue

@@ -95,6 +95,13 @@
                     @keyup.native.enter="change" @clear="change" size="small" class="input-with-select inline-24 layout_search__panel" clearable>
           </el-input>
         </div>
+<!--        <div class="mt-10" >
+          <p class="search__label">是否手工关闭:</p>
+          <el-select v-model="where.tobeclosebyhand" clearable style="margin-right:10px" size="small" placeholder="请选择关闭状态" @change="change">
+            <el-option label="是" value="1"></el-option>
+            <el-option label="否" value="0"></el-option>
+          </el-select>
+        </div>-->
       </template>
       <template #custom-right>
         <el-button type="text" v-if="!more" @click="more = true">更多</el-button>
@@ -151,7 +158,8 @@ export default {
         "ischange": '',
         "agentinfo":'',
         "remarks":'',
-        "createby":''
+        "createby":'',
+        "tobeclosebyhand":''
       },
       dateSelect:[],
       more:false,