Browse Source

单证-预装箱单-部分接口等

liangy 2 years ago
parent
commit
ecdd717f4d

+ 13 - 0
src/api/document/advance-packingList.js

@@ -1 +1,14 @@
 /** 单证 -- 预装箱单 预装箱单 - 成衣 **/
+import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
+
+// 分页列表查询
+const getadPaList = params => getAction('/spapl/syPreAssembledPackingList/list', params)
+
+// 详情
+const itemByMainId = params => getAction('/spapl/syPreAssembledPackingList/querySyPreAssembledPackingListItemByMainId', params)
+
+
+//  删除
+const deleteAdPaList = params => deleteAction('/spapl/syPreAssembledPackingList/delete', params)
+
+export { getadPaList, deleteAdPaList,itemByMainId }

+ 274 - 85
src/views/advance-packingList/adPaList-clothes.vue

@@ -8,20 +8,19 @@
           <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.styleNum"></a-input>
+                <a-input placeholder="请输入款号" v-model="queryParam.itemNumber"></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.productName"></a-input>
               </a-form-item>
             </a-col>
 
@@ -45,7 +44,7 @@
         <a-button type="primary" icon="download" @click="handleExportXls('预装箱单-成衣')">导出</a-button>
 
         <a-upload
-          name="file"
+          productName="file"
           :showUploadList="false"
           :multiple="false"
           :headers="tokenHeader"
@@ -64,41 +63,106 @@
         :columns="adPaListClothesColumns"
         :data-source="adPaListClothesData"
         :loading="loading"
-        :pagination="ipagination"
+        :pagination="pagination"
         :row-key="record => record.id"
         :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
         @change="handleTableChange"
         :scroll="{ x: 1500 }"
       >
         <!-- 推送状态 -->
-        <!-- slot-scope="text, record" -->
-        <span slot="pushStateSlot">
-          <!-- v-if="record.isRelease == '0'" -->
-          <a-tag color="#f50">未推送</a-tag>
-          <!-- <a-tag color="#87d068" v-else>已发布</a-tag> -->
+        <span slot="pushStatesSlot" slot-scope="text, record">
+          <a-tag color="#2db7f5" v-if="record.pushStatus == '0'">未推送</a-tag>
+          <a-tag color="#87d068" v-if="record.pushStatus == '1'">推送成功</a-tag>
+          <a-tag color="#f50" v-if="record.pushStatus == '2'">推送失败</a-tag>
         </span>
 
         <!-- 单据状态 -->
-        <span slot="documentStateSlot">
-          <a-tag color="#2db7f5">已保存</a-tag>
+        <span slot="statusSlot" slot-scope="text, record">
+          <a-tag color="orange" v-if="record.status == '0'">已保存</a-tag>
+          <a-tag color="green" v-if="record.status == '1'">已提交</a-tag>
         </span>
 
-        <!-- 操作 -->
+        <!-- 操作 默认按钮  未提交未推送-->
         <span slot="operationSlot" slot-scope="text, record">
-          <a @click="derive(record)" style="color:green;">导出</a>
+          <a href="javascript:void(0);" @click="itemXls('')" style="color:green">导出</a>
+
           <a-divider type="vertical" />
+
           <a-dropdown>
-            <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
-            <a-menu slot="overlay">
-              <a-menu-item><a @click="submit(record)">提交</a></a-menu-item>
-              <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
-              <a-menu-item><a @click="edit(record)">编辑</a></a-menu-item>
+            <a class="ant-dropdown-link">更多<a-icon type="down"/></a>
+            <!-- 已保存 -->
+            <a-menu slot="overlay" v-if="record.status == '0'">
+              <a-menu-item>
+                <a @click="details(record)">详情</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a @click="edit(record)">编辑</a>
+              </a-menu-item>
+
               <a-menu-item>
-                <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
+                <a-popconfirm title="确定提交吗?" ok-text="是" cancel-text="否" @confirm="submit(record)">
+                  <a href="javascript:void(0);" style="color:green;">提交</a>
+                </a-popconfirm>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record)">
                   <a href="javascript:void(0);" style="color:red;">删除</a>
                 </a-popconfirm>
               </a-menu-item>
-              <a-menu-item><a @click="copy(record)">复制</a></a-menu-item>
+            </a-menu>
+
+            <!-- 已提交 且 推送成功   -->
+            <a-menu slot="overlay" v-if="record.pushStatus == '1' && record.status == '1'">
+              <a-menu-item>
+                <a @click="details(record)">详情</a>
+              </a-menu-item>
+            </a-menu>
+
+            <!-- 已提交 且 推送失败  -->
+            <a-menu slot="overlay" v-if="record.pushStatus == '2' && record.status == '1'">
+              <a-menu-item>
+                <a @click="details(record)">详情</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a-popconfirm title="确定重新推送吗?" ok-text="是" cancel-text="否" @confirm="rePush(record)">
+                  <a href="javascript:void(0);" style="color:green;">重新推送</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+
+            <!-- 已提交 -->
+            <a-menu slot="overlay" v-if="record.status == '1'">
+              <a-menu-item>
+                <a @click="details(record)">详情</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a-popconfirm title="确定取消提交吗?" ok-text="是" cancel-text="否" @confirm="cancelSubmit(record)">
+                  <a href="javascript:void(0);" style="color:red;">取消提交</a>
+                </a-popconfirm>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push(record)">
+                  <a href="javascript:void(0);" style="color:green;">推送</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+
+            <!-- 未推送 -->
+            <a-menu slot="overlay" v-if="record.pushStatus == '0'">
+              <a-menu-item>
+                <a @click="details(record)">详情</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push(record)">
+                  <a href="javascript:void(0);" style="color:green;">推送</a>
+                </a-popconfirm>
+              </a-menu-item>
             </a-menu>
           </a-dropdown>
         </span>
@@ -107,9 +171,11 @@
 
     <!-- 抽屉 -->
     <div>
+      <detailsAdpacking-drawer ref="detailsAdpackingDrawer" @ok="modalFormOk"></detailsAdpacking-drawer>
+
       <addAdpacking-drawer ref="addAdpackingDrawer" :father="aa" @ok="modalFormOk"></addAdpacking-drawer>
-      <detailsAdpacking-drawer ref="detailsAdpackingDrawer" :father="bb" @ok="modalFormOk"></detailsAdpacking-drawer>
-      <editAdpacking-drawer ref="editAdpackingDrawer" :father="cc" @ok="modalFormOk"></editAdpacking-drawer>
+
+      <editAdpacking-drawer ref="editAdpackingDrawer" @ok="modalFormOk"></editAdpacking-drawer>
     </div>
   </div>
 </template>
@@ -122,27 +188,31 @@ import addAdpackingDrawer from '@views/advance-packingList/addAdpackingDrawer.vu
 import detailsAdpackingDrawer from '@views/advance-packingList/detailsAdpackingDrawer.vue'
 import editAdpackingDrawer from '@views/advance-packingList/editAdpackingDrawer.vue'
 
+import { getadPaList, itemByMainId } from '@api/document/advance-packingList.js'
+
 export default {
-  name: 'AdPaListClothes', // 预装线单-成衣
+  productName: 'AdPaListClothes', // 预装线单-成衣
   mixins: [JeecgListMixin],
   components: { JEllipsis, moment, addAdpackingDrawer, detailsAdpackingDrawer, editAdpackingDrawer },
 
   data() {
     let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
     return {
+      loading: false, // 表格加载
+      id: '',
       // 表头
       adPaListClothesColumns: [
         {
           title: '款号',
-          dataIndex: 'styleNum',
+          dataIndex: 'itemNumber',
           width: 120,
           fixed: 'left',
           className: 'replacecolor'
         },
         {
-          title: '客户简称',
-          dataIndex: 'customerShortName',
-          width: 120,
+          title: '客户(简称)',
+          dataIndex: 'customer',
+          width: 100,
           fixed: 'left',
           className: 'replacecolor'
         },
@@ -159,7 +229,7 @@ export default {
         {
           title: '小po',
           dataIndex: 'smallPo',
-          width: 120,
+          width: 100,
           className: 'replacecolor'
         },
         {
@@ -178,46 +248,113 @@ export default {
         {
           title: '颜色',
           dataIndex: 'color',
-          width: 120,
+          width: 180,
           className: 'replacecolor'
         },
         {
           title: '采购/委外订单号',
           dataIndex: 'purchaseAboardOrderNum',
-          width: 160,
+          width: 220,
           className: 'replacecolor'
         },
         {
           title: '订单类型',
           dataIndex: 'orderType',
+          width: 100,
+          className: 'replacecolor'
+        },
+        {
+          title: '工厂单价',
+          dataIndex: 'aa',
+          width: 100,
+          className: 'replacecolor'
+        },
+        {
+          title: '数量(按合并规则累计)',
+          dataIndex: 'bb',
+          width: 200,
+          className: 'replacecolor'
+        },
+        {
+          title: '箱数',
+          dataIndex: 'boxNumber',
+          width: 100,
+          className: 'replacecolor'
+        },
+
+        {
+          title: '总净重',
+          dataIndex: 'totalNetWeight',
+          width: 100,
+          className: 'replacecolor'
+        },
+        {
+          title: '总毛重',
+          dataIndex: 'totalGrossWeight',
+          width: 100,
+          className: 'replacecolor'
+        },
+        {
+          title: '总体积',
+          dataIndex: 'totalVolume',
+          width: 100,
+          className: 'replacecolor'
+        },
+        {
+          title: '总价',
+          dataIndex: 'totalPrice',
+          width: 100,
+          className: 'replacecolor'
+        },
+        {
+          title: '集装箱代号',
+          dataIndex: 'containerCode',
           width: 120,
           className: 'replacecolor'
         },
         {
-          title: '原因',
-          dataIndex: 'reason',
+          title: '集装箱号',
+          dataIndex: 'containerNumber',
           width: 120,
-          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+        {
+          title: '预托书号',
+          dataIndex: 'depositaryReceiptNo',
+          width: 100,
+          className: 'replacecolor'
+        },
+        {
+          title: '成衣工厂',
+          dataIndex: 'garmentFactory',
+          width: 160,
           className: 'replacecolor'
         },
         {
           title: '推送状态',
-          dataIndex: 'pushState',
+          dataIndex: 'pushStatus',
           width: 90,
-          scopedSlots: { customRender: 'pushStateSlot' },
+          scopedSlots: { customRender: 'pushStatesSlot' },
           fixed: 'right',
           className: 'replacecolor'
         },
 
         {
           title: '单据状态',
-          dataIndex: 'documentState',
+          dataIndex: 'status',
           width: 90,
-          scopedSlots: { customRender: 'documentStateSlot' },
+          scopedSlots: { customRender: 'statusSlot' },
           fixed: 'right',
           className: 'replacecolor'
         },
-
+        {
+          title: '备注(原因)',
+          dataIndex: 'memo',
+          width: 220,
+          fixed: 'right',
+          customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
         {
           title: '操作',
           dataIndex: 'operation',
@@ -227,32 +364,96 @@ export default {
           className: 'replacecolor'
         }
       ],
-      adPaListClothesData: [{}, {}, {}, {}],
-      selectedRowKeys: [], // 勾选航
-      loading: false, // 表格加载
+      adPaListClothesData: [],
 
       // 查询条件
       queryParam: {
-        orderNum: '',
-        styleNum: '',
-        name: '' // 品名
+        pageNo: '',
+        orderNumber: '',
+        itemNumber: '',
+        productName: '' // 品名
       },
-      url: {
-        // syncUser: '/act/process/extActProcess/doSyncUser',
-        list: '/sys/user/list',
-        // delete: '/sys/user/delete',
-        // deleteBatch: '/sys/user/deleteBatch',
-        exportXlsUrl: '/sys/user/exportXls', // 导出
-        importExcelUrl: 'sys/user/importExcel' // 导入
-      }
+      // 分页
+      pagination: {
+        // total: '',
+        // current: 0,
+        // pageSize: 0
+      },
+      selectedRowKeys: [], // 勾选航
+      dateFormat: 'YYYY-MM-DD'
     }
   },
   created() {
-    // this.getAdPaListClothes()
+    this.getadPaListClothes()
   },
   methods: {
-    // 第一行导出
-    handleExportXls() {},
+    // 分页查询 预装箱单-成衣
+    getadPaListClothes() {
+      this.$nextTick(() => {
+        getadPaList(this.queryParam).then(res => {
+          if (res.success) {
+            this.adPaListClothesData = res.result.records
+            console.log('预装箱单-成衣列表', this.adPaListClothesData)
+            this.pagination = {
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+          }
+        })
+      })
+    },
+    //  详情
+    details(record) {
+      console.log('点击的record', record)
+      this.$refs.detailsAdpackingDrawer.visible = true
+      itemByMainId({ id: record.id }).then(res => {
+        if (res.success) {
+          // console.log('点击的对象', res.result)
+          // 把通过id查询到的对象,赋值给子组件
+          this.$refs.detailsAdpackingDrawer.detailsAdpacking = record
+          this.$refs.detailsAdpackingDrawer.data = res.result.adPaListClothesData
+        }
+      })
+    },
+
+    //  删除
+    handleDelete(record) {
+      console.log('点击删除项id:', record.id)
+      this.$nextTick(() => {
+        deleteAdPaList({ id: record.id }).then(res => {
+          console.log('res:', res)
+          this.getadPaListClothes()
+          this.$message.success('删除成功')
+        })
+      })
+    },
+    // 导出
+    handleExportXls(fileName) {
+      console.log('需导出的fileName:', fileName)
+      const params = this.dyeLossRateData
+      console.log('导出参数', params)
+      // downFile('/scas/dyeLoss/excel', params).then(data => {
+      //   console.log('888')
+      //   if (!data) {
+      //     this.$message.warning('文件下载失败')
+      //     return
+      //   }
+      //   if (typeof window.navigator.msSaveBlob !== 'undefined') {
+      //     window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
+      //   } else {
+      //     let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
+      //     let link = document.createElement('a')
+      //     link.style.display = 'none'
+      //     link.href = url
+      //     link.setAttribute('download', fileName + '.xls')
+      //     document.body.appendChild(link)
+      //     link.click()
+      //     document.body.removeChild(link) // 下载完成移除元素
+      //     window.URL.revokeObjectURL(url) // 释放掉blob对象
+      //   }
+      // })
+    },
 
     // 新增 预装箱单
     addAdpackingDrawer() {
@@ -262,55 +463,43 @@ export default {
 
     // 第二行 查询按钮
     searchQuery() {
-      // this.getAnnList() // 渲染公告
+      this.getadPaListClothes()
     },
     // 重置
     searchReset() {
-      // console.log('>>>>重置')
       this.queryParam = {}
-      // this.getAnnList()
+      this.getadPaListClothes()
     },
 
-    // 操作 导出
-    derive() {},
-    // 操作 提交
+    // 操作 单条数据导出
+    itemXls() {},
+    //  提交
     submit() {},
-    // 操作 详情
-    details(record) {
-      console.log('详情')
-      console.log('点击的record', record.id)
-      this.$refs.detailsAdpackingDrawer.visible = true
-    },
 
-    // 操作 编辑
+    //  编辑
     edit(record) {
       console.log('编辑')
       this.$refs.editAdpackingDrawer.visible = true
     },
 
-    // 操作 删除
-    handleDelete() {},
-
     // 选中行
     onSelectChange(keys, rows) {
       this.selectedRowKeys = keys
       this.selectedRows = rows
     },
-    // --------------------------------------
-    aa() {},
-    bb() {},
-    cc() {}
-    // 分页、排序、筛选变化时触发
-    // handleTableChange(pagination, filters, sorter) {
-    //   // console.log('当前页信息>>>>',pagination)
-    //   this.queryParam.pageNo = pagination.current
-    //   // this.getAnnList()
-    // }
+
+    handleTableChange(pagination, filters, sorter) {
+      // console.log('当前页信息>>>>',pagination)
+      this.queryParam.pageNo = pagination.current
+      this.getadPaListClothes()
+    },
+    aa() {}
   },
+
   computed: {
     // 导入
-    importExcelUrl: function() {
-      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
+    importExcelUrl() {
+      //   return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
     },
     // 选中项
     rowSelection() {

+ 25 - 46
src/views/advance-packingList/detailsAdpackingDrawer.vue

@@ -1,84 +1,63 @@
 <template>
   <!-- 详情 预装箱单 回显信息,有文本框-->
-  <div id="detailsAdvancePacking">
-    <a-drawer
-      title="详情"
-      width="89%"
-      placement="right"
-      :closable="true"
-      :visible="visible"
-      @close="handleCancel">
+  <div id="detailsAdpackingDrawer">
+    <a-drawer title="详情" width="89%" placement="right" :closable="true" :visible="visible" @close="handleCancel">
       <!-- 主表信息 展示 -->
       <a-card :bordered="true">
         <div class="table-page-search-wrapper">
-          <a-form-model layout="inline" ref="form" :model="addAdpacking">
+          <a-form-model layout="inline" ref="form">
             <a-row :gutter="24">
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="订单号" prop="orderNum">
-                  AQ7484
-                  <!-- <a-input placeholder="请输入订单号" v-model="addAdpacking.orderNum"></a-input> -->
+                  {{ detailsAdpacking.orderNum }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="款号" prop="styleNum">
-                  HY273764
-                  <!-- <a-input placeholder="请输入款号" v-model="addAdpacking.styleNum"></a-input> -->
+                  {{ detailsAdpacking.itemNumber }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="品名" prop="name">
-                  品名1
-                  <!-- <a-input placeholder="请输入品名" v-model="addAdpacking.name"></a-input> -->
+                  {{ detailsAdpacking.productName }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="尺码范围" prop="sizeRange">
-                  S-3XL
-                  <!-- <a-input placeholder="请输入尺码范围" v-model="addAdpacking.sizeRange"></a-input> -->
-                  <!-- <a-select placeholder="请选择尺码范围">
-                <a-select-option value="">请选择</a-select-option>
-                <a-select-option value="0">客户1</a-select-option>
-                <a-select-option value="1">客户2</a-select-option>
-                <a-select-option value="2">客户3</a-select-option>
-              </a-select> -->
+                  {{ detailsAdpacking.sizeRange }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="客户" prop="customer">
-                  客户2
-                  <!-- <a-input placeholder="请输入客户" v-model="addAdpacking.customer"></a-input> -->
+                  {{ detailsAdpacking.customer }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="集装箱代号" prop="containerCode">
-                  HY890
-                  <!-- <a-input placeholder="请输入集装箱代号" v-model="addAdpacking.containerCode"></a-input> -->
+                  {{ detailsAdpacking.containerCode }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="集装箱号" prop="containerNo">
-                  HY890765
-                  <!-- <a-input placeholder="请输入集装箱号" v-model="addAdpacking.containerNo"></a-input> -->
+                <a-form-model-item label="集装箱号" prop="containerNumber">
+                  {{ detailsAdpacking.containerNumber }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="备注" prop="note">
-                  备注测试
-                  <!-- <a-input placeholder="请输入备注" v-model="addAdpacking.note"></a-input> -->
+                <a-form-model-item label="备注" prop="aa">
+                  {{ detailsAdpacking.aa }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="成衣工厂" prop="clothesFactory">
-                  成衣工厂32
-                  <!-- <a-input placeholder="请输入成衣工厂" v-model="addAdpacking.clothesFactory"></a-input> -->
+                <a-form-model-item label="成衣工厂" prop="garmentFactory">
+                  {{ detailsAdpacking.garmentFactory }}
                 </a-form-model-item>
               </a-col>
             </a-row>
@@ -112,7 +91,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 
 export default {
-  name: 'DetailsAdvancePacking', // 详情
+  name: 'DetailsAdpackingDrawer', // 详情
   mixins: [JeecgListMixin],
   components: { JEllipsis },
   data() {
@@ -129,7 +108,7 @@ export default {
         },
         {
           title: '成衣工厂',
-          dataIndex: 'clothesFactory',
+          dataIndex: 'garmentFactory',
           width: 120,
           fixed: 'left',
           className: 'replacecolor'
@@ -245,7 +224,7 @@ export default {
         },
         {
           title: '箱数',
-          dataIndex: 'boxes',
+          dataIndex: 'boxNumber',
           width: 140,
           className: 'replacecolor'
         },
@@ -264,7 +243,7 @@ export default {
         },
         {
           title: '总净重',
-          dataIndex: 'totalSuttle',
+          dataIndex: 'totalNetWeight',
           width: 140,
           className: 'replacecolor'
         },
@@ -277,7 +256,7 @@ export default {
         },
         {
           title: '总毛重',
-          dataIndex: 'totalRoughWeigh',
+          dataIndex: 'totalGrossWeight',
           width: 140,
           className: 'replacecolor'
         },
@@ -321,23 +300,23 @@ export default {
         },
         {
           title: '总价',
-          dataIndex: 'totalPrices',
+          dataIndex: 'totalPrice',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '备注(U8)',
-          dataIndex: 'note',
+          dataIndex: 'memo',
           width: 140,
           fixed: 'right',
           className: 'replacecolor'
         }
       ],
 
-      data: [{}, {}, {}, {}, {}],
+      data: [], //子表信息
       loading: false, // 表格加载
       visible: false,
-      addAdpacking: {},
+      detailsAdpacking: {}, //主表信息
       confirmLoading: false
     }
   },
@@ -353,7 +332,7 @@ export default {
     close() {
       this.$emit('close')
       this.visible = false
-      this.$refs.form.resetFields()
+      // this.$refs.form.resetFields()
     },
     aa() {},
     modalFormOk() {}

+ 5 - 11
src/views/advance-packingList/editAdpackingDrawer.vue

@@ -1,17 +1,11 @@
 <template>
   <!-- 编辑 预装箱单 回显信息,有文本框-->
   <div id="editAdvancePacking">
-    <a-drawer
-      title="编辑"
-      width="89%"
-      placement="right"
-      :closable="true"
-      :visible="visible"
-      @close="handleCancel">
-      <!-- 主表信息 填写 -->
+    <a-drawer title="编辑" width="89%" placement="right" :closable="true" :visible="visible" @close="handleCancel">
+      <!-- 主表信息 填写 :rules="validatorRules" -->
       <a-card :bordered="true">
         <div class="table-page-search-wrapper">
-          <a-form-model layout="inline" ref="form" :model="addAdpacking" :rules="validatorRules">
+          <a-form-model layout="inline" ref="form" :model="addAdpacking">
             <a-row :gutter="24">
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="订单号" prop="orderNum">
@@ -84,9 +78,9 @@
           <a-button type="primary" @click="handleAddColumn" icon="plus" style="margin-left: 20px">増行</a-button>
         </div>
 
-        <!-- 子表 -->
+        <!-- 子表 :rules="validatorRules"-->
         <a-spin :spinning="confirmLoading">
-          <a-form-model ref="formRef" :rules="validatorRules">
+          <a-form-model ref="formRef">
             <a-table
               bordered
               rowKey="id"

+ 0 - 3
src/views/shipment-details/declareElementsModal.vue

@@ -1,8 +1,5 @@
 <template>
   <div id="declareElementsModal">
-    <!-- @ok="onSubmit"      keyboard="{false}"
-      destroyOnClose="{true}"
-      maskClosabl="{true}" -->
     <a-modal
       title="报关要素"
       v-model="declareElementsModVis"

+ 2 - 8
src/views/shipment-details/shipmentList.vue

@@ -252,7 +252,7 @@ export default {
           title: '单据号',
           dataIndex: 'documentNo',
           fixed: 'left',
-          width: 120,
+          width: 140,
           className: 'replacecolor'
         },
         {
@@ -491,11 +491,7 @@ export default {
     },
     // 分页变化时触发
     handleTableChange(pagination, filters, sorter) {
-      console.log('分页器信息', pagination)
-      if (Object.keys(sorter).length > 0) {
-        this.isorter.column = sorter.field
-        this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
-      }
+      // console.log('分页器信息', pagination)
       this.queryParam.pageNo = pagination.current
       this.getShipmentList()
     },
@@ -540,9 +536,7 @@ export default {
 
     // 操作 详情
     details(record) {
-      console.log('00')
       this.$refs.detailsShipDetDrawer.visible = true
-      console.log('11')
       // console.log('点击项的ID', record.id)
       shipmentQueryById({ id: record.id }).then(res => {
         if (res.success) {