Sfoglia il codice sorgente

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/aiot-app into dengfei

695593266@qq.com 7 mesi fa
parent
commit
7652d91d4a
3 ha cambiato i file con 932 aggiunte e 944 eliminazioni
  1. 4 5
      api/home/index.js
  2. 8 19
      pages/home/home.vue
  3. 920 920
      yarn.lock

+ 4 - 5
api/home/index.js

@@ -52,9 +52,8 @@ export async function getGoodsPage(params) {
 }
 
 // 获取年度生产总量
-export async function getProduceAmount(params) {
-	const data = await get(Vue.prototype.apiUrl + `/mes/index/completionCount`, params)
-	// console.log(data);
+export async function getProduceAmount(body) {
+	const data = await postJ(Vue.prototype.apiUrl + `/mes/index/completionCount`, body)
 	if (data.code == 0) {
 		return data.data
 	}
@@ -62,8 +61,8 @@ export async function getProduceAmount(params) {
 }
 
 // 获取待生产总量
-export async function getPendingAmount(params) {
-	const data = await get(Vue.prototype.apiUrl + `/mes/index/count`, params)
+export async function getPendingAmount(body) {
+	const data = await postJ(Vue.prototype.apiUrl + `/mes/index/count`, body)
 	if (data.code == 0) {
 		return data.data
 	}

+ 8 - 19
pages/home/home.vue

@@ -387,33 +387,22 @@
 					title: '加载中'
 				})
 
-				let params = {
-					startDate: '',
-					endDate: '',
-					factoriesId: 0
-				}
-				let nowYear = getDateNew('year') + '-01-01'
-				let nowMonth = getDateNew('month') + '-01'
-				let now = getDateNew()
-				console.log(now, nowYear, nowMonth);
-				params.endDate = now
-
-
-
-
-
 				const res1 = await getCount()
 				const res2 = await getGoodsPage()
 				const res3 = await getYearAmount()
 				const res4 = await getReceivableAmount()
 				const res5 = await getPayableAmount()
+				// 年度
 				const res6 = await getProduceAmount({
-					...params,
-					startDate: nowYear
+					createTimeStart: getDateNew('year') + '-01',
+					createTimeEnd: getDateNew('year') + '-12',
+					factoryId: null
 				})
+				// 本月
 				const res7 = await getProduceAmount({
-					...params,
-					startDate: nowMonth
+					createTimeStart:  getDateNew('month'),
+					createTimeEnd:  getDateNew('month'),
+					factoryId: null
 				})
 
 

File diff suppressed because it is too large
+ 920 - 920
yarn.lock


Some files were not shown because too many files changed in this diff