Browse Source

装箱单参考发送明细

jbb 2 years ago
parent
commit
025ca032ed

+ 18 - 0
src/api/document/packing-list/packinglist-clothes.js

@@ -1 +1,19 @@
 /** 单证 -- 装箱单-成衣 **/
+import { getAction,deleteAction} from '@/api/manage'
+//分页查询
+const spltList = params => getAction('/splt/syPackingListTailoring/list', params)
+
+//参考预装箱单
+const orderSpltList = params => getAction('/splt/syPackingListTailoring/getSpaplData', params)
+
+//按照id删除
+const deleteSpltList = params => deleteAction('/splt/syPackingListTailoring/delete', params)
+
+//批量删除
+const batchDelete = params => deleteAction('/splt/syPackingListTailoring/deleteBatch', params)
+
+//根据预装箱单id获取数据
+const orderSpltListId = params => getAction('/splt/syPackingListTailoring/querySpaplId', params)
+
+export {spltList,orderSpltList,deleteSpltList,batchDelete,orderSpltListId}
+

+ 233 - 213
src/views/packing-list/packinglist-clothes/clothesAddDrawer.vue

@@ -91,14 +91,45 @@
 
       <!--操作按钮区域 参照预装箱单 増行-->
       <a-card :bordered="true" style="margin:10px 0 60px 0;">
-        <div class="table-operator">
+        <!-- <div class="table-operator">
           <a-button type="primary" @click="referadvancePackingList" icon="ordered-list">参照预装箱单</a-button>
           <a-button type="primary" @click="handleAddColumn" icon="plus" style="margin-left: 20px">増行</a-button>
-        </div>
+        </div> -->
 
         <!-- 子表 :pagination="ipagination"  -->
         <a-spin :spinning="confirmLoading">
-          <a-form-model ref="formRef" :rules="validatorRules">
+          <a-form-model ref="formRef">
+            <j-vxe-table
+              ref="vTable"
+              toolbar
+              row-number
+              row-selection
+              drag-sort
+              keep-source
+              :height="300"
+              :loading="loading"
+              :dataSource="clothesAddData"
+              :columns="clothesAddColumns"
+              :alwaysEdit=true
+              :bordered=true
+              :scroll="{ x: 1500 }"
+              style="margin-top: 5px;"
+              :toolbarConfig="toolbarConfig"
+              @valueChange="handleValueChange"
+            >
+            <template v-slot:action="props">
+              <a @click="copy(props)">复制</a>
+              <a-divider type="vertical"/>
+              <a-popconfirm title="确定删除吗?" @confirm="handleDelete(props)">
+                <a>删除</a>
+              </a-popconfirm>
+            </template>
+            <template v-slot:toolbarSuffix>
+              <a-button type="primary" @click="referadvancePackingList" icon="ordered-list">参照发运明细</a-button>
+            </template>
+            </j-vxe-table>
+          </a-form-model>
+          <!-- <a-form-model ref="formRef" :rules="validatorRules">
             <a-table
               bordered
               :row-key="record => record.id"
@@ -108,74 +139,74 @@
               :pagination="pagination"
               :scroll="{ x: 1500 }"
               @change="handleTableChange"
-            >
+            > -->
               <!-- 启始箱号 输入框-->
-              <template slot="inceptionBoxNo" slot-scope="text, record, index">
+              <!-- <template slot="inceptionBoxNo" slot-scope="text, record, index">
                 <a-form-model-item prop="inceptionBoxNo" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.inceptionBoxNo" />
+                  <a-input style="width:100%" type="text" v-model="record.startingBoxNumber" />
                 </a-form-model-item>
-              </template>
+              </template> -->
 
               <!-- 结束箱号 输入框-->
-              <template slot="endBoxNo" slot-scope="text, record, index">
+              <!-- <template slot="endBoxNo" slot-scope="text, record, index">
                 <a-form-model-item prop="endBoxNo" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.endBoxNo" />
+                  <a-input style="width:100%" type="text" v-model="record.endCaseNumber" />
                 </a-form-model-item>
-              </template>
+              </template> -->
 
               <!-- 件数/箱 输入框-->
 
-              <template slot="packagesBox" slot-scope="text, record, index">
+              <!-- <template slot="packagesBox" slot-scope="text, record, index">
                 <a-form-model-item prop="packagesBox" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.packagesBox" />
+                  <a-input style="width:100%" type="text" v-model="record.piecesBox" />
                 </a-form-model-item>
-              </template>
+              </template> -->
 
               <!--箱数 输入框-->
-              <template slot="boxes" slot-scope="text, record, index">
+              <!-- <template slot="boxes" slot-scope="text, record, index">
                 <a-form-model-item prop="boxes" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.boxes" />
+                  <a-input style="width:100%" type="text" v-model="record.boxNumber" />
                 </a-form-model-item>
-              </template>
+              </template> -->
 
               <!--净重/箱 输入框-->
-              <template slot="suttle" slot-scope="text, record, index">
+              <!-- <template slot="suttle" slot-scope="text, record, index">
                 <a-form-model-item prop="suttle" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.suttle" />
+                  <a-input style="width:100%" type="text" v-model="record.netWeight" />
                 </a-form-model-item>
-              </template>
+              </template> -->
 
               <!--毛重/箱 输入框-->
-              <template slot="roughWeight" slot-scope="text, record, index">
+              <!-- <template slot="roughWeight" slot-scope="text, record, index">
                 <a-form-model-item prop="roughWeight" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.roughWeight" />
+                  <a-input style="width:100%" type="text" v-model="record.grossWeight" />
                 </a-form-model-item>
-              </template>
+              </template> -->
 
               <!--外箱长度 输入框-->
-              <template slot="boxLength" slot-scope="text, record, index">
+              <!-- <template slot="boxLength" slot-scope="text, record, index">
                 <a-form-model-item prop="boxLength" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.boxLength" />
+                  <a-input style="width:100%" type="text" v-model="record.outerBoxLength" />
                 </a-form-model-item>
-              </template>
+              </template> -->
 
               <!--外箱宽度 输入框-->
-              <template slot="boxWidth" slot-scope="text, record, index">
+              <!-- <template slot="boxWidth" slot-scope="text, record, index">
                 <a-form-model-item prop="boxWidth" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.boxWidth" />
+                  <a-input style="width:100%" type="text" v-model="record.outerBoxWidth" />
                 </a-form-model-item>
-              </template>
+              </template> -->
 
               <!--外箱高度 输入框-->
 
-              <template slot="boxHeight" slot-scope="text, record, index">
+              <!-- <template slot="boxHeight" slot-scope="text, record, index">
                 <a-form-model-item prop="boxHeight" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.boxHeight" />
+                  <a-input style="width:100%" type="text" v-model="record.outerBoxHeight" />
                 </a-form-model-item>
-              </template>
+              </template> -->
 
               <!-- 操作 -->
-              <span slot="operationSlot" slot-scope="text, record">
+              <!-- <span slot="operationSlot" slot-scope="text, record">
                 <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
                   <a href="javascript:void(0);" style="color:red;">删除</a>
                 </a-popconfirm>
@@ -183,7 +214,7 @@
                 <a @click="copy(record)">复制</a>
               </span>
             </a-table>
-          </a-form-model>
+          </a-form-model> -->
         </a-spin>
       </a-card>
       <!-- 页面底部提交取消 -->
@@ -216,8 +247,11 @@
 
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { JVXETypes } from '@/components/jeecg/JVxeTable'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import ReferencePrePacklist from '@views/packing-list/packinglist-clothes/referencePrePacklist'
+import { orderSpltListId } from '@api/document/packing-list/packinglist-clothes.js'
+
 
 export default {
   name: 'ClothesAddDrawer', //  新增-装箱单 -成衣
@@ -232,225 +266,218 @@ export default {
       clothesAddColumns: [
         {
           title: '账套',
-          dataIndex: 'accountSet',
+          key: 'acSetNo',
           width: 160,
           fixed: 'left',
-          className: 'replacecolor'
+           type: JVXETypes.normal,
         },
         {
           title: '成衣工厂',
-          dataIndex: 'clothesFactory',
+          key: 'garmentFactory',
           width: 120,
           fixed: 'left',
-          className: 'replacecolor'
+           type: JVXETypes.normal,
         },
         {
           title: 'HOD',
-          dataIndex: 'hod',
+          key: 'hod',
           width: 120,
-          className: 'replacecolor'
+          type: JVXETypes.normal,
         },
         {
           title: 'STYLE NO.',
-          dataIndex: 'styleNo',
+          key: 'styleNo',
           width: 120,
-          className: 'replacecolor'
+          type: JVXETypes.normal,
         },
         {
           title: 'PO NO.',
-          dataIndex: 'poNo',
+          key: 'poNo',
           width: 90,
-          className: 'replacecolor'
+           type: JVXETypes.normal,
         },
 
         {
           title: 'ITEM NO./SKU NO./UPC NO./PACKS CODE',
-          dataIndex: 'itemNo',
+          key: 'itemCode',
           width: 340,
-          className: 'replacecolor'
+          type: JVXETypes.normal,
         },
         {
           title: '分销点/DC/LABEL',
-          dataIndex: 'dcLabel',
+          key: 'distributionPoint',
           width: 200,
-          className: 'replacecolor'
-        },
-        {
-          title: 'S',
-          dataIndex: 's',
-          width: 90,
-          className: 'replacecolor'
-        },
-        {
-          title: 'M',
-          dataIndex: 'm',
-          width: 90,
-          className: 'replacecolor'
-        },
-        {
-          title: 'L',
-          dataIndex: 'l',
-          width: 90,
-          className: 'replacecolor'
-        },
-        {
-          title: 'XL',
-          dataIndex: 'xl',
-          width: 90,
-          className: 'replacecolor'
-        },
-        {
-          title: 'XXL',
-          dataIndex: 'xxl',
-          width: 90,
-          className: 'replacecolor'
-        },
-
-        {
-          title: '3XL',
-          dataIndex: '3xl',
-          width: 90,
-          className: 'replacecolor'
-        },
+          type: JVXETypes.normal,
+          insertAfter:true,
+        },
+        // {
+        //   title: 'S',
+        //   key: 's',
+        //   width: 90,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: 'M',
+        //   key: 'm',
+        //   width: 90,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: 'L',
+        //   key: 'l',
+        //   width: 90,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: 'XL',
+        //   key: 'xl',
+        //   width: 90,
+        //   className: 'replacecolor'
+        // },
+        // {
+        //   title: 'XXL',
+        //   key: 'xxl',
+        //   width: 90,
+        //   className: 'replacecolor'
+        // },
+
+        // {
+        //   title: '3XL',
+        //   key: 'xxxl',
+        //   width: 90,
+        //   className: 'replacecolor'
+        // },
 
         {
           title: '启始箱号',
-          dataIndex: 'inceptionBoxNo',
-          scopedSlots: { customRender: 'inceptionBoxNo' },
+          key: 'startingBoxNumber',
+          type: JVXETypes.inputNumber ,
           width: 120,
-          className: 'replacecolor'
         },
 
         {
           title: '结束箱号',
-          dataIndex: 'endBoxNo',
+          key: 'endCaseNumber',
           width: 120,
-          scopedSlots: { customRender: 'endBoxNo' },
-          className: 'replacecolor'
+          type: JVXETypes.inputNumber 
         },
 
         {
           title: '颜色(中英文)',
-          dataIndex: 'colorChUsa',
+          key: 'colour',
           width: 140,
-          className: 'replacecolor'
+         type: JVXETypes.normal,
         },
         {
           title: '配码',
-          dataIndex: 'configCode',
+          key: 'withCode',
           width: 120,
-          className: 'replacecolor'
+         type: JVXETypes.normal,
         },
         {
           title: '件数/箱',
-          dataIndex: 'packagesBox',
+          key: 'piecesBox',
           width: 120,
-          scopedSlots: { customRender: 'packagesBox' },
-          className: 'replacecolor'
+          type: JVXETypes.inputNumber 
         },
         {
           title: '箱数',
-          dataIndex: 'boxes',
+          key: 'boxNumber',
           width: 120,
-          scopedSlots: { customRender: 'boxes' },
-          className: 'replacecolor'
+          type: JVXETypes.inputNumber 
         },
 
         {
           title: '总件数',
-          dataIndex: 'totalPackagesNum',
+          key: 'total',
           width: 90,
-          className: 'replacecolor'
+          type: JVXETypes.normal,
         },
         {
           title: '净重/箱',
-          dataIndex: 'suttle',
+          key: 'netWeight',
           width: 120,
-          scopedSlots: { customRender: 'suttle' },
-          className: 'replacecolor'
+          type: JVXETypes.inputNumber 
         },
         {
           title: '总净重',
-          dataIndex: 'totalSuttle',
+          key: 'totalNetWeight',
           width: 90,
-          className: 'replacecolor'
+          type: JVXETypes.normal,
         },
         {
           title: '毛重/箱',
-          dataIndex: 'roughWeight',
+          key: 'grossWeight',
           width: 120,
-          scopedSlots: { customRender: 'roughWeight' },
-          className: 'replacecolor'
+          type: JVXETypes.inputNumber 
         },
         {
           title: '总毛重',
-          dataIndex: 'totalRoughWeigh',
+          key: 'totalGrossWeight',
           width: 90,
-          className: 'replacecolor'
+          type: JVXETypes.normal,
         },
         {
           title: '外箱长度',
-          dataIndex: 'boxLength',
+          key: 'outerBoxLength',
           width: 120,
-          scopedSlots: { customRender: 'boxLength' },
-          className: 'replacecolor'
+         type: JVXETypes.inputNumber 
         },
         {
           title: '外箱宽度',
-          dataIndex: 'boxWidth',
+          key: 'outerBoxWidth',
           width: 120,
-          scopedSlots: { customRender: 'boxWidth' },
-          className: 'replacecolor'
+          type: JVXETypes.inputNumber 
         },
         {
           title: '外箱高度',
-          dataIndex: 'boxHeight',
+          key: 'outerBoxHeight',
           width: 120,
-          scopedSlots: { customRender: 'boxHeight' },
-          className: 'replacecolor'
+          type: JVXETypes.inputNumber 
         },
         {
           title: '总体积',
-          dataIndex: 'totalVolume',
+          key: 'totalVolume',
           width: 120,
-          className: 'replacecolor'
+          type: JVXETypes.normal,
         },
         {
           title: '净净重',
-          dataIndex: 'netNetWeight',
+          key: 'netWeightToo',
           width: 120,
-          className: 'replacecolor'
+          type: JVXETypes.normal,
         },
         {
           title: '单价',
-          dataIndex: 'price',
+          key: 'unitPrice',
           width: 120,
-          className: 'replacecolor'
+          type: JVXETypes.normal,
         },
         {
           title: '总价',
-          dataIndex: 'totalPrices',
+          key: 'totalPrice',
           width: 120,
-          className: 'replacecolor'
+          type: JVXETypes.normal,
         },
         {
           title: '备注',
-          dataIndex: 'note',
+          key: 'remarks',
           width: 140,
           customRender: t => ellipsis(t),
           fixed: 'right',
-          className: 'replacecolor'
+          type: JVXETypes.normal,
         },
         {
           title: '操作',
-          dataIndex: 'operation',
-          scopedSlots: { customRender: 'operationSlot' },
+          key: 'operation',
+          type: JVXETypes.slot,
           width: 160,
           fixed: 'right',
-          className: 'replacecolor'
+          align: 'center',
+            slotName: 'action',
         }
       ],
-      clothesAddData: [{}, {}, {}],
+      clothesAddData: [],
       loading: false, // 表格加载
       clothesAdd: {},
        pagination: {
@@ -473,63 +500,58 @@ export default {
   mounted() {},
   methods: {
     // 参照回调
-    referCallback(filterDataList){
-      var subList = this.convertReferToSub(filterDataList);
-        var filterList = subList.filter(newItem=>{
-          return this.addPreBook.syLetterDepositItemList.filter(item=>{
-            return item.syPreAssembledPackingListItemId === newItem.syPreAssembledPackingListItemId;
-          }).length == 0;
-        });
-        this.addPreBook.syLetterDepositItemList = this.addPreBook.syLetterDepositItemList.concat(filterList);
-        this.setHeadCalField();
-        
+    referCallback(idArr){
+     var preId = idArr[0]
+     orderSpltListId({id:preId}).then(res => {
+          var data = res.result
+          console.log(data)
+          if (res.success) {
+            this.clothesAdd = {
+              orderNum: data.orderNumber,
+              styleNum: data.itemNumber,
+              name: data.productName,
+              sizeRange: data.sizeRange,
+              customer:  data.customer,
+              containerCode: data.containerCode,
+              containerNo: data.containerNumber,
+              note: data.memo,
+              clothesFactory: data.garmentFactory,
+              exportInvoiceNo: data.exportInvoiceNo,
+              bookNum: data.depositaryReceiptNo
+            }
+          this.dynamicColumns(data.sizeTables)
+          this.clothesAddData = data.syPackingListTailoringItemList
+          }else {
+            this.$message.error(res.message);
+          }
+        })
     },
-      // 参照数据转换成子表
-    convertReferToSub(dataList){
-      var ret = [];
-      console.log(dataList)
-      debugger
-      for (var i=0; i<dataList.length; i++){
-        var data = dataList[i];
-        var sub = {
-        accountSet: '',
-        clothesFactory: data.garmentFactory,
-        hod: '',
-        styleNo: '',
-        poNo: '',
-        itemNo: '',
-        dcLabel: data.distributionPoint,
-        s: '',
-        m: '',
-        l: '',
-        xl: '',
-        xxl: '',
-        xxxl: '',
-        inceptionBoxNo: '',
-        endBoxNo: '',
-        colorChUsa: '',
-        configCode: '',
-        packagesBox: '',
-        boxes: '',
-        totalPackagesNum: '',
-        suttle: '',
-        totalSuttle: '',
-        roughWeight: '',
-        totalRoughWeigh: '',
-        boxLength: '',
-        boxWidth: '',
-        boxHeight: '',
-        totalVolume: '',
-        netNetWeight: '',
-        price: '',
-        totalPrices: '',
-        note: '',
-        operation: ''
-        };
-        ret.push(sub);
-      }
-      return ret;
+
+    dynamicColumns(sizeTables){
+       var newColumns = this.clothesAddColumns
+       var i = 0
+       for(;i < newColumns.length ; i++){
+         if(newColumns[i].insertAfter){
+           break;
+         }
+       }
+       console.log(sizeTables)
+       debugger
+        // 插入数据
+        for (var j=0;j<sizeTables.length;j++){
+          var field = {
+              title: sizeTables[j].size,
+              key: 'size-'+sizeTables[j].size,
+              type: JVXETypes.inputNumber ,
+              width: 80,
+              isSize:true,
+          };
+          newColumns.splice(i+1+j,0,field);
+          debugger
+        }
+        this.clothesAddColumns = newColumns
     },
+     
     // 参照预装箱单
     referadvancePackingList() {
       console.log('打开参照订单数据')
@@ -543,37 +565,37 @@ export default {
       console.log('増行')
       const addrow = {
         accountSet: '',
-        clothesFactory: '',
+        garmentFactory: '',
         hod: '',
         styleNo: '',
         poNo: '',
-        itemNo: '',
-        dcLabel: '',
+        itemCode: '',
+        distributionPoint: '',
         s: '',
         m: '',
         l: '',
         xl: '',
         xxl: '',
         xxxl: '',
-        inceptionBoxNo: '',
-        endBoxNo: '',
-        colorChUsa: '',
-        configCode: '',
-        packagesBox: '',
-        boxes: '',
-        totalPackagesNum: '',
-        suttle: '',
-        totalSuttle: '',
-        roughWeight: '',
-        totalRoughWeigh: '',
-        boxLength: '',
-        boxWidth: '',
-        boxHeight: '',
+        startingBoxNumber: '',
+        endCaseNumber: '',
+        colour: '',
+        withCode: '',
+        piecesBox: '',
+        boxNumber: '',
+        total: '',
+        netWeight: '',
+        totalNetWeight: '',
+        grossWeight: '',
+        totalGrossWeight: '',
+        outerBoxLength: '',
+        outerBoxWidth: '',
+        outerBoxHeight: '',
         totalVolume: '',
-        netNetWeight: '',
-        price: '',
+        netWeightToo: '',
+        unitPrice: '',
         totalPrices: '',
-        note: '',
+        remarks: '',
         operation: ''
       }
       this.clothesAddData.push(addrow)
@@ -619,8 +641,6 @@ export default {
 
     // 分页、排序、筛选变化时触发
     handleTableChange(pagination, filters, sorter) {
-      console.log('当前页信息>>>>',pagination)
-      debugger
       this.queryParam.pageNo = pagination.current
       this.getAnnList()
     }

+ 366 - 0
src/views/packing-list/packinglist-clothes/referencePrePacklist.vue

@@ -0,0 +1,366 @@
+<template>
+  <a-modal
+    title="参照预装箱单"
+    v-model="referencePrePacklist"
+    :confirmLoading="confirmLoading"
+    @ok="onSubmit"
+    @cancel="handleCancel"
+    width="86%"
+    style="top:330px;left:100px;"
+  >
+    <!-- tabel 加载 -->
+    <a-spin :spinning="confirmLoading">
+      <!-- 查询  -->
+      <div class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="searchQuery">
+          <a-row :gutter="24">
+            <a-col :md="6" :sm="8">
+                <a-form-item label="客户简称">
+                  <j-search-select-tag
+                    placeholder="请选择客户简称"
+                    v-model="queryParam.customerAbbreviation"
+                    dict="view_customer,customer,customer">
+                  </j-search-select-tag>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="8">
+              <a-form-item label="预发货日期">
+                <a-date-picker placeholder="请选择预发货日期" v-model="queryParam.preDeliveryDate" format="YYYY-MM-DD"
+                @change="deliveryDateChange"></a-date-picker>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="小PO">
+                <a-input placeholder="请输入小PO" v-model="queryParam.smallPo"></a-input>
+              </a-form-item>
+            </a-col>
+            <template v-if="toggleSearchStatus">
+               <a-col :md="6" :sm="8">
+              <a-form-item label="分销点">
+                <a-input placeholder="请输入分销点" v-model="queryParam.distributionPoint"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="款号">
+                <a-input placeholder="请输入款号" v-model="queryParam.itemNumber"></a-input>
+              </a-form-item>
+            </a-col>
+            </template>
+
+            <a-col :md="6" :sm="8">
+              <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+                <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+                <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+                <a @click="handleToggleSearch" style="margin-left: 8px">
+                  {{ toggleSearchStatus ? '收起' : '展开' }}
+                  <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
+                </a>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+
+      <!-- table , y: 300 -->
+      <div class="anotherTable">
+        <a-table
+          :columns="advancePackingListColumns"
+          :data-source="advancePackingListData"
+          :loading="loading"
+          :pagination="pagination"
+          row-key="id"
+          :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
+          @change="handleTableChange"
+          bordered
+          :scroll="{ x: 2000 }"
+          size="small"
+        >
+        </a-table>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+import { orderSpltList } from '@api/document/packing-list/packinglist-clothes.js'
+
+export default {
+  name: 'AdvancePackingListModal', // 参照预装箱单 弹框
+  mixins: [JeecgListMixin],
+  components: { JEllipsis, moment },
+  data() {
+    let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
+    return {
+      
+      // 查询条件
+      queryParam: {
+        customer: '', //客户
+        preDeliveryDate: '', // 预发货日期
+        smallPo: '' , // 小PO
+        distributionPoint: '' , //分销点
+        itemNumber: '', //款号
+        pageNo:1,
+      },
+      selectedRowKeys: [], // 勾选航
+      loading: false, // 表格加载
+      // 表头
+      advancePackingListColumns: [
+        {
+          title: '款号',
+          dataIndex: 'itemNumber',
+          width: 120,
+          fixed: 'left',
+          className: 'replacecolor'
+        },
+        {
+          title: '客户简称',
+          dataIndex: 'customerAbbreviation',
+          width: 120,
+          fixed: 'left',
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+        {
+          title: '预发货日期',
+          dataIndex: 'preDeliveryDate',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '小PO',
+          dataIndex: 'smallPo',
+          width: 120,
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+        //  {
+        //   title: '创建时间',
+        //   dataIndex: 'createTime',
+        //   align: 'center',
+        //   sorter: true,
+        //   customRender: text => {
+        //     return moment(text).format('YYYY-MM-DD')
+        //   }
+        // },
+        
+        {
+          title: '分销点',
+          dataIndex: 'distributionPoint',
+          width: 120,
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+
+        {
+          title: '备注',
+          dataIndex: 'u8Remarks',
+          width: 150,
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+        {
+          title: '客户',
+          dataIndex: 'customer',
+          width: 250,
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+        {
+          title: '存货名称',
+          dataIndex: 'inventoryName',
+          width: 150,
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+        {
+          title: '颜色',
+          dataIndex: 'colour',
+          width: 120,
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+        {
+          title: '采购/委外订单号',
+          dataIndex: 'spurOrSubOrder',
+          width: 200,
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+
+
+        {
+          title: '工厂单价',
+          dataIndex: 'factoryUnitPrice',
+          width: 120,
+          className: 'replacecolor'
+        },
+        
+        {
+          title: '箱数',
+          dataIndex: 'totalBoxes',
+          width: 90,
+          className: 'replacecolor'
+        },
+        {
+          title: '数量(按合并规则累计)',
+          dataIndex: 'total',
+          width: 200,
+          className: 'replacecolor'
+        },
+        {
+          title: '订单类型',
+          dataIndex: 'orderType',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '集装箱代号',
+          dataIndex: 'containerCode',
+          width: 120,
+          className: 'replacecolor'
+        },
+
+        {
+          title: '集装箱号',
+          dataIndex: 'containerNumber',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '总净重',
+          dataIndex: 'totalNetWeight',
+          width: 90,
+          className: 'replacecolor'
+        },
+        {
+          title: '总毛重',
+          dataIndex: 'totalGrossWeight',
+          width: 90,
+          className: 'replacecolor'
+        },
+
+        {
+          title: '总体积',
+          dataIndex: 'totalVolume',
+          width: 90,
+          className: 'replacecolor'
+        },
+        {
+          title: '总价',
+          dataIndex: 'totalPrice',
+          width: 90,
+          className: 'replacecolor'
+        },
+      ],
+      advancePackingListData: [],
+       pagination: {
+        // total: '',
+        // current: 0,
+        // pageSize: 0
+      },
+
+      // orderDataform: this.$form.createForm(this),
+      confirmLoading: false,
+      referencePrePacklist: false
+    }
+  },
+  // 接收父组件 方法
+  props: {
+    father: {
+      type: Function,
+      default: null
+    }
+  },
+  created() {
+  },
+  methods: {
+    //参考数据
+    getAdvancePackingListData() {
+       this.$nextTick(() => {
+        //if (this.queryParam.preDeliveryDate != undefined && this.queryParam.preDeliveryDate != "")
+        orderSpltList(this.queryParam).then(res => {
+          if (res.success) {
+            this.advancePackingListData = res.result.records;
+            this.pagination = {
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+          }else {
+            that.$message.error(res.message);
+          }
+        })
+      })
+    },
+  
+
+    // 弹框查询按钮
+    searchQuery() {
+       this.queryParam.pageNo = 1
+       this.getAdvancePackingListData()
+    },
+    // 重置
+    searchReset() {
+      this.queryParam = {}
+      this.getAdvancePackingListData()
+      // this.getShipmentList()
+    },
+    // 弹框确定
+    onSubmit() {
+      if (this.selectedRowKeys.length == 0) {
+        this.$message.error('请选择数据');
+      } else if(this.selectedRowKeys.length == 1){
+        this.$emit('callback', this.selectedRowKeys);
+        this.referencePrePacklist = false;
+        this.selectedRowKeys = [];
+      }else {
+        this.$message.error('只能选择一行数据!');
+      }
+    },
+
+    close() {
+      this.$emit('close')
+      this.referencePrePacklist = false
+    },
+    handleCancel() {
+      this.selectedRowKeys = [];
+      this.close()
+    },
+    handleTableChange(pagination, filters, sorter) {
+        this.queryParam.pageNo = pagination.current
+        this.getAdvancePackingListData()
+    },
+    // 选中行
+    onSelectChange(keys, rows) {
+      this.selectedRowKeys = keys;
+      console.log(rows)
+      debugger
+    },
+    deliveryDateChange(value, dateString) {
+      this.queryParam.preDeliveryDate = dateString
+    },
+
+  },
+  computed: {
+  }
+}
+</script>
+<style lang="less" scoped>
+@import '~@assets/less/common.less';
+@import '~@assets/less/overwriter.less';
+/deep/ .ant-table-thead > tr > th {
+  text-align: center;
+  // font-weight: 700;
+}
+
+/deep/ .ant-table-tbody {
+  text-align: center;
+}
+
+// /deep/ th.replacecolor {
+//   background-color: #ccc;
+// }
+</style>