Explorar o código

选数量和价格

shish %!s(int64=4) %!d(string=hai) anos
pai
achega
c56b53e8eb
Modificáronse 1 ficheiros con 20 adicións e 2 borrados
  1. 20 2
      hdPad/src/pages/home/components/selectNumPrice.vue

+ 20 - 2
hdPad/src/pages/home/components/selectNumPrice.vue

@@ -78,9 +78,19 @@ export default {
                     this.smallStockNum = parseFloat(this.smallStockNum)
                     this.unitPrice = newData.bigPrice ? parseFloat(newData.bigPrice) : 0
                     this.unitName = newData.bigUnit
+
+                    //打开花材时默认数量选中可修改
+					this.checkType= 0
+					this.fillType = 0
+
                 }else{
                     this.unitPrice = newData.price ? parseFloat(newData.price) : 0
                     this.unitName = '份';
+
+                    //打开商品时默认价格选中可修改
+					this.checkType= 1
+					this.fillType = 1
+
                 }
 			},
 			deep:true,
@@ -165,8 +175,16 @@ export default {
             this.customData.unitType = this.unitType
             this.customData.unitName = this.unitName
             this.$emit('confirmAddItemModel', this.customData)
-            this.checkType = 1
-            this.fillType = 1
+
+			if(this.customData.property == 1){
+				this.checkType = 0
+				this.fillType = 0
+			}else{
+				this.checkType = 1
+				this.fillType = 1
+			}
+
+
             this.unitType = 0
         },
         changeUnitType(){