Bladeren bron

报表【染损报表】合计补充 + echarts + 接口准备 + 字段

liangy 2 jaren geleden
bovenliggende
commit
4665670ad3

+ 6 - 0
src/api/reportForms/dye-loss-table.js

@@ -1 +1,7 @@
 /** 报表 -- 染损报表 **/
+import { getAction } from '@/api/manage'
+
+// 分页查询 染损列表
+// const dyeLossList = params => getAction('', params)
+
+export {  }

+ 1 - 1
src/field/document/order.md

@@ -1,4 +1,4 @@
-#### 单证【订单数据
+#### 单证【订单数据
 
 ## 查询接口位置:订单主表-分页列表查询
 orderNumber, 订单号

+ 34 - 0
src/field/reportForms/dyeLossTable.md

@@ -0,0 +1,34 @@
+#### 染损报表所有字段
+
+---
+
+## 查询条件
+
+cCode 订单号
+????? 订单类型
+cVenName 供应商
+????? 计划单号
+????? 销售订单号
+
+---
+
+## table
+
+cInvCode 物料编码
+cInvName 物料名称
+color 颜色
+cVenName 供应商
+cCode 订单号
+iQuantity 订单数量
+iQuantity2 采购入库数
+iQuantity3 材料出库数
+iMSQuantity 核销数量
+dyeLossRate 染损
+
+# 合计数据 (是否后端给出合计数量,前端只负责显示 or 前端计算返回的数据的合计数)
+
+????? 订单数量合计
+????? 采购入库数合计
+????? 材料出库合计
+????? 核销数量合计
+????? 染损合计

+ 22 - 22
src/field/reportForms/supplyCapacityTable.md

@@ -1,26 +1,26 @@
 #### 供应商产能报表字段
 
-csrccode 订单号
-cPlanLotNumber;//计划单号
-cDepCode;//部门
-cPersonCode;//业务员
-cVenCode;//供应商
-cVenCodeType;//供应商类型
-iOrderType;//订单类型
-iQuantity;//数量
-iReceivedQTY;//累计入库数量
-unit;//单位(委外或者采购)
-arriveMonth;//计划到货月份
-dArriveDate;//计划到货日期
-coefficient;//系数
+csrccode     订单号
+cPlanLotNumber    计划单号
+cDepCode          部门
+cPersonCode       业务员
+cVenCode      供应商
+cVenCodeType    供应商类型
+iOrderType    订单类型
+iQuantity     数量
+iReceivedQTY    累计入库数量
+unit      单位(委外或者采购)
+arriveMonth     计划到货月份
+dArriveDate     计划到货日期
+coefficient     系数
 
 #### 查询条件字段
-csrccode;//订单号
-cPlanLotNumber;//计划单号
-cVenCode;//供应商
-iOrderType;//订单类型
-excelType;//导出类型
-startDate;//开始日期-日期格式(pattern="yyyy-MM-dd HH:mm:ss")
-endDate;//结束日期-日期格式(pattern="yyyy-MM-dd HH:mm:ss")
-pageNo=1;//当前页
-pageSize=20;//页面大小
+csrccode      订单号
+cPlanLotNumber    计划单号
+cVenCode    供应商
+iOrderType    订单类型
+excelType     导出类型
+startDate    开始日期-日期格式(pattern="yyyy-MM-dd HH:mm:ss")
+endDate   结束日期-日期格式(pattern="yyyy-MM-dd HH:mm:ss")
+pageNo=1    当前页
+pageSize=20   页面大小

+ 0 - 3
src/main.js

@@ -9,7 +9,6 @@ import store from './store/'
 import { VueAxios } from '@/utils/request'
 import * as echarts from 'echarts'
 
-
 import Antd, { version } from 'ant-design-vue'
 import Viser from 'viser-vue'
 
@@ -54,7 +53,6 @@ require('@jeecg/antd-online-mini/dist/OnlineForm.css')
 console.log('ant-design-vue version:', version)
 Vue.prototype.rules = rules
 
-
 Vue.use(Storage, config.storageOptions)
 Vue.use(Antd)
 Vue.use(VueAxios, router)
@@ -69,7 +67,6 @@ Vue.use(VueAreaLinkage)
 Vue.prototype.$echarts = echarts // 全局echarts
 Vue.config.productionTip = false
 
-
 SSO.init(() => {
   main()
 })

+ 402 - 396
src/mixins/JeecgListMixin.js

@@ -3,405 +3,411 @@
  * 高级查询按钮调用 superQuery方法  高级查询组件ref定义为superQueryModal
  * data中 url定义 list为查询列表  delete为删除单条记录  deleteBatch为批量删除
  */
- import { filterObj } from '@/utils/util'
- import { deleteAction, getAction, downFile, getFileAccessHttpUrl } from '@/api/manage'
- import Vue from 'vue'
- // , TENANT_ID
- import { ACCESS_TOKEN } from '@/store/mutation-types'
- // import store from '@/store' //new
+import { filterObj } from '@/utils/util'
+import { deleteAction, getAction, downFile, getFileAccessHttpUrl } from '@/api/manage'
+import Vue from 'vue'
+// , TENANT_ID
+import { ACCESS_TOKEN } from '@/store/mutation-types'
+// import store from '@/store' //new
 
- export const JeecgListMixin = {
-   data() {
-     return {
-       // token header BY-----LY 2022-04-28
-       tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
-       /* 查询条件-请不要在queryParam中声明非字符串值的属性 */
-       queryParam: {},
-       /* 数据源 */
-       dataSource: [],
-       /* 分页参数 */
-       ipagination: {
-         current: 1,
-         pageSize: 10,
-         pageSizeOptions: ['10', '20', '30'],
-         showTotal: (total, range) => {
-           return range[0] + '-' + range[1] + ' 共' + total + '条'
-         },
-         showQuickJumper: true,
-         showSizeChanger: true,
-         total: 0
-       },
-       /* 排序参数 */
-       isorter: {
-         column: 'createTime',
-         order: 'desc'
-       },
-       /* 筛选参数 */
-       filters: {},
-       /* table加载状态 */
-       loading: false,
-       /* table选中keys */
-       selectedRowKeys: [],
-       /* table选中records */
-       selectionRows: [],
-       /* 查询折叠 */
-       toggleSearchStatus: false,
-       /* 高级查询条件生效状态 */
-       superQueryFlag: false,
-       /* 高级查询条件 */
-       superQueryParams: '',
-       /** 高级查询拼接方式 */
-       superQueryMatchType: 'and'
-     }
-   },
+export const JeecgListMixin = {
+  data() {
+    return {
+      // token header BY-----LY 2022-04-28
+      tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
+      /* 查询条件-请不要在queryParam中声明非字符串值的属性 */
+      queryParam: {},
+      /* 数据源 */
+      dataSource: [],
+      /* 分页参数 */
+      ipagination: {
+        current: 1,
+        pageSize: 10,
+        pageSizeOptions: ['10', '20', '30'],
+        showTotal: (total, range) => {
+          return range[0] + '-' + range[1] + ' 共' + total + '条'
+        },
+        showQuickJumper: true,
+        showSizeChanger: true,
+        total: 0
+      },
+      /* 排序参数 */
+      isorter: {
+        column: 'createTime',
+        order: 'desc'
+      },
+      /* 筛选参数 */
+      filters: {},
+      /* table加载状态 */
+      loading: false,
+      /* table选中keys */
+      selectedRowKeys: [],
+      /* table选中records */
+      selectionRows: [],
+      /* 查询折叠 */
+      toggleSearchStatus: false,
+      /* 高级查询条件生效状态 */
+      superQueryFlag: false,
+      /* 高级查询条件 */
+      superQueryParams: '',
+      /** 高级查询拼接方式 */
+      superQueryMatchType: 'and'
+    }
+  },
 
-   computed: {
-     // token header
-     // tokenHeader() {
-     //   let head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }
-     //   let tenantid = Vue.ls.get(TENANT_ID)
-     //   if (tenantid) {
-     //     head['tenant-id'] = tenantid
-     //   }
-     //   return head
-     // }
-     scroll: function() {
-       var width = window.innerWidth
-       // ant-table
-       let $antTable = window.document.getElementsByClassName('ant-table')
-       if ($antTable[0]) {
-         width = $antTable[0].clientWidth
-       }
-       console.log('$antTable', $antTable)
-       return {
-         // x:'max-content',
-         x: width,
-         y: window.innerHeight / 2
-       }
-     }
-   },
-   created() {
-     if (!this.disableMixinCreated) {
+  computed: {
+    // token header
+    // tokenHeader() {
+    //   let head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }
+    //   let tenantid = Vue.ls.get(TENANT_ID)
+    //   if (tenantid) {
+    //     head['tenant-id'] = tenantid
+    //   }
+    //   return head
+    // }
+    scroll: function() {
+      var width = window.innerWidth
+      // ant-table
+      let $antTable = window.document.getElementsByClassName('ant-table')
+      if ($antTable[0]) {
+        width = $antTable[0].clientWidth
+      }
+      console.log('$antTable', $antTable)
+      return {
+        // x:'max-content',
+        x: width,
+        y: window.innerHeight / 2
+      }
+    }
+  },
+  created() {
+    if (!this.disableMixinCreated) {
       //  console.log('this.disableMixinCreated:', this.disableMixinCreated)
       //  console.log(' -- mixin created -- ')
-       this.loadData()
-       // 初始化字典配置 在自己页面定义
-       this.initDictConfig()
-     }
-   },
-   methods: {
-     loadData(arg) {
+      this.loadData()
+      // 初始化字典配置 在自己页面定义
+      this.initDictConfig()
+    }
+  },
+  methods: {
+    loadData(arg) {
       //  console.log('List前面的arg', arg)
-       if (!this.url.list) {
-         console.log('111:', this.url)
-         console.log('this.url.list!!!!!', this.url.list)
-         this.$message.error('请设置url.list属性!')
-         return
-       }
-       // 加载数据 若传入参数1则加载第一页的内容
-       if (arg === 1) {
-         this.ipagination.current = 1
-       }
-       var params = this.getQueryParams() // 查询条件
-       this.loading = true
-       getAction(this.url.list, params)
-         .then(res => {
-           if (res.success) {
-             // update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
-             this.dataSource = res.result.records || res.result
-             if (res.result.total) {
-               this.ipagination.total = res.result.total
-             } else {
-               this.ipagination.total = 0
-             }
-             // update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
-           } else {
-             this.$message.warning(res.message)
-           }
-         })
-         .finally(() => {
-           this.loading = false
-         })
-     },
-     initDictConfig() {
-       console.log('--这是一个假的方法!')
-     },
-     handleSuperQuery(params, matchType) {
-       // 高级查询方法
-       if (!params) {
-         this.superQueryParams = ''
-         this.superQueryFlag = false
-       } else {
-         this.superQueryFlag = true
-         this.superQueryParams = JSON.stringify(params)
-         this.superQueryMatchType = matchType
-       }
-       this.loadData(1)
-     },
-     getQueryParams() {
-       // 获取查询条件
-       let sqp = {}
-       if (this.superQueryParams) {
-         sqp['superQueryParams'] = encodeURI(this.superQueryParams)
-         sqp['superQueryMatchType'] = this.superQueryMatchType
-       }
-       var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters)
-       param.field = this.getQueryField()
-       param.pageNo = this.ipagination.current
-       param.pageSize = this.ipagination.pageSize
-       return filterObj(param)
-     },
-     getQueryField() {
-       // todo: 字段权限控制
-       var str = 'id,'
-       this.columns.forEach(function(value) {
-         str += ',' + value.dataIndex
-       })
-       return str
-     },
+      if (!this.url.list) {
+        console.log('111:', this.url)
+        //  console.log('this.url.list!!!!!', this.url.list)
+        this.$message.error('请设置url.list属性!')
+        return
+      }
+      // 加载数据 若传入参数1则加载第一页的内容
+      if (arg === 1) {
+        this.ipagination.current = 1
+      }
+      var params = this.getQueryParams() // 查询条件
+      this.loading = true
+      getAction(this.url.list, params)
+        .then(res => {
+          if (res.success) {
+            // update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+            this.dataSource = res.result.records || res.result
+            if (res.result.total) {
+              this.ipagination.total = res.result.total
+            } else {
+              this.ipagination.total = 0
+            }
+            // update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+          } else {
+            this.$message.warning(res.message)
+          }
+        })
+        .finally(() => {
+          this.loading = false
+        })
+    },
+    initDictConfig() {
+      console.log('--这是一个假的方法!')
+    },
+    handleSuperQuery(params, matchType) {
+      // 高级查询方法
+      if (!params) {
+        this.superQueryParams = ''
+        this.superQueryFlag = false
+      } else {
+        this.superQueryFlag = true
+        this.superQueryParams = JSON.stringify(params)
+        this.superQueryMatchType = matchType
+      }
+      this.loadData(1)
+    },
+    getQueryParams() {
+      // 获取查询条件
+      let sqp = {}
+      if (this.superQueryParams) {
+        sqp['superQueryParams'] = encodeURI(this.superQueryParams)
+        sqp['superQueryMatchType'] = this.superQueryMatchType
+      }
+      var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters)
+      param.field = this.getQueryField()
+      param.pageNo = this.ipagination.current
+      param.pageSize = this.ipagination.pageSize
+      return filterObj(param)
+    },
+    getQueryField() {
+      // todo: 字段权限控制
+      var str = 'id,'
+      this.columns.forEach(function(value) {
+        str += ',' + value.dataIndex
+      })
+      return str
+    },
 
-     onSelectChange(selectedRowKeys, selectionRows) {
-       this.selectedRowKeys = selectedRowKeys
-       this.selectionRows = selectionRows
-     },
-     onClearSelected() {
-       this.selectedRowKeys = []
-       this.selectionRows = []
-     },
-     searchQuery() {
-       this.loadData(1)
-       // 点击查询清空列表选中行
-       // https://gitee.com/jeecg/jeecg-boot/issues/I4KTU1
-       this.selectedRowKeys = []
-       this.selectionRows = []
-     },
-     superQuery() {
-       this.$refs.superQueryModal.show()
-     },
-     searchReset() {
-       this.queryParam = {}
-       this.loadData(1)
-     },
-     batchDel: function() {
-       if (!this.url.deleteBatch) {
-         this.$message.error('请设置url.deleteBatch属性!')
-         return
-       }
-       if (this.selectedRowKeys.length <= 0) {
-         this.$message.warning('请选择一条记录!')
-       } else {
-         var ids = ''
-         for (var a = 0; a < this.selectedRowKeys.length; a++) {
-           ids += this.selectedRowKeys[a] + ','
-         }
-         var that = this
-         this.$confirm({
-           title: '确认删除',
-           content: '是否删除选中数据?',
-           onOk: function() {
-             that.loading = true
-             deleteAction(that.url.deleteBatch, { ids: ids })
-               .then(res => {
-                 if (res.success) {
-                   // 重新计算分页问题
-                   that.reCalculatePage(that.selectedRowKeys.length)
-                   that.$message.success(res.message)
-                   that.loadData()
-                   that.onClearSelected()
-                 } else {
-                   that.$message.warning(res.message)
-                 }
-               })
-               .finally(() => {
-                 that.loading = false
-               })
-           }
-         })
-       }
-     },
-     handleDelete: function(id) {
-       if (!this.url.delete) {
-         this.$message.error('请设置url.delete属性!')
-         return
-       }
-       var that = this
-       deleteAction(that.url.delete, { id: id }).then(res => {
-         if (res.success) {
-           // 重新计算分页问题
-           that.reCalculatePage(1)
-           that.$message.success(res.message)
-           that.loadData()
-         } else {
-           that.$message.warning(res.message)
-         }
-       })
-     },
-     reCalculatePage(count) {
-       // 总数量-count
-       let total = this.ipagination.total - count
-       // 获取删除后的分页数
-       let currentIndex = Math.ceil(total / this.ipagination.pageSize)
-       // 删除后的分页数<所在当前页
-       if (currentIndex < this.ipagination.current) {
-         this.ipagination.current = currentIndex
-       }
-       console.log('currentIndex', currentIndex)
-     },
-     handleEdit: function(record) {
-       this.$refs.modalForm.edit(record)
-       this.$refs.modalForm.title = '编辑'
-       this.$refs.modalForm.disableSubmit = false
-     },
-     handleAdd: function() {
-       this.$refs.modalForm.add()
-       this.$refs.modalForm.title = '新增'
-       this.$refs.modalForm.disableSubmit = false
-     },
-     handleTableChange(pagination, filters, sorter) {
-       // 分页、排序、筛选变化时触发
-       // todo: 筛选
-       console.log(pagination)
-       if (Object.keys(sorter).length > 0) {
-         this.isorter.column = sorter.field
-         this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
-       }
-       this.ipagination = pagination
-       this.loadData()
-     },
-     handleToggleSearch() {
-       this.toggleSearchStatus = !this.toggleSearchStatus
-     },
-     // 给popup查询使用(查询区域不支持回填多个字段,限制只返回一个字段)
-     getPopupField(fields) {
-       return fields.split(',')[0]
-     },
-     modalFormOk() {
-       // 新增/修改 成功时,重载列表
-       this.loadData()
-       // 清空列表选中
-       this.onClearSelected()
-     },
-     handleDetail: function(record) {
-       this.$refs.modalForm.edit(record)
-       this.$refs.modalForm.title = '详情'
-       this.$refs.modalForm.disableSubmit = true
-     },
-     /* 导出 */
-     handleExportXls2() {
-       let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()))
-       let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`
-       window.location.href = url
-     },
-     handleExportXls(fileName) {
-       if (!fileName || typeof fileName !== 'string') {
-         fileName = '导出文件'
-       }
-       let param = this.getQueryParams()
-       if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
-         param['selections'] = this.selectedRowKeys.join(',')
-       }
-       console.log('导出参数', param)
-       downFile(this.url.exportXlsUrl, param).then(data => {
-         if (!data) {
-           this.$message.warning('文件下载失败')
-           return
-         }
-         if (typeof window.navigator.msSaveBlob !== 'undefined') {
-           window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
-         } else {
-           let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
-           let link = document.createElement('a')
-           link.style.display = 'none'
-           link.href = url
-           link.setAttribute('download', fileName + '.xls')
-           document.body.appendChild(link)
-           link.click()
-           document.body.removeChild(link) // 下载完成移除元素
-           window.URL.revokeObjectURL(url) // 释放掉blob对象
-         }
-       })
-     },
-     /* 导入 */
-     handleImportExcel(info) {
-       this.loading = true
-       if (info.file.status !== 'uploading') {
-         console.log(info.file, info.fileList)
-       }
-       if (info.file.status === 'done') {
-         this.loading = false
-         if (info.file.response.success) {
-           // this.$message.success(`${info.file.name} 文件上传成功`);
-           if (info.file.response.code === 201) {
-             let {
-               message,
-               result: { msg, fileUrl, fileName }
-             } = info.file.response
-             let href = window._CONFIG['domianURL'] + fileUrl
-             this.$warning({
-               title: message,
-               content: (
-                 <div>
-                   <span>{msg}</span>
-                   <br />
-                   <span>
-                     具体详情请{' '}
-                     <a href={href} target="_blank" download={fileName}>
-                       点击下载
-                     </a>{' '}
-                   </span>
-                 </div>
-               )
-             })
-           } else {
-             this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
-           }
-           this.loadData()
-         } else {
-           this.$message.error(`${info.file.name} ${info.file.response.message}.`)
-         }
-       } else if (info.file.status === 'error') {
-         this.loading = false
-         if (info.file.response.status === 500) {
-           let data = info.file.response
-           const token = Vue.ls.get(ACCESS_TOKEN)
-           if (token && data.message.includes('Token失效')) {
-             this.$error({
-               title: '登录已过期',
-               content: '很抱歉,登录已过期,请重新登录',
-               okText: '重新登录',
-               mask: false,
-               onOk: () => {
-                 store.dispatch('Logout').then(() => {
-                   Vue.ls.remove(ACCESS_TOKEN)
-                   window.location.reload()
-                 })
-               }
-             })
-           }
-         } else {
-           this.$message.error(`文件上传失败: ${info.file.msg} `)
-         }
-       }
-     },
-     /* 图片预览 */
-     getImgView(text) {
-       if (text && text.indexOf(',') > 0) {
-         text = text.substring(0, text.indexOf(','))
-       }
-       return getFileAccessHttpUrl(text)
-     },
-     /* 文件下载 */
-     // update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------
-     downloadFile(text) {
-       if (!text) {
-         this.$message.warning('未知的文件')
-         return
-       }
-       if (text.indexOf(',') > 0) {
-         text = text.substring(0, text.indexOf(','))
-       }
-       let url = getFileAccessHttpUrl(text)
-       window.open(url)
-     }
-   }
- }
+    onSelectChange(selectedRowKeys, selectionRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectionRows = selectionRows
+    },
+    onClearSelected() {
+      this.selectedRowKeys = []
+      this.selectionRows = []
+    },
+    searchQuery() {
+      this.loadData(1)
+      // 点击查询清空列表选中行
+      // https://gitee.com/jeecg/jeecg-boot/issues/I4KTU1
+      this.selectedRowKeys = []
+      this.selectionRows = []
+    },
+    superQuery() {
+      this.$refs.superQueryModal.show()
+    },
+    searchReset() {
+      this.queryParam = {}
+      this.loadData(1)
+    },
+    batchDel: function() {
+      if (!this.url.deleteBatch) {
+        this.$message.error('请设置url.deleteBatch属性!')
+        return
+      }
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning('请选择一条记录!')
+      } else {
+        var ids = ''
+        for (var a = 0; a < this.selectedRowKeys.length; a++) {
+          ids += this.selectedRowKeys[a] + ','
+        }
+        var that = this
+        this.$confirm({
+          title: '确认删除',
+          content: '是否删除选中数据?',
+          onOk: function() {
+            that.loading = true
+            deleteAction(that.url.deleteBatch, { ids: ids })
+              .then(res => {
+                if (res.success) {
+                  // 重新计算分页问题
+                  that.reCalculatePage(that.selectedRowKeys.length)
+                  that.$message.success(res.message)
+                  that.loadData()
+                  that.onClearSelected()
+                } else {
+                  that.$message.warning(res.message)
+                }
+              })
+              .finally(() => {
+                that.loading = false
+              })
+          }
+        })
+      }
+    },
+    handleDelete: function(id) {
+      if (!this.url.delete) {
+        this.$message.error('请设置url.delete属性!')
+        return
+      }
+      var that = this
+      deleteAction(that.url.delete, { id: id }).then(res => {
+        if (res.success) {
+          // 重新计算分页问题
+          that.reCalculatePage(1)
+          that.$message.success(res.message)
+          that.loadData()
+        } else {
+          that.$message.warning(res.message)
+        }
+      })
+    },
+    reCalculatePage(count) {
+      // 总数量-count
+      let total = this.ipagination.total - count
+      // 获取删除后的分页数
+      let currentIndex = Math.ceil(total / this.ipagination.pageSize)
+      // 删除后的分页数<所在当前页
+      if (currentIndex < this.ipagination.current) {
+        this.ipagination.current = currentIndex
+      }
+      console.log('currentIndex', currentIndex)
+    },
+    handleEdit: function(record) {
+      this.$refs.modalForm.edit(record)
+      this.$refs.modalForm.title = '编辑'
+      this.$refs.modalForm.disableSubmit = false
+    },
+    handleAdd: function() {
+      this.$refs.modalForm.add()
+      this.$refs.modalForm.title = '新增'
+      this.$refs.modalForm.disableSubmit = false
+    },
+    handleTableChange(pagination, filters, sorter) {
+      // 分页、排序、筛选变化时触发
+      // todo: 筛选
+      console.log(pagination)
+      if (Object.keys(sorter).length > 0) {
+        this.isorter.column = sorter.field
+        this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
+      }
+      this.ipagination = pagination
+      this.loadData()
+    },
+    handleToggleSearch() {
+      this.toggleSearchStatus = !this.toggleSearchStatus
+    },
+    // 给popup查询使用(查询区域不支持回填多个字段,限制只返回一个字段)
+    getPopupField(fields) {
+      return fields.split(',')[0]
+    },
+
+    // 对话框 @ok点击确定回调
+    modalFormOk() {
+      // 新增/修改 成功时,重载列表
+      this.loadData()
+      // 清空列表选中
+      this.onClearSelected()
+    },
+    handleDetail: function(record) {
+      this.$refs.modalForm.edit(record)
+      this.$refs.modalForm.title = '详情'
+      this.$refs.modalForm.disableSubmit = true
+    },
+    /* 导出 */
+    handleExportXls2() {
+      let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()))
+      let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`
+      window.location.href = url
+    },
+
+    //  导出文件
+    handleExportXls(fileName) {
+      // console.log('染损');
+      if (!fileName || typeof fileName !== 'string') {
+        fileName = '导出文件'
+      }
+      let param = this.getQueryParams()
+      if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
+        param['selections'] = this.selectedRowKeys.join(',')
+      }
+      console.log('导出参数', param)
+      downFile(this.url.exportXlsUrl, param).then(data => {
+        if (!data) {
+          this.$message.warning('文件下载失败')
+          return
+        }
+        if (typeof window.navigator.msSaveBlob !== 'undefined') {
+          window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
+        } else {
+          let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
+          let link = document.createElement('a')
+          link.style.display = 'none'
+          link.href = url
+          link.setAttribute('download', fileName + '.xls')
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link) // 下载完成移除元素
+          window.URL.revokeObjectURL(url) // 释放掉blob对象
+        }
+      })
+    },
+
+    /* 导入 */
+    handleImportExcel(info) {
+      this.loading = true
+      if (info.file.status !== 'uploading') {
+        console.log(info.file, info.fileList)
+      }
+      if (info.file.status === 'done') {
+        this.loading = false
+        if (info.file.response.success) {
+          // this.$message.success(`${info.file.name} 文件上传成功`);
+          if (info.file.response.code === 201) {
+            let {
+              message,
+              result: { msg, fileUrl, fileName }
+            } = info.file.response
+            let href = window._CONFIG['domianURL'] + fileUrl
+            this.$warning({
+              title: message,
+              content: (
+                <div>
+                  <span>{msg}</span>
+                  <br />
+                  <span>
+                    具体详情请{' '}
+                    <a href={href} target="_blank" download={fileName}>
+                      点击下载
+                    </a>{' '}
+                  </span>
+                </div>
+              )
+            })
+          } else {
+            this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
+          }
+          this.loadData()
+        } else {
+          this.$message.error(`${info.file.name} ${info.file.response.message}.`)
+        }
+      } else if (info.file.status === 'error') {
+        this.loading = false
+        if (info.file.response.status === 500) {
+          let data = info.file.response
+          const token = Vue.ls.get(ACCESS_TOKEN)
+          if (token && data.message.includes('Token失效')) {
+            this.$error({
+              title: '登录已过期',
+              content: '很抱歉,登录已过期,请重新登录',
+              okText: '重新登录',
+              mask: false,
+              onOk: () => {
+                store.dispatch('Logout').then(() => {
+                  Vue.ls.remove(ACCESS_TOKEN)
+                  window.location.reload()
+                })
+              }
+            })
+          }
+        } else {
+          this.$message.error(`文件上传失败: ${info.file.msg} `)
+        }
+      }
+    },
+    /* 图片预览 */
+    getImgView(text) {
+      if (text && text.indexOf(',') > 0) {
+        text = text.substring(0, text.indexOf(','))
+      }
+      return getFileAccessHttpUrl(text)
+    },
+    /* 文件下载 */
+    // update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------
+    downloadFile(text) {
+      if (!text) {
+        this.$message.warning('未知的文件')
+        return
+      }
+      if (text.indexOf(',') > 0) {
+        text = text.substring(0, text.indexOf(','))
+      }
+      let url = getFileAccessHttpUrl(text)
+      window.open(url)
+    }
+  }
+}

+ 237 - 87
src/views/reportForms/dye-loss-table.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 染损报表 -->
-  <div id="dyeLossTable">
+  <div id="dyeLossRateTable">
     <a-card :bordered="false">
       <!-- 查询区域 -->
       <div class="table-page-search-wrapper">
@@ -8,24 +8,25 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="订单号">
-                <a-input placeholder="请输入订单号" v-model="queryParam.orderNum"></a-input>
+                <a-input placeholder="请输入订单号" v-model="queryParam.cCode"></a-input>
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-item label="订单类型">
-                <a-select placeholder="请选择订单类型" v-model="queryParam.orderType">
+                <a-input placeholder="请输入订单类型" v-model="queryParam.orderType"></a-input>
+                <!-- <a-select placeholder="请选择订单类型" v-model="queryParam.orderType">
                   <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-select> -->
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-item label="供应商">
-                <a-input placeholder="请输入供应商" v-model="queryParam.supplier"></a-input>
+                <a-input placeholder="请输入供应商" v-model="queryParam.cVenName"></a-input>
               </a-form-item>
             </a-col>
 
@@ -38,7 +39,7 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-item label="销售订单号">
-                  <a-input placeholder="请输入销售订单号" v-model="queryParam.salesOrderNum"></a-input>
+                  <a-input placeholder="请输入销售订单号" v-model="queryParam.salescCode"></a-input>
                 </a-form-item>
               </a-col>
             </template>
@@ -58,19 +59,20 @@
       </div>
     </a-card>
 
-    <!-- 操作按钮区域 -->
+    <!-- 导出 -->
     <a-card :bordered="false" style="margin:10px 0;">
       <div class="table-operator">
-        <a-button type="primary" @click="handleExportXls('染损报表')" icon="download">导出</a-button>
+        <a-button type="primary" icon="download" @click="handleExportXls('染损报表')">导出</a-button>
       </div>
 
-      <!-- 子表合计 table rowKey="id" :scroll="{ x: 1500 }"-->
+      <!-- 子表合计 table rowKey="id" :scroll="{ x: 1500 }"   :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"-->
       <div>
         <a-table
           bordered
-          :row-key="record => record.id"
-          :columns="dyeLossColumns"
-          :data-source="dyeLossData"
+          rowKey="id"
+          v-if="dyeLossRateData"
+          :columns="dyeLossRateColumns"
+          :data-source="dyeLossRateData"
           :loading="loading"
           :pagination="ipagination"
           @change="handleTableChange"
@@ -81,10 +83,10 @@
       </div>
     </a-card>
 
-    <!-- 引入分析图 组件 -->
+    <!-- 引入 echarts -->
     <a-card :bordered="false">
       <div class="chart">
-        <div class="someoneLossChart" v-if="queryParam.supplier">
+        <div class="someoneLossChart" v-if="queryParam.cVenName">
           <someoneLossChart />
         </div>
 
@@ -99,39 +101,52 @@
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
+
 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 FileSaver from 'file-saver'
+// import XLSX from 'xlsx'
+
 export default {
-  name: 'DyeLossTable', // 染损报表
+  name: 'dyeLossRateTable', // 染损报表
   mixins: [JeecgListMixin],
   components: { JEllipsis, moment, allLossChart, someoneLossChart },
 
   data() {
-    // let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
+    let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
     return {
       // 表头
-      dyeLossColumns: [
+      dyeLossRateColumns: [
+        // {
+        //   title: '序号',
+        //   width: 60,
+        //   dataIndex: 'index',
+        //   customRender: (text, record, index) => `${index + 1}`,
+        //   className: 'replacecolor'
+        // },
         {
-          title: '物料编号',
-          width: 160,
-          dataIndex: 'materialNum',
+          title: '物料编',
+          width: 120,
+          dataIndex: 'cInvCode',
           className: 'replacecolor'
         },
 
         {
           title: '物料名称',
           width: 160,
-          dataIndex: 'materialName',
+          dataIndex: 'cInvName',
           className: 'replacecolor'
         },
-        { title: '颜色', width: 160, dataIndex: 'color', className: 'replacecolor' },
-        { title: '供应商', width: 120, dataIndex: 'supplier', className: 'replacecolor' },
+        { title: '颜色', width: 160, dataIndex: 'color', customRender: t => ellipsis(t), className: 'replacecolor' },
+        { title: '供应商', width: 120, dataIndex: 'cVenName', className: 'replacecolor' },
         {
           title: '订单号',
           width: 160,
-          dataIndex: 'orderNum',
+          dataIndex: 'cCode',
           className: 'replacecolor'
           // customRender: function(text) {
           //   if (text == '1') {
@@ -148,77 +163,168 @@ export default {
           //   }
           // }
         },
-        { title: '订单数量', width: 100, dataIndex: 'orderQuantity', className: 'replacecolor' },
-        { title: '采购入库数', width: 100, dataIndex: 'purchaseInQuantity', className: 'replacecolor' },
-        { title: '材料出库数', width: 100, dataIndex: 'materialsOutQuantity', className: 'replacecolor' },
-        { title: '核销数量', width: 100, dataIndex: 'verificationNum', className: 'replacecolor' },
-        { title: '染损', width: 120, dataIndex: 'dyeLoss', className: 'replacecolor' }
+        { title: '订单数量', width: 100, dataIndex: 'iQuantity', className: 'replacecolor' },
+        { title: '采购入库数', width: 100, dataIndex: 'iQuantity2', className: 'replacecolor' },
+        { title: '材料出库数', width: 100, dataIndex: 'iQuantity3', className: 'replacecolor' },
+        { title: '核销数量', width: 100, dataIndex: 'iMSQuantity', className: 'replacecolor' },
+        { title: '染损', width: 120, dataIndex: 'dyeLossRate', className: 'replacecolor' }
       ],
-      dyeLossData: [
+      dyeLossRateData: [
+        // {
+        //   cInvCode: '3801000890',
+        //   cInvName: '女装印花袋鼠袋拉毛绒布带帽衫',
+        //   color: '女装印花袋鼠袋拉毛绒布带帽衫',
+        //   iQuantity: '20',
+        //   iQuantity2: '20',
+        //   iQuantity3: '20',
+        //   iMSQuantity: '20',
+        //   dyeLossRate: '4.32%'
+        // },
+        // {
+        //   cInvCode: '1901034590',
+        //   cInvName: '鼠袋拉毛绒布带帽衫',
+        //   iQuantity: '30',
+        //   iQuantity2: '30',
+        //   iQuantity3: '30',
+        //   iMSQuantity: '30',
+        //   dyeLossRate: '31.34%'
+        // },
+        // {
+        //   cInvCode: '3801000890',
+        //   cInvName: '女装印花袋鼠袋拉毛绒布带帽衫',
+        //   iQuantity: '20',
+        //   iQuantity2: '20',
+        //   iQuantity3: '20',
+        //   iMSQuantity: '20',
+        //   dyeLossRate: '4.32%'
+        // },
+        // {
+        //   cInvCode: '1901034590',
+        //   cInvName: '鼠袋拉毛绒布带帽衫',
+        //   iQuantity: '30',
+        //   iQuantity2: '30',
+        //   iQuantity3: '30',
+        //   iMSQuantity: '30',
+        //   dyeLossRate: '31.34%'
+        // },
+        // {
+        //   cInvCode: '3801000890',
+        //   cInvName: '女装印花袋鼠袋拉毛绒布带帽衫',
+        //   iQuantity: '20',
+        //   iQuantity2: '20',
+        //   iQuantity3: '20',
+        //   iMSQuantity: '20',
+        //   dyeLossRate: '4.32%'
+        // },
         {
-          materialNum: '1901000890',
-          materialName: '春夏女装印花袋鼠袋拉毛绒布带帽衫',
-          orderQuantity: '10',
-          purchaseInQuantity: '10',
-          materialsOutQuantity: '10',
-          verificationNum: '10',
-          dyeLoss: '3.66%'
+          cInvCode: '1901034590',
+          cInvName: '1',
+          iQuantity: '30',
+          iQuantity2: '30',
+          iQuantity3: '30',
+          iMSQuantity: '30',
+          dyeLossRate: '1%'
         },
         {
-          materialNum: '3801000890',
-          materialName: '女装印花袋鼠袋拉毛绒布带帽衫',
-          orderQuantity: '20',
-          purchaseInQuantity: '20',
-          materialsOutQuantity: '20',
-          verificationNum: '20',
-          dyeLoss: '4.32%'
+          cInvCode: '3801000890',
+          cInvName: '2',
+          iQuantity: '20',
+          iQuantity2: '20',
+          iQuantity3: '20',
+          iMSQuantity: '20',
+          dyeLossRate: '2%'
         },
         {
-          materialNum: '1901034590',
-          materialName: '鼠袋拉毛绒布带帽衫',
-          orderQuantity: '30',
-          purchaseInQuantity: '30',
-          materialsOutQuantity: '30',
-          verificationNum: '30',
-          dyeLoss: '31.34%'
-        },
-        {
-          materialNum: '4901000890',
-          materialName: '毛绒布带帽衫',
-          orderQuantity: '40',
-          purchaseInQuantity: '40',
-          materialsOutQuantity: '40',
-          verificationNum: '40',
-          dyeLoss: '5.6%'
+          cInvCode: '1901034590',
+          cInvName: '3',
+          iQuantity: '30',
+          iQuantity2: '30',
+          iQuantity3: '30',
+          iMSQuantity: '30',
+          dyeLossRate: '3%'
         }
+        // {
+        //   cInvCode: '3801000890',
+        //   cInvName: '女装印花袋鼠袋拉毛绒布带帽衫',
+        //   iQuantity: '20',
+        //   iQuantity2: '20',
+        //   iQuantity3: '20',
+        //   iMSQuantity: '20',
+        //   dyeLossRate: '4.32%'
+        // },
+        // {
+        //   cInvCode: '1901034590',
+        //   cInvName: '鼠袋拉毛绒布带帽衫',
+        //   iQuantity: '30',
+        //   iQuantity2: '30',
+        //   iQuantity3: '30',
+        //   iMSQuantity: '30',
+        //   dyeLossRate: '31.34%'
+        // },
+        // {
+        //   cInvCode: '3801000890',
+        //   cInvName: '女装印花袋鼠袋拉毛绒布带帽衫',
+        //   iQuantity: '20',
+        //   iQuantity2: '20',
+        //   iQuantity3: '20',
+        //   iMSQuantity: '20',
+        //   dyeLossRate: '4.32%'
+        // },
+        // {
+        //   cInvCode: '1901034590',
+        //   cInvName: '鼠袋拉毛绒布带帽衫',
+        //   iQuantity: '30',
+        //   iQuantity2: '30',
+        //   iQuantity3: '30',
+        //   iMSQuantity: '30',
+        //   dyeLossRate: '31.34%'
+        // }
       ],
       loading: false, // 表格加载
-      // 查询条件
+
       queryParam: {
-        orderNum: '',
-        orderType: '',
-        supplier: '',
-        planNum: '',
-        salesOrderNum: ''
-      }
+        cCode: '',
+        orderType: '', //订单类型
+        cVenName: '',
+        planNum: '', //订单号
+        salescCode: '', //销售订单号
+        pageNo: '', // 初始页
+        pageSize: '-1' // 为了显示数据总计数
+      },
+      // 分页
+      pagination: {
+        total: '',
+        current: 0,
+        pageSize: 0
+      },
+      selectedRowKeys: [],
+      selectedRows: {}, // 勾选项
+      totals: []
     }
   },
   created() {
-    // 渲染染损报表列表
+    this.getdyeLossList() // 渲染染损列表
   },
 
-  computed: {
-    // 构建合计数据
-    dyeLossDataSource() {
-      const summary = Object.assign({}, this.dyeLossData[0])
-      for (const attr in summary) {
-        summary[attr] = '合计'
-        break
-      }
-      return [summary]
-    }
-  },
   methods: {
+    // 分页查询 染损列表
+    getdyeLossList() {
+      this.$nextTick(() => {
+        // dyeLossList(this.queryParam).then(res => {
+        //   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
+        //     }
+        //   }
+        // })
+      })
+    },
+
     // 合计行 TODO: 怎么合计数值 及 table 单元格合并
     totalFooterShow(data) {
       // 后端传递的合计的数据
@@ -229,8 +335,8 @@ export default {
           rowKey={Math.random}
           bordered={false}
           pagination={false}
-          columns={this.dyeLossColumns}
-          dataSource={this.dyeLossDataSource || []}
+          columns={this.dyeLossRateColumns}
+          dataSource={this.dyeLossRateDataSource || []}
           showHeader={false}
         ></a-table>
       )
@@ -238,17 +344,61 @@ export default {
 
     // 查询按钮
     searchQuery() {
-      // 渲染染损列表
+      this.getdyeLossList() // 渲染染损列表
     },
     searchReset() {
-      // console.log('>>>>重置')
       this.queryParam = {}
-    }
-  },
+      this.getdyeLossList()
+    },
+    // 选中行
+    onSelectChange(keys, rows) {
+      this.selectedRowKeys = keys
+      this.selectedRows = rows
+      // console.log('this.selectedRows:', this.selectedRows)
+      // console.log('this.selectedRowKeys:', this.selectedRowKeys)
+    },
 
-  watched: {},
+    handleTableChange() {
+      console.log('??这是啥')
+      this.$message.error('已取消选择')
+    },
 
-  mounted() {}
+    // 获取导出信息
+    // async getInfoXls(fileName) {},
+    // 导出
+    handleExportXls(fileName) {
+      this.loading = false
+      console.log('需导出的fileName:', fileName)
+      const params = this.queryParam
+      console.log('导出参数', params)
+    }
+  },
+  computed: {
+    // 构建合计数据
+    dyeLossRateDataSource() {
+      const summary = Object.assign({}, this.dyeLossRateData[1])
+      for (const attr in summary) {
+        summary[attr] = '合计'
+        break
+      }
+      return [summary]
+    }
+    // 选中项
+    // rowSelection() {
+    //   return {
+    //     onChange: (selectedRowKeys, selectedRows) => {
+    //       console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
+    //     },
+    //     getCheckboxProps: record => ({
+    //       props: {
+    //         disabled: record.title === 'Disabled User',
+    //         // Column configuration not to be checked
+    //         title: record.title
+    //       }
+    //     })
+    //   }
+    // }
+  }
 }
 </script>
 <style lang="less" scoped>

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

@@ -34,7 +34,7 @@ export default {
         series: [
           {
             name: '损耗',
-            type: 'line', //类型为柱状图
+            type: 'line', 
             smooth: true,
             data: [5, 20, 36, 10, 10, 20]
           }

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

@@ -34,7 +34,7 @@ export default {
         series: [
           {
             name: '损耗',
-            type: 'line', //类型为柱状图
+            type: 'line',
             smooth: true,
             data: [5, 20, 36, 10, 10, 20]
           }

+ 26 - 8
src/views/reportForms/full-rate-table.vue

@@ -130,8 +130,10 @@
       >
       </a-table>
     </a-card>
-    <!-- 维护邮件发送通知 -->
-    <emailMsg-modal ref="emailMsgModal" :father="aa"></emailMsg-modal>
+    <!-- 维护邮件发送通知 :father="cc"-->
+    <emailMsg-modal ref="emailMsgModal"></emailMsg-modal>
+    <monthChart-modal ref="monthChartModal"></monthChart-modal>
+    <departmentChart-modal ref="departmentChartModal"></departmentChart-modal>
   </div>
 </template>
 
@@ -141,11 +143,13 @@ import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 
 import emailMsgModal from '@views/reportForms/full-rate-table/emailMsgModal.vue'
+import monthChartModal from '@views/reportForms/full-rate-table/monthChartModal.vue'
+import departmentChartModal from '@views/reportForms/full-rate-table/departmentChartModal.vue'
 
 export default {
   name: 'Fullratetable', // 齐套率报表
   mixins: [JeecgListMixin],
-  components: { JEllipsis, moment, emailMsgModal },
+  components: { JEllipsis, moment, emailMsgModal, monthChartModal, departmentChartModal },
 
   data() {
     let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
@@ -345,7 +349,7 @@ export default {
         {},
         {}
       ],
-      loading: false, // 表格加载
+      loading: false, // 加载状态
 
       // 查询条件
       queryParam: {
@@ -376,15 +380,30 @@ export default {
   created() {
     // this.getAdPaListClothes()
   },
+  // html渲染出来后,操作dom
+  mounted() {
+    this.loadingChart()
+  },
   methods: {
+    loadingChart() {
+      setTimeout(() => {
+        this.loading = false
+      }, 500)
+    },
     // 邮件通知
     emailMsgMod() {
       this.$refs.emailMsgModal.emailMsgModVis = true
     },
     // 分析图- 月份
-    checkMonth() {},
+    checkMonth() {
+      console.log('打开齐套率月份统计图')
+      this.$refs.monthChartModal.monthChartModVis = true
+    },
     // 分析图- 部门
-    checkdepartment() {},
+    checkdepartment() {
+      console.log('打开部门齐套率统计图')
+      this.$refs.departmentChartModal.departmentChartModVis = true
+    },
 
     searchQuery() {
       // this.getAnnList() // 渲染公告
@@ -425,8 +444,7 @@ export default {
         })
       }
     }
-  },
-  mounted() {}
+  }
 }
 </script>
 <style lang="less" scoped>

+ 67 - 0
src/views/reportForms/full-rate-table/departmentChartModal.vue

@@ -0,0 +1,67 @@
+<template>
+  <a-modal
+    title="部门齐套率统计图"
+    v-model="departmentChartModVis"
+    :confirmLoading="confirmLoading"
+    width="70%"
+    @ok="onSubmit"
+    @cancel="handleCancel"
+  >
+    <a-spin :spinning="confirmLoading">
+      <div id="departmentChart" :style="{ width: '100%', height: '600px' }"></div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+
+import * as echarts from 'echarts' //必须有
+
+export default {
+  name: 'DepartmentChartModal', //部门齐套率统计图
+  mixins: [JeecgListMixin],
+  components: { JEllipsis, moment },
+
+  data() {
+    return {
+      confirmLoading: false,
+      departmentChartModVis: false
+    }
+  },
+  // 接收父组件 方法
+  // props: {
+  //   father: {
+  //     type: Function,
+  //     default: null
+  //   }
+  // },
+  mounted() {},
+  methods: {
+    // 弹框确定
+    onSubmit() {
+      console.log('弹框确定')
+    },
+
+    // 弹框取消
+    handleCancel() {
+      this.departChartModal = false
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+@import '~@assets/less/common.less';
+/deep/ .ant-table-thead > tr > th {
+  text-align: center;
+  // font-weight: 700;
+}
+/deep/ .ant-table-tbody {
+  text-align: center;
+}
+// th.replacecolor {
+// background-color:  #ccc;
+// }
+</style>

+ 107 - 0
src/views/reportForms/full-rate-table/monthChartModal.vue

@@ -0,0 +1,107 @@
+<template>
+  <a-modal
+    title="齐套率月份统计图"
+    v-model="monthChartModVis"
+    :confirmLoading="confirmLoading"
+    width="70%"
+    @ok="onSubmit"
+    @cancel="handleCancel"
+  >
+    <a-spin :spinning="confirmLoading">
+      <div id="monthChart" :style="{ width: '100%', height: '600px' }"></div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+
+import * as echarts from 'echarts' //必须有
+
+export default {
+  name: 'MonthChartModal', //齐套率月份统计图
+  mixins: [JeecgListMixin],
+  components: { JEllipsis, moment },
+
+  data() {
+    return {
+      confirmLoading: false,
+      monthChartModVis: false
+    }
+  },
+  // 接收父组件 方法
+  // props: {
+  //   father: {
+  //     type: Function,
+  //     default: null
+  //   }
+  // },
+  mounted() {
+    this.initEcharts()
+  },
+  methods: {
+    initEcharts() {
+      //深色 ,'dark'
+      const myChart = echarts.init(document.getElementById('#monthChart')) // 初始化echarts实例
+      const option = {
+        title: {
+          text: '齐套率月份统计图'
+        },
+        tooltip: {},
+        legend: {
+          data: ['齐套率']
+        },
+        xAxis: {
+          type: 'category',
+          data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月']
+        },
+        yAxis: {
+          type: 'value'
+          // name: '(%)'
+        },
+        series: [
+          {
+            data: [5, 20, 36, 10, 10, 20],
+            type: 'bar',
+            showBackground: true,
+            backgroundStyle: {
+              color: 'rgba(180, 180, 180, 0.2)'
+            }
+          }
+        ]
+      }
+      // 渲染页面
+      myChart.setOption(option)
+
+      //随着屏幕大小调节图表
+      // window.addEventListener('resize', () => {
+      //   myChart.resize()
+      // })
+    },
+    // 弹框确定
+    onSubmit() {
+      console.log('弹框确定')
+    },
+
+    // 弹框取消
+    handleCancel() {
+      this.monthChartModal = false
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+@import '~@assets/less/common.less';
+/deep/ .ant-table-thead > tr > th {
+  text-align: center;
+  // font-weight: 700;
+}
+/deep/ .ant-table-tbody {
+  text-align: center;
+}
+// th.replacecolor {
+// background-color:  #ccc;
+// }
+</style>

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

@@ -478,7 +478,7 @@ export default {
         itemNumber: '', // 款号
         refer: '',
         pageNo: '', // 初始页
-        pageSize: '-1' // 每页显示条
+        pageSize: '-1' // 为了显示数据总计
       },
       // 分页
       pagination: {
@@ -584,7 +584,7 @@ export default {
         submitShipment({ id: record.id }).then(res => {
           if (res.success) {
             console.log('提交成功,单据状态改为【已提交】')
-             this.shipmentListData.state == '1'
+            this.shipmentListData.state == '1'
             this.getShipmentList() // 渲染 发运明细列表
             this.$message.success('提交成功')
           }
@@ -598,7 +598,7 @@ export default {
         cancelSubmitShipment({ id: record.id }).then(res => {
           if (res.success) {
             console.log('取消提交成功,单据状态改为【仅保存】')
-             this.shipmentListData.state == '0'
+            this.shipmentListData.state == '0'
             this.getShipmentList() // 渲染 发运明细列表
             this.$message.success('取消提交成功')
           }