shish пре 5 година
родитељ
комит
5ff7a7827c

+ 9 - 13
ghs/src/service/product/index.js

@@ -19,9 +19,7 @@ list(data) {
   });
   });
 }
 }
 
 
-/** *
- * 批量修改product信息
- */
+  //批量修改product信息
  productBatchUpdate(data) {
  productBatchUpdate(data) {
   return this.request({
   return this.request({
     url: '/batch-update',
     url: '/batch-update',
@@ -30,9 +28,7 @@ list(data) {
   });
   });
  }
  }
 
 
-  /** *
-   * 新增花材  姜枫2021.06.22
-   */
+  // 新增花材  姜枫2021.06.22
   addProduct(data) {
   addProduct(data) {
       return this.request({
       return this.request({
           url: '/add',
           url: '/add',
@@ -41,13 +37,13 @@ list(data) {
       });
       });
   }
   }
 
 
-	//花材上下架
-	delStatusUpdate(data) {
-	return this.request({
-	    url: '/del-status-update',
-	    method: 'POST',
-	    data: data
-	});
+	//上下架
+	changeStatus(data) {
+    return this.request({
+        url: '/status-update',
+        method: 'POST',
+        data: data
+    });
 	}
 	}
 
 
 }
 }

+ 3 - 3
ghs/src/views/item/import.vue

@@ -366,7 +366,7 @@ export default {
         pageSize: 20,
         pageSize: 20,
         classId: this.ptRightId
         classId: this.ptRightId
       }
       }
-      this.$service.item.list(data).then(res => {
+      this.$service.product.list(data).then(res => {
         res.list.forEach(item => {
         res.list.forEach(item => {
           item.select = true
           item.select = true
           item.uname = item.name
           item.uname = item.name
@@ -378,7 +378,7 @@ export default {
         }
         }
         this.rightItemList2 = this.deepClone(this.rightItemList)
         this.rightItemList2 = this.deepClone(this.rightItemList)
         this.maxPage1 = res.moreData
         this.maxPage1 = res.moreData
-      }).catch(err => { })
+      }).catch(err => {})
     },
     },
     allSelectItem (e) {
     allSelectItem (e) {
         this.leftCheckedList = []
         this.leftCheckedList = []
@@ -620,7 +620,7 @@ export default {
       })
       })
       this.$service.item.batchAdd({ data: JSON.stringify(param) }).then(res => {
       this.$service.item.batchAdd({ data: JSON.stringify(param) }).then(res => {
 
 
-        this.$message.success('导入成功');
+        this.$message.success('添加成功');
 
 
         this.isSelect()
         this.isSelect()
       }).catch(err => { })
       }).catch(err => { })

+ 6 - 6
ghs/src/views/item/list.vue

@@ -21,8 +21,8 @@
         <span class="item-name">{{ scope.row.name }}</span>
         <span class="item-name">{{ scope.row.name }}</span>
       </template>
       </template>
 
 
-      <template #table-column-delStatus="{scope}">
-		<i class="el-icon-success" v-if="scope.row.delStatus == 0" style="color:#67C23A;font-size:19px;"></i>
+      <template #table-column-status="{scope}">
+		<i class="el-icon-success" v-if="scope.row.status == 1" style="color:#67C23A;font-size:19px;"></i>
 		<i class="el-icon-success" v-else style="color:#D1D1D1;font-size:19px;"></i>
 		<i class="el-icon-success" v-else style="color:#D1D1D1;font-size:19px;"></i>
       </template>
       </template>
 
 
@@ -83,8 +83,8 @@
 
 
       <template #slot-modify="{ scope }">
       <template #slot-modify="{ scope }">
 				<el-button type="text" @click.native.stop="replaceBtnFn(scope.row.id)" >修改</el-button>
 				<el-button type="text" @click.native.stop="replaceBtnFn(scope.row.id)" >修改</el-button>
-				<el-button type="text" v-if="scope.row.delStatus==1" @click.native.stop="setStatusFun(scope.row.id,0)" >上架</el-button>
-				<el-button type="text" v-if="scope.row.delStatus==0" @click.native.stop="setStatusFun(scope.row.id,1)" >下架</el-button>
+				<el-button type="text" v-if="scope.row.status==2" @click.native.stop="setStatusFun(scope.row.id,1)" >上架</el-button>
+				<el-button type="text" v-if="scope.row.status==1" @click.native.stop="setStatusFun(scope.row.id,2)" >下架</el-button>
 			</template>
 			</template>
 
 
 		<template #table-header-cost>
 		<template #table-header-cost>
@@ -453,8 +453,8 @@ export default {
 			this.$refs['replaceForm'].resetFields();
 			this.$refs['replaceForm'].resetFields();
 			this.addDialog = false;
 			this.addDialog = false;
 		},
 		},
-    setStatusFun(id,type){
-      this.$service.product.delStatusUpdate({id:id,delStatus:type}).then(res => {
+    setStatusFun(id,status){
+      this.$service.product.changeStatus({id:id,status:status}).then(res => {
         this.$message.success('操作成功!')
         this.$message.success('操作成功!')
         this.app.refresh()
         this.app.refresh()
       }).catch(err => {})
       }).catch(err => {})

+ 2 - 2
ghsApp/src/admin/item/list.vue

@@ -82,12 +82,12 @@ export default {
 	onShow(){
 	onShow(){
 		this.shopId = this.getMyShopInfo.id;
 		this.shopId = this.getMyShopInfo.id;
 		let type = '';
 		let type = '';
-		this.initData({ type, shopId: this.shopId,delStatus:2 });
+		this.initData({ type, shopId: this.shopId,status:0});
 	},
 	},
 	onLoad() {
 	onLoad() {
 		this.shopId = this.getMyShopInfo.id;
 		this.shopId = this.getMyShopInfo.id;
 		let type = '';
 		let type = '';
-		this.initData({ type, shopId: this.shopId,delStatus:2 });
+		this.initData({ type, shopId: this.shopId,status:0});
 	},
 	},
 
 
 	methods: {
 	methods: {

+ 2 - 2
ghsApp/src/pagesPurchase/add.vue

@@ -161,12 +161,12 @@ export default {
 	onShow(){
 	onShow(){
 		this.shopId = this.getMyShopInfo.id;
 		this.shopId = this.getMyShopInfo.id;
 		let type = '';
 		let type = '';
-		this.initData({ type, shopId: this.shopId,delStatus:2 });
+		this.initData({ type, shopId: this.shopId,status:0});
 	},
 	},
 	onLoad() {
 	onLoad() {
 		this.shopId = this.getMyShopInfo.id;
 		this.shopId = this.getMyShopInfo.id;
 		let type = '';
 		let type = '';
-		this.initData({ type, shopId: this.shopId,delStatus:2 });
+		this.initData({ type, shopId: this.shopId,status:0});
 	},
 	},
 	methods: {
 	methods: {
 		// 计算重量
 		// 计算重量

+ 4 - 13
ghsApp/src/pagesStorehouse/components/CommodityStock.vue

@@ -1,27 +1,18 @@
 <template>
 <template>
 	<view class="item-cmd_bx">
 	<view class="item-cmd_bx">
-		<!--<view class="img_bx">-->
-			<!--<app-img :src="info.cover" alt="商品图" mode="aspectFit" :height="160" />-->
-		<!--</view>-->
 		<view class="img_bx" style="background:#eeeeee">
 		<view class="img_bx" style="background:#eeeeee">
 			<image :src="info.cover" v-if="isImg"></image>
 			<image :src="info.cover" v-if="isImg"></image>
 		</view>
 		</view>
 		<navigator :url="type == STOCK_TYPE.WARN?'':`/pagesStorehouse/stockWarn/detailed?id=${info.itemId}`" class="cmd-info_bx" :class="type == STOCK_TYPE.WARN?'':'active'">
 		<navigator :url="type == STOCK_TYPE.WARN?'':`/pagesStorehouse/stockWarn/detailed?id=${info.itemId}`" class="cmd-info_bx" :class="type == STOCK_TYPE.WARN?'':'active'">
 			<view class="tit">{{ info.itemName || "" }}</view>
 			<view class="tit">{{ info.itemName || "" }}</view>
-			<view class="kc">{{ info.rank || "" }}级</view>
+			<view class="kc">{{ info.rank || "" }}级1</view>
 			<view class="num-open_bx">
 			<view class="num-open_bx">
 				<view class="price" v-if="isPrice">¥{{ info.price }}</view>
 				<view class="price" v-if="isPrice">¥{{ info.price }}</view>
-				<template v-if="isEdit">
-					<view class="open-bx warn" v-if="type == STOCK_TYPE.WARN">
-						库存 <text style="color: #FF2842;margin-left: 10rpx;font-size: 32rpx"> {{ info.stock }}</text>
-					</view>
-					<view class="open-bx" v-else-if="type == STOCK_TYPE.MANAGE">
-						库存 <text style="margin-left: 10rpx;font-size: 32rpx">{{ info.stock }}</text>
-					</view>
-				</template>
+				<view class="open-bx warn">
+					库存 <text style="margin-left: 10rpx;font-size: 32rpx"> {{ info.stock }}</text>
+				</view>
 			</view>
 			</view>
 		</navigator>
 		</navigator>
-
 	</view>
 	</view>
 </template>
 </template>
 
 

+ 1 - 1
ghsApp/src/pagesStorehouse/inventory/select.vue

@@ -183,7 +183,7 @@ export default {
 	},
 	},
 	onLoad() {
 	onLoad() {
 		let type = '';
 		let type = '';
-		this.initData({ type,delStatus:2 });
+		this.initData({ type,status:0});
 	},
 	},
 	methods: {
 	methods: {
 		//自定义数量
 		//自定义数量

+ 7 - 22
ghsApp/src/pagesStorehouse/stockWarn/manage.vue

@@ -6,18 +6,10 @@
 				<app-search-module v-if="tabs[tabIndex].name=='库存预警'" v-model="py" placeholder="输入拼音首字母查询" @input="searchFnContrapose"/>
 				<app-search-module v-if="tabs[tabIndex].name=='库存预警'" v-model="py" placeholder="输入拼音首字母查询" @input="searchFnContrapose"/>
 				<app-search-module v-else v-model="py" placeholder="输入拼音首字母查询" @input="searchFn"/>
 				<app-search-module v-else v-model="py" placeholder="输入拼音首字母查询" @input="searchFn"/>
 			</view>
 			</view>
-      <!--<view v-if="loginInfo.super" class="city-select text-line">-->
-				<!--<DorpdownSelect :menuObj.sync="menuObj" :selectItemId.sync="shopId" top="0" @selectSussess="selectSussess"></DorpdownSelect>-->
-			<!--</view>-->
 		</view>
 		</view>
 
 
 		<view v-if="tabs[tabIndex].name=='库存预警'" class="scroll-middle_bx">
 		<view v-if="tabs[tabIndex].name=='库存预警'" class="scroll-middle_bx">
-			<!--内容部分 start -->
-			<!--内容部分 start -->
 			<block v-if="!$util.isEmpty(filterProductInfoContrapose)">
 			<block v-if="!$util.isEmpty(filterProductInfoContrapose)">
-<!--				<view class="item_list_bx" v-for="(classItem, classIndex) in filterProductInfoContrapose" :key="classIndex" :id="`class_${classItem.classId}`">-->
-<!--				</view>-->
-					<!--					<text v-else>当前库存充足</text>-->
 				<scroll-view scroll-y class="item_list_bx" @scrolltolower="loadMore" lower-threshold="100" style="width: 100%">
 				<scroll-view scroll-y class="item_list_bx" @scrolltolower="loadMore" lower-threshold="100" style="width: 100%">
 					<template v-for="(productItem, productIndex) in filterProductInfoContrapose">
 					<template v-for="(productItem, productIndex) in filterProductInfoContrapose">
 						<view style="padding: 20rpx 0">
 						<view style="padding: 20rpx 0">
@@ -26,6 +18,7 @@
 							:type="tabs[tabIndex].key"
 							:type="tabs[tabIndex].key"
 							:key="productIndex"
 							:key="productIndex"
 							:info="productItem"
 							:info="productItem"
+							:isEdit="true"
 						></CommodityStock>
 						></CommodityStock>
 						</view>
 						</view>
 					</template>
 					</template>
@@ -38,21 +31,14 @@
 			</block>
 			</block>
 		</view>
 		</view>
 
 
-
-
 		<view v-else class="scroll-middle_bx">
 		<view v-else class="scroll-middle_bx">
 			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
 			<scroll-view scroll-y scroll-with-animation class="tab-view" :scroll-top="scrollTop">
 				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
 				<div v-for="(item, index) in filterProductInfo" :key="index" class="tab-bar-item" :class="[classIndex == index ? 'active' : '']" :data-current="index" @tap.stop="swichClass(index)">
 					<text>{{ item.className || "" }}</text>
 					<text>{{ item.className || "" }}</text>
 				</div>
 				</div>
 			</scroll-view>
 			</scroll-view>
-<!--			<scroll-view scroll-y class="right-box" v-if="currentTab == index" :scroll-into-view="scrollClassId">-->
-				<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" scroll-with-animation="true"
-																	@scroll="scroll_detail"
-																	lower-threshold="100"
-																	@scrolltolower="scroll_bottom">
-				<!--内容部分 start -->
-				<!--内容部分 start -->
+				<scroll-view scroll-y class="right-box" :scroll-into-view="scroll_into_view" 
+				scroll-with-animation="true" @scroll="scroll_detail" lower-threshold="100" @scrolltolower="scroll_bottom">
 				<block v-if="!$util.isEmpty(filterProductInfo)">
 				<block v-if="!$util.isEmpty(filterProductInfo)">
 					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in filterProductInfo" :key="classIndex" :id="`class_${classIndex}`">
 					<view class="item_list_bx selectAll" v-for="(classItem, classIndex) in filterProductInfo" :key="classIndex" :id="`class_${classIndex}`">
 						<view class="item_list_title" v-if="!$util.isEmpty(classItem.child)"> {{ classItem.className }}</view>
 						<view class="item_list_title" v-if="!$util.isEmpty(classItem.child)"> {{ classItem.className }}</view>
@@ -63,6 +49,7 @@
 								:isPrice="false"
 								:isPrice="false"
 								:type="tabs[tabIndex].key"
 								:type="tabs[tabIndex].key"
 								:info="productItem"
 								:info="productItem"
+								:isEdit="true"
 							></CommodityStock>
 							></CommodityStock>
 							</view>
 							</view>
 						</template>
 						</template>
@@ -76,8 +63,6 @@
 				<!--内容部分 end -->
 				<!--内容部分 end -->
 			</scroll-view>
 			</scroll-view>
 		</view>
 		</view>
-		<!-- :maskClosable="false" -->
-    <!-- <kd-entrance></kd-entrance> -->
 	</view>
 	</view>
 </template>
 </template>
 
 
@@ -110,7 +95,7 @@ export default {
 			tabIndex: 0,
 			tabIndex: 0,
 			tabs: [
 			tabs: [
 				{
 				{
-					name: "库存不足",
+					name: "库存预警",
 					key: STOCK_TYPE.WARN
 					key: STOCK_TYPE.WARN
 				},
 				},
 				{
 				{
@@ -131,7 +116,7 @@ export default {
 		if(type=="waring"){
 		if(type=="waring"){
 			this.initDataContrapose({ type, shopId: this.shopId });
 			this.initDataContrapose({ type, shopId: this.shopId });
 		}else{
 		}else{
-			this.initData({ type, shopId: this.shopId,delStatus:2});
+			this.initData({ type, shopId: this.shopId,status:0});
 		}
 		}
 
 
 	},
 	},
@@ -158,7 +143,7 @@ export default {
 					uni.hideLoading();
 					uni.hideLoading();
 					// this.initDataContrapose({ type, shopId: this.shopId });
 					// this.initDataContrapose({ type, shopId: this.shopId });
 				}else{
 				}else{
-					this.initData({ type, shopId: this.shopId,delStatus:2 });
+					this.initData({ type, shopId: this.shopId,status:0});
 				}
 				}
 			}
 			}
 		},
 		},