Browse Source

超级会员价

shish 3 years ago
parent
commit
0dab9d3393
1 changed files with 12 additions and 6 deletions
  1. 12 6
      ghsApp/src/pagesPurchase/components/pageSuccess.vue

+ 12 - 6
ghsApp/src/pagesPurchase/components/pageSuccess.vue

@@ -12,7 +12,7 @@
 						<view class="flex title" v-if="info.status == 3"> 入库前请确认售价: </view>
 						<view class="flex title" v-else> 确认售价: </view>
 						<view class="flex title">
-							<text style="font-size:28upx;font-weight:normal;color:green;">花材名称 / 进货价 / 成本(含运费) </text>
+							<text style="font-size:28upx;font-weight:normal;color:green;">花材名称 / 进货价 / 成本价(进货价+运费) </text>
 						</view>
 
 						<view v-for="(res,i) in flowersList" :key="i">
@@ -21,13 +21,14 @@
 									<view style="margin-bottom:6upx;">
 										<text class="name" @click="pageTo({url:'/admin/item/detail?id='+ res.productId})">
 											{{res.name}}
-											<text style="color:red;margin-left:30upx;font-weight:normal;">¥{{res.cost?parseFloat(res.cost):0}}</text>
-											<text style="color:blue;margin-left:30upx;font-weight:normal;">¥{{res.bigPrice?parseFloat(res.bigPrice):0}}</text>
+											<text style="color:red;margin-left:40upx;font-weight:normal;">¥{{res.bigPrice?parseFloat(res.bigPrice):0}}</text>
+											<text style="color:red;margin-left:40upx;font-weight:normal;">¥{{res.cost?parseFloat(res.cost):0}}</text>
+											<text style="float:right;color:green;">...</text>
 										</text>
 									</view>
 									<view>
 										<input type="digit" v-model="res.suggestHjPrice" @focus="clearHjPrice(i)" placeholder="会员价" />
-										<input type="digit" v-model="res.suggestPrice" @focus="clearPrice(i)" @input="linkChange(i)" placeholder="批发价" />
+										<input type="digit" v-model="res.suggestPrice" @focus="clearPrice(i)" @input="linkChange(i)" placeholder="批发价" style="border:1upx solid #3385FF;color:#3385FF;" />
 										<input type="digit" v-model="res.suggestSkPrice" @focus="clearSkPrice(i)" placeholder="零售价" />
 									</view>
 								</view>
@@ -157,6 +158,11 @@ export default {
 					errorHint = '请填写 '+name+' 零售价'
 					hasError = true
 				}
+				if(that.$util.isMoney(item.suggestHjPrice) == false){
+					let name = item.name
+					errorHint = '请填写 '+name+' 会员价'
+					hasError = true
+				}
 			})
 			if(hasError){
 				this.$msg(errorHint)
@@ -177,10 +183,10 @@ export default {
 			let that = this
 			let targetId = this.option.id ||0
 			let newProduct = this.flowersList.map((ele) => {
-				return {id:ele.productId,price:ele.suggestPrice,skPrice:ele.suggestSkPrice}
+				return {id:ele.productId,price:ele.suggestPrice,skPrice:ele.suggestSkPrice,hjPrice:ele.suggestHjPrice}
 			})
 			uni.showLoading({mask:true})
-			batchChangePrice({data:JSON.stringify(newProduct),changeType:'cg',targetId:targetId}).then(res => {
+			batchChangePrice({data:JSON.stringify(newProduct),changeType:'cg',targetId:targetId,appVersion:1}).then(res => {
 				uni.hideLoading()
 				if(res.code == 1){
 					that.$msg(res.msg)