snow пре 6 дана
родитељ
комит
d5172b4a75

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/index.html


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/css/app.fb6a88a6.css


BIN
dist/static/css/app.77c08b5e.css.gz → dist/static/css/app.fb6a88a6.css.gz


BIN
dist/static/js/app.4524e791.js.gz


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/app.994bf64f.js


BIN
dist/static/js/app.994bf64f.js.gz


+ 72 - 40
src/pages/invData.vue

@@ -43,11 +43,11 @@
       </div>
 
 
-      <div v-loading="dayAccountLoading">
+      <!-- <div v-loading="dayAccountLoading">
         <div class="main-title">
           <p class="title">业务经理维度(补录)</p>
           <ElDatePicker style="width:135px" placeholder="日期" v-model="blDayDate" :clearable="false"
-            @change="requestCompanyDayBL" size="mini" value-format="yyyy-MM-dd" />
+            @change="requestAccountDayBl" size="mini" value-format="yyyy-MM-dd" />
         </div>
 
         <el-table size="small" border :data="blDayAccount">
@@ -55,12 +55,12 @@
           <el-table-column label="当日开票收入" prop="invDay" min-width="120px" />
           <el-table-column label="当月开票收入目标" prop="inv_tips" min-width="120px" />
           <el-table-column label="当月开票收入" prop="invMonth" min-width="100px" />
-          <el-table-column label="当月开票完成比" prop="invMonthRate" min-width="100px" />
+          <el-table-column label="当月开票完成比" prop="invMonthRate" min-width="120px" />
           <el-table-column label="当月开票成本" prop="costMonthTotal" min-width="100px" />
           <el-table-column label="毛利目标" min-width="80px" show-overflow-tooltip prop="cost_tips" />
           <el-table-column label="毛利完成比" min-width="100px" show-overflow-tooltip prop="costMonthRate" />
         </el-table>
-      </div>
+      </div> -->
 
 
       <div v-loading="monthCompanyLoading">
@@ -104,7 +104,7 @@
 
         <el-table size="small" border :data="monthAccount">
           <el-table-column label="月份" width="80px" show-overflow-tooltip prop="month" fixed="left" />
-          <el-table-column label="开票收入目标" min-width="120px" show-overflow-tooltip prop="inv_tips" />
+          <el-table-column label="开票收入目标" min-width="110px" show-overflow-tooltip prop="inv_tips" />
           <el-table-column label="开票收入" min-width="80px" show-overflow-tooltip prop="invMonth" />
           <el-table-column label="开票完成比" min-width="100px" show-overflow-tooltip prop="monthInvRate" />
           <el-table-column label="毛利目标" min-width="80px" show-overflow-tooltip prop="cost_tips" />
@@ -208,7 +208,7 @@ export default {
       const { data, code } = await asyncRequest.everyCompanMonth({ year: this.companyMonthDate, companyNo: this.monthCompanyNo })
       this.companyMonthLoading = false
 
-      if (code === 0) {
+      if (code === 1) {
         const list = []
         for(const item of data){
           const { cost_tips, inv_tips, year, month } = item
@@ -244,9 +244,7 @@ export default {
         totalItem.month = '合计'
         totalItem.monthInvRate = this.calcBl(totalItem.invMonth, totalItem.inv_tips)
         totalItem.costMonthRate = this.calcBl(totalItem.costMonth, totalItem.cost_tips)
-
         list.push(totalItem)
-
         this.monthCompany = list
       }
     },
@@ -263,7 +261,7 @@ export default {
 
 
       const list = []
-      if (code === 0) {
+      if (code === 1) {
         for (const item of data) {
           const { cost_tips, inv_tips, month } = item
           const invMonth = subtraction(item.month_inv_fee, item.month_return_inv_fee)
@@ -281,9 +279,6 @@ export default {
             costMonthRate,
           })
         }
-
-
-       
       }
 
       const totalItem = list.reduce((prev, current) => ({
@@ -313,7 +308,7 @@ export default {
       this.companyDayLoading = true
       const { data, code } = await asyncRequest.everyCompanyDay({ daytime: this.companyDayDate })
       this.companyDayLoading = false
-      if (code === 0) {
+      if (code === 1) {
 
 
         const list = []
@@ -325,17 +320,18 @@ export default {
           const monthInvRate = this.calcBl(invMonth, inv_tips)
           const costRate = this.calcBl(subtraction(invMonth, costMonth), cost_tips)
 
-
-          list.push({
-            companyName: item.companyName,
-            invDay,
-            invMonth,
-            inv_tips,
-            cost_tips,
-            monthInvRate,
-            costMonth,
-            costRate
-          })
+          if (this.companies.map(({ companyNo }) => companyNo).includes(item.companyNo)){
+            list.push({
+              companyName: item.companyName,
+              invDay,
+              invMonth,
+              inv_tips,
+              cost_tips,
+              monthInvRate,
+              costMonth,
+              costRate
+            })
+          }
         }
 
         this.dayCompany = list
@@ -344,10 +340,12 @@ export default {
     async requestAccountDay(){
       this.dayAccountLoading = true
       const { data, code } = await asyncRequest.everyAccountDay({ daytime: this.dayDate })
+      const accountInvData = await asyncRequest.accountInvList({ daytime: dayjs(this.dayDate).format('YYYY-MM') })
       this.dayAccountLoading = false
-      if (code === 0) { 
+      const list = []
 
-        const list = []
+      
+      if (code === 1) { 
         for (const item of data) {
           const { inv_tips, cost_tips } = item.tips
           const invDay = subtraction(item.dayinfo.inv_fee, item.dayinfo.return_inv_fee)
@@ -370,19 +368,45 @@ export default {
           })
         }
 
-        this.dayAccount = list 
       }
+
+
+
+      if (accountInvData.code === 1){
+        for (const item of accountInvData.data.list) {
+          const invMonth = subtraction(item.inv_fee, item.return_inv_fee)
+          const costMonthTotal = subtraction(item.cost_fee, item.return_cost_fee)
+
+          list.push({
+            uname: item.uname,
+            companyName: item.companyName,
+            invDay: '--',
+            invMonth,
+            inv_tips: '--',
+            invMonthRate: '--',
+            costMonthTotal,
+            cost_tips: '--',
+            costMonthRate: '--'
+          })
+
+        }
+
+      }
+
+      this.dayAccount = list 
+
     },
     async requestAccountDayBl() {
       this.blDayAccountLoading = true
       const { data, code } = await asyncRequest.accountInvList({ daytime: this.blDayDate })
       this.blDayAccountLoading = false
-      if (code === 0) {
 
+
+      if (code === 1) {
         const list = []
-        for (const item of data) {
-          const { inv_tips, cost_tips } = item.tips
-          const invDay = subtraction(item.dayinfo.inv_fee, item.dayinfo.return_inv_fee)
+        for (const item of data.list) {
+          const { inv_tips = 0, cost_tips = 0 } = item
+          const invDay = subtraction(item.inv_fee, item.return_inv_fee)
           const invMonth = subtraction(item.month_inv_fee, item.month_return_inv_fee)
           const invMonthRate = this.calcBl(item.month_inv_fee, inv_tips)
           const costMonthTotal = subtraction(item.month_cost_fee, item.month_return_cost_fee)
@@ -451,27 +475,27 @@ export default {
 		  //     "subscribe_time": "2022-12-21 15:52:14",
 		  //     "addr": "\/\/",
 		  //     "status": "1",
-		  //     "is_show": ["1", "2", "4"],
+		  //     "is_show": ["1", "2", "4", "10"],
       //   "companyArr": [{
       //     "companyNo": "GS2304031312553746",
       //     "companyName": "北京锦兴弘昌科技有限公司",
-      //     "info": [1, 2]
+      //     "info": [1, 2, 10]
       //   },{
 		  //     	"companyNo": "GS2302231125079621",
 		  //     	"companyName": "北京百辰荣达国际科贸有限公司",
-		  //     	"info": [1,2]
+		  //     	"info": [1,2, 10]
 		  //     }, {
 		  //     	"companyNo": "GS2302231323386950",
 		  //     	"companyName": "北京泓源广诚国际商贸有限公司",
-		  //     	"info": [1,2]
+		  //     	"info": [1,2, 10]
 		  //     }, {
 		  //     	"companyNo": "GS2302231124114965",
 		  //     	"companyName": "北京普润心堂商贸有限公司",
-		  //     	"info": [1, 2]
+		  //     	"info": [1, 2, 10]
 		  //     }, {
 		  //     	"companyNo": "GS2203161855277894",
 		  //     	"companyName": "北京万宇恒通国际科贸有限公司",
-		  //     	"info": [1, 2]
+		  //     	"info": [1, 2, 10]
 		  //     }],
 		  //     "addtime": "2023-04-10 18:11:07",
 		  //     "updatetime": "2023-05-09 16:22:33"
@@ -481,10 +505,18 @@ export default {
         this.state.loading = false
         switch(Number(result.code)){
           case 0:
-           this.isShow =  (result.data.is_show || []).includes(4) || (result.data.is_show || []).includes('4')
-           this.companies = result.data.companyArr.map(item => ({ companyNo: item.companyNo, companyName: item.companyName }))
+           this.isShow =  (result.data.is_show || []).includes(10) || (result.data.is_show || []).includes('10')
+
+            this.companies = result.data.companyArr.reduce((prev, current) => {
+              return current.info.includes(10) || current.info.includes('10') ? [...prev, {
+                companyNo: current.companyNo,
+                companyName: current.companyName
+              }] : prev
+            }, [])
+
+          //  this.companies = result.data.companyArr.map(item => ({ companyNo: item.companyNo, companyName: item.companyName }))
            this.monthCompanyNo = this.companies[0].companyNo
-            this.requestData()
+           this.requestData()
            break
           default:
            this.state.error = true

Неке датотеке нису приказане због велике количине промена