Browse Source

批发端启用功能

shish 4 năm trước cách đây
mục cha
commit
25b0268344

+ 2 - 1
ghsApp/src/admin/ptItem/components/Item.vue

@@ -6,7 +6,8 @@
 		<view class="cmd-info_bx">
 		<view class="cmd-info_bx">
 			<view class="tit">{{ info.name || "" }}</view>
 			<view class="tit">{{ info.name || "" }}</view>
 			<view class="kc">{{info.className}}
 			<view class="kc">{{info.className}}
-				<text v-if="info.select == 2 && info.is_delete == 1" style="color:#1f1cc0;float:right;margin-right:80upx;">启用</text>
+				<text v-if="info.select == 2 && info.is_delete == 1" style="position:absolute;right:245upx;color:red;">已停用</text>
+				<text v-if="info.select == 2 && info.is_delete == 1" style="color:#1f1cc0;float:right;margin-right:103upx;">启用</text>
 				<text v-else-if="info.select == 2" style="color:#1f1cc0;float:right;margin-right:80upx;">已导入</text>
 				<text v-else-if="info.select == 2" style="color:#1f1cc0;float:right;margin-right:80upx;">已导入</text>
 				<text v-else style="color:green;float:right;margin-right:80upx;">选择</text>
 				<text v-else style="color:green;float:right;margin-right:80upx;">选择</text>
 			</view>
 			</view>

+ 16 - 13
ghsApp/src/admin/ptItem/itemList.vue

@@ -92,21 +92,24 @@ export default {
 			});
 			});
 		},
 		},
 		selectItem(item){
 		selectItem(item){
+			let that = this
 			if(item.select == 2 && item.is_delete == 1){
 			if(item.select == 2 && item.is_delete == 1){
-				let form = JSON.parse(JSON.stringify(this.form))
-				updateProduct({...form,id: item.ghs_item_id, delStatus: 0}).then(res => {
-					uni.hideLoading()
-					if(res.code == 1){
-						this.$msg("操作成功!");
-					}
-				});
-				return
-			}
-			if(item.select == 2){
-				this.$msg("已导入")
-				return
+				that.$util.confirmModal({content:'确认启用?'},() => {
+					let form = JSON.parse(JSON.stringify(this.form))
+					updateProduct({...form,id: item.ghs_item_id, delStatus: 0}).then(res => {
+						uni.hideLoading()
+						if(res.code == 1){
+							this.$msg("成功启用")
+						}
+					})
+				})
+			}else{
+				if(item.select == 2){
+					this.$msg("已导入")
+					return
+				}
+				this.$util.pageTo({ url: '/admin/item/detail',type:2,query:{ptItemId:item.id}})
 			}
 			}
-			this.$util.pageTo({ url: '/admin/item/detail',type:2,query:{ptItemId:item.id}})
 		},
 		},
 		affirm(val) {
 		affirm(val) {
 			if (val.index === 0) {
 			if (val.index === 0) {