Quellcode durchsuchen

Merge branch 'master' of http://139.196.39.194:9021/chenc/sen-yu-new-web

zengtx vor 3 Jahren
Ursprung
Commit
113619715b

+ 8 - 1
src/api/reportForms/dye-loss-table.js

@@ -7,4 +7,11 @@ const dyeLossList = params => getAction('scas/dyeLoss/list', params)
 // 导出
 const exportXls = params => getAction('/scas/dyeLoss/excel', params)
 
-export { dyeLossList,exportXls }
+// 所有供应商chart数据
+const allLoss = params => getAction('/scas/dyeLoss/cInvName', params)
+
+// 指定供应商chart数据
+const someoneLoss = params => getAction('/scas/dyeLoss/vendor', params)
+
+
+export { dyeLossList, exportXls, allLoss,someoneLoss }

+ 11 - 2
src/api/reportForms/supply-capacity-table.js

@@ -2,6 +2,15 @@
 
 import { getAction } from '@/api/manage'
 
-const supplyCapList = params => getAction('/scas/supplierCapacity/list2', params)
+const supplyCapList = params => getAction('/scas/supplierCapacity/list', params)
 
-export { supplyCapList }
+//合并导出
+const handleXls = params => getAction('/scas/supplierCapacity/excel98888888888', params)
+
+//月份供应商合计导出
+const monthSupplyXls = params => getAction('/scas/supplierCapacity/excel3', params)
+
+// 月份部门合计导出
+const monthDepartXls = params => getAction('/scas/supplierCapacity/excel2', params)
+
+export { supplyCapList, handleXls, monthSupplyXls, monthDepartXls }

+ 1 - 1
src/utils/request.js

@@ -17,7 +17,7 @@ let apiBaseUrl = window._CONFIG['domianURL'] || "/jeecg-boot";
 const service = axios.create({
   //baseURL: '/jeecg-boot',
   baseURL: apiBaseUrl, // api base_url
-  timeout: 9000 // 请求超时时间
+  timeout: 90000 // 请求超时时间
 })
 
 const err = (error) => {

+ 18 - 9
src/views/order/orderDetailDrawer.vue

@@ -1,12 +1,6 @@
 <template>
   <!-- 订单数据 详情 -->
-  <a-drawer
-    title="详情"
-    width="89%"
-    placement="right"
-    :closable="true"
-    :visible="visible"
-    @close="onClose">
+  <a-drawer title="详情" width="89%" placement="right" :closable="true" :visible="visible" @close="onClose">
     <!--主表信息 -->
     <a-card :bordered="true">
       <div class="table-page-search-wrapper">
@@ -148,7 +142,7 @@
         bordered
         :columns="childColumns"
         :data-source="childData"
-        :pagination="ipagination"
+        :pagination="pagination"
         :loading="loading"
         :scroll="{ x: 1500 }"
         @change="handleTableChange"
@@ -223,7 +217,12 @@ export default {
       orderDetail: [], // 主表信息
       childData: [], // 子表数据
       loading: false, // 表格加载
-
+      // 分页
+      pagination: {
+        // total: '',
+        // current: 0,
+        // pageSize: 0
+      },
       dateFormat: 'YYYY-MM-DD'
     }
   },
@@ -233,6 +232,16 @@ export default {
     onClose() {
       // 关闭抽屉
       this.visible = false
+    },
+    // 分页变化时触发
+    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()
     }
   },
   computed: {},

+ 17 - 11
src/views/order/orderList.vue

@@ -69,7 +69,7 @@
         <a-button type="primary" @click="synchronization" icon="reload">同步</a-button>
       </div>
 
-      <!-- 主表信息  rowKey="id" -->
+      <!-- 主表信息  rowKey="id"  :pagination="ipagination" -->
       <div>
         <a-table
           bordered
@@ -77,7 +77,7 @@
           :columns="orderLIstColumns"
           :data-source="orderListData"
           :loading="loading"
-          :pagination="ipagination"
+          :pagination="pagination"
           :scroll="{ x: 1500 }"
           @change="handleTableChange"
         >
@@ -89,7 +89,7 @@
       </div>
     </a-card>
     <!-- 订单数据明细 抽屉 -->
-    <orderDetail-drawer ref="orderDetailDrawer" :father="aa" @ok="modalFormOk"></orderDetail-drawer>
+    <orderDetail-drawer ref="orderDetailDrawer" @ok="modalFormOk"></orderDetail-drawer>
   </div>
 </template>
 
@@ -191,14 +191,13 @@ export default {
         customerAbbreviation: '',
         account: '',
         dilivery: '',
-        pageNo: '', // 初始页
-        pageSize: '-1' // 每页显示条数
+        pageNo: '' // 初始页
       },
       // 分页
       pagination: {
-        total: '',
-        current: 0,
-        pageSize: 0
+        // total: '',
+        // current: 0,
+        // pageSize: 0
       }
     }
   },
@@ -214,7 +213,6 @@ export default {
           if (res.success) {
             this.orderListData = res.result.records
             console.log('订单数据列表', this.orderListData)
-            // 分页信息赋值
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
@@ -265,8 +263,16 @@ export default {
     // 同步
     synchronization() {},
 
-    // father 抽屉方法
-    aa() {}
+    // 分页变化时触发
+    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() //重新渲染
+    }
   },
   computed: {},
   mounted() {}

+ 40 - 31
src/views/reportForms/dye-loss-table.vue

@@ -87,12 +87,11 @@
     <a-card :bordered="false">
       <div class="chart">
         <div class="someoneLossChart" v-if="queryParam.venName">
-          <!-- :fatherList="dyeLossRateData" -->
-          <someoneLossChart />
+          <someoneLossChart ref="someoneLossChart" />
         </div>
 
         <div v-else class="allLossChart">
-          <allLossChart :fatherList="dyeLossRateData" />
+          <allLossChart />
         </div>
       </div>
     </a-card>
@@ -107,7 +106,7 @@ import moment from 'moment'
 import allLossChart from '@views/reportForms/dye-loss-table/allLossChart.vue'
 import someoneLossChart from '@views/reportForms/dye-loss-table/someoneLossChart'
 
-import { dyeLossList } from '@api/reportForms/dye-loss-table.js'
+import { dyeLossList, exportXls } from '@api/reportForms/dye-loss-table.js'
 
 // import FileSaver from 'file-saver'
 // import XLSX from 'xlsx'
@@ -166,24 +165,22 @@ export default {
         // current: '', //当前页
         // pageSize: '' //一页多少
       },
-      cvenNameArr: [], //供应商数组 chart
-      cinvNameArr: [], //物料名称数组chart
-      colorArr: [] //颜色数组chart
+      someoneChartData: {
+        cvenNameArr: [], //供应商数组 chart
+        cinvNameArr: [], //物料名称数组chart
+        colorArr: [] //颜色数组chart
+      }
     }
   },
 
   // html渲染出来后,操作dom
   mounted() {
     this.cancelLoading()
-    this.initEcharts()
+    // this.initEcharts()
   },
 
   created() {
-    // setTimeout(() => {
-    //   this.loading = !this.loading
-    // }, 1000)
-    this.getdyeLossList()
-    //   // console.log('000')
+    this.getdyeLossList() //查询染损列表
   },
 
   methods: {
@@ -192,37 +189,36 @@ export default {
         this.loading = false
       }, 500)
     },
-    // 分页查询 染损列表
+
+    // 查询染损列表
     getdyeLossList() {
       this.$nextTick(() => {
         dyeLossList(this.queryParam).then(res => {
-          // console.log(res.result)
           if (res.success) {
             this.dyeLossRateData = res.result.records
-            console.log('染损列表', this.dyeLossRateData)
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
               pageSize: res.result.size
             }
-            console.log('分页器赋值:', this.pagination.total, this.pagination.current, this.pagination.pageSize)
+            // console.log('染损列表', this.dyeLossRateData)
           }
         })
       })
     },
-    // 分页变化时触发
-    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
-      // console.log('this.queryParam.pageNo', this.queryParam.pageNo)
-      this.getdyeLossList()
-    },
+
     // 查询按钮
     searchQuery() {
+      if (this.queryParam.venName) {
+        console.log('查询的是该供应商', this.queryParam.venName)
+        console.log('应该调指定供应商接口,渲染chart')
+        // 赋值给子组件作为接口参数
+        this.$refs.someoneLossChart.venName = this.queryParam.venName
+        console.log('[查询的供应商名称]', this.$refs.someoneLossChart.venName)
+        this.$refs.someoneLossChart.getSomeoneLossData()
+
+        console.log('父调子方法成功000')
+      }
       this.getdyeLossList() // 渲染染损列表
     },
     searchReset() {
@@ -230,19 +226,20 @@ export default {
       this.getdyeLossList()
     },
 
-    // 获取导出信息
-    // async getInfoXls(fileName) {},
     // 导出
     handleExportXls(fileName) {
       this.loading = false
       console.log('需导出的fileName:', fileName)
       const params = this.queryParam
       console.log('导出参数', params)
+      exportXls().then(res => {
+        console.log('导出', res.result)
+      })
     },
     // 合计行 TODO: table 单元格合并
     totalFooterShow(data) {
       if (data) {
-        console.log('需合计数据(合计行)data', data)
+        // console.log('需合计数据(合计行)data', data)
         return (
           <a-table
             rowKey={Math.random}
@@ -254,6 +251,18 @@ export default {
           ></a-table>
         )
       }
+    },
+
+    // 分页变化时触发
+    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
+      // console.log('this.queryParam.pageNo', this.queryParam.pageNo)
+      this.getdyeLossList()
     }
   },
   computed: {

+ 60 - 61
src/views/reportForms/dye-loss-table/allLossChart.vue

@@ -1,30 +1,51 @@
 <template>
-  <!-- 染损报表 未筛选供应商ref="chart" -->
-  <div id="allLossChart" :style="{ width: '100%', height: '600px' }" ref="container"></div>
+  <!-- 染损报表 所有供应商染损 -->
+  <div id="allLossChart" :style="{ width: '100%', height: '600px' }"></div>
 </template>
 
 <script>
 import * as echarts from 'echarts' //必须有
-// import echarts from '@views/reportForms/echarts'; 按需引入
+
+import { allLoss } from '@api/reportForms/dye-loss-table.js'
 export default {
   name: 'AllLossChart', // 所有供应商染损分析图
   data() {
-    return {}
-  },
-  props: {
-    fatherList: {
-      type: Object,
-      default: () => ({})
+    return {
+      // newData: {
+      cvenNameArr: [],
+      dyeLossRateArr: []
+      // }
     }
   },
+
   mounted() {
-    this.initEcharts()
+    this.getAllData()
   },
   methods: {
+    // 1、先获取 chart 数据
+    getAllData() {
+      allLoss().then(res => {
+        if (res.success) {
+          if (res.result) {
+            res.result.forEach(item => {
+              this.cvenNameArr.push(item.cvenName)
+              this.dyeLossRateArr.push(item.dyeLossRate)
+            })
+            console.log('供应商chart数组', this.cvenNameArr)
+            console.log('对应染损chart数组', this.dyeLossRateArr)
+          }
+          // console.log('00')
+        }
+        //2、执行chart
+        this.$nextTick(() => {
+          this.initEcharts()
+          // console.log('111')
+        })
+      })
+    },
+
     initEcharts() {
-      // 初始化 深色 ,'dark'
-       const myChart = echarts.init(this.$refs.container);
-      // const myChart = echarts.init(document.getElementById('allLossChart'))
+      const myChart = echarts.init(document.getElementById('allLossChart')) //dark ,深色主题
       // 配置
       const option = {
         title: {
@@ -35,12 +56,19 @@ export default {
         },
         tooltip: {},
         legend: {
-          data: ['染损']
+          textStyle: {
+            color: '#5470c6'
+          },
+          data: [
+            {
+              name: '染损',
+              icon: 'circle' // 图例的图标样式
+            }
+          ]
         },
         xAxis: {
           type: 'category',
-          // data: this.fatherList.cvenName
-          data: ['FASHIONTEX', 'HARMONY', 'MAO XING YUAN', 'RongSen', 'SLJ', 'TIMBERMET', '国运森']
+          data: this.cvenNameArr
         },
         yAxis: {
           type: 'value',
@@ -51,58 +79,29 @@ export default {
             name: '染损',
             type: 'line',
             smooth: true,
-            data: [5, 20, 36, 10, 10, 20],
-            // data: this.fatherList.dyeLossRate
-            //数据源
-            data:dataSources 
+            data: this.dyeLossRateArr
           }
         ]
       }
       // 渲染
       myChart.setOption(option)
+      //resize方法实现自动缩放
+      window.addEventListener('resize', this.chart.resize)
+    }
+  },
+
+  watch: {
+    // 3、监听数据变化
+    newData: {
+      deep: true,
+      handler() {
+        // 数据变化,执行
+        const { cvenNameArr, dyeLossRateArr } = this.newData
+        this.initEcharts(cvenNameArr, dyeLossRateArr)
+        console.log('333')
+      }
     }
   }
-  // 监视数据变化
-  // watch: {
-  //   fatherList: {
-  //     handler(newData) {
-  //       const myChart = echarts.init(this.$ref.chart)
-  //       this.option = {
-  //         // 工具提示
-  //         title: {
-  //           text: '所供应商物料染损统计图'
-  //         },
-  //         tooltip: {},
-  //         legend: {
-  //           data: ['染损']
-  //         },
-  //         xAxis: {
-  //           type: 'category',
-  //           data: newData.cvenName
-  //           // data: this.fatherList.cvenName
-  //           // data: ['FASHIONTEX', 'HARMONY', 'MAO XING YUAN', 'RongSen', 'SLJ', 'TIMBERMET', '国运森']
-  //         },
-  //         yAxis: {
-  //           type: 'value',
-  //           name: '(%)'
-  //         },
-  //         series: [
-  //           {
-  //             name: '损耗',
-  //             type: 'line',
-  //             smooth: true,
-  //             data: newData.dyeLossRate
-  //             // data: [5, 20, 36, 10, 10, 20]
-  //             // data: this.fatherList.dyeLossRate
-  //           }
-  //         ]
-  //       }
-  //        myChart.setOption(option) // 渲染页面
-  //     },
-  //     immediate: true, // 立即监视
-  //     deep: true
-  //   }
-  // }
 }
 </script>
 

+ 76 - 17
src/views/reportForms/dye-loss-table/someoneLossChart.vue

@@ -1,31 +1,81 @@
 <template>
-  <!-- 染损报表 中的 指定供应商 -->
+  <!-- 染损报表 指定供应商-->
   <div id="someoneLossChart" :style="{ width: '100%', height: '600px' }"></div>
 </template>
 
 <script>
 import * as echarts from 'echarts' //必须有
+
+import { someoneLoss } from '@api/reportForms/dye-loss-table.js'
 export default {
-  name: 'someoneLossChart', // 未筛选供应商,所有供应商染损分析图
+  name: 'SomeoneLossChart', // 指定供应商染损分析图
   data() {
-    return {}
+    return {
+      venName: '',
+      colorArr: [],
+      cinvNameArr: [],
+      cinvNameColorArr: [],
+      // newData: {
+      // cvenNameArr: [],
+      dyeLossRateArr: []
+      // }
+    }
   },
+
   mounted() {
-    this.initEcharts()
+    this.getSomeoneLossData()
   },
   methods: {
+    // 1、先获取 chart 数据
+    getSomeoneLossData() {
+      someoneLoss({ venName: this.venName }).then(res => {
+        if (res.success) {
+          // console.log('this.venName', this.venName)
+          // console.log('指定供应商返回数据', res.result)
+          res.result.forEach(item => {
+            this.cinvNameColorArr.push(item.cinvNameColor)
+            this.dyeLossRateArr.push(item.dyeLossRate)
+          })
+          //截取指定下标数据
+          this.cinvNameColorArr = this.cinvNameColorArr.slice(0, 10)
+          this.dyeLossRateArr = this.dyeLossRateArr.slice(0, 10)
+
+          console.log('物料+颜色chart数组', this.cinvNameColorArr)
+          console.log('染损chart数组', this.dyeLossRateArr)
+        }
+        //2、执行chart
+        this.$nextTick(() => {
+          this.initEcharts()
+          // console.log('111')
+        })
+      })
+    },
+
     initEcharts() {
+      const myChart = echarts.init(document.getElementById('someoneLossChart')) //dark ,深色主题
+      // 配置
       const option = {
         title: {
-          type: 'category',
-          text: '物料染损分析图(指定供应商)'
+          text: '指定供应商物料染损统计图',
+          textStyle: {
+            color: '#5470c6'
+          }
         },
         tooltip: {},
         legend: {
-          data: ['损耗']
+          textStyle: {
+            color: '#5470c6'
+          },
+          data: [
+            {
+              name: '染损',
+              icon: 'circle' // 图例的图标样式
+            }
+          ]
         },
         xAxis: {
-          data: this.list.oooo
+          type: 'category',
+          data: this.cinvNameColorArr
         },
         yAxis: {
           type: 'value',
@@ -33,21 +83,30 @@ export default {
         },
         series: [
           {
-            name: '损',
+            name: '损',
             type: 'line',
             smooth: true,
-            data: [5, 20, 36, 10, 10, 20]
+            data: this.dyeLossRateArr
           }
         ]
       }
-      //深色 ,'dark'
-      const myChart = echarts.init(document.getElementById('someoneLossChart')) // 图标初始化
-      myChart.setOption(option) // 渲染页面
+      // 渲染
+      myChart.setOption(option)
+      //resize方法实现自动缩放
+      window.addEventListener('resize', this.chart.resize)
+    }
+  },
 
-      //随着屏幕大小调节图表
-      window.addEventListener('resize', () => {
-        myChart.resize()
-      })
+  watch: {
+    // 3、监听数据变化
+    newData: {
+      deep: true,
+      handler() {
+        // 数据变化,执行
+        const { cvenNameArr, dyeLossRateArr } = this.newData
+        this.initEcharts(cvenNameArr, dyeLossRateArr)
+        console.log('333')
+      }
     }
   }
 }

+ 61 - 18
src/views/reportForms/supply-capacity-table.vue

@@ -78,18 +78,18 @@
     <a-card :bordered="false" style="marginTop:10px;">
       <div class="table-operator">
         <a-button type="primary" @click="handleExportXls('供应链产能报表')" icon="download">合并导出</a-button>
-        <a-button type="primary" @click="monthlySupplyExport" icon="download">月份供应商合计导出</a-button>
-        <a-button type="primary" @click="monthlyDepartExport" icon="download">月份部门合计导出</a-button>
+        <a-button type="primary" @click="monthSupplyExport" icon="download">月份供应商合计导出</a-button>
+        <a-button type="primary" @click="monthDepartExport" icon="download">月份部门合计导出</a-button>
       </div>
 
-      <!-- 合计 table  rowKey="id" :scroll="{ x: 1500 }"  -->
+      <!-- 合计 table  rowKey="id" :scroll="{ x: 1500 }" :pagination="ipagination  -->
       <a-table
         bordered
         :row-key="record => record.id"
         :columns="supplyCapacityColumns"
         :data-source="supplyCapacityData"
         :loading="loading"
-        :pagination="ipagination"
+        :pagination="pagination"
         @change="handleTableChange"
       >
       </a-table>
@@ -102,7 +102,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 
-import { supplyCapList } from '@api/reportForms/supply-capacity-table'
+import { supplyCapList, handleXls, monthSupplyXls, monthDepartXls } from '@api/reportForms/supply-capacity-table'
 
 export default {
   name: 'SupplyCapacityTable', // 供应商产能报表
@@ -185,19 +185,19 @@ export default {
         cVenCode: '',
         cPlanLotNumber: '',
         pageNo: '', // 当前页
-        pageSize: '-1' // 页面大小
       },
       // 分页
       pagination: {
-        total: '',
-        current: 0,
-        pageSize: 0
+        // total: '',
+        // current: 0,
+        // pageSize: 0
       },
       dateFormat: 'YYYY-MM-DD'
     }
   },
   created() {
-    this.getSupplyCapList() // 渲染供应链产能报表
+    this.getSupplyCapList() // 渲染 供应链产能报表
+    console.log('000')
   },
 
   methods: {
@@ -205,30 +205,73 @@ export default {
     getSupplyCapList() {
       this.$nextTick(() => {
         supplyCapList(this.queryParam).then(res => {
+          console.log('111')
           if (res.success) {
-            console.log('查询结果:', res.result)
-            this.supplyCapacityData = res.result
+            console.log('222')
+            this.supplyCapacityData = res.result.records
+            console.log('【供应商产能报表数据】:', this.supplyCapacityData)
+            this.pagination = {
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
           }
         })
       })
     },
+
+    //合并导出
+    handleExportXls() {
+      handleXls().then(res => {
+        console.log('000')
+        if (res.success) {
+          console.log('月份供应链合计导出', res.result)
+          console.log('请求接口成功')
+        }
+      })
+    },
+
     // 月份供应链合计导出
-    monthlySupplyExport() {},
+    monthSupplyExport() {
+      monthSupplyXls().then(res => {
+        console.log('000')
+        if (res.success) {
+          console.log('月份供应链合计导出', res.result)
+          console.log('请求接口成功')
+        }
+      })
+    },
     // 月份部门合计导出
-    monthlyDepartExport() {},
+    monthDepartExport() {
+      monthDepartXls().then(res => {
+        console.log('000')
+        if (res.success) {
+          console.log('月份供应链合计导出', res.result)
+          console.log('请求接口成功')
+        }
+      })
+    },
 
     // 查询按钮
     searchQuery() {
       this.getSupplyCapList()
     },
     searchReset() {
-      // console.log('>>>>重置')
       this.queryParam = {}
       this.getSupplyCapList()
+    },
+
+    // 分页变化时触发
+    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.getSupplyCapList()
     }
-  },
-  computed: {},
-  mounted() {}
+  }
 }
 </script>
 <style lang="less" scoped>

+ 61 - 43
src/views/shipment-details/addShipDetDrawer.vue

@@ -120,14 +120,14 @@
                   <a-input placeholder="请输入中文品名" v-model="addShipDet.chineseName"></a-input>
                 </a-form-model-item>
               </a-col>
-          
+
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="英文品名" prop="englishProductName">
                   <a-input placeholder="请输入英文品名" v-model="addShipDet.englishProductName"></a-input>
                 </a-form-model-item>
-              </a-col> 
+              </a-col>
 
-                 <a-col :md="6" :sm="8">
+              <a-col :md="6" :sm="8">
                 <a-form-model-item label="报关品名" prop="declarationName">
                   <a-input placeholder="请输入报关品名" v-model="addShipDet.declarationName"></a-input>
                 </a-form-model-item>
@@ -139,6 +139,11 @@
                 </a-form-model-item>
               </a-col>
 
+              <a-col :md="6" :sm="8">
+                <a-form-model-item label="整单合计" prop="wholeOrderTotal">
+                  <a-input placeholder="整单合计" v-model="addShipDet.wholeOrderTotal"></a-input>
+                </a-form-model-item>
+              </a-col>
               <!-- <a-col :md="6" :sm="8">
                 <a-form-model-item label="报关单价" prop="customsDeclarationUnitPrice">
                   <a-input placeholder="请输入报关单价" v-model="addShipDet.customsDeclarationUnitPrice"></a-input>
@@ -185,7 +190,7 @@
               </template>
 
               <!-- 发货数量 :rules="rules.shipQuantity"-->
-              <template slot="shipQuantity" slot-scope="text, record, index">
+              <template slot="shipmentQuantity" slot-scope="text, record, index">
                 <a-form-model-item prop="shipmentQuantity">
                   <a-input style="width:100%" type="text" v-model="record.shipmentQuantity" />
                 </a-form-model-item>
@@ -209,48 +214,48 @@
                   <a-input style="width:100%" type="text" v-model="record.materialComposition" />
                 </a-form-model-item>
               </template>
-              
+
               <!-- 采购/委外订单号 :rules="rules.purOrSubOrder"-->
               <template slot="purOrSubOrder" slot-scope="text, record, index">
                 <a-form-model-item prop="purOrSubOrder">
                   <a-input style="width:100%" type="text" v-model="record.purOrSubOrder" />
                 </a-form-model-item>
               </template>
-              
-               <!-- 报关单价 :rules="rules.customsDeclarationUnitPrice"-->
+
+              <!-- 报关单价 :rules="rules.customsDeclarationUnitPrice"-->
               <template slot="customsDeclarationUnitPrice" slot-scope="text, record, index">
                 <a-form-model-item prop="customsDeclarationUnitPrice">
                   <a-input style="width:100%" type="text" v-model="record.customsDeclarationUnitPrice" />
                 </a-form-model-item>
               </template>
-               <!-- 套装件数 :rules="rules.numberOfSets"-->
-               <template slot="numberOfSets" slot-scope="text, record, index">
+              <!-- 套装件数 :rules="rules.numberOfSets"-->
+              <template slot="numberOfSets" slot-scope="text, record, index">
                 <a-form-model-item prop="numberOfSets">
                   <a-input style="width:100%" type="text" v-model="record.numberOfSets" />
                 </a-form-model-item>
               </template>
-              
+
               <!-- 工厂单价 :rules="rules.factoryUnitPrice"-->
-               <template slot="factoryUnitPrice" slot-scope="text, record, index">
+              <template slot="factoryUnitPrice" slot-scope="text, record, index">
                 <a-form-model-item prop="factoryUnitPrice">
                   <a-input style="width:100%" type="text" v-model="record.factoryUnitPrice" />
                 </a-form-model-item>
               </template>
-              
-                <!-- 申报要素 :rules="rules.declarationElements"-->
-               <template slot="declarationElements" slot-scope="text, record, index">
+
+              <!-- 申报要素 :rules="rules.declarationElements"-->
+              <template slot="declarationElements" slot-scope="text, record, index">
                 <a-form-model-item prop="declarationElements">
                   <a-input style="width:100%" type="text" v-model="record.declarationElements" />
                 </a-form-model-item>
               </template>
-                <!-- 中文品名 :rules="rules.chineseName"-->
-               <!-- <template slot="chineseName" slot-scope="text, record, index">
+              <!-- 中文品名 :rules="rules.chineseName"-->
+              <!-- <template slot="chineseName" slot-scope="text, record, index">
                 <a-form-model-item prop="chineseName">
                   <a-input style="width:100%" type="text" v-model="record.chineseName" />
                 </a-form-model-item>
               </template> -->
-                <!-- 英文品名 :rules="rules.englishName"-->
-               <!-- <template slot="englishName" slot-scope="text, record, index">
+              <!-- 英文品名 :rules="rules.englishName"-->
+              <!-- <template slot="englishName" slot-scope="text, record, index">
                 <a-form-model-item prop="englishName">
                   <a-input style="width:100%" type="text" v-model="record.englishName" />
                 </a-form-model-item>
@@ -345,6 +350,7 @@ export default {
           width: 180,
           className: 'replacecolor'
         },
+
         // {
         //   title: '创建时间',
         //   dataIndex: 'createTime',
@@ -369,7 +375,7 @@ export default {
 
         {
           title: '客户订单',
-          dataIndex: 'customerOrderNumber',
+          dataIndex: 'customerOrder',
           width: 120,
 
           className: 'replacecolor'
@@ -392,23 +398,23 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
-         {
+        {
           title: '采购/委外订单号',
           dataIndex: 'purOrSubOrder',
           scopedSlots: { customRender: 'purOrSubOrder' },
-         // fixed: 'left',
+          // fixed: 'left',
           width: 180,
           className: 'replacecolor'
         },
-         {
+        {
           title: ' 报关单价',
           dataIndex: 'customsDeclarationUnitPrice',
           scopedSlots: { customRender: 'customsDeclarationUnitPrice' },
-         // fixed: 'left',
+          // fixed: 'left',
           width: 180,
           className: 'replacecolor'
         },
-       
+
         {
           title: '订单数量',
           dataIndex: 'orderQuantity',
@@ -424,13 +430,13 @@ export default {
 
         {
           title: '发货数量',
-          dataIndex: 'shipQuantity',
-          scopedSlots: { customRender: 'shipQuantity' },
+          dataIndex: 'shipmentQuantity',
+          scopedSlots: { customRender: 'shipmentQuantity' },
           width: 120,
           className: 'replacecolor'
         },
-        
-         {
+
+        {
           title: '套装件数',
           dataIndex: 'numberOfSets',
           scopedSlots: { customRender: 'numberOfSets' },
@@ -477,12 +483,11 @@ export default {
           className: 'replacecolor'
         },
         // {
-        //   title: '数量(合计)',
+        //   title: '整单(合计)',
         //   dataIndex: 'wholeOrderTotal',
         //   width: 120,
         //   className: 'replacecolor'
         // },
-
         {
           title: '销售部门',
           dataIndex: 'salesDepartment',
@@ -581,7 +586,7 @@ export default {
         //   scopedSlots: { customRender: 'chineseName' },
         //   className: 'replacecolor'
         // },
-        
+
         // {
         //   title: '英文品名',
         //   dataIndex: 'englishName',
@@ -603,6 +608,18 @@ export default {
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
+        {
+          title: '订单子表ID',
+          dataIndex: 'syOrderDataItemId',
+          width: 80,
+          className: 'replacecolor'
+        },
+        {
+          title: '订单主表ID',
+          dataIndex: 'syOrderDataId',
+          width: 80,
+          className: 'replacecolor'
+        },
         {
           title: '操作',
           dataIndex: 'operation',
@@ -636,11 +653,12 @@ export default {
   methods: {
     getSon(val) {
       console.log('勾选订单数据', val)
-     for(var i in val) {
-       val[i]['orderQuantity'] = val[i].quantity;
-       val[i]['orderRemainingQuantity'] = val[i].surplusNum;
-       val[i]['salesUnitPrice'] = val[i].unitPriceIncludingTax;
-     }
+      for (var i in val) {
+        val[i]['orderQuantity'] = val[i].quantity
+        val[i]['orderRemainingQuantity'] = val[i].surplusNum
+        val[i]['salesUnitPrice'] = val[i].unitPriceIncludingTax
+        val[i]['customerOrder'] = val[i].customerOrderNumber
+      }
       this.msgFormSon = val
       this.syShippingDetailsItemList = this.msgFormSon
       console.log('新增页 子表信息', this.syShippingDetailsItemList)
@@ -665,17 +683,17 @@ export default {
       // newObj.todo = this.addShipDet.todo //数量(合计)
       // newObj.salesUnitPrice = this.addShipDet.salesUnitPrice
       // newObj.purOrSubOrder = this.addShipDet.purOrSubOrder
-       newObj.orderType = this.addShipDet.orderType
+      newObj.orderType = this.addShipDet.orderType
       // newObj.factoryUnitPrice = this.addShipDet.factoryUnitPrice
       // newObj.declarationElements = this.addShipDet.declarationElements
       // newObj.numberOfSets = this.addShipDet.numberOfSets
-       newObj.chineseName = this.addShipDet.chineseName
-       newObj.englishProductName = this.addShipDet.englishProductName
-       newObj.garmentFactory = this.addShipDet.garmentFactory
-       newObj.hsCode = this.addShipDet.hsCode
-       newObj.declarationName = this.addShipDet.declarationName
+      newObj.chineseName = this.addShipDet.chineseName
+      newObj.englishProductName = this.addShipDet.englishProductName
+      newObj.garmentFactory = this.addShipDet.garmentFactory
+      newObj.hsCode = this.addShipDet.hsCode
+      newObj.declarationName = this.addShipDet.declarationName
       // newObj.customsDeclarationUnitPrice = this.addShipDet.customsDeclarationUnitPrice
-
+      newObj.wholeOrderTotal = this.addShipDet.wholeOrderTotal
       newObj.memo = this.addShipDet.memo // U8系统适用
       newObj.syShippingDetailsItemList = this.syShippingDetailsItemList // 子表信息赋值
 

+ 31 - 37
src/views/shipment-details/editShipDetDrawer.vue

@@ -1,20 +1,14 @@
 <template>
   <!-- 编辑发运明细 -->
   <div id="editShipDetDrawer">
-    <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="editShipDet" >
+          <a-form-model layout="inline" ref="form" :model="editShipDet">
             <!-- 主表信息 填写-->
             <a-row :gutter="24">
-               <a-col :md="6" :sm="8">
+              <a-col :md="6" :sm="8">
                 <!-- required必填项 disabled 禁用  -->
                 <a-form-model-item label="单据号" prop="documentNo">
                   <a-input placeholder="请输入单据号" v-model="editShipDet.documentNo"></a-input>
@@ -119,14 +113,14 @@
                   <a-input placeholder="请输入中文品名" v-model="editShipDet.chineseName"></a-input>
                 </a-form-model-item>
               </a-col>
-          
+
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="英文品名" prop="englishProductName">
                   <a-input placeholder="请输入英文品名" v-model="editShipDet.englishProductName"></a-input>
                 </a-form-model-item>
-              </a-col> 
+              </a-col>
 
-                 <a-col :md="6" :sm="8">
+              <a-col :md="6" :sm="8">
                 <a-form-model-item label="报关品名" prop="declarationName">
                   <a-input placeholder="请输入报关品名" v-model="editShipDet.declarationName"></a-input>
                 </a-form-model-item>
@@ -163,7 +157,7 @@
 
         <!-- 子表  :model="form" :rules="validatorRules"-->
         <a-spin :spinning="confirmLoading">
-          <a-form-model ref="formRef" >
+          <a-form-model ref="formRef">
             <a-table
               v-if="syShippingDetailsItemList"
               bordered
@@ -207,48 +201,48 @@
                   <a-input style="width:100%" type="text" v-model="record.materialComposition" />
                 </a-form-model-item>
               </template>
-              
+
               <!-- 采购/委外订单号 :rules="rules.purOrSubOrder"-->
               <template slot="purOrSubOrder" slot-scope="text, record, index">
                 <a-form-model-item prop="purOrSubOrder">
                   <a-input style="width:100%" type="text" v-model="record.purOrSubOrder" />
                 </a-form-model-item>
               </template>
-              
-               <!-- 报关单价 :rules="rules.customsDeclarationUnitPrice"-->
+
+              <!-- 报关单价 :rules="rules.customsDeclarationUnitPrice"-->
               <template slot="customsDeclarationUnitPrice" slot-scope="text, record, index">
                 <a-form-model-item prop="customsDeclarationUnitPrice">
                   <a-input style="width:100%" type="text" v-model="record.customsDeclarationUnitPrice" />
                 </a-form-model-item>
               </template>
-               <!-- 套装件数 :rules="rules.numberOfSets"-->
-               <template slot="numberOfSets" slot-scope="text, record, index">
+              <!-- 套装件数 :rules="rules.numberOfSets"-->
+              <template slot="numberOfSets" slot-scope="text, record, index">
                 <a-form-model-item prop="numberOfSets">
                   <a-input style="width:100%" type="text" v-model="record.numberOfSets" />
                 </a-form-model-item>
               </template>
-              
+
               <!-- 工厂单价 :rules="rules.factoryUnitPrice"-->
-               <template slot="factoryUnitPrice" slot-scope="text, record, index">
+              <template slot="factoryUnitPrice" slot-scope="text, record, index">
                 <a-form-model-item prop="factoryUnitPrice">
                   <a-input style="width:100%" type="text" v-model="record.factoryUnitPrice" />
                 </a-form-model-item>
               </template>
-              
-                <!-- 申报要素 :rules="rules.declarationElements"-->
-               <template slot="declarationElements" slot-scope="text, record, index">
+
+              <!-- 申报要素 :rules="rules.declarationElements"-->
+              <template slot="declarationElements" slot-scope="text, record, index">
                 <a-form-model-item prop="declarationElements">
                   <a-input style="width:100%" type="text" v-model="record.declarationElements" />
                 </a-form-model-item>
               </template>
-                <!-- 中文品名 :rules="rules.chineseName"-->
-               <!-- <template slot="chineseName" slot-scope="text, record, index">
+              <!-- 中文品名 :rules="rules.chineseName"-->
+              <!-- <template slot="chineseName" slot-scope="text, record, index">
                 <a-form-model-item prop="chineseName">
                   <a-input style="width:100%" type="text" v-model="record.chineseName" />
                 </a-form-model-item>
               </template> -->
-                <!-- 英文品名 :rules="rules.englishName"-->
-               <!-- <template slot="englishName" slot-scope="text, record, index">
+              <!-- 英文品名 :rules="rules.englishName"-->
+              <!-- <template slot="englishName" slot-scope="text, record, index">
                 <a-form-model-item prop="englishName">
                   <a-input style="width:100%" type="text" v-model="record.englishName" />
                 </a-form-model-item>
@@ -310,7 +304,7 @@ export default {
     return {
       id: '',
       // 表头
-       columns: [
+      columns: [
         {
           title: '账套',
           dataIndex: 'account',
@@ -380,23 +374,23 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
-         {
+        {
           title: '采购/委外订单号',
           dataIndex: 'purOrSubOrder',
           scopedSlots: { customRender: 'purOrSubOrder' },
-         // fixed: 'left',
+          // fixed: 'left',
           width: 180,
           className: 'replacecolor'
         },
-         {
+        {
           title: ' 报关单价',
           dataIndex: 'customsDeclarationUnitPrice',
           scopedSlots: { customRender: 'customsDeclarationUnitPrice' },
-         // fixed: 'left',
+          // fixed: 'left',
           width: 180,
           className: 'replacecolor'
         },
-       
+
         {
           title: '订单数量',
           dataIndex: 'orderQuantity',
@@ -417,8 +411,8 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
-        
-         {
+
+        {
           title: '套装件数',
           dataIndex: 'numberOfSets',
           scopedSlots: { customRender: 'numberOfSets' },
@@ -465,7 +459,7 @@ export default {
           className: 'replacecolor'
         },
         // {
-        //   title: '数量(合计)',
+        //   title: '整单(合计)',
         //   dataIndex: 'wholeOrderTotal',
         //   width: 120,
         //   className: 'replacecolor'
@@ -569,7 +563,7 @@ export default {
         //   scopedSlots: { customRender: 'chineseName' },
         //   className: 'replacecolor'
         // },
-        
+
         // {
         //   title: '英文品名',
         //   dataIndex: 'englishName',

+ 24 - 2
src/views/shipment-details/referOrderDataModal.vue

@@ -322,6 +322,28 @@ export default {
           dataIndex: 'orderChangeDescription',
           width: 220,
           customRender: t => ellipsis(t),
+          className: 'replacecolor'
+        },
+        {
+          title: '订单主表ID',
+          dataIndex: 'syOrderDataId',
+          width: 120,
+          //  colSpan:0,     //隐藏表头
+          //     customRender: (value, row, index) => {
+          //         let obj = {
+          //             children: value,
+          //             attrs: {},
+          //         };
+          //         obj.attrs.colSpan = 0;
+          //         return obj;
+          //     },
+          className: 'replacecolor1'
+        },
+        {
+          title: '订单子表ID',
+          dataIndex: 'syOrderDataItemId',
+          width: 120,
+
           className: 'replacecolor'
         }
       ],
@@ -445,7 +467,7 @@ export default {
 /deep/ .ant-table-tbody {
   text-align: center;
 }
-// th.replacecolor {
-// background-color:  #ccc;
+// /deep/ th.replacecolor1 {
+// display: none;
 // }
 </style>

+ 1 - 1
src/views/shipment-details/shipmentList.vue

@@ -484,7 +484,7 @@ export default {
               current: res.result.current,
               pageSize: res.result.size
             }
-            console.log('分页器赋值:', this.pagination.total, this.pagination.current, this.pagination.pageSize)
+            // console.log('分页器赋值:', this.pagination.total, this.pagination.current, this.pagination.pageSize)
           }
         })
       })