lilei 1 年之前
父節點
當前提交
12c3305540
共有 2 個文件被更改,包括 16 次插入10 次删除
  1. 2 2
      App.vue
  2. 14 8
      pagesA/digitalShelf/choosePart.vue

+ 2 - 2
App.vue

@@ -1,8 +1,8 @@
 <script>
 	export default {
 		globalData: {
-			baseUrl: 'http://192.168.2.103:9110/saas/clz/', // 本地
-			// baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
+			// baseUrl: 'http://192.168.2.103:9110/saas/clz/', // 本地
+			baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
 			// baseUrl: 'https://car.zyucgj.com/saas/clz/' // 生产
 		},
 		onLaunch: function() {

+ 14 - 8
pagesA/digitalShelf/choosePart.vue

@@ -61,16 +61,16 @@
 										<view class="flex justify_between">
 											<view class="item-detail-text flex_1">
 												<!-- 货架产品 -->
-												<view @click="openPriceModal(item,1)" v-if="item.affiliation=='SHELF'">
+												<view @click="openPriceModal(item,1,showShelfDetial)" v-if="item.affiliation=='SHELF'">
 													<text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice.shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</text>
 													<text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice.shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
-													<u-icon name="arrow-right" v-if="priceShowVal"></u-icon>
+													<u-icon name="arrow-right" v-if="priceShowVal&&showShelfDetial"></u-icon>
 												</view>
 												<!-- 非货架 -->
-												<view @click="openPriceModal(item,1)" v-else>
+												<view @click="openPriceModal(item,1,showNonShelfDetial)" v-else>
 													<text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice.non_shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</text>
 													<text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice.non_shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
-													<u-icon name="arrow-right" v-if="priceShowVal"></u-icon>
+													<u-icon name="arrow-right" v-if="priceShowVal&&showNonShelfDetial"></u-icon>
 												</view>
 											</view>
 											<view class="item-detail-text" v-if="item.currentInven">
@@ -122,10 +122,10 @@
 										<u-tag :text="item.origCode" mode="light" borderColor="#ffffff" shape="circle" type="success"></u-tag>
 									</view>
 									<view class="flex justify_between">
-										<view class="item-detail-text flex_1" @click="openPriceModal(item,0)">
+										<view class="item-detail-text flex_1" @click="openPriceModal(item,0,showShelfDetial)">
 											<text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice&&configPrice.shelf_price_show == '1'">{{item.price?'¥'+item.price:'暂无价格'}}</text>
 											<text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&configPrice.shelf_cost_show == '1'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
-											<u-icon name="arrow-right" v-if="priceShowVal"></u-icon>
+											<u-icon name="arrow-right" v-if="priceShowVal&&showShelfDetial"></u-icon>
 										</view>
 										<view class="item-detail-text" v-if="item.currentInven">
 											<u-button shape="circle" @click="addPart(item)" v-if="!item.checked" :custom-style="{width:'48upx',height:'48upx',background:'#066cff'}" type="primary" size="mini">
@@ -335,6 +335,12 @@
 			},
 			configPrice(){
 				return this.$store.state.vuex_configPrice
+			},
+			showShelfDetial(){
+				return this.configPrice.shelf_price_show == '1'&&this.configPrice.shelf_cost_show == '1'
+			},
+			showNonShelfDetial(){
+				return this.configPrice.non_shelf_price_show == '1'&&this.configPrice.non_shelf_cost_show == '1'
 			}
 		},
 		onLoad(opts) {
@@ -379,9 +385,9 @@
 				})
 			},
 			// 打开价格信息弹框
-			openPriceModal(row,type){
+			openPriceModal(row,type,show){
 				console.log(row)
-				if(this.priceShowVal){
+				if(this.priceShowVal&&show){
 					if(type == 0){
 						row.affiliation = "SHELF"
 					}