Moss 1 tahun lalu
induk
melakukan
f348e38aaf

+ 1 - 1
src/views/mallManagement/goods/goods_add/index.vue

@@ -296,7 +296,7 @@
                 <el-input size="small" v-model="scope.row.stockNum"></el-input>
               </template>
             </el-table-column>
-            <el-table-column align="center" label="当前库存" prop="stockQty" min-width="120">
+            <el-table-column align="center" label="总库存数量" prop="stockQty" min-width="120">
               <template slot-scope="scope">
                 {{scope.row.stockQty}}
               </template>

+ 30 - 11
src/views/mallManagement/order/order_detail/index.vue

@@ -411,8 +411,9 @@
 						<div class="table">
 							<!-- 发货数量 -->
 							<el-form v-show="typeIndex == 1" ref="formData1" :model="formData1" label-width="0" size="small" label-position="left">
-								<el-table :data="formData1.list" element-loading-text="Loading" border fit highlight-current-row stripe>
-									<el-table-column prop="brandName" align="center" label="品牌"></el-table-column>
+								<el-table :data="formData1.list" element-loading-text="Loading" border fit highlight-current-row stripe @selection-change="deliverSelectionChange">
+									<el-table-column type="selection" width="40"></el-table-column>
+                  <el-table-column prop="brandName" align="center" label="品牌"></el-table-column>
 									<el-table-column prop="mainName" align="center" label="大类"></el-table-column>
 									<el-table-column prop="smallName" align="center" label="小类"></el-table-column>
 									<el-table-column prop="goodsName" align="center" label="商品名称"></el-table-column>
@@ -614,7 +615,7 @@ import {
   changePrice,
   changeReceiveInfo,
   confirmOrder,
-  getOrderDetail, goodsDeliver,
+  getOrderDetail, orderDeliver,
   saveRemark, orderRefund, orderCompensate, getCompensateList,
   changeShow, getCodeDetail, getMaterialList, listImport, saveCode, delCode, getPrintList, getDeliverList
 } from "@/api/order";
@@ -772,6 +773,8 @@ export default {
 
     printList: [],
     deliverList: [],
+
+    deliverSelection: [],
     }
   },
   created() {
@@ -900,7 +903,7 @@ export default {
         params.workOrder = this.orderForm.workOrder
         this.$refs.orderForm.validate((valid) => {
           if (valid) {
-            goodsDeliver(params).then(() => {
+            orderDeliver(params).then(() => {
               this.cancelForm();
               this.getDetail();
               this.$successMsg('保存成功');
@@ -947,7 +950,7 @@ export default {
     },
 
     getStorageList() {
-      Storage.getList({ pageNum: 1, pageSize: 100 }).then(res => {
+      Storage.getList({ pageNum: 1, pageSize: -1, type: '商品' }).then(res => {
         this.storageList = res.data.records
       })
     },
@@ -1174,18 +1177,34 @@ export default {
 			}
 		})
 	},
+
+  deliverSelectionChange(val) {
+    this.deliverSelection = val;
+  },
+
 	deliverGoods(){
 		this.$refs.orderForm.validate((valid) => {
 		  if (valid) {
-		    goodsDeliver({
+        if(this.deliverSelection.length < 1) return this.$errorMsg('请选择一个发货信息');
+
+		    orderDeliver({
 		      orderId: this.orderId,
-		      logisticsNo: this.orderForm.logisticsNo,
+		      logisticsNo: this.orderForm.pickType == 'NO' ? this.orderForm.logisticsNo : '',
 		      storageId: this.orderForm.storageId,
-		      companyCode: this.orderForm.companyCode,
+		      companyCode: this.orderForm.pickType == 'NO' ? this.orderForm.companyCode : '',
 		      workOrder: this.orderForm.workOrder,
-		    				pickName: this.orderForm.pickName,
-		    				pickPhone: this.orderForm.pickPhone,
-		    				pickType: this.orderForm.pickType,
+          pickName: this.orderForm.pickType == 'YES' ? this.orderForm.pickName : '',
+          pickPhone: this.orderForm.pickType == 'YES' ? this.orderForm.pickPhone : '',
+          pickType: this.orderForm.pickType,
+          orderDeliveryDetailList: this.deliverSelection.map(item => {
+            return {
+              orderDetailId: item.orderDetailId,
+              sendNum: item.num,
+              sendInsideCodeQty: item.insideCodeQty,
+              sendOutCodeQty: item.outCodeQty,
+              sendPartsCodeQty: item.partsCodeQty,
+            }
+          }),
 		    }).then(() => {
 		      this.cancelForm();
 		      this.getDetail();

+ 5 - 5
src/views/mallManagement/order/order_list/index.vue

@@ -1229,15 +1229,15 @@ export default {
 
             orderDeliver({
               orderId: this.editOrderId,
-              logisticsNo: this.logisticsForm.logisticsNo,
+              logisticsNo: this.logisticsForm.pickType == 'NO' ? this.logisticsForm.logisticsNo : '',
               storageId: this.logisticsForm.storageId,
-              companyCode: this.logisticsForm.companyCode,
+              companyCode: this.logisticsForm.pickType == 'NO' ? this.logisticsForm.companyCode : '',
               workOrder: this.logisticsForm.workOrder,
               exchange: this.logisticsForm.exchange,
-              pickName: this.logisticsForm.pickName,
-              pickPhone: this.logisticsForm.pickPhone,
+              pickName: this.logisticsForm.pickType == 'YES' ? this.logisticsForm.pickName : '',
+              pickPhone: this.logisticsForm.pickType == 'YES' ? this.logisticsForm.pickPhone : '',
               pickType: this.logisticsForm.pickType,
-              orderDeliveryDetailList: this.formData1.list.map(item => {
+              orderDeliveryDetailList: this.deliverSelection.map(item => {
                 return {
                   orderDetailId: item.orderDetailId,
                   sendNum: item.num,

+ 1 - 1
src/views/mallManagement/order/sales_return_order_list/index.vue

@@ -667,7 +667,7 @@ export default {
             this.formData.recePhone = oData.recePhone;
             this.formData.receAddress = oData.receAddress;
             oData.orderDetails.forEach(item => {
-              item.waitRefundNum = item.refundNum;
+              item.waitRefundNum = item.sendNum;
               item.waitRefundPrice = item.price;
             })
             this.goodsList = oData.orderDetails;