shish hace 3 años
padre
commit
d5a6e864fe

+ 9 - 9
ghsApp/src/admin/item/components/item.vue

@@ -28,9 +28,9 @@
 			</view>
 			</view>
 		</view>
 		</view>
 	</view>
 	</view>
-	<text class="bottom-button" @click.stop="moreToDo(info)">更多</text>
+	<text class="bottom-button" @click.stop="moreAction(info)">更多</text>
 	<text class="bottom-button" @click.stop="goToStockDetail(info.id)">库存明细</text>
 	<text class="bottom-button" @click.stop="goToStockDetail(info.id)">库存明细</text>
-	<text class="bottom-button" @click.stop="goToProduct(info.id)">分享</text>
+	<text class="bottom-button" @click.stop="breakSingleItem(info)">拆 1 {{info.bigUnit}}</text>
 	<text class="bottom-button" @click.stop="doPrintLabel(info.id)">打标签</text>
 	<text class="bottom-button" @click.stop="doPrintLabel(info.id)">打标签</text>
 </view>
 </view>
 </template>
 </template>
@@ -49,8 +49,8 @@ export default {
 		};
 		};
 	},
 	},
 	methods: {
 	methods: {
-		moreToDo(item){
-			this.$emit('moreToDo', item)
+		moreAction(item){
+			this.$emit('moreAction', item)
 		},
 		},
 		doPrintLabel(item){
 		doPrintLabel(item){
 			this.$emit('doPrintLabel', item)
 			this.$emit('doPrintLabel', item)
@@ -58,8 +58,8 @@ export default {
 		goToStockDetail(id){
 		goToStockDetail(id){
 			this.$util.pageTo({url: "/pagesStorehouse/stockWarn/detailed?id="+id})
 			this.$util.pageTo({url: "/pagesStorehouse/stockWarn/detailed?id="+id})
 		},
 		},
-		goToProduct(id) {
-			this.$emit('goToProduct', id)
+		breakSingleItem(item) {
+			this.$emit('breakSingleItem', item)
 		}
 		}
 	}
 	}
 };
 };
@@ -72,10 +72,10 @@ export default {
 .bottom-button{
 .bottom-button{
 	font-weight:normal;
 	font-weight:normal;
 	border:2upx solid #cccccc;
 	border:2upx solid #cccccc;
-	font-size:22upx;
+	font-size:24upx;
 	border-radius: 20upx;
 	border-radius: 20upx;
-	padding:12upx 23upx 12upx 23upx;
-	margin:0 20upx 0 0;
+	padding:13upx 23upx 13upx 23upx;
+	margin:0 15upx 0 0;
 	float:right;
 	float:right;
 	color:#aaa9a9;
 	color:#aaa9a9;
 }
 }

+ 123 - 47
ghsApp/src/admin/item/list.vue

@@ -26,8 +26,8 @@
 							<view class="item_list_title"> {{ classItem.className }}</view>
 							<view class="item_list_title"> {{ classItem.className }}</view>
 							<view v-if="classItem.child && !$util.isEmpty(classItem.child)">
 							<view v-if="classItem.child && !$util.isEmpty(classItem.child)">
 								<template v-for="(productItem, productIndex) in classItem.child">
 								<template v-for="(productItem, productIndex) in classItem.child">
-									<view style="height:250upx" :id="`class_${classIndex}`" :key="productIndex">
-										<ItemStock v-if="classItem.isActive" :info="productItem" @goToProduct="goToProduct" @moreToDo="moreToDo" @doPrintLabel="doPrintLabel" >
+									<view style="height:255upx" :id="`class_${classIndex}`" :key="productIndex">
+										<ItemStock v-if="classItem.isActive" :info="productItem" @moreAction="moreAction" @breakSingleItem="breakSingleItem" @doPrintLabel="doPrintLabel" >
 										</ItemStock>
 										</ItemStock>
 									</view>
 									</view>
 								</template>
 								</template>
@@ -60,6 +60,18 @@
 		</template>
 		</template>
 		</modal-module>
 		</modal-module>
 
 
+		<modal-module :show="breakShow" @click="breakConfirm" :maskClosable="true" title="拆散数量" padding="30rpx 30rpx" >
+		<template v-slot:content>
+			<div class="app-modal-input-wrap">
+			<div class="inp-list-line">
+				<div class="line-input">
+				<input type="number" ref="input" style="width:61.8%;text-align:center;" @blur="blur" :focus="breakFocus" v-model="breakNum" :adjust-position="false" class="inp-input" />
+				</div>
+			</div>
+			</div>
+		</template>
+		</modal-module>
+
 		<uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
 		<uni-popup ref="selectFlowerNumRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
 			<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 			<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 
 
@@ -71,7 +83,19 @@
 			</view>
 			</view>
 		</uni-popup>
 		</uni-popup>
 
 
-		<image v-if="showClassRemind" @click="hideClassRemind" style="position:absolute;width:610upx;height:699upx;top:225upx;left:80upx;z-index:9999;" :src="`${constant.imgUrl}/class_remind.png`"></image>
+		<uni-popup ref="rightShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
+			<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
+				<view style="width:100vw;"><button @click="costChange()">成本变动记录</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="priceChange()">价格变动记录</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="varietyManage()">多颜色管理</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="preSell()">预售管理</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="orderRecord()">下单记录</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="copyCreate()">复制并新建</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="shareItem()">分享</button></view>
+				<view style="width:100vw;margin-top:8upx;"><button @click="breakMore()">{{breakName}}</button></view>
+				<view style="width:100vw;margin-top:30upx;"><button @click="closeRightShow()">取消</button></view>
+			</view>
+		</uni-popup>
 
 
 	</view>
 	</view>
 </template>
 </template>
@@ -82,7 +106,8 @@ import ItemStock from "./components/item";
 import productMins from "@/mixins/product";
 import productMins from "@/mixins/product";
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
 import { getWeixinId } from "@/api/invite/index";
 import { getWeixinId } from "@/api/invite/index";
-import { print,statusUpdate } from '@/api/product';
+import { print } from '@/api/product';
+import { breakItem } from '@/api/item'
 import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
 import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
 import ModalModule from "@/components/plugin/modal"
 import ModalModule from "@/components/plugin/modal"
 export default {
 export default {
@@ -107,16 +132,18 @@ export default {
 			printLabelShow:false,
 			printLabelShow:false,
 			printNum:'',
 			printNum:'',
 			printFocus:false,
 			printFocus:false,
-			showClassRemind:false,
-			warning:0
+			warning:0,
+			breakName:'拆多份',
+			currentInfo:{},
+			breakNum:'',
+			breakFocust:false,
+			breakShow:false
 		};
 		};
 	},
 	},
 	computed:{
 	computed:{
 		...mapGetters(["getMyShopInfo","getLoginInfo"]),
 		...mapGetters(["getMyShopInfo","getLoginInfo"]),
 		...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
 		...mapGetters({ loginInfo: "getLoginInfo",dictInfo:"getDictionariesInfo" })
 	},
 	},
-	onShow(){
-	},
 	onLoad() {
 	onLoad() {
 		this.shopId = this.getMyShopInfo.id;
 		this.shopId = this.getMyShopInfo.id;
 		let type = '';
 		let type = '';
@@ -131,15 +158,61 @@ export default {
 		})
 		})
 	},
 	},
 	methods: {
 	methods: {
+		breakSingleItem(item){
+			let that = this
+			this.breakNum = 1
+			that.$util.confirmModal({content:'确定拆1'+item.bigUnit+'?'},() => {
+				that.breakAction()
+			})
+		},
+		breakMore(){
+			this.closeRightShow()
+			this.breakShow = true
+			this.breakNum = null
+			setTimeout(x => {
+				this.$nextTick(() => this.setBreakFocus())
+			}, 200)
+		},
+		breakAction(){
+			let that = this
+			breakItem({breakNum:that.breakNum,id:that.currentInfo.id}).then(res=>{
+				if(res.code == 1){
+					that.breakShow = false
+					that.breakFocus = false
+					that.$msg(res.msg)
+				}
+			})
+		},
+		breakConfirm(val){
+			let that=this;
+			if (val.index == 0) {
+				that.breakShow = false
+				that.breakFocus = false
+				return false
+			}
+			if (this.breakNum == null) {
+				that.$msg('请填写数量')
+				that.breakFocus = true
+				return false
+			}
+			if (Number(this.breakNum) <= 0) {
+				that.$msg('数量不能小于1')
+				that.breakFocus = true
+				return false
+			}
+			that.$util.confirmModal({content:'确认拆'+that.breakNum+that.currentInfo.bigUnit+'?'},() => {
+				that.breakAction()
+			})
+		},
+		setBreakFocus(){
+			this.breakFocust = true
+		},
 		changeClass(index){
 		changeClass(index){
 			this.$refs.selectFlowerNumRef.close()
 			this.$refs.selectFlowerNumRef.close()
 			this.swichClass(index)
 			this.swichClass(index)
 		},
 		},
 		selectFlowerNumFn(){
 		selectFlowerNumFn(){
 			this.$refs.selectFlowerNumRef.open('top')
 			this.$refs.selectFlowerNumRef.open('top')
-		},
-		hideClassRemind(){
-
 		},
 		},
 		blur() {
 		blur() {
 			this.printFocus = false
 			this.printFocus = false
@@ -148,32 +221,29 @@ export default {
 			this.printItemId = id
 			this.printItemId = id
 			this.printLabelShow = true
 			this.printLabelShow = true
 			this.printNum = null
 			this.printNum = null
-
 			setTimeout(x => {
 			setTimeout(x => {
-				this.$nextTick(() => this.setFocus()); // just watch out with going too fast !!!
-			}, 200);
+				this.$nextTick(() => this.setFocus())
+			}, 200)
 		},
 		},
 		setFocus() {
 		setFocus() {
 			this.printFocus = true
 			this.printFocus = true
 		},
 		},
 		dialogInputConfirm(val) {
 		dialogInputConfirm(val) {
-			console.log(val)
 			let that=this;
 			let that=this;
 			if (val.index == 0) {
 			if (val.index == 0) {
 				that.printLabelShow = false
 				that.printLabelShow = false
 				that.printFocus = false
 				that.printFocus = false
 				return
 				return
 			}
 			}
-
 			let currentNum = this.printNum
 			let currentNum = this.printNum
 			let itemId = this.printItemId
 			let itemId = this.printItemId
 			if (currentNum == null) {
 			if (currentNum == null) {
-				that.$msg('打印数量未填写')
+				that.$msg('请填写数量')
 				that.printFocus = true
 				that.printFocus = true
 				return
 				return
 			}
 			}
 			if (currentNum <= 0) {
 			if (currentNum <= 0) {
-				that.$msg('打印数量不能小于等于0')
+				that.$msg('数量不能小于1')
 				that.printFocus = true
 				that.printFocus = true
 				return
 				return
 			}
 			}
@@ -186,6 +256,7 @@ export default {
 			print({id:itemId,num:currentNum}).then(res=>{
 			print({id:itemId,num:currentNum}).then(res=>{
 				if(res.code == 1){
 				if(res.code == 1){
 					that.printLabelShow = false
 					that.printLabelShow = false
+					that.printFocus = false
 					uni.showToast({ title: '操作成功', duration: 1500 })
 					uni.showToast({ title: '操作成功', duration: 1500 })
 				} else if(res.code == 0){
 				} else if(res.code == 0){
 					that.printLabelShow = false
 					that.printLabelShow = false
@@ -194,37 +265,42 @@ export default {
 				}
 				}
 			})
 			})
 		},
 		},
-		moreToDo(item){
-			let that=this;
-			let doList = ['成本变动记录','价格变动记录','复制并新建','多颜色管理', '下单记录','预售管理']
-			uni.showActionSheet({
-				itemList: doList,
-				success: function (respond) {
-					let index = respond.tapIndex
-					if(index == 0){
-						that.pageTo({url: '/admin/changePrice/costChangeList',query: {id: item.id}})
-					}else if (index == 1) {
-						that.pageTo({url: '/admin/changePrice/changeList',query: {id: item.id}})
-					}else if (index == 2) {
-						that.pageTo({url: '/admin/item/copy',query: {id: item.id}})
-					} else if (index == 3) {
-						if(item.variety == 0){
-							that.$msg('请先开启多颜色管理')
-							return false
-						}
-						that.pageTo({url: "/admin/item/xjSelect?itemId="+item.id})
-					} else if (index == 4) {
-						that.pageTo({url: "/admin/order/itemOrder?productId="+item.id})
-					} else if (index == 5) {
-						that.pageTo({url: "/admin/item/presell?id="+item.id})
-					}else{
-
-					}
-				}
-			})
+		closeRightShow(){
+			this.$refs.rightShowMore.close()
+		},
+		costChange(){
+			this.closeRightShow()
+			this.pageTo({url: '/admin/changePrice/costChangeList?id='+this.currentInfo.id})
+		},
+		priceChange(){
+			this.closeRightShow()
+			this.pageTo({url: '/admin/changePrice/changeList?id='+this.currentInfo.id})
+		},
+		varietyManage(){
+			this.closeRightShow()
+			this.pageTo({url: "/admin/item/xjSelect?itemId="+this.currentInfo.id})
+		},
+		copyCreate(){
+			this.closeRightShow()
+			this.pageTo({url: '/admin/item/copy?id='+this.currentInfo.id})
+		},
+		orderRecord(){
+			this.closeRightShow()
+			this.pageTo({url: "/admin/order/itemOrder?productId="+this.currentInfo.id})
+		},
+		preSell(){
+			this.closeRightShow()
+			this.pageTo({url: "/admin/item/presell?id="+this.currentInfo.id})
+		},
+		moreAction(item){
+			this.breakName = '拆多'+item.bigUnit
+			this.currentInfo = item
+			this.$refs.rightShowMore.open('top')
 		},
 		},
-		goToProduct (id) {
+		shareItem() {
 			let that = this
 			let that = this
+			let id = this.currentInfo.id
+			this.closeRightShow()
 			// #ifdef MP-WEIXIN
 			// #ifdef MP-WEIXIN
 			console.log('admin/ghsProduct/detail?shopId='+ that.loginInfo.shopId+'&id=0&ghsShopAdminId='+that.loginInfo.shopAdminId+'&id='+id)
 			console.log('admin/ghsProduct/detail?shopId='+ that.loginInfo.shopId+'&id=0&ghsShopAdminId='+that.loginInfo.shopAdminId+'&id='+id)
 			uni.navigateToMiniProgram({
 			uni.navigateToMiniProgram({

+ 1 - 1
ghsApp/src/admin/item/presell.vue

@@ -35,7 +35,7 @@
           </tui-list-cell>
           </tui-list-cell>
         </div>
         </div>
         <div class="confirm-btn">
         <div class="confirm-btn">
-          <button class="admin-button-com big blue" formType="submit">添加</button>
+          <button class="admin-button-com big blue" formType="submit">保存修改</button>
         </div>
         </div>
       </form>
       </form>
 	  <mx-date-picker :show="showPicker" format="yyyy-mm-dd" type="date" :value="defaultPickerDate" :show-tips="true" @confirm="confirmPicker" @cancel="cancelPicker" />
 	  <mx-date-picker :show="showPicker" format="yyyy-mm-dd" type="date" :value="defaultPickerDate" :show-tips="true" @confirm="confirmPicker" @cancel="cancelPicker" />

+ 86 - 54
ghsApp/src/admin/item/xjSelect.vue

@@ -1,71 +1,83 @@
 <template>
 <template>
-<view class="app-content">
-  <view>
-    <form @submit="saveAllImg">
-      <div class="module-com input-line-wrap">
-		  
-      <div class="module-com input-line-wrap goods-wrap">
-        <div class="module-tit">
-          <span>选择图片</span>
-          <span class="app-color-3">(最多可选9张)</span>
-        </div>
-        <div class="module-det">
-          <htz-image-upload :max="9" :compress="true" v-model="xjImgData" :headers="headers"
-           @uploadSuccess="imgUploadSuccess" :quality="60" @imgDelete="imgDeleteFn" :action="getLoginInfo.imgUploadApi">
-          </htz-image-upload>
-        </div>
-      </div>
-      <view style="text-align:center;">
-		<button class="admin-button-com big blue" style="width:95%;" formType="submit">全部提交</button>
-      </view>
-	  </div>
-	</form>
-	</view>
+	<view class="app-content">
 
 
-	<view style="text-align:center;border-top:1upx dashed #cccccc;padding-top:30upx;padding-bottom:20upx;">
-	</view>
+	<view>
 
 
-	<view style="margin-bottom:18upx;font-size:28upx;text-align:center;font-weight:bold;color:red;">注意:-1 表示库存充足</view>
+		<form @submit="saveAllImg">
+		<div class="module-com input-line-wrap">
 
 
-	<view class="billing_box_bg">
-		<view class="scroll-middle_bx">
-			<block>
-				<view class="item_list_bx"  style="width: 100%">
-					<view v-for="(xjItem,xjIndex) in xjList" :key="xjIndex">
-						<view style="height:190upx;">
-							<view class="item-cmd_bx">
-								<view class="img_bx" style="background:#eeeeee" @click="previewImage(xjItem.bigCover)">
-									<image :src="xjItem.cover"></image>
-								</view>
-								<view class="cmd-info_bx">
-									<view class="tit">{{ xjItem.name || "" }}</view>
-									<view class="kc"></view>
-									<view class="num-open_bx">
-										<view class="open-bx warn" @tap.stop.prevent>
-											<input type="number" v-model="xjItem.stock" 
-											style="width:230upx;border:1upx solid #cccccc;position:absolute;top:80upx;left:230upx;height:60upx;font-size:30upx;" placeholder="请填写数量" />
-											<text v-if="xjItem.stock!='' && Number(xjItem.stock) == 0" 
-											style="position:absolute;top:90upx;left:510upx;font-size:30upx;color:red;font-weight:bold;">下架</text>
+			<tui-list-cell class="line-cell" :hover="false">
+			<div class="tui-title">启用状态</div>
+			<view>
+				<switch style="transform:scale(0.7,0.7)" :checked="variety == 0 ? false : true" @change="varietyChangeFn" />
+				<text v-if="variety == 0">停用</text><text v-else>启用</text>
+			</view>
+			</tui-list-cell>
+
+		<div class="module-com input-line-wrap goods-wrap">
+			<div class="module-tit">
+			<span>选择图片</span>
+			<span class="app-color-3">(每次最多可选9张上传)</span>
+			</div>
+			<div class="module-det">
+			<htz-image-upload :max="9" :compress="true" v-model="xjImgData" :headers="headers"
+			@uploadSuccess="imgUploadSuccess" :quality="60" @imgDelete="imgDeleteFn" :action="getLoginInfo.imgUploadApi">
+			</htz-image-upload>
+			</div>
+		</div>
+		<view style="text-align:center;">
+			<button class="admin-button-com big blue" style="width:95%;" formType="submit">全部提交</button>
+		</view>
+		</div>
+		</form>
+		</view>
+
+		<view style="text-align:center;border-top:1upx dashed #cccccc;padding-bottom:10upx;"></view>
+
+		<view style="margin-bottom:18upx;font-size:28upx;text-align:center;font-weight:bold;color:red;">-1 表示库存充足,其它值表示剩余库存</view>
+
+		<view class="billing_box_bg">
+			<view class="scroll-middle_bx">
+				<block>
+					<view class="item_list_bx"  style="width: 100%">
+						<view v-for="(xjItem,xjIndex) in xjList" :key="xjIndex">
+							<view style="height:190upx;">
+								<view class="item-cmd_bx">
+									<view class="img_bx" style="background:#eeeeee" @click="previewImage(xjItem.bigCover)">
+										<image :src="xjItem.cover"></image>
+									</view>
+									<view class="cmd-info_bx">
+										<view class="tit">{{ xjItem.name || "" }}</view>
+										<view class="kc"></view>
+										<view class="num-open_bx">
+											<view class="open-bx warn" @tap.stop.prevent>
+												<input type="number" v-model="xjItem.stock" 
+												style="width:230upx;border:1upx solid #cccccc;position:absolute;top:80upx;left:230upx;height:60upx;font-size:30upx;" placeholder="请填写数量" />
+												<text v-if="xjItem.stock!='' && Number(xjItem.stock) == 0" 
+												style="position:absolute;top:90upx;left:510upx;font-size:30upx;color:red;font-weight:bold;">下架</text>
+											</view>
 										</view>
 										</view>
 									</view>
 									</view>
 								</view>
 								</view>
 							</view>
 							</view>
 						</view>
 						</view>
 					</view>
 					</view>
-				</view>
-			</block>
+				</block>
+			</view>
 		</view>
 		</view>
-	</view>
 
 
-	<view class="app-footer">
-		<button class="admin-button-com big default" @click="clearXj">清空全部</button>
-		<button class="admin-button-com big blue" style="margin-left:50upx;" @click="saveAllItemNum()">保存数量</button>
-	</view>
+		<view class="app-footer">
+			<button class="admin-button-com big default" @click="clearXj">清空全部花材</button>
+			<button class="admin-button-com big blue" style="margin-left:50upx;" @click="saveAllItemNum()">保存修改</button>
+		</view>
 
 
-</view>
+	</view>
 </template>
 </template>
 <script>
 <script>
+import TuiListCell from "@/components/plugin/list-cell";
 import AppWrapperEmpty from "@/components/app-wrapper-empty"
 import AppWrapperEmpty from "@/components/app-wrapper-empty"
+import {getProductDetail } from "@/api/product";
+import { changeVariety } from "@/api/item"
 import { mapGetters } from "vuex"
 import { mapGetters } from "vuex"
 import { getFilterXj,ReplaceXj,clearAll,batchAdd,saveAllNum } from "@/api/product/xj"
 import { getFilterXj,ReplaceXj,clearAll,batchAdd,saveAllNum } from "@/api/product/xj"
 //图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
 //图片上传插件来源:https://ext.dcloud.net.cn/plugin?id=2922 已改造,不能再升级 shish 20211228
@@ -74,7 +86,8 @@ export default {
 	name: "xj",
 	name: "xj",
 	components: {
 	components: {
 		AppWrapperEmpty,
 		AppWrapperEmpty,
-		htzImageUpload
+		htzImageUpload,
+		TuiListCell
 	},
 	},
 	mixins: [],
 	mixins: [],
 	data() {
 	data() {
@@ -85,7 +98,8 @@ export default {
 			numList:[],
 			numList:[],
 			uploadXjImg:[],
 			uploadXjImg:[],
 			xjImgData:[],
 			xjImgData:[],
-			headers:{token:''}
+			headers:{token:''},
+			variety:0
 		};
 		};
 	},
 	},
 	computed:{
 	computed:{
@@ -102,8 +116,26 @@ export default {
 
 
 		const token = uni.getStorageSync('token')
 		const token = uni.getStorageSync('token')
 		this.headers.token = token
 		this.headers.token = token
+
+
+		getProductDetail({ id: this.option.itemId }).then(res => {
+			if(res.code == 1){
+				this.variety = res.data.variety
+			}
+		})
+
 	},
 	},
 	methods: {
 	methods: {
+		varietyChangeFn(e){
+			let that = this
+			this.variety = e.detail.value ? 1 : 0
+			changeVariety({variety:this.variety,id:this.option.itemId}).then(res=>{
+				if(res.code == 1){
+					let msg = this.variety == 0 ? '已停用' : '已启用'
+					that.$msg(msg)
+				}
+			})
+		},
 		saveAllItemNum(){
 		saveAllItemNum(){
 			let that = this
 			let that = this
 			if(this.$util.isEmpty(this.xjList)){
 			if(this.$util.isEmpty(this.xjList)){

+ 8 - 0
ghsApp/src/api/item/index.js

@@ -1,5 +1,13 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 import https from '@/plugins/luch-request_0.0.7/request'
 
 
+export const breakItem = data => {
+	return https.post("/item/break-item", data);
+};
+
+export const changeVariety = data => {
+	return https.get('/item/change-variety', data)
+}
+
 export const getErrorPrice = data => {
 export const getErrorPrice = data => {
 	return https.get('/item/get-error-price', data)
 	return https.get('/item/get-error-price', data)
 }
 }

+ 1 - 1
ghsApp/src/pages.json

@@ -357,7 +357,7 @@
 				{"path": "add","style": {"navigationBarTitleText": "添加花材"}},
 				{"path": "add","style": {"navigationBarTitleText": "添加花材"}},
 				{"path": "copy","style": {"navigationBarTitleText": "复制花材"}},
 				{"path": "copy","style": {"navigationBarTitleText": "复制花材"}},
 				{"path": "xj","style": {"navigationBarTitleText": "请选择颜色"}},
 				{"path": "xj","style": {"navigationBarTitleText": "请选择颜色"}},
-				{"path": "xjSelect","style": {"navigationBarTitleText": "颜色管理"}},
+				{"path": "xjSelect","style": {"navigationBarTitleText": "颜色管理"}},
 				{"path": "presell","style": {"navigationBarTitleText": "预售管理"}},
 				{"path": "presell","style": {"navigationBarTitleText": "预售管理"}},
 				{"path": "rechargeHb","style": {"navigationBarTitleText": "充值活动"}}
 				{"path": "rechargeHb","style": {"navigationBarTitleText": "充值活动"}}
 			]
 			]