Commit b59d4030 by liimin

Merge branch 'feature/rework' of http://192.168.3.233:8090/monorepo/venus into feature/rework

2 parents d25aea67 bacea7a0
...@@ -167,14 +167,15 @@ ...@@ -167,14 +167,15 @@
stateCustomerInfo.carModel = (item as UTSJSONObject).name stateCustomerInfo.carModel = (item as UTSJSONObject).name
stateCustomerInfo.carModelId = (item as UTSJSONObject).id stateCustomerInfo.carModelId = (item as UTSJSONObject).id
if (props.linkage) { if (props.linkage) {
recordService.updateBusinessData({ const businessData: UTSJSONObject = {
carBrand: selectItemVal.carChildsBrandName, carBrand: selectItemVal.carChildsBrandName,
carBrandId: selectItemVal.carChildsBrandId, carBrandId: selectItemVal.carChildsBrandId,
oneCarBrand: selectItemVal.carBrand, oneCarBrand: selectItemVal.carBrand,
oneCarBrandId: selectItemVal.carBrandId, oneCarBrandId: selectItemVal.carBrandId,
carModel: (item as UTSJSONObject).name, carModel: (item as UTSJSONObject).name,
carModelId: (item as UTSJSONObject).id carModelId: (item as UTSJSONObject).id
}) } as UTSJSONObject
recordService.updateBusinessData(businessData)
// dispatch('setCustomerInfo', stateCustomerInfo) // dispatch('setCustomerInfo', stateCustomerInfo)
dispatch('updateViewKey') dispatch('updateViewKey')
dispatch('setCurrentCarInfo', selectItemVal) dispatch('setCurrentCarInfo', selectItemVal)
......
...@@ -414,8 +414,8 @@ ...@@ -414,8 +414,8 @@
} }
function open(): void { function open(): void {
recordService.getBusinessData().then(data =>{ recordService.getBusinessData().then((data: any) =>{
const customerInfo = data as UTSJSONObject const customerInfo = (data != null ? data as UTSJSONObject : null)
if (customerInfo != null) { if (customerInfo != null) {
formData.value = { formData.value = {
customerName: customerInfo.customerName != null && customerInfo.customerName != 'null' ? customerInfo.customerName : '', customerName: customerInfo.customerName != null && customerInfo.customerName != 'null' ? customerInfo.customerName : '',
......
...@@ -69,21 +69,11 @@ function getMidleClass(item: AccountItem): string { ...@@ -69,21 +69,11 @@ function getMidleClass(item: AccountItem): string {
return 'midle_5' return 'midle_5'
} }
function get4SStoreList(loginUserObj: AccountItem): void { function get4SStoreList(loginUserObj: UTSJSONObject): void {
console.log('get4SStoreList:', loginUserObj) console.log('get4SStoreList:', loginUserObj)
if (loginUserObj.isSuper == true) { if (loginUserObj.isSuper == true) {
// 转换为 UTSJSONObject emit('chooseAccount', loginUserObj)
const userInfoObj: UTSJSONObject = {
uuid: loginUserObj.uuid,
merchantName: loginUserObj.merchantName,
merchantId: loginUserObj.merchantId,
isSuper: loginUserObj.isSuper,
userType: loginUserObj.userType,
loginRole: loginUserObj.loginRole,
active: loginUserObj.active
}
emit('chooseAccount', userInfoObj)
return return
} }
...@@ -108,13 +98,7 @@ function get4SStoreList(loginUserObj: AccountItem): void { ...@@ -108,13 +98,7 @@ function get4SStoreList(loginUserObj: AccountItem): void {
const storeMerchantId = store['merchantId'] as string | null const storeMerchantId = store['merchantId'] as string | null
const userInfoWithStore: UTSJSONObject = { const userInfoWithStore: UTSJSONObject = {
uuid: loginUserObj.uuid, ...loginUserObj,
merchantName: loginUserObj.merchantName,
merchantId: loginUserObj.merchantId,
isSuper: loginUserObj.isSuper,
userType: loginUserObj.userType,
loginRole: loginUserObj.loginRole,
active: loginUserObj.active,
shopMerchantName: storeMerchantName, shopMerchantName: storeMerchantName,
shopMerchantId: storeMerchantId, shopMerchantId: storeMerchantId,
default4SStoreInfo: { default4SStoreInfo: {
...@@ -138,17 +122,7 @@ function get4SStoreList(loginUserObj: AccountItem): void { ...@@ -138,17 +122,7 @@ function get4SStoreList(loginUserObj: AccountItem): void {
icon: 'none' icon: 'none'
}) })
} else { } else {
// 转换为 UTSJSONObject emit('chooseAccount', loginUserObj)
const userInfoObj: UTSJSONObject = {
uuid: loginUserObj.uuid,
merchantName: loginUserObj.merchantName,
merchantId: loginUserObj.merchantId,
isSuper: loginUserObj.isSuper,
userType: loginUserObj.userType,
loginRole: loginUserObj.loginRole,
active: loginUserObj.active
}
emit('chooseAccount', userInfoObj)
} }
} }
} else { } else {
...@@ -191,7 +165,9 @@ function selectAccountLogin(id: string, merchantName: string, userInfo: AccountI ...@@ -191,7 +165,9 @@ function selectAccountLogin(id: string, merchantName: string, userInfo: AccountI
const loginUserInfoListData = data['loginUserInfoList'] as any[] | null const loginUserInfoListData = data['loginUserInfoList'] as any[] | null
if (loginUserInfoListData != null && loginUserInfoListData.length > 0 && userInfo != null) { if (loginUserInfoListData != null && loginUserInfoListData.length > 0 && userInfo != null) {
console.log('开始获取4S店列表') console.log('开始获取4S店列表')
get4SStoreList(userInfo) console.log(loginUserInfoListData)
let info = loginUserInfoListData[0] as UTSJSONObject
get4SStoreList(info)
} else { } else {
uni.showToast({ uni.showToast({
title: '获取4S店列表失败', title: '获取4S店列表失败',
......
...@@ -50,7 +50,6 @@ function jump(info: UTSJSONObject, data: any | null): void { ...@@ -50,7 +50,6 @@ function jump(info: UTSJSONObject, data: any | null): void {
return; return;
} }
jumpTimer = now; jumpTimer = now;
console.log("跳转进入首页!"); console.log("跳转进入首页!");
uni.hideLoading(); uni.hideLoading();
...@@ -84,7 +83,6 @@ function jump(info: UTSJSONObject, data: any | null): void { ...@@ -84,7 +83,6 @@ function jump(info: UTSJSONObject, data: any | null): void {
} else { } else {
info.channelType = 1; info.channelType = 1;
} }
storage.set("userInfo", info, 0); storage.set("userInfo", info, 0);
const sceneType = info.sceneType as null | number; const sceneType = info.sceneType as null | number;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!