shish 6 сар өмнө
parent
commit
8854e4ed19

+ 4 - 0
ghsPad/src/api/custom/index.js

@@ -22,4 +22,8 @@ export const changeLevel = data => {
 
 export const debtChangeList = data => {
 	return https.get('/custom-debt-change/list', data)
+}
+
+export const getDetail = data => {
+	return https.get("/custom/detail", data);
 }

+ 10 - 9
ghsPad/src/pages/home/cash.vue

@@ -58,6 +58,7 @@ import leftGroup from './components/leftGroup.vue'
 import navComponent from './components/nav.vue'
 import loginComponent from './login.vue'
 import { checkRefresh } from '@/api/item'
+import { getDetail } from '@/api/custom'
 import { customList } from '@/api/home/index'
 import productMins from "@/mixins/product";
 import customerList from './components/customerList.vue'
@@ -94,7 +95,7 @@ export default {
 
 		this.beginRemind()
 
-		//这个页面有二个这方法,不能去掉,不然会造成:全部缓存清了,点选客没有客户可选
+		//这个页面有二个这个方法,不要去掉,不然会造成:全部缓存清了,点选客没有客户可选
 		this.getCustomData()
 	},
 	onUnload() {
@@ -107,10 +108,7 @@ export default {
 			this.isLogin = 0
 		} else {
 			this.isLogin = 1
-
 			if (this.getLoginInfo.skCustomId && this.getLoginInfo.skCustomId > 0) {
-				// 遍历 customList 通过 skCustomId 找到对应的客户信息
-				this.custom = this.customList.find(item => item.id == this.getLoginInfo.skCustomId)
 				this.customId = this.getLoginInfo.skCustomId
 				this.customName = '快捷开单'
 				//世纪花都、龙岩小林鲜花要自动弹出客户列表,多个地方要同步修改,关键词sj_pop_auto
@@ -137,10 +135,7 @@ export default {
 			handler(newValue) {
 				if (this.$util.isEmpty(newValue.admin) == false && newValue.admin.currentShopId > 0) {
 					this.isLogin = 1
-
 					if (newValue.skCustomId && newValue.skCustomId > 0) {
-						// 遍历 customList 通过 skCustomId 找到对应的客户信息
-						this.custom = this.customList.find(item => item.id == newValue.skCustomId)
 						this.customId = newValue.skCustomId
 						this.customName = '快捷开单'
 						//世纪花都、龙岩小林鲜花要自动弹出客户列表,多个地方要同步修改,关键词sj_pop_auto
@@ -148,7 +143,6 @@ export default {
 							this.showCustomPop()
 						}
 					}
-
 				} else {
 					this.isLogin = 0
 				}
@@ -157,7 +151,7 @@ export default {
 	},
 	methods: {
 		init() {
-			//这个页面有二个这方法,不能去掉,不然会造成:全部缓存清了,点选客没有客户可选
+			//这个页面有二个这个方法,不要去掉,不然会造成:全部缓存清了,点选客没有客户可选
 			this.getCustomData()
 		},
 		getCustomData() {
@@ -171,6 +165,13 @@ export default {
 					}
 				}
 			})
+			if(this.getLoginInfo.skCustomId && this.getLoginInfo.skCustomId > 0){
+				getDetail({id:this.getLoginInfo.skCustomId}).then(res=>{
+					if(res.code == 1){
+						this.custom = res.data?res.data:{}
+					}
+				})
+			}
 		},
 		fastCreate() {
 			this.$refs.myCustomRef.close()