shish 3 years ago
parent
commit
9806c8da19

+ 1 - 1
ghsApp/src/pagesStorehouse/inventory/select.vue

@@ -60,7 +60,7 @@
 		<modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.name" color="#333" :size="32" padding="30rpx 30rpx" >
 			<template slot="customContent">
 				<view class="select-cmd_bx" v-if="customData">
-					<view class="kc"> 库存{{ customData.stock }} </view>
+					<view class="kc"> 库存{{ customData.stock?parseFloat(customData.stock):0 }} </view>
 					<view class="num_bx">
 						<!-- #ifdef APP-PLUS -->
 						<input style="width: 430upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="number" />

+ 0 - 5
hdApp/src/admin/billing/index.vue

@@ -181,10 +181,6 @@ export default {
 				this.$msg('请选择花材')
 				return false
 			}
-			// if (this.$util.isEmpty(this.option.customId)){
-			// 	this.$msg("请选择客户")
-			// 	return
-			// }
 
 			//因历史遗留原因,打开花材页马上点花材出现数量0或null的情况,需要过滤 shish 20210716
 			let selectList = this.selectList;
@@ -207,7 +203,6 @@ export default {
 	}
 };
 </script>
-
 <style lang="scss" scoped>
 .billing_box_bg {
 	height: 100%;

+ 102 - 135
hdApp/src/pagesStorehouse/inventory/details.vue

@@ -2,27 +2,23 @@
 	<view class="ex-page">
 		<view class="main-view overscroll">
 			<view class="space-view ex-info">
-				<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>
 				<view class="info-cell">
-					<view class="cell-label"> 盘点日期</view>
-					<view class="cell-value"> {{ dataInfo.updateTime || "" }}</view>
+					<view class="cell-label"> 日期</view>
+					<view class="cell-value"> {{ dataInfo.updateTime ? dataInfo.updateTime.substr(5,11) : ''}}</view>
 				</view>
 				<view class="info-cell">
-					<view class="cell-label"> 盘点状态</view>
+					<view class="cell-label"> 状态</view>
 					<view class="cell-value">
 						{{ getItemStatusName(dataInfo.status) || "" }}</view
 					>
 				</view>
 				<view class="info-cell">
-					<view class="cell-label"> 备注</view>
+					<view class="cell-label"> 备注</view>
 					<view class="cell-value">
 						{{ dataInfo.remark || "" }}
 					</view>
@@ -36,33 +32,24 @@
 						</t-th>
 					</t-tr>
 					<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"
-						>
+						<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="商品图" />
 								<view class="icon-info">
 									<view class="info-name">
 										{{ item.itemName }}
 									</view>
-									<view class="info-type"> {{ item.rank || "" }}级 </view>
+									<view class="info-type"></view>
 								</view>
 							</view>
 							<view v-else-if="column.custom == 'stock'">
-								<text>{{ `${item.bigNumStock}/` }}</text>
-								<text>{{ item.smallNumStock }}</text>
+								<text v-if="Number(item.bigNumStock)>0">{{ `${item.bigNumStock}` }}</text>
+								<text v-if="Number(item.smallNumStock)>0">{{ item.smallNumStock }}</text>
 							</view>
 							<view v-else-if="column.custom == 'inventory'">
-								<text>{{ `${item.bigNum}/` }}</text>
-								<text>{{ item.smallNum }}</text>
-							</view>
-							<view v-else-if="column.custom == 'profit'">
-								<text>{{ `${item.bigNumProfitLoss}/` }}</text>
-								<text>{{ item.smallNumProfitLoss }}</text>
+								<text v-if="Number(item.bigNum)>0">{{ `${item.bigNum}` }}扎</text>
+								<text v-if="Number(item.smallNum)>0">{{ item.smallNum }}支</text>
 							</view>
+							<view v-else-if="column.custom == 'profit'"> </view>
 							<view v-else>{{ item[column.dataIndex] || "" }}</view>
 						</t-td>
 					</t-tr>
@@ -71,8 +58,7 @@
 		</view>
 		<view class="bar-view">
 			<view class="info-view">
-				盈亏合计:
-				<text class="price-item"> {{ sumCount }}扎 </text>
+				<text class="price-item"></text>
 			</view>
 		</view>
 	</view>
@@ -80,117 +66,98 @@
 <script>
 import { getCheckOrderDetailApi } from "@/api/inventory/index";
 import { INVENTORY_STATUS } from "@/utils/declare";
-
 export default {
-	components: {},
-	data() {
-		return {
-			INVENTORY_STATUS,
-			orderSn: null,
-			dataInfo: {},
-			columns: [
-				{
-					name: "名称",
-					custom: "icon"
-				},
-				{
-					name: "库存",
-					custom: "stock",
-					// color: "success",
-					width: 120,
-					align: "center"
-				},
-				{
-					name: "盘点数",
-					custom: "inventory",
-					color: "warn",
-					width: 120,
-					align: "center"
-				},
-				{
-					name: "盈亏数",
-					custom: "profit",
-					color: "success",
-					width: 120,
-					align: "center"
-				}
-			],
-			dataList: [
-				{
-					count: "1",
-					inventoryCount: "2",
-					profitCount: "3"
-				},
-				{
-					count: "1",
-					inventoryCount: "2",
-					profitCount: "3"
-				},
-				{
-					count: "1",
-					inventoryCount: "2",
-					profitCount: "3"
-				},
-				{
-					count: "1",
-					inventoryCount: "2",
-					profitCount: "3"
-				},
-				{
-					count: "1",
-					inventoryCount: "2",
-					profitCount: "3"
-				},
-				{
-					count: "1",
-					inventoryCount: "2",
-					profitCount: "3"
-				}
-			]
-		};
-	},
-
-	onLoad(options) {
-		const { orderSn } = options;
-		this.orderSn = orderSn;
-		this.initData();
-	},
-	computed: {
-		sumCount() {
-			let big = 0;
-			let small = 0;
-			if (this.dataInfo.itemInfo) {
-				for (const item of this.dataInfo.itemInfo) {
-					big += Number(item.bigNumProfitLoss);
-					small += Number(item.smallNumProfitLoss);
-				}
+components: {},
+data() {
+	return {
+		INVENTORY_STATUS,
+		orderSn: null,
+		dataInfo: {},
+		columns: [
+			{
+				name: "名称",
+				custom: "icon"
+			},
+			{
+				name: "盘前库存",
+				custom: "stock",
+				width: 120,
+				align: "center"
+			},
+			{
+				name: "盘点数",
+				custom: "inventory",
+				color: "warn",
+				width: 120,
+				align: "center"
+			},
+			{
+				name: "盈亏数",
+				custom: "profit",
+				color: "success",
+				width: 120,
+				align: "center"
 			}
-			return `${big}/${small}`;
-		}
-	},
-	methods: {
-		async initData() {
-			try {
-				const { data } = await getCheckOrderDetailApi(this.orderSn);
-				this.dataInfo = data;
-			} catch (error) {}
-		},
-		getItemStatusName(status) {
-			let name = "";
-			switch (status) {
-				case INVENTORY_STATUS.DONE:
-					name = "已盘点";
-					break;
-				case INVENTORY_STATUS.DRAFT:
-					name = "草稿";
-					break;
-
-				default:
-					break;
+		],
+		dataList: [
+			{
+				count: "1",
+				inventoryCount: "2",
+				profitCount: "3"
+			},
+			{
+				count: "1",
+				inventoryCount: "2",
+				profitCount: "3"
+			},
+			{
+				count: "1",
+				inventoryCount: "2",
+				profitCount: "3"
+			},
+			{
+				count: "1",
+				inventoryCount: "2",
+				profitCount: "3"
+			},
+			{
+				count: "1",
+				inventoryCount: "2",
+				profitCount: "3"
+			},
+			{
+				count: "1",
+				inventoryCount: "2",
+				profitCount: "3"
 			}
-			return name;
+		]
+	};
+},
+onLoad(options) {
+	const { orderSn } = options;
+	this.orderSn = orderSn;
+	this.initData();
+},
+methods: {
+	async initData() {
+		const { data } = await getCheckOrderDetailApi(this.orderSn);
+		this.dataInfo = data;
+	},
+	getItemStatusName(status) {
+		let name = "";
+		switch (status) {
+			case INVENTORY_STATUS.DONE:
+				name = "已盘点";
+				break;
+			case INVENTORY_STATUS.DRAFT:
+				name = "草稿";
+				break;
+			default:
+				break;
 		}
+		return name;
 	}
+}
 };
 </script>
 <style lang="scss" scoped>
@@ -231,8 +198,8 @@ export default {
 			/deep/.list-icon {
 				display: flex;
 				.icon-image {
-					width: 80upx;
-					height: 80upx;
+					width:60upx;
+					height:60upx;
 					margin-right: 20upx;
 				}
 				.icon-info {

+ 4 - 22
hdApp/src/pagesStorehouse/inventory/list.vue

@@ -10,14 +10,11 @@
 						<view class="info-order">{{ item.orderSn }}</view>
 						<view class="info-name">{{ item.remark }}</view>
 						<view>
-							<text class="info-time">{{ item.updateTime }}</text>
-							<text v-if="item.bigNum >= 0">{{ `${item.bigNum}/` }}</text>
-							<text>{{ item.smallNum }}</text>
+							<text class="info-time">{{ item.updateTime ? item.updateTime.substr(5,11) : '' }}</text>
+							<text v-if="Number(item.bigNum) > 0">{{ `${item.bigNum}` }}</text>
+							<text v-if="Number(item.smallNum) > 0">{{ item.smallNum }}</text>
 						</view>
 					</view>
-					<view :class="[ 'status', item.status == INVENTORY_STATUS.DRAFT ? 'primary' : 'gray' ]" >
-						<view :class="[ 'iconfont', item.status == INVENTORY_STATUS.DONE ? 'iconxuanzhong' : 'iconbianji' ]" ></view>
-					</view>
 				</view>
 			</block>
 			<block v-else>
@@ -97,23 +94,8 @@ export default {
 				this.getPdList();
 			}
 		},
-		getItemStatusName(status) {
-			let name = "";
-			switch (status) {
-				case OUT_STATUS.CONFIRM:
-					name = "待出库";
-					break;
-				case OUT_STATUS.DONE:
-					name = "已出库";
-					break;
-
-				default:
-					break;
-			}
-			return name;
-		},
 		addEvent() {
-			uni.navigateTo({url:'/pagesStorehouse/inventory/update'})
+			uni.navigateTo({url:'/pagesStorehouse/inventory/select'})
 		},
 		gotoDetailsEvent(item) {
 			if (item.status == INVENTORY_STATUS.DONE) {

+ 71 - 204
hdApp/src/pagesStorehouse/inventory/select.vue

@@ -1,64 +1,48 @@
 <template>
 	<view class="billing_box_bg">
-		<view class="input-wrap">
-			<app-search-module v-model="py" placeholder="请输入关键词,支持拼音首字母搜索" @input="searchFn"/>
+
+
+		<view class="input-wrap" >
+			<view class="search-bar">
+				<app-search-module v-model="py" placeholder="输入拼音首字母搜索" @input="searchFn" />
+			</view>
+			<view style="float:right">
+				<button class="admin-button-com middle blue" @click="removeFromSave(0)">清除花材</button>
+			</view>
 		</view>
-<!--		<app-tabs :tabs="tabs" :currentTab="tabIndex" @change="change" itemWidth="50%" />-->
+
 		<view class="scroll-middle_bx">
-			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
-				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
+			<scroll-view scroll-y scroll-with-animation class="tab-view">
+				<div v-for="(item, index) in globalClassItemList" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
 					<text>{{ item.className || "" }}</text>
-					<text class="tag" v-if="getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-						<text v-if="getSelectClassById(item.classId).bigCount > 0 || getSelectClassById(item.classId).smallCount > 0">
-							{{ `${getSelectClassById(item.classId).bigCount}` }}
-						</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">/</text>
-						<text v-if="getSelectClassById(item.classId).smallCount > 0">{{getSelectClassById(item.classId).smallCount}}</text>
-					</text>
 				</div>
 				<view style="height: 120upx"></view>
-				<!-- <view class="switchover-unit" @tap="isSmallCount = !isSmallCount">{{isSmallCount?'支':'扎'}}</view> -->
 			</scroll-view>
-
-<!--			<scroll-view scroll-y class="right-box" v-if="tabIndex == 0" :scroll-into-view="scrollClassId">-->
-				<scroll-view scroll-y class="right-box" v-if="tabIndex == 0" :scroll-into-view="scroll_into_view" scroll-with-animation="true"
-																	@scroll="scroll_detail"
-																	lower-threshold="100"
-																	@scrolltolower="scroll_bottom">
-				<!--内容部分 start -->
-				<block v-if="!$util.isEmpty(filterProductInfo)">
-					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in filterProductInfo" :key="classIndex" :id="`class_${classIndex}`">
-						<view class="item_list_title">
-							{{ classItem.className }}
-						</view>
-						<template v-for="(productItem, productIndex) in classItem.child">
-							<view style="height: 160upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
-							<Commondity v-if="classItem.isActive"
-								:offPrice="true"
-								:key="productIndex"
-								:info="productItem"
-								:bigCount="
-									getSelectItemById(productItem.id, classItem.classId).bigCount
-								"
-								:smallCount="
-									getSelectItemById(productItem.id, classItem.classId).smallCount
-								"
-								@customNum="customNum"
-								@add="addEvent"
-								@addOneEvent="addCustomNumEvent"
-								@del="delEvent"
-							></Commondity>
-							</view>
-						</template>
+			<scroll-view scroll-y class="right-box" v-if="tabIndex == 0" :scroll-into-view="scroll_into_view" scroll-with-animation="true"
+																@scroll="scroll_detail"
+																lower-threshold="100"
+																@scrolltolower="scroll_bottom">
+			<block v-if="!$util.isEmpty(globalClassItemList)">
+				<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in globalClassItemList" :key="classIndex" :id="`class_${classIndex}`">
+					<view class="item_list_title">
+						{{ classItem.className }}
 					</view>
-				</block>
-				<block v-else>
-					<app-wrapper-empty
-						title="暂无数据"
-						:is-empty="$util.isEmpty(filterProductInfo)"
-					/>
-				</block>
-				<!--内容部分 end -->
+					<template v-for="(productItem, productIndex) in classItem.child">
+						<view style="height: 160upx" :id="`class_${classItem.classId}_${productItem.id}`" :key="productIndex">
+						<Commondity v-if="classItem.isActive"
+							:key="productIndex"
+							:info="productItem"
+							:selectJobType="selectJobType"
+							@showAddModelFn="showAddModelFn"
+							@replaceItemFn="replaceItemFn"
+						></Commondity>
+						</view>
+					</template>
+				</view>
+			</block>
+			<block v-else>
+				<app-wrapper-empty title="暂无花材" :is-empty="$util.isEmpty(globalClassItemList)" />
+			</block>
 			</scroll-view>
 			<block v-else>
 				<view style="width:100%">
@@ -66,198 +50,77 @@
 				</view>
 			</block>
 		</view>
-		<!-- :maskClosable="false" -->
-		<modal-module
-			:show="isModel"
-			@cancel="modalCancel"
-			@click="affirm"
-			:title="customData.itemName"
-			color="#333"
-			:size="32"
-			padding="30rpx 30rpx"
-		>
+
+		<modal-module :show="isAddModel" @cancel="addItemModelHidden" @click="confirmAddItemModel" :title="customData.name" color="#333" :size="32" padding="30rpx 30rpx" >
 			<template slot="customContent">
 				<view class="select-cmd_bx" v-if="customData">
-					<view class="kc"> 库存{{ customData.stock }} </view>
+					<view class="kc"> 库存{{ customData.stock?parseFloat(customData.stock):0 }} </view>
 					<view class="num_bx">
-<!--						<input v-model="customData.bigCount" type="number" />扎-->
-<!--						<input-->
-<!--							v-model="customData.smallCount"-->
-<!--							type="number"-->
-<!--							style="margin-left:24upx"-->
-<!--						/>支-->
-						<allMoreSelectInput
-							:isActive="isActive" :isFocus="isFocus" :value="customData.bigCount"
-							:isActiveOne="isActiveOne" :isFocusOne="isFocusOne" :valueOne="customData.smallCount"
-							@deleteInputVal="deleteInputVal" @initAllInput="initAllInput" @moveAllInput="moveAllInput"
-							@deleteInputValOne="deleteInputValOne" @initAllInputOne="initAllInputOne" @moveAllInputOne="moveAllInputOne">
-						</allMoreSelectInput>
+						<!-- #ifdef APP-PLUS -->
+						<input style="width: 430upx" v-model="customData.bigCount" v-if="globalUnitType == 0" type="number" />
+						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 0">扎</text>
+						<input style="width: 430upx" v-model="customData.smallCount" v-if="globalUnitType == 1" type="number" />
+						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">支</text>
+						<!-- #endif -->
+
+						<!-- #ifdef MP-WEIXIN -->
+						<input style="width: 430upx" v-model="customData.bigCount" v-if="globalUnitType == 0" :focus="isAddInputFocus" type="number" />
+						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 0">扎</text>
+						<input style="width: 430upx" v-model="customData.smallCount" v-if="globalUnitType == 1" :focus="isAddInputFocus" type="number" />
+						<text style="font-size:35upx;font-weight:bold;color:#666666;" v-if="globalUnitType == 1">支</text>
+						<!-- #endif -->
+
+						<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>
 			</template>
 		</modal-module>
-		<modal-module
-			:show="showSubmitModel"
-			@cancel="cancelEvent"
-			@click="submitEvent"
-			:title="confirmContent"
-			color="#333"
-			:size="32"
-			padding="30rpx 30rpx"
-		>
-		</modal-module>
+
 		<FooterCart :offPrice="true" :price="allPrice" :count="allCount" @confirm="confirmSelectEvent"></FooterCart>
+
 	</view>
 </template>
-
 <script>
 import AppSearchModule from "@/components/module/app-search";
-import AppTabs from "@/components/plugin/tabs";
 import AppWrapperEmpty from "@/components/app-wrapper-empty";
 import Commondity from "@/components/module/app-commodity";
 import FooterCart from "@/components/module/app-footer-cart";
 import ModalModule from "@/components/plugin/modal";
 import productMins from "@/mixins/product";
-import allMoreSelectInput from "@/components/module/allMoreSelectInput";
-import allMoreSelectInputMins from "@/mixins/allMoreSelectInput";
 export default {
-	name: "allotEx", // 开单
+	name: "select",
 	components: {
-		AppTabs,
 		AppSearchModule,
 		AppWrapperEmpty,
 		Commondity,
 		ModalModule,
-		FooterCart,allMoreSelectInput
+		FooterCart
 	},
-	mixins: [productMins,allMoreSelectInputMins],
+	mixins: [productMins],
 	data() {
 		return {
-			pageType: "inventory",
+			selectJobType: "inventory",
 			isLimit: false,
-			offVerifyRepertory: true,
 			isSmallCount: false,
 			tabIndex: 0,
-			tabs: [
-				{
-					name: "花材"
-				},
-				{
-					name: "商品"
-				}
-				// {
-				//     name: '课程'
-				// },
-			],
 			isModel: false,
 			customData: {
 				bigCount: 0,
 				smallCount: 0
 			},
-			showSubmitModel: false
+			showSubmitModel: false,
+			checkStock: false
 		};
 	},
-	computed: {
-		confirmContent() {
-			let content = "确认下一步?";
-
-			return content;
-		}
-	},
-
 	methods: {
-		//自定义数量
-		customNum(info) {
-			this.isModel = true;
-			this.customData = info;
-			this.$nextTick(()=>{
-				this.initAllInput();
-			})
-		},
-		modalCancel() {
-			this.isModel = false;
-			this.customData = {};
-		}, // 取消 确认
-		affirm(val) {
-			this.isFocus = false;
-			this.isFocusOne = false;
-			this.$nextTick(()=>{
-				if(this.customData.bigCount==0 && this.customData.smallCount==0){
-					this.delAllEvent(this.customData)}
-				if (val.index === 0) {
-					this.modalCancel();
-				} else {
-					console.log(this.customData,'this.customData')
-					this.updateItemEvent(this.customData);
-					this.modalCancel();
-				}
-			})
-			return
-			if (val.index === 0) {
-				this.modalCancel();
-			} else {
-				const {
-					bigCount,
-					smallCount,
-					bigNum,
-					bigUnit,
-					smallNum,
-					smallUnit,
-					ratio
-				} = this.customData;
-				const ratioNum = Number(ratio);
-
-				//超过库存时 设置为库存最大值
-				if (
-					Number(bigCount) * ratioNum + Number(smallCount) >
-					Number(bigNum) * ratioNum + Number(smallNum)
-				) {
-					uni.showToast({
-						title: `库存只有${bigNum}${bigUnit}${smallNum}${smallUnit}`,
-						icon: "none"
-					});
-					this.customData.bigCount = bigNum;
-					this.customData.smallCount = smallNum;
-				} else {
-					this.updateItemEvent(this.customData);
-					this.modalCancel();
-				}
-			}
-		},
-		cancelEvent() {
-			this.showSubmitModel = false;
-		},
-		submitEvent(val) {
-			if (val.index === 0) {
-				this.cancelEvent();
-			} else {
-				console.log(444, this.selectList);
-
-				uni.navigateBack({
-					delta: 1
-				});
-
-				this.cancelEvent();
-			}
-		},
 		confirmSelectEvent() {
-			this.submitEvent(1);
-			// if (this.selectList.length > 0) {
-			// 	this.showSubmitModel = true;
-			// }
-		},
-		change(e) {
-			if (this.tabIndex == e.index) {
-				return false;
-			} else {
-				this.tabIndex = e.index;
-			}
-		},
-		scrollTop() {}
+			this.$util.pageTo({url: "/pagesStorehouse/inventory/update",type:2})
+		}
 	}
 };
 </script>
-
 <style lang="scss" scoped>
 .billing_box_bg {
 	height: 100%;
@@ -265,6 +128,10 @@ export default {
 	flex-direction: column;
 	.input-wrap {
 		padding: 22upx 20upx 22upx 30upx;
+		.search-bar {
+			display:inline-block;
+			width:530upx;
+		}
 	}
 	.scroll-middle_bx {
 		flex: 1;
@@ -363,4 +230,4 @@ export default {
 		}
 	}
 }
-</style>
+</style>

+ 79 - 248
hdApp/src/pagesStorehouse/inventory/update.vue

@@ -4,115 +4,42 @@
 			<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"
-							/>
+							<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)">
-					<!-- <Tabel
-						:dataList="selectList"
-						:columns="columns"
-						:parentData="{
-							getSelectItemProfitPrice: getSelectItemProfitPrice
-						}"
-					>
-						<template v-slot="{ row, column }">
-							<view v-if="column.custom == 'icon'" class="list-icon">
-								<image class="icon-image" :src="row.cover" alt="商品图" />
-								<view class="icon-info">
-									<view class="info-name">
-										{{ row.itemName }}
-									</view>
-									<view class="info-type">
-										B级
-									</view>
-								</view>
-							</view>
-							<view v-else-if="column.custom == 'stock'">
-								<text v-if="row.bigNum > 0">{{ `${row.bigNum}/` }}</text>
-								<text>{{ row.smallNum }}</text>
-							</view>
-							<view v-else-if="column.custom == 'inventory'">
-								<text v-if="row.bigCount > 0">{{ `${row.bigCount}/` }}</text>
-								<text>{{ row.smallCount }}</text>
-							</view>
-
-							<view v-else-if="column.custom == 'profit'">
-								<text>{{ getSelectItemProfitPrice }}</text>
-							</view>
-						</template>
-					</Tabel> -->
-
 					<view class="table-view">
-						<view
-							class="table-header"
-							:style="{ backgroundColor: headerBackgroundColor }"
-						>
-							<view
-								class="table-th"
-								v-for="(item, index) in columns"
-								:key="index"
-								:style="{
-									flex: item.width ? `0 0 ${item.width}rpx` : '1',
-									textAlign: item.align || 'left',
-									fontSzie: `${headerFontSize}rpx`,
-									margin: `0 ${gutter}rpx`
-								}"
-							>
-								<!-- <slot :name="item.dataIndex" > -->
+						<view class="table-header" :style="{ backgroundColor: headerBackgroundColor }" >
+							<view class="table-th" v-for="(item, index) in columns" :key="index" :style="{ flex: item.width ? `0 0 ${item.width}rpx` : '1', textAlign: item.align || 'left', fontSzie: `${headerFontSize}rpx`, margin: `0 ${gutter}rpx` }" >
 								{{ item.name || "" }}
-								<!-- </slot> -->
 							</view>
 						</view>
 						<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}rpx` : '1',
-									textAlign: column.align || 'left',
-									fontSzie: `${fontSize}rpx`,
-									margin: `0 ${gutter}rpx`
-								}"
-							>
-								<!-- {{ item[column.dataIndex] || "" }} -->
-
+							<view class="table-td" v-for="(column, columnIndex) in columns" :key="columnIndex" :style="{ flex: column.width ? `0 0 ${column.width}rpx` : '1', textAlign: column.align || 'left', fontSzie: `${fontSize}rpx`, margin: `0 ${gutter}rpx` }" >
 								<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 }}
 										</view>
-										<view class="info-type"> {{ item.rank || "" }}级 </view>
+										<view class="info-type"></view>
 									</view>
 								</view>
 								<view v-else-if="column.custom == 'stock'">
-									<text >{{ `${item.bigNum}/` }}</text>
-									<text>{{ item.smallNum }}</text>
+									<text v-if="Number(item.bigNum)>0">{{ `${item.bigNum}` }}扎</text>
+									<text v-if="Number(item.smallNum)>0">{{ item.smallNum }}支</text>
 								</view>
 								<view v-else-if="column.custom == 'inventory'">
-									<text >{{`${item.bigCount}/`}}</text>
-									<text >{{ `${item.smallCount}` }}</text>
+									<text v-if="Number(item.bigCount)>0">{{`${item.bigCount}`}}扎</text>
+									<text v-if="Number(item.smallCount)>0">{{ `${item.smallCount}` }}支</text>
 								</view>
-
 								<view v-else-if="column.custom == 'profit'">
-									<text>{{ getSelectItemProfitPrice(item) }}</text>
+									<text></text>
 								</view>
 								<text v-else :class="[column.color || '']">
 									{{ (column.dataIndex && item[column.dataIndex]) || "" }}
@@ -121,28 +48,12 @@
 						</view>
 					</view>
 				</block>
-				<template v-if="selectList.length == 0">
-					<view class="empty-view">
-						<button class="admin-button-com blue big" @click="gotoSelectPage">
-							开始盘点
-						</button>
-					</view>
-				</template>
 			</view>
 		</view>
 		<view class="bar-view" v-if="selectList.length>0">
 			<view class="btn-view">
-<!--				<button :class="['admin-button-com', 'middle', 'default']" @click="gotoSelectPage">继续盘点</button>-->
-				<button :class="['admin-button-com', 'middle']" @click="gotoSelectPage">继续</button>
-				<button :class="['admin-button-com','middle',{ disabled: allCount == 0 }]" :disabled="allCount == 0" @click="saveToDraft">
-					保存草稿
-				</button>
-				<button v-if="!orderSn" :class="['admin-button-com', 'middle', { disabled: allCount == 0 }]" :disabled="allCount == 0" @click="confirmPop(1)">
-					确认盘点
-				</button>
-				<button v-if="orderSn" :class="['admin-button-com', 'middle', { disabled: allCount == 0 }]" :disabled="allCount == 0" @click="confirmPop(2)">
-					确认盘点
-				</button>
+				<button class="admin-button-com big defalut" style="margin-right:60upx;" @click="gotoSelectPage">返回修改</button>
+				<button class="admin-button-com big blue" @click="confirmPop()">确认盘点</button>
 			</view>
 		</view>
 	</view>
@@ -151,19 +62,14 @@
 import TuiListCell from "@/components/plugin/list-cell";
 import productMins from "@/mixins/product";
 import { mapActions, mapGetters } from "vuex";
-import {
-	updateCheckOrderApi,
-	updateCheckOrderToDraftApi,
-	savaCheckOrderDraftApi,
-	getCheckOrderDetailApi,
-	checkOrderApi
-} from "@/api/inventory/index";
-import {currentShop} from "@/api/shop/index";
+import { updateCheckOrderToDraftApi, savaCheckOrderDraftApi, getCheckOrderDetailApi, checkOrderApi } from "@/api/inventory";
+import {currentShop} from "@/api/shop";
 export default {
 	components: { TuiListCell },
 	mixins: [productMins],
 	data() {
 		return {
+			selectJobType: "inventory",
 			orderSn: null,
 			infoData: null,
 			autoLoad: false,
@@ -176,9 +82,8 @@ export default {
 					custom: "icon"
 				},
 				{
-					name: "库存",
+					name: "盘前库存",
 					custom: "stock",
-					// color: "success",
 					width: 120,
 					align: "center"
 				},
@@ -194,12 +99,7 @@ export default {
 					color: "success",
 					custom: "profit",
 					width: 120,
-					align: "center",
-					render: (h, { row, index }) => {
-						return h("text", {}, () => {
-							return this.getSelectItemProfitPrice(row);
-						});
-					}
+					align: "center"
 				}
 			]
 		};
@@ -221,134 +121,76 @@ export default {
 	methods: {
 		...mapActions(["initMerchantInfo"]),
 		async initInfo() {
-			try {
-				const { data } = await getCheckOrderDetailApi(this.orderSn);
-				this.infoData = data;
-				const { remark, itemInfo } = data;
-				this.remark = remark;
-				this.setSelectInfoByType({
-					type: this.pageType,
-					info: itemInfo.map(ele => {
-						return {
-							...ele,
-							bigNum: Number(ele.bigNumStock),
-							smallNum: Number(ele.smallNumStock),
-							bigCount: Number(ele.bigNum),
-							smallCount: Number(ele.smallNum)
-						};
-					})
-				});
-			} catch (error) {}
+			const { data } = await getCheckOrderDetailApi(this.orderSn);
+			this.infoData = data;
+			const { remark, itemInfo } = data;
+			this.remark = remark;
+			this.setSelectInfoByType({
+				type: this.pageType,
+				info: itemInfo.map(ele => {
+					return {
+						...ele,
+						bigNum: Number(ele.bigNumStock),
+						smallNum: Number(ele.smallNumStock),
+						bigCount: Number(ele.bigNum),
+						smallCount: Number(ele.smallNum)
+					};
+				})
+			})
 		},
 		gotoSelectPage() {
-			uni.navigateTo({
-				url: "/pagesStorehouse/inventory/select",
-				success: result => {},
-				fail: () => {},
-				complete: () => {}
-			});
+			uni.navigateTo({url: "/pagesStorehouse/inventory/select"})
 		},
 		getInfo(){
 			return currentShop().then(res => {
 				this.shopInfo = res.data
-					console.log('getInfo',res)
-				})
-				.catch(err => {});
-		},
-		/**
-		 * 获取当前选中商品总价
-		 */
-		getSelectItemProfitPrice(item) {
-			let price = 0;
-			const {
-				bigCount,
-				smallCount,
-				bigNum,
-				smallNum,
-				bigPrice,
-				smallPrice
-			} = item;
-			let bigNumProfitLoss = Number(bigCount) - Number(bigNum);
-			let smallNumProfitLoss = Number(smallCount) - Number(smallNum);
-			// let sum = Number(bigCount) * Number(bigPrice) + Number(smallCount) * Number(smallPrice);
-			// price = Math.round(sum * 100) / 100;
-			// let stockSum = Number(bigNum) * Number(bigPrice) + Number(smallNum) * Number(smallPrice);
-			// let stockPrice = Math.round(stockSum * 100) / 100;
-			let diff = `${bigNumProfitLoss}/${smallNumProfitLoss}`;
-			// let diff = `${bigNumProfitLoss}/${smallNumProfitLoss}`;
-			return diff;
-			// return Math.round(diff * 100) / 100;
+			})	
 		},
 		async saveToDraft() {
-			try {
-				let api = savaCheckOrderDraftApi;
-				if (this.orderSn) {
-					api = updateCheckOrderToDraftApi;
-				}
-				let params = {
-					remark: this.remark
+			let api = savaCheckOrderDraftApi;
+			if (this.orderSn) {
+				api = updateCheckOrderToDraftApi;
+			}
+			let params = {
+				remark: this.remark
+			};
+			if (this.orderSn) {
+				params.orderSn = this.orderSn;
+			}
+			let formatList = this.selectList.map(ele => {
+				return {
+					bigNum: ele.bigCount,
+					smallNum: ele.smallCount,
+					productId: ele.id,
+					classId:ele.classId,itemId:ele.itemId
 				};
-				if (this.orderSn) {
-					params.orderSn = this.orderSn;
-				}
-				let formatList = this.selectList.map(ele => {
-					return {
-						bigNum: ele.bigCount,
-						smallNum: ele.smallCount,
-						productId: ele.id,
-						classId:ele.classId,itemId:ele.itemId
-					};
-				});
-				params.itemInfo = JSON.stringify(formatList);
-				const {
-					data: { orderSn }
-				} = await api(params);
-				this.orderSn = orderSn;
-				this.$msg("保存成功");
-			} catch (error) {}
-		},
-		confirmPop(type) {
-			let self = this;
-			uni.showModal({
-				title: '提示',
-				content: '确认盘点?',
-				success: function (res) {
-					if (res.confirm) {
-						self.saveCheckOrder(type);
-					}
-				}
 			});
+			params.itemInfo = JSON.stringify(formatList);
+			const { data: { orderSn } } = await api(params);
+			this.orderSn = orderSn;
+			this.$msg("保存成功");
 		},
-		async saveCheckOrder(type) {
-			try {
-				console.log(type)
-				let params = {
-					remark: this.remark
-				};
-				if (this.orderSn) {
-					params.orderSn = this.orderSn;
-				}
-				let formatList = this.selectList.map(ele => {
-					return {
-						bigNum: ele.bigCount,
-						smallNum: ele.smallCount,
-						productId: ele.id
-					};
-				});
-				params.itemInfo = JSON.stringify(formatList);
-				//type 1直接确定 2保存草稿后在确定
-				if(type==1){
-					await checkOrderApi(params)
-				}else{
-					await updateCheckOrderApi(params)
-				}
-				this.$msg("盘点成功");
-				this.resetSelectInfoByType(this.pageType);
-				uni.navigateBack({
-					delta: 1
-				});
-			} catch (error) {}
+		confirmPop() {
+			let that = this;
+			that.$util.confirmModal({content:'确认盘点?'},() => {
+				that.saveCheckOrder()
+			})
 		},
+		saveCheckOrder() {
+			let params = {remark: this.remark}
+			let formatList = this.selectList.map(ele => {
+				return { bigNum: ele.bigCount, smallNum: ele.smallCount, productId: ele.id }
+			});
+			let that = this
+			params.itemInfo = JSON.stringify(formatList);
+			checkOrderApi(params).then(res=>{
+				if(res.code == 1){
+					that.$msg("盘点成功");
+					that.removeFromSaveDirect()
+					uni.navigateBack()
+				}
+			})
+		}
 	}
 };
 </script>
@@ -365,11 +207,9 @@ export default {
 			background-color: #fff;
 		}
 		.ex-info {
-			// padding: 0 30upx;
 			.module-com {
 				background-color: #fff;
 				margin-bottom: 20upx;
-
 				border-radius: 10upx;
 				overflow: hidden;
 				.member-wrap {
@@ -384,20 +224,14 @@ export default {
 						height: 240upx;
 					}
 				}
-				// .tui-placeholder,
-				// .tui-input {
-				// 	padding-right: 30upx;
-				// 	width: 100%;
-				// 	text-align: right;
-				// }
 			}
 		}
 		.ex-table {
 			/deep/.list-icon {
 				display: flex;
 				.icon-image {
-					width: 80upx;
-					height: 80upx;
+					width: 60upx;
+					height: 60upx;
 					margin-right: 20upx;
 				}
 				.icon-info {
@@ -429,9 +263,7 @@ export default {
 		padding: 0 30upx;
 		width: 100%;
 		height: 100upx;
-
 		box-shadow: 0upx -1px 6upx 0upx rgba(4, 0, 0, 0.06);
-
 		.btn-view {
 			display: flex;
 			.admin-button-com {
@@ -444,7 +276,6 @@ export default {
 	.table-header {
 		display: flex;
 		padding: 20upx 30upx;
-
 		box-shadow: 0upx 1px 0upx 0upx #eeeeee;
 		color: #999999;
 		.table-th {
@@ -473,4 +304,4 @@ export default {
 		}
 	}
 }
-</style>
+</style>