shish 4 лет назад
Родитель
Сommit
1ab8ca03c9

+ 11 - 8
ghsApp/src/pagesPurchase/add.vue

@@ -88,15 +88,15 @@
 					</view>
 					<view class="select-cmd_bx">
 						<view class="num_bx">
-							<view class="kc">重量</view>
-							<input v-model="customData.realityWeight" @focus="customData.realityWeight = null" type="number" placeholder="公斤" />
+							<view class="kc">总价</view>
+							<input v-model="customData.itemPrice" @focus="customData.itemPrice = null" type="number" placeholder="采购金额" />
+							<text style="margin-left: 20rpx">元</text>
 						</view>
 					</view>
 					<view class="select-cmd_bx">
 						<view class="num_bx">
-							<view class="kc">总价</view>
-							<input v-model="customData.itemPrice" @focus="customData.itemPrice = null" type="number" placeholder="采购金额" />
-							<text style="margin-left: 20rpx">元</text>
+							<view class="kc">重量</view>
+							<input readonly v-model="customData.realityWeight" @focus="customData.realityWeight = null" type="number" placeholder="公斤" />
 						</view>
 					</view>
 				</view>
@@ -221,10 +221,13 @@ export default {
 			this.$nextTick(()=>{
 				//取消
 				if (val.index === 0) {
-					if(this.customData.bigCount>0||this.customData.smallCount>0){
-					}else{
+
+
+					//if((this.customData.bigCount>0||this.customData.smallCount>0) && /(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/.test(this.customData.itemPrice) == true){
+						//console.log(222222)
+					//}else{
 						this.delAllEvent(this.customData);
-					}
+					//}
 					this.modalCancel();
 					return
 				}

+ 0 - 5
ghsApp/src/pagesPurchase/components/CommodityPurchase.vue

@@ -1,8 +1,5 @@
 <template>
   <view class="item-cmd_bx" @click="customNum">
-    <!--<view class="img_bx">-->
-      <!--<app-img :src="info.cover" alt="商品图" mode="aspectFit" :height="160" />-->
-    <!--</view>-->
 			<view class="img_bx" style="background:#eeeeee">
 				<image :src="info.cover" v-if="isImg"></image>
 			</view>
@@ -27,7 +24,6 @@
               class="num"
               @click.stop="customNum"
             >
-              <!--					<text class="num" @click="customNum" v-if="bigCount > 0 || smallCount > 0">-->
               <text v-if="bigCount > 0 || smallCount > 0">{{ `${bigCount}` }}</text>
               <text v-if="smallCount > 0">/</text>
               <text v-if="smallCount > 0">{{ `${smallCount}` }}</text>
@@ -39,7 +35,6 @@
             ></i>
           </view>
           <view class="price">
-            <!--<text class="unit">¥</text><text>{{ info.price }}</text>-->
             <text class="unit">还剩:{{ info.stock }}</text>
           </view>
         </view>