Explorar o código

装箱单面料参照数据分页查询,勾选

jbb %!s(int64=2) %!d(string=hai) anos
pai
achega
28d6ed02b9

+ 35 - 9
src/views/packing-list/packinglist-fabrics/addFabricDrawer.vue

@@ -9,13 +9,13 @@
             <a-row :gutter="24">
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="单号" prop="oddNum">
-                  <a-input placeholder="请输入单号" v-model="addFabric.oddNum"></a-input>
+                  <a-input placeholder="请输入单号" v-model="addFabric.documentNo"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="集装箱号" prop="styleNum">
-                  <a-input placeholder="请输入集装箱号" v-model="addFabric.containerNo"></a-input>
+                  <a-input placeholder="请输入集装箱号" v-model="addFabric.containerNumber"></a-input>
                 </a-form-model-item>
               </a-col>
 
@@ -25,14 +25,14 @@
                     placeholder="请选择装柜日期"
                     :format="dateFormat"
                     style="width: 100%"
-                    v-model="addFabric.loadingDate"
+                    v-model="addFabric.latestDateOfShipment"
                   />
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="成衣工厂" prop="clothesFactory">
-                  <a-input placeholder="请输入成衣工厂" v-model="addFabric.clothesFactory"></a-input>
+                  <a-input placeholder="请输入成衣工厂" v-model="addFabric.garmentFactory"></a-input>
                   <!-- <a-select placeholder="请选择成衣工厂">
                 <a-select-option value="">请选择</a-select-option>
                 <a-select-option value="0">成衣工厂1</a-select-option>
@@ -44,7 +44,7 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="发票号" prop="invoiceNum">
-                  <a-input placeholder="请输入发票号" v-model="addFabric.invoiceNum"></a-input>
+                  <a-input placeholder="请输入发票号" v-model="addFabric.invoiceNo"></a-input>
                 </a-form-model-item>
               </a-col>
 
@@ -73,13 +73,13 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="托书号" prop="bookNum">
-                  <a-input placeholder="请输入托书号" v-model="addFabric.bookNum"></a-input>
+                  <a-input placeholder="请输入托书号" v-model="addFabric.shippingOrderNumber"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="备注" prop="note">
-                  <a-input placeholder="请输入备注" v-model="addFabric.note"></a-input>
+                  <a-input placeholder="请输入备注" v-model="addFabric.remarks"></a-input>
                 </a-form-model-item>
               </a-col>
             </a-row>
@@ -141,12 +141,13 @@
     </a-drawer>
 
     <!-- 参照发运明细弹框 -->
-    <referShipDetails-modal ref="referShipDetailsModal" :father="aa" @ok="modalFormOk"></referShipDetails-modal>
+    <referShipDetails-modal ref="referShipDetailsModal" :father="aa" @callback="getFabricData" @ok="modalFormOk"></referShipDetails-modal>
   </div>
 </template>
 
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { getShippingDetailId} from '@api/document/packing-list/packinglist-fabrics'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import referShipDetailsModal from '@views/packing-list/packinglist-fabrics/referShipDetailsModal.vue'
 
@@ -391,7 +392,7 @@ export default {
           className: 'replacecolor'
         }
       ],
-      addFabricData: [{}, {}, {}],
+      addFabricData: [],
       loading: false, // 表格加载
       addFabric: {},
       visible: false,
@@ -411,6 +412,31 @@ export default {
     referadvancePackingList() {
       console.log('打开参照发运明细 弹框')
       this.$refs.referShipDetailsModal.referShipDetailsModVis = true
+      this.$refs.referShipDetailsModal.searchQuery()
+    },
+    getFabricData(rowsId) {
+      this.addFabric = {}
+      this.addFabricData = []
+      var ids = rowsId.toString(rowsId)
+      getShippingDetailId({ids:ids}).then(res => {
+          if (res.success) {
+            var data = res.result
+            this.addFabric ={
+              containerNumber : data.containerNumber,
+              latestDateOfShipment : data.latestDateOfShipment,
+              garmentFactory : data.garmentFactory,
+              invoiceNo : data.invoiceNo,
+              preparedBy : data.preparedBy,
+              preparedDate : data.preparedDate,
+              exportInvoiceNo : data.exportInvoiceNo,
+              shippingOrderNumber : data.shippingOrderNumber,
+              remarks : data.remarks
+            }
+            this.addFabricData = data.syPackingListFabricItem
+          }else {
+            this.$message.error(res.message);
+          }
+        })
     },
     // 増行
     handleAddColumn() {

+ 66 - 34
src/views/packing-list/packinglist-fabrics/referShipDetailsModal.vue

@@ -17,13 +17,13 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="订单号">
-                <a-input placeholder="请输入订单号" v-model="queryParam.orderNum"></a-input>
+                <a-input placeholder="请输入订单号" v-model="queryParam.orderNumber"></a-input>
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-item label="品名">
-                <a-input placeholder="请输入品名" v-model="queryParam.name"></a-input>
+                <a-input placeholder="请输入品名" v-model="queryParam.chineseName"></a-input>
               </a-form-item>
             </a-col>
 
@@ -46,7 +46,7 @@
         :columns="referShipDetailsColumns"
         :data-source="referShipDetailsData"
         :loading="loading"
-        :pagination="ipagination"
+        :pagination="pagination"
         :row-key="record => record.id"
         :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
         @change="handleTableChange"
@@ -61,6 +61,7 @@
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
+import { referenceList} from '@api/document/packing-list/packinglist-fabrics'
 import moment from 'moment'
 export default {
   name: 'ReferShipmentDetailsModal',
@@ -76,14 +77,14 @@ export default {
       referShipDetailsColumns: [
         {
           title: '单据号',
-          dataIndex: 'documentNum',
+          dataIndex: 'documentNo',
           width: 120,
           fixed: 'left',
           className: 'replacecolor'
         },
         {
           title: '销售订单号',
-          dataIndex: 'saleOrderNo',
+          dataIndex: 'orderNumber',
           width: 120,
           fixed: 'left',
           className: 'replacecolor'
@@ -91,13 +92,13 @@ export default {
 
         {
           title: '客户简称',
-          dataIndex: 'customerShortName',
+          dataIndex: 'customerAbbreviation',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '部门',
-          dataIndex: 'department',
+          dataIndex: 'pushState',
           width: 120,
           className: 'replacecolor'
         },
@@ -128,7 +129,7 @@ export default {
         },
         {
           title: '款号',
-          dataIndex: 'styleNum',
+          dataIndex: 'itemNumber',
           width: 120,
           className: 'replacecolor'
         },
@@ -143,14 +144,14 @@ export default {
         // },
         {
           title: '预发货日期',
-          dataIndex: 'scheduledShipDate',
+          dataIndex: 'preDeliveryDate',
           width: 120,
           className: 'replacecolor'
         },
 
         {
           title: '计划到货日期',
-          dataIndex: 'plannedArrivalDate',
+          dataIndex: 'preCompletionDate',
           width: 120,
           className: 'replacecolor'
         },
@@ -162,20 +163,20 @@ export default {
         },
         {
           title: '数量(合计)',
-          dataIndex: 'quantity',
+          dataIndex: 'shipmentQuantity',
           width: 120,
           className: 'replacecolor'
         },
 
         {
           title: '单价(销售)',
-          dataIndex: 'price',
+          dataIndex: 'salesUnitPrice',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '采购/委外订单号',
-          dataIndex: 'purchaseAboardOrderNum',
+          dataIndex: 'purOrSubOrder',
           width: 120,
           className: 'replacecolor'
         },
@@ -187,13 +188,13 @@ export default {
         },
         {
           title: '工厂单价(采购/委外单价)',
-          dataIndex: 'factoryPrice',
+          dataIndex: 'factoryUnitPrice',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '申报要素(单证维护)',
-          dataIndex: 'declareElements',
+          dataIndex: 'declarationElements',
           width: 140,
           customRender: t => ellipsis(t),
           className: 'replacecolor'
@@ -201,7 +202,7 @@ export default {
 
         {
           title: '套装件数(存货自定义项)',
-          dataIndex: 'suitQuantity',
+          dataIndex: 'numberOfSets',
           width: 120,
 
           className: 'replacecolor'
@@ -214,45 +215,47 @@ export default {
         },
         {
           title: 'HScode',
-          dataIndex: 'HScode',
+          dataIndex: 'hsCode',
           width: 120,
           className: 'replacecolor'
         },
 
         {
           title: '中文品名',
-          dataIndex: 'chineseProName',
+          dataIndex: 'chineseName',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '英文品名',
-          dataIndex: 'englishProName',
+          dataIndex: 'englishProductName',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '成衣工厂',
-          dataIndex: 'clothesFactory',
+          dataIndex: 'garmentFactory',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '报关单价',
-          dataIndex: 'declarationPrice',
+          dataIndex: 'customsDeclarationUnitPrice',
           width: 120,
           className: 'replacecolor'
         }
       ],
-      referShipDetailsData: [{}, {}, {}],
+      referShipDetailsData: [],
       confirmLoading: false,
       referShipDetailsModVis: false,
 
       // 查询条件
       queryParam: {
-        orderNum: '',
-        name: ''
-      }
+        orderNumber: '',
+        chineseName: '',
+        pageNo: '' // 初始页
+      },
+      pagination: {}
     }
   },
   // 接收父组件 方法
@@ -264,32 +267,61 @@ export default {
   },
   created() {},
   methods: {
+    getReferenceList() {
+      this.$nextTick(() => {
+        referenceList(this.queryParam).then(res => {
+          if (res.success) {
+            this.referShipDetailsData = res.result.records;
+            this.pagination = {
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+          }else{
+              this.$message.error(res.message);
+          }
+        })
+      })
+    },
     // 弹框查询按钮
-    searchQuery() {},
+    searchQuery() {
+       this.queryParam.pageNo = ''
+       this.getReferenceList()
+    },
     // 重置
     searchReset() {
       this.queryParam = {}
+      this.getReferenceList()
       // this.getShipmentList()
     },
     // 弹框确定
-    onSubmit() {},
+    onSubmit() {
+       if (this.selectedRowKeys.length == 0) {
+        this.$message.error('请选择数据');
+      } else{
+        this.$emit('callback', this.selectedRowKeys);
+        this.referShipDetailsModVis = false;
+        var msg = "选中记录后,会清除编辑的内容。";
+        this.$message.info(msg);        
+        this.selectedRowKeys = [];
+      }
+    },
     close() {
       this.$emit('close')
-      this.visible = false
+      this.referShipDetailsModVis = false
     },
     handleCancel() {
+      this.selectedRowKeys = []
       this.close()
     },
     // 选中行
     onSelectChange(keys, rows) {
       this.selectedRowKeys = keys
-      this.selectedRows = rows
+    },
+    handleTableChange(pagination, filters, sorter) {
+      this.queryParam.pageNo = pagination.current
+      this.getReferenceList()
     }
-    // handleTableChange(pagination, filters, sorter) {
-    //   // console.log('当前页信息>>>>',pagination)
-    //   this.queryParam.pageNo = pagination.current
-    //   this.getAnnList()
-    // }
   },
   computed: {
     // 选中项