Browse Source

订单加空验证,出库日志绑定值错误

阿赫 2 months ago
parent
commit
d31ae23836

+ 1 - 1
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/ProductInventoryServiceImpl.java

@@ -809,7 +809,7 @@ public class ProductInventoryServiceImpl implements IProductInventoryService {
                     productOutboundRecord.setBoxNum(xs);//箱数
                     productOutboundRecord.setSuttle(zl);//重量
                     productOutboundRecord.setMachineTool(Long.parseLong("30"));//机台
-                    productOutboundRecord.setGrossWeight(item.getOldActualWeight());//毛重
+                    productOutboundRecord.setGrossWeight(zl);//毛重
                     productOutboundRecord.setPackaging("2");//包装
                     productOutboundRecord.setWorkShifts("D甲");//班次
                     productOutboundRecord.setForeignTradeNumber("1");//外贸号

+ 2 - 2
zkqy-custom-business/src/main/resources/mapper/business/ProductOutboundRecordMapper.xml

@@ -351,8 +351,8 @@
         r.production_date,
         r.remark,
         r.box_num,
-        r.gross_weight,
-        r.suttle
+        ROUND(r.gross_weight, 2) as gross_weight,
+        ROUND(r.suttle, 2) as suttle
         FROM
         {DBNAME}.product_outbound_record r
         LEFT JOIN {DBNAME}.production p ON r.product_id = p.id

+ 16 - 2
zkqy-ui/src/views/orderMange/retailMange/index.vue

@@ -496,7 +496,7 @@
                       <el-option
                         v-for="item in productionOptions"
                         :key="item.productName"
-                        :label="item.productName"
+                        :label="item.productName+'--'+item.productNo"
                         :value="item.productName"
                       >
                         <!-- <span class="discribe" style="float: left">{{
@@ -513,6 +513,11 @@
               </el-table-column>
               <el-table-column prop="productSpecifications" label="规格">
                 <template slot-scope="scope">
+                  <el-form-item
+                    :prop="'productSpecifications-' + scope.$index"
+                    :name="'productSpecifications-' + scope.$index"
+                    style="margin: 0px; padding: 0px"
+                  >
                   <el-select
                     v-model="scope.row.productSpecifications"
                     @change="handleSpecificationsChange(scope.row)"
@@ -534,6 +539,7 @@
                       >
                     </el-option>
                   </el-select>
+                  </el-form-item>
                 </template>
               </el-table-column>
               <el-table-column prop="colours" width="150" label="色泽">
@@ -1543,7 +1549,7 @@ export default {
     initTableValidate() {
       let length = this.productionTableData.length;
       for (let i = 0; i < length; i++) {
-        this.rules["productNo-" + i] = [
+        this.rules["productName-" + i] = [
           {
             // required: true,
             message: "请选择货品",
@@ -1551,6 +1557,14 @@ export default {
             validator: this.validateTableField,
           },
         ];
+        this.rules["productSpecifications-" + i] = [
+          {
+            // required: true,
+            message: "请选择规格",
+            trigger: "blur",
+            validator: this.validateTableField,
+          },
+        ];
         this.rules["productNumber-" + i] = [
           {
             // required: true,