shish 3 лет назад
Родитель
Сommit
3e604233e6

+ 6 - 1
hdPad/src/mixins/product.js

@@ -205,7 +205,12 @@ export default {
 			this.customData = copyObject(info)
 			this.$nextTick(()=>{
 				if(this.currentJobType == 'bill'){
-					this.customData.unitPrice =	this.customData.bigPrice;
+					if(info.action && info.action == 'update'){
+						//已选列表修改花材
+						this.customData.unitPrice =	this.customData.unitPrice;
+					}else{
+						this.customData.unitPrice =	this.customData.bigPrice;
+					}
 				}
 			})
 		},

+ 16 - 2
hdPad/src/pages/home/components/leftArea.vue

@@ -3,7 +3,7 @@
         <view class="title">列表</view>
         <view class="itemList-item_box">
             <view v-for="item in selectList" :key="item.id" class="show-item_box">
-                <view class="item-body_box not-active">
+                <view class="item-body_box not-active" @click="popAddModelFn(item)">
                     <view class="flower-name_box">
                         <view class="current-item-title"><text class="name">{{item.name}}</text><text @click.stop="delItem(item)" class="del">删除</text></view>
                     </view>
@@ -29,13 +29,20 @@
             </view>
             <view> 合计 <text style="margin-left:5upx;">¥{{allPrice}}</text> </view>
         </view>
+
+        <!-- 开单选花材输入数量和金额 -->
+        <uni-popup ref="selectNumPriceRef" background-color="#fff" type="center" :animation="false">
+            <selectNumPrice @confirmAddItemModel="confirmAddItemModel" :customData.sync="customData" @addToClear="addToClear" @cancelKdSelectNumPrice="addItemModelHidden"></selectNumPrice>
+        </uni-popup>
+
     </view>
 </template>
 <script>
 import productMins from "@/mixins/product";
+import selectNumPrice from './selectNumPrice.vue'
 export default {
     name:'leftItem',
-    components:{},
+    components:{selectNumPrice},
 	mixins: [productMins],
 	props: {
         changeCurrentJobType:{
@@ -68,6 +75,13 @@ export default {
         }
     },
     methods:{
+		popAddModelFn(info) {
+            let currentNum = info.currentNum
+            let unitPrice = info.unitPrice
+            let unitType = info.unitType
+            this.$util.hitVoice()
+			this.showAddModelFn({ ...info, currentNum: currentNum, unitPrice: unitPrice,unitType:unitType,action:'update'})
+		},
         delItem(item){
             this.$util.hitVoice()
             item.currentNum = 0

+ 10 - 3
hdPad/src/pages/home/components/selectNumPrice.vue

@@ -76,8 +76,16 @@ export default {
                     let smallStockNum = smallCount*newData.ratio
                     this.smallStockNum = smallStockNum.toFixed(2)
                     this.smallStockNum = parseFloat(this.smallStockNum)
-                    this.unitPrice = newData.bigPrice ? parseFloat(newData.bigPrice) : 0
-                    this.unitName = newData.bigUnit
+
+                    if(newData.action && newData.action == 'update'){
+                        //已选列表修改花材
+                        this.unitPrice = newData.unitPrice ? parseFloat(newData.unitPrice) : 0
+                        this.unitName = newData.unitName ? newData.unitName : '扎'
+                        this.unitType = newData.unitType
+                    }else{
+                        this.unitPrice = newData.bigPrice ? parseFloat(newData.bigPrice) : 0
+                        this.unitName = newData.bigUnit
+                    }
 
                     //打开花材时默认数量选中可修改
 					this.checkType= 0
@@ -184,7 +192,6 @@ export default {
 				this.fillType = 1
 			}
 
-
             this.unitType = 0
         },
         changeUnitType(){