Commit 618069b1 by 张立顺

feat 功能开发

1 parent 133d1e18
...@@ -158,7 +158,9 @@ module.exports = { ...@@ -158,7 +158,9 @@ module.exports = {
/** 获取商户订单设置 */ /** 获取商户订单设置 */
getMerchantRecordingSettings(data) { getMerchantRecordingSettings(data) {
return api.post( return api.post(
'dj.api.smartcarlife.recordingSettings.getMerchantRecordingSettings', // 'dj.api.smartcarlife.recordingSettings.getMerchantRecordingSettings',
'dj.api.smartcarlife.order.field.lightChange.setting.list',
// 查询门店轻改录单设置
data data
) )
}, },
...@@ -166,7 +168,8 @@ module.exports = { ...@@ -166,7 +168,8 @@ module.exports = {
/** 设置商户订单设置 */ /** 设置商户订单设置 */
setMerchantRecordingSettings(data) { setMerchantRecordingSettings(data) {
return api.post( return api.post(
'dj.api.smartcarlife.recordingSettings.insertOrUpdateSettings', // 'dj.api.smartcarlife.recordingSettings.insertOrUpdateSettings',
'dj.api.smartcarlife.order.field.setting.update',
data data
) )
}, },
...@@ -422,11 +425,6 @@ module.exports = { ...@@ -422,11 +425,6 @@ module.exports = {
}, },
// 车架号校验 // 车架号校验
checkVinValidate(data) { checkVinValidate(data) {
return api.post( return api.post('dj.pad.api.vin.validate', data, [], '/rop-dj-pad/router')
'dj.pad.api.vin.validate',
data,
[],
'/rop-dj-pad/router'
)
} }
} }
...@@ -59,7 +59,7 @@ Component({ ...@@ -59,7 +59,7 @@ Component({
safeArea, safeArea,
platform platform
} = res } = res
console.log(safeArea, 'safeArea') // console.log(safeArea, 'safeArea')
const { height, right, width, top } = const { height, right, width, top } =
wx.getMenuButtonBoundingClientRect() wx.getMenuButtonBoundingClientRect()
// 判断是否是华为平板设备 // 判断是否是华为平板设备
...@@ -69,8 +69,7 @@ Component({ ...@@ -69,8 +69,7 @@ Component({
if (isLandscape) statusBarHeight = 0 if (isLandscape) statusBarHeight = 0
// console.log(isPad, screenWidth, 'screenWidth'); // console.log(isPad, screenWidth, 'screenWidth');
// let navigationBarHeight = height + (top - statusBarHeight) * 2 + 5 // let navigationBarHeight = height + (top - statusBarHeight) * 2 + 5
let navigationBarHeight = `var(--fontSize${ let navigationBarHeight = `var(--fontSize${(height + (top - statusBarHeight) * 2) * (isPad ? 1 : 2)
(height + (top - statusBarHeight) * 2) * (isPad ? 1 : 2)
})` })`
let navigationBarPadding = screenWidth - right let navigationBarPadding = screenWidth - right
let navigationBarWidth = let navigationBarWidth =
...@@ -78,8 +77,7 @@ Component({ ...@@ -78,8 +77,7 @@ Component({
// if(deviceOrientation == 'landscape') statusBarHeight = 0 // if(deviceOrientation == 'landscape') statusBarHeight = 0
_this.setData({ _this.setData({
statusBarHeight: `var(--fontSize${ statusBarHeight: `var(--fontSize${statusBarHeight * (isPad ? 1 : 2)
statusBarHeight * (isPad ? 1 : 2)
})`, })`,
navigationBarHeight, navigationBarHeight,
// navigationBarStyle: `font-size:${fontSizeSetting}px;`, // navigationBarStyle: `font-size:${fontSizeSetting}px;`,
......
...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd' ...@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 2 let index = 1
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
......
...@@ -30,9 +30,9 @@ Page({ ...@@ -30,9 +30,9 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(options, 'options'); console.log(options, 'options')
let id = decodeURIComponent(options.scene).split('=')[1] let id = decodeURIComponent(options.scene).split('=')[1]
console.log(id, 'id'); console.log(id, 'id')
id ? this.qrCodeScene(id) : this.getListSelectAccount() id ? this.qrCodeScene(id) : this.getListSelectAccount()
}, },
async getSceneArr(yqMerchantId, loginUserObj) { async getSceneArr(yqMerchantId, loginUserObj) {
...@@ -44,10 +44,17 @@ Page({ ...@@ -44,10 +44,17 @@ Page({
// let checkAgree = await this.checkAgree() // let checkAgree = await this.checkAgree()
// if (!checkAgree) return false // if (!checkAgree) return false
// 超管开通全部场景 // 超管开通全部场景
if (loginUserObj?.isSuper || loginUserObj?.loginRole == 3 || loginUserObj.loginRole == 5 || loginUserObj?.loginRole == 6) return if (
loginUserObj?.isSuper ||
loginUserObj?.loginRole == 3 ||
loginUserObj.loginRole == 5 ||
loginUserObj?.loginRole == 6
)
return
// 获取4s店关联场景数据 // 获取4s店关联场景数据
getShopSceneConfig({ yqMerchantId }).then(result => { getShopSceneConfig({ yqMerchantId }).then(result => {
if (!result?.length) return wx.$util.showToast('暂无开通业务,请联系总部管理员') if (!result?.length)
return wx.$util.showToast('暂无开通业务,请联系总部管理员')
this.get4SStoreList(loginUserObj) this.get4SStoreList(loginUserObj)
}) })
}, },
...@@ -66,9 +73,7 @@ Page({ ...@@ -66,9 +73,7 @@ Page({
}) })
}, },
input(e) { input(e) {
let { let { value } = e.detail
value
} = e.detail
this.setValue(value) this.setValue(value)
}, },
inputBlur(e) { inputBlur(e) {
...@@ -79,9 +84,7 @@ Page({ ...@@ -79,9 +84,7 @@ Page({
}, },
emit(e) { emit(e) {
let { let {
detail: { detail: { value }
value
}
} = e } = e
this.setData({ this.setData({
edit: false, edit: false,
...@@ -98,7 +101,12 @@ Page({ ...@@ -98,7 +101,12 @@ Page({
if (val.uuid == selectedUuid) val.active = true if (val.uuid == selectedUuid) val.active = true
return val return val
}) })
let filterArr = copyLoginUserInfoList.filter(val => val.merchantName.includes(searchValue) || val.merchantId == searchValue) || [] let filterArr =
copyLoginUserInfoList.filter(
val =>
val.merchantName.includes(searchValue) ||
val.merchantId == searchValue
) || []
this.setData({ this.setData({
loginUserInfoList: filterArr loginUserInfoList: filterArr
}) })
...@@ -143,7 +151,7 @@ Page({ ...@@ -143,7 +151,7 @@ Page({
} }
// } // }
}) })
.catch(err => { }) .catch(err => {})
}, },
noLoginFn() { noLoginFn() {
let that = this let that = this
...@@ -249,15 +257,16 @@ Page({ ...@@ -249,15 +257,16 @@ Page({
let envName = sysInfo.environment ? 1 : 0 let envName = sysInfo.environment ? 1 : 0
let { merchantId: yqMerchantId } = wx.$util.getUserInfo() let { merchantId: yqMerchantId } = wx.$util.getUserInfo()
api.getYqStoreConfig({ yqMerchantId }).then(res => { api.getYqStoreConfig({ yqMerchantId }).then(res => {
let { let { code, data } = res
code,
data
} = res
let loginControlList = data?.loginControlList || [] let loginControlList = data?.loginControlList || []
if (code == '0') { if (code == '0') {
// const loginControlList = [] // const loginControlList = []
// const loginControlList = [0, 1] // const loginControlList = [0, 1]
if (loginControlList == null || loginControlList.includes(envName) || loginControlList.length == 0) { if (
loginControlList == null ||
loginControlList.includes(envName) ||
loginControlList.length == 0
) {
resolve(true) resolve(true)
} else { } else {
wx.hideLoading() wx.hideLoading()
...@@ -283,14 +292,26 @@ Page({ ...@@ -283,14 +292,26 @@ Page({
wx.$router.go('pages.sceneIndex') wx.$router.go('pages.sceneIndex')
return return
} }
get4SStoreList({ merchantId: isSuper || loginRole == 3 || loginRole == 5 || loginRole == 6 ? undefined : merchantId, staffUUID: uuid }, isSuper || loginRole == 3 || loginRole == 5 || loginRole == 6, true).then(result => { get4SStoreList(
{
merchantId:
isSuper || loginRole == 3 || loginRole == 5 || loginRole == 6
? undefined
: merchantId,
staffUUID: uuid
},
isSuper || loginRole == 3 || loginRole == 5 || loginRole == 6,
true
).then(result => {
let obj = (result && result[0]) || {} let obj = (result && result[0]) || {}
// 仅一家4s店 // 仅一家4s店
if (result?.length == 1) { if (result?.length == 1) {
this.setShopMerchantObj(obj) this.setShopMerchantObj(obj)
wx.$router.go('pages.sceneIndex') wx.$router.go('pages.sceneIndex')
} else if (!result?.length) { } else if (!result?.length) {
return wx.$util.showToast('园区店关联的4s店商户账号无效,请联系总部管理员') return wx.$util.showToast(
'园区店关联的4s店商户账号无效,请联系总部管理员'
)
} else { } else {
wx.$router.go('pages.merchantList') wx.$router.go('pages.merchantList')
} }
...@@ -327,7 +348,8 @@ Page({ ...@@ -327,7 +348,8 @@ Page({
if (e.active) { if (e.active) {
yqMerchantId = e.merchantId yqMerchantId = e.merchantId
id = e.uuid id = e.uuid
isSuper = e.isSuper || e.loginRole == 3 || e.loginRole == 5 || e.loginRole == 6 isSuper =
e.isSuper || e.loginRole == 3 || e.loginRole == 5 || e.loginRole == 6
} }
}) })
...@@ -362,50 +384,65 @@ Page({ ...@@ -362,50 +384,65 @@ Page({
wx.$util.hideLoading() wx.$util.hideLoading()
wx.$util.setUserInfo(data.loginUserInfoList[0]) wx.$util.setUserInfo(data.loginUserInfoList[0])
app.gobalCheckYqdSuper(data.loginUserInfoList[0]) app.gobalCheckYqdSuper(data.loginUserInfoList[0])
console.log(data.loginUserInfoList, 'loginUserInfoList'); console.log(data.loginUserInfoList, 'loginUserInfoList')
// 获取园区店下单字段配置信息 // // 获取园区店下单字段配置信息
getYQorderInfo() // getYQorderInfo()
// 超管跳过选择4s店 // 超管跳过选择4s店
// console.log(wx.$SCENE != 'tabWorkOrder/staffDaily'); // console.log(wx.$SCENE != 'tabWorkOrder/staffDaily');
if (data.loginUserInfoList[0] && data.loginUserInfoList[0].isSuper && (wx.$SCENE?.path != 'tabWorkOrder/staffDaily' || wx.$SCENE?.path != 'tabWorkOrder/upgradeStaffDaily')) { if (
data.loginUserInfoList[0] &&
data.loginUserInfoList[0].isSuper &&
(wx.$SCENE?.path != 'tabWorkOrder/staffDaily' ||
wx.$SCENE?.path != 'tabWorkOrder/upgradeStaffDaily')
) {
this.get4SStoreList(data.loginUserInfoList[0]) this.get4SStoreList(data.loginUserInfoList[0])
return return
} }
if (data.loginUserInfoList[0] && (data.loginUserInfoList[0]?.loginRole == 3 || data.loginUserInfoList[0]?.loginRole == 5 || data.loginUserInfoList[0]?.loginRole == 6) && (wx.$SCENE?.path != 'tabWorkOrder/staffDaily' || wx.$SCENE?.path != 'tabWorkOrder/upgradeStaffDaily')) { if (
data.loginUserInfoList[0] &&
(data.loginUserInfoList[0]?.loginRole == 3 ||
data.loginUserInfoList[0]?.loginRole == 5 ||
data.loginUserInfoList[0]?.loginRole == 6) &&
(wx.$SCENE?.path != 'tabWorkOrder/staffDaily' ||
wx.$SCENE?.path != 'tabWorkOrder/upgradeStaffDaily')
) {
this.get4SStoreList(data.loginUserInfoList[0]) this.get4SStoreList(data.loginUserInfoList[0])
return return
} }
const SCENE = wx.$SCENE const SCENE = wx.$SCENE
console.log(wx.$SCENE, ' wx.$SCENE'); console.log(wx.$SCENE, ' wx.$SCENE')
// 展会用逻辑 // 展会用逻辑
if (SCENE && SCENE.path == 'packageEquity/clueList') { if (SCENE && SCENE.path == 'packageEquity/clueList') {
// query // query
wx.$SCENE.query = { wx.$SCENE.query = {
activeIndex: 1 activeIndex: 1
} }
api.selectAccountLogin({ id: 'd45b7f0a3ed94ca6a16340937ccc1c1d' }).then((result) => { api
.selectAccountLogin({ id: 'd45b7f0a3ed94ca6a16340937ccc1c1d' })
.then(result => {
// setUserInfo // setUserInfo
wx.$util.setUserInfo({ wx.$util.setUserInfo({
...wx.$util.getUserInfo(), ...wx.$util.getUserInfo(),
sceneType: 1, sceneType: 1,
shopMerchantName: '杰西集团的门店', shopMerchantName: '杰西集团的门店',
shopMerchantId: 44205761, shopMerchantId: 44205761
}) })
api.selectMerchantScene({ api
.selectMerchantScene({
sceneType: 1, sceneType: 1,
shopMerchantName: '杰西集团的门店', shopMerchantName: '杰西集团的门店',
shopMerchantId: 44205761, shopMerchantId: 44205761
}).then((result) => { })
.then(result => {
this.sceneHandle() this.sceneHandle()
}) })
}).catch((err) => { })
.catch(err => {})
});
} else { } else {
// 有场景信息就跳转对应页面 没有就登录场景 // 有场景信息就跳转对应页面 没有就登录场景
SCENE && SCENE.path != 'pages/accountItems/accountItems' ? this.sceneHandle() : this.getSceneArr(yqMerchantId, data.loginUserInfoList[0]) SCENE && SCENE.path != 'pages/accountItems/accountItems'
? this.sceneHandle()
: this.getSceneArr(yqMerchantId, data.loginUserInfoList[0])
} }
// debugger // debugger
...@@ -418,7 +455,7 @@ Page({ ...@@ -418,7 +455,7 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { }, onReady: function () {},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -433,25 +470,25 @@ Page({ ...@@ -433,25 +470,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () { }, onHide: function () {},
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () { }, onUnload: function () {},
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { }, onPullDownRefresh: function () {},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { }, onReachBottom: function () {},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { } onShareAppMessage: function () {}
}) })
// components/StoreSelectPopup/StoreSelectPopup.js
import api from '~/api/api'
import { get4SStoreList } from '~/store/index'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
observer: function (n) {
if (n) {
this.setData({
scrollTop: 0,
pageNum: 1,
nothing: false,
searchValue: ''
})
this.getList(true)
}
}
},
type: Number,
selectedData: Array
},
/**
* 组件的初始数据
*/
data: {
pageNum: 1,
scrollTop: 0,
nothing: false
},
/**
* 组件的方法列表
*/
methods: {
// getList(isReset = false) {
// let { type, pageNum, searchValue, nothing, selectedData } = this.data
// // type 1园区店数据 2 4s店数据
// let requestEvent = type == 1 ? 'getYqMerchantListPage' : 'getMerchantListPage'
// let params = {
// pageSize: 20,
// pageNum: isReset ? 1 : pageNum,
// scene: 1,
// merchantName: searchValue
// }
// if (nothing) return
// api[requestEvent](params).then(res => {
// let { code, data, message } = res
// if (code == 0) {
// if (isReset) data?.list.unshift({ merchantId: '', merchantName: '全部', active: true })
// let tempList = isReset ? data?.list : this.data.storeRangeList.concat(data?.list)
// if (selectedData?.length) {
// tempList[0].active = false
// tempList.forEach(val => {
// val.active = selectedData.some(v => v.merchantId == val.merchantId)
// })
// }
// this.setData({
// storeRangeList: tempList,
// pageNum: pageNum + 1,
// total: data?.total,
// nothing: data?.total == (tempList.length - 1),
// })
// } else {
// wx.$util.showToast(message)
// }
// })
// },
getList() {
let { selectedData } = this.data
let userInfo = wx.$util.getUserInfo()
let params = {
merchantId:
userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5 ||
userInfo?.loginRole == 6
? ''
: userInfo?.merchantId,
staffUUID:
userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5 ||
userInfo?.loginRole == 6
? ''
: userInfo?.uuid,
scene: 1
}
get4SStoreList(
params,
userInfo?.isSuper ||
userInfo?.loginRole == 3 ||
userInfo.loginRole == 5 ||
userInfo.loginRole == 6
).then(result => {
console.log(result, 'get4SStoreList')
let tempList = result
if (selectedData?.length) {
tempList[0].active = false
tempList.forEach(val => {
val.active = selectedData.some(v => v.merchantId == val.merchantId)
})
}
// let userInfo = wx.$util.getUserInfo();
// if (!result?.length) {
// userInfo.shopMerchantId = null;
// userInfo.default4SStoreInfo = {};
// userInfo.shopMerchantName = null;
// userInfo.sceneType = null;
// wx.$util.setUserInfo(userInfo);
// return wx.$router.reLaunch("pages.accountItems");
// }
// if (result?.length && (userInfo?.isSuper || userInfo?.loginRole == 3 || userInfo.loginRole == 5 || userInfo?.loginRole == 6)) {
// if (result[0]?.merchantName !== '全部' && result[0]?.merchantId) {
// result.unshift({ merchantName: '全部' })
// }
// let obj = {
// ...userInfo,
// // default4SStoreInfo: {
// // merchantId: result[0]?.merchantId,
// // merchantName: result[0]?.merchantName,
// // },
// };
// if (
// !userInfo?.default4SStoreInfo ||
// !Object.keys(userInfo?.default4SStoreInfo).length
// ) {
// wx.$util.setUserInfo(obj);
// this.setData({
// userInfo: obj,
// });
// }
// }
this.setData({
storeRangeList: tempList || [],
showPage: true
})
})
},
scrollonReachBottom() {
this.getList()
},
open() {
if (this.data.disabled) return
this.setData({
edit: true,
inputFocus: true
})
},
setValue(value) {
if (this.properties.filterEmoji) {
if (wx.$util.haveEmoji(value)) value = wx.$util.replaceEmoji(value)
}
this.setData({
searchValue: value
})
},
input(e) {
let { value } = e.detail
this.setValue(value)
this.triggerEvent('input', {
value
})
},
inputConfifm(e) {
this.emit(e)
},
emit(e) {
let {
detail: { value },
type
} = e
this.setData({
edit: false,
nothing: false,
pageNum: 1
})
this.setValue(value)
this.getList(true)
},
choose(e) {
let { item, index } = e.currentTarget.dataset
let { active } = item
let { storeRangeList } = this.data
if (index > 0) {
let target = `storeRangeList[${index}].active`
this.setData(
{
[target]: !active,
'storeRangeList[0].active': false
},
() => {
this.setSelectedData()
}
)
} else {
if (!active) {
storeRangeList.map(val => {
return (val.active = false)
})
storeRangeList[0].active = true
}
this.setData({ storeRangeList }, () => {
this.setSelectedData()
})
}
},
setSelectedData() {
let { storeRangeList, selectedData } = this.data
let arr = []
// 已选的未分页加载出的数据置为选中状态
let selectedArr = wx.$util.arrayUnique(
selectedData.concat(storeRangeList),
'merchantId'
)
selectedArr.forEach(val => {
if (val.active && val.merchantId) arr.push(val)
})
// if (!arr?.length) storeRangeList[0].active = true
this.setData({
selectedData: arr, // 选择全部清除已选的门店数据
storeRangeList
})
console.log(selectedData, 'selectedData')
},
hidePopup() {
this.triggerEvent('cancel')
},
confirm() {
let { selectedData } = this.data
this.triggerEvent('confirm', selectedData)
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--components/StoreSelectPopup/StoreSelectPopup.wxml-->
<popup title="选择门店" show="{{ show }}" bindconfirm="confirm" height="85%" bindcancel="hidePopup">
<view class="search-box">
<view class="search-input">
<block wx:if="{{ !edit }}">
<view class="input {{ searchValue?'':'placeholder' }}" bindtap="open">
<block wx:if="{{ searchValue }}">{{searchValue}}</block>
<block wx:else>
<image src="/images/search.png" class="icon"></image>
查找
</block>
</view>
</block>
<block wx:else>
<input
type="text"
class="input"
value="{{ searchValue }}"
focus="{{ inputFocus }}"
confirm-type="search"
bindinput="input"
bindblur="inputBlur"
bindconfirm="inputConfifm"
/>
</block>
</view>
</view>
<view class="title">门店名称</view>
<scroll-view
class="store-select-box"
scroll-y
enhanced="{{ true }}"
show-scrollbar="{{ false }}"
scroll-top="{{ scrollTop }}"
bindscrolltolower="scrollonReachBottom"
>
<view class="box">
<view class="merchant-box">
<block wx:for="{{ storeRangeList }}" wx:key="index">
<view class="item {{ item.active?'active':'' }}" bindtap="choose" data-item="{{ item }}" data-index="{{ index }}">
<view class="icon" catchtap="choose" data-index="{{ index }}" data-item="{{ item }}">
<block wx:if="{{ item.active }}">
<image src="/components/images/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
</view>
<view class="merchant_item">
<view class="text-hide">{{item.merchantName}}</view>
<view>{{item.merchantId}}</view>
</view>
</view>
</block>
</view>
</view>
</scroll-view>
</popup>
\ No newline at end of file \ No newline at end of file
/* components/StoreSelectPopup/StoreSelectPopup.wxss */
.search-box {
height: var(--fontSize104);
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize28);
}
.search-box .search-input {
width: var(--fontSize686);
height: var(--fontSize72);
background: #F7F8FA;
border-radius: var(--fontSize38);
color: #333;
}
.search-input .input{
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 100%;
text-align: center;
}
.search-input .icon{
width: var(--fontSize28);
height: var(--fontSize28);
margin-right: var(--fontSize10);
}
.search-input .placeholder{
color: #C8C9CC;
}
.title{
margin-bottom: var(--fontSize20);
color: #292D33;
font-weight: 400;
font-size: var(--fontSize32);
}
.store-select-box{
height: calc(100% - var(--fontSize168));
}
.merchant-box .item{
display: flex;
height: var(--fontSize88);
align-items: center;
color: #292D33;
}
.merchant-box .item.active{
color: #347BFF;
}
.item .merchant_item{
height: var(--fontSize88);
font-size: var(--fontSize28);
display: flex;
align-items: center;
width: calc(100% - var(--fontSize52));
border-top: var(--fontSize1) solid #EFF0F2;
}
.item .merchant_item .text-hide{
max-width: calc(100% - var(--fontSize192));
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item .icon {
width: var(--fontSize32);
height: var(--fontSize32);
display: block;
margin-right: var(--fontSize20);
flex-shrink: 0;
}
.item .icon .arc {
width: 100%;
height: 100%;
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
\ No newline at end of file \ No newline at end of file
...@@ -23,14 +23,6 @@ Component({ ...@@ -23,14 +23,6 @@ Component({
value: '85%' value: '85%'
}, },
isYqdSuper: Boolean isYqdSuper: Boolean
// merchantSettingInfo: {
// type: Object,
// observer: function (n) {
// if (n) {
// this.setOrderSettingList(n)
// }
// }
// }
}, },
/** /**
...@@ -39,31 +31,47 @@ Component({ ...@@ -39,31 +31,47 @@ Component({
data: { data: {
merchantSettingInfo: '', merchantSettingInfo: '',
// switchStatus: 1, // switchStatus: 1,
showStoreSelectPopup: false,
orderSettingList: [ orderSettingList: [
{ {
label: '选择车型', label: '选择车型',
valueName: 'carTypeRequiredFlag', valueName: 'carBrand',
value: false value: false,
scene: 1,
fieldKey: 'carBrand',
fieldName: '选择车型'
}, },
{ {
label: '车架号(VIN码)', label: '车架号(VIN码)',
valueName: 'standNoRequiredFlag', valueName: 'carNo',
value: false value: false,
scene: 1,
fieldKey: 'carNo',
fieldName: '车架号(VIN码)'
}, },
{ {
label: '车牌号', label: '车牌号',
valueName: 'plateNumRequiredFlag', valueName: 'plateNo',
value: false value: false,
scene: 1,
fieldKey: 'plateNo',
fieldName: '车牌号'
}, },
{ {
label: '战败下单是否体验', label: '战败下单是否体验',
valueName: 'foEfRequiredFlag', valueName: 'notUpgradeExperience',
value: true value: true,
scene: 1,
fieldKey: 'notUpgradeExperience',
fieldName: '战败下单是否体验'
}, },
{ {
label: '战败下单拒升理由提交', label: '战败下单拒升理由提交',
valueName: 'foRrRequiredFlag', valueName: 'notUpgradeRejectionReason',
value: true value: true,
scene: 1,
fieldKey: 'notUpgradeRejectionReason',
fieldName: '战败下单拒升理由提交'
} }
] ]
}, },
...@@ -73,68 +81,149 @@ Component({ ...@@ -73,68 +81,149 @@ Component({
// console.log(app.globalData.isYqdSuper) // console.log(app.globalData.isYqdSuper)
console.log(this.data.isYqdSuper) console.log(this.data.isYqdSuper)
// app . // app .
getYQorderInfo()
.then(merchantSettingInfo => {
console.log(merchantSettingInfo)
this.setData({ merchantSettingInfo })
this.setOrderSettingList(merchantSettingInfo)
})
.catch(err => {
console.log(err)
})
} }
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
getSetting() {
let { selectedMerchantList } = this.data
api
.getMerchantRecordingSettings({
scene: 1,
merchantId: selectedMerchantList[0].merchantId,
merchantName: selectedMerchantList[0].merchantName
})
.then(merchantSettingInfo => {
let { code, data } = merchantSettingInfo
console.log(merchantSettingInfo, 'merchantSettingInfo')
let YQorderSetting = {}
data.orderFieldSettingList.map(e => {
YQorderSetting[e.fieldKey] = {
flag: e.isRequired ? 'Y' : 'N',
id: e.id
}
})
console.log(YQorderSetting, 'YQorderSetting')
this.setData({
merchantSettingInfo: YQorderSetting
})
this.setOrderSettingList(YQorderSetting)
})
},
showPopup() {
console.log('showPopup')
// showStoreSelectPopup
this.setData({
showStoreSelectPopup: true
})
},
showStoreSelectPopup(e) {
let { type } = e.currentTarget.dataset
this.setData({
storeType: type,
showStoreSelectPopup: true
})
},
hideStorePopup() {
this.setData({
showStoreSelectPopup: false
})
},
storeConfirm(e) {
// let { storeType } = this.data
// if (storeType == 1)
// this.setData({
// 'form.selectedYqMerchantList': e?.detail
// })
// if (storeType == 2)
// this.setData({
// 'form.selectedMerchantList': e?.detail
// })
console.log(e?.detail, ' e?.detail')
this.setData({
selectedMerchantList: e?.detail,
showStoreSelectPopup: false,
isReset: false
})
this.getSetting()
},
async confirm() { async confirm() {
// 判断是不是园区店管理员 不是都不处理 // 判断是不是园区店管理员 不是都不处理
let { isYqdSuper, merchantSettingInfo, orderSettingList } = this.data let {
isYqdSuper,
merchantSettingInfo,
orderSettingList,
selectedMerchantList
} = this.data
// let { selectedMerchantList } = this.data
// 是管理员请求数据 并存全局读取 // 是管理员请求数据 并存全局读取
if (isYqdSuper) { if (isYqdSuper) {
let { merchantId, merchantName } = merchantSettingInfo let { merchantId, merchantName } = selectedMerchantList[0]
wx.$util.showLoading('设置中...') wx.$util.showLoading('设置中...')
let params = orderSettingList.reduce((obj, item) => { // let params = orderSettingList.reduce((obj, item) => {
obj[item.valueName] = item.value == true ? 'Y' : 'N' // obj[item.valueName] = item.value == true ? 'Y' : 'N'
// item // // item
return obj // return obj
}, {}) // }, {})
// let setting = orderSettingList.map
// 实现orderSettingList映射
// let params = orderSettingList.reduce((obj, item) => {
// obj[item.fieldKey] = item.value == true ? 'Y' : 'N'
// // item
// return obj
// }, {})
orderSettingList = orderSettingList.map(item => {
item.isRequired = item.isRequired == 'Y' ? true : false
return item
})
let result = await api.setMerchantRecordingSettings({ let result = await api.setMerchantRecordingSettings({
merchantId, merchantId,
merchantName, merchantName,
...params scene: 1,
settings: orderSettingList
}) })
let { code, data } = result
if (code == 0) {
app.globalData.YQorderSetting = Object.assign(app.globalData.YQorderSetting, params)
}
wx.$util.hideLoading() wx.$util.hideLoading()
wx.$util.showToast('设置成功')
// let { code, data } = result
// if (code == 0) {
// app.globalData.YQorderSetting = Object.assign(
// app.globalData.YQorderSetting,
// params
// )
// }
} }
this.setData({ this.setData({
show: false show: false
}) })
}, },
onSwitchChange(e) { onSwitchChange(e) {
// console.log(e)
let { index } = e.currentTarget.dataset
let { orderSettingList } = this.data let { orderSettingList } = this.data
let { index } = e.currentTarget.dataset
// console.log(index) // console.log(index)
orderSettingList[index]['value'] = !orderSettingList[index]['value'] orderSettingList[index]['value'] = !orderSettingList[index]['value']
orderSettingList[index]['isRequired'] = orderSettingList[index]['value']
? 'Y'
: 'N'
// console.log(orderSettingList[index]['value']) // console.log(orderSettingList[index]['value'])
this.setData({ this.setData({
orderSettingList orderSettingList
}) })
}, },
setOrderSettingList(n) { setOrderSettingList(n) {
// 做转换 let { orderSettingList, selectedMerchantList } = this.data
let { orderSettingList } = this.data
orderSettingList.forEach(element => { orderSettingList.forEach(element => {
// if (element.valueName == n) { // 做转换
let value = n[element.valueName] let setting = n[element.valueName]
element.value = value == 'Y' ? true : false console.log(n, setting, 'orderSettingList')
// } element.value = setting && setting.flag == 'Y'
element.id = setting.id
element.fieldKey = element.valueName
element.isRequired = setting ? setting.flag : element.value ? 'Y' : 'N'
element.merchantId = selectedMerchantList[0].merchantId
element.merchantName = selectedMerchantList[0].merchantName
}) })
console.log(orderSettingList) console.log(orderSettingList)
this.setData({ this.setData({
......
{ {
"component": true, "component": true,
"usingComponents": { "switch-block": "/components/switchBlock/switchBlock", "tab-popup": "/components/tabPopup/tabPopup" } "usingComponents": {
"switch-block": "/components/switchBlock/switchBlock",
"tab-popup": "/components/tabPopup/tabPopup",
"store-select-popup": "../StoreSelectPopup/StoreSelectPopup"
}
} }
<tab-popup <tab-popup show="{{ show }}" title="{{ title }}" height="{{ height }}" tips="{{ tips }}" bindconfirm="confirm">
show="{{show}}"
title="{{title}}"
height="{{height}}"
tips="{{tips}}"
bindconfirm="confirm">
<block
wx:for="{{orderSettingList}}"
wx:key="index"
wx:for-item="item"
wx:for-index="index">
<gl-cell <gl-cell
border border
label="{{item.label}}"
valueAlign="right" valueAlign="right"
labelWidth="var(--fontSize240)"> label="{{ '门店切换' }}"
<!-- <switchBlock/> --> requiredAfter
<switch-block labelWidth="var(--fontSize140)"
switchStatus="{{item.value}}" required
disable="{{isYqdSuper}}" haveArrow
bindswitchEvent="onSwitchChange" bindclick="showPopup"
data-index="{{index}}" /> data-show-name="selesBox"
<!-- <view class="gender-box"> placeholder="请选择"
<view class="block text-center {{orderObj.customer.customerSex==1?'':'right'}}" /> disabled="{{ false }}"
<view class="male text-center {{orderObj.customer.customerSex == 1?'active':''}}" bindtap="changeGender" data-gender="1"> >
男 <!-- <block wx:if="{{ orderObj.merchantName && orderObj.employeeName }}"> -->
</view> <view class="between">
<view class="woman text-center {{orderObj.customer.customerSex == 2?'active':''}}" bindtap="changeGender" data-gender="2"> <view class="start text-hide">{{selectedMerchantList[0].merchantName || '请选择'}}</view>
女 <!-- <view class="end text-hide">
</view> <text>|</text>
{{orderObj.employeeName}}
</view> --> </view> -->
</view>
<!-- </block> -->
</gl-cell>
<block wx:for="{{ orderSettingList }}" wx:key="index" wx:for-item="item" wx:for-index="index">
<gl-cell border label="{{ item.label }}" valueAlign="right" labelWidth="var(--fontSize240)">
<!-- <switchBlock/> -->
<switch-block switchStatus="{{ item.value }}" disable="{{ isYqdSuper }}" bindswitchEvent="onSwitchChange" data-index="{{ index }}" />
</gl-cell> </gl-cell>
</block> </block>
</tab-popup> </tab-popup>
<store-select-popup
show="{{ showStoreSelectPopup }}"
type="{{ 2 }}"
bindconfirm="storeConfirm"
bindcancel="hideStorePopup"
selectedData="{{ selectedMerchantList || [] }}"
></store-select-popup>
<!-- <store-select-popup></store-select-popup> -->
\ No newline at end of file \ No newline at end of file
/* components/switchPopup/switchPopup.wxss */ /* components/switchPopup/switchPopup.wxss */
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.start {
text-align-last: right;
}
\ No newline at end of file \ No newline at end of file
...@@ -44,6 +44,7 @@ Page({ ...@@ -44,6 +44,7 @@ Page({
], ],
grassNum: '', grassNum: '',
showMerchantPop: false, showMerchantPop: false,
// showMerchantPop: true,
merchantPopConfig: { merchantPopConfig: {
height: '70%', height: '70%',
title: '录单设置', title: '录单设置',
......
...@@ -55,7 +55,7 @@ class Router { ...@@ -55,7 +55,7 @@ class Router {
thisPage.showLoading = util.showLoading thisPage.showLoading = util.showLoading
thisPage.hideLoading = util.hideLoading thisPage.hideLoading = util.hideLoading
// 用来处理兼容iphoneX的底部的横条 // 用来处理兼容iphoneX的底部的横条
console.log(util.isFullSucreen(), 'util.isFullSucreen()'); // console.log(util.isFullSucreen(), 'util.isFullSucreen()');
thisPage.setData({ thisPage.setData({
isFullSucreen: util.isFullSucreen() isFullSucreen: util.isFullSucreen()
}) })
......
...@@ -12,8 +12,10 @@ export const checkYqdSuper = (userInfo, globalData) => { ...@@ -12,8 +12,10 @@ export const checkYqdSuper = (userInfo, globalData) => {
}) })
// 解决传入app 在初始化获取不到的bug // 解决传入app 在初始化获取不到的bug
// console.log(userInfo, 'userInfo') // console.log(userInfo, 'userInfo')
globalData.isYqdSuper = userInfo.userType != 2 && !userInfo.isSuper && merchantAccountType globalData.isYqdSuper =
globalData.isStaff = userInfo.userType == 2 && !userInfo.isSuper && merchantAccountType userInfo.userType != 2 && !userInfo.isSuper && merchantAccountType
globalData.isStaff =
userInfo.userType == 2 && !userInfo.isSuper && merchantAccountType
const loginRole = userInfo.loginRole const loginRole = userInfo.loginRole
if (loginRole) { if (loginRole) {
globalData.isYqdSuper = [2, 3].includes(loginRole) globalData.isYqdSuper = [2, 3].includes(loginRole)
...@@ -66,7 +68,8 @@ export const getYQInfo = userInfo => { ...@@ -66,7 +68,8 @@ export const getYQInfo = userInfo => {
if (data.length > 1) { if (data.length > 1) {
if (userInfo.merchantId != userInfo.subLoginUser.merchantId) { if (userInfo.merchantId != userInfo.subLoginUser.merchantId) {
data.map((e, index) => { data.map((e, index) => {
if (e.merchantId == userInfo.subLoginUser.merchantId) subIndex = index + 1 if (e.merchantId == userInfo.subLoginUser.merchantId)
subIndex = index + 1
}) })
} }
arr = [all, ...data] arr = [all, ...data]
...@@ -98,33 +101,55 @@ export const getYQInfo = userInfo => { ...@@ -98,33 +101,55 @@ export const getYQInfo = userInfo => {
export const getYQorderInfo = () => { export const getYQorderInfo = () => {
const app = getApp() const app = getApp()
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// 判断当前4s店配置是否已获取
let userInfo = wx.$util.getUserInfo()
console.log(
app.globalData.YQorderSetting &&
app.globalData.YQorderSetting?.shopMerchantId ==
userInfo.shopMerchantId,
'2222'
)
// 如果有 直接返回 // 如果有 直接返回
if (app.globalData.YQorderSetting) { if (
app.globalData.YQorderSetting &&
app.globalData.YQorderSetting?.shopMerchantId == userInfo.shopMerchantId
) {
return resolve(app.globalData.YQorderSetting) return resolve(app.globalData.YQorderSetting)
} else { } else {
let userInfo = wx.$util.getUserInfo()
if (!userInfo) this.login(true) if (!userInfo) this.login(true)
let { merchantId, merchantName } = userInfo.subLoginUser let { merchantId, merchantName } = userInfo.subLoginUser
wx.$util.showLoading() wx.$util.showLoading()
api api
.getMerchantRecordingSettings({ .getMerchantRecordingSettings({
merchantId, scene: 1,
merchantName merchantId: userInfo.shopMerchantId,
merchantName: userInfo.shopMerchantName
}) })
.then(res => { .then(res => {
// console.log(res)
wx.$util.hideLoading() wx.$util.hideLoading()
let { code, data } = res let { code, data } = res
if (code == 0) { if (code == 0) {
// debugger let YQorderSetting = {}
// console.log(typeof data.yqPhoneConfig, 'data.yqPhoneConfig') const keyMap = {
carBrand: 'carTypeRequiredFlag',
carNo: 'standNoRequiredFlag',
plateNo: 'plateNumRequiredFlag',
notUpgradeExperience: 'foEfRequiredFlag',
notUpgradeRejectionReason: 'foRrRequiredFlag'
}
;(data.orderFieldSettingList || []).forEach(e => {
const key = keyMap[e.fieldKey] || e.fieldKey
YQorderSetting[key] = e.isRequired ? 'Y' : 'N'
})
YQorderSetting.shopMerchantId = userInfo.shopMerchantId
// 过滤园区店是否需要屏蔽手机号选项 // 过滤园区店是否需要屏蔽手机号选项
let filterYqPhoneConfig = JSON.parse(data.yqPhoneConfig) let filterYqPhoneConfig = JSON.parse(data.yqPhoneConfig)
// console.log(filterYqPhoneConfig) YQorderSetting.yqPhoneConfig = filterYqPhoneConfig?.find(
data.yqPhoneConfig = filterYqPhoneConfig?.find(item => item.yqMerchantId == merchantId)?.shopMerchantPhoneList || false item => item.yqMerchantId == merchantId
// console.log(data) )
app.globalData.YQorderSetting = data
// this.checkSeverType(userInfo) app.globalData.YQorderSetting = YQorderSetting
resolve(app.globalData.YQorderSetting) resolve(app.globalData.YQorderSetting)
} }
}) })
...@@ -174,7 +199,10 @@ export const getBusinessSchoolScene = () => { ...@@ -174,7 +199,10 @@ export const getBusinessSchoolScene = () => {
const app = getApp() const app = getApp()
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// 如果有 直接返回 // 如果有 直接返回
if (app.globalData.businessSchoolScene != '' && app.globalData.businessSchoolScene != null) { if (
app.globalData.businessSchoolScene != '' &&
app.globalData.businessSchoolScene != null
) {
// debugger // debugger
return resolve(app.globalData.businessSchoolScene) return resolve(app.globalData.businessSchoolScene)
} else { } else {
...@@ -207,7 +235,6 @@ export const getBusinessSchoolScene = () => { ...@@ -207,7 +235,6 @@ export const getBusinessSchoolScene = () => {
// 扫码进来的处理 // 扫码进来的处理
export const checkScene = options => { export const checkScene = options => {
// let query = options.query // let query = options.query
let { query } = options let { query } = options
if (query) { if (query) {
...@@ -243,30 +270,36 @@ export const checkScene = options => { ...@@ -243,30 +270,36 @@ export const checkScene = options => {
createOrder: 'tabWorkOrder/pages/createOrder/createOrder', createOrder: 'tabWorkOrder/pages/createOrder/createOrder',
followUpOrder: 'tabDate/pages/detail', followUpOrder: 'tabDate/pages/detail',
staffDaily: 'tabWorkOrder/pages/staffDaily/staffDaily', staffDaily: 'tabWorkOrder/pages/staffDaily/staffDaily',
playVideo: 'packageEquity/pages/trainingMaterials/pages/playVideo/index', playVideo:
upgradeStaffDaily: 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily', 'packageEquity/pages/trainingMaterials/pages/playVideo/index',
upgradeStaffDaily:
'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily',
deliveryTarget: 'packageEquity/pages/deliveryTarget/deliveryTarget', deliveryTarget: 'packageEquity/pages/deliveryTarget/deliveryTarget',
'aiDetail': 'packageEquity/pages/aiExcercise/ai/ai', aiDetail: 'packageEquity/pages/aiExcercise/ai/ai',
'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex', tabDateIndex: 'pages/tabDateIndex/pages/tabDateIndex',
'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex', tabDateIndex: 'pages/tabDateIndex/pages/tabDateIndex',
'h5AuthPhone': 'pages/h5AuthPhone/h5AuthPhone', h5AuthPhone: 'pages/h5AuthPhone/h5AuthPhone',
'mentorShipManage': 'tabWorkOrder/pages/mentorshipManage/mentorshipManage', mentorShipManage:
'refundApply': 'tabWorkOrder/pages/refundApply/refundApply' 'tabWorkOrder/pages/mentorshipManage/mentorshipManage',
refundApply: 'tabWorkOrder/pages/refundApply/refundApply'
} }
options.path = pagePath[query.page] options.path = pagePath[query.page]
} }
console.log(options, query, 'options') console.log(options, query, 'options')
console.log(userInfo, 'userInfo'); console.log(userInfo, 'userInfo')
wx.$SCENE = options wx.$SCENE = options
// 跳转登录页就去掉这个跳转逻辑 // 跳转登录页就去掉这个跳转逻辑
if (options.path == "pages/wxLogin/wxLogin") { if (options.path == 'pages/wxLogin/wxLogin') {
wx.$SCENE = null wx.$SCENE = null
} }
if (query.merchantId && !query.reportDate && !query.title) { if (query.merchantId && !query.reportDate && !query.title) {
// &&options.patch == 'tabIndex/pages/index/index' // &&options.patch == 'tabIndex/pages/index/index'
// 需要已登录并且是当前门店的 不是就重新登录 // 需要已登录并且是当前门店的 不是就重新登录
if (userInfo?.subLoginUser?.merchantId && (userInfo?.subLoginUser?.merchantId != query.merchantId)) { if (
userInfo?.subLoginUser?.merchantId &&
userInfo?.subLoginUser?.merchantId != query.merchantId
) {
wx.$SCENE = null wx.$SCENE = null
// return this.login(true) // return this.login(true)
// return true // 重新登录 // return true // 重新登录
...@@ -276,7 +309,18 @@ export const checkScene = options => { ...@@ -276,7 +309,18 @@ export const checkScene = options => {
console.log(options.path, 'options.path') console.log(options.path, 'options.path')
// wx.$SCENE = options // wx.$SCENE = options
if (!userInfo && !['pages/accountItems/accountItems', 'pages/wxLogin/wxLogin', 'tabWorkOrder/pages/staffDaily/staffDaily', 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily', 'packageEquity/pages/trainingMaterials/pages/playVideo/index', 'packageEquity/pages/deliveryTarget/deliveryTarget', 'pages/h5AuthPhone/h5AuthPhone'].includes(options.path)) { if (
!userInfo &&
![
'pages/accountItems/accountItems',
'pages/wxLogin/wxLogin',
'tabWorkOrder/pages/staffDaily/staffDaily',
'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily',
'packageEquity/pages/trainingMaterials/pages/playVideo/index',
'packageEquity/pages/deliveryTarget/deliveryTarget',
'pages/h5AuthPhone/h5AuthPhone'
].includes(options.path)
) {
// if (!userInfo) { // if (!userInfo) {
// console.log(userInfo); // console.log(userInfo);
console.log('未登录,请登录。') console.log('未登录,请登录。')
...@@ -298,7 +342,9 @@ export const setWebSocket = () => { ...@@ -298,7 +342,9 @@ export const setWebSocket = () => {
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
console.log('socket', data) console.log('socket', data)
let _data_ = JSON.parse(data.data) let _data_ = JSON.parse(data.data)
if (thisPage.route == 'tabWorkOrder/pages/confirmOrder/confirmOrder') { if (
thisPage.route == 'tabWorkOrder/pages/confirmOrder/confirmOrder'
) {
console.log(thisPage.data.orderInfo.orderCode, _data_.content) console.log(thisPage.data.orderInfo.orderCode, _data_.content)
if (thisPage.data.orderInfo.orderCode == _data_.content) { if (thisPage.data.orderInfo.orderCode == _data_.content) {
console.log(_data_.type) console.log(_data_.type)
...@@ -318,11 +364,15 @@ export const setWebSocket = () => { ...@@ -318,11 +364,15 @@ export const setWebSocket = () => {
} }
/** 获取园区店下的4S店 */ /** 获取园区店下的4S店 */
export const get4SStoreList = (options, isSupervision, noScene) => { // isSupervision是否是区域运营/超管/飞行督导 noScene登录未选场景时 export const get4SStoreList = (options, isSupervision, noScene) => {
// isSupervision是否是区域运营/超管/飞行督导 noScene登录未选场景时
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.$util.showLoading() wx.$util.showLoading()
let all = { merchantName: '全部' } let all = { merchantName: '全部' }
let event = noScene || !isSupervision ? 'getSceneMerchantRefStoreList' : 'getCurShopList' let event =
noScene || !isSupervision
? 'getSceneMerchantRefStoreList'
: 'getCurShopList'
if (event == 'getCurShopList') { if (event == 'getCurShopList') {
options.sceneType = options.scene options.sceneType = options.scene
} }
...@@ -336,7 +386,8 @@ export const get4SStoreList = (options, isSupervision, noScene) => { // isSuperv ...@@ -336,7 +386,8 @@ export const get4SStoreList = (options, isSupervision, noScene) => { // isSuperv
// debugger // debugger
// console.log(data); // console.log(data);
// getCurShopList 接口数据结构不一致,要修改 // getCurShopList 接口数据结构不一致,要修改
let resolveData = (event == 'getCurShopList' ? data?.list : data) || [] let resolveData =
(event == 'getCurShopList' ? data?.list : data) || []
if (isSupervision) resolveData = [all, ...resolveData] if (isSupervision) resolveData = [all, ...resolveData]
// console.log(resolveData, 'resolveData'); // console.log(resolveData, 'resolveData');
resolve(resolveData) resolve(resolveData)
...@@ -473,12 +524,10 @@ export const loginLogAdd = options => { ...@@ -473,12 +524,10 @@ export const loginLogAdd = options => {
options.loginDeviceType = isPad ? 1 : 2 // 登录设备类型(1.pad,2手机) options.loginDeviceType = isPad ? 1 : 2 // 登录设备类型(1.pad,2手机)
options.loginSource = 1 // 登录来源(1.生意助手员工版小程序,默认) options.loginSource = 1 // 登录来源(1.生意助手员工版小程序,默认)
// "登录方式(1账号密码登录,2.手机号授权,3验证码)" // "登录方式(1账号密码登录,2.手机号授权,3验证码)"
api.loginLogAdd(options).then((result) => { api
.loginLogAdd(options)
}).catch((err) => { .then(result => {})
.catch(err => {})
});
} }
}) })
} }
...@@ -372,5 +372,13 @@ module.exports = { ...@@ -372,5 +372,13 @@ module.exports = {
return api.post('dj.api.smartcarlife.construction.summary.status', { return api.post('dj.api.smartcarlife.construction.summary.status', {
...params ...params
}) })
},
// 查询门店轻改录单设置
lightChangeSettingList(data){
let params = data || {}
return api.post('dj.api.smartcarlife.order.field.lightChange.setting.list', {
...params
})
} }
} }
...@@ -1658,6 +1658,7 @@ Page({ ...@@ -1658,6 +1658,7 @@ Page({
// app . // app .
getYQorderInfo() getYQorderInfo()
.then((merchantSettingInfo) => { .then((merchantSettingInfo) => {
console.log(merchantSettingInfo, 'merchantSettingInfo');
let dictionaryObj = { let dictionaryObj = {
carTypeRequiredFlag: "carBrand", carTypeRequiredFlag: "carBrand",
standNoRequiredFlag: "standNo", standNoRequiredFlag: "standNo",
...@@ -1866,7 +1867,7 @@ Page({ ...@@ -1866,7 +1867,7 @@ Page({
} }
// 是订单补录跳转进来的 // 是订单补录跳转进来的
if (res?.orderCreateType == "additionRecordOrder") { if (res?.orderCreateType == "additionRecordOrder") {
let {supplementId, selectOutTradeNoArr} = res let { supplementId, selectOutTradeNoArr } = res
if (supplementId) { if (supplementId) {
return this.checkShowOrderInfo() return this.checkShowOrderInfo()
} }
......
...@@ -61,9 +61,9 @@ const domain_items = { ...@@ -61,9 +61,9 @@ const domain_items = {
// dj: 'http://192.168.1.165:8292', // dj: 'http://192.168.1.165:8292',
// dj: 'http://192.168.1.104:8292', //叶立庆 // dj: 'http://192.168.1.104:8292', //叶立庆
// dj: "http://192.168.1.169:8292", //蔡远明 // dj: "http://192.168.1.169:8292", //蔡远明
dj: 'http://192.168.1.104:8292',//范富荣 // dj: 'http://192.168.1.104:8292',//范富荣
// dj: 'http://192.168.1.89:8292', //周杭 // dj: 'http://192.168.1.89:8292', //周杭
// dj: 'http://192.168.1.76:8292', //璐琦 dj: 'http://192.168.1.76:8292', //璐琦
// dj: 'http://192.168.1.227:8292',//陈希 // dj: 'http://192.168.1.227:8292',//陈希
// dj: 'http://192.168.1.67:8292',//周立明 // dj: 'http://192.168.1.67:8292',//周立明
// dj: 'http://192.168.148.235:8292',// 熊正顺 // dj: 'http://192.168.148.235:8292',// 熊正顺
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!