shish 2 сар өмнө
parent
commit
d6a88b2e29

+ 10 - 0
ghsApp/src/admin/billing/index2.vue

@@ -39,6 +39,7 @@
 										@showAddModelFn="showAddModelFn"
 										@replaceItemFn="replaceItemFn"
 										@goToSpecialVariety="goToSpecialVariety"
+										@goTree="goTree"
 										@delProduct="delProduct"
 									></Commondity>
 								</view>
@@ -218,6 +219,15 @@ export default {
 				this.$util.pageTo({url: "/admin/item/xj?stock="+info.stock+"&price="+price+"&customId="+this.option.customId+"&userPrice="+userPrice+"&productId="+info.id+"&ptItemId="+info.itemId})
 			}
 		},
+		goTree(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/tree?stock="+info.stock+"&price="+price+"&customId="+this.option.customId+"&userPrice="+userPrice+"&productId="+info.id+"&ptItemId="+info.itemId})
+			}
+		},
 		selectFlowerNumFn(){
 			this.$refs.globalClassImgRef.open('top')
 		},

+ 0 - 0
ghsApp/src/admin/item/tree.vue


+ 39 - 1
ghsApp/src/components/module/app-commodity2.vue

@@ -16,7 +16,15 @@
 				<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>
+				<block v-if="info.kind == 2">
+					<text class="show-tree"></text>
+				</block>
+				<block v-else-if="info.kind ==3">
+					<text class="show-hole"></text>
+				</block>
+				<block v-else>
+					<text v-if="info.variety && info.variety ==1" class="show-color"></text>
+				</block>
 			</view>
 			<view class="kc" style="position:absolute;top:55upx;z-index:99" @click.stop="copyCreate()">		
 				<block v-if="info.ratioType == 0">{{info.ratio}}{{info.smallUnit}}/{{info.bigUnit}}</block>
@@ -117,6 +125,10 @@ export default {
 			this.$emit("delProduct", info)
 		},
 		addItemFn () {
+			if(this.info.kind == 2){
+				this.$emit("goTree", this.info)
+				return false
+			}
 			if(this.info && this.info.variety == 1 && this.selectJobType == 'bill'){
 				//小菊多颜色选择页
 				this.$emit("goToSpecialVariety", this.info);
@@ -125,6 +137,10 @@ export default {
 			this.$emit("replaceItemFn", this.info,0,'add')
 		},
 		reduceItemFn() {
+			if(this.info.kind == 2){
+				this.$emit("goTree", this.info)
+				return false
+			}
 			if(this.info && this.info.variety == 1 && this.selectJobType == 'bill'){
 				//小菊多颜色选择页
 				this.$emit("goToSpecialVariety", this.info);
@@ -133,6 +149,10 @@ export default {
 			this.$emit("replaceItemFn", this.info,0,'sub')
 		},
 		showAddModelFn() {
+			if(this.info.kind == 2){
+				this.$emit("goTree", this.info)
+				return false
+			}
 			if(this.info && this.info.variety == 1 && this.selectJobType == 'bill'){
 				//小菊多颜色选择页
 				this.$emit("goToSpecialVariety", this.info);
@@ -200,6 +220,24 @@ export default {
 			border:none;
 			margin-left:16upx;
 		}
+		.show-tree{
+			display:inline-block;
+			width:25upx;
+			height:25upx;
+			background-color:rgb(230, 8, 19);
+			border-radius:15upx;
+			border:none;
+			margin-left:16upx;
+		}
+		.show-hole{
+			display:inline-block;
+			width:25upx;
+			height:25upx;
+			background-color:rgb(36, 103, 228);
+			border-radius:15upx;
+			border:none;
+			margin-left:16upx;
+		}
 		& .kc {
 			position: relative;
 			color: #999999;

+ 1 - 0
ghsApp/src/pages.json

@@ -451,6 +451,7 @@
 				{"path": "detail","style": {"navigationBarTitleText": "花材详情"}},
 				{"path": "add","style": {"navigationBarTitleText": "添加花材"}},
 				{"path": "copy","style": {"navigationBarTitleText": "复制新建花材"}},
+				{"path": "tree","style": {"navigationBarTitleText": "填写株数"}},
 				{"path": "xj","style": {"navigationBarTitleText": "请选择颜色"}},
 				{"path": "xjSelect","style": {"navigationBarTitleText": "多颜色"}},
 				{"path": "presell","style": {"navigationBarTitleText": "预售管理"}},