Просмотр исходного кода

Merge branch 'zhongqi-itemUpdate'

shish 2 месяцев назад
Родитель
Сommit
e63f5fc7fd

+ 46 - 1
ghsApp/src/admin/billing/index2.vue

@@ -95,8 +95,14 @@
 
 
 						<button class="admin-button-com mini-btn" @click="customData.userPrice=0.01;customData.bigCount=1" style="position:absolute;top:200upx;right:33upx;">赠送</button>
 						<button class="admin-button-com mini-btn" @click="customData.userPrice=0.01;customData.bigCount=1" style="position:absolute;top:200upx;right:33upx;">赠送</button>
 					</view>
 					</view>
+					<view class="num_bx kind-num_bx" v-if="Number(customData.kind) == 3">
+						<input style="width: 160upx;height:50upx;font-size:28upx;" v-model="kindHoleCount" type="number" placeholder="穴数" @input="calcKindCount" />
+						<text class="kind-unit">穴</text>
+						<input style="width: 160upx;height:50upx;font-size:28upx;" v-model="kindPlateCount" type="number" placeholder="盘数" @input="calcKindCount" />
+						<text class="kind-unit">盘</text>
+					</view>
 					<view class="num_bx">
 					<view class="num_bx">
-						<input style="width: 280upx;height:40upx;font-size:25upx;" v-model="customData.remark" type="text" placeholder="备注" />
+						<input style="width: 280upx;height:50upx;font-size:28upx;" v-model="customData.remark" type="text" placeholder="备注" />
 					</view>
 					</view>
 				</view>
 				</view>
 			</template>
 			</template>
@@ -145,6 +151,8 @@ export default {
 			isSmallCount:false,
 			isSmallCount:false,
 			globalCheckStock:true,
 			globalCheckStock:true,
 			autoLoad: false,
 			autoLoad: false,
+			kindHoleCount: null,
+			kindPlateCount: null,
 			xjData:{},
 			xjData:{},
 			xjDataInfo:{},
 			xjDataInfo:{},
 			treeData:{},
 			treeData:{},
@@ -154,6 +162,17 @@ export default {
 	computed: {
 	computed: {
 		...mapGetters(["getLoginInfo"]),
 		...mapGetters(["getLoginInfo"]),
 	},
 	},
+	watch: {
+		globalUnitType() {
+			this.calcKindCount()
+		},
+		isAddModel(val) {
+			if (!val) {
+				this.kindHoleCount = null
+				this.kindPlateCount = null
+			}
+		}
+	},
 	onShow() {
 	onShow() {
 		//小菊等多颜色
 		//小菊等多颜色
 		if(this.xjData.hasUpdate == 1){
 		if(this.xjData.hasUpdate == 1){
@@ -222,6 +241,23 @@ export default {
 		}
 		}
 	},
 	},
 	methods: {
 	methods: {
+		calcKindCount() {
+			if (!this.customData || Number(this.customData.kind) !== 3) {
+				return
+			}
+			const holeCount = Number(this.kindHoleCount)
+			const plateCount = Number(this.kindPlateCount)
+			if (holeCount > 0 && plateCount > 0) {
+				const totalCount = holeCount * plateCount
+				if (this.globalUnitType == 0) {
+					this.customData.bigCount = totalCount
+					this.customData.smallCount = null
+				} else {
+					this.customData.smallCount = totalCount
+					this.customData.bigCount = null
+				}
+			}
+		},
 		delProduct(info){
 		delProduct(info){
 			let that = this
 			let that = this
 			that.$util.confirmModal({content:'确认删除?'},() => {
 			that.$util.confirmModal({content:'确认删除?'},() => {
@@ -387,6 +423,15 @@ export default {
 				font-size: 40upx;
 				font-size: 40upx;
 			}
 			}
 		}
 		}
+		.kind-num_bx {
+			padding-left: 35upx;
+			.kind-unit {
+				font-size: 30upx;
+				font-weight: bold;
+				color: #666666;
+				margin-right: 24upx;
+			}
+		}
 	}
 	}
 }
 }
 .class-popup-style{
 .class-popup-style{

+ 29 - 3
ghsApp/src/admin/item/components/item2.vue

@@ -40,7 +40,16 @@
 				v-if="info.limitBuy > 0">限购{{ info.limitBuy }}份</text>
 				v-if="info.limitBuy > 0">限购{{ info.limitBuy }}份</text>
 
 
 				{{ info.name }}
 				{{ 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>
 			<view class="kc">
 			<view class="kc">
 				<text style="color:green;font-weight:normal;">¥{{ info.hjPrice?parseFloat(info.hjPrice):0 }}</text>
 				<text style="color:green;font-weight:normal;">¥{{ info.hjPrice?parseFloat(info.hjPrice):0 }}</text>
@@ -209,8 +218,7 @@ export default {
 			color: #333333;
 			color: #333333;
 			overflow: hidden;
 			overflow: hidden;
 			white-space: nowrap;
 			white-space: nowrap;
-			text-overflow: ellipsis;
-			width:330upx;
+			width: 99%;
 		}
 		}
 		.show-color{
 		.show-color{
 			display:inline-block;
 			display:inline-block;
@@ -221,6 +229,24 @@ export default {
 			border:none;
 			border:none;
 			margin-left:15upx;
 			margin-left:15upx;
 		}
 		}
+		.show-tree{
+			display:inline-block;
+			width:25upx;
+			height:25upx;
+			background-color:rgb(230, 8, 19);
+			border-radius:0;
+			border:none;
+			margin-left:16upx;
+		}
+		.show-hole{
+			display:inline-block;
+			width:0;
+			height:0;
+			border-left:14upx solid transparent;
+			border-right:14upx solid transparent;
+			border-bottom:25upx solid rgb(36, 103, 228);
+			margin-left:16upx;
+		}
 		& .kc {
 		& .kc {
 			color: red;
 			color: red;
 			font-size: 27upx;
 			font-size: 27upx;

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

@@ -47,7 +47,7 @@
         </tui-list-cell>
         </tui-list-cell>
 
 
         <tui-list-cell class="line-cell" :hover="false">
         <tui-list-cell class="line-cell" :hover="false">
-          <view class="tui-title">库存</view>
+          <view class="tui-title" style="color:#3385FF;font-weight:bold;">库存</view>
           <input v-model="form.stock" style="width:260upx;" placeholder-class="phcolor" @focus="form.stock=''" @input="changeStock($event)" class="tui-input" name="stock" placeholder="请输入" type="digit"/>
           <input v-model="form.stock" style="width:260upx;" placeholder-class="phcolor" @focus="form.stock=''" @input="changeStock($event)" class="tui-input" name="stock" placeholder="请输入" type="digit"/>
         </tui-list-cell>
         </tui-list-cell>