Ver Fonte

报表修改

yusheng há 10 meses atrás
pai
commit
206ff9f4bc
3 ficheiros alterados com 53 adições e 20 exclusões
  1. 20 0
      src/api/bpm/visPage.js
  2. 20 12
      src/views/bpm/vis-page/index.vue
  3. 13 8
      src/views/bpm/vis-page/page2.vue

+ 20 - 0
src/api/bpm/visPage.js

@@ -59,6 +59,23 @@ export async function getProductInStoreWeightAPI(query) {
   }
   }
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
+
+//获取成品入库数量
+export async function getProductInStoreQuantity(query) {
+  const res = await request({
+    url: '/dataScreen/getProductInStoreQuantity',
+    method: 'get',
+    params: query
+  })
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+
+
 //获取月度销量统计
 //获取月度销量统计
 export async function getMonthlySalesStatisticAPI(query) {
 export async function getMonthlySalesStatisticAPI(query) {
   const res = await request({
   const res = await request({
@@ -118,6 +135,9 @@ export async function getYearlyPurchaseAmountAPI() {
   }
   }
   return Promise.reject(new Error(res.data.message));
   return Promise.reject(new Error(res.data.message));
 }
 }
+
+
+
 //月度采购明细 列表(万元)
 //月度采购明细 列表(万元)
 export async function getMonthlyPurchaseDetailAPI() {
 export async function getMonthlyPurchaseDetailAPI() {
   const res = await request({
   const res = await request({

+ 20 - 12
src/views/bpm/vis-page/index.vue

@@ -73,7 +73,7 @@
           <div class="box-echarts">
           <div class="box-echarts">
             <div class="box-echarts-top">
             <div class="box-echarts-top">
               <span class="box-top-name">月度产量统计</span>
               <span class="box-top-name">月度产量统计</span>
-              <span class="box-top-unit">(KG)</span>
+              <!-- <span class="box-top-unit">(KG)</span> -->
             </div>
             </div>
             <div class="monthly_output">
             <div class="monthly_output">
               <div v-if="isFlag" id="monthly_output" ref="monthly_output"></div>
               <div v-if="isFlag" id="monthly_output" ref="monthly_output"></div>
@@ -121,7 +121,8 @@
     getSignAmountAPI,
     getSignAmountAPI,
     getMonthlySalesStatisticAPI,
     getMonthlySalesStatisticAPI,
     getMonthlyProduceStatisticAPI,
     getMonthlyProduceStatisticAPI,
-    getSalesFinishListAPI
+    getSalesFinishListAPI,
+    getProductInStoreQuantity
   } from '@/api/bpm/visPage';
   } from '@/api/bpm/visPage';
   import { LAYOUT_PATH } from '@/config/setting';
   import { LAYOUT_PATH } from '@/config/setting';
   import { isFullscreen, toggleFullscreen } from 'ele-admin';
   import { isFullscreen, toggleFullscreen } from 'ele-admin';
@@ -135,6 +136,9 @@
     computed: {
     computed: {
       contentWidth() {
       contentWidth() {
         return this.$store.state.theme.contentWidth;
         return this.$store.state.theme.contentWidth;
+      },
+      clientEnvironmentId() {
+        return this.$store.state.user.info.clientEnvironmentId;
       }
       }
     },
     },
     watch: {
     watch: {
@@ -271,10 +275,14 @@
             fun: () => getSalesAmountAPI()
             fun: () => getSalesAmountAPI()
           },
           },
           {
           {
-            titleName: '增重重量',
-            titleUnit: '(KG)',
+            titleName:
+              this.clientEnvironmentId == 3 ? '增重重量' : '成品入库数量',
+            titleUnit: '(PCS)',
             value: '0',
             value: '0',
-            fun: () => getIncreaseWeightAPI()
+            fun: () =>
+              this.clientEnvironmentId == 3
+                ? getIncreaseWeightAPI()
+                : getProductInStoreQuantity()
           },
           },
           {
           {
             titleName: '成品入库重量',
             titleName: '成品入库重量',
@@ -534,8 +542,8 @@
         let data = await getMonthlyProduceStatisticAPI();
         let data = await getMonthlyProduceStatisticAPI();
         let series = [
         let series = [
           {
           {
-            field: 'increaseWeight',
-            name: '增重重量',
+            field: this.clientEnvironmentId == 3 ?'increaseWeight':'produceQuantity',
+            name: this.clientEnvironmentId == 3 ? '增重重量' : '成品入库数量',
             data: [],
             data: [],
             type: 'bar',
             type: 'bar',
             itemStyle: {
             itemStyle: {
@@ -562,11 +570,11 @@
       //
       //
       async getSalesFinishList() {
       async getSalesFinishList() {
         /*customerMark	客户代号	string
         /*customerMark	客户代号	string
-deliveryStatus	交付状态 1未交付2提前3按时4延期	integer(int32)
-produceStatus	生产状态 1未生产2已生产3已完成	integer(int32)
-purchaseStatus	采购状态 1未采购2已采购3已入库	integer(int32)
-saleOrderCode	销售订单号	string
-scheduleStatus	排产状态 1待排产2已排产	integer(int32)*/
+  deliveryStatus	交付状态 1未交付2提前3按时4延期	integer(int32)
+  produceStatus	生产状态 1未生产2已生产3已完成	integer(int32)
+  purchaseStatus	采购状态 1未采购2已采购3已入库	integer(int32)
+  saleOrderCode	销售订单号	string
+  scheduleStatus	排产状态 1待排产2已排产	integer(int32)*/
         let HeaderFiled = [
         let HeaderFiled = [
           'customerMark',
           'customerMark',
           'saleOrderCode',
           'saleOrderCode',

+ 13 - 8
src/views/bpm/vis-page/page2.vue

@@ -248,11 +248,11 @@ export default {
         },
         },
         series: []
         series: []
       },
       },
-      tableHeader: ['客户代号', '销售订单号', '采购订单', '到货情况', '入库情况', '质检状态', '合格率'],
+      tableHeader: ['客户代号', '销售订单号', '采购订单', '数量', '到货情况', '入库情况', '质检状态', '合格率'],
       config: {
       config: {
         header: [],
         header: [],
         data: [],
         data: [],
-        align: ['center', 'center', 'center', 'center', 'center', 'center', 'center'],
+        align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center'],
         headerBGC: '#031d42',
         headerBGC: '#031d42',
         columnWidth: [110, 200],
         columnWidth: [110, 200],
         headerHeight: 20,
         headerHeight: 20,
@@ -384,28 +384,33 @@ export default {
               div = `<div class="white" style="font-size: 0.8rem;">${item[i] || '-'}</div>`
               div = `<div class="white" style="font-size: 0.8rem;">${item[i] || '-'}</div>`
               list[2] = div
               list[2] = div
             }
             }
+            if (i === 'productTotalCount') {
+              div = `<div class="white" style="font-size: 0.8rem;">${item[i]||'-'}</div>`
+              list[3] = div
+            }
             if (i === 'receiveStatus') {
             if (i === 'receiveStatus') {
               div = `<div class="white" style="font-size: 0.8rem;">${this.getValue('receiveStatus', item[i])}</div>`
               div = `<div class="white" style="font-size: 0.8rem;">${this.getValue('receiveStatus', item[i])}</div>`
-              list[3] = div
+              list[4] = div
 
 
             }
             }
             if (i === 'inStoreStatus') {
             if (i === 'inStoreStatus') {
               div = `<div class="white" style="font-size: 0.8rem;">${this.getValue('inStoreStatus', item[i])}</div>`
               div = `<div class="white" style="font-size: 0.8rem;">${this.getValue('inStoreStatus', item[i])}</div>`
-              list[4] = div
+              list[5] = div
 
 
             }
             }
             if (i === 'qcStatus') {
             if (i === 'qcStatus') {
               div = `<div class="white" style="font-size: 0.8rem;">${this.getValue('qcStatus', item[i])}</div>`
               div = `<div class="white" style="font-size: 0.8rem;">${this.getValue('qcStatus', item[i])}</div>`
-              list[5] = div
+              list[6] = div
             }
             }
+         
             if (i === 'qcRate') {
             if (i === 'qcRate') {
-              div = `<div class="white" style="font-size: 0.8rem;">${item[i] + '%'}</div>`
-              list[6] = div
+              div = `<div class="white" style="font-size: 0.8rem;">${item[i]||0 + '%'}</div>`
+              list[7] = div
             }
             }
           }
           }
           return list
           return list
         }) ?? [],
         }) ?? [],
-        align: ['center', 'center', 'center', 'center', 'center', 'center', 'center'],
+        align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center'],
         headerBGC: '#031d42',
         headerBGC: '#031d42',
         columnWidth: [],
         columnWidth: [],
         headerHeight: 30,
         headerHeight: 30,