Bläddra i källkod

预装箱单-详情页/编辑/新增-添加新字段

jbb 2 år sedan
förälder
incheckning
74bd365965

+ 50 - 5
src/views/advance-packingList/addAdpackingDrawer.vue

@@ -241,6 +241,24 @@
                   <a-input style="width:100%" type="text" v-model="record.outerBoxHeight" @change="handleValueChange(record)" />
                 </a-form-model-item>
               </template>
+              <!-- 件数每箱 -->
+              <template slot="totalPack" slot-scope="text, record, index">
+                <a-form-model-item prop="totalPack" :rules="rules.totalPack">
+                  <a-input style="width:100%" type="text" v-model="record.totalPack" @change="handleValueChange(record)"/>
+                </a-form-model-item>
+              </template>
+              <!-- 包数/箱 -->
+              <template slot="packBox" slot-scope="text, record, index">
+                <a-form-model-item prop="packBox" :rules="rules.packBox">
+                  <a-input style="width:100%" type="text" v-model="record.packBox" @change="handleValueChange(record)"/>
+                </a-form-model-item>
+              </template>
+              <!-- 包数 -->
+              <template slot="packs" slot-scope="text, record, index">
+                <a-form-model-item prop="packs" :rules="rules.packs">
+                  <a-input style="width:100%" type="text" v-model="record.packs"  @change="handleValueChange(record)"/>
+                </a-form-model-item>
+              </template>
               <!-- 净净重 -->
               <template slot="netWeightToo" slot-scope="text, record, index">
                 <a-form-model-item prop="netWeightToo" :rules="rules.netWeightToo">
@@ -596,6 +614,30 @@ export default {
           ellipsis: true,
           
         },
+        {
+          title: '件数/包',
+          dataIndex: 'totalPack',
+          className: 'replacecolor',
+          width: 90,
+          ellipsis: true,
+          scopedSlots: { customRender: 'totalPack' },
+        },
+        {
+          title: '包数/箱',
+          dataIndex: 'packBox',
+          className: 'replacecolor',
+          width: 90,
+          ellipsis: true,
+          scopedSlots: { customRender: 'packBox' },
+        },
+        {
+          title: '包数',
+          dataIndex: 'packs',
+          className: 'replacecolor',
+          width: 90,
+          ellipsis: true,
+          scopedSlots: { customRender: 'packs' },
+        },
         // {
         //   title: '净净重',
         //   dataIndex: 'netWeightToo',
@@ -1034,12 +1076,15 @@ export default {
       var allSizeSum = this.getAllSizeSum(record);
       record.piecesBox = allSizeSum;
       record.total = (record.piecesBox*record.boxNumber);
+      if (record.totalPack != "" && record.totalPack != undefined&&record.totalPack!=='0'){
+        record.packBox =(Number(record.boxNumber)/Number(record.totalPack)).toFixed(2)
+      }
+      if(record.packBox!=='' &&record.packBox){
+          record.packs = Number(record.packBox)*Number(record.boxNumber)
+        }
       if (record.unitPrice != undefined && record.unitPrice != ""){
         record.totalPrice = (record.unitPrice*record.total).toFixed(2);
-      }
-      if (record.netWeight != "" && record.netWeight != undefined){
-        record.totalNetWeight = (record.netWeight * record.boxNumber).toFixed(2);
-      }
+      }      
       if (record.grossWeight != "" && record.grossWeight != undefined){
         record.totalGrossWeight = (record.grossWeight * record.boxNumber).toFixed(2);
       }
@@ -1051,7 +1096,7 @@ export default {
       this.$forceUpdate()
       this.setHeadCalField();
       },
-    // 获取不同尺码数量之和
+      // 获取不同尺码数量之和
     getAllSizeSum(record){
       var ret = 0;
       for (var i=0; i<this.sizeFields.length; i++){

+ 18 - 0
src/views/advance-packingList/detailsAdpackingDrawer.vue

@@ -359,6 +359,24 @@ export default {
           width: 80,
           
         },
+        {
+          title: '件数/包',
+          key: 'totalPack',
+          width: 90,
+          type: JVXETypes.normal ,
+        },
+        {
+          title: '包数/箱',
+          key: 'packBox',
+          width: 90,
+          type: JVXETypes.normal ,
+        },
+        {
+          title: '包数',
+          key: 'packs',
+          width: 90,
+          type: JVXETypes.normal ,
+        },
         {
           title: '净净重',
           key: 'netWeightToo',