Просмотр исходного кода

Merge branch 'develop_sale20' of jianguan-web/repairYimatong-mini-html into master

李磊 1 год назад
Родитель
Сommit
8c136c6664
2 измененных файлов с 20 добавлено и 10 удалено
  1. 3 3
      App.vue
  2. 17 7
      pagesA/digitalShelf/choosePart.vue

+ 3 - 3
App.vue

@@ -1,9 +1,9 @@
 <script>
 	export default {
 		globalData: {
-			// baseUrl: 'http://192.168.2.113:7002/saas/clz/', // 本地
-			// baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
-			baseUrl: 'https://car.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() {
 			console.log('App Launch');

+ 17 - 7
pagesA/digitalShelf/choosePart.vue

@@ -49,14 +49,17 @@
 						 		<view class="item-detail">
 									<view class="item-detail-info">
 										<view class="flex justify_between">
-											<text class="item-detail-text flex_1">{{item.code}}</text>
+											<view>
+												<text class="item-detail-text flex_1">{{item.code}}</text>
+												<u-tag v-if="commonPartCodeList.includes(item.code)" size="mini" style="margin-left: 5px;" text="通用" mode="light" shape="circle" type="success"></u-tag>
+											</view>
 											<text class="item-detail-text" v-if="item.affiliation=='SHELF'">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
 										</view>
 										<view class="flex justify_between">
 											<view class="item-detail-text flex_1">
-												<view @click="openPriceModal(item)">
+												<view @click="openPriceModal(item,1)">
 													<text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice">{{item.price?'¥'+item.price:'暂无价格'}}</text>
-													<text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
+													<text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice&&item.affiliation=='SHELF'">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
 													<u-icon name="arrow-right" v-if="priceShowVal"></u-icon>
 												</view>
 											</view>
@@ -106,7 +109,7 @@
 										<text class="item-detail-text">库存:{{item.currentInven?item.currentInven:0}} {{item.unit}}</text>
 									</view>
 									<view class="flex justify_between">
-										<view class="item-detail-text flex_1" @click="openPriceModal(item)">
+										<view class="item-detail-text flex_1" @click="openPriceModal(item,0)">
 											<text class="item-price" :style="{color:!item.price?'#666':''}" v-if="showCarPrice">{{item.price?'¥'+item.price:'暂无价格'}}</text>
 											<text class="item-price" :style="{color:!item.cost?'#666':''}" v-if="showCostPrice">{{item.cost?'¥'+item.cost:'暂无价格'}}</text>
 											<u-icon name="arrow-right" v-if="priceShowVal"></u-icon>
@@ -213,7 +216,7 @@
 					<text>产品名称</text>
 					<text>{{tempData.name||'--'}}</text>
 				</view>
-				<view>
+				<view v-if="tempData.affiliation=='SHELF'">
 					<text>进货价</text>
 					<text>{{tempData.cost?'¥'+tempData.cost:'暂无价格'}}</text>
 				</view>
@@ -251,6 +254,8 @@
 				partList: [], // 配件列表
 				partListData: [], // 已选配件
 				vinPartList: [],
+				vinCode:[],
+				commonPartCodeList:[],
 				isIphoneXup: false,
 				saveLoading: false,
 				showPopup: false,
@@ -339,9 +344,12 @@
 				})
 			},
 			// 打开价格信息弹框
-			openPriceModal(row){
+			openPriceModal(row,type){
 				console.log(row)
 				if(this.priceShowVal){
+					if(type == 0){
+						row.affiliation = "SHELF"
+					}
 					this.tempData = row
 					this.showPriceModal = true
 				}
@@ -389,7 +397,9 @@
 			getCarCodeByVin(){
 				queryPartCodeByVin({vinNumber:this.vinNumber}).then(res => {
 					console.log(res,'this.vinCode')
-					this.vinCode = res.data
+					const ret = res.data
+					this.commonPartCodeList = ret.commonPartCodeList || []
+					this.vinCode = this.commonPartCodeList.concat(ret.partCodeList||[])
 					this.getShelfProductType()
 				})
 			},