Browse Source

单证-成本分配汇总 列表详情页接口

liangy 2 years ago
parent
commit
103d437ed5

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

@@ -4,6 +4,10 @@ import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
 // 分页列表查询
 const getadPaList = params => getAction('/spapl/syPreAssembledPackingList/list', params)
 
+// 新增
+const addShipmentList = params => postAction('/spapl/syPreAssembledPackingList/add', params)
+
+
 // 详情
 const itemByMainId = params => getAction('/spapl/syPreAssembledPackingList/querySyPreAssembledPackingListItemByMainId', params)
 

+ 10 - 0
src/api/document/cost-allocation-total.js

@@ -1 +1,11 @@
 /** 单证 -- 成本分配汇总 **/
+
+import { getAction, postAction, deleteAction } from '@/api/manage'
+
+// 分页列表查询
+const costList = params => getAction('/cost/syCostAllocation/list', params)
+
+// 详情
+const costByPlanNum = params => getAction('/cost/syCostAllocation/queryByPlanNum', params)
+
+export { costList,costByPlanNum }

+ 39 - 39
src/views/advance-packingList/adPaList-clothes.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 预装箱单-成衣 -->
+  <!-- 预装箱单-成衣 列表-->
   <div id="adPaListClothes">
     <!-- 查询 -->
     <a-card :bordered="false">
@@ -54,7 +54,7 @@
           <a-button type="primary" icon="import">导入</a-button>
         </a-upload>
 
-        <a-button type="primary" @click="addAdpackingDrawer" icon="plus">新增</a-button>
+        <a-button type="primary" @click="addAdpacking" icon="plus">新增</a-button>
       </div>
 
       <!-- table rowKey="id" -->
@@ -368,10 +368,10 @@ export default {
 
       // 查询条件
       queryParam: {
-        pageNo: '',
-        orderNumber: '',
-        itemNumber: '',
-        productName: '' // 品名
+        // pageNo: '',
+        // orderNumber: '',
+        // itemNumber: '',
+        // productName: '' // 品名
       },
       // 分页
       pagination: {
@@ -393,7 +393,7 @@ export default {
         getadPaList(this.queryParam).then(res => {
           if (res.success) {
             this.adPaListClothesData = res.result.records
-            console.log('预装箱单-成衣列表', this.adPaListClothesData)
+            console.log('预装箱单-成衣', this.adPaListClothesData)
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
@@ -403,38 +403,19 @@ export default {
         })
       })
     },
-    //  详情
-    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('删除成功')
-        })
-      })
+    // 新增
+    addAdpacking() {
+      console.log('新增预装箱单')
+      this.$refs.addAdpackingDrawer.visible = true
     },
-    // 导出
+
+    // 列表导出
     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
@@ -455,18 +436,37 @@ export default {
       // })
     },
 
-    // 新增 预装箱单
-    addAdpackingDrawer() {
-      console.log('新增预装箱单')
-      this.$refs.addAdpackingDrawer.visible = true
+    //  详情
+    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('删除成功')
+        })
+      })
     },
 
-    // 第二行 查询按钮
     searchQuery() {
       this.queryParam.pageNo = '' //页码恢复
       this.getadPaListClothes()
     },
-    // 重置
+
     searchReset() {
       this.queryParam = {}
       this.getadPaListClothes()
@@ -518,7 +518,7 @@ export default {
       }
     }
   },
-  mounted() {}
+
 }
 </script>
 <style lang="less" scoped>

+ 85 - 79
src/views/advance-packingList/addAdpackingDrawer.vue

@@ -1,8 +1,8 @@
 <template>
-  <!-- 新增 预装箱单-->
+  <!-- 新增 预装箱单-成衣-->
   <div id="addAdvancePacking">
     <a-drawer
-      title="新增预装箱单"
+      title="新增预装箱单-成衣"
       width="89%"
       placement="right"
       :closable="true"
@@ -12,7 +12,8 @@
       <!-- 主表信息 填写 -->
       <a-card :bordered="false">
         <div class="table-page-search-wrapper">
-          <a-form-model layout="inline" ref="form" :model="addAdpacking" :rules="validatorRules">
+          <!-- :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">
@@ -21,14 +22,14 @@
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="款号" prop="styleNum">
-                  <a-input placeholder="请输入款号" v-model="addAdpacking.styleNum"></a-input>
+                <a-form-model-item label="款号" prop="itemNumber">
+                  <a-input placeholder="请输入款号" v-model="addAdpacking.itemNumber"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="品名" prop="name">
-                  <a-input placeholder="请输入品名" v-model="addAdpacking.name"></a-input>
+                <a-form-model-item label="品名" prop="productName">
+                  <a-input placeholder="请输入品名" v-model="addAdpacking.productName"></a-input>
                 </a-form-model-item>
               </a-col>
 
@@ -38,8 +39,6 @@
                   <!-- <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> -->
                 </a-form-model-item>
               </a-col>
@@ -57,20 +56,20 @@
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="集装箱号" prop="containerNo">
-                  <a-input placeholder="请输入集装箱号" v-model="addAdpacking.containerNo"></a-input>
+                <a-form-model-item label="集装箱号" prop="containerNumber">
+                  <a-input placeholder="请输入集装箱号" v-model="addAdpacking.containerNumber"></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="addAdpacking.note"></a-input>
+                <a-form-model-item label="备注" prop="memo">
+                  <a-input placeholder="请输入备注" v-model="addAdpacking.memo"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="成衣工厂" prop="clothesFactory">
-                  <a-input placeholder="请输入成衣工厂" v-model="addAdpacking.clothesFactory"></a-input>
+                <a-form-model-item label="成衣工厂" prop="garmentFactory">
+                  <a-input placeholder="请输入成衣工厂" v-model="addAdpacking.garmentFactory"></a-input>
                 </a-form-model-item>
               </a-col>
             </a-row>
@@ -78,16 +77,16 @@
         </div>
       </a-card>
 
-      <!--操作按钮区域 参照发运明细 増行-->
+      <!-- 参照发运明细 増行-->
       <a-card :bordered="false" style="margin:10px 0 60px 0;">
         <div class="table-operator">
           <a-button type="primary" @click="referShipmentDetails" icon="ordered-list">参照发运明细</a-button>
           <a-button type="primary" @click="handleAddColumn" icon="plus" style="margin-left: 20px">増行</a-button>
         </div>
 
-        <!-- 子表 ipagination-->
+        <!-- 子表 ipagination :rules="validatorRules"-->
         <a-spin :spinning="confirmLoading">
-          <a-form-model ref="formRef" :rules="validatorRules">
+          <a-form-model ref="formRef">
             <a-table
               bordered
               rowKey="id"
@@ -100,63 +99,63 @@
             >
               <!-- 结束箱号 输入框-->
               <template slot="endBoxNo" slot-scope="text, record, index">
-                <a-form-model-item prop="endBoxNo" :rules="rules.styleNum" required>
+                <a-form-model-item prop="endBoxNo">
                   <a-input style="width:100%" type="text" v-model="record.endBoxNo" />
                 </a-form-model-item>
               </template>
 
               <!-- 颜色(中英文) -->
-              <template slot="colorChUsa" slot-scope="text, record, index">
-                <a-form-model-item prop="colorChUsa" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.colorChUsa" />
+              <template slot="color" slot-scope="text, record, index">
+                <a-form-model-item prop="color">
+                  <a-input style="width:100%" type="text" v-model="record.color" />
                 </a-form-model-item>
               </template>
 
-              <!-- 箱数 -->
-              <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" />
+              <!-- 箱数  -->
+              <template slot="boxNumber" slot-scope="text, record, index">
+                <a-form-model-item prop="boxNumber">
+                  <a-input style="width:100%" type="text" v-model="record.boxNumber" />
                 </a-form-model-item>
               </template>
 
               <!-- 总件数 -->
               <template slot="totalPackagesNum" slot-scope="text, record, index">
-                <a-form-model-item prop="totalPackagesNum" :rules="rules.styleNum" required>
+                <a-form-model-item prop="totalPackagesNum">
                   <a-input style="width:100%" type="text" v-model="record.totalPackagesNum" />
                 </a-form-model-item>
               </template>
 
               <!-- 总净重 -->
-              <template slot="totalSuttle" slot-scope="text, record, index">
-                <a-form-model-item prop="totalSuttle" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.totalSuttle" />
+              <template slot="totalNetWeight" slot-scope="text, record, index">
+                <a-form-model-item prop="totalNetWeight">
+                  <a-input style="width:100%" type="text" v-model="record.totalNetWeight" />
                 </a-form-model-item>
               </template>
 
               <!-- 总毛重 -->
-              <template slot="totalRoughWeigh" slot-scope="text, record, index">
-                <a-form-model-item prop="totalRoughWeigh" :rules="rules.styleNum" required>
-                  <a-input style="width:100%" type="text" v-model="record.totalRoughWeigh" />
+              <template slot="totalGrossWeight" slot-scope="text, record, index">
+                <a-form-model-item prop="totalGrossWeight">
+                  <a-input style="width:100%" type="text" v-model="record.totalGrossWeight" />
                 </a-form-model-item>
               </template>
 
               <!-- 外箱宽度 -->
               <template slot="boxWidth" slot-scope="text, record, index">
-                <a-form-model-item prop="boxWidth" :rules="rules.styleNum" required>
+                <a-form-model-item prop="boxWidth">
                   <a-input style="width:100%" type="text" v-model="record.boxWidth" />
                 </a-form-model-item>
               </template>
 
               <!-- 外箱高度 -->
               <template slot="boxHeight" slot-scope="text, record, index">
-                <a-form-model-item prop="boxHeight" :rules="rules.styleNum" required>
+                <a-form-model-item prop="boxHeight">
                   <a-input style="width:100%" type="text" v-model="record.boxHeight" />
                 </a-form-model-item>
               </template>
 
               <!-- 总体积 -->
               <template slot="totalVolume" slot-scope="text, record, index">
-                <a-form-model-item prop="totalVolume" :rules="rules.styleNum" required>
+                <a-form-model-item prop="totalVolume">
                   <a-input style="width:100%" type="text" v-model="record.totalVolume" />
                 </a-form-model-item>
               </template>
@@ -173,6 +172,7 @@
           </a-form-model>
         </a-spin>
       </a-card>
+
       <!-- 页面底部提交取消 -->
       <div
         :style="{
@@ -190,8 +190,8 @@
         <a-popconfirm title="确定放弃新增?" @confirm="handleCancel" okText="确定" cancelText="取消">
           <a-button :style="{ marginRight: '8px' }">取消</a-button>
         </a-popconfirm>
-        <a-button type="primary" @click="submitAdd">
-          提交
+        <a-button type="primary" @click="saveAdd">
+          保存
         </a-button>
       </div>
     </a-drawer>
@@ -208,12 +208,16 @@
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+
 import ReferShipmentDetailsModal from '@views/advance-packingList/referShipmentDetailsModal.vue'
 
+// import {} from '@api/reportForms/advance-packingList.js'
+
 export default {
   name: 'AddAdvancePacking', // 新增预装箱单
   mixins: [JeecgListMixin],
-  components: { ReferShipmentDetailsModal, JEllipsis }, // 参照发运明细弹框
+  components: { JEllipsis, moment, ReferShipmentDetailsModal }, // 参照发运明细弹框
   data() {
     let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
 
@@ -229,7 +233,7 @@ export default {
         },
         {
           title: '成衣工厂',
-          dataIndex: 'clothesFactory',
+          dataIndex: 'garmentFactory',
           width: 120,
           fixed: 'left',
           className: 'replacecolor'
@@ -262,7 +266,7 @@ export default {
         },
         {
           title: '分销点/DC/LABEL',
-          dataIndex: 'dcLabel',
+          dataIndex: 'distributionPoint',
           width: 180,
           className: 'replacecolor'
         },
@@ -327,10 +331,10 @@ export default {
 
         {
           title: '颜色(中英文)',
-          dataIndex: 'colorChUsa',
+          dataIndex: 'color',
           width: 140,
           customRender: t => ellipsis(t),
-          scopedSlots: { customRender: 'colorChUsa' },
+          scopedSlots: { customRender: 'color' },
           className: 'replacecolor'
         },
         {
@@ -347,9 +351,9 @@ export default {
         },
         {
           title: '箱数',
-          dataIndex: 'boxes',
+          dataIndex: 'boxNumber',
           width: 140,
-          scopedSlots: { customRender: 'boxes' },
+          scopedSlots: { customRender: 'boxNumber' },
           className: 'replacecolor'
         },
 
@@ -368,9 +372,9 @@ export default {
         },
         {
           title: '总净重',
-          dataIndex: 'totalSuttle',
+          dataIndex: 'totalNetWeight',
           width: 140,
-          scopedSlots: { customRender: 'totalSuttle' },
+          scopedSlots: { customRender: 'totalNetWeight' },
           className: 'replacecolor'
         },
 
@@ -382,9 +386,9 @@ export default {
         },
         {
           title: '总毛重',
-          dataIndex: 'totalRoughWeigh',
+          dataIndex: 'totalGrossWeight',
           width: 140,
-          scopedSlots: { customRender: 'totalRoughWeigh' },
+          scopedSlots: { customRender: 'totalGrossWeight' },
           className: 'replacecolor'
         },
         {
@@ -432,14 +436,14 @@ export default {
         },
         {
           title: '总价',
-          dataIndex: 'totalPrices',
+          dataIndex: 'totalPrice',
           width: 120,
 
           className: 'replacecolor'
         },
         {
           title: '备注(U8)',
-          dataIndex: 'note',
+          dataIndex: 'memo',
           width: 140,
           fixed: 'right',
           customRender: t => ellipsis(t),
@@ -456,38 +460,52 @@ export default {
         }
       ],
 
-      addAdvancePackingData: [{}, {}, {}, {}, {}],
+      addAdvancePackingData: [],
       loading: false, // 表格加载
       visible: false,
-      validatorRules: {
-        orderNum: [{ required: true, message: '订单号不能为空', trigger: 'blur' }],
-        styleNum: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
-        name: [{ required: true, message: '品名不能为空', trigger: 'blur' }]
-        // 待确定还有哪些必填信息
-      },
+      // 待确定还有哪些必填信息
+      // validatorRules: {
+      //   orderNum: [{ required: true, message: '订单号不能为空', trigger: 'blur' }],
+      //   itemNumber: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
+      //   productName: [{ required: true, message: '品名不能为空', trigger: 'blur' }]
+      // },
       addAdpacking: {},
       confirmLoading: false
     }
   },
   created() {},
   methods: {
+    //  保存
+    saveAdd() {
+      console.log('保存新增、刷新预装箱单-成衣')
+      // const that = this
+      // // 触发表单验证
+      // this.$refs.form.validate(valid => {
+      //   if (valid) {
+      //     that.confirmLoading = true
+      //   }
+      // })
+      this.close()
+      // this.getShipmentList() // 刷新 预装箱单-成衣列表
+    },
     // 参照发运明细
     referShipmentDetails() {
       console.log('打开参照订单数据')
       this.$refs.referShipmentDetailsModal.referShipmentDetailsModVis = true
     },
+
     // 増行
     handleAddColumn() {
       console.log('増行')
 
       const addrow = {
         accountSet: '',
-        clothesFactory: '',
+        garmentFactory: '',
         hod: '',
         styleNo: '',
         poNo: '',
         itemNoSoon: '',
-        dcLabel: '',
+        distributionPoint: '',
         prepackSku: '',
         s: '',
         m: '',
@@ -497,23 +515,23 @@ export default {
         xxxl: '',
         inceptionBoxNo: '',
         endBoxNo: '',
-        colorChUsa: '',
+        color: '',
         configCode: '',
         packagesBox: '',
-        boxes: '',
+        boxNumber: '',
         totalPackagesNum: '',
         suttle: '',
-        totalSuttle: '',
+        totalNetWeight: '',
         roughWeight: '',
-        totalRoughWeigh: '',
+        totalGrossWeight: '',
         boxLength: '',
         boxWidth: '',
         boxHeight: '',
         totalVolume: '',
         netNetWeight: '',
         price: '',
-        totalPrices: '',
-        note: '',
+        totalPrice: '',
+        memo: '',
         operation: ''
       }
 
@@ -531,19 +549,7 @@ export default {
       console.log('点击抽屉取消')
       this.close()
     },
-    // 抽屉 提交
-    submitAdd() {
-      console.log('保存新增、刷新预装箱单-成衣')
-      const that = this
-      // 触发表单验证
-      this.$refs.form.validate(valid => {
-        if (valid) {
-          that.confirmLoading = true
-        }
-      })
-      this.close()
-      // this.getShipmentList() // 刷新 预装箱单-成衣列表
-    },
+
     // -------------------------------------
     close() {
       this.$emit('close')

+ 136 - 139
src/views/cost-allocation-total/detailsDrawer.vue → src/views/cost-allocation-total/costDetailDrawer.vue

@@ -1,192 +1,179 @@
 <template>
-  <!-- 详情 成本分配汇总 此页面全部回显信息  不现实输入框-->
-  <div id="costAllocationDrawer">
-    <a-drawer
-      title="详情"
-      width="89%"
-      placement="right"
-      :closable="true"
-      :visible="visible"
-      @close="onClose">
+  <!-- 详情 成本分配汇总-->
+  <div id="costDetailDrawer">
+    <a-drawer title="详情" width="89%" placement="right" :closable="true" :visible="visible" @close="onClose">
       <!-- 主表信息 -->
       <a-card :bordered="true">
         <div class="table-page-search-wrapper">
-          <a-form layout="inline">
+          <a-form-model layout="inline">
             <a-row :gutter="24">
               <a-col :md="6" :sm="8">
-                <a-form-item label="计划单号">
-                  <a-input v-model="costAllocation.planNum"></a-input>
-                </a-form-item>
+                <a-form-model-item label="计划单号" prop="planNum">
+                  <!-- 123456 -->
+                  {{ detailsPlanNum.planNum }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="产品款号" has-feedback>
-                  <a-input v-model="costAllocation.poStyleNum"></a-input>
-                </a-form-item>
+                <a-form-model-item label="产品款号" prop="poStyleNum">
+                  {{ detailsPlanNum.poStyleNum }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="外销员">
-                  <a-input v-model="costAllocation.exportSales"></a-input>
-                </a-form-item>
+                <a-form-model-item label="外销员" prop="exportSales">
+                  {{ detailsPlanNum.exportSales }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="成衣合同号">
-                  <a-input v-model="costAllocation.garmentContractNo"></a-input>
-                </a-form-item>
+                <a-form-model-item label="成衣合同号" prop="garmentContractno">
+                  {{ detailsPlanNum.garmentContractno }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="部门">
-                  <a-input v-model="costAllocation.department"></a-input>
-                </a-form-item>
+                <a-form-model-item label="部门" prop="department">
+                  {{ detailsPlanNum.department }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="客户简称">
-                  <a-input v-model="costAllocation.customerShortName"></a-input>
-                </a-form-item>
+                <a-form-model-item label="客户简称" prop="customerShortame">
+                  {{ detailsPlanNum.customerShortame }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="加工单位">
-                  <a-input v-model="costAllocation.processUnit"></a-input>
-                </a-form-item>
+                <a-form-model-item label="加工单位" prop="processUnit">
+                  {{ detailsPlanNum.processUnit }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="出运日期">
-                  <a-date-picker style="width: 100%" v-model="costAllocation.outData"></a-date-picker>
-                </a-form-item>
+                <a-form-model-item label="出运日期" prop="outdata">
+                  {{ detailsPlanNum.outdata }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="计划数量">
-                  <a-input v-model="costAllocation.planQuantity"></a-input>
-                </a-form-item>
+                <a-form-model-item label="计划数量" prop="planQuantity">
+                  {{ detailsPlanNum.planQuantity }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="美元外销总价">
-                  <a-input v-model="costAllocation.USDTotalExportPrice"></a-input>
-                </a-form-item>
+                <a-form-model-item label="美元外销总价" prop="usdTotalexportprice">
+                  {{ detailsPlanNum.usdTotalexportprice }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="人民币费用支出">
-                  <a-input
-                    v-model="costAllocation.RMBExpense"
-                    style="color:#027db4;"
-                    @click="mainTableExpenseCNY"
-                  ></a-input>
-                </a-form-item>
+                <a-form-model-item label="人民币费用支出" prop="rmbExpense">
+                  {{ detailsPlanNum.rmbExpense }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="税率%">
-                  <a-input v-model="costAllocation.taxRate"></a-input>
-                </a-form-item>
+                <a-form-model-item label="税率%" prop="taxrate">
+                  {{ detailsPlanNum.taxrate }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="实际出货数量">
-                  <a-input v-model="costAllocation.actualShipQuantity"></a-input>
-                </a-form-item>
+                <a-form-model-item label="实际出货数量" prop="actualShipquantity">
+                  {{ detailsPlanNum.actualShipquantity }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="人民币外销金额">
-                  <a-input v-model="costAllocation.RMBExportAmount"></a-input>
-                </a-form-item>
+                <a-form-model-item label="人民币外销金额" prop="rmbExportamount">
+                  {{ detailsPlanNum.rmbExportamount }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="美元费用支出">
-                  <a-input
-                    v-model="costAllocation.USDExpense"
-                    style="color:#027db4;"
-                    @click="mainTableExpenseUSD"
-                  ></a-input>
-                </a-form-item>
+                <a-form-model-item label="美元费用支出" prop="usdExpense">
+                  {{ detailsPlanNum.usdExpense }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="加工费">
-                  <a-input v-model="costAllocation.processCost"></a-input>
-                </a-form-item>
+                <a-form-model-item label="加工费" prop="rmbProcesscost">
+                  {{ detailsPlanNum.rmbProcesscost }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="短出数">
-                  <a-input v-model="costAllocation.shortSeveral"></a-input>
-                </a-form-item>
+                <a-form-model-item label="短出数" prop="shortseveral">
+                  {{ detailsPlanNum.shortseveral }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="短出货值">
-                  <a-input v-model="costAllocation.shortValue"></a-input>
-                </a-form-item>
+                <a-form-model-item label="短出货值" prop="shortvalue">
+                  {{ detailsPlanNum.shortvalue }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="短出面料成本">
-                  <a-input v-model="costAllocation.fabricShortCost"></a-input>
-                </a-form-item>
+                <a-form-model-item label="短出面料成本" prop="fabricshortcost">
+                  {{ detailsPlanNum.fabricshortcost }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="事故单美金金额">
-                  <a-input v-model="costAllocation.accidentUSDAmount"></a-input>
-                </a-form-item>
+                <a-form-model-item label="事故单美金金额" prop="accidentUsdamount">
+                  {{ detailsPlanNum.accidentUsdamount }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="面料含税成本">
-                  <a-input v-model="costAllocation.fabricCostIncludesTax"></a-input>
-                </a-form-item>
+                <a-form-model-item label="面料含税成本" prop="fabriccostIncludestax">
+                  {{ detailsPlanNum.fabriccostIncludestax }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="辅料含税成本">
-                  <a-input v-model="costAllocation.excipienCostIncludesTax"></a-input>
-                </a-form-item>
+                <a-form-model-item label="辅料含税成本" prop="excipiencostIncludestax">
+                  {{ detailsPlanNum.excipiencostIncludestax }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="销售订单本币总额">
-                  <a-input v-model="costAllocation.salesOrdersLocalTotal"></a-input>
-                </a-form-item>
+                <a-form-model-item label="销售订单本币总额" prop="salesordersLocaltotal">
+                  {{ detailsPlanNum.salesordersLocaltotal }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="事故单人民币金额">
-                  <a-input v-model="costAllocation.accidentCNYAmount"></a-input>
-                </a-form-item>
+                <a-form-model-item label="事故单人民币金额" prop="accidentcnyAmount">
+                  {{ detailsPlanNum.accidentcnyAmount }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="面料不含税成本">
-                  <a-input v-model="costAllocation.fabricCostNotIncludesTax"></a-input>
-                </a-form-item>
+                <a-form-model-item label="面料不含税成本" prop="fabriccostNotincludestax">
+                  {{ detailsPlanNum.fabriccostNotincludestax }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="辅料不含税成本">
-                  <a-input v-model="costAllocation.excipienCostNotIncludesTax"></a-input>
-                </a-form-item>
+                <a-form-model-item label="辅料不含税成本" prop="excipiencostNotincludestax">
+                  {{ detailsPlanNum.excipiencostNotincludestax }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="销售订单原币总额">
-                  <a-input v-model="costAllocation.salesOrdersOriginalTotal"></a-input>
-                </a-form-item>
+                <a-form-model-item label="销售订单原币总额" prop="salesrrdersOriginaltotal">
+                  {{ detailsPlanNum.salesrrdersOriginaltotal }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-item label="制单人">
-                  <a-input v-model="costAllocation.preparedBy"></a-input>
-                </a-form-item>
+                <a-form-model-item label="制单人" prop="preparedBy">
+                  {{ detailsPlanNum.preparedBy }}
+                </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
@@ -196,7 +183,7 @@
                 </h4>
               </a-col>
             </a-row>
-          </a-form>
+          </a-form-model>
         </div>
       </a-card>
 
@@ -217,6 +204,7 @@
             :data-source="accidentListData"
             bordered
             :pagination="false"
+            :scroll="{ y: 300 }"
           >
             <!-- 事故单 -->
             <span slot="accidentNum" slot-scope="text">
@@ -239,21 +227,13 @@
           </a-table>
         </div>
 
-        <!-- 备注信息 1 根据角色权限控制【填写】、【查看】-->
+        <!-- 备注信息 根据角色权限控制【填写】、【查看】-->
         <div class="note-one" style="marginTop:40px;">
-          <h6 class="table-title">备注信息 1</h6>
+          <h6 class="table-title">备注信息</h6>
           <div class="noteDetail">
-            <a-input type="textarea" v-model="noteOne" placeholder="请输入备注 1" style="minHeight:100px;" />
-            <a-button type="primary" @click="savenoteOne">保存</a-button>
-          </div>
-        </div>
-
-        <!-- 备注信息 2 根据角色权限控制【填写】、【查看】-->
-        <div class="note-two" style="marginTop:40px;">
-          <h6 class="table-title">备注信息 2</h6>
-          <div class="noteDetail">
-            <a-input type="textarea" v-model="noteTwo" placeholder="请输入备注 2" style="minHeight:100px;" />
-            <a-button type="primary" @click="savenoteTwo">保存</a-button>
+            我是备注信息test我是备注信息test我是备注信息test我是备注信息test我是备注信息test我是备注信息test
+            <!-- {{ detailsPlanNum.remarks }} -->
+            <!-- <a-input type="textarea" v-model="noteOne" placeholder="请输入备注 1" style="minHeight:100px;" /> -->
           </div>
         </div>
       </a-card>
@@ -275,23 +255,25 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
+
 import tabs from '@views/cost-allocation-total/tabs.vue' // tabs组件
+
 import mainTableExpenseCNYModal from '@views/cost-allocation-total/modal/mainTableExpenseCNYModal.vue'
 import mainTableExpenseUSDModal from '@views/cost-allocation-total/modal/mainTableExpenseUSDModal.vue'
 import accidentListModal from '@views/cost-allocation-total/modal/accidentListModal.vue' // 事故单
 
+import { costByPlanNum } from '@api/document/cost-allocation-total.js'
+
 export default {
-  name: 'DetailsDrawer', // 详情抽屉
+  name: 'CostDetailDrawer', // 详情抽屉
   mixins: [JeecgListMixin],
   components: { JEllipsis, moment, tabs, mainTableExpenseCNYModal, mainTableExpenseUSDModal, accidentListModal },
 
   data() {
     return {
       loading: false, // 表格加载
-      costAllocation: [], // 成本分配统计
-
-      noteOne: '', // 备注 1
-      noteTwo: '', // 备注 2
+      detailsPlanNum: {}, //主表回显回显
+      remarks: '', // 备注
 
       // 事故单 表头
       accidentListColumns: [
@@ -306,7 +288,8 @@ export default {
         { title: '事故承担方', width: 120, dataIndex: 'accidentUndertaker', className: 'replacecolor' },
         { title: '金额', dataIndex: 'amount', width: 120, className: 'replacecolor' }
       ],
-      accidentListData: [{ accidentNum: '1100011' }, {}],
+      accidentListData: [],
+
       // 费用支出 表头
       costPayColumns: [
         { title: '账套号', width: 120, dataIndex: 'setNo', className: 'replacecolor' },
@@ -317,14 +300,36 @@ export default {
         { title: '发票号', dataIndex: 'invoiceNum', width: 120, className: 'replacecolor' },
         { title: '制单人', dataIndex: 'preparedBy', width: 120, className: 'replacecolor' }
       ],
-      costPayData: [{}],
-      visible: false // 成本分配统计表详情  抽屉
+      costPayData: [],
+      visible: false,
+      record: {} //点击的计划单号
     }
   },
-  created() {},
+  created() {
+    this.getALLDetail()
+  },
   methods: {
+    getALLDetail() {
+      this.$nextTick(() => {
+        console.log('详情拿到planNum', this.record.planNum)
+        costByPlanNum({ plannum: this.record.planNum }).then(res => {
+          if (res.success) {
+            console.log('详情所有数据id', res.result[0].createBy)
+            this.detailsPlanNum = res.result[0]
+
+            this.accidentListData = res.result[0].syCostAllocationAccidentList //事故单
+            this.costPayData = res.result[0].syCostAllocationCostpayList //支出费用
+
+            this.pagination = {
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+          }
+        })
+      })
+    },
     // 同步按钮  synchronization() {},
-
     //  主表:人民币费用支出  弹框
     mainTableExpenseCNY() {
       console.log('点击:主表人民币费用支出')
@@ -348,18 +353,8 @@ export default {
         }
       }
     },
-    // ---------------------------------------
-    // 保存备注 1
-    savenoteOne() {
-      console.log('保存 备注 1')
-    },
-    // 保存备注 2
-    savenoteTwo() {
-      console.log('保存 备注 2')
-    },
 
     onClose() {
-      // 关闭抽屉
       this.visible = false
     },
 
@@ -368,9 +363,7 @@ export default {
     aa() {},
     bb() {},
     cc() {}
-  },
-  computed: {},
-  mounted() {}
+  }
 }
 </script>
 <style lang="less" scoped>
@@ -402,4 +395,8 @@ export default {
   padding: 10px;
 }
 
+// 回显label文字
+/deep/.ant-form-item-label > label {
+  font-weight: 700;
+}
 </style>

+ 101 - 58
src/views/cost-allocation-total/list.vue

@@ -20,7 +20,7 @@
 
             <a-col :md="6" :sm="8">
               <a-form-item label="客户简称">
-                <a-input placeholder="请输入客户简称" v-model="queryParam.customerShortName"></a-input>
+                <a-input placeholder="请输入客户简称" v-model="queryParam.customerShortame"></a-input>
               </a-form-item>
             </a-col>
 
@@ -47,29 +47,43 @@
         :columns="costAllocationColumns"
         :data-source="costAllocationData"
         :loading="loading"
-        :pagination="ipagination"
+        :pagination="pagination"
         :scroll="{ x: 1500 }"
         @change="handleTableChange"
       >
-        <!-- 状态 -->
-        <!-- slot-scope="text, record" -->
-        <span slot="state">
-          <!-- v-if="record.isRelease == '0'" -->
-          <a-tag color="#f50">审核通过</a-tag>
-          <!-- <a-tag color="#87d068" v-else>已发布</a-tag> -->
+        <!-- 单据状态 -->
+        <span slot="billstatus" slot-scope="text, record">
+          <a-tag color="orange" v-if="record.billstatus == '0'">未保存</a-tag>
+          <a-tag color="green" v-if="record.billstatus == '1'">已保存</a-tag>
+          <a-tag color="blue" v-if="record.billstatus == '2'">已审批</a-tag>
         </span>
 
         <!-- 操作 -->
-        <span slot="operationSlot" slot-scope="text, record">
+
+        <span slot="operationSlot" slot-scope="text, record" v-if="record.billstatus == '1'">
+          <a href="javascript:void(0);" @click="detail(record)">详情</a>
+          <a-divider type="vertical" />
+          <a-popconfirm title="确定审核吗?" ok-text="是" cancel-text="否" @confirm="check(record)">
+            <a href="javascript:void(0);" style="color:green">审核</a>
+          </a-popconfirm>
+        </span>
+
+        <span slot="operationSlot" slot-scope="text, record" v-else-if="record.billstatus == '2'">
           <a href="javascript:void(0);" @click="detail(record)">详情</a>
           <a-divider type="vertical" />
-          <a href="javascript:void(0);" @click="check(record)" style="color:green">审核</a>
+          <a-popconfirm title="确定取消审核吗?" ok-text="是" cancel-text="否" @confirm="cancelCheck(record)">
+            <a href="javascript:void(0);" style="color:green">取消审核</a>
+          </a-popconfirm>
+        </span>
+
+        <span slot="operationSlot" slot-scope="text, record" v-else-if="record.billstatus == '0'">
+          <a href="javascript:void(0);" @click="detail(record)">详情</a>
         </span>
       </a-table>
     </a-card>
 
     <!-- 详情 大抽屉 -->
-    <details-drawer ref="detailsDrawer" :father="aa" @ok="modalFormOk"></details-drawer>
+    <costDetail-drawer ref="costDetailDrawer" :fatherList="getCostList" @ok="modalFormOk"></costDetail-drawer>
   </div>
 </template>
 
@@ -77,22 +91,19 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
-import detailsDrawer from '@views/cost-allocation-total/detailsDrawer.vue'
+
+import costDetailDrawer from '@views/cost-allocation-total/costDetailDrawer.vue'
+
+import { costList, costByPlanNum } from '@api/document/cost-allocation-total.js'
 
 export default {
   name: 'CostAllocationTotal', // 成本分配汇总 单证
   mixins: [JeecgListMixin],
-  components: { JEllipsis, moment, detailsDrawer },
+  components: { JEllipsis, moment, costDetailDrawer },
 
   data() {
     let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
     return {
-      // 查询条件
-      queryParam: {
-        index: '',
-        planNum: '',
-        customerShortName: ''
-      },
       // 成本分配汇总 表头
       costAllocationColumns: [
         {
@@ -104,15 +115,15 @@ export default {
           className: 'replacecolor'
         },
         { title: '计划单号', width: 120, dataIndex: 'planNum', fixed: 'left', className: 'replacecolor' },
-        { title: '款号', width: 120, dataIndex: 'styleNum', className: 'replacecolor' },
-        { title: '业务员', width: 120, dataIndex: 'salesman', className: 'replacecolor' },
+        { title: '款号', width: 120, dataIndex: 'poStyleNum', className: 'replacecolor' },
+        { title: '业务员', width: 120, dataIndex: 'exportSales', className: 'replacecolor' },
         {
           title: '部门',
           width: 120,
           dataIndex: 'department',
           className: 'replacecolor'
         },
-        { title: '客户简称', width: 150, dataIndex: 'customerShortName', className: 'replacecolor' },
+        { title: '客户简称', width: 150, dataIndex: 'customerShortame', className: 'replacecolor' },
         { title: '加工单位', width: 120, dataIndex: 'processUnit', className: 'replacecolor' },
         //  {
         //   title: '创建时间',
@@ -126,36 +137,37 @@ export default {
         {
           title: '出运日期',
           width: 120,
-          dataIndex: 'outData',
+          dataIndex: 'outdata',
           customRender: text => {
             return moment(text).format('YYYY-MM-DD')
           },
           className: 'replacecolor'
         },
-        { title: '成衣件数', width: 90, dataIndex: 'clothesQuantity', className: 'replacecolor' },
-        { title: '销售美元', width: 120, dataIndex: 'SalesUSD', className: 'replacecolor' },
-        { title: '销售人民币', width: 120, dataIndex: 'SalesCNY', className: 'replacecolor' },
-        { title: '面料(不含税)', width: 120, dataIndex: 'FabricExcludedTax', className: 'replacecolor' },
-        { title: '辅料(不含税)', width: 120, dataIndex: 'ingredientsExcludedTax', className: 'replacecolor' },
-        { title: '加工费(CNY)', width: 120, dataIndex: 'processCostCNY', className: 'replacecolor' },
-        { title: '加工费(USD)', width: 120, dataIndex: 'processCostUSD', className: 'replacecolor' },
-        { title: '费用支出(汇总CNY)', width: 160, dataIndex: 'costPayTotalCNY', className: 'replacecolor' },
-        { title: '费用支出(汇总USD)', width: 160, dataIndex: 'costPayTotalUSD', className: 'replacecolor' },
-        { title: '事故单人民币金额', width: 160, dataIndex: 'accidentCNYAmount', className: 'replacecolor' },
+        { title: '成衣件数', width: 90, dataIndex: 'actualShipquantity', className: 'replacecolor' },
+        { title: '销售美元', width: 120, dataIndex: 'usdTotalexportprice', className: 'replacecolor' },
+        { title: '销售人民币', width: 120, dataIndex: 'rmbExportamount', className: 'replacecolor' },
+        { title: '面料(不含税)', width: 120, dataIndex: 'fabriccostNotincludestax', className: 'replacecolor' },
+        { title: '辅料(不含税)', width: 120, dataIndex: 'excipiencostNotincludestax', className: 'replacecolor' },
+        { title: '加工费(CNY)', width: 120, dataIndex: 'rmbProcesscost', className: 'replacecolor' },
+        { title: '加工费(USD)', width: 120, dataIndex: 'usdProcesscost', className: 'replacecolor' },
+        { title: '费用支出(汇总CNY)', width: 160, dataIndex: 'rmbExpense', className: 'replacecolor' },
+        { title: '费用支出(汇总USD)', width: 160, dataIndex: 'usdExpense', className: 'replacecolor' },
+        { title: '事故单人民币金额', width: 160, dataIndex: 'accidentcnyAmount', className: 'replacecolor' },
         {
           title: '备注',
           width: 180,
-          dataIndex: 'note',
+          dataIndex: 'remarks',
           customRender: t => ellipsis(t),
           className: 'replacecolor',
-          scopedSlots: { customRender: 'note' }
+          scopedSlots: { customRender: 'remarks' }
         },
         {
-          title: '状态',
+          title: '单据状态',
           width: 120,
-          dataIndex: 'state',
+          dataIndex: 'billstatus',
           className: 'replacecolor',
-          scopedSlots: { customRender: 'state' }
+
+          scopedSlots: { customRender: 'billstatus' }
         },
         {
           title: '操作',
@@ -169,43 +181,74 @@ export default {
       costAllocationData: [
         {
           orderNum: 'AA002200001',
-          note: '跟Jeecg-Boot官网统一,单元格内容较多时,多出内容以“……”替代,鼠标移入显示全部内容(此处原型图上是弹框,)'
+          remarks:
+            '跟Jeecg-Boot官网统一,单元格内容较多时,多出内容以“……”替代,鼠标移入显示全部内容(此处原型图上是弹框,)'
         }
       ],
+      // 查询条件
+      queryParam: {
+        index: '',
+        planNum: '',
+        customerShortame: '',
+        pageNo: '' // 点击的页数
+      },
+      // 分页
+      pagination: {
+        // total: '',
+        // current: 0,
+        // pageSize: 0
+      },
+      dateFormat: 'YYYY-MM-DD',
       loading: false // 表格加载
     }
   },
   created() {
-    // 渲染订单销售列表
+    this.getCostList()
   },
   methods: {
-    // 查询按钮
+    // 分页查询
+    getCostList() {
+      this.$nextTick(() => {
+        costList(this.queryParam).then(res => {
+          if (res.success) {
+            this.costAllocationData = res.result.records
+            console.log('成本分配汇总数据', this.costAllocationData)
+            this.pagination = {
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+          }
+        })
+      })
+    },
+    //  详情
+    detail(record) {
+      this.$refs.costDetailDrawer.visible = true
+      this.$refs.costDetailDrawer.record = record //接口参数
+      console.log('参数record', this.$refs.costDetailDrawer.record.planNum)
+      this.$refs.costDetailDrawer.getALLDetail()
+    },
+    //  审核
+    check(record) {},
+    //  取消审核
+    cancelCheck(record) {},
+
     searchQuery() {
-      // 渲染成本分配统计表
+      this.getCostList()
     },
     searchReset() {
-      // console.log('>>>>重置')
+      this.queryParam.pageNo = ''
       this.queryParam = {}
-      // 重新成本分配统计表
+      this.getCostList()
     },
 
-    // 操作 详情
-    detail(record) {
-      // 点击了详情
-      this.$refs.detailsDrawer.visible = true
+    handleTableChange(pagination, filters, sorter) {
+      this.queryParam.pageNo = pagination.current
+      this.getCostList()
     },
-    // 操作 审核
-    check() {},
-
     // father 抽屉方法
     aa() {}
-
-    // 分页、排序、筛选变化时触发
-    // handleTableChange(pagination, filters, sorter) {
-    //   // console.log('当前页信息>>>>',pagination)
-    //   this.queryParam.pageNo = pagination.current
-    //   // this.getOrderList()
-    // }
   },
   computed: {},
   mounted() {}

+ 4 - 1
src/views/cost-allocation-total/tabs.vue

@@ -13,6 +13,7 @@
             :data-source="fabricData"
             bordered
             :pagination="false"
+            :scroll="{ x: 1500, y: 300 }"
           >
             <!-- 面料 -转入数量 弹框-->
             <span slot="fabricTransferQuantity" slot-scope="text">
@@ -26,7 +27,7 @@
           </a-table>
         </div>
 
-        <!-- tabs 辅料   :scroll="{ x: 1500 }"-->
+        <!-- tabs 辅料   -->
         <div style="margin:30px 0">
           <h6 class="table-title">辅料</h6>
           <a-table
@@ -36,6 +37,7 @@
             :data-source="ingredientsData"
             bordered
             :pagination="false"
+            :scroll="{ x: 1000, y: 300 }"
           >
             <!--辅料-转入数量 弹框-->
             <span slot="ingredientsTransferQuantity" slot-scope="text">
@@ -58,6 +60,7 @@
             :data-source="shipDetailsData"
             bordered
             :pagination="false"
+            :scroll="{ x: 1000, y: 300 }"
           >
           </a-table>
         </div>

+ 2 - 2
src/views/order/orderDetailDrawer.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 订单数据 详情 -->
+  <!-- 【单证】  订单数据 详情 -->
   <a-drawer title="详情" width="89%" placement="right" :closable="true" :visible="visible" @close="onClose">
     <!--主表信息 -->
     <a-card :bordered="true">
@@ -150,7 +150,7 @@
       </a-table>
     </a-card>
   </a-drawer>
-  <!--  -->
+
 </template>
 
 <script>

+ 1 - 6
src/views/order/orderList.vue

@@ -259,13 +259,8 @@ 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'
-      }
       this.queryParam.pageNo = pagination.current
-      this.getOrderList() //重新渲染
+      this.getOrderList()
     }
   },
   computed: {},

+ 4 - 2
src/views/reportForms/pro-progress-report/salesOrderDetailsDrawer.vue

@@ -115,7 +115,7 @@
         </div>
       </a-card>
 
-      <!--采购   :pagination="false"-->
+      <!--采购 -->
       <a-card :bordered="true" style="margin:10px 0;">
         <div style="marginTop:30px;">
           <h6 class="table-title">采购</h6>
@@ -125,6 +125,7 @@
             :loading="loading"
             :columns="CaiGouColumns"
             :data-source="CaiGouData"
+            :pagination="false"
             :scroll="{ x: 1500, y: 300 }"
           >
             <!-- 物料编码 -->
@@ -134,7 +135,7 @@
           </a-table>
         </div>
 
-        <!-- 委外  :pagination="false" -->
+        <!-- 委外 -->
         <div style="margin:60px 0;">
           <h6 class="table-title">委外</h6>
           <a-table
@@ -142,6 +143,7 @@
             rowKey="id"
             :loading="loading"
             :columns="weiwaiColumns"
+            :pagination="false"
             :data-source="weiwaiData"
             :scroll="{ x: 1500, y: 300 }"
           >

+ 2 - 3
src/views/shipment-details/addShipDetDrawer.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 新增发运明细 -->
+  <!-- 新增 发运明细 -->
   <div id="AddShipDetDrawer">
     <a-drawer
       title="新增发运明细"
@@ -285,7 +285,6 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
-// import 'moment/locale/zh-cn'
 
 import ReferOrderDataModal from '@views/shipment-details/referOrderDataModal.vue'
 
@@ -765,7 +764,7 @@ export default {
       // console.log('参照订单数据弹框确定')
       this.$refs.referOrderDataModal.referOrderDataModVis = false
     }
-  },
+  }
 }
 </script>
 <style lang="less" scoped>

+ 7 - 11
src/views/shipment-details/detailsShipDetDrawer.vue

@@ -1,8 +1,8 @@
 <template>
   <!-- 详情 发运明细 -->
   <div id="detailsShipDetDrawer">
-    <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="onClose">
+      <!-- 主表信息 -->
       <a-card :bordered="true">
         <div class="table-page-search-wrapper">
           <a-form-model layout="inline" ref="form">
@@ -89,6 +89,7 @@
           </a-form-model>
         </div>
       </a-card>
+
       <!-- 子表 :model="form" -->
       <a-card :bordered="true" style="margin:10px 0">
         <a-spin :spinning="confirmLoading">
@@ -125,6 +126,7 @@ export default {
     let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
     return {
       id: '',
+      detailsShipDet: [], // 主表信息
       // 表头
       columns: [
         {
@@ -434,7 +436,7 @@ export default {
           className: 'replacecolor'
         }
       ],
-      detailsShipDet: [], // 主表信息
+
       syShippingDetailsItemList: [], // 子表信息
       visible: false,
       confirmLoading: false,
@@ -444,17 +446,11 @@ export default {
   created() {},
 
   methods: {
-    // 抽屉 取消
-    handleCancel() {
-      this.close()
-    },
-    close() {
+    onClose() {
       this.$emit('close')
       this.visible = false
     }
-  },
-  computed: {},
-  mounted() {}
+  }
 }
 </script>
 <style lang="less" scoped>

+ 35 - 36
src/views/shipment-details/shipmentList.vue

@@ -1,5 +1,5 @@
 <template>
-  <!-- 发运明细列表 -->
+  <!-- 发运明细 列表 -->
   <div id="ShipmentList">
     <!-- 查询 -->
     <a-card :bordered="false">
@@ -485,43 +485,17 @@ export default {
               current: res.result.current,
               pageSize: res.result.size
             }
-            // console.log('分页器赋值:', this.pagination.total, this.pagination.current, this.pagination.pageSize)
           }
         })
       })
     },
-    // 分页变化时触发
-    handleTableChange(pagination, filters, sorter) {
-      // console.log('分页器信息', pagination)
-      this.queryParam.pageNo = pagination.current
-      this.getShipmentList()
-    },
-    // 查询按钮
-    searchQuery() {
-      this.queryParam.pageNo = ''
-      this.getShipmentList()
-    },
-    // 重置
-    searchReset() {
-      this.queryParam.documentNo = ''
-      this.queryParam.timeRange = []
-      this.queryParam.startTime = ''
-      this.queryParam.endTime = ''
-      this.queryParam.preDeliveryDate = ''
-      this.queryParam.salesman = ''
-      this.queryParam.itemNumber = ''
-      this.queryParam.refer = ''
-      this.getShipmentList() // 渲染 发运明细列表
-    },
-    // --------------------------------------
 
     // 新增
     addShipDet() {
       this.$refs.addShipDetDrawer.visible = true
     },
 
-    // --------------------------------------
-    // 操作 申报要素
+    //  申报要素
     declareElements(record) {
       // console.log('点击申报要素hsCode', record.hsCode)
       this.$refs.declareElementsModal.declareElementsModVis = true
@@ -536,7 +510,7 @@ export default {
       })
     },
 
-    // 操作 详情
+    //  详情
     details(record) {
       this.$refs.detailsShipDetDrawer.visible = true
       // console.log('点击项的ID', record.id)
@@ -549,7 +523,8 @@ export default {
         }
       })
     },
-    // 操作 编辑
+
+    //  编辑
     edit(record) {
       this.$refs.editShipDetDrawer.visible = true
       shipmentQueryById({ id: record.id }).then(res => {
@@ -561,7 +536,8 @@ export default {
         }
       })
     },
-    // 操作 提交
+
+    //  提交
     submit(record) {
       console.log('点击id:', record.id)
       this.$nextTick(() => {
@@ -590,7 +566,7 @@ export default {
       })
     },
 
-    // 操作 推送
+    //  推送
     push(record) {
       console.log('推送id:', record.id)
       this.$nextTick(() => {
@@ -620,7 +596,7 @@ export default {
       })
     },
 
-    // 操作 删除
+    //  删除
     handleDelete(record) {
       console.log('点击删除项id:', record.id)
       this.$nextTick(() => {
@@ -631,6 +607,7 @@ export default {
         })
       })
     },
+
     onDateChange(value, dateString) {
       console.log('查询开始时间', dateString[0], '查询结束时间', dateString[1])
       this.queryParam.startTime = dateString[0]
@@ -640,13 +617,35 @@ export default {
     onDateOk(value) {
       console.log('value', value)
     },
+
     deliveryDateChange(value, dateString) {
       console.log('预完工日期', dateString)
       this.queryParam.preCompletionDate = dateString
+    },
+
+    searchQuery() {
+      this.queryParam.pageNo = ''
+      this.getShipmentList()
+    },
+
+    searchReset() {
+      this.queryParam.documentNo = ''
+      this.queryParam.timeRange = []
+      this.queryParam.startTime = ''
+      this.queryParam.endTime = ''
+      this.queryParam.preDeliveryDate = ''
+      this.queryParam.salesman = ''
+      this.queryParam.itemNumber = ''
+      this.queryParam.refer = ''
+      this.getShipmentList() // 渲染 发运明细列表
+    },
+
+    // 分页变化时触发
+    handleTableChange(pagination, filters, sorter) {
+      this.queryParam.pageNo = pagination.current
+      this.getShipmentList()
     }
-  },
-  computed: {},
-  mounted() {}
+  }
 }
 </script>
 <style lang="less" scoped>