shish 3 лет назад
Родитель
Сommit
aaa6b11333

+ 1 - 1
ghsApp/src/admin/home/workbench.vue

@@ -179,7 +179,7 @@ export default {
 				{ name: "调拨出库", img: 'ghs/home/dbck.png', url: "/pagesStorehouse/allot/allotEx" },
 				{ name: "调拨出库", img: 'ghs/home/dbck.png', url: "/pagesStorehouse/allot/allotEx" },
 				{name : "结账记录", img : "ghs/home/kcyjs.png", url : "/admin/clear/customList"},
 				{name : "结账记录", img : "ghs/home/kcyjs.png", url : "/admin/clear/customList"},
 				{name : "支出", img : "ghs/home/kcyjs.png", url : "/admin/expend/list"},
 				{name : "支出", img : "ghs/home/kcyjs.png", url : "/admin/expend/list"},
-				{name : "员工", img : "/ghs/home/yggl.png", url : "/admin/staff/list"},
+				{name : "盘点", img : "/ghs/home/pandian.png", url : "/pagesStorehouse/inventory/list"},
 				{name : "库存预警", img : "/ghs/home/kcyjs.png", url : "/pagesStorehouse/stockWarn/manage"},
 				{name : "库存预警", img : "/ghs/home/kcyjs.png", url : "/pagesStorehouse/stockWarn/manage"},
 			],
 			],
 			skSrc: `${this.$constant.imgUrl}/ghs/home/kj.png`,
 			skSrc: `${this.$constant.imgUrl}/ghs/home/kj.png`,

+ 0 - 5
ghsApp/src/admin/stat/stock.vue

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

+ 5 - 0
ghsApp/src/api/product/index.js

@@ -16,6 +16,11 @@ export const print = data => {
 export const getProductDataApi = data => {
 export const getProductDataApi = data => {
 	return https.get("/product/index", data);
 	return https.get("/product/index", data);
 };
 };
+
+export const getStockInItem = data => {
+	return https.get("/product/stock-in", data);
+};
+
 /** *
 /** *
 	* 获取所有分类(包括常用、全部)(暂不用)
 	* 获取所有分类(包括常用、全部)(暂不用)
 	* @parmas py 花材拼音
 	* @parmas py 花材拼音

+ 4 - 3
ghsApp/src/mixins/product.js

@@ -1,4 +1,4 @@
-import { getProductDataApi } from "@/api/product/index";
+import { getProductDataApi,getStockInItem } from "@/api/product";
 import { mapGetters, mapActions } from "vuex";
 import { mapGetters, mapActions } from "vuex";
 import { copyObject } from "@/utils/util"
 import { copyObject } from "@/utils/util"
 import { allProduct } from '@/api/product'
 import { allProduct } from '@/api/product'
@@ -167,9 +167,10 @@ export default {
 				if (extendInfo) {
 				if (extendInfo) {
 					params = { ...params, ...extendInfo };
 					params = { ...params, ...extendInfo };
 				}
 				}
-				const { data } = await getProductDataApi(params);
+				//区分获取正常花材和当天入库花材
+				let hostFn = extendInfo && extendInfo.pdType && extendInfo.pdType == 'stockInPd' ? getStockInItem : getProductDataApi;
+				const { data } = await hostFn(params);
 				this.globalClassItemList = '';
 				this.globalClassItemList = '';
-
 				data.forEach(element => {
 				data.forEach(element => {
 					element.child && element.child.forEach(child => {
 					element.child && element.child.forEach(child => {
 						
 						

+ 24 - 38
ghsApp/src/pagesStorehouse/inventory/details.vue

@@ -3,23 +3,16 @@
 		<view class="main-view overscroll">
 		<view class="main-view overscroll">
 			<view class="space-view ex-info">
 			<view class="space-view ex-info">
 				<view class="info-cell">
 				<view class="info-cell">
-					<view class="cell-label"> 仓库</view>
-					<view class="cell-value"> {{ dataInfo.shopName || "" }}</view>
-				</view>
-
-				<view class="info-cell">
-					<view class="cell-label"> 制单人</view>
+					<view class="cell-label"> 操作</view>
 					<view class="cell-value"> {{ dataInfo.adminName || "" }}</view>
 					<view class="cell-value"> {{ dataInfo.adminName || "" }}</view>
 				</view>
 				</view>
 				<view class="info-cell">
 				<view class="info-cell">
-					<view class="cell-label"> 盘点日期</view>
+					<view class="cell-label"> 日期</view>
 					<view class="cell-value"> {{ dataInfo.updateTime || "" }}</view>
 					<view class="cell-value"> {{ dataInfo.updateTime || "" }}</view>
 				</view>
 				</view>
 				<view class="info-cell">
 				<view class="info-cell">
-					<view class="cell-label"> 盘点状态</view>
-					<view class="cell-value">
-						{{ getItemStatusName(dataInfo.status) || "" }}</view
-					>
+					<view class="cell-label"> 状态</view>
+					<view class="cell-value"> {{ getItemStatusName(dataInfo.status) || "" }}</view >
 				</view>
 				</view>
 				<view class="info-cell">
 				<view class="info-cell">
 					<view class="cell-label"> 备注</view>
 					<view class="cell-label"> 备注</view>
@@ -31,37 +24,33 @@
 			<view class="space-view ex-table">
 			<view class="space-view ex-table">
 				<t-table>
 				<t-table>
 					<t-tr header>
 					<t-tr header>
-						<t-th v-for="(item, index) in columns" :key="index" :align="item.align">
-							{{ item.name }}
-						</t-th>
+						<t-th><view style="width:245upx;">名称</view></t-th>
+						<t-th><view>盘点前</view></t-th>
+						<t-th><view>盘点后</view></t-th>
+						<t-th><view>盈亏数</view></t-th>
 					</t-tr>
 					</t-tr>
 					<t-tr v-for="(item, index) in dataInfo.itemInfo || []" :key="index">
 					<t-tr v-for="(item, index) in dataInfo.itemInfo || []" :key="index">
-						<t-td
-							v-for="(column, colIndex) in columns"
-							:key="colIndex"
-							:align="column.align"
-							:color="column.color"
-						>
-							<view v-if="column.custom == 'icon'" class="list-icon">
-								<image class="icon-image" :src="item.itemCover" alt="商品图" />
+						<t-td v-for="(column, colIndex) in columns" :key="colIndex" :align="column.align" :color="column.color" >
+							<view v-if="column.custom == 'icon'" class="list-icon" style="width:245upx;">
+								<image class="icon-image" :src="item.itemCover" />
 								<view class="icon-info">
 								<view class="icon-info">
 									<view class="info-name">
 									<view class="info-name">
 										{{ item.itemName }}
 										{{ item.itemName }}
 									</view>
 									</view>
-									<view class="info-type"> {{ item.rank || "" }}级 </view>
+									<view class="info-type"></view>
 								</view>
 								</view>
 							</view>
 							</view>
 							<view v-else-if="column.custom == 'stock'">
 							<view v-else-if="column.custom == 'stock'">
-								<text>{{ `${item.bigNumStock}/` }}</text>
-								<text>{{ item.smallNumStock }}</text>
+								<text>{{ item.bigNumStock }}</text>
+								<text>{{ item.smallNumStock }}</text>
 							</view>
 							</view>
 							<view v-else-if="column.custom == 'inventory'">
 							<view v-else-if="column.custom == 'inventory'">
-								<text>{{ `${item.bigNum}/` }}</text>
-								<text>{{ item.smallNum }}</text>
+								<text>{{ item.bigNum }}</text>
+								<text>{{ item.smallNum }}</text>
 							</view>
 							</view>
 							<view v-else-if="column.custom == 'profit'">
 							<view v-else-if="column.custom == 'profit'">
-								<text>{{ `${item.bigNumProfitLoss}/` }}</text>
-								<text>{{ item.smallNumProfitLoss }}</text>
+								<text>{{ item.bigNumProfitLoss }}</text>
+								<text>{{ item.smallNumProfitLoss }}</text>
 							</view>
 							</view>
 							<view v-else>{{ item[column.dataIndex] || "" }}</view>
 							<view v-else>{{ item[column.dataIndex] || "" }}</view>
 						</t-td>
 						</t-td>
@@ -70,10 +59,7 @@
 			</view>
 			</view>
 		</view>
 		</view>
 		<view class="bar-view">
 		<view class="bar-view">
-			<view class="info-view">
-				盈亏合计:
-				<text class="price-item"> {{ sumCount }}扎 </text>
-			</view>
+			<view class="info-view"> 盈亏合计 <text class="price-item"> {{ sumCount }}扎 </text> </view>
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -91,12 +77,12 @@ export default {
 			columns: [
 			columns: [
 				{
 				{
 					name: "名称",
 					name: "名称",
-					custom: "icon"
+					custom: "icon",
+					width: 250,
 				},
 				},
 				{
 				{
 					name: "库存",
 					name: "库存",
 					custom: "stock",
 					custom: "stock",
-					// color: "success",
 					width: 120,
 					width: 120,
 					align: "center"
 					align: "center"
 				},
 				},
@@ -165,7 +151,7 @@ export default {
 					small += Number(item.smallNumProfitLoss);
 					small += Number(item.smallNumProfitLoss);
 				}
 				}
 			}
 			}
-			return `${big}/${small}`;
+			return `${big}扎${small}支`;
 		}
 		}
 	},
 	},
 	methods: {
 	methods: {
@@ -231,8 +217,8 @@ export default {
 			/deep/.list-icon {
 			/deep/.list-icon {
 				display: flex;
 				display: flex;
 				.icon-image {
 				.icon-image {
-					width: 80upx;
-					height: 80upx;
+					width: 50upx;
+					height: 50upx;
 					margin-right: 20upx;
 					margin-right: 20upx;
 				}
 				}
 				.icon-info {
 				.icon-info {

+ 7 - 3
ghsApp/src/pagesStorehouse/inventory/list.vue

@@ -11,11 +11,11 @@
 							<text class="info-time">人员:{{ item.adminName }}</text>
 							<text class="info-time">人员:{{ item.adminName }}</text>
 						</view>
 						</view>
 						<view style="margin-bottom: 10upx">
 						<view style="margin-bottom: 10upx">
-							<text class="info-time" style="margin: 0">数量:{{item.bigNum}}/</text>
-							<text class="info-time" style="margin: 0">{{ item.smallNum }}</text>
+							<text class="info-time" style="margin: 0">数量:{{item.bigNum}}</text>
+							<text class="info-time" style="margin: 0">{{ item.smallNum }}</text>
 						</view>
 						</view>
 						<view>
 						<view>
-							<text class="info-time">时间:{{ item.updateTime }}</text>
+							<text class="info-time">时间:{{ item.updateTime.substr(5,11) }}</text>
 						</view>
 						</view>
 					</view>
 					</view>
 				</view>
 				</view>
@@ -25,6 +25,7 @@
 			</block>
 			</block>
 		</view>
 		</view>
 		<div class="app-footer open_btn">
 		<div class="app-footer open_btn">
+			<div @click="stockInAddEvent" class="admin-button-com big blue">当天入库花材盘点</div>
 			<div @click="addEvent" class="admin-button-com big blue">新增盘点</div>
 			<div @click="addEvent" class="admin-button-com big blue">新增盘点</div>
 		</div>
 		</div>
 	</view>
 	</view>
@@ -71,6 +72,9 @@ export default {
 				.catch(err => {
 				.catch(err => {
 				});
 				});
 		},
 		},
+		stockInAddEvent(){
+			this.$util.pageTo({ url: '/pagesStorehouse/inventory/select?pdType=stockInPd'})
+		},
 		addEvent() {
 		addEvent() {
 			uni.navigateTo({url: '/pagesStorehouse/inventory/select'})
 			uni.navigateTo({url: '/pagesStorehouse/inventory/select'})
 		},
 		},

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

@@ -8,6 +8,9 @@
 			<view class="search-bar">
 			<view class="search-bar">
 				<app-search-module v-model="py" placeholder="输拼音首字母也可以搜" @input="searchFn" />
 				<app-search-module v-model="py" placeholder="输拼音首字母也可以搜" @input="searchFn" />
 			</view>
 			</view>
+			<view style="float:right;">
+				<button class="admin-button-com middle blue" @click="removeFromSave()">清除花材</button>
+			</view>
 		</view>
 		</view>
 		<view class="scroll-middle_bx">
 		<view class="scroll-middle_bx">
 			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
 			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
@@ -74,6 +77,7 @@
 						<!-- #endif -->
 						<!-- #endif -->
 
 
 						<image @click="switchGlobalUnitType" :src="`${constant.imgUrl}/icon/switch/switch128.png`" style="width:86upx;height:86upx;" mode="widthFix"></image>
 						<image @click="switchGlobalUnitType" :src="`${constant.imgUrl}/icon/switch/switch128.png`" style="width:86upx;height:86upx;" mode="widthFix"></image>
+						<button v-if="selectJobType == 'inventory'" style="position:absolute;top:276upx;left:230upx;" @click="customData.bigCount=99999" class="admin-button-com middle blue">盘点为零</button>
 
 
 					</view>
 					</view>
 				</view>
 				</view>
@@ -147,8 +151,8 @@ export default {
 		...mapGetters(["getMyShopInfo","getLoginInfo"]),
 		...mapGetters(["getMyShopInfo","getLoginInfo"]),
 	},
 	},
 	onLoad() {
 	onLoad() {
-		let type = this.option.type ? this.option.type: ''
-		this.initData({ type:type,status:0});
+		let pdType = this.option.pdType ? this.option.pdType: ''
+		this.initData({ type:'',pdType:pdType,status:0});
 	},
 	},
 	methods: {
 	methods: {
 		changeClass(index){
 		changeClass(index){
@@ -166,8 +170,8 @@ export default {
 				this.$msg('请选择花材')
 				this.$msg('请选择花材')
 				return false
 				return false
 			}
 			}
-			let type = this.option.type ? this.option.type: ''
-			this.$util.pageTo({url: "/pagesStorehouse/inventory/update?type="+type,type:2})
+			let pdType = this.option.pdType ? this.option.pdType: ''
+			this.$util.pageTo({url: "/pagesStorehouse/inventory/update?pdType="+pdType,type:2})
 		},
 		},
 		submitEvent(val) {
 		submitEvent(val) {
 			if (val.index === 0) {
 			if (val.index === 0) {

+ 17 - 42
ghsApp/src/pagesStorehouse/inventory/update.vue

@@ -5,45 +5,33 @@
 				<block v-if="!$util.isEmpty(selectList)">
 				<block v-if="!$util.isEmpty(selectList)">
 					<view class="table-view">
 					<view class="table-view">
 						<view class="table-header" >
 						<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', }">
-								{{ item.name || "" }}
-							</view>
+							<view class="table-th" style="width:330upx;">名称</view>
+							<view class="table-th" style="width:150upx;">盘点前</view>
+							<view class="table-th" style="width:150upx;">盘点后</view>
 						</view>
 						</view>
 						<view class="table-tr" v-for="(item, index) in selectList" :key="index">
 						<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">
+							<view class="table-td" v-for="(column, columnIndex) in columns" :key="columnIndex">
+								<view v-if="column.custom == 'icon'" class="list-icon" style="width:330upx;">
 									<image class="icon-image" :src="item.cover" />
 									<image class="icon-image" :src="item.cover" />
-									<view class="icon-info">
-										<view class="info-name">
-											{{ item.itemName }}
-										</view>
-										<view class="info-type"></view>
-									</view>
+									<view class="icon-info"> <view class="info-name"> {{ item.itemName }} </view> </view>
 								</view>
 								</view>
-								<view v-else-if="column.custom == 'stock'">
+								<view v-else-if="column.custom == 'stock'" style="width:150upx;">
 									<text v-if="Number(item.bigNum)>0">{{ `${item.bigNum}` }}扎</text>
 									<text v-if="Number(item.bigNum)>0">{{ `${item.bigNum}` }}扎</text>
 									<text v-if="Number(item.smallNum)>0">{{ item.smallNum }}支</text>
 									<text v-if="Number(item.smallNum)>0">{{ item.smallNum }}支</text>
 								</view>
 								</view>
-								<view v-else-if="column.custom == 'inventory'">
-									<text v-if="Number(item.bigCount)>0">{{`${item.bigCount}`}}扎</text>
+								<view v-else-if="column.custom == 'inventory'" style="width:150upx;">
+									<text v-if="Number(item.bigCount)>0">{{item.bigCount==99999?0:item.bigCount}}扎</text>
 									<text v-if="Number(item.smallCount)>0">{{ item.smallCount }}支</text>
 									<text v-if="Number(item.smallCount)>0">{{ item.smallCount }}支</text>
 								</view>
 								</view>
-
-								<view v-else-if="column.custom == 'profit'">
-									<text>{{ getSelectItemProfitPrice(item) }}</text>
-								</view>
-								<text v-else :class="[column.color || '']">
-									{{ (column.dataIndex && item[column.dataIndex]) || "" }}
-								</text>
 							</view>
 							</view>
 						</view>
 						</view>
 					</view>
 					</view>
 				</block>
 				</block>
-				<view class="empty-view">
+				<view>
 					<button class="admin-button-com blue middle" 
 					<button class="admin-button-com blue middle" 
-					style="margin:5upx 0 5upx 30upx;" @click="gotoSelectPage">返回修改</button>
+					style="margin:12upx 0 5upx 30upx;" @click="gotoSelectPage">返回修改</button>
 					<button class="admin-button-com blue middle" 
 					<button class="admin-button-com blue middle" 
-					style="margin:5upx 0 5upx 40upx;" @click="removeFromSave(0)">清空花材</button>
+					style="margin:12upx 0 5upx 40upx;" @click="removeFromSave(0)">清空花材</button>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="space-view ex-info">
 			<view class="space-view ex-info">
@@ -136,28 +124,14 @@ export default {
 			})
 			})
 		},
 		},
 		gotoSelectPage() {
 		gotoSelectPage() {
-			let type = this.option.type ? this.option.type: ''
-			uni.navigateTo({ url:"/pagesStorehouse/inventory/select?type="+type,type:2})
+			let pdType = this.option.pdType ? this.option.pdType: ''
+			uni.navigateTo({ url:"/pagesStorehouse/inventory/select?pdType="+pdType,type:2})
 		},
 		},
 		getInfo(){
 		getInfo(){
 			return currentShop().then(res => {
 			return currentShop().then(res => {
 				this.shopInfo = res.data
 				this.shopInfo = res.data
 			})
 			})
 		},
 		},
-		//获取当前选中商品总价
-		getSelectItemProfitPrice(item) {
-			const { bigCount, smallCount, bigNum, smallNum} = item
-			let bigNumProfitLoss = Number(bigCount) - Number(bigNum)
-			let smallNumProfitLoss = Number(smallCount) - Number(smallNum)
-			let diff = ''
-			if(Number(bigNumProfitLoss)!=0){
-				diff += `${bigNumProfitLoss}扎`
-			}
-			if(Number(smallNumProfitLoss)!=0){
-				diff+= `/${smallNumProfitLoss}支`
-			}
-			return diff;
-		},
 		async saveToDraft() {
 		async saveToDraft() {
 			let api = savaCheckOrderDraftApi;
 			let api = savaCheckOrderDraftApi;
 			if (this.orderSn) {
 			if (this.orderSn) {
@@ -254,8 +228,9 @@ export default {
 			/deep/.list-icon {
 			/deep/.list-icon {
 				display: flex;
 				display: flex;
 				.icon-image {
 				.icon-image {
-					width: 80upx;
-					height: 80upx;
+					width: 40upx;
+					height: 40upx;
+					border-radius: 10upx;
 					margin-right: 20upx;
 					margin-right: 20upx;
 				}
 				}
 				.icon-info {
 				.icon-info {