Commit bc4e0532 by 岑成威

fix:更新新建工单

1 parent d1d4fe2e
......@@ -417,23 +417,13 @@ Component({
}
},
getSceneList() {
const MOCK_SCENE_LIST = [
{ uuid: '100101', staffName: '精品升级', baseSceneCode: '100101', sceneType: 1, businessType: null },
{ uuid: '100102', staffName: '交新车干配', baseSceneCode: '100102', sceneType: 2, businessType: null },
{ uuid: '100103', staffName: '售后众筹', baseSceneCode: '100103', sceneType: 3, businessType: null },
{ uuid: '110101', staffName: '售前会员权益升级', baseSceneCode: '110101', sceneType: 0, businessType: 1 },
{ uuid: '110102', staffName: '售后会员权益升级', baseSceneCode: '110102', sceneType: 0, businessType: 1 },
{ uuid: '110201', staffName: '售前延保', baseSceneCode: '110201', sceneType: 0, businessType: 2 },
{ uuid: '110202', staffName: '售后延保', baseSceneCode: '110202', sceneType: 0, businessType: 2 },
{ uuid: '120101', staffName: '二手车收车', baseSceneCode: '120101', sceneType: 7, businessType: null }
]
let userInfo = wx.$util.getUserInfo()
api.getUserScene({
sceneType: String(userInfo.sceneType || ''),
phone: userInfo.phone
}).then(res => {
let { code, data } = res
let list = (code == 0 && data && data.length) ? data : MOCK_SCENE_LIST
let list = (code == 0 && data && data.length) ? data : []
this.setData({
['form.sceneList.data']: [
{ staffName: '全部', active: true, value: '' },
......@@ -446,10 +436,7 @@ Component({
})
}).catch(() => {
this.setData({
['form.sceneList.data']: [
{ staffName: '全部', active: true, value: '' },
...MOCK_SCENE_LIST.map(e => ({ ...e, value: e.baseSceneCode }))
]
['form.sceneList.data']: [{ staffName: '全部', active: true, value: '' }]
})
})
},
......
......@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 5cdptest
*/
let index = 1;
let index = 2;
const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion;
......
......@@ -114,16 +114,6 @@ Component({
*/
methods: {
getUserSceneList() {
const MOCK_SCENE_LIST = [
{ uuid: '100101', name: '精品升级', baseSceneCode: '100101', sceneType: 1, businessType: null },
{ uuid: '100102', name: '交新车干配', baseSceneCode: '100102', sceneType: 2, businessType: null },
{ uuid: '100103', name: '售后众筹', baseSceneCode: '100103', sceneType: 3, businessType: null },
{ uuid: '110101', name: '售前会员权益升级', baseSceneCode: '110101', sceneType: 0, businessType: 1 },
{ uuid: '110102', name: '售后会员权益升级', baseSceneCode: '110102', sceneType: 0, businessType: 1 },
{ uuid: '110201', name: '售前延保', baseSceneCode: '110201', sceneType: 0, businessType: 2 },
{ uuid: '110202', name: '售后延保', baseSceneCode: '110202', sceneType: 0, businessType: 2 },
{ uuid: '120101', name: '二手车收车', baseSceneCode: '120101', sceneType: 7, businessType: null }
]
const userInfo = wx.$util.getUserInfo() || {}
commonApi
.getUserScene({
......@@ -131,7 +121,7 @@ Component({
phone: userInfo.phone
})
.then(res => {
const list = res?.code == 0 && res?.data?.length ? res.data : MOCK_SCENE_LIST
const list = res?.code == 0 && res?.data?.length ? res.data : []
this.setData({
sceneColumns: list.map(item => ({
...item,
......@@ -141,7 +131,7 @@ Component({
})
.catch(() => {
this.setData({
sceneColumns: MOCK_SCENE_LIST
sceneColumns: []
})
})
},
......@@ -164,6 +154,12 @@ Component({
})
},
handleScenePicker() {
const thisPage = wx.$router.getPageInstance()
const orderInfo = thisPage?.data?.orderInfo || {}
if (orderInfo.resetOrder) {
wx.$util.showToast('场景名称不能修改')
return
}
this.getUserSceneList()
this.setData({
showSceneSelect: true
......
......@@ -33,46 +33,48 @@
</gl-cell>
</view>
<view class="box">
<!-- <view class="title">客户信息</view> -->
<view class="title">
<view>客户信息</view>
<block>
<view class="file-btn" bindtap="showCustomPop">
<gl-image webp src="/equity/file.png" class="icon"></gl-image>
客户档案
</view>
</block>
<view class="ocrBtn" data-type="idCard" bind:tap="navOcr">
<image data-type="idCard" data-ocrType="idCard" class="pictureIcon" src="/packageEquity/images/pictureIcon.png" binderror="" bindload="" />
</view>
</view>
<gl-form disable="{{disable}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{first.customerFormList}}" bindRegionChange="bindRegionChange">
<view class="gender-box" slot="ownerGender">
<block wx:if="{{serviceInfo.ownerGender}}">
<view class="block text-center {{ serviceInfo.ownerGender=='男'?'':'right' }}" />
<block wx:if="{{ orderInfo.baseSceneCode }}">
<view class="box">
<!-- <view class="title">客户信息</view> -->
<view class="title">
<view>客户信息</view>
<block>
<view class="file-btn" bindtap="showCustomPop">
<gl-image webp src="/equity/file.png" class="icon"></gl-image>
客户档案
</view>
</block>
<view class="male text-center {{ serviceInfo.ownerGender == '男'?'active':'' }}" bindtap="changeGender" data-gender="男">男</view>
<view class="woman text-center {{ serviceInfo.ownerGender == '女'?'active':'' }}" bindtap="changeGender" data-gender="女">女</view>
</view>
</gl-form>
</view>
<view class="box">
<view class="title">
<view>车辆信息</view>
<view class="ocrBtn" data-type="vehicleCertificate" bind:tap="navOcr">
<image data-type="vehicleCertificate" data-ocrType="car" class="pictureIcon" src="/packageEquity/images/pictureIcon.png" binderror="" bindload="" />
<view class="ocrBtn" data-type="idCard" bind:tap="navOcr">
<image data-type="idCard" data-ocrType="idCard" class="pictureIcon" src="/packageEquity/images/pictureIcon.png" binderror="" bindload="" />
</view>
</view>
<gl-form disable="{{disable}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{first.customerFormList}}" bindRegionChange="bindRegionChange">
<view class="gender-box" slot="ownerGender">
<block wx:if="{{serviceInfo.ownerGender}}">
<view class="block text-center {{ serviceInfo.ownerGender=='男'?'':'right' }}" />
</block>
<view class="male text-center {{ serviceInfo.ownerGender == '男'?'active':'' }}" bindtap="changeGender" data-gender="男">男</view>
<view class="woman text-center {{ serviceInfo.ownerGender == '女'?'active':'' }}" bindtap="changeGender" data-gender="女">女</view>
</view>
</gl-form>
</view>
<gl-form disable="{{disable}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bind:inputEvent="inputEvent" formDataList="{{first.carFormList}}">
<view slot="brands" class="brand" bindtap="handleJumpBrand">
<view wx:if="{{serviceInfo.carBrandId}}">
{{serviceInfo.carBrand || ''}}-{{serviceInfo.carChildsBrandName || ''}}-{{serviceInfo.carSeriesName || ''}}
<view class="box">
<view class="title">
<view>车辆信息</view>
<view class="ocrBtn" data-type="vehicleCertificate" bind:tap="navOcr">
<image data-type="vehicleCertificate" data-ocrType="car" class="pictureIcon" src="/packageEquity/images/pictureIcon.png" binderror="" bindload="" />
</view>
<view wx:else class="placeholder-class">请选择</view>
</view>
</gl-form>
</view>
<gl-form disable="{{disable}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bind:inputEvent="inputEvent" formDataList="{{first.carFormList}}">
<view slot="brands" class="brand" bindtap="handleJumpBrand">
<view wx:if="{{serviceInfo.carBrandId}}">
{{serviceInfo.carBrand || ''}}-{{serviceInfo.carChildsBrandName || ''}}-{{serviceInfo.carSeriesName || ''}}
</view>
<view wx:else class="placeholder-class">请选择</view>
</view>
</gl-form>
</view>
</block>
<Gl-Button-Group wx:if="{{subBtnShow}}" bindbtnTap="btnTap" textNameObj="{{textNameObj}}" />
</view>
<store-referrer-picker bindconfirm="handleSalesChange" show="{{referrerPicker}}" title="{{pointsMultiRole=='N'?'推荐人':'销售顾问/录单员'}}" type="1" orderObj="{{ orderObj }}" pickerListAll="{{employeeList}}" />
......
......@@ -266,16 +266,6 @@ Component({
this.getsellerUserIdList(userInfo?.shopMerchantId, 1)
},
getSceneList() {
const MOCK_SCENE_LIST = [
{ uuid: '100101', staffName: '精品升级', baseSceneCode: '100101', sceneType: 1, businessType: null },
{ uuid: '100102', staffName: '交新车干配', baseSceneCode: '100102', sceneType: 2, businessType: null },
{ uuid: '100103', staffName: '售后众筹', baseSceneCode: '100103', sceneType: 3, businessType: null },
{ uuid: '110101', staffName: '售前会员权益升级', baseSceneCode: '110101', sceneType: 0, businessType: 1 },
{ uuid: '110102', staffName: '售后会员权益升级', baseSceneCode: '110102', sceneType: 0, businessType: 1 },
{ uuid: '110201', staffName: '售前延保', baseSceneCode: '110201', sceneType: 0, businessType: 2 },
{ uuid: '110202', staffName: '售后延保', baseSceneCode: '110202', sceneType: 0, businessType: 2 },
{ uuid: '120101', staffName: '二手车收车', baseSceneCode: '120101', sceneType: 7, businessType: null }
]
let userInfo = wx.$util.getUserInfo() || {}
api
.getUserScene({
......@@ -284,7 +274,7 @@ Component({
})
.then(res => {
let { code, data } = res
let list = code == 0 && data?.length ? data : MOCK_SCENE_LIST
let list = code == 0 && data?.length ? data : []
this.setData({
['form.sceneList']: [
{ staffName: '全部', active: true, value: '' },
......@@ -299,8 +289,7 @@ Component({
.catch(() => {
this.setData({
['form.sceneList']: [
{ staffName: '全部', active: true, value: '' },
...MOCK_SCENE_LIST.map(item => ({ ...item, value: item.baseSceneCode }))
{ staffName: '全部', active: true, value: '' }
]
})
})
......
......@@ -1402,6 +1402,9 @@ Page({
["orderInfo.vdQuotationGoodsList"]: [],
["orderInfo.quotationGoodsInfoList"]: [],
});
const { orderInfo } = this.data
// 未选择场景名称时,不拉取商品列表(对齐精品升级逻辑)
if (!orderInfo?.baseSceneCode) return
this.getQuotationInfo(true); // 不重新调用详情接口 避免修改车辆价格导致重新获取详情 把数据重置了
},
getQuotationInfo(getOrderInfo, timeNum = 0) {
......@@ -1411,6 +1414,13 @@ Page({
orderInfo,
id,
} = this.data;
// 未选择场景名称时,不拉取商品列表(对齐精品升级逻辑)
if (!orderInfo?.baseSceneCode) {
if (!id) return
// 编辑态如果还没拿到详情(含 baseSceneCode),先拉详情,避免无意义的商品请求
if (!getOrderInfo) this.getOrderInfo()
return
}
// if (!price) {
// wx.$util.showLoading("加载中...");
// }
......@@ -1756,8 +1766,8 @@ Page({
id,
});
}
// 只在第一次进入调用商品查询接口
firstEnter && this.getQuotationInfo();
// 只在第一次进入调用商品查询接口(编辑态需要回显;新建态等选择/切换场景后再拉取)
if (firstEnter && id) this.getQuotationInfo();
//客户线索回显客户信息
if (customerInfo) this.setCustomerInfo(customerInfo);
this.setData({
......
......@@ -21,6 +21,7 @@
bind:updateConfig="handleUpdateConfig"
/>
<second-step
wx:if="{{ orderInfo.baseSceneCode }}"
id="SecondStep"
createAllGoodsFlag="{{ createAllGoodsFlag }}"
orderInfo="{{ orderInfo }}"
......
......@@ -26,6 +26,15 @@ const IMG_URL2 =
'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
import carLifeApi from '../../../carEquityApi'
import commonApi from '~/api/api'
function getSceneNameForQuotationItem(item) {
if (!item) return ''
return (
item.baseSceneName ||
item.sceneName ||
''
)
}
Component({
/**
* 组件的属性列表
......@@ -333,15 +342,18 @@ Component({
let { mode, merchantBrand } = this.data
console.log(merchantBrand)
// wx.$router.go(mode ? 'createOrderCarQuotationSimple' : 'createOrderCarQuotation')
if (merchantBrand?.findIndex(i => ['鸿蒙智行'].includes(i.name)) != -1) {
wx.$router.go('beforeCreate', {
mode
})
} else {
this.setData({
showPromptDialog: true
})
}
// if (merchantBrand?.findIndex(i => ['鸿蒙智行'].includes(i.name)) != -1) {
// wx.$router.go('beforeCreate', {
// mode
// })
// } else {
// this.setData({
// showPromptDialog: true
// })
// }
this.setData({
showPromptDialog: true
})
},
promptHandleConfirm(e) {
let { payFlag, payType } = e.detail
......@@ -519,6 +531,7 @@ Component({
item.payTime = item.payTime?.replace(/-/g, '/')
}
item.isTouchMove = false
item.sceneNameForList = getSceneNameForQuotationItem(item)
// onlyRepeal 战败且为超管,或者是待报价、待支付的非融合都可撤销
item.onlyRepeal =
(item.orderStatus == 2 ||
......
......@@ -273,7 +273,6 @@
align-items: center;
font-size: var(--fontSize32);
font-weight: 600;
max-width: 59%;
color: #333333;
word-break: break-all;
}
......
......@@ -121,6 +121,10 @@
</view>
</view>
</view>
<view class="order">
<view class="order-label">场景名称</view>
<view class="order-value">{{ item.baseSceneName || item.sceneNameForList || '--' }}</view>
</view>
<view class="order" wx:if="{{ item.approveStatus != null }}">
<view class="order-label">审批状态</view>
<view class="order-value">{{item.approveStatusText}}</view>
......
......@@ -147,16 +147,6 @@ Page({
})
},
getUserSceneList() {
const MOCK_SCENE_LIST = [
{ uuid: '100101', name: '精品升级', baseSceneCode: '100101', sceneType: 1, businessType: null },
{ uuid: '100102', name: '交新车干配', baseSceneCode: '100102', sceneType: 2, businessType: null },
{ uuid: '100103', name: '售后众筹', baseSceneCode: '100103', sceneType: 3, businessType: null },
{ uuid: '110101', name: '售前会员权益升级', baseSceneCode: '110101', sceneType: 0, businessType: 1 },
{ uuid: '110102', name: '售后会员权益升级', baseSceneCode: '110102', sceneType: 0, businessType: 1 },
{ uuid: '110201', name: '售前延保', baseSceneCode: '110201', sceneType: 0, businessType: 2 },
{ uuid: '110202', name: '售后延保', baseSceneCode: '110202', sceneType: 0, businessType: 2 },
{ uuid: '120101', name: '二手车收车', baseSceneCode: '120101', sceneType: 7, businessType: null }
]
const userInfo = this.data.userInfo || wx.$util.getUserInfo() || {}
commonApi
.getUserScene({
......@@ -164,7 +154,7 @@ Page({
phone: userInfo.phone
})
.then(res => {
const list = res?.code == 0 && res?.data?.length ? res.data : MOCK_SCENE_LIST
const list = res?.code == 0 && res?.data?.length ? res.data : []
this.setData({
sceneColumns: list.map(item => ({
...item,
......@@ -174,7 +164,7 @@ Page({
})
.catch(() => {
this.setData({
sceneColumns: MOCK_SCENE_LIST
sceneColumns: []
})
})
},
......
......@@ -1302,17 +1302,20 @@ Component({
(await wx.$globalDataFunction[item.beforeClick]())
)
return
if (
merchantBrand?.findIndex(i => ['鸿蒙智行'].includes(i.name)) != -1
) {
wx.$router.go('beforeCreate', {
mode
})
} else {
this.setData({
showPromptDialog: true
})
}
// if (
// merchantBrand?.findIndex(i => ['鸿蒙智行'].includes(i.name)) != -1
// ) {
// wx.$router.go('beforeCreate', {
// mode
// })
// } else {
// this.setData({
// showPromptDialog: true
// })
// }
this.setData({
showPromptDialog: true
})
}
}, 2000),
promptHandleConfirm(e) {
......
......@@ -264,7 +264,7 @@ const checkStudyTask = () => {
api.checkStudyTaskAPI().then(res => {
wx.hideLoading()
const modal = initModal()
if (modal && res.data.lockOrder) {
if (modal && res.data.lockOrder&&res.data?.lockReason !== '2') {
modal.open({
title: '未完成学习任务,暂不能开单',
type: 'permission',
......
......@@ -282,23 +282,13 @@ Component({
})
},
getSceneList() {
const MOCK_SCENE_LIST = [
{ uuid: '100101', staffName: '精品升级', baseSceneCode: '100101', sceneType: 1, businessType: null },
{ uuid: '100102', staffName: '交新车干配', baseSceneCode: '100102', sceneType: 2, businessType: null },
{ uuid: '100103', staffName: '售后众筹', baseSceneCode: '100103', sceneType: 3, businessType: null },
{ uuid: '110101', staffName: '售前会员权益升级', baseSceneCode: '110101', sceneType: 0, businessType: 1 },
{ uuid: '110102', staffName: '售后会员权益升级', baseSceneCode: '110102', sceneType: 0, businessType: 1 },
{ uuid: '110201', staffName: '售前延保', baseSceneCode: '110201', sceneType: 0, businessType: 2 },
{ uuid: '110202', staffName: '售后延保', baseSceneCode: '110202', sceneType: 0, businessType: 2 },
{ uuid: '120101', staffName: '二手车收车', baseSceneCode: '120101', sceneType: 7, businessType: null }
]
let userInfo = wx.$util.getUserInfo()
api.getUserScene({
sceneType: String(userInfo.sceneType || ''),
phone: userInfo.phone
}).then(res => {
let { code, data } = res
let list = (code == 0 && data && data.length) ? data : MOCK_SCENE_LIST
let list = (code == 0 && data && data.length) ? data : []
this.setData({
['form.sceneList']: [
{ staffName: '全部', active: true, value: '' },
......@@ -311,10 +301,7 @@ Component({
})
}).catch(() => {
this.setData({
['form.sceneList']: [
{ staffName: '全部', active: true, value: '' },
...MOCK_SCENE_LIST.map(e => ({ ...e, value: e.baseSceneCode }))
]
['form.sceneList']: [{ staffName: '全部', active: true, value: '' }]
})
})
},
......
......@@ -258,23 +258,13 @@ Component({
})
},
getSceneList() {
const MOCK_SCENE_LIST = [
{ uuid: '100101', staffName: '精品升级', baseSceneCode: '100101', sceneType: 1, businessType: null },
{ uuid: '100102', staffName: '交新车干配', baseSceneCode: '100102', sceneType: 2, businessType: null },
{ uuid: '100103', staffName: '售后众筹', baseSceneCode: '100103', sceneType: 3, businessType: null },
{ uuid: '110101', staffName: '售前会员权益升级', baseSceneCode: '110101', sceneType: 0, businessType: 1 },
{ uuid: '110102', staffName: '售后会员权益升级', baseSceneCode: '110102', sceneType: 0, businessType: 1 },
{ uuid: '110201', staffName: '售前延保', baseSceneCode: '110201', sceneType: 0, businessType: 2 },
{ uuid: '110202', staffName: '售后延保', baseSceneCode: '110202', sceneType: 0, businessType: 2 },
{ uuid: '120101', staffName: '二手车收车', baseSceneCode: '120101', sceneType: 7, businessType: null }
]
let userInfo = wx.$util.getUserInfo()
api.getUserScene({
sceneType: String(userInfo.sceneType || ''),
phone: userInfo.phone
}).then(res => {
let { code, data } = res
let list = (code == 0 && data && data.length) ? data : MOCK_SCENE_LIST
let list = (code == 0 && data && data.length) ? data : []
this.setData({
['form.sceneList']: [
{ staffName: '全部', active: true, value: '' },
......@@ -287,10 +277,7 @@ Component({
})
}).catch(() => {
this.setData({
['form.sceneList']: [
{ staffName: '全部', active: true, value: '' },
...MOCK_SCENE_LIST.map(e => ({ ...e, value: e.baseSceneCode }))
]
['form.sceneList']: [{ staffName: '全部', active: true, value: '' }]
})
})
},
......
......@@ -252,7 +252,7 @@ const checkStudyTask = () => {
wx.hideLoading()
const modal = initModal()
// res.data.lockOrder = true
if (modal && res.data.lockOrder) {
if (modal && res.data.lockOrder&&res.data?.lockReason !== '2') {
modal.open({
title: '未完成学习任务,暂不能开单',
type: 'permission',
......
......@@ -297,64 +297,6 @@ Page({
})
},
async getUserSceneList() {
const MOCK_SCENE_LIST = [
{
uuid: '100101',
name: '精品升级',
baseSceneCode: '100101',
sceneType: 1,
businessType: null
},
{
uuid: '100102',
name: '交新车干配',
baseSceneCode: '100102',
sceneType: 2,
businessType: null
},
{
uuid: '100103',
name: '售后众筹',
baseSceneCode: '100103',
sceneType: 3,
businessType: null
},
{
uuid: '110101',
name: '售前会员权益升级',
baseSceneCode: '110101',
sceneType: 0,
businessType: 1
},
{
uuid: '110102',
name: '售后会员权益升级',
baseSceneCode: '110102',
sceneType: 0,
businessType: 1
},
{
uuid: '110201',
name: '售前延保',
baseSceneCode: '110201',
sceneType: 0,
businessType: 2
},
{
uuid: '110202',
name: '售后延保',
baseSceneCode: '110202',
sceneType: 0,
businessType: 2
},
{
uuid: '120101',
name: '二手车收车',
baseSceneCode: '120101',
sceneType: 7,
businessType: null
}
]
const freshUserInfo = wx.$util.getUserInfo() || {}
const userInfo =
(this.data.userInfo && Object.keys(this.data.userInfo).length
......@@ -366,7 +308,7 @@ Page({
phone: userInfo.phone
})
const list =
res?.code == 0 && res?.data?.length ? res.data : MOCK_SCENE_LIST
res?.code == 0 && res?.data?.length ? res.data : []
const sceneColumns = list.map(item => ({
...item,
name: item.name || item.staffName
......@@ -390,7 +332,7 @@ Page({
} catch (e) {
this.setData({
userInfo,
sceneColumns: MOCK_SCENE_LIST
sceneColumns: []
})
}
},
......
......@@ -517,16 +517,6 @@ Page({
})
},
async getUserSceneList() {
const MOCK_SCENE_LIST = [
{ uuid: '100101', name: '精品升级', baseSceneCode: '100101', sceneType: 1, businessType: null },
{ uuid: '100102', name: '交新车干配', baseSceneCode: '100102', sceneType: 2, businessType: null },
{ uuid: '100103', name: '售后众筹', baseSceneCode: '100103', sceneType: 3, businessType: null },
{ uuid: '110101', name: '售前会员权益升级', baseSceneCode: '110101', sceneType: 0, businessType: 1 },
{ uuid: '110102', name: '售后会员权益升级', baseSceneCode: '110102', sceneType: 0, businessType: 1 },
{ uuid: '110201', name: '售前延保', baseSceneCode: '110201', sceneType: 0, businessType: 2 },
{ uuid: '110202', name: '售后延保', baseSceneCode: '110202', sceneType: 0, businessType: 2 },
{ uuid: '120101', name: '二手车收车', baseSceneCode: '120101', sceneType: 7, businessType: null }
]
const freshUserInfo = wx.$util.getUserInfo() || {}
const userInfo =
(this.data.userInfo && Object.keys(this.data.userInfo).length
......@@ -538,7 +528,7 @@ Page({
phone: userInfo.phone
})
const list =
res?.code == 0 && res?.data?.length ? res.data : MOCK_SCENE_LIST
res?.code == 0 && res?.data?.length ? res.data : []
const sceneColumns = list.map(item => ({
...item,
name: item.name || item.staffName
......@@ -558,7 +548,7 @@ Page({
})
} catch (e) {
this.setData({
sceneColumns: MOCK_SCENE_LIST
sceneColumns: []
})
}
},
......
......@@ -504,16 +504,6 @@ Page({
})
},
async getUserSceneList() {
const MOCK_SCENE_LIST = [
{ uuid: '100101', name: '精品升级', baseSceneCode: '100101', sceneType: 1, businessType: null },
{ uuid: '100102', name: '交新车干配', baseSceneCode: '100102', sceneType: 2, businessType: null },
{ uuid: '100103', name: '售后众筹', baseSceneCode: '100103', sceneType: 3, businessType: null },
{ uuid: '110101', name: '售前会员权益升级', baseSceneCode: '110101', sceneType: 0, businessType: 1 },
{ uuid: '110102', name: '售后会员权益升级', baseSceneCode: '110102', sceneType: 0, businessType: 1 },
{ uuid: '110201', name: '售前延保', baseSceneCode: '110201', sceneType: 0, businessType: 2 },
{ uuid: '110202', name: '售后延保', baseSceneCode: '110202', sceneType: 0, businessType: 2 },
{ uuid: '120101', name: '二手车收车', baseSceneCode: '120101', sceneType: 7, businessType: null }
]
const freshUserInfo = wx.$util.getUserInfo() || {}
const userInfo =
(this.data.userInfo && Object.keys(this.data.userInfo).length
......@@ -525,7 +515,7 @@ Page({
phone: userInfo.phone
})
const list =
res?.code == 0 && res?.data?.length ? res.data : MOCK_SCENE_LIST
res?.code == 0 && res?.data?.length ? res.data : []
const sceneColumns = list.map(item => ({
...item,
name: item.name || item.staffName
......@@ -547,7 +537,7 @@ Page({
} catch (e) {
this.setData({
userInfo,
sceneColumns: MOCK_SCENE_LIST
sceneColumns: []
})
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!