瀏覽代碼

花束开单

shish 11 月之前
父節點
當前提交
d4910a800a
共有 2 個文件被更改,包括 3 次插入74 次删除
  1. 2 31
      hdApp/src/admin/billing/components/app-commodity2.vue
  2. 1 43
      hdApp/src/admin/billing/hs.vue

+ 2 - 31
hdApp/src/admin/billing/components/app-commodity2.vue

@@ -7,27 +7,20 @@
 				</view>
 			</block>
 			<image :src="info.cover" lazy-load="true" :lazy-load-margin="0"></image>
-			<view style="width:30upx;height:30upx;top:0upx;left:0upx;position: absolute;" @click.stop="delProduct(info)"> </view>
 		</view>
 		<view class="cmd-info_bx">
 			<view class="tit" >
 				<text style="font-size:22upx;border:1upx solid #3385ff;color:white;background-color:#3385ff;margin-right:5upx;padding-left:5upx;padding-right:5upx;" 
 				v-if="info.frontHide && info.frontHide == 1">隐</text>
-				<text style="font-size:22upx;border:1upx solid #3385ff;color:white;background-color:#3385ff;margin-right:5upx;padding-left:5upx;padding-right:5upx;" 
-				v-if="info.presell == 1">预售</text>
 				{{ info.name || "" }}
-				<text v-if="info.variety && info.variety ==1" class="show-color"></text>
 			</view>
-			<view class="kc" style="position:absolute;top:55upx;z-index:99" @click.stop="copyCreate()">		
+			<view class="kc" style="position:absolute;top:55upx;z-index:99">
 				<block v-if="info.ratioType == 0">{{info.ratio}}{{info.smallUnit}}/{{info.bigUnit}}</block>
 				<block v-else>若干{{info.smallUnit}}/{{info.bigUnit}}</block>
 			</view>
 			<view class="kc num-open_bx flex-end">
 				<view class="price" style="position:absolute;top:55upx;font-weight:bold;">
 					¥{{ parseFloat(info.price) }}
-					<text v-if="info.reachNum && info.reachNum>0 && info.reachNumDiscount && info.reachNumDiscount>0" style="font-weight:normal;color:#3385FF;margin-left:20upx;">
-						满{{info.reachNum}}↓{{info.reachNumDiscount?parseFloat(info.reachNumDiscount):0}}
-					</text>
 				</view>
 				<view style="text-align: right;margin-right:20upx;" >
 					<view class="open-bx" >
@@ -47,7 +40,7 @@
 </template>
 <script>
 export default {
-	name: "Commodity",
+	name: "app-commodity2",
 	components: {},
 	mixins: [],
 	props: {
@@ -82,7 +75,6 @@ export default {
 	},
 	data() {
 		return {
-			ifFocus:false,
 			bigCount:0,
 			smallCount:0,
 			userPrice:0,
@@ -110,34 +102,13 @@ export default {
 		this.remark = this.info.remark||''
 	},
 	methods: {
-		copyCreate(){
-			this.pageTo({url: '/admin/item/copy?id='+this.info.id})
-		},
-		delProduct(info){
-			this.$emit("delProduct", info)
-		},
 		addItemFn () {
-			if(this.info && this.info.variety == 1 && this.selectJobType == 'bill'){
-				//小菊多颜色选择页
-				this.$emit("goToSpecialVariety", this.info);
-				return false
-			}
 			this.$emit("replaceItemFn", this.info,0,'add')
 		},
 		reduceItemFn() {
-			if(this.info && this.info.variety == 1 && this.selectJobType == 'bill'){
-				//小菊多颜色选择页
-				this.$emit("goToSpecialVariety", this.info);
-				return false
-			}
 			this.$emit("replaceItemFn", this.info,0,'sub')
 		},
 		showAddModelFn() {
-			if(this.info && this.info.variety == 1 && this.selectJobType == 'bill'){
-				//小菊多颜色选择页
-				this.$emit("goToSpecialVariety", this.info);
-				return false
-			}
 			this.$emit("showAddModelFn", { ...this.info, bigCount: this.bigCount, smallCount: this.smallCount, userPrice: this.userPrice,remark:this.remark})
 		}
 	}

+ 1 - 43
hdApp/src/admin/billing/hs.vue

@@ -29,7 +29,7 @@
 				<block v-if="!$util.isEmpty(globalItemData)">
 					<view class="item_list_bx selectAll">
 						<view v-if="!$util.isEmpty(globalItemData)">
-							<template v-for="(productItem, productIndex) in globalItemData" :key="productIndex">
+							<template v-for="(productItem) in globalItemData">
 								<view class="item_list_title" v-if="productItem.className && productItem.className!=''">{{ productItem.className }}</view>
 								<view style="height: 175upx">
 									<Commondity
@@ -38,7 +38,6 @@
 										:info="productItem"
 										@showAddModelFn="showAddModelFn"
 										@replaceItemFn="replaceItemFn"
-										@goToSpecialVariety="goToSpecialVariety"
 										@delProduct="delProduct"
 									></Commondity>
 								</view>
@@ -123,7 +122,6 @@ import FooterCart from "@/components/module/app-footer-cart";
 import ModalModule from "@/components/plugin/modal";
 import { COMMODITY_TYPE } from "@/utils/declare";
 import hsMins from "@/mixins/hs";
-import { delStatusUpdate } from '@/api/product';
 import { mapGetters } from "vuex";
 export default {
 	name: "hs",
@@ -150,27 +148,8 @@ export default {
 		...mapGetters(["getLoginInfo"]),
 	},
 	onShow() {
-		//小菊等多颜色
-		if(this.xjData.hasUpdate == 1){
-			this.customData = this.xjDataInfo
-			if(this.xjData.cancel == 1){
-				this.customData.bigCount = 0
-				this.customData.smallCount = 0
-				this.replaceItemFn(this.customData,1)
-			}else{
-				this.customData.bigCount = this.xjData.stock
-				this.customData.smallCount = 0
-				this.customData.bigPrice = this.xjData.price
-				this.customData.price = this.xjData.price
-				this.customData.itemPrice = this.xjData.price
-				this.customData.userPrice = this.xjData.price
-				this.confirmAddItemModel(this.customData)
-			}
-		}
-		this.xjData = {}
 	},
 	onLoad () {
-		let that = this
 		if(this.option.customName){
 			uni.setNavigationBarTitle({ title: this.option.customName })
 		}
@@ -195,27 +174,6 @@ export default {
 		}
 	},
 	methods: {
-		delProduct(info){
-			let that = this
-			that.$util.confirmModal({content:'确认删除?'},() => {
-				delStatusUpdate({id:info.id,delStatus:1}).then(res=>{
-					if(res.code == 1){
-						that.$msg('删除成功')
-					}
-				})
-			})
-		},
-		//小菊多颜色选择页
-		goToSpecialVariety(info){
-			this.xjDataInfo = info
-			if(info.stock <= 0){
-				uni.showToast({title:"没有库存",icon:"none"})
-			}else{
-				let userPrice = info.userPrice ? parseFloat(info.userPrice) : 0
-				let price = info.price ? parseFloat(info.price) : 0
-				this.$util.pageTo({url: "/admin/item/xj?stock="+info.stock+"&price="+price+"&customId="+this.option.customId+"&userPrice="+userPrice+"&productId="+info.id+"&ptItemId="+info.itemId})
-			}
-		},
 		selectFlowerNumFn(){
 			this.$refs.globalClassImgRef.open('top')
 		},