Quellcode durchsuchen

0912部分bug修复

baijunde vor 1 Jahr
Ursprung
Commit
5315889ed4

+ 3 - 1
pages/order/arriveUpload.vue

@@ -95,6 +95,7 @@
 			},
 			// 提交
 			submit() {
+				console.log(this.uploadedFiles)
 				if (this.uploadedFiles.length < 3) {
 					uni.showToast({
 						title: '请至少上传3张照片',
@@ -113,9 +114,10 @@
 								merchantUserId: uni.getStorageSync('login_user_info').id,
 								businessType: this.uptype,
 								taskId : this.taskId,
-								imgUrl:this.imageHttp + item.message
+								imgUrl:this.imageHttp + item.response.message
 							})
 					});
+					console.log(temp)
 					
 					this.$http.post("/ts/merchant/addImg", temp).then(res => {
 					    console.log(res);

+ 2 - 2
pages/order/components/serviceDetail.vue

@@ -1,12 +1,12 @@
 <template>
-	<view class="service-detail-container">
+	<view class="service-detail-container" @click="confirm">
 		<view class="popup">
 			<view class="header">
 				服务明细
 			</view>
 			<view class="detail-list">
 				<view class="item" v-for="(item,index) in form.serviceDetails" :key="index">
-					<view class="item_name">
+					<view class="item_name" style="margin-bottom: 10rpx;">
 						{{item.itemName}}
 					</view>
 					<view class="item_center">

+ 1 - 1
pages/order/serviceOrder/orderDetail.vue

@@ -37,7 +37,7 @@
 			<view class="car_data" v-if="form.checkType == 0">
 				<view class="car_id user_name">
 					<span style="display: block;padding: 0px;">用户姓名:{{form.contactsName}}</span>
-					<span class="call">
+					<span class="call"  @click="callUser">
 						<image src="/static/order/call.png" mode=""></image> 联系客户
 					</span>
 				</view>

+ 4 - 4
pages/order/serviceOrder/photo.vue

@@ -12,7 +12,7 @@
 		<view class="content">
 			<view class="img" v-for="(item,index) in imgList" :key="index">
 				<image :src="item.imgUrl" mode=""></image>
-					<span v-if="item.imgType == 1 &&businessType != 4">正前方</span>
+					<!-- <span v-if="item.imgType == 1 &&businessType != 4">正前方</span>
 					<span v-if="item.imgType == 4 &&businessType != 4">车辆后侧</span>
 					<span v-if="item.imgType == 2  &&businessType != 4">车辆左侧</span>
 					<span v-if="item.imgType == 3  &&businessType != 4">车辆右侧</span>
@@ -21,7 +21,7 @@
 					<span v-if="item.imgType == 7  &&businessType != 4">后排座</span>
 					<span v-if="item.imgType == 8  &&businessType != 4">服务前</span>
 					<span v-if="item.imgType == 9  &&businessType != 4">服务中</span>
-					<span v-if="item.imgType == 10  &&businessType != 4">服务后</span>
+					<span v-if="item.imgType == 10  &&businessType != 4">服务后</span> -->
 			</view>
 		</view>
 		<view class="btn">
@@ -84,11 +84,11 @@
 				}
 				this.$http.get("/ts/merchant/selectImg?taskId=" + this.taskId + '&businessType=' + Number(this.businessType))
 					.then(res => {
-						console.log(res)
+						
 						if (res.data.code == 200) {
 							// this.isSuccess = true
 							this.imgList = res.data.result
-
+console.log(this.imgList)
 						}
 					})
 			}

+ 30 - 15
pages/product/index.vue

@@ -66,7 +66,8 @@
 					<view class="data">
 						<span>{{item.productName}}</span>
 						<!-- <span>售卖时间:{{item.time}}</span> -->
-						<view class="repertory">库存:{{item.stockQuantity}} <span @click.stop="goUser(item)">销量:{{item.soldQuantity}}</span> </view>
+						<view class="repertory">库存:{{item.stockQuantity}} <span
+								@click.stop="goUser(item)">销量:{{item.soldQuantity}}</span> </view>
 						<view class="price">
 							<span style="font-size: 22rpx;margin: 0px;">¥</span>{{item.soldPrice}}
 							<span v-if="item.categoryId == 1945013773786701826 ">~</span>
@@ -238,10 +239,11 @@
 				})
 			},
 			//销量页面
-			goUser(item){
+			goUser(item) {
 				console.log(item)
 				uni.navigateTo({
-					url: '/pages/product/salesUser?productName='+item.productName+'&productImage='+item.productImage+'&productId='+item.productId
+					url: '/pages/product/salesUser?productName=' + item.productName + '&productImage=' + item.productImage +
+						'&productId=' + item.productId
 				})
 			},
 			handleClear() {
@@ -330,16 +332,16 @@
 			remove() {
 				console.log(this.productList)
 				this.productList.forEach((item => {
-					if(item.select){
-							this.productHandleList.push(item.productId)
+					if (item.select) {
+						this.productHandleList.push(item.productId)
 					}
-				
+
 				}))
 				this.isDelete = true
 			},
 			removeProduct() {
-				let ids =[]
-				 ids = this.productHandleList.join(',')
+				let ids = []
+				ids = this.productHandleList.join(',')
 				console.log(ids)
 				this.$http.get("/app/product/deleteBatch?ids=" + ids, )
 					.then(res => {
@@ -433,12 +435,25 @@
 			},
 			//上架
 			sell(item) {
-				console.log(item)
-				this.sellProducts.push({
-					productId: item.productId,
-					productStatus: 1
-				})
-				this.isSell = true
+				console.log(item.categoryId)
+				let noStockCheckCategoryIds = [
+					'1889837335015636994',
+					'1889837859597238273',
+					'1909434886438043649'
+				];
+
+				if (item.stockQuantity == 0 && !noStockCheckCategoryIds.includes(item.categoryId)) {
+					uni.showToast({
+						icon: 'none',
+						title: '上架商品,库存不能为0'
+					})
+				} else {
+					this.sellProducts.push({
+						productId: item.productId,
+						productStatus: 1
+					})
+					this.isSell = true
+				}
 			},
 			sellProduct() {
 				this.$http.post("/app/product/shelves", this.sellProducts)
@@ -772,7 +787,7 @@
 								// width: 1rpx;
 								// height: 20rpx;
 								// background: #d9d9d9;
-								margin-left:  12rpx;
+								margin-left: 12rpx;
 							}
 						}