浏览代码

Merge branch 'master' of http://47.107.53.207:3000/ymy/oms

hcf 1 年之前
父节点
当前提交
57c32a13bf

+ 14 - 3
src/views/audit/store/components/batchbyOneModal.vue

@@ -17,7 +17,7 @@
           :total="data.length">
         </el-pagination>
       </div>
-      <deliveryGoodsInfo :hideOrderCode="true" @editState="editState" @editResult="editResult" ref="info" />
+      <deliveryGoodsInfo :hideOrderCode="true" @editState="editState" @editResult="editResult" @qtyChange="qtyChange" ref="info" />
       <deliveryPrice :data="priceObj[data[currentOrder].omsOrderIds]" ref="price" v-if="data[currentOrder] && priceObj[data[currentOrder].omsOrderIds]" 
       @prichChange="prichChange" :currentValue="currentPrice[data[currentOrder].omsOrderIds]" />
     </div>
@@ -96,6 +96,8 @@ export default class BatchbyOneModal extends Vue {
     this.data = [];
     const requestId =  new Date().getTime() + this.getUuid()
     let obj:any={
+      tmsBusinessMan: (this as any).$store.getters.userInfo.userName,
+      tmsBusinessPhone: (this as any).$store.getters.userInfo.phonenumber,
       requestId:requestId
     };
     obj.subItem=[];
@@ -137,7 +139,7 @@ export default class BatchbyOneModal extends Vue {
     //   this.$message('请阅读并同意运单协议!')
     //   return
     // }
-    if(!this.data[this.currentOrder].tmsShipmentConsignor || !this.data[this.currentOrder].tmsUnloadingConsignor || !this.data[this.currentOrder].storeHouseId){
+    if(!this.data[this.currentOrder].tmsShipmentConsignor || !this.data[this.currentOrder].tmsUnloadingConsignor || !this.data[this.currentOrder].out_storeHouseId){
       this.$message("请编辑订单信息");
       return
     }
@@ -171,12 +173,18 @@ export default class BatchbyOneModal extends Vue {
     }
     this.sendGoods(_value,true);
   }
+  qtyChange(v:any){
+    this.getStoreCount(v);
+    this.getPriceInfo(v);
+  }
   //查库存
   getStoreCount(item:any,callback?:Function){
     if(!item){
       return
     }
-    console.log('asasa',item)
+    if(!item.out_storeHouseId || item.subItem.length == 0){
+      return
+    }
     let params:any={};
     params.storeHouseId = item.out_storeHouseId;
     params.skuIds=[];
@@ -325,6 +333,9 @@ export default class BatchbyOneModal extends Vue {
   //获取价格
   getPriceInfo(data:any,callback?:Function){
     let params:any={};
+    if(!data.out_storeHouseId || !data.entry_storeHouseId || data.subItem.length == 0){
+      return
+    }
     params.startStoreHouseId = data.out_storeHouseId;
     params.endStoreHouseId = data.entry_storeHouseId;
     params.materialInfos = []

+ 1 - 0
src/views/audit/store/components/deliveryGoodsInfo.vue

@@ -459,6 +459,7 @@ export default class DeliveryGoodsInfo extends Vue {
   qtyChange(row:any){
     row.tmsGoodsTotalPrice = multiply(Number(row.tmsQuantity),Number(row.price))
     this.totalFun()
+    this.$emit('qtyChange',this.value)
   }
   totalFun(){
     this.totalWeight = 0;