shish 3 жил өмнө
parent
commit
13445f0c63

+ 3 - 2
ghsApp/src/admin/stat/stock.vue

@@ -6,7 +6,8 @@
 					<app-search-module v-model="py" placeholder="输拼音首字母" @input="searchFn" />
 				</view>
 				<view style="padding:0 0upx 0 20upx;" >
-					<button class="admin-button-com middle blue" @click="allPd()">全部盘点</button>
+					<button class="admin-button-com middle blue"
+					style="margin-right:6upx;" @click="allPd()">全部盘点</button>
 					<button class="admin-button-com middle blue" @click="allOutSelectShop()">全部出库</button>
 				</view>
 			</view>
@@ -113,7 +114,7 @@ export default {
 	},
 	methods: {
 		allPd(){
-			this.$util.pageTo({url: '/admin/shop/selectShop',query: {style:2}})
+			this.$util.pageTo({url: '/pagesStorehouse/inventory/select?type=stockInPd'})
 		},
 		allOutSelectShop(){
 			this.$util.pageTo({url: '/admin/shop/selectShop',query: {style:2}})

+ 3 - 3
ghsApp/src/pages.json

@@ -259,9 +259,9 @@
 			"root": "pagesStorehouse/inventory/",
 			"pages": [
 				{ "path": "list", "style": { "navigationBarTitleText": "盘点", "enablePullDownRefresh": true } },
-				{ "path": "details", "style": { "navigationBarTitleText": "盘点详情" } },
-				{ "path": "update", "style": { "navigationBarTitleText": "新增" } },
-				{ "path": "select", "style": { "navigationBarTitleText": "盘点花材" } }
+				{ "path": "details", "style": { "navigationBarTitleText": "详情" } },
+				{ "path": "update", "style": { "navigationBarTitleText": "盘点" } },
+				{ "path": "select", "style": { "navigationBarTitleText": "花材" } }
 			]
 		},
 		{

+ 1 - 6
ghsApp/src/pagesStorehouse/inventory/list.vue

@@ -72,12 +72,7 @@ export default {
 				});
 		},
 		addEvent() {
-			uni.navigateTo({
-				url: `/pagesStorehouse/inventory/update`,
-				success: result => {},
-				fail: () => {},
-				complete: () => {}
-			});
+			uni.navigateTo({url: '/pagesStorehouse/inventory/select'})
 		},
 		gotoDetailsEvent(item) {
 			uni.navigateTo({

+ 4 - 3
ghsApp/src/pagesStorehouse/inventory/select.vue

@@ -147,8 +147,8 @@ export default {
 		...mapGetters(["getMyShopInfo","getLoginInfo"]),
 	},
 	onLoad() {
-		let type = '';
-		this.initData({ type,status:0});
+		let type = this.option.type ? this.option.type: ''
+		this.initData({ type:type,status:0});
 	},
 	methods: {
 		changeClass(index){
@@ -166,7 +166,8 @@ export default {
 				this.$msg('请选择花材')
 				return false
 			}
-			this.submitEvent(1)
+			let type = this.option.type ? this.option.type: ''
+			this.$util.pageTo({url: "/pagesStorehouse/inventory/update?type="+type,type:2})
 		},
 		submitEvent(val) {
 			if (val.index === 0) {

+ 23 - 29
ghsApp/src/pagesStorehouse/inventory/update.vue

@@ -1,22 +1,8 @@
 <template>
 	<view class="ex-page">
 		<view class="main-view overscroll">
-			<view class="space-view ex-info">
-				<form>
-					<view class="module-com input-line-wrap">
-						<TuiListCell class="line-cell" :hover="false" :arrow="false">
-							<view class="tui-title ">门店</view>{{ shopInfo.shopName||'' }}
-						</TuiListCell>
-						<TuiListCell class="line-cell" :hover="false" :arrow="false">
-							<view class="tui-title ">备注</view>
-							<input v-model="remark" placeholder-class="phcolor" class="tui-input" placeholder="选填" maxlength="50" type="text" />
-						</TuiListCell>
-					</view>
-				</form>
-			</view>
 			<view class="space-view ex-table">
 				<block v-if="!$util.isEmpty(selectList)">
-
 					<view class="table-view">
 						<view class="table-header" >
 							<view class="table-th" v-for="(item, index) in columns" :key="index" :style="{flex: item.width ? `0 0 ${item.width}upx` : '1', textAlign: item.align || 'left', }">
@@ -26,7 +12,7 @@
 						<view class="table-tr" v-for="(item, index) in selectList" :key="index">
 							<view class="table-td" v-for="(column, columnIndex) in columns" :key="columnIndex" :style="{flex: column.width ? `0 0 ${column.width}upx` : '1', textAlign: column.align || 'left', }">
 								<view v-if="column.custom == 'icon'" class="list-icon">
-									<image class="icon-image" :src="item.cover" alt="商品图" />
+									<image class="icon-image" :src="item.cover" />
 									<view class="icon-info">
 										<view class="info-name">
 											{{ item.itemName }}
@@ -53,17 +39,29 @@
 						</view>
 					</view>
 				</block>
-				<template v-if="selectList.length == 0">
-					<view class="empty-view">
-						<button class="admin-button-com blue big" @click="gotoSelectPage">选择花材</button>
+				<view class="empty-view">
+					<button class="admin-button-com blue middle" 
+					style="margin:5upx 0 5upx 30upx;" @click="gotoSelectPage">返回修改</button>
+					<button class="admin-button-com blue middle" 
+					style="margin:5upx 0 5upx 40upx;" @click="removeFromSave(0)">清空花材</button>
+				</view>
+			</view>
+			<view class="space-view ex-info">
+				<form>
+					<view class="module-com input-line-wrap">
+						<TuiListCell class="line-cell" :hover="false" :arrow="false">
+							<view class="tui-title ">门店</view>{{ shopInfo.shopName||'' }}
+						</TuiListCell>
+						<TuiListCell class="line-cell" :hover="false" :arrow="false">
+							<view class="tui-title ">备注</view>
+							<input v-model="remark" placeholder-class="phcolor" class="tui-input" placeholder="选填" maxlength="50" type="text" />
+						</TuiListCell>
 					</view>
-				</template>
+				</form>
 			</view>
 		</view>
 		<view class="bar-view" v-if="selectList.length>0">
 			<view class="btn-view">
-				<button class="admin-button-com big default" @click="removeFromSave(0)" style="margin-right:40upx;">清空花材</button>
-				<button :class="['admin-button-com', 'big']" @click="gotoSelectPage" style="margin-right:40upx;"> 修改花材 </button>
 				<button v-if="!orderSn" :class="['admin-button-com', 'big', { disabled: allCount == 0 }]" :disabled="allCount == 0" @click="confirmPop(1)"> 确认盘点 </button>
 				<button v-if="orderSn" :class="['admin-button-com', 'big', { disabled: allCount == 0 }]" :disabled="allCount == 0" @click="confirmPop(2)"> 确认盘点 </button>
 			</view>
@@ -89,8 +87,8 @@ export default {
 			selectJobType: "inventory",
 			columns: [
 				{ name: "名称", custom: "icon" },
-				{ name: "库存", custom: "stock", width: 120, align: "center" },
-				{ name: "盘点", custom: "inventory", color: "warn", width: 120, align: "center" },
+				{ name: "盘点前", custom: "stock", width: 120, align: "center" },
+				{ name: "盘点", custom: "inventory", color: "warn", width: 120, align: "center" },
 				{
 					name: "盈亏数",
 					color: "success",
@@ -138,7 +136,8 @@ export default {
 			})
 		},
 		gotoSelectPage() {
-			uni.navigateTo({ url: "/pagesStorehouse/inventory/select" })
+			let type = this.option.type ? this.option.type: ''
+			uni.navigateTo({ url:"/pagesStorehouse/inventory/select?type="+type,type:2})
 		},
 		getInfo(){
 			return currentShop().then(res => {
@@ -275,11 +274,6 @@ export default {
 				}
 			}
 		}
-		.empty-view {
-			display: flex;
-			justify-content: center;
-			margin: 120upx auto;
-		}
 	}
 	.bar-view {
 		display: flex;