Răsfoiți Sursa

预订功能

shish 2 ani în urmă
părinte
comite
0fb44293c6

+ 160 - 0
ghsApp/src/admin/book/custom.vue

@@ -0,0 +1,160 @@
+<template>
+	<view class="app-content">
+		<view class="ex-page">
+			<view class="top-bar">
+				<view>aaaa</view>
+			</view>
+			<scroll-view scroll-y scroll-with-animation class="main-view">
+				<view class="space-view ex-table">
+					<t-table :headerBackgroundColor="'#F0F2F6'">
+						<t-tr header><t-th>客户</t-th><t-th>预订</t-th><t-th>上架</t-th><t-th>路上</t-th><t-th>待采</t-th></t-tr>
+						<template v-if="!$util.isEmpty(bookCustomData)">
+							<view v-for="(item, index) in bookCustomData" :key="index" @click="goDetail(item)">
+								<t-tr>
+									<t-td><view style="color:#333333;font-size:26upx;">{{item.name}}</view></t-td>
+									<t-td><view style="color:#333333;font-size:26upx;">{{item.bookNum?parseFloat(item.bookNum):0}}</view></t-td>
+									<t-td><view style="color:#333333;font-size:26upx;">{{item.onNum?parseFloat(item.onNum):0}}</view></t-td>
+									<t-td><view style="color:#333333;font-size:26upx;">{{item.roadNum?parseFloat(item.roadNum):0}}</view></t-td>
+									<t-td><view style="color:#333333;font-size:26upx;">{{item.needCgNum?parseFloat(item.needCgNum):0}}</view></t-td>
+								</t-tr>
+							</view>
+						</template>
+					</t-table>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import SelectList from "@/components/plugin/selectList";
+import { getBookCustomList } from "@/api/book"
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
+import DateSelect from "@/components/module/dateSelect";
+import {mapActions, mapGetters} from "vuex";
+import AppSearchModule from "@/components/module/app-search";
+export default {
+	components: {
+		SelectList,
+		AppWrapperEmpty,
+		ShopSelect,
+		DateSelect,
+		AppSearchModule
+	},
+	mixins: [list],
+	computed: {
+		...mapGetters(["getDictionariesInfo","getLoginInfo"])
+	},
+	data() {
+		return {
+			isShow:false,
+			customizationTime:'',
+			shopId:'',
+			itemId:'',
+			nowTime: "",
+			showTimeDropdown: false,
+			nowShop: "",
+			showShopDropdown: false,
+			dataList: [],
+			bookCustomData:[],
+			searchContent:'',
+		};
+	},
+	onPullDownRefresh() {
+		this.getStatList().then(res => {
+			uni.stopPullDownRefresh()
+		});
+	},
+	onLoad(){
+
+	},
+	methods: {
+		goDetail(){
+
+		},
+		async init() {
+			this.getStatList();
+		},
+		getStatList() {
+			let that = this
+			uni.showLoading()
+			getBookCustomList(this.params).then(res => {
+				uni.hideLoading()
+				if (!this.$util.isEmpty(res.data.list)) {
+					that.bookCustomData = res.data.list
+				}else{
+					that.bookCustomData=[]
+				}
+			})
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.ex-page {
+	background: white;
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	.top-bar {
+
+	}
+	.main-view {
+		flex: 1;
+		background-color: #f9fbfc;
+		.space-view {
+			background-color: #fff;
+		}
+		.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 {
+			::v-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>

+ 160 - 0
ghsApp/src/admin/book/itemCustom.vue

@@ -0,0 +1,160 @@
+<template>
+	<view class="app-content">
+		<view class="ex-page">
+            <view class="top-bar">
+                <view>aaaaa</view>
+            </view>
+            <scroll-view scroll-y scroll-with-animation class="main-view">
+                <view class="space-view ex-table">
+                    <t-table :headerBackgroundColor="'#F0F2F6'">
+                        <t-tr header>
+                            <t-th><view style="width:160upx;">花材</view></t-th>
+                            <t-th>预订</t-th>
+                            <t-th>上架</t-th>
+                            <t-th>剩余</t-th>
+                            <t-th>路上</t-th>
+                            <t-th>待采</t-th>
+                            <t-th>操作</t-th>
+                        </t-tr>
+                        <template v-if="!$util.isEmpty(bookData)">
+                            <view v-for="(item, index) in bookData" :key="index" @click="goDetail(item)">
+                                <t-tr>
+                                    <t-td><view style="color:#333333;font-size:25upx;width:160upx;text-align:left;height:60upx;display: flex;align-items: center;">{{item.name}}</view></t-td>
+                                    <t-td><view style="color:#333333;font-size:25upx;height:60upx;display: flex;align-items: center;">{{item.bookNum?parseFloat(item.bookNum):0}}</view></t-td>
+                                    <t-td><view style="color:#333333;font-size:25upx;height:60upx;display: flex;align-items: center;">{{item.onNum?parseFloat(item.onNum):0}}</view></t-td>
+                                    <t-td><view style="color:#333333;font-size:25upx;height:60upx;display: flex;align-items: center;">{{item.roadNum?parseFloat(item.roadNum):0}}</view></t-td>
+                                    <t-td><view style="color:#333333;font-size:25upx;height:60upx;display: flex;align-items: center;">{{item.roadNum?parseFloat(item.roadNum):0}}</view></t-td>
+                                    <t-td><view style="color:#333333;font-size:25upx;height:60upx;display: flex;align-items: center;">{{item.needCgNum?parseFloat(item.needCgNum):0}}</view></t-td>
+                                    <t-td></t-td>
+                                </t-tr>
+                            </view>
+                        </template>
+                    </t-table>
+                </view>
+            </scroll-view>
+		</view>
+	</view>
+</template>
+<script>
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
+import SelectList from "@/components/plugin/selectList";
+import { getBookItemCustomList } from "@/api/book"
+import { list } from "@/mixins";
+import ShopSelect from "@/components/module/shopSelect";
+import DateSelect from "@/components/module/dateSelect";
+import {mapActions, mapGetters} from "vuex";
+import AppSearchModule from "@/components/module/app-search";
+export default {
+	components: {
+		SelectList,
+		AppWrapperEmpty,
+		ShopSelect,
+		DateSelect,
+		AppSearchModule
+	},
+	mixins: [list],
+	computed: {
+	},
+	data() {
+		return {
+			dataList: [],
+			bookData:[]
+		};
+	},
+	onPullDownRefresh() {
+		this.getStatList().then(res => {
+			uni.stopPullDownRefresh();
+		});
+	},
+	onLoad() {
+	},
+	methods: {
+		...mapActions(['setUserShopAll']),
+        goDetail(){
+
+        },
+		async init() {
+			this.getStatList();
+		},
+		getStatList() {
+			let that = this
+			uni.showLoading()
+			getBookItemCustomList().then(res => {
+				uni.hideLoading()
+				if (!this.$util.isEmpty(res.data.list)) {
+					that.bookData = res.data.list
+				}else{
+					that.bookData=[]
+				}
+			});
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.ex-page {
+	background: white;
+	padding-top:20upx;
+	height: 100%;
+	display: flex;
+	flex-direction: column;
+	.top-bar {
+	}
+	.main-view {
+		flex: 1;
+		background-color: #f9fbfc;
+		.space-view {
+			background-color: #fff;
+		}
+		.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 {
+			::v-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>

+ 6 - 4
ghsApp/src/admin/order/statBook.vue

@@ -14,14 +14,16 @@
 		<scroll-view scroll-y scroll-with-animation class="main-view">
 			<view class="space-view ex-table">
 				<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-th>路上</t-th><t-th>待采</t-th></t-tr>
 					<template v-if="!$util.isEmpty(profile)">
 						<view v-for="(item, index) in profile" :key="index" @click="goDetail(item)">
 							<t-tr>
-								<t-td><view style="color:#333333;font-size:26upx;">{{item.shortTime}}</view></t-td>
 								<t-td><view style="color:#333333;font-size:26upx;">{{item.name}}</view></t-td>
-								<t-td><view style="color:#333333;font-size:26upx;">{{item.num?parseFloat(item.num):0}}</view></t-td>
-								<t-td><view style="color:#333333;font-size:26upx;">{{item.stock?parseFloat(item.stock):0}}</view></t-td>
+								<t-td><view style="color:#333333;font-size:26upx;">{{item.bookNum?parseFloat(item.bookNum):0}}</view></t-td>
+								<t-td><view style="color:#333333;font-size:26upx;">{{item.onNum?parseFloat(item.onNum):0}}</view></t-td>
+								<t-td><view style="color:#333333;font-size:26upx;">{{item.roadNum?parseFloat(item.roadNum):0}}</view></t-td>
+								<t-td><view style="color:#333333;font-size:26upx;">{{item.roadNum?parseFloat(item.roadNum):0}}</view></t-td>
+								<t-td><view style="color:#333333;font-size:26upx;">{{item.needCgNum?parseFloat(item.needCgNum):0}}</view></t-td>
 							</t-tr>
 						</view>
 					</template>

+ 8 - 0
ghsApp/src/api/book/index.js

@@ -1,5 +1,13 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 
+export const getBookItemCustomList = data => {
+	return https.get('/book-item-custom/list', data)
+}
+
+export const getBookCustomList = data => {
+	return https.get('/book-custom/list', data)
+}
+
 export const getJdBookList = data => {
 	return https.get('/book/jd-list', data)
 }

+ 1 - 1
ghsApp/src/ext.json

@@ -4,7 +4,7 @@
   "directCommit": false,
   "ext": {
     "account": 12362,
-    "apiHost": "https://api.shop.hzghd.com",
+    "apiHost": "http://api.shop.hzghd.com",
     "socketApiHost": "api.shop.hzghd.com",
     "imgHost": "https://img.hzghd.com",
     "name":"花掌柜"

+ 3 - 1
ghsApp/src/pages.json

@@ -478,7 +478,9 @@
 			"pages": [
 				{"path": "index","style": {"navigationBarTitleText": "城市批发教程"}},
 				{"path": "jdIndex","style": {"navigationBarTitleText": "基地和昆明批发教程"}},
-				{"path": "detail","style": {"navigationBarTitleText": ""}}
+				{"path": "detail","style": {"navigationBarTitleText": ""}},
+				{"path": "itemCustom","style": {"navigationBarTitleText": "明细"}},
+				{"path": "custom","style": {"navigationBarTitleText": "预订客户"}}
 			]
 		},
 		{