shish 2 лет назад
Родитель
Сommit
40eb893d72

+ 2 - 0
ghs/src/cool/request/index.js

@@ -36,6 +36,7 @@ import ptItemClass from '@/service/pt-item-class/index';
 import ghsItemClass from '@/service/ghs-item-class/index';
 import statBook from '@/service/stat-book/index';
 import statItem from '@/service/stat-item/index';
+import statCg from '@/service/stat-cg/index';
 import stat from '@/service/stat/index';
 import ghs from '@/service/ghs/index';
 import cg from '@/service/cg/index';
@@ -49,6 +50,7 @@ export function SET_SERVICE({ store }) {
 	// const ignore = ['./request.js'];
 
 	let modules = {
+		statCg,
 		statItem,
 		modify,
 		customBalanceChange,

+ 1 - 1
ghs/src/service/stat-book/index.js

@@ -3,4 +3,4 @@ import { BaseService, Service } from '@/cool';
 export class StatBookService extends BaseService {
 
 }
-export default new StatBookService();
+export default new StatBookService();

+ 13 - 0
ghs/src/service/stat-cg/index.js

@@ -0,0 +1,13 @@
+import { BaseService, Service } from '@/cool';
+@Service('stat-cg')
+export class StatCgService extends BaseService {
+
+	getProfit(data) {
+		return this.request({
+			url: '/profit',
+			params: data
+		});
+	}
+
+}
+export default new StatCgService();

+ 5 - 15
ghs/src/views/assets/cgItem.vue

@@ -10,7 +10,7 @@
 			</template>
 
             <template #slot-total-amount>
-				<span style="font-size:15px;font-weight:bold;">{{totalNum}} 笔 ¥{{ totalAmount }} 总毛利 {{ totalMl }}</span>
+				<span style="font-size:15px;font-weight:bold;"></span>
 			</template>
 
 			<template #table-column-mll="{scope}">
@@ -71,7 +71,7 @@ export default {
 	},
 	methods: {
 		exportData(){
-			this.$service.statItem.getShow({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,export:1}).then(res => {
+			this.$service.statCg.getProfit({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime,export:1}).then(res => {
 				if(res.file){
 					window.location.href = res.file
 				}
@@ -81,7 +81,7 @@ export default {
                 this.app = app;
                 ctx.service({
                     page: () => {
-                        return this.$service.statItem.getShow({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then((res) => {
+                        return this.$service.statCg.getProfit({searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then((res) => {
 							this.totalAmount = res.totalAmount||0
 							this.totalMl = res.totalMl||0
 							this.totalNum = res.totalNum||0
@@ -100,24 +100,14 @@ export default {
 							align: 'center',
 						},
 						{
-							label: '数量',
+							label: '数量',
 							prop: 'num',
 							align: 'center',
 						},
 						{
-							label: '金额',
+							label: '金额',
 							prop: 'amount',
 							align: 'center',
-						},
-						{
-							label: '毛利',
-							prop: 'gross',
-							align: 'center',
-						},
-						{
-							label: '毛利率',
-							prop: 'mll',
-							align: 'center',
 						}
 					],
 					op: {