shish 4 ani în urmă
părinte
comite
9a1e4a6025

+ 3 - 3
hdPad/src/pages/home/cash.vue

@@ -22,8 +22,8 @@
 				</view>
 				<!-- 分类和花材图片 -->
 				<view class="all-item-area">
-					<rightGoodsArea v-if="currentProperty == 0" :customId.sync="customId"> </rightGoodsArea>
-					<rightItemArea v-else :customId.sync="customId"> </rightItemArea>
+					<rightGoodsArea v-if="currentProperty == 0" :customId.sync="customId" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"> </rightGoodsArea>
+					<rightItemArea v-else :customId.sync="customId" :changeCurrentJobType.sync="currentJobType" :changeCurrentJobId.sync="currentJobId"> </rightItemArea>
 				</view>
 				<!-- 按钮操作 -->
 				<view class="open-box">
@@ -41,7 +41,7 @@ import rightItemArea from './components/rightItemArea.vue'
 import rightGoodsArea from './components/rightGoodsArea.vue'
 import middleButton from './components/middleButton.vue'
 import customerList from './components/customerList.vue'
-import leftItem from './components/leftItem.vue'
+import leftItem from './components/leftArea.vue'
 import leftGroup from './components/leftGroup.vue'
 import casherNav from './components/nav.vue'
 import loginComponent from './login.vue'

+ 0 - 0
hdPad/src/pages/home/components/leftItem.vue → hdPad/src/pages/home/components/leftArea.vue


+ 21 - 1
hdPad/src/pages/home/components/rightGoodsArea.vue

@@ -56,7 +56,15 @@ export default {
 		customId: {
 			type: Number,
 			default: 0
-		}
+		},
+        changeCurrentJobType:{
+            type:String,
+            default:'bill'
+        },
+        changeCurrentJobId:{
+            type:Number,
+            default:0
+        }
     },
     created(){
         this.init()
@@ -67,6 +75,18 @@ export default {
                 this.currentJobId = newCustomId
             },
             immediate:true
+        },
+        changeCurrentJobType:{
+            handler(str){
+                this.currentJobType = str
+            },
+            immediate:true
+        },
+        changeCurrentJobId:{
+            handler(id){
+                this.currentJobId = Number(id)
+            },
+            immediate:true
         }
     },
     methods:{

+ 24 - 4
hdPad/src/pages/home/components/rightItemArea.vue

@@ -20,7 +20,7 @@
 
         <!-- 开单选花材输入数量和金额 -->
         <uni-popup ref="kdSelectNumPriceRef" background-color="#fff" type="center" :animation="false">
-            <kdSelectNumPrice @confirmAddItemModel="confirmAddItemModel" :customData.sync="customData" @cancelKdSelectNumPrice="addItemModelHidden"></kdSelectNumPrice>
+            <selectNumPrice @confirmAddItemModel="confirmAddItemModel" :customData.sync="customData" @cancelKdSelectNumPrice="addItemModelHidden"></selectNumPrice>
         </uni-popup>
 
     </view>
@@ -29,10 +29,10 @@
 import { showClass } from '@/api/item-class/index'
 import { showList } from '@/api/item/index'
 import productMins from "@/mixins/product";
-import kdSelectNumPrice from './selectNumPrice.vue'
+import selectNumPrice from './selectNumPrice.vue'
 export default {
     name:'rightItemArea',
-    components:{ kdSelectNumPrice },
+    components:{ selectNumPrice },
 	mixins: [productMins],
     data(){
         return {
@@ -48,7 +48,15 @@ export default {
 		customId: {
 			type: Number,
 			default: 0
-		}
+		},
+        changeCurrentJobType:{
+            type:String,
+            default:'bill'
+        },
+        changeCurrentJobId:{
+            type:Number,
+            default:0
+        }
     },
     created(){
         this.init()
@@ -59,6 +67,18 @@ export default {
                 this.currentJobId = newCustomId
             },
             immediate:true
+        },
+        changeCurrentJobType:{
+            handler(str){
+                this.currentJobType = str
+            },
+            immediate:true
+        },
+        changeCurrentJobId:{
+            handler(id){
+                this.currentJobId = Number(id)
+            },
+            immediate:true
         }
     },
     methods:{

+ 5 - 0
hdPad/src/pages/home/components/selectNumPrice.vue

@@ -52,6 +52,7 @@ export default {
             buyNum:'',
             unitPrice:'',
             unitType:0,
+            unitName:'',
             //全选类型 0 数值全选 1 价格全选 2 没有任何全选
             checkType:0,
             bigStockNum:0,
@@ -72,8 +73,10 @@ export default {
                     this.smallStockNum = smallStockNum.toFixed(2)
                     this.smallStockNum = parseFloat(this.smallStockNum)
                     this.unitPrice = newData.bigPrice ? parseFloat(newData.bigPrice) : 0
+                    this.unitName = newData.bigUnit
                 }else{
                     this.unitPrice = newData.price ? parseFloat(newData.price) : 0
+                    this.unitName = '份';
                 }
 			},
 			deep:true,
@@ -144,6 +147,7 @@ export default {
             this.customData.buyNum = this.buyNum
             this.customData.unitPrice = this.unitPrice
             this.customData.unitType = this.unitType
+            this.customData.unitName = this.unitName
             this.$emit('confirmAddItemModel', this.customData)
             this.checkType = 0
             this.fillType = 0
@@ -151,6 +155,7 @@ export default {
         changeUnitType(){
             this.unitType = this.unitType == 0 ? 1 : 0
             this.unitPrice = this.unitType == 0 ? this.customData.bigPrice : this.customData.smallPrice
+            this.unitName = this.unitType == 0 ? this.customData.bigUnit : this.customData.smallUnit
             this.unitPrice = parseFloat(this.unitPrice)
         }
     }

+ 1 - 1
hdPad/src/pages/home/make.vue

@@ -27,7 +27,7 @@
 <script>
 import { mapGetters } from "vuex";
 import rightItemArea from './components/rightItemArea.vue'
-import leftItem from './components/leftItem.vue'
+import leftItem from './components/leftArea.vue'
 import casherNav from './components/nav.vue'
 import productMins from "@/mixins/product";
 export default {

+ 1 - 1
hdPad/src/pages/home/modify.vue

@@ -26,7 +26,7 @@
 <script>
 import { mapGetters } from "vuex";
 import rightItemArea from './components/rightItemArea.vue'
-import leftItem from './components/leftItem.vue'
+import leftItem from './components/leftArea.vue'
 import productMins from "@/mixins/product";
 import { getFullInfo } from '@/api/work'
 export default {

+ 1 - 1
hdPad/src/pages/home/selectMake.vue

@@ -26,7 +26,7 @@
 <script>
 import { mapGetters } from "vuex";
 import rightGoodsArea from './components/rightGoodsArea.vue'
-import leftItem from './components/leftItem.vue'
+import leftItem from './components/leftArea.vue'
 import casherNav from './components/nav.vue'
 import productMins from "@/mixins/product"
 export default {