Jelajahi Sumber

选择客户

shish 2 bulan lalu
induk
melakukan
58b1e4edba

+ 10 - 2
hdApp/src/admin/custom/selectCustom.vue

@@ -70,7 +70,8 @@
     data() {
       return {
         tabIndex: 0,
-        selectStyle:1
+        selectStyle: 1,
+        option: {},
       };
     },
     computed:{
@@ -92,6 +93,7 @@
       }
     },
     onLoad(option) {
+      this.option = option || {}
       // #ifdef APP-PLUS
       if(plus.device.vendor == 'Newland'){
         this.couldScan = true
@@ -103,7 +105,7 @@
       },
     methods: {
       selectCurrent(item,scanEnv=0){
-        let style = this.option.style ? this.option.style : 1
+        let style = this.option.style != null && this.option.style !== '' ? this.option.style : 1
         this.selectStyle = style
         if(style == 1){
           //花材开单
@@ -122,6 +124,12 @@
         }else if(style == 5){
           // 发红包
           this.$util.pageTo({url: '/admin/hb/send?userId='+item.userId+'&customId='+item.id+'&customName='+item.name,type:2})
+        }else if(Number(style) === 6){
+          /** 工具-计算器选客回填,与 hdApp_calculator_pick_customer 一致(hdApp 零售:3 已用于花束开单,计算器单独用 6) */
+          try {
+            uni.setStorageSync('hdApp_calculator_pick_customer', JSON.stringify({ id: item.id, name: item.name }))
+          } catch (e) {}
+          uni.navigateBack({})
         }else{
           //无操作
         }

+ 2 - 2
hdApp/src/admin/tools/calculator.vue

@@ -287,7 +287,7 @@ import { mapActions, mapGetters } from 'vuex'
 const CALC_HISTORY_STORAGE_KEY = 'hdApp_calculator_calcHistory'
 const DISCOUNT_CUSTOM_STORAGE_KEY = 'hdApp_calculator_customDiscountZhe'
 const DISCOUNT_SELECTED_STORAGE_KEY = 'hdApp_calculator_discountZhe'
-/** 计算器选客回填:对应 selectCustom style=3 */
+/** 计算器选客回填:hdApp 零售 selectCustom 使用 style=6(style=3 为花束开单) */
 const CALCULATOR_PICK_CUSTOMER_KEY = 'hdApp_calculator_pick_customer'
 /** 与首页「快捷开单」一致:取自 loginInfo.skCustomId,界面展示名固定 */
 const SHORTCUT_CUSTOM_DISPLAY_NAME = '快捷开单'
@@ -469,7 +469,7 @@ export default {
 		},
 		pickCustomer() {
 			this.tapVoice()
-			this.$util.pageTo({url: '/admin/custom/selectCustom?style=3'})
+			this.$util.pageTo({url: '/admin/custom/selectCustom?style=6'})
 		},
 		applyPickCustomerFromStorage() {
 			try {