|
@@ -8,7 +8,7 @@
|
|
|
inactive-text="元"
|
|
|
/>
|
|
|
|
|
|
- <el-select size="small" style="margin-right:10px" v-model="depart_id" @change="requestData">
|
|
|
+ <el-select size="small" style="margin-right:10px" v-model="companyNo" @change="requestData">
|
|
|
<el-option v-for="depart in departItems" :key="depart.id" :value="depart.value" :label="depart.label" />
|
|
|
</el-select>
|
|
|
|
|
@@ -66,13 +66,20 @@ export default {
|
|
|
isTenThound:true,
|
|
|
daytime: "",
|
|
|
tableData: [],
|
|
|
- depart_id: "",
|
|
|
+ companyNo: "",
|
|
|
departItems:[
|
|
|
- {value:'',label:'所有平台'},
|
|
|
- {value:'52',label:'百辰荣达'},
|
|
|
- {value:'53',label:'普润心堂&锦兴弘昌'},
|
|
|
- {value:'56',label:'泓源广诚'},
|
|
|
- {value:'57',label:'万宇恒通'}
|
|
|
+ { value: "", label: "所有公司"},
|
|
|
+ { value: "GS2302231125079621", label: "北京百辰荣达国际科贸有限公司"},
|
|
|
+ { value: "GS2302231323386950", label: "北京泓源广诚国际商贸有限公司"},
|
|
|
+ // { value: "GS2304031312553746", label: "北京锦兴弘昌科技有限公司"},
|
|
|
+ // { value: "GS2302231124114965", label: "北京普润心堂商贸有限公司"},
|
|
|
+ { value: "GS2203161855277894", label: "北京万宇恒通国际科贸有限公司"},
|
|
|
+ { value: "GS2302231124114965", label:"普润&锦兴&知事" },
|
|
|
+ // {value:'',label:'所有平台'},
|
|
|
+ // {value:'52',label:'百辰荣达'},
|
|
|
+ // {value:'53',label:'普润心堂&锦兴弘昌'},
|
|
|
+ // {value:'56',label:'泓源广诚'},
|
|
|
+ // {value:'57',label:'万宇恒通'}
|
|
|
]
|
|
|
}
|
|
|
},
|
|
@@ -91,11 +98,17 @@ export default {
|
|
|
},
|
|
|
async requestData() {
|
|
|
this.loading = true;
|
|
|
-
|
|
|
- const result = await asyncRequest.departmentEveryMonth({
|
|
|
- year: (this.daytime.split('-'))[0],
|
|
|
- depart_id: this.depart_id
|
|
|
- })
|
|
|
+
|
|
|
+
|
|
|
+ let jxResult = null;
|
|
|
+ if(this.companyNo === "GS2302231124114965"){
|
|
|
+ // console.log(1);
|
|
|
+ jxResult = await asyncRequest.companyEvery({ year: (this.daytime.split('-'))[0], companyNo: "GS2304031312553746" })
|
|
|
+ };
|
|
|
+
|
|
|
+ console.log(jxResult)
|
|
|
+
|
|
|
+ const result = await asyncRequest.companyEvery({ year: (this.daytime.split('-'))[0], companyNo: this.companyNo })
|
|
|
|
|
|
switch(Number(result.code)){
|
|
|
case 0:
|
|
@@ -104,21 +117,19 @@ export default {
|
|
|
const pure_sale = subtraction(tableItem.sale_total,tableItem.th_total)
|
|
|
/* 指标达成率 = 销售净额 / 销售指标 **/
|
|
|
const completion_rate = multiplication(division(pure_sale,tableItem.total_tips),100)
|
|
|
-
|
|
|
/* 采购净额 = 采购额 - 采购退货额 **/
|
|
|
const pure_purch = subtraction(tableItem.cgd_total,tableItem.cgd_th_total)
|
|
|
/* 毛利润 = (本月销售净额 - 本月采购净额) **/
|
|
|
const pure_profit = subtraction(pure_sale,pure_purch)
|
|
|
/* 毛利率 = (本月毛利润 / 本月销售净额) * 100 **/
|
|
|
const pure_interest_rate = multiplication(division(pure_profit,pure_sale) || 0,100)
|
|
|
-
|
|
|
return {
|
|
|
- month:tableItem.month,
|
|
|
- completion_rate,
|
|
|
- pure_interest_rate,
|
|
|
- pure_profit,
|
|
|
pure_sale,
|
|
|
pure_purch,
|
|
|
+ pure_profit,
|
|
|
+ completion_rate,
|
|
|
+ pure_interest_rate,
|
|
|
+ month:tableItem.month,
|
|
|
cost_tips:tableItem.cost_tips,
|
|
|
total_tips:tableItem.total_tips,
|
|
|
cost_rate: Number(tableItem.cost_tips) === 0 ? 0 : multiplication(division(pure_profit, tableItem.cost_tips) || 0, 100).toFixed(2)
|