shish 4 лет назад
Родитель
Сommit
a07e2afb79

+ 7 - 33
hdApp/src/admin/work/statCat.vue

@@ -14,14 +14,13 @@
 				<block>
 					<t-table :headerBackgroundColor="'#F0F2F6'">
 
-						<t-tr header><t-th>名称</t-th><t-th>制作单</t-th><t-th>商品数</t-th><t-th>操作</t-th></t-tr>
+						<t-tr header><t-th>名称</t-th><t-th>制作单</t-th><t-th>商品数</t-th><t-th>使用花材</t-th></t-tr>
 
 						<view v-for="(item, index) in statData" :key="index">
 							<t-tr>
-								<t-td><view>{{item.customName}}</view></t-td>
-								<t-td><view>{{item.levelName}}</view></t-td>
-								<t-td><view>{{parseFloat(item.num)}}</view></t-td>
-
+								<t-td><view>{{item.catName}}</view></t-td>
+								<t-td><view>{{item.workNum}}</view></t-td>
+								<t-td><view>{{item.num}}</view></t-td>
 								<t-td>
 									<button class="admin-button-com mini blue change-level" @click="getDetail(item)">查看明细</button>
 								</t-td>
@@ -60,33 +59,11 @@ export default {
 			showTimeDropdown: false,
 			nowShop: "",
 			showShopDropdown: false,
-			columns: [
-				{
-					name: "姓名",
-					dataIndex: "name",
-					color: "info"
-				},
-				{
-					name: "开单额",
-					dataIndex: "amount",
-					color: "info",
-					width: 120,
-					align: "center"
-				},
-				{
-					name: "开单数",
-					dataIndex: "num",
-					color: "info",
-					align: "center"
-				}
-			],
 			dataList: [],
 			params:{
-				itemId: '',
-				searchTime:'',
+				searchTime:'today',
 				startTime: "",
 				endTime: "",
-				shopId: "",
 			},
 			profile:[],
 			statData:[],
@@ -99,15 +76,12 @@ export default {
 			uni.stopPullDownRefresh();
 		});
 	},
-	onLoad(e) {
-		this.itemId = e.id;
-		this.params.itemId = e.id;
-		this.shopId = this.getLoginInfo.shopId;
+	onLoad() {
 	},
 	methods: {
 		...mapActions(['setUserShopAll']),
         getDetail(item){
-
+            this.$util.pageTo({url:'/admin/work/statCatItem',query:{...this.params,catId:item.catId}})
         },
 		//选择分店
 		selectShopFn(val){

+ 167 - 0
hdApp/src/admin/work/statCatItem.vue

@@ -0,0 +1,167 @@
+<template>
+<view class="app-content">
+	<view class="ex-page">
+		<view class="main-view">
+			<view class="space-view ex-table">
+				<block>
+					<t-table :headerBackgroundColor="'#F0F2F6'">
+
+						<t-tr header><t-th>图片</t-th><t-th>名称</t-th><t-th>数量</t-th><t-th>操作</t-th></t-tr>
+
+						<view v-for="(item, index) in statData" :key="index">
+							<t-tr>
+								<t-td><view>1</view></t-td>
+								<t-td><view>{{item.itemName}}</view></t-td>
+								<t-td><view>{{item.num}}</view></t-td>
+								<t-td><view></view></t-td>
+							</t-tr>
+						</view>
+
+					</t-table>
+				</block>
+			</view>
+		</view>
+	</view>
+</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import SelectList from "@/components/plugin/selectList";
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
+import DateSelect from "@/components/module/dateSelect";
+import AppSearchModule from "@/components/module/app-search";
+import { getStatWorkCatItem } from "@/api/stat/index";
+export default {
+	components: { SelectList, AppWrapperEmpty,ShopSelect,AppSearchModule,DateSelect },
+	mixins: [list],
+	computed: {
+
+    },
+	data() {
+		return {
+			isShow:false,
+			customizationTime:[],
+			shopId:'',
+			itemId:'',
+			nowTime: "",
+			showTimeDropdown: false,
+			nowShop: "",
+			showShopDropdown: false,
+			dataList: [],
+			profile:[],
+			statData:[],
+			searchContent:'',
+		};
+	},
+	onPullDownRefresh() {
+		this.resetList();
+		this.getList().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
+	onLoad() {
+
+	},
+	methods: {
+		async init() {
+			this.getList();
+		},
+		getList() {
+			let that = this
+			uni.showLoading()
+			getStatWorkCatItem(this.option).then(res => {
+				uni.hideLoading()
+				if (!this.$util.isEmpty(res.data.list)) {
+					that.statData = res.data.list
+				}
+			});
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.ex-page {
+	background: white;
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	.top-bar {
+		position: absolute;
+		left: 0;
+		top:100upx;
+		display: flex;
+		width: 100%;
+		z-index: 20;
+		.bar{
+			width: 50%;
+			height: 100%;
+			text-align: center;
+			&:nth-child(1){
+				border-right: 1upx solid #eeeeec;
+			}
+		}
+	}
+	.main-view {
+		margin-top: 80upx;
+		flex: 1;
+		background-color: #f9fbfc;
+		.space-view {
+			background-color: #fff;
+			.change-level{
+				font-size:22upx;
+				padding:10upx 15upx;
+			}
+		}
+		.ex-info {
+			padding: 30upx;
+			.info-cell {
+				display: flex;
+				align-items: center;
+				font-size: 28upx;
+				&:not(:first-child) {
+					margin-top: 20upx;
+				}
+				.cell-label {
+					width: 110upx;
+					color: #666666;
+				}
+				.cell-value {
+					margin-left: 40upx;
+					color: #333;
+					&.warning {
+						color: #ffaf1d;
+					}
+					&.success {
+						color: #27c325;
+					}
+				}
+			}
+		}
+		.ex-table {
+			/deep/.icon-info {
+				color: #333333;
+			}
+		}
+	}
+	.bar-view {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 0 30upx;
+		width: 100%;
+		height: 100upx;
+
+		box-shadow: 0upx -1upx 6upx 0upx rgba(4, 0, 0, 0.06);
+		.info-view {
+			font-size: 26upx;
+		}
+		.btn-view {
+			display: flex;
+			.admin-button-com {
+				margin: 0 10upx;
+			}
+		}
+	}
+}
+</style>

+ 4 - 0
hdApp/src/api/stat/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const getStatWorkCatItem = data => {
+	return https.get('/stat-work-cat-item/item-list', data)
+}
+
 export const getStatWorkCat = data => {
 	return https.get('/stat-work-cat/profile', data)
 }

+ 1 - 0
hdApp/src/pages.json

@@ -14,6 +14,7 @@
 			"pages": [
 				{"path": "add","style": {"navigationBarTitleText": "新建制作单"}},
 				{"path": "statCat","style": {"navigationBarTitleText": "制作统计"}},
+				{"path": "statCatItem","style": {"navigationBarTitleText": "明细"}},
 				{"path": "addResult","style": {"navigationBarTitleText": "新建成功"}},
 				{"path": "list","style": {"navigationBarTitleText": "列表","enablePullDownRefresh": true}},
 				{"path": "detail","style": {"navigationBarTitleText": "详情"}}