shish 5 лет назад
Родитель
Сommit
548dab1533

+ 1 - 2
ghsApp/src/admin/billing/affirm.vue

@@ -13,9 +13,8 @@
                     <text class="item-name">{{ item.itemName }}</text>
                     <text class="item-price">
                       <text class="unit">¥</text>
-
                       <text class="price">
-                        {{ getSelectItemPrice(item) }}
+                        {{ item.userPrice }}
                       </text>
                     </text>
                   </view>

+ 10 - 3
ghsApp/src/admin/billing/index.vue

@@ -65,15 +65,14 @@
 		<modal-module :show="isModel" @cancel="modalCancel" @click="affirm" :title="customData.itemName" 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.price }} 库存:{{ customData.stock }} </view>
 					<view class="num_bx">
-						<!--<input v-model="customData.bigCount" @focus="customData.bigCount = null" type="number" />扎-->
 						<input v-model="customData.bigCount" @input="countPrice" :focus="isFocus" type="number" />扎
 						<input v-model="customData.smallCount" @input="countPrice" type="number" style="margin-left:24upx" />支
 					</view>
 					<view class="num_bx">
 						<input style="width: 498rpx" v-model="customData.userPrice" @focus="customData.userPrice = null" type="number" placeholder="金额" />
-						<text style="margin-left: 20rpx">元</text>
+						<text style="margin-left: 10rpx">元</text>
 					</view>
 				</view>
 			</template>
@@ -198,6 +197,14 @@ export default {
 					}
 				}
 
+				if(/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.customData.userPrice) == false){
+					uni.showToast({title:"金额错误",icon:"none"})
+					return;
+				}
+				if(this.customData.userPrice <=0){
+						uni.showToast({title:"金额要大于0",icon:"none"})
+						return;
+				}
 				 
 				const { bigCount,smallCount,bigNum,bigUnit,smallNum,smallUnit,ratio} = this.customData;
 				const ratioNum = Number(ratio);

+ 1 - 1
ghsApp/src/admin/item/detail.vue

@@ -47,7 +47,7 @@
           </tui-list-cell>
 							<tui-list-cell class="line-cell" :hover="false">
 								<div class="tui-title">库存</div>
-								<input v-model="form.stock" :disabled="form.id == 0?false:true" placeholder-class="phcolor" class="tui-input" name="stock" placeholder="请输入" maxlength="50" type="number"/>
+								<input v-model="form.stock" placeholder-class="phcolor" class="tui-input" name="stock" placeholder="请输入" maxlength="50" type="number"/>
 							</tui-list-cell>
         <tui-list-cell class="line-cell" :arrow="true">
           <div class="tui-title">大单位</div>

+ 1 - 2
ghsApp/src/mixins/priceSocket.js

@@ -10,8 +10,7 @@ export default {
 		};
 	},
 	onShow() {
-		this.priceSocketFun();
-
+		//this.priceSocketFun();
 	},
 	methods:{
 		/*延迟监听token*/

+ 1 - 1
ghsApp/src/pagesStorehouse/components/CommodityStock.vue

@@ -3,7 +3,7 @@
 		<view class="img_bx" style="background:#eeeeee">
 			<image :src="info.cover" v-if="isImg"></image>
 		</view>
-		<navigator :url="type == STOCK_TYPE.WARN?'':`/pagesStorehouse/stockWarn/detailed?id=${info.itemId}`" class="cmd-info_bx" :class="type == STOCK_TYPE.WARN?'':'active'">
+		<navigator :url="type == STOCK_TYPE.WARN?'':`/admin/item/detail?id=${info.id}`" class="cmd-info_bx" :class="type == STOCK_TYPE.WARN?'':'active'">
 			<view class="tit">{{ info.itemName || "" }}</view>
 			<view class="kc"></view>
 			<view class="num-open_bx">

+ 1 - 0
ghsApp/src/pagesStorehouse/stockWarn/manage.vue

@@ -117,6 +117,7 @@ export default {
 			this.initData({ type, shopId: this.shopId,status:0});
 		}
 	},
+	onShow(){},
 	methods: {
 		affirm(val) {
 			if (val.index === 0) {

+ 1 - 1
hdApp/src/mixins/priceSocket.js

@@ -10,7 +10,7 @@ export default {
 		};
 	},
 	onShow() {
-		this.priceSocketFun();
+		//this.priceSocketFun();
 	},
 	methods:{
 		/*延迟监听token*/