|
@@ -58,6 +58,7 @@ import loginComponent from './login.vue'
|
|
|
import { checkRefresh } from '@/api/item'
|
|
import { checkRefresh } from '@/api/item'
|
|
|
import productMins from "@/mixins/product";
|
|
import productMins from "@/mixins/product";
|
|
|
import { customList } from '@/api/home/index'
|
|
import { customList } from '@/api/home/index'
|
|
|
|
|
+import { getDetail } from '@/api/custom'
|
|
|
import customerList from './components/customerList.vue'
|
|
import customerList from './components/customerList.vue'
|
|
|
export default {
|
|
export default {
|
|
|
name: "cash",
|
|
name: "cash",
|
|
@@ -124,8 +125,6 @@ export default {
|
|
|
}else{
|
|
}else{
|
|
|
this.isLogin = 1
|
|
this.isLogin = 1
|
|
|
if(this.getMyShopInfo.defaultCustomId && this.getMyShopInfo.defaultCustomId > 0){
|
|
if(this.getMyShopInfo.defaultCustomId && this.getMyShopInfo.defaultCustomId > 0){
|
|
|
- // 遍历 customList 通过 defaultCustomId 找到对应的客户信息
|
|
|
|
|
- this.custom = this.customList.find(item=>item.id == this.getMyShopInfo.defaultCustomId)
|
|
|
|
|
this.customId = Number(this.getMyShopInfo.defaultCustomId)
|
|
this.customId = Number(this.getMyShopInfo.defaultCustomId)
|
|
|
this.customName = '快捷开单'
|
|
this.customName = '快捷开单'
|
|
|
this.balance = 0
|
|
this.balance = 0
|
|
@@ -144,11 +143,11 @@ export default {
|
|
|
},
|
|
},
|
|
|
getMyShopInfo:{
|
|
getMyShopInfo:{
|
|
|
handler(newValue) {
|
|
handler(newValue) {
|
|
|
- // 遍历 customList 通过 defaultCustomId 找到对应的客户信息
|
|
|
|
|
- this.custom = this.customList.find(item=>item.id == newValue.defaultCustomId)
|
|
|
|
|
this.customId = newValue.defaultCustomId && newValue.defaultCustomId > 0 ? Number(newValue.defaultCustomId):0
|
|
this.customId = newValue.defaultCustomId && newValue.defaultCustomId > 0 ? Number(newValue.defaultCustomId):0
|
|
|
this.customName = '快捷开单'
|
|
this.customName = '快捷开单'
|
|
|
this.balance = 0
|
|
this.balance = 0
|
|
|
|
|
+ //获取快捷开单的客户信息,用于获取跑腿的地址信息
|
|
|
|
|
+ this.getDefaultCustomId(this.customId)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -177,6 +176,15 @@ export default {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ getDefaultCustomId(defaultCustomId){
|
|
|
|
|
+ if(Number(defaultCustomId) > 0){
|
|
|
|
|
+ getDetail({userId:defaultCustomId}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ this.custom = res.data ? res.data : {}
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
showCustomPop(){
|
|
showCustomPop(){
|
|
|
this.$refs.myCustomRef.open('top')
|
|
this.$refs.myCustomRef.open('top')
|
|
|
},
|
|
},
|