Преглед на файлове

Merge branch 'develop_yh58' of jianguan-web/jg-ocs-html into pre-release

李磊 преди 1 месец
родител
ревизия
c11af25baf

+ 4 - 2
src/views/reportData/dailyReport/table.vue

@@ -156,6 +156,7 @@ export default {
       this.totalNums = 0
       this.totalNums = []
     },
+    // 导出表格excel,dom 表格对象,title 导出表格名称
     exportTable (dom, title) {
       const zim = 'A、B、C、D、E、F、G、H、I、J、K、L、M、N、O、P、Q、R、S、T、U、V、W、X、Y、Z‌'.split('、')
       var ws = XLSX.utils.table_to_sheet(dom)
@@ -180,7 +181,7 @@ export default {
           }
         }
       })
-
+      // 设置百分比格式
       // 表格0
       if (this.activeKey == 0) {
         const ri = [6, 11, 20, 23]
@@ -232,7 +233,7 @@ export default {
       XLSX.utils.book_append_sheet(wb, ws, 'Sheet1')
       XLSX.writeFile(wb, this.queryParam.month.split('-')[1] + '月' + title + '-' + timeStr + '.xlsx')
     },
-    //  导出
+    //  点击导出
     handleExport () {
       const excelTitle = this.tabsList.find(item => item.id == this.activeKey)
       if (this.$refs.table0 && this.activeKey == 0) {
@@ -288,6 +289,7 @@ export default {
       }
       this.spinning = false
     },
+    // 项目销售日报1列数据
     getColumns () {
       const row = this.tableData[0]
       const ret = []

+ 15 - 4
src/views/reportData/dailyReport/table0.vue

@@ -38,18 +38,22 @@
 export default {
   name: 'Table0',
   props: {
+    // 表格数据
     tableData: {
       type: Array,
       default: () => []
     },
+    // 月份
     month: {
       type: String,
       default: () => ''
     },
+    // 列数据
     columns: {
       type: Array,
       default: () => []
     },
+    // 当前截止日期
     nowDate: {
       type: String,
       default: () => ''
@@ -57,21 +61,24 @@ export default {
   },
   data () {
     return {
-      months: '',
-      list: [],
-      showDz: false,
-      dateStr: ''
+      months: '', // 月份
+      list: [], // 列表数据
+      showDz: false, // 是否显示截止日期
+      dateStr: '' // 格式化日期
     }
   },
   methods: {
+    // 获取日期
     getmonths () {
       this.months = this.month.split('-')[1]
       this.dateStr = this.month.replace('-', '年') + '月'
     },
+    // 是否显示截止日期
     getshowDz () {
       const nowMonths = new Date().getMonth() + 1
       this.showDz = this.months == nowMonths
     },
+    // 重组列表数据
     getlist () {
       const rets = []
       const row1 = [
@@ -135,15 +142,19 @@ export default {
       })
       this.list = rets
     },
+    // 是否合并单元格
     hasRowspan (row) {
       return row && row.toString().split('rowspan')
     },
+    // 是否显示百分比
     hasRate (row) {
       return ['yearTargetRate', 'currTargetRate', 'yearTargetTireRate', 'currTargetTireRate'].includes(row.key)
     },
+    // 获取表格对象
     getTable () {
       return document.getElementById('day-table-0')
     },
+    // 初始化
     pageInit () {
       this.getmonths()
       this.getshowDz()

+ 16 - 4
src/views/reportData/dailyReport/table1.vue

@@ -37,18 +37,22 @@
 export default {
   name: 'Table1',
   props: {
+    // 表格数据
     tableData: {
       type: Array,
       default: () => []
     },
+    // 月份
     month: {
       type: String,
       default: () => ''
     },
+    // 表头
     columns: {
       type: Array,
       default: () => []
     },
+    // 当前日期
     nowDate: {
       type: String,
       default: () => ''
@@ -56,21 +60,24 @@ export default {
   },
   data () {
     return {
-      months: '',
-      list: [],
-      showDz: false,
-      dateStr: ''
+      months: '', // 月份
+      list: [], // 列表数据
+      showDz: false, // 是否显示截止日期
+      dateStr: '' // 日期格式化
     }
   },
   methods: {
+    // 获取月份
     getmonths () {
       this.months = this.month.split('-')[1]
       this.dateStr = this.month.replace('-', '年') + '月'
     },
+    // 是否显示截止日期
     getshowDz () {
       const nowMonths = new Date().getMonth() + 1
       this.showDz = this.months == nowMonths
     },
+    // 重组数据
     getlist () {
       let rets = []
       this.tableData.forEach((item, i) => {
@@ -81,21 +88,26 @@ export default {
       })
       this.list = rets
     },
+    // 是否合并单元格
     hasRowspan (row) {
       return row.toString().split('rowspan')
     },
+    // 是否合计
     hasHj (a, b, c, d) {
       const hj = this.columns.findIndex(item => item == '销售额合计')
       const arr = ['合计', '箭牌喇叭', '制动系统']
       return (d == hj && arr.find(item => a.toString().indexOf(item) >= 0))
     },
+    // 是否标红
     hasRed (row, tdi) {
       const arr = ['合计', '箭牌喇叭', '制动系统']
       return arr.find(item => row.toString().indexOf(item) >= 0)
     },
+    // 获取表格对象
     getTable () {
       return document.getElementById('day-table-1')
     },
+    // 初始化
     pageInit () {
       this.getmonths()
       this.getshowDz()

+ 14 - 5
src/views/reportData/dailyReport/table2.vue

@@ -34,14 +34,17 @@
 export default {
   name: 'Table2',
   props: {
+    // 表格数据
     tableData: {
       type: Array,
       default: () => []
     },
+    // 月份
     month: {
       type: String,
       default: () => ''
     },
+    // 当前日期
     nowDate: {
       type: String,
       default: () => ''
@@ -49,32 +52,38 @@ export default {
   },
   data () {
     return {
-      months: '',
-      list: [],
-      showDz: false,
-      dateStr: '',
-      cloumns: []
+      months: '', // 月
+      list: [], // 列表数据
+      showDz: false, // 是否显示截止日期
+      dateStr: '', // 日期格式化
+      cloumns: [] // 列表头
     }
   },
   methods: {
+    // 获取表格列头
     getcloumns () {
       const m = this.month.split('-')
       this.cloumns = ['项目', '品类经理', m[1] + '月业绩目标', m[1] + '月销售额截止达成', '达成率']
     },
+    // 获取月份
     getmonths () {
       this.months = this.month.split('-')[1]
       this.dateStr = this.month.replace('-', '年') + '月'
     },
+    // 是否显示截止日期
     getshowDz () {
       const nowMonths = new Date().getMonth() + 1
       this.showDz = this.months == nowMonths
     },
+    // 获取表格数据
     getlist () {
       this.list = this.tableData
     },
+    // 获取表格对象
     getTable () {
       return document.getElementById('day-table-2')
     },
+    // 初始化
     pageInit () {
       this.getmonths()
       this.getcloumns()

+ 14 - 4
src/views/reportData/dailyReport/table3.vue

@@ -61,14 +61,17 @@
 export default {
   name: 'Table3',
   props: {
+    // 表格数据
     tableData: {
       type: Array,
       default: () => []
     },
+    // 月份
     month: {
       type: String,
       default: () => ''
     },
+    // 日期
     nowDate: {
       type: String,
       default: () => ''
@@ -76,13 +79,14 @@ export default {
   },
   data () {
     return {
-      months: '',
-      list: [],
-      showDz: false,
-      dateStr: ''
+      months: '', // 月份
+      list: [], // 列表数据
+      showDz: false, // 是否显示截止日期
+      dateStr: '' // 日期格式化
     }
   },
   computed: {
+    // 是否合计
     hjRow () {
       const ret = []
       this.list.forEach((item, index) => {
@@ -92,6 +96,7 @@ export default {
       })
       return ret
     },
+    // 列
     columns () {
       return [
         {
@@ -179,20 +184,25 @@ export default {
     }
   },
   methods: {
+    // 获取月份
     getmonths () {
       this.months = this.month.split('-')[1]
       this.dateStr = this.month.replace('-', '年') + '月'
     },
+    // 是否显示截止日期
     getshowDz () {
       const nowMonths = new Date().getMonth() + 1
       this.showDz = this.months == nowMonths
     },
+    // 获取表格数据
     getlist () {
       this.list = this.tableData
     },
+    // 获取表格对象
     getTable () {
       return document.getElementById('day-table-3')
     },
+    // 初始化
     pageInit () {
       this.getmonths()
       this.getshowDz()

+ 11 - 11
src/views/setting/dailyReportSettings/categoryTargetList.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
-    <a-card size="small" :bordered="false" class="estimatedOrderList-wrap searchBoxNormal">
+    <a-card size="small" :bordered="false" class="categoryTargetList-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
-          id="estimatedOrderList-form"
+          id="categoryTargetList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -14,12 +14,12 @@
             <a-col :md="5" :sm="24">
               <a-form-model-item label="年份" prop="confYear">
                 <a-select
-                  id="estimatedOrderList-confYear"
+                  id="categoryTargetList-confYear"
                   style="width: 100%"
                   placeholder="请选择年份"
                   :value="queryParam.confYear"
                   @change="changeYear">
-                  <a-select-option :id="'estimatedOrderList-'+item" v-for="item in years" :value="item" :key="item">
+                  <a-select-option :id="'categoryTargetList-'+item" v-for="item in years" :value="item" :key="item">
                     {{ item }}
                   </a-select-option>
                 </a-select>
@@ -30,12 +30,12 @@
                 type="primary"
                 @click="handleSearch"
                 :disabled="disabled"
-                id="estimatedOrderList-refresh">查询</a-button>
+                id="categoryTargetList-refresh">查询</a-button>
               <a-button
                 style="margin-left: 8px"
                 @click="resetSearchForm"
                 :disabled="disabled"
-                id="estimatedOrderList-reset">重置</a-button>
+                id="categoryTargetList-reset">重置</a-button>
             </a-col>
           </a-row>
         </a-form-model>
@@ -73,7 +73,7 @@
                 placeholder="请输入"
                 :value="text"
                 :precision="2"
-                :id="'estimatedOrderList-input-'+record.id"
+                :id="'categoryTargetList-input-'+record.id"
                 @blur="e => handleChange(e.target.value,record, col)"/>
               <template v-else>
                 {{ text?toThousands(text):'0.00' }}
@@ -88,11 +88,11 @@
                 type="link"
                 class="button-info"
                 @click="handleSave(record)"
-                :id="'estimatedOrderList-save-btn'+record.id"
+                :id="'categoryTargetList-save-btn'+record.id"
               >
                 保存
               </a-button>
-              <a-popconfirm title="确定取消吗?" :id="'estimatedOrderList-cancel-btn'+record.id" @confirm="() => handleCancel(record)">
+              <a-popconfirm title="确定取消吗?" :id="'categoryTargetList-cancel-btn'+record.id" @confirm="() => handleCancel(record)">
                 <a>取消</a>
               </a-popconfirm>
             </span>
@@ -103,7 +103,7 @@
               class="button-info"
               :disabled="editingKey !== ''"
               @click="handleEdit(record)"
-              :id="'estimatedOrderList-edit-btn'+record.id"
+              :id="'categoryTargetList-edit-btn'+record.id"
             >
               编辑
             </a-button>
@@ -122,7 +122,7 @@ import { STable } from '@/components'
 // 接口
 import { reportDailyConfList, dailyReportConfSave } from '@/api/reportDailyConf'
 export default {
-  name: 'EstimatedOrderList',
+  name: 'CategoryTargetList',
   mixins: [commonMixin],
   components: { STable },
   props: {

+ 1 - 1
src/views/setting/dailyReportSettings/index.vue

@@ -33,7 +33,7 @@ export default {
   components: { estimatedOrderList, categoryTargetList, partitionTargetList },
   data () {
     return {
-      tabVal: '1'// tab值  1轮胎月度费用报表 2轮胎季度费用报表 3轮胎年度费用报表 4轮胎费用明细报表
+      tabVal: '1'// tab值  1区域预估订单 2轮胎月目标 3品类月目标 4品类经理月目标  5分区月目标
     }
   }
 }

+ 12 - 12
src/views/setting/dailyReportSettings/partitionTargetList.vue

@@ -1,10 +1,10 @@
 <template>
   <div>
-    <a-card size="small" :bordered="false" class="estimatedOrderList-wrap searchBoxNormal">
+    <a-card size="small" :bordered="false" class="partitionTargetList-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper" ref="tableSearch">
         <a-form-model
-          id="estimatedOrderList-form"
+          id="partitionTargetList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -14,12 +14,12 @@
             <a-col :md="5" :sm="24">
               <a-form-model-item label="年份" prop="confYear">
                 <a-select
-                  id="estimatedOrderList-confYear"
+                  id="partitionTargetList-confYear"
                   style="width: 100%"
                   placeholder="请选择年份"
                   :value="queryParam.confYear"
                   @change="changeYear">
-                  <a-select-option :id="'estimatedOrderList-'+item" v-for="item in years" :value="item" :key="item">
+                  <a-select-option :id="'partitionTargetList-'+item" v-for="item in years" :value="item" :key="item">
                     {{ item }}
                   </a-select-option>
                 </a-select>
@@ -30,12 +30,12 @@
                 type="primary"
                 @click="handleSearch"
                 :disabled="disabled"
-                id="estimatedOrderList-refresh">查询</a-button>
+                id="partitionTargetList-refresh">查询</a-button>
               <a-button
                 style="margin-left: 8px"
                 @click="resetSearchForm"
                 :disabled="disabled"
-                id="estimatedOrderList-reset">重置</a-button>
+                id="partitionTargetList-reset">重置</a-button>
             </a-col>
           </a-row>
         </a-form-model>
@@ -74,7 +74,7 @@
                 placeholder="请输入"
                 :precision="2"
                 :value="text"
-                :id="'estimatedOrderList-input-'+record.id"
+                :id="'partitionTargetList-input-'+record.id"
                 @blur="e => handleChange(e.target.value,record, col)"/>
               <template v-else>
                 {{ text?toThousands(text):'0.00' }}
@@ -89,11 +89,11 @@
                 type="link"
                 class="button-info"
                 @click="handleSave(record)"
-                :id="'estimatedOrderList-save-btn'+record.id"
+                :id="'partitionTargetList-save-btn'+record.id"
               >
                 保存
               </a-button>
-              <a-popconfirm title="确定取消吗?" :id="'estimatedOrderList-cancel-btn'+record.id" @confirm="() => handleCancel(record)">
+              <a-popconfirm title="确定取消吗?" :id="'partitionTargetList-cancel-btn'+record.id" @confirm="() => handleCancel(record)">
                 <a>取消</a>
               </a-popconfirm>
             </span>
@@ -104,7 +104,7 @@
               class="button-info"
               :disabled="editingKey !== ''"
               @click="handleEdit(record)"
-              :id="'estimatedOrderList-edit-btn'+record.id"
+              :id="'partitionTargetList-edit-btn'+record.id"
             >
               编辑
             </a-button>
@@ -123,7 +123,7 @@ import { STable } from '@/components'
 // 接口
 import { reportDailyConfList, dailyReportConfSave } from '@/api/reportDailyConf'
 export default {
-  name: 'EstimatedOrderList',
+  name: 'PartitionTargetList',
   mixins: [commonMixin],
   components: { STable },
   props: {
@@ -346,7 +346,7 @@ export default {
 }
 /* 最后一行样式 */
 /deep/.last-row {
-    background: #fafafa !important; /* 色背景 */
+    background: #fafafa !important; /* 色背景 */
     /* 固定定位 */
     position: sticky;
     bottom: 0;