Commit f3cf2ee3 by 胡悦

Merge branch 'v1.0.5' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.5

2 parents 5d2aae9e 4cebd6f4
......@@ -42,7 +42,9 @@
<view class="info flex" :key="ind">
<view class="label">{{ k.label }}</view>
<view class="value">{{
k.format ? formatTime(item[k.key]) : item[k.key] || "-"
k.format
? formatTime(item[k.key], k.key)
: item[k.key] || "-"
}}</view>
</view>
</template>
......@@ -88,9 +90,9 @@ export default {
customerNameOrPhone: '',
isSearch: false,
list: [],
inviteStatus: { 1: '待邀约', 2: '已邀约', 3: '取消预约', 4: '已施工', 5: '超时未到店' },
inviteStatus: { 1: '待邀约', 2: '已邀约', 3: '取消预约', 4: '已施工', 5: '超时未到店',6: '已撤销',7: '已支付' },
itemObject: [
{ label: '客户电话', key: 'customerPhone' },
{ label: '客户电话', key: 'customerPhone',format:true },
{ label: '客户车型', key: 'carSeriesName' },
{ label: '礼券名称', key: 'couponName' },
{ label: '领券时间', key: 'receiveCouponDate',format:true },
......@@ -108,7 +110,10 @@ export default {
this.getRecordList()
},
methods: {
formatTime(val) {
formatTime(val,key) {
if(key == 'customerPhone') {
return val.slice(0, 3) + " " + val.slice(3, 7) + " " + val.slice(7)
}
return dayjs(val).format("YYYY-MM-DD HH:mm:ss")
},
//下拉分页
......@@ -260,11 +265,14 @@ export default {
font-weight: 500;
font-size: 24rpx;
justify-content: center;
background: #fdece9;
color: #f24724;
&.status_1 {
background: #fff5e6;
color: #ff9d0a;
}
&.status_2 {
&.status_2,
&.status_7 {
background: #eaf9f1;
color: #35c376;
}
......
......@@ -100,6 +100,11 @@ export default {
}
},
onLoad (options) {
if(options.stepIndex == 1 ) {
this.$nextTick(()=>{
this.$refs.account.getListSelectAccount(true)
})
}
},
mounted () {
},
......
......@@ -60,7 +60,7 @@ export default {
this.getListSelectAccount()
},
methods: {
getListSelectAccount () {
getListSelectAccount (autoLogin = false) {
uni.showLoading()
uni.$api.userApi.getListSelectAccount().then(res => {
uni.hideLoading()
......@@ -74,6 +74,7 @@ export default {
uni.$storage.set('sessionId', sessionId);
this.loginUserInfoList = loginUserInfoList
this.copyLoginUserInfoList = loginUserInfoList
if(autoLogin) this.chooseAccount(loginUserInfoList[0])
} else uni.showToast({
title: message,
icon: 'none',
......
......@@ -44,7 +44,7 @@ export default {
openSceneArr: [],
flag: false,
userInfo: {},
selectMerchantId:''
selectMerchantId: ''
}
},
onLoad () {
......@@ -53,13 +53,12 @@ export default {
methods: {
init (userInfo) {
this.userInfo = userInfo
this.getMerchantList()
this.getSceneArr()
},
getSceneArr () {
let { userInfo } = this
// 超管开通全部场景
if (userInfo?.isSuper) return
if (userInfo?.isSuper) return this.getMerchantList()
// 获取4s店关联场景数据
uni.$api.userApi.getYqMerchantSceneConfigAPI({
yqMerchantId: userInfo?.subLoginUser?.merchantId,
......@@ -67,6 +66,9 @@ export default {
}).then(result => {
uni.hideLoading()
this.openSceneArr = result.map(val => { if (val.sceneOpenFlag == 0) return val.scene }) || []
this.getMerchantList()
}).catch(err => {
this.getMerchantList()
})
},
getMerchantList () {
......@@ -81,6 +83,7 @@ export default {
this.loginUserInfoList = result
this.copyLoginUserInfoList = result
this.flag = true
if (result && result.length == 1) this.chooseAccount(result[0])
}).catch(err => {
uni.hideLoading()
console.log(err)
......@@ -109,7 +112,7 @@ export default {
title: '暂无开通业务,请联系总部管理员',
icon: 'none'
})
this.$emit('chooseMerchant',{
this.$emit('chooseMerchant', {
...userInfo,
shopMerchantName,
shopMerchantId,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!