Commit bc4e0532 by 岑成威

fix:更新新建工单

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