shish 3 лет назад
Родитель
Сommit
35ea5dad19
2 измененных файлов с 2 добавлено и 71 удалено
  1. 0 4
      ghsApp/src/admin/item/components/item.vue
  2. 2 67
      ghsApp/src/admin/item/list.vue

+ 0 - 4
ghsApp/src/admin/item/components/item.vue

@@ -31,7 +31,6 @@
 	</view>
 	<text class="bottom-button" @click.stop="moreAction(info)">更多</text>
 	<text class="bottom-button" @click.stop="goToStockDetail(info)">库存明细</text>
-	<text class="bottom-button" @click.stop="breakSingleItem(info)">拆 1 {{info.bigUnit}}</text>
 	<text class="bottom-button" @click.stop="doPrintLabel(info.id)">打标签</text>
 </view>
 </template>
@@ -58,9 +57,6 @@ export default {
 		},
 		goToStockDetail(item){
 			this.$util.pageTo({url: "/pagesStorehouse/stockWarn/detailed?id="+item.id+'&name='+item.name})
-		},
-		breakSingleItem(item) {
-			this.$emit('breakSingleItem', item)
 		}
 	}
 };

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

@@ -27,7 +27,7 @@
 							<view v-if="classItem.child && !$util.isEmpty(classItem.child)">
 								<template v-for="(productItem, productIndex) in classItem.child">
 									<view style="height:255upx" :id="`class_${classIndex}`" :key="productIndex">
-										<ItemStock v-if="classItem.isActive" :info="productItem" @moreAction="moreAction" @breakSingleItem="breakSingleItem" @doPrintLabel="doPrintLabel" >
+										<ItemStock v-if="classItem.isActive" :info="productItem" @moreAction="moreAction" @doPrintLabel="doPrintLabel" >
 										</ItemStock>
 									</view>
 								</template>
@@ -60,18 +60,6 @@
 		</template>
 		</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">
 			<view style="display:flex;padding:20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 
@@ -91,7 +79,6 @@
 				<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="breakMore()">拆散</button></view>
 				<view style="width:100vw;margin-top:8upx;"><button @click="shareItem()">分享</button></view>
 				<view style="width:100vw;margin-top:8upx;"><button @click="getHdPosterFn()">分享海报(花店)</button></view>
 				<view style="width:100vw;margin-top:8upx;"><button @click="getSkPosterFn()">分享海报(散客)</button></view>
@@ -121,7 +108,7 @@ import productMins from "@/mixins/product";
 import { mapGetters } from "vuex";
 import { getWeixinId } from "@/api/invite/index";
 import { print } from '@/api/product';
-import { breakItem,getHdPoster,getSkPoster } from '@/api/item'
+import { getHdPoster,getSkPoster } from '@/api/item'
 import uniPopup from '@/uni_modules/uni-popup/components/uni-popup/uni-popup.vue';
 import ModalModule from "@/components/plugin/modal"
 export default {
@@ -148,9 +135,6 @@ export default {
 			printFocus:false,
 			warning:0,
 			currentInfo:{},
-			breakNum:'',
-			breakFocus:false,
-			breakShow:false,
 			posterUrl:''
 		};
 	},
@@ -172,13 +156,6 @@ export default {
 		})
 	},
 	methods: {
-		breakSingleItem(item){
-			let that = this
-			this.breakNum = 1
-			that.$util.confirmModal({content:'确定拆1'+item.bigUnit+'?'},() => {
-				that.breakAction()
-			})
-		},
 		closePoster(){
 			this.$refs.posterShow.close()
 		},
@@ -223,48 +200,6 @@ export default {
 				}
 			});
 		},
-		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.breakFocus = true
-		},
 		changeClass(index){
 			this.$refs.selectFlowerNumRef.close()
 			this.swichClass(index)