瀏覽代碼

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

jbb 2 年之前
父節點
當前提交
8e75f90805

+ 72 - 0
src/views/packing-list/packinglist-clothes/clothesAddDrawer.vue

@@ -233,6 +233,24 @@
                 <a-form-model-item prop="outerBoxHeight" :rules="rules.outerBoxHeight">
                   <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">
@@ -562,6 +580,30 @@ export default {
           width: 90,
            className: 'replacecolor'
         },
+        {
+          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',
@@ -781,6 +823,12 @@ export default {
       var allSizeSum = this.getAllSizeSum(dataRow);
       dataRow.piecesBox = allSizeSum
       dataRow.total = dataRow.piecesBox*dataRow.boxNumber
+      if (record.totalPack != "" && record.totalPack != undefined&&record.totalPack!=='0'){
+        record.packBox =(Number(record.total)/Number(record.totalPack)).toFixed(2)
+      }
+      if(record.packBox!=='' &&record.packBox){
+          record.packs = Number(record.packBox)*Number(record.boxNumber)
+        }
       if (dataRow.netWeight != "" && dataRow.netWeight != undefined){
         dataRow.totalNetWeight = dataRow.netWeight * dataRow.boxNumber;
       }
@@ -1189,6 +1237,30 @@ export default {
            className: 'replacecolor',
             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',

+ 36 - 0
src/views/packing-list/packinglist-clothes/detailsClothesDrawer.vue

@@ -356,6 +356,24 @@ export default {
           width: 70,
           type: JVXETypes.normal,
         },
+        {
+          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',
@@ -604,6 +622,24 @@ export default {
           width: 120,
           type: JVXETypes.normal,
         },
+        {
+          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',