Просмотр исходного кода

报表 - 订单统计表 所有接口(面板无当前月文字显示)

liangy 2 лет назад
Родитель
Сommit
3093d8d2f2

+ 1 - 1
src/api/document/advance-packingList.js

@@ -2,7 +2,7 @@
 import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
 
 // 分页列表查询
-const getadPaList = params => getAction('/spapl/syPreAssembledPackingList/list', params)
+const getadPaList = params => getAction('/spapl/syPreAssembledPackingList/list2', params)
 
 // 新增
 const addAdvPac = params => postAction('/spapl/syPreAssembledPackingList/add', params)

+ 1 - 1
src/components/layouts/TabLayout.vue

@@ -212,7 +212,7 @@
           this.$message.warning('这是最后一页,不能再关闭了啦')
           return
         }
-        console.log("this.pageList ",this.pageList );
+        // console.log("this.pageList ",this.pageList );
         let removeRoute = this.pageList.filter(item => item.fullPath == key)
         this.pageList = this.pageList.filter(item => item.fullPath !== key)
         let index = this.linkList.indexOf(key)

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

@@ -199,7 +199,7 @@ import editAdpackingDrawer from '@views/advance-packingList/editAdpackingDrawer.
 import { getadPaList } from '@api/document/advance-packingList.js'
 
 export default {
-  productName: 'AdPaListClothes', // 预装线单-成衣
+  productName: 'AdPaListClothes', // 预装单-成衣
   mixins: [JeecgListMixin],
   components: { JEllipsis, moment, addAdpackingDrawer, detailsAdpackingDrawer, editAdpackingDrawer },
 
@@ -435,7 +435,7 @@ export default {
 
     // 新增
     addAdpacking() {
-      // console.log('新增预装箱单')
+      console.log('新增预装箱单')
       this.$refs.addAdpackingDrawer.visible = true
     },
 

+ 4 - 2
src/views/advance-packingList/addAdpackingDrawer.vue

@@ -466,7 +466,8 @@ export default {
       dateFormat: 'YYYY-MM-DD',
 
       addAdpacking: {}, //主表信息
-      confirmLoading: false
+      confirmLoading: false,
+      msgFormSon: 'test' // 子组件传来数据的变量
       // state: '0', // 单据状态初始未【仅保存】
       // pushState: '0' // 推送状态初始未【仅保存】
 
@@ -521,7 +522,8 @@ export default {
       newObj.memo = this.addAdpacking.memo
       newObj.garmentFactory = this.addAdpacking.garmentFactory
 
-      newObj.data = this.data // 子表信息赋值
+      newObj.data = this.data // 子表信息赋值F
+       newObj.outerBoxWidth = this.data.outerBoxWidth
 
       // 必须选择子表 --- 参照订单数据
       if (newObj.data.length == 0) {

+ 19 - 21
src/views/advance-packingList/referShipmentDetailsModal.vue

@@ -81,7 +81,7 @@ export default {
         {
           title: '单据号',
           dataIndex: 'documentNo',
-          width: 120,
+          width: 160,
           fixed: 'left',
           className: 'replacecolor'
         },
@@ -108,7 +108,7 @@ export default {
         {
           title: '业务员',
           dataIndex: 'salesman',
-          width: 120,
+          width: 100,
           className: 'replacecolor'
         },
 
@@ -161,13 +161,13 @@ export default {
         {
           title: '存货名称',
           dataIndex: 'inventoryName',
-          width: 120,
+          width: 220,
           className: 'replacecolor'
         },
         {
           title: '数量(合计)',
-          dataIndex: 'bb',
-          width: 120,
+          dataIndex: 'shipmentQuantity',
+          width: 100,
           className: 'replacecolor'
         },
 
@@ -180,7 +180,7 @@ export default {
         {
           title: '采购/委外订单号',
           dataIndex: 'purOrSubOrder',
-          width: 120,
+          width: 140,
           className: 'replacecolor'
         },
         {
@@ -190,23 +190,26 @@ export default {
           className: 'replacecolor'
         },
         {
-          title: '工厂单价(采购/委外单价)',
+          // (采购/委外单价)
+          title: '工厂单价',
           dataIndex: 'factoryUnitPrice',
-          width: 120,
+          width: 100,
           className: 'replacecolor'
         },
         {
-          title: '申报要素(单证维护)',
+          // (单证维护)
+          title: '申报要素',
           dataIndex: 'declarationElements',
-          width: 140,
+          width: 120,
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
 
         {
-          title: '套装件数(存货自定义项)',
+          // (存货自定义项)
+          title: '套装件数',
           dataIndex: 'numberOfSets',
-          width: 120,
+          width: 100,
           className: 'replacecolor'
         },
         {
@@ -283,9 +286,7 @@ export default {
         shipList(this.queryParam).then(res => {
           // console.log('参照订单数据res', res)
           if (res.success) {
-            // 后台数据赋值给参照订单数据
             this.data = res.result.records
-            // console.log('新增参照订单数据', this.data)
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
@@ -299,10 +300,7 @@ export default {
     // 弹框确定
     onSubmit() {
       if (this.selectedRowKeys.length == 0) {
-        this.$message.error('请勾选参照发运明细')
-      }
-      if ((this.selectedRowKeys.length = 2 || this.selectedRowKeys.length > 1)) {
-        alert('error')
+        this.$message.error('请勾选发运明细')
       } else {
         // console.log('需要传给父组件的数据', this.selectedRows)
         // bao父组件指定的传数据绑定的函数 || this.selectedRows子组件给父组件传递的数据
@@ -382,7 +380,7 @@ export default {
   text-align: center;
 }
 
-// /deep/ th.replacecolor {
-//   background-color: #ccc;
-// }
+/deep/ th.replacecolor {
+  background-color: #ccc !important;
+}
 </style>

+ 62 - 26
src/views/reportForms/order-statistics/chart/external/customerChart.vue

@@ -1,10 +1,11 @@
 <template>
   <!-- 客户统计图 外部  报表 订单统计  -->
-  <div id="customerChart" :style="{ width: '100%', height: '600px' }"></div>
+  <div id="customerChart" :style="{ width: '100%', height: '500px' }"></div>
 </template>
 
 <script>
 import * as echarts from 'echarts'
+
 import { cusChart } from '@api/reportForms/order-statistics.js'
 
 export default {
@@ -12,15 +13,14 @@ export default {
   data() {
     return {
       queryParam: {
-        department: '',
-        endYearMonth: '',
-        startYearMonth: '',
         vendorType: '外部'
+        // department: '',
+        // endYearMonth: '',
+        // startYearMonth: '',
         // cvenAbbName: ''供应商
       },
       // newData: {
-      cvenAbbNameArr: [],
-      // departmentArr:[],
+      ccusNameArr: [], //客户 数组
       iquantityArr: [],
       inatMoneyArr: []
       // }
@@ -28,20 +28,60 @@ export default {
   },
 
   mounted() {
-    this.getCusChartData()
+    // this.getCusChartData()
+  },
+  created() {
+    // 初次加载当月
+    this.firstCusData()
   },
+  
   methods: {
-    // 1、先获取 chart 数据
+    // 初次加载
+    firstCusData() {
+      this.$nextTick(() => {
+        let nowDate = new Date()
+        let date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1
+        }
+        if (date.month >= 1 && date.month <= 9) {
+          date.month = '0' + date.month
+        }
+        var time = date.year + '-' + date.month
+
+        this.queryParam.startYearMonth = time
+        this.queryParam.endYearMonth = time
+        cusChart(this.queryParam).then(res => {
+          if (res.result) {
+            // console.log('部门统计图数据', res.result)
+            res.result.forEach(item => {
+              this.ccusNameArr.push(item.ccusName)
+              this.iquantityArr.push(item.iquantity)
+              this.inatMoneyArr.push(item.inatMoney)
+            })
+            // console.log('部门三数组', this.ccusNameArr, this.iquantityArr, this.inatMoneyArr)
+          }
+
+          //2、后图
+          this.$nextTick(() => {
+            this.initEcharts()
+          })
+        })
+      })
+    },
+
+    // 1、查询 重置方法 先获取 chart 数据
     getCusChartData() {
+      this.queryParam.vendorType = '外部'
       cusChart(this.queryParam).then(res => {
         if (res.success) {
           // console.log('客户统计图数据', res.result)
           res.result.forEach(item => {
-            this.cvenAbbNameArr.push(item.cvenAbbName)
+            this.ccusNameArr.push(item.ccusName)
             this.iquantityArr.push(item.iquantity)
             this.inatMoneyArr.push(item.inatMoney)
           })
-          // console.log('三数组', this.cvenAbbNameArr, this.iquantityArr, this.inatMoneyArr)
+          // console.log('三数组', this.ccusNameArr, this.iquantityArr, this.inatMoneyArr)
         }
 
         //2、后图
@@ -83,10 +123,6 @@ export default {
           data: [
             '实际数量',
             '本币金额'
-            // {
-            //   name: '染损(%)',
-            //   icon: 'circle' // 图例的图标样式
-            // }
           ]
         },
         grid: {
@@ -107,7 +143,7 @@ export default {
           axisPointer: {
             type: 'shadow'
           },
-          data: this.cvenAbbNameArr
+          data: this.ccusNameArr
         },
         yAxis: [
           {
@@ -168,15 +204,15 @@ export default {
       }
       // 渲染
       myChart.setOption(option)
-      myChart.showLoading({
-        text: '暂无数据',
-        showSpinner: false, // 隐藏加载中的转圈动图
-        textColor: '#9d9d9d',
-        maskColor: 'rgba(255, 255, 255, 0.8)',
-        fontSize: '25px',
-        fontWeight: 'bold',
-        fontFamily: 'Microsoft YaHei'
-      })
+      // myChart.showLoading({
+      //   text: '暂无数据',
+      //   showSpinner: false, // 隐藏加载中的转圈动图
+      //   textColor: '#9d9d9d',
+      //   maskColor: 'rgba(255, 255, 255, 0.8)',
+      //   fontSize: '25px',
+      //   fontWeight: 'bold',
+      //   fontFamily: 'Microsoft YaHei'
+      // })
 
       window.addEventListener('resize', () => {
         if (myChart) {
@@ -191,8 +227,8 @@ export default {
     //     deep: true,
     //     handler() {
     //       //  数据变化,执行
-    //       const { cvenAbbNameArr, iquantityArr, inatMoneyArr } = this.newData
-    //       this.initEcharts(cvenAbbNameArr, iquantityArr, inatMoneyArr)
+    //       const { ccusNameArr, iquantityArr, inatMoneyArr } = this.newData
+    //       this.initEcharts(ccusNameArr, iquantityArr, inatMoneyArr)
     //       console.log('监听 外部客户 数据变化')
     //     }
     //   }

+ 56 - 17
src/views/reportForms/order-statistics/chart/external/departmentChart.vue

@@ -1,6 +1,6 @@
 <template>
   <!--  部门统计图  外部 报表 订单统计   -->
-  <div id="departmentChart" :style="{ width: '100%', height: '600px' }"></div>
+  <div id="departmentChart" :style="{ width: '100%', height: '500px' }"></div>
 </template>
 
 <script>
@@ -12,14 +12,13 @@ export default {
   name: 'DepartmentChart', // 部门统计图
   data() {
     return {
-      prop: {
+      queryParam: {
+        vendorType: '外部'
         // customer: '', //客户
         // endYearMonth: '',
         // startYearMonth: '',
-        vendorType: '外部'
         // cdepName: ''
       },
-
       // newData: {
       cdepNameArr: [], //部门 数组
       iquantityArr: [], //实际数量
@@ -29,12 +28,52 @@ export default {
   },
 
   mounted() {
-    this.getDepChartData()
+    // this.getDepChartData()
+  },
+  created() {
+    // 初次加载当月
+    this.firstDepData()
   },
   methods: {
-    // 1、先获取 chart 数据
+    // 初次加载
+    firstDepData() {
+      this.$nextTick(() => {
+        let nowDate = new Date()
+        let date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1
+        }
+        if (date.month >= 1 && date.month <= 9) {
+          date.month = '0' + date.month
+        }
+        var time = date.year + '-' + date.month
+
+        this.queryParam.startYearMonth = time
+        this.queryParam.endYearMonth = time
+        // this.queryParam.vendorType = '内部'
+        depChart(this.queryParam).then(res => {
+          if (res.result) {
+            // console.log('部门统计图数据', res.result)
+            res.result.forEach(item => {
+              this.cdepNameArr.push(item.cdepName)
+              this.iquantityArr.push(item.iquantity)
+              this.inatMoneyArr.push(item.inatMoney)
+            })
+            // console.log('部门三数组', this.cdepNameArr, this.iquantityArr, this.inatMoneyArr)
+          }
+
+          //2、后图
+          this.$nextTick(() => {
+            this.initEcharts()
+          })
+        })
+      })
+    },
+
+    // 1、查询 重置方法 先获取 chart 数据
     getDepChartData() {
-      depChart(this.prop).then(res => {
+      this.queryParam.vendorType = '外部'
+      depChart(this.queryParam).then(res => {
         if (res.result) {
           // console.log('部门统计图数据', res.result)
           res.result.forEach(item => {
@@ -163,16 +202,16 @@ export default {
       }
       // 渲染
       myChart.setOption(option)
-      myChart.showLoading({
-        text: '暂无数据',
-        showSpinner: false, // 隐藏加载中的转圈动图
-        textColor: '#9d9d9d',
-        maskColor: 'rgba(255, 255, 255, 0.8)',
-        fontSize: '25px',
-        fontWeight: 'bold',
-        height: '100px',
-        fontFamily: 'Microsoft YaHei'
-      })
+      // myChart.showLoading({
+      //   text: '暂无数据',
+      //   showSpinner: false, // 隐藏加载中的转圈动图
+      //   textColor: '#9d9d9d',
+      //   maskColor: 'rgba(255, 255, 255, 0.8)',
+      //   fontSize: '25px',
+      //   fontWeight: 'bold',
+      //   height: '100px',
+      //   fontFamily: 'Microsoft YaHei'
+      // })
 
       window.addEventListener('resize', () => {
         if (myChart) {

+ 62 - 27
src/views/reportForms/order-statistics/chart/interior/customerChart.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 客户统计图 内部  报表 订单统计  -->
-  <div id="customerChart" :style="{ width: '100%', height: '600px' }"></div>
+  <div id="customerChart" :style="{ width: '100%', height: '500px' }"></div>
 </template>
 
 <script>
@@ -12,16 +12,14 @@ export default {
   data() {
     return {
       queryParam: {
-        department: '',
-        endYearMonth: '',
-        startYearMonth: '',
         vendorType: '内部'
-
+        // department: '',
+        // endYearMonth: '',
+        // startYearMonth: ''
         // cvenAbbName: ''供应商
       },
       // newData: {
-      cvenAbbNameArr: [],
-      // departmentArr:[],
+      ccusNameArr: [],
       iquantityArr: [],
       inatMoneyArr: []
       // }
@@ -29,20 +27,61 @@ export default {
   },
 
   mounted() {
-    this.getCusChartData()
+    // this.getCusChartData()
+  },
+  created() {
+    // 初次加载当月
+    this.firstCusData()
   },
+
   methods: {
-    // 1、先获取 chart 数据
+    // 初次加载
+    firstCusData() {
+      this.$nextTick(() => {
+        let nowDate = new Date()
+        let date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1
+        }
+        if (date.month >= 1 && date.month <= 9) {
+          date.month = '0' + date.month
+        }
+        var time = date.year + '-' + date.month
+
+        this.queryParam.startYearMonth = time
+        this.queryParam.endYearMonth = time
+        // this.queryParam.vendorType = '内部'
+        cusChart(this.queryParam).then(res => {
+          if (res.result) {
+            // console.log('部门统计图数据', res.result)
+            res.result.forEach(item => {
+              this.ccusNameArr.push(item.ccusName)
+              this.iquantityArr.push(item.iquantity)
+              this.inatMoneyArr.push(item.inatMoney)
+            })
+            // console.log('部门三数组', this.ccusNameArr, this.iquantityArr, this.inatMoneyArr)
+          }
+
+          //2、后图
+          this.$nextTick(() => {
+            this.initEcharts()
+          })
+        })
+      })
+    },
+
+    // 1、查询 重置方法  先获取 chart 数据
     getCusChartData() {
+      this.queryParam.vendorType = '内部'
       cusChart(this.queryParam).then(res => {
         if (res.success) {
           // console.log('客户统计图数据', res.result)
           res.result.forEach(item => {
-            this.cvenAbbNameArr.push(item.cvenAbbName)
+            this.ccusNameArr.push(item.ccusName)
             this.iquantityArr.push(item.iquantity)
             this.inatMoneyArr.push(item.inatMoney)
           })
-          // console.log('三数组', this.cvenAbbNameArr, this.iquantityArr, this.inatMoneyArr)
+          // console.log('三数组', this.ccusNameArr, this.iquantityArr, this.inatMoneyArr)
         }
 
         //2、后图
@@ -84,10 +123,6 @@ export default {
           data: [
             '实际数量',
             '本币金额'
-            // {
-            //   name: '染损(%)',
-            //   icon: 'circle' // 图例的图标样式
-            // }
           ]
         },
         grid: {
@@ -108,7 +143,7 @@ export default {
           axisPointer: {
             type: 'shadow'
           },
-          data: this.cvenAbbNameArr
+          data: this.ccusNameArr
         },
         yAxis: [
           {
@@ -169,15 +204,15 @@ export default {
       }
       // 渲染
       myChart.setOption(option)
-      myChart.showLoading({
-        text: '暂无数据',
-        showSpinner: false, // 隐藏加载中的转圈动图
-        textColor: '#9d9d9d',
-        maskColor: 'rgba(255, 255, 255, 0.8)',
-        fontSize: '25px',
-        fontWeight: 'bold',
-        fontFamily: 'Microsoft YaHei'
-      })
+      // myChart.showLoading({
+      //   text: '暂无数据',
+      //   showSpinner: false, // 隐藏加载中的转圈动图
+      //   textColor: '#9d9d9d',
+      //   maskColor: 'rgba(255, 255, 255, 0.8)',
+      //   fontSize: '25px',
+      //   fontWeight: 'bold',
+      //   fontFamily: 'Microsoft YaHei'
+      // })
 
       window.addEventListener('resize', () => {
         if (myChart) {
@@ -192,8 +227,8 @@ export default {
     //     deep: true,
     //     handler() {
     //       //  数据变化,执行
-    //       const { cvenAbbNameArr, iquantityArr, inatMoneyArr } = this.newData
-    //       this.initEcharts(cvenAbbNameArr, iquantityArr, inatMoneyArr)
+    //       const { ccusNameArr, iquantityArr, inatMoneyArr } = this.newData
+    //       this.initEcharts(ccusNameArr, iquantityArr, inatMoneyArr)
     //       console.log('监听 外部客户 数据变化')
     //     }
     //   }

+ 58 - 16
src/views/reportForms/order-statistics/chart/interior/departmentChart.vue

@@ -1,6 +1,6 @@
 <template>
   <!--  部门统计图  内部 报表 订单统计   -->
-  <div id="departmentChart" :style="{ width: '100%', height: '600px' }"></div>
+  <div id="departmentChart" :style="{ width: '100%', height: '500px' }"></div>
 </template>
 
 <script>
@@ -13,10 +13,10 @@ export default {
   data() {
     return {
       queryParam: {
-        customer: '', //客户
-        endYearMonth: '',
-        startYearMonth: '',
         vendorType: '内部'
+        // customer: '', //客户
+        // endYearMonth: '',
+        // startYearMonth: '',
         // cdepName: ''部门
       },
 
@@ -29,11 +29,53 @@ export default {
   },
 
   mounted() {
-    this.getDepChartData()
+    // this.getDepChartData()
+  },
+  created() {
+    // 初次加载当月
+    this.firstDepData()
+    console.log('内 部门chart');
   },
   methods: {
-    // 1、先获取 chart 数据
+    // 初次加载
+    firstDepData() {
+      this.$nextTick(() => {
+        let nowDate = new Date()
+        let date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1
+        }
+        if (date.month >= 1 && date.month <= 9) {
+          date.month = '0' + date.month
+        }
+        var time = date.year + '-' + date.month
+
+        this.queryParam.startYearMonth = time
+        this.queryParam.endYearMonth = time
+        this.queryParam.vendorType = '内部'
+        depChart(this.queryParam).then(res => {
+          // console.log('2', this.queryParam)
+          if (res.result) {
+            // console.log('部门统计图数据', res.result)
+            res.result.forEach(item => {
+              this.cdepNameArr.push(item.cdepName)
+              this.iquantityArr.push(item.iquantity)
+              this.inatMoneyArr.push(item.inatMoney)
+            })
+            // console.log('部门三数组', this.cdepNameArr, this.iquantityArr, this.inatMoneyArr)
+          }
+
+          //2、后图
+          this.$nextTick(() => {
+            this.initEcharts()
+          })
+        })
+      })
+    },
+
+    // 1、查询 重置方法  先获取 chart 数据
     getDepChartData() {
+      this.queryParam.vendorType = '内部'
       depChart(this.queryParam).then(res => {
         if (res.result) {
           // console.log('部门统计图数据', res.result)
@@ -163,16 +205,16 @@ export default {
       }
       // 渲染
       myChart.setOption(option)
-      myChart.showLoading({
-        text: '暂无数据',
-        showSpinner: false, // 隐藏加载中的转圈动图
-        textColor: '#9d9d9d',
-        maskColor: 'rgba(255, 255, 255, 0.8)',
-        fontSize: '25px',
-       
-        fontWeight: 'bold',
-        fontFamily: 'Microsoft YaHei'
-      })
+      // myChart.showLoading({
+      //   text: '暂无数据',
+      //   showSpinner: false, // 隐藏加载中的转圈动图
+      //   textColor: '#9d9d9d',
+      //   maskColor: 'rgba(255, 255, 255, 0.8)',
+      //   fontSize: '25px',
+
+      //   fontWeight: 'bold',
+      //   fontFamily: 'Microsoft YaHei'
+      // })
 
       window.addEventListener('resize', () => {
         if (myChart) {

+ 54 - 23
src/views/reportForms/order-statistics/external-statistics.vue

@@ -12,6 +12,7 @@
                   style="width: 100%"
                   :placeholder="['开始年月', '结束年月']"
                   format="YYYY-MM"
+                  defaultPickerValue="[moment(defaultMonth),moment(defaultMonth)]"
                   :mode="mode2"
                   :value="value"
                   @panelChange="handlePanelChange"
@@ -31,15 +32,12 @@
                 </a-select> -->
               </a-form-item>
             </a-col>
-
             <a-col :md="6" :sm="8">
               <a-form-item label="客户">
                 <a-input placeholder="请输入客户" v-model="queryParam.customer"></a-input>
               </a-form-item>
             </a-col>
-
             <template v-if="toggleSearchStatus"></template>
-
             <a-col :md="6" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                 <a-button type="primary" @click="searchQuery" :disabled="isDisabled" icon="search">查询</a-button>
@@ -173,7 +171,6 @@ export default {
       ],
       extStadata: [],
       loading: false, // 表格加载
-
       // 查询条件
       queryParam: {
         vendorType: '外部'
@@ -191,31 +188,64 @@ export default {
       },
       mode2: ['month', 'month'],
       value: [], //起始月份
-      isDisabled: false //按钮禁止
-      // dateFormat: 'YYYY-MM-DD'
+      isDisabled: false, //按钮禁止
+      monthFormat: 'YYYY-MM',
+      defaultMonth: [] //默认当前月
     }
   },
 
-  // html渲染出来后,操作dom
-  mounted() {
-    this.cancelLoading()
-  },
+  mounted() {},
   created() {
-    this.getExternalData()
+    // 初次加载当月数据
+    this.getThisMonthData()
   },
-
+  computed: {},
   methods: {
-    cancelLoading() {
-      let that = this
-      setTimeout(() => {
-        that.loading = false
-      }, 500)
+    // 初次加载当月数据(列表、图)
+    getThisMonthData() {
+      this.$nextTick(() => {
+        let nowDate = new Date()
+        let date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1
+        }
+        if (date.month >= 1 && date.month <= 9) {
+          date.month = '0' + date.month
+        }
+        this.defaultMonth = date.year + '-' + date.month
+
+        this.queryParam.startYearMonth = this.defaultMonth
+        this.queryParam.endYearMonth = this.defaultMonth
+        this.queryParam.vendorType = '外部'
+
+        externalList(this.queryParam).then(res => {
+          // 参数给 chart
+          this.$refs.departmentChart.queryParam = this.queryParam
+          this.$refs.customerChart.queryParam = this.queryParam
+          console.log(this.$refs.departmentChart.queryParam)
+
+          if (res.success) {
+            this.extStadata = res.result.records
+            console.log('图、列表当月数据', this.extStadata)
+            this.pagination = {
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+          }
+        })
+      })
     },
 
     // 查询订单统计
     getExternalData() {
       this.$nextTick(() => {
+        this.queryParam.vendorType = '外部'
         externalList(this.queryParam).then(res => {
+          // 参数给 chart
+          this.$refs.departmentChart.queryParam = this.queryParam
+          this.$refs.customerChart.queryParam = this.queryParam
+
           if (res.success) {
             this.extStadata = res.result.records
             console.log('订单外部列表', this.extStadata)
@@ -230,6 +260,7 @@ export default {
       })
     },
 
+    // 查询
     searchQuery() {
       this.queryParam.pageNo = ''
       if (this.queryParam) {
@@ -238,14 +269,14 @@ export default {
         this.$refs.departmentChart.iquantityArr = []
         this.$refs.departmentChart.inatMoneyArr = []
         // 清空客户chart数据
-        this.$refs.customerChart.cvenAbbNameArr = []
+        this.$refs.customerChart.ccusNameArr = []
         this.$refs.customerChart.iquantityArr = []
         this.$refs.customerChart.inatMoneyArr = []
 
         this.getExternalData()
 
         //查询条件 传给 部门chart + 渲染
-        this.$refs.departmentChart.prop = this.queryParam
+        this.$refs.departmentChart.queryParam = this.queryParam
         this.$refs.departmentChart.getDepChartData()
 
         //查询条件 传给 客户chart + 渲染
@@ -259,22 +290,22 @@ export default {
         that.isDisabled = false
       }, 3000)
     },
-
+    // 重置
     searchReset() {
       this.queryParam = {}
       this.value = [] //起始年月重置
       this.queryParam.startYearMonth = []
       this.queryParam.endYearMonth = []
 
-      // 清空部门chart数据 + 查询条件 + 重新渲染
+      // 清空部门 chart 数据 + 查询条件 + 重新渲染
       this.$refs.departmentChart.cdepNameArr = []
       this.$refs.departmentChart.iquantityArr = []
       this.$refs.departmentChart.inatMoneyArr = []
       this.$refs.departmentChart.queryParam = {}
       this.$refs.departmentChart.getDepChartData()
 
-      // 清空客户chart数据 + 查询条件 + 重新渲染
-      this.$refs.customerChart.cvenAbbNameArr = []
+      // 清空客户 chart 数据 + 查询条件 + 重新渲染
+      this.$refs.customerChart.ccusNameArr = []
       this.$refs.customerChart.iquantityArr = []
       this.$refs.customerChart.inatMoneyArr = []
       this.$refs.customerChart.queryParam = {}

+ 58 - 23
src/views/reportForms/order-statistics/interior-statistics.vue

@@ -98,8 +98,8 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 
-import departmentChart from '@views/reportForms/order-statistics/chart/external/departmentChart'
-import customerChart from '@views/reportForms/order-statistics/chart/external/customerChart.vue'
+import departmentChart from '@views/reportForms/order-statistics/chart/interior/departmentChart'
+import customerChart from '@views/reportForms/order-statistics/chart/interior/customerChart.vue'
 
 import { externalList } from '@api/reportForms/order-statistics.js'
 
@@ -176,12 +176,12 @@ export default {
 
       // 查询条件
       queryParam: {
-        vendorType: '内部',
-        pageNo: '',
-        startYearMonth: '',
-        endYearMonth: '',
-        department: '',
-        customer: ''
+        vendorType: '内部'
+        // pageNo: '',
+        // startYearMonth: '',
+        // endYearMonth: '',
+        // department: '',
+        // customer: ''
       },
 
       pagination: {
@@ -191,31 +191,66 @@ export default {
       },
       mode2: ['month', 'month'],
       value: [], //起始月份
-      isDisabled: false //按钮禁止
+      isDisabled: false, //按钮禁止
+      monthFormat: 'YYYY-MM'
       // dateFormat: 'YYYY-MM-DD'
     }
   },
 
-  mounted() {
-    // this.cancelLoading()     html渲染出来后,操作dom
-  },
+  mounted() {},
   created() {
-    this.getExternalData()
+    // 初次加载当月数据
+    this.getThisMonthData()
   },
 
   methods: {
-    // cancelLoading() {
-    //   setTimeout(() => {
-    // let that = this
-    //     that.loading = false
-    //   }, 500)
-    // },
+    // 初次加载当月数据(列表、图)
+    getThisMonthData() {
+      this.$nextTick(() => {
+        let nowDate = new Date()
+        let date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1
+        }
+        if (date.month >= 1 && date.month <= 9) {
+          date.month = '0' + date.month
+        }
+        var time = date.year + '-' + date.month
+
+        this.queryParam.startYearMonth = time
+        this.queryParam.endYearMonth = time
+
+        this.queryParam.vendorType = '内部'
+        externalList(this.queryParam).then(res => {
+          // 参数给 chart
+          this.$refs.departmentChart.queryParam = this.queryParam
+          this.$refs.customerChart.queryParam = this.queryParam
+          // console.log('????', this.$refs.departmentChart.queryParam)
+
+          if (res.success) {
+            this.data = res.result.records
+            console.log('订单内部列表', this.data)
+
+            this.pagination = {
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+          }
+        })
+      })
+    },
 
     // 查询订单统计
     getExternalData() {
       this.$nextTick(() => {
-        // this.queryParam.vendorType = '内部'
+        this.queryParam.vendorType = '内部'
         externalList(this.queryParam).then(res => {
+          // 参数给 chart
+          this.$refs.departmentChart.queryParam = this.queryParam
+
+          this.$refs.customerChart.queryParam = this.queryParam
+
           if (res.success) {
             this.data = res.result.records
             console.log('订单内部列表', this.data)
@@ -238,7 +273,7 @@ export default {
         this.$refs.departmentChart.iquantityArr = []
         this.$refs.departmentChart.inatMoneyArr = []
         // 清空客户chart数据
-        this.$refs.customerChart.cvenAbbNameArr = []
+        this.$refs.customerChart.ccusNameArr = []
         this.$refs.customerChart.iquantityArr = []
         this.$refs.customerChart.inatMoneyArr = []
         this.getExternalData()
@@ -273,7 +308,7 @@ export default {
       this.$refs.departmentChart.getDepChartData()
 
       // 清空客户chart数据 + 查询条件 + 重新渲染
-      this.$refs.customerChart.cvenAbbNameArr = []
+      this.$refs.customerChart.ccusNameArr = []
       this.$refs.customerChart.iquantityArr = []
       this.$refs.customerChart.inatMoneyArr = []
       this.$refs.customerChart.queryParam = {}
@@ -330,7 +365,7 @@ export default {
 .depChartStyle,
 .cusChartStyle {
   // width: 100%;
-  height: 600px;
+  // height: 600px;
   text-align: center;
   padding-top: 10px;
 }

+ 14 - 4
src/views/shipment-details/addShipDetDrawer.vue

@@ -26,7 +26,7 @@
                 <a-form-model-item label="单据日期" prop="documentDate">
                   <a-date-picker
                     placeholder="请选择单据日期"
-                    :format="dateFormat"
+                    format="YYYY-MM-DD"
                     style="width:100%;"
                     v-model="addShipDet.documentDate"
                   />
@@ -43,7 +43,7 @@
                 <a-form-model-item label="预发货日期" prop="preDeliveryDate">
                   <a-date-picker
                     placeholder="请选择预发货时间"
-                    :format="dateFormat"
+                    format="YYYY-MM-DD"
                     style="width:100%;"
                     v-model="addShipDet.preDeliveryDate"
                   />
@@ -54,7 +54,7 @@
                 <a-form-model-item label="预完工日期" prop="preCompletionDate">
                   <a-date-picker
                     placeholder="请选择预完工日期"
-                    :format="dateFormat"
+                    format="YYYY-MM-DD"
                     style="width:100%;"
                     v-model="addShipDet.preCompletionDate"
                   />
@@ -306,7 +306,10 @@ export default {
           title: '订单日期',
           dataIndex: 'orderDate',
           width: 120,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: text => {
+            return moment(text).format('YYYY-MM-DD')
+          }
         },
         {
           title: '业务类型',
@@ -651,6 +654,13 @@ export default {
           }
         })
       }
+      // const that = this
+      // // 触发表单验证
+      // this.$refs.form.validate(valid => {
+      //   if (valid) {
+      //     that.confirmLoading = true
+      //   }
+      // })
     },
 
     // 増行

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

@@ -172,7 +172,7 @@ export default {
         {
           title: '订单剩余数量',
           dataIndex: 'surplusNum',
-          width: 100,
+          width: 120,
           className: 'replacecolor'
         },
 
@@ -335,8 +335,7 @@ export default {
         {
           title: '订单子表ID',
           dataIndex: 'syOrderDataItemId',
-          width: 120,
-
+          width: 220,
           className: 'replacecolor'
         }
       ],
@@ -372,9 +371,7 @@ export default {
         queryOrderData(this.queryParam).then(res => {
           // console.log('参照订单数据res', res)
           if (res.success) {
-            // 后台数据赋值给参照订单数据
             this.orderListData = res.result.records
-            // console.log('新增参照订单数据', this.orderListData)
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
@@ -384,13 +381,21 @@ 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'
+
+    // 弹框确定
+    onSubmit() {
+      if (this.selectedRowKeys.length == 0) {
+        this.$message.error('请勾选订单数据')
+      } else {
+        // console.log('需要传给父组件的数据', this.selectedRows)
+        // bao父组件指定的传数据绑定的函数 || this.selectedRows子组件给父组件传递的数据
+        this.$emit('bao', this.selectedRows)
+        this.referOrderDataModVis = false
+        this.selectedRowKeys = []
+        this.selectedRows = []
       }
+    },
+    handleTableChange(pagination, filters, sorter) {
       this.queryParam.pageNo = pagination.current
       this.getOrderList()
     },
@@ -411,19 +416,6 @@ export default {
       this.selectedRowKeys = keys
       this.selectedRows = rows
     },
-    // 弹框确定
-    onSubmit() {
-      if (this.selectedRowKeys.length == 0) {
-        this.$message.error('请勾选参照订单数据')
-      } else {
-        // console.log('需要传给父组件的数据', this.selectedRows)
-        // bao父组件指定的传数据绑定的函数 || this.selectedRows子组件给父组件传递的数据
-        this.$emit('bao', this.selectedRows)
-        this.referOrderDataModVis = false
-        this.selectedRowKeys = []
-        this.selectedRows = []
-      }
-    },
 
     close() {
       this.$emit('close')

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

@@ -194,7 +194,7 @@
       </a-table>
     </a-card>
 
-    <!-- 抽屉  :fatherObj="detailsByIdObj"-->
+    <!-- 抽屉  -->
     <div>
       <addShipDet-drawer ref="addShipDetDrawer" :fatherList="getShipmentList" @ok="modalFormOk"></addShipDet-drawer>