Commit ac8f22d2 by 张立顺

Merge branch 'SAAS+V4.46-1031' into 'SAAS+V4.46.2-1119'

上线合并

See merge request !340
2 parents 9269a7c5 2d23fada
Showing 81 changed files with 1158 additions and 812 deletions
...@@ -28,7 +28,7 @@ import eventbus from "./utils/eventbus"; ...@@ -28,7 +28,7 @@ import eventbus from "./utils/eventbus";
import api from "./api/api"; import api from "./api/api";
import { Version } from "glsx-common-sdk"; import { Version } from "glsx-common-sdk";
import { areaList } from "@vant/area-data"; //预加载省市区 import { areaList } from "@vant/area-data"; //预加载省市区
// 将 api.reNoSignIn() 函数包装为节流函数 // 将 api.reNoSignIn() 函数包装为防抖函数
const debouncedReNoSignIn = debounce(function (noSignInUuid, that) { const debouncedReNoSignIn = debounce(function (noSignInUuid, that) {
console.log("debouncedReNoSignIn2222"); console.log("debouncedReNoSignIn2222");
api api
...@@ -37,9 +37,16 @@ const debouncedReNoSignIn = debounce(function (noSignInUuid, that) { ...@@ -37,9 +37,16 @@ const debouncedReNoSignIn = debounce(function (noSignInUuid, that) {
}) })
.then((res) => { .then((res) => {
let { code, data } = res; let { code, data } = res;
if (code == "0" && data) { if (code == "0" && data) {
util.setSessionId(data?.sessionId); util.setSessionId(data?.sessionId);
wx.reLaunch({ url: "/pages/loading/loading" }); // debugger
// 还要判断一下他是不是全部登录完,不是直接打到账号选择页面
if (!data.needSelectAccount) {
wx.reLaunch({ url: "/pages/loading/loading" });
} else {
// debugger
wx.reLaunch({ url: "/pages/accountItems/accountItems" });
}
} else { } else {
util.removeStorage(); util.removeStorage();
removeSystemStorage(); removeSystemStorage();
......
...@@ -14,7 +14,12 @@ ...@@ -14,7 +14,12 @@
</block> </block>
</view> </view>
<view class="name_box"> <view class="name_box">
<view class="item name text-hide">{{userInfo.name}}</view> <view class="item name text-hide">{{userInfo.name}}
<!-- <view class="flex" wx:if="{{userInfo.openId}}">
<gl-image mode="widthFix" class="wechat_icon" src="/wechat-icon.png" />
<view class="nickname">{{userInfo.nickname}}</view>
</view> -->
</view>
<view class="point-box" wx:if="{{isForbidden}}"> <view class="point-box" wx:if="{{isForbidden}}">
<view class="change_btn" bind:tap="toPoint">我的积分</view> <view class="change_btn" bind:tap="toPoint">我的积分</view>
<image class="icon_card" bindtap="jumpAccount" src="{{IMG_URL}}bank-card.png" mode="" /> <image class="icon_card" bindtap="jumpAccount" src="{{IMG_URL}}bank-card.png" mode="" />
......
...@@ -466,4 +466,20 @@ page { ...@@ -466,4 +466,20 @@ page {
background: #fff; background: #fff;
color: #333; color: #333;
border: 2rpx solid #e1e1e1; border: 2rpx solid #e1e1e1;
}
.flex{
margin-top:7rpx;
display: flex;
align-items: center;
}
.wechat_icon {
width: 32rpx;
height: 32rpx;
}
.nickname {
font-weight: 400;
font-size: 24rpx;
color: #5A5E66;
margin-left: 8rpx;
} }
\ No newline at end of file \ No newline at end of file
...@@ -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;
......
...@@ -10,13 +10,13 @@ module.exports = { ...@@ -10,13 +10,13 @@ module.exports = {
params, params,
); );
}, },
// 获取收益明细列表 // 获取收益明细列表
getScoreListApi(data) { getScoreListApi(data) {
let params = data || {} let params = data || {}
return api.post( "dj.api.smartcarlife.score.list", return api.post("dj.api.smartcarlife.score.list",
params params
); );
}, },
/** 根据id查询银行卡详情 */ /** 根据id查询银行卡详情 */
getStaffBankDetail(data) { getStaffBankDetail(data) {
let params = data || {} let params = data || {}
...@@ -60,5 +60,20 @@ module.exports = { ...@@ -60,5 +60,20 @@ module.exports = {
"dj.api.smartcarlife.withdrawal.insert", "dj.api.smartcarlife.withdrawal.insert",
params params
); );
},
// 查询员工微信openid
getStaffDetailApi(data) {
let params = data || {}
return api.post(
"dj.api.smartcarlife.staff.wechat.detail",
params
);
},
// 员工绑定微信
wechatBindApi(data) {
let params = data || {}
return api.post( "dj.api.smartcarlife.staff.wechat.binding",
params
);
} }
} }
\ No newline at end of file \ No newline at end of file
// components/Tab/Tab.js
Component({
/**
* 组件的属性列表
*/
properties: {
tab: Array,
openScroll: Boolean,
index: {
type: Number,
observer: function (n) {
this.setData({
count: n,
to: `to-${n}`
})
}
},
align: {
type: String,
default: ''
}
},
/**
* 组件的初始数据
*/
data: {
count: 0,
to: ''
},
/**
* 组件的方法列表
*/
methods: {
click(e) {
let { count } = e.currentTarget.dataset
this.setData({
count,
to: `to-${count}`
})
this.triggerEvent('click', count)
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* components/Tab/Tab.wxss */
.tab-box {
display: flex;
width: 100%;
height: 92rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #EAEBEF;
}
.flex {
display: flex;
align-items: center;
}
.tab-box.left{
padding-left: 32rpx;
}
.left .tab{
padding-right:40rpx;
}
.flex .tab {
flex: 1;
}
.tab {
position: relative;
flex-shrink: 0;
}
.tab .text {
height: 84rpx;
display: flex;
align-items: center;
box-sizing: border-box;
color: #8A8C90;
justify-content: center;
margin: 0 24rpx;
font-weight: 400;
font-size: 28rpx;
font-family: PingFangSC-Medium;
}
.left .text{
justify-content: flex-start;
}
.flex .tab .text {
padding: 0;
}
.tab.active .text {
font-weight: 500;
font-size: 28rpx;
transition: all .25s;
color:#347BFF;
}
.tab .line {
width: 48rpx;
height: 8rpx;
background:#347BFF;
border-radius: 8rpx 8rpx 0 0;
margin: 0 auto;
transform: scale(0);
transition: all .25s;
}
.tab.active .line {
transform: scale(1);
}
.tab-box::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
\ No newline at end of file \ No newline at end of file
<block wx:if="{{openScroll}}">
<scroll-view enhanced="{{true}}" show-scrollbar="{{false}}" class="tab-box {{align}}" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}" >
<view class="text" >{{item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line"></view>
</view>
</block>
</scroll-view>
</block>
<block wx:else>
<view class="tab-box flex">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}">
<view class="text text-center">{{item}}</view>
<view class="line"></view>
</view>
</block>
</view>
</block>
\ No newline at end of file \ No newline at end of file
...@@ -5,6 +5,23 @@ Page({ ...@@ -5,6 +5,23 @@ Page({
listData: [], listData: [],
isNoResult: true isNoResult: true
}, },
toastError(e){
const {
reason
} = e.currentTarget.dataset
console.log(reason)
// wx.$util.showToast(reason);
wx.showModal({
title: '',
content:String(reason) ,
showCancel: false,
confirmText: '我知道了',
confirmColor: '#1B233D',
success(res) {
}
})
},
onRoute(options) { onRoute(options) {
MineApi.getWithdrawalListApi().then(res => { MineApi.getWithdrawalListApi().then(res => {
if (res.code==0 && res.data) { if (res.code==0 && res.data) {
......
...@@ -75,6 +75,17 @@ page { ...@@ -75,6 +75,17 @@ page {
margin-left: auto; margin-left: auto;
padding-right: 30rpx; padding-right: 30rpx;
} }
.failReason {
line-height:32rpx ;
color: #F56C50;
width: 260rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
text-align:right;
}
} }
.line { .line {
...@@ -136,4 +147,9 @@ page { ...@@ -136,4 +147,9 @@ page {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
}
\ No newline at end of file \ No newline at end of file
}
.error-icon{
width: 24rpx;
height: 56rpx;
margin-left:4rpx;
}
...@@ -29,12 +29,17 @@ ...@@ -29,12 +29,17 @@
</block> </block>
<view class="countText flex"> <view class="countText flex">
-{{item.withdrawalScore}} -{{item.withdrawalScore}}
<view wx:if="{{item.type == -1}}" class="type"> <block wx:if="{{item.status == 4&&item.failReason}}">
消耗积分 <view class="type flex"><view class="failReason">{{item.failReason}} </view> <gl-image mode="widthFix" class="error-icon" bind:tap="toastError" data-reason="{{item.failReason}}" src="/error-icon.png" /></view>
</view> </block>
<view wx:else class="type"> <block wx:else>
{{item.type == 3 ?'银行卡':'微信'}}兑换 <view wx:if="{{item.type == -1}}" class="type">
</view> 消耗积分
</view>
<view wx:else class="type">
{{item.type == 3 ?'银行卡':item.type == 1?'零钱':'微信'}}兑换
</view>
</block>
</view> </view>
<view class="line"></view> <view class="line"></view>
<view class="date_wrap flex_scb"> <view class="date_wrap flex_scb">
......
...@@ -3,7 +3,12 @@ Page({ ...@@ -3,7 +3,12 @@ Page({
data: { data: {
}, },
onRoute(options) {
console.log(options)
this.setData({
title:options.title
})
},
toWatchNote(){ toWatchNote(){
wx.$router.reLaunch('integration.record') wx.$router.reLaunch('integration.record')
}, },
......
<view class="container"> <view class="container">
<gl-image mode="widthFix" class="icon" src="/bankAccount/success_icon_1.png" /> <gl-image mode="widthFix" class="icon" src="/bankAccount/success_icon_1.png" />
<view class="max_text">提交成功</view> <view class="max_text">提交成功</view>
<view class="tip_text">您的银行卡积分兑换申请已成功提交!</view> <view class="tip_text" wx:if="{{title=='微信兑换'}}">您的微信积分兑换申请已成功提交!</view>
<view class="tip_text" wx:else>您的银行卡积分兑换申请已成功提交!</view>
<!-- <view class="tip_text">您的提现申请已成功提交,预计将在24小时</view> --> <!-- <view class="tip_text">您的提现申请已成功提交,预计将在24小时</view> -->
<!-- <view class="tip_text">到达您的微信零钱,请留意到账情况</view> --> <!-- <view class="tip_text">到达您的微信零钱,请留意到账情况</view> -->
<view class="btn_group flex_cc"> <view class="btn_group flex_cc">
......
// integration/pages/point/toCash/toCash.js // integration/pages/point/toCash/toCash.js
import MineApi from '../../../api' import MineApi from '../../../api'
import api from '~/api/api'
import Dialog from '@vant/weapp/dialog/dialog'; import Dialog from '@vant/weapp/dialog/dialog';
Page({ Page({
data: { data: {
sumbitScore: '', sumbitScore: '',
showRate:false showRate: false,
showModal: false,
tabData: ['阳光激励兑换', '微信兑换'],
tabIndex: 0,
user: {}
},
onLoad() {
this.getStaffInfo();
},
tabClick(e) {
let {
tabData,
score
} = this.data
this.setData({
tabIndex: e.detail,
sumbitScore: tabData[e.detail] != '阳光激励兑换' ? score.wechatMotivationWithdrawalScore : score?.motivationWithdrawalScore
})
},
toShowBindModal(e) {
const {
name
} = e.detail
this.setData({
[name]: true
})
},
toCloseModal(e) {
const {
name
} = e.currentTarget.dataset
this.setData({
[name]: false
});
},
async toBindWechat(e) {
let _this = this
if (e.detail.errMsg === "getPhoneNumber:ok") {
wx.$util.showLoading();
wx.login({
success({
code
}) {
if (code) {
console.log(code,wx.getAccountInfoSync().miniProgram.appId)
api
.ssoLogin({
code,
appId: wx.getAccountInfoSync().miniProgram.appId
})
.then(res => {
if (res.code == '0') {
let {
user
} = _this.data;
let para = {
staffUuid: user.staffUuid,
openId: res.data.openId,
appId: wx.getAccountInfoSync().miniProgram.appId
}
MineApi.wechatBindApi(para).then((res) => {
if (res.code == 0) {
wx.$util.showToast('绑定成功')
_this.getStaffInfo();
}
});
}
})
} else {
wx.$util.showToast('登录失败')
}
}
})
}
},
getStaffInfo() {
const userStorage = wx.$util.getUserInfo()
let para = {
staffUuid: userStorage.uuid,
};
MineApi.getStaffDetailApi(para).then((res) => {
wx.hideLoading();
const temp = this.handleUserInfo(res.data)
this.setData({
user: temp
})
});
},
handleUserInfo(data) {
const userStorage = wx.$util.getUserInfo()
const USERINFO = {
...data,
staffUuid: userStorage.uuid,
};
return USERINFO;
}, },
toSumbitData() { toSumbitData() {
if (this.submit) return wx.$api.showToast('有一笔兑换正在进行') if (this.submit) return wx.$api.showToast('有一笔兑换正在进行')
let { let {
sumbitScore sumbitScore,
tabIndex,
user,
score: {
existWechatMotivationWithdrawal
},
rateInfo,
tabData,
} = this.data } = this.data
let withDrawType = 3 let withDrawType = 3
let rateQuery = {} let rateQuery = {}
console.log(this.accSub(Number(sumbitScore),0)) const money = this.accSub(Number(sumbitScore), 0)
const money = this.accSub(Number(sumbitScore),0) if (tabData[tabIndex] == '微信兑换' && !user?.openId) { // 微信兑换方式未绑定微信提示
this.setData({
showModal: true
})
return
}
if (existWechatMotivationWithdrawal && tabData[tabIndex] == '微信兑换') {
withDrawType = 4
}
if (money <= 0) return wx.$api.showToast(`您的积分不足,请确认后重新申请兑换`) if (money <= 0) return wx.$api.showToast(`您的积分不足,请确认后重新申请兑换`)
// if(rateInfo){ // if(rateInfo){
// rateQuery = { // rateQuery = {
...@@ -29,10 +140,14 @@ Page({ ...@@ -29,10 +140,14 @@ Page({
// this.toShowModal(sumbitScore) // this.toShowModal(sumbitScore)
// return // return
// } // }
this.comfirmSumbit(sumbitScore,withDrawType) this.comfirmSumbit(sumbitScore, withDrawType)
}, },
// 提现确认模块 // 提现确认模块
comfirmSumbit(sumbitScore,withDrawType,rateQuery={}){ comfirmSumbit(sumbitScore, withDrawType, rateQuery = {}) {
let {
tabIndex,
tabData,
} = this.data;
Dialog.confirm({ Dialog.confirm({
title: '提示', title: '提示',
message: `请确认是否将${sumbitScore}积分进行兑换`, message: `请确认是否将${sumbitScore}积分进行兑换`,
...@@ -43,11 +158,15 @@ Page({ ...@@ -43,11 +158,15 @@ Page({
MineApi.WithdrawalApi({ MineApi.WithdrawalApi({
withdrawalScore: sumbitScore, withdrawalScore: sumbitScore,
withDrawType, withDrawType,
withdrawalSource: 2,
wechatAppId: wx.getAccountInfoSync().miniProgram.appId,
sourceFrom: 1 // 来源 0:活动 1:阳光激励 sourceFrom: 1 // 来源 0:活动 1:阳光激励
}).then(res => { }).then(res => {
wx.hideLoading(); wx.hideLoading();
if (res.code == 0) { if (res.code == 0) {
wx.$router.redirectTo('integration.success') wx.$router.redirectTo(`integration.success`, {
title: tabData[tabIndex]
})
} else { } else {
wx.$api.showToast(res.message) wx.$api.showToast(res.message)
this.submit = false this.submit = false
...@@ -61,54 +180,62 @@ Page({ ...@@ -61,54 +180,62 @@ Page({
}); });
}, },
onRoute(options) { onRoute(options) {
// this.getRateInfo() console.log(options)
let {
tabData
} = this.data
if (!options.score.existWechatMotivationWithdrawal) {
tabData.findIndex(v => v == '微信兑换') > -1 && tabData.splice(tabData.findIndex(v => v == '微信兑换'), 1)
}
this.setData({ this.setData({
user: options.user, tabData,
score: options.score, score: options.score,
sumbitScore: options?.score?.motivationWithdrawalScore sumbitScore: options?.score?.motivationWithdrawalScore
}) })
}, },
/**添加手续费提示 */ /**添加手续费提示 */
toShowModal(sumbitScore){ toShowModal(sumbitScore) {
const Rate = Number(this.data.rateInfo) const Rate = Number(this.data.rateInfo)
const money = this.accSub(Number(sumbitScore),(Number(sumbitScore)*Rate)) const money = this.accSub(Number(sumbitScore), (Number(sumbitScore) * Rate))
const obj = { const obj = {
count:sumbitScore, count: sumbitScore,
money:money, money: money,
rate:`${Rate*100}%` rate: `${Rate*100}%`
} }
this.setData({ this.setData({
showRate:true, showRate: true,
rateMoney:obj rateMoney: obj
}) })
}, },
/**获取手续费 */ /**获取手续费 */
getRateInfo(){ getRateInfo() {
const userStorage = wx.$storage.get("userInfo"); const userStorage = wx.$storage.get("userInfo");
MineApi.getRate({merchantId:userStorage.merchantId}).then(res=>{ MineApi.getRate({
this.setData({ merchantId: userStorage.merchantId
rateInfo:res }).then(res => {
}) this.setData({
rateInfo: res
})
}) })
}, },
toJump(){ toJump() {
this.comfirmSumbit(this.tixianQuery.sumbitScore,this.tixianQuery.withDrawType,this.tixianQuery.rateQuery) this.comfirmSumbit(this.tixianQuery.sumbitScore, this.tixianQuery.withDrawType, this.tixianQuery.rateQuery)
}, },
accSub(arg1, arg2) { accSub(arg1, arg2) {
let r1, r2, m, n; let r1, r2, m, n;
try { try {
r1 = arg1.toString().split(".")[1].length; r1 = arg1.toString().split(".")[1].length;
} catch (e) { } catch (e) {
r1 = 0; r1 = 0;
} }
try { try {
r2 = arg2.toString().split(".")[1].length; r2 = arg2.toString().split(".")[1].length;
} catch (e) { } catch (e) {
r2 = 0; r2 = 0;
} }
m = Math.pow(10, Math.max(r1, r2)); //last modify by deeka //动态控制精度长度 m = Math.pow(10, Math.max(r1, r2)); //last modify by deeka //动态控制精度长度
n = (r1 >= r2) ? r1 : r2; n = (r1 >= r2) ? r1 : r2;
return ((arg1 * m - arg2 * m) / m).toFixed(n); return ((arg1 * m - arg2 * m) / m).toFixed(n);
} }
}) })
\ No newline at end of file \ No newline at end of file
{ {
"usingComponents": { "usingComponents": {
"van-dialog": "@vant/weapp/dialog/index", "van-dialog": "@vant/weapp/dialog/index",
"modal": "../../../components/Modal" "modal": "../../../components/Modal",
"tab":"../../../components/Tab/Tab"
}, },
"navigationBarTitleText":"兑换" "navigationBarTitleText":"兑换"
} }
\ No newline at end of file \ No newline at end of file
...@@ -6,13 +6,7 @@ page { ...@@ -6,13 +6,7 @@ page {
background-color: #fff; background-color: #fff;
} }
.container { .container {
padding: 32rpx; padding: 32rpx;
.container_title {
margin: 8rpx 0 24rpx;
font-size: 36rpx;
font-weight: 600;
color: #292D33;
}
} }
.input_wrapper { .input_wrapper {
...@@ -80,4 +74,63 @@ background-color: #fff; ...@@ -80,4 +74,63 @@ background-color: #fff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
}
.popclass {
position: relative;
border-radius: 24rpx 24rpx 0 0;
z-index: 999;
.modal_title {
font-weight: 500;
font-size: 40rpx;
color: #333333;
box-sizing: border-box;
padding-top: 48rpx;
padding-left: 49rpx;
}
.modal_tip {
font-weight: 400;
font-size: 32rpx;
color: #333333;
margin-top: 64rpx;
padding-left: 49rpx;
}
.modal_error {
font-size: 32rpx;
color: #FE5662;
margin-top: 12rpx;
padding-left: 49rpx;
}
.btns {
display: flex;
padding:0 48rpx;
gap: 0 20rpx;
}
.modal_btn {
margin: 0;
width: calc(100% - 98rpx);
height: 88rpx;
margin: 0 auto;
margin-top: 120rpx;
background:#347BFF;
border-radius: 20rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
&::after {
display: none;
}
}
.default{
background:#fff;
color: #333;
border: 2rpx solid #e1e1e1;
}
} }
\ No newline at end of file \ No newline at end of file
<!--integration/pages/point/toCash/toCash.wxml--> <!--integration/pages/point/toCash/toCash.wxml-->
<block> <block>
<view class="tab">
<tab tab="{{tabData}}" openScroll="{{tabData.length <= 1}}" index="{{tabIndex}}" bindclick="tabClick"></tab>
</view>
<view class="container"> <view class="container">
<view class="container_title">阳光激励兑换</view>
<view class="input_wrapper"> <view class="input_wrapper">
<view class="title">兑换积分</view> <view class="title">兑换积分</view>
<view class="int_widget flex_scb"> <view class="int_widget flex_scb">
<input type="digit" value="{{sumbitScore}}" disabled class="intClass" /> <input type="digit" value="{{sumbitScore}}" disabled class="intClass" />
</view> </view>
<view class="score_tip">银行卡可兑换积分:{{score.motivationWithdrawalScore}}</view> <view class="score_tip">银行卡可兑换积分:{{tabData[tabIndex] == '微信兑换'?score.wechatMotivationWithdrawalScore:score.motivationWithdrawalScore}}</view>
</view> </view>
<view class="tip_msg_warn">兑换规则:<view>1.每次兑换只能把积分一次性全部兑换,不可分批兑换</view> <view class="tip_msg_warn">兑换规则:<view>1.每次兑换只能把积分一次性全部兑换,不可分批兑换</view>
<view>2.工作日17点前兑换的当日到账,17点后兑换的次日到账;非工作日顺延。</view></view> <view hidden="{{tabData[tabIndex] == '微信兑换'}}">2.工作日17点前兑换的当日到账,17点后兑换的次日到账;非工作日顺延。</view></view>
<view class="sumbit_btn flex_cc" bind:tap="toSumbitData">提交</view> <view class="sumbit_btn flex_cc" bind:tap="toSumbitData">提交</view>
</view> </view>
<van-dialog id="van-dialog" /> <van-dialog id="van-dialog" />
</block> </block>
<!-- 绑定微信提示弹框 -->
<van-popup bind:click-overlay="toCloseModal" show="{{ showModal }}" custom-class="popclass" position="bottom" custom-style="height: 35%" data-name="showModal">
<view class="modal_title">提示</view>
<view class="modal_tip">您未绑定微信,请先完成绑定</view>
<button class="modal_btn" open-type="getPhoneNumber" catch:tap="toCloseModal" data-name="showModal" bindgetphonenumber="toBindWechat">去绑定</button>
</van-popup>
<glsx-privacy appletName="生意助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<!-- <modal show="{{showRate}}" info="{{rateMoney}}" bind:sumbit="toJump"></modal> --> <!-- <modal show="{{showRate}}" info="{{rateMoney}}" bind:sumbit="toJump"></modal> -->
...@@ -215,5 +215,9 @@ module.exports = { ...@@ -215,5 +215,9 @@ module.exports = {
// 攻防明细 // 攻防明细
defencedetail(data) { defencedetail(data) {
return api.post("dj.api.smartcarlife.app.inspection.defence.detail", data); return api.post("dj.api.smartcarlife.app.inspection.defence.detail", data);
},
// 更新客户签名
updateCustomerNameUrlAPI(data) {
return api.post("dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.updateCustomerNameUrl", data)
} }
} }
...@@ -287,6 +287,7 @@ Page({ ...@@ -287,6 +287,7 @@ Page({
}); });
}, },
init(userInfo) { init(userInfo) {
console.log(8989)
this.setData({ this.setData({
userInfo, userInfo,
}); });
...@@ -590,7 +591,6 @@ Page({ ...@@ -590,7 +591,6 @@ Page({
}, },
onRoute(options) { onRoute(options) {
// console.log(options, "options");
wx.__HAS_SHOW_MODAL = false; wx.__HAS_SHOW_MODAL = false;
if (options && options.tabIndex) { if (options && options.tabIndex) {
this.changeTabBar({ this.changeTabBar({
......
/* packageEquity/pages/TabBar/equityPage.wxss */
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/aiCheck/redundance/redundance.wxss */
\ No newline at end of file \ No newline at end of file
page {
background: #fff;
}
.layout {
.to-box {
position: sticky;
top: 0;
z-index: 2;
.search-box {
width: 100%;
padding: var(--fontSize32) var(--fontSize32) 0;
display: flex;
background-color: #fff;
position: sticky;
top: 0;
left: 0;
z-index: 9;
box-sizing: border-box;
.search-input {
background: #f7f8fa;
border-radius: var(--fontSize38);
width: 100%;
height: var(--fontSize72);
display: flex;
align-items: center;
.search-icon {
width: var(--fontSize28);
height: var(--fontSize28);
margin: 0 var(--fontSize10) 0 var(--fontSize26);
}
.clearBtn {
width: var(--fontSize100);
height: var(--fontSize100);
position: relative;
}
.search-clear {
position: absolute;
left: var(--fontSize40);
top: var(--fontSize33);
width: var(--fontSize36);
height: var(--fontSize36);
/* margin: 0 var(--fontSize26) 0 var(--fontSize10); */
}
.input {
font-size: var(--fontSize28);
height: var(--fontSize29);
line-height: var(--fontSize29);
width: calc(100% - var(--fontSize136));
}
.input-placeholder {
color: rgba(200, 201, 204, 0.89);
}
}
.search {
width: var(--fontSize144);
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 var(--fontSize24);
.text-center {
font-size: var(--fontSize24);
/* background-color: #f7f7f7; */
border-radius: var(--fontSize12);
width: 100%;
height: var(--fontSize50);
color: #888;
.search-filter {
margin-left: var(--fontSize6);
width: var(--fontSize24);
height: var(--fontSize24);
}
}
}
}
}
.content {
padding: 0 var(--fontSize20) var(--fontSize100);
.ai-item {
background: #ffffff;
box-shadow: 0 var(--fontSize4) var(--fontSize16) 0 #cdcdd180;
border-radius: var(--fontSize16);
margin-bottom: var(--fontSize20);
box-sizing: border-box;
padding: 0 var(--fontSize20);
position: relative;
}
.ai-top {
height: var(--fontSize88);
border-bottom: 2rpx solid #eff0f2;
display: flex;
align-items: center;
font-size: var(--fontSize28);
color: #292d33;
.ai-title {
flex: 1;
text-overflow: ellipsis;
}
text {
font-weight: 700;
}
.status {
margin-left: var(--fontSize20);
height: var(--fontSize44);
line-height: var(--fontSize44);
border-radius: var(--fontSize4);
padding: 0 var(--fontSize8);
font-weight: 500;
font-size: var(--fontSize24);
background: #F47F13;
color: #FE9220;
}
.status-1 {
background:#EAF9F1;
color: #35C376;
}
.status-2 {
background: #eaf9f1;
color: #35c376;
}
}
.ai-mid {
margin: var(--fontSize20) 0;
.item-desc {
display: flex;
height: var(--fontSize50);
line-height: var(--fontSize50);
align-items: center;
font-size: var(--fontSize24);
.item-label {
width: 30%;
color: #999ea8;
}
.item-value {
color: #292d33;
}
}
}
.ai-bottom {
height: var(--fontSize86);
padding: 0 var(--fontSize12);
font-size: var(--fontSize24);
color: #999ea8;
display: flex;
justify-content: flex-end;
.ai-btn {
margin-left: var(--fontSize16);
font-size: var(--fontSize28);
color: #ffffff;
width: 30%;
height: var(--fontSize56);
line-height: var(--fontSize56);
text-align: center;
background: #347bff;
border-radius: var(--fontSize32);
justify-content: center;
}
.ai-btn-c {
margin-left: var(--fontSize16);
font-size: var(--fontSize28);
color: #347bff;
width: 30%;
height: var(--fontSize56);
line-height: var(--fontSize52);
text-align: center;
box-sizing: border-box;
border: var(--fontSize2) solid #347bff;
border-radius: var(--fontSize32);
justify-content: center;
}
}
}
}
@media screen and (min-device-width: 600px) and (-webkit-min-device-pixel-ratio: 1) {
.content {
display: grid;
gap: var(--fontSize20);
grid-template-columns: repeat(3, 1fr);
}
.layout {
.content {
.ai-top {
height: var(--fontSize48);
font-size: var(--fontSize16);
.status {
height: var(--fontSize34);
line-height: var(--fontSize34);
border-radius: var(--fontSize4);
padding: 0 var(--fontSize6);
font-size: var(--fontSize15);
}
}
.ai-mid {
.item-desc {
font-size: var(--fontSize15);
height: var(--fontSize40);
line-height: var(--fontSize40);
}
}
.ai-bottom {
height: var(--fontSize64);
.ai-btn,
.ai-btn-c {
font-size: var(--fontSize16);
height: var(--fontSize40);
line-height: var(--fontSize40);
}
}
}
}
}
/* packageEquity/pages/aiExcercise/detail/detail.wxss */
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/aiExcercise/result/result.wxss */
page {
background: #f7f8fa;
}
.avatar-box {
height: var(--fontSize750);
width: 100%;
position: fixed;
top: var(--fontSize90);
left: 0;
.avatar {
width: 100%;
height: 100%;
}
}
.camera-box {
position: fixed;
top: var(--fontSize90);
right: 0;
z-index: 100;
width: var(--fontSize240);
height: var(--fontSize320);
}
.input-box {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background: #ffffff;
height: calc(var(--fontSize104) + var(--envSafeAreaInsetBottom));
}
.dialog-box {
padding: var(--fontSize24) var(--fontSize64);
font-size: var(--fontSize28);
color: #5a5e66;
letter-spacing: 0;
text-align: center;
line-height: var(--fontSize40);
text {
color: #347bff;
}
}
.chat {
position: fixed;
left: 0;
width: 100%;
top: var(--fontSize840);
padding: var(--fontSize24) 0;
padding-bottom: 10rpx;
.chat-item {
font-size: var(--fontSize32);
color: #333333;
line-height: var(--fontSize44);
margin-bottom: var(--fontSize24);
.icon {
height: var(--fontSize40);
width: var(--fontSize40);
}
.chat-left {
display: flex;
.content {
max-width: var(--fontSize560);
padding: var(--fontSize20);
background: #ffffff;
border-radius: 0 var(--fontSize20) var(--fontSize20) var(--fontSize20);
margin-left: var(--fontSize12);
.dot {
display: inline-block;
width: 6rpx;
height: 6rpx;
background: #333333;
border-radius: 50%;
margin-right: 4rpx;
}
}
}
.chat-right {
display: flex;
justify-content: flex-end;
.content {
margin-right: var(--fontSize12);
padding: var(--fontSize20);
max-width: var(--fontSize560);
background: #d6e7ff;
border: 1rpx solid #3a76f033;
border-radius: var(--fontSize20) 0 var(--fontSize20) var(--fontSize20);
}
}
}
}
.chat-consult {
text-align: center;
font-weight: 400;
font-size: var(--fontSize24);
color: #999999;
text {
color: #3582ee;
}
}
.chat-check {
margin: var(--fontSize10);
.chat-analysis {
font-size: var(--fontSize28);
line-height: var(--fontSize46);
color: #333333;
text-align: center;
}
.chat-wait {
font-size: var(--fontSize24);
color: #999999;
text-align: center;
line-height: var(--fontSize32);
}
}
.chat-end {
font-size: var(--fontSize24);
color: #999999;
text-align: center;
margin: var(--fontSize24);
}
.chat-result {
background-image: url(https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/equity/ai_bg.png);
background-size: 100% 100%;
width: var(--fontSize686);
height: var(--fontSize152);
padding-bottom: var(--fontSize36);
display: flex;
align-items: center;
padding: var(--fontSize32) var(--fontSize40);
box-sizing: border-box;
.icon {
width: var(--fontSize88);
height: var(--fontSize88);
}
.result-desc {
margin-left: var(--fontSize24);
.result-top {
font-weight: 500;
font-size: var(--fontSize32);
color: #333333;
}
.result-bottom {
line-height: var(--fontSize48);
font-size: var(--fontSize28);
color: #666666;
text {
color: #eb4e4e;
}
}
}
}
.tips-box {
position: fixed;
left: 0;
z-index: 10;
bottom: calc(var(--fontSize104) + var(--envSafeAreaInsetBottom));
width: 100%;
height: var(--fontSize240);
background-image: linear-gradient(180deg, #d6e6fb 0%, #ffffff 14%);
box-sizing: border-box;
.tips-title {
padding: var(--fontSize28) var(--fontSize32) var(--fontSize14);
font-weight: 600;
font-size: var(--fontSize32);
color: #3582ee;
.icon-close {
margin-left: auto;
}
}
.tips-view {
height: calc(100% - var(--fontSize66));
overflow-y: scroll;
padding: 0 var(--fontSize32);
.tips-item {
border-bottom: 1px solid #e4e6ee;
line-height: var(--fontSize36);
padding: var(--fontSize7) 0;
font-size: var(--fontSize26);
color: #333333;
.icon-more {
margin-left: auto;
flex-shrink: 0;
// background-position: -60px -72px;
// transform: translateY(-2px);
}
&:last-of-type {
border: none;
}
}
}
}
@media screen and (min-device-width: 1000px) and (-webkit-min-device-pixel-ratio: 1) {
}
/* packageEquity/pages/aiExcercise/result/result.wxss */
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/aiInspectionReception/aiInspectionReception.wxss */
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/carEquity/carBrands/carBrands.wxss */
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/carEquity/carSeries/carSeries.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -295,6 +295,18 @@ Component({ ...@@ -295,6 +295,18 @@ Component({
return return
}, },
// 签名
async handleSignature(e) {
// 校验是否填写昨日日报
let staffCheck = await checkDailyReport(true);
if (staffCheck) return false;
let { target } = e.currentTarget.dataset
wx.$router.go("signature", {
orderId: target.orderId,
tabIndex: 2
});
},
// 复制链接 // 复制链接
copyContractUrl(e) { copyContractUrl(e) {
if (!e) { if (!e) {
......
...@@ -102,20 +102,26 @@ ...@@ -102,20 +102,26 @@
</view> </view>
<!-- footer --> <!-- footer -->
<view class="item-footer"> <view class="item-footer">
<view>{{item.createdDate}}</view> <!-- <view>{{item.createdDate}}</view> -->
<!-- 超管isSuper/商户类型 userType 1账号不可操作 --> <!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<block wx:if="{{ ((!userInfo.isSuper && userInfo.userType == 2&&item.orderStatus!=4)||(item.orderStatus==2))&&isOrder }}"> <block wx:if="{{ ((!userInfo.isSuper && userInfo.userType == 2&&item.orderStatus!=4)||(item.orderStatus==2))&&isOrder }}">
<view class="btn_box_class"> <view class="btn_box_class">
<view
class="order-btn default-btn"
bindtap="handleSignature"
data-target="{{ item }}"
data-type="download"
>{{item.customerNameUrl ? '修改客户签名' : '补录客户签名'}}</view>
<view <view
wx:if="{{ item.orderStatus == '2' }}" wx:if="{{ item.orderStatus == '2' }}"
class="order-btn" class="order-btn default-btn"
bindtap="handlePreviewContract" bindtap="handlePreviewContract"
data-target="{{ item }}" data-target="{{ item }}"
data-type="download" data-type="download"
>下载合同</view> >下载合同</view>
<view <view
wx:if="{{ item.orderStatus == '2' }}" wx:if="{{ item.orderStatus == '2' }}"
class="order-btn default-btn" class="order-btn"
bindtap="handlePreviewContract" bindtap="handlePreviewContract"
data-target="{{ item }}" data-target="{{ item }}"
>{{btnTxt[item.orderStatus]}}</view> >{{btnTxt[item.orderStatus]}}</view>
......
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #222222; color: #222222;
padding: var(--fontSize20) var(--fontSize32); padding: var(--fontSize20) var(--fontSize32);
border-bottom: var(--fontSize1) solid #E1E2E6; border-bottom: var(--fontSize1) solid #C3C3C34D;
} }
.list .icon-sex { .list .icon-sex {
...@@ -402,7 +402,7 @@ ...@@ -402,7 +402,7 @@
.item-footer { .item-footer {
display: flex; display: flex;
justify-content: space-between; justify-content: flex-end;
align-items: center; align-items: center;
font-size: var(--fontSize24); font-size: var(--fontSize24);
color: #9B9B9E; color: #9B9B9E;
...@@ -424,8 +424,8 @@ ...@@ -424,8 +424,8 @@
color: #FFFFFF; color: #FFFFFF;
background: #347BFF; background: #347BFF;
border-radius: var(--fontSize32); border-radius: var(--fontSize32);
padding: 0 var(--fontSize40); padding: 0 var(--fontSize32);
margin-right: var(--fontSize10); margin-right: var(--fontSize16);
} }
.order-btn:last-child{ .order-btn:last-child{
margin-right: 0; margin-right: 0;
...@@ -436,7 +436,6 @@ ...@@ -436,7 +436,6 @@
border: var(--fontSize2) solid #347BFF; border: var(--fontSize2) solid #347BFF;
border-radius: var(--fontSize32); border-radius: var(--fontSize32);
color: #347BFF; color: #347BFF;
margin-left: var(--fontSize30);
} }
.list .item .order { .list .item .order {
......
...@@ -302,7 +302,7 @@ ...@@ -302,7 +302,7 @@
<van-uploader <van-uploader
class="plus" class="plus"
file-list="{{ imgObj.other }}" file-list="{{ imgObj.other }}"
upload-text="上传照片n最多9张" upload-text="上传照片\n最多9张"
max-count="9" max-count="9"
deletable deletable
preview-size="var(--fontSize192)" preview-size="var(--fontSize192)"
......
/* packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.wxss */
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/carQuotation/fullSignture/fullSignture.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -265,7 +265,7 @@ ...@@ -265,7 +265,7 @@
class="order-btn default-btn padding_20" class="order-btn default-btn padding_20"
bindtap="handleClickBtn" bindtap="handleClickBtn"
data-target="{{ item }}" data-target="{{ item }}"
>去签名</view> >客户签名</view>
<!-- 已支付/已完成未录单 --> <!-- 已支付/已完成未录单 -->
<view <view
wx:if="{{ (item.orderStatus == '3' && item.equityOrderStatus == '0'&& item.equityGoodsFlag == '1') || (item.orderStatus == '5' && item.equityOrderStatus == '0'&& item.equityGoodsFlag == '1') }}" wx:if="{{ (item.orderStatus == '3' && item.equityOrderStatus == '0'&& item.equityGoodsFlag == '1') || (item.orderStatus == '5' && item.equityOrderStatus == '0'&& item.equityGoodsFlag == '1') }}"
......
/* packageEquity/pages/carQuotation/reception/reception.wxss */
\ No newline at end of file \ No newline at end of file
import { uploadImg } from '~/api/api' import { uploadImg } from '~/api/api'
import { quotationUpgrade, updateOrderStatus } from '../../../api' import { quotationUpgrade, updateOrderStatus, updateCustomerNameUrlAPI } from '../../../api'
// import api from '../../../carEquityApi' // import api from '../../../carEquityApi'
import carLifeApi from '~/packageEquity/carEquityApi' import carLifeApi from '~/packageEquity/carEquityApi'
Page({ Page({
...@@ -35,10 +35,13 @@ Page({ ...@@ -35,10 +35,13 @@ Page({
let id = options.id let id = options.id
// let equityGoodsFlag = options.equityGoodsFlag // let equityGoodsFlag = options.equityGoodsFlag
let orderId = options.orderId let orderId = options.orderId
this.getEquityDetail(orderId) if (options.tabIndex != 2) {
this.getEquityDetail(orderId)
}
this.setData({ this.setData({
id, id,
orderId, orderId,
tabIndex: options.tabIndex // 1数字报价单 2权益提单
// equityGoodsFlag, // equityGoodsFlag,
}) })
}, },
...@@ -205,7 +208,8 @@ Page({ ...@@ -205,7 +208,8 @@ Page({
}, },
cancel() { cancel() {
// wx.$router.reLaunch('') // wx.$router.reLaunch('')
wx.$router.reLaunch('packageEquity.equityPage', { tabIndex: 1 }) let { tabIndex } = this.data
wx.$router.reLaunch('packageEquity.equityPage', { tabIndex: tabIndex || 1 })
}, },
toFullPage() { toFullPage() {
let { id, orderId } = this.data let { id, orderId } = this.data
...@@ -214,6 +218,7 @@ Page({ ...@@ -214,6 +218,7 @@ Page({
// 上传图片 // 上传图片
toUploadImage(tempFilePaths) { toUploadImage(tempFilePaths) {
let _this = this let _this = this
let { tabIndex } = _this.data
const tempFiles = tempFilePaths const tempFiles = tempFilePaths
let imgType = tempFiles.split('.')[1] let imgType = tempFiles.split('.')[1]
let type = imgType == 'unknown' ? 'jpg' : imgType let type = imgType == 'unknown' ? 'jpg' : imgType
...@@ -227,8 +232,13 @@ Page({ ...@@ -227,8 +232,13 @@ Page({
}).then(res => { }).then(res => {
let { data } = res let { data } = res
// _this.saveToHttp(data) // _this.saveToHttp(data)
// 更新报价单状态 if (tabIndex == 2) {
_this.changeOrderStatus(data) // 更新权益单客户签名信息
_this.updateEquityCustomerMessage(data)
} else {
// 更新报价单状态
_this.changeOrderStatus(data)
}
}) })
}, },
fail() { fail() {
...@@ -236,6 +246,13 @@ Page({ ...@@ -236,6 +246,13 @@ Page({
} }
}) })
}, },
updateEquityCustomerMessage(signUrl) {
let { orderId } = this.data
updateCustomerNameUrlAPI({orderId, customerNameUrl: signUrl}).then(res => {
wx.$util.hideLoading()
wx.$router.go('packageEquity.equityPage', { tabIndex: 2 })
})
},
changeOrderStatus(signUrl) { changeOrderStatus(signUrl) {
let { id, equityGoodsFlag } = this.data let { id, equityGoodsFlag } = this.data
updateOrderStatus({ id, orderStatus: 5, customerNameUrl: signUrl }) updateOrderStatus({ id, orderStatus: 5, customerNameUrl: signUrl })
......
/* packageEquity/pages/carQuotation/updateOrderInfo/updateOrderInfo.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -11,90 +11,90 @@ Page({ ...@@ -11,90 +11,90 @@ Page({
*/ */
data: { data: {
customerObj: [{ customerObj: [{
label: '客户姓名', label: '客户姓名',
key: 'customerName' key: 'customerName'
}, },
{ {
label: '手机号', label: '手机号',
key: 'customerPhone', key: 'customerPhone',
// color: '#347BFF', // color: '#347BFF',
// callBack: 'makePhoneCall', // callBack: 'makePhoneCall',
copy: true copy: true
}, },
{ {
label: '性别', label: '性别',
key: 'customerSex', key: 'customerSex',
enum: { enum: {
1: '男', 1: '男',
2: '女' 2: '女'
}
},
{
label: '年龄区间',
key: 'customerAgeRange',
},
{
label: '所在城市',
key: 'customerCity',
},
{
label: '兴趣爱好',
key: 'customerHobby'
},
{
label: '陪伴人员',
key: 'customerCompanion'
},
{
label: '销售顾问',
key: 'employeeName'
},
{
label: '客户画像',
key: 'userPortrait',
portrait: true
} }
},
{
label: '年龄区间',
key: 'customerAgeRange',
},
{
label: '所在城市',
key: 'customerCity',
},
{
label: '兴趣爱好',
key: 'customerHobby'
},
{
label: '陪伴人员',
key: 'customerCompanion'
},
{
label: '销售顾问',
key: 'employeeName'
},
{
label: '客户画像',
key: 'userPortrait',
portrait: true
}
], ],
carInfoObk: [{ carInfoObk: [{
label: '客户车型', label: '客户车型',
key: 'carSeriesName' key: 'carSeriesName'
}, },
{ {
label: '车辆颜色', label: '车辆颜色',
key: 'carColor' key: 'carColor'
}, },
{ {
label: '座位数', label: '座位数',
key: 'carSeat' key: 'carSeat'
}, },
{ {
label: '车辆价格', label: '车辆价格',
key: 'carPrice' key: 'carPrice'
}, },
{ {
label: '车架号码', label: '车架号码',
key: 'carVin' key: 'carVin'
}, },
], ],
recordObj: [{ recordObj: [{
label: '跟进人', label: '跟进人',
key: 'follower' key: 'follower'
}, },
{ {
label: ['事', '件'], label: ['事', '件'],
key: 'eventDesc', key: 'eventDesc',
// enum: { // enum: {
// 1: '车主领券', // 1: '车主领券',
// 2: '车主预约', // 2: '车主预约',
// 3: '预约时间', // 3: '预约时间',
// 4: '修改时间', // 4: '修改时间',
// 5: '取消预约' // 5: '取消预约'
// } // }
}, },
{ {
label: ['备', '注'], label: ['备', '注'],
key: 'remark' key: 'remark'
} }
], ],
}, },
...@@ -195,7 +195,20 @@ Page({ ...@@ -195,7 +195,20 @@ Page({
_userPortrait.push(item.optionList.find(k => k.confId == n).confName) _userPortrait.push(item.optionList.find(k => k.confId == n).confName)
}) })
} else { } else {
_userPortrait.push(item.optionList.find(k => k.confId == info[item.name])?.otherName || item.optionList.find(k => k.confId == info[item.name])?.confName) // _userPortrait.push(item.optionList.find(k => k.confId == info[item.name])?.otherName || item.optionList.find(k => k.confId == info[item.name])?.confName)
let labelName = item.optionList.find((k) => k.confId == info[item.name])
if (labelName?.label) {
_userPortrait.push(
labelName?.otherName ||
labelName?.confName + ' ' + labelName?.label
);
} else {
_userPortrait.push(
labelName?.otherName ||
labelName?.confName
);
}
} }
} }
} }
......
...@@ -44,6 +44,88 @@ const maritalStatus = [ ...@@ -44,6 +44,88 @@ const maritalStatus = [
confName: '未婚' confName: '未婚'
} }
] ]
// "职业(1:公务员(公检法),2:医生,3:教师,4:老板,5:律师,6:企业高管,7:IT/工程师,8:公司职员,9:其他")
const career = [
{
confId: '1',
confName: '公务员(公检法)'
},
{
confId: '2',
confName: '医生'
},
{
confId: '3',
confName: '教师'
},
{
confId: '4',
confName: '老板'
},
{
confId: '5',
confName: '律师'
},
{
confId: '6',
confName: '企业高管'
},
{
confId: '7',
confName: 'IT/工程师'
},
{
confId: '8',
confName: '公司职员'
},
{
confId: '9',
confName: '其他'
},
]
// (1:S 爽快型,2:K 侃价型,3:Y 依赖型,4:W 无语型,5:O 偶伴型,6:R 认捧型,7:T 挑剔型,8:H 好奇型")
const personality = [
{
confId: '1',
confName: 'S 爽快型',
label: '冲动、承担风险'
},
{
confId: '2',
confName: 'K 侃价型',
label: '谨慎、避免损失'
},
{
confId: '3',
confName: 'Y 依赖型',
label: '顺从别人'
},
{
confId: '4',
confName: 'W 无语型',
label: '内向、避免损失'
},
{
confId: '5',
confName: '0 偶伴型',
label: '避免损失、集体决策'
},
{
confId: '6',
confName: 'R 认捧型',
label: '寻求认同'
},
{
confId: '7',
confName: 'T 挑剔型',
label: '谨慎、避免损失'
},
{
confId: '8',
confName: 'H 好奇型',
label: '追求新奇'
},
]
const giftProduct = [ const giftProduct = [
{ {
confId: '1', confId: '1',
...@@ -179,14 +261,30 @@ var formData = [ ...@@ -179,14 +261,30 @@ var formData = [
optionsName: 'maritalStatus' optionsName: 'maritalStatus'
}, },
{ {
label: '附赠产品(每类产品只支持选一个选项)', label: '职业',
name: 'giftProductList', name: 'career',
isMult: true, optionList: career,
optionList: giftProduct,
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'sexList' optionsName: 'career'
},
{
label: '性格类型',
name: 'personality',
optionList: personality,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'personality'
}, },
// {
// label: '附赠产品(每类产品只支持选一个选项)',
// name: 'giftProductList',
// isMult: true,
// optionList: giftProduct,
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'sexList'
// },
{ {
label: '买车情况(单选)', label: '买车情况(单选)',
...@@ -253,5 +351,7 @@ export default { ...@@ -253,5 +351,7 @@ export default {
promoteList, promoteList,
satisfiedList, satisfiedList,
timeList, timeList,
formData formData,
career,
personality
} }
/* packageEquity/pages/collegeScene/collegeScene.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -34,17 +34,6 @@ ...@@ -34,17 +34,6 @@
catchinput="input" catchinput="input"
/> />
</view> </view>
<!-- <view class="fixed-remark">
<gl-textarea
value="{{value}}"
show="{{show}}"
bindinput="blur"
maxlength="{{maxlength}}"
placeholder="{{placeholder || '请输入'}}"
isLimitNum="{{isLimitNum}}"
isInt="{{isInt}}"
customMaxLength></gl-textarea>
</view> -->
</view> </view>
<view class="fixed-footer"> <view class="fixed-footer">
<view class="fixed-cancel text-center" bindtap="showPopup" data-btnName="cancel" data-name="passwordPop">取消</view> <view class="fixed-cancel text-center" bindtap="showPopup" data-btnName="cancel" data-name="passwordPop">取消</view>
......
/* packageEquity/pages/deliveryTarget/deliveryTarget.wxss */
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/ocrEquityModules/ocrEquityModules.wxss */
\ No newline at end of file \ No newline at end of file
/* packageEquity/pages/receptionDetail/receptionDetail.wxss */
\ No newline at end of file \ No newline at end of file
/* pages/sceneIndex/sceneIndex.wxss */
\ No newline at end of file \ No newline at end of file
/* pages/log/log.wxss */
\ No newline at end of file \ No newline at end of file
/* pages/sceneIndex/sceneIndex.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -43,4 +43,12 @@ module.exports = { ...@@ -43,4 +43,12 @@ module.exports = {
params, params,
); );
}, },
// 查询员工微信openid
getStaffDetailApi(data) {
let params = data || {}
return api.post(
"dj.api.smartcarlife.staff.wechat.detail",
params
);
},
} }
\ No newline at end of file \ No newline at end of file
...@@ -222,9 +222,3 @@ ...@@ -222,9 +222,3 @@
<button class="modal_btn" catchtap="toEditBankAccount" >去编辑</button> <button class="modal_btn" catchtap="toEditBankAccount" >去编辑</button>
</view> </view>
</van-popup> </van-popup>
<!-- 绑定微信提示弹框 -->
<van-popup bind:click-overlay="toCloseModal" show="{{ showModal }}" custom-class="popclass" position="bottom" custom-style="height: 35%" data-name="showModal">
<view class="modal_title">提示</view>
<view class="modal_tip">您未绑定微信,请先完成绑定</view>
<button class="modal_btn" open-type="getPhoneNumber" catch:tap="toCloseModal" data-name="showModal" bindgetphonenumber="toBindWechat">去绑定</button>
</van-popup>
\ No newline at end of file \ No newline at end of file
...@@ -53,6 +53,7 @@ page { ...@@ -53,6 +53,7 @@ page {
color: #323436; color: #323436;
font-weight: 600; font-weight: 600;
} }
.point-box { .point-box {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -455,6 +456,7 @@ page { ...@@ -455,6 +456,7 @@ page {
.work-box .disabled { .work-box .disabled {
opacity: .5; opacity: .5;
} }
.logout-box { .logout-box {
width: calc(100% - 40rpx); width: calc(100% - 40rpx);
background: #FFFFFF; background: #FFFFFF;
...@@ -511,8 +513,9 @@ page { ...@@ -511,8 +513,9 @@ page {
.fixbtn { .fixbtn {
position: fixed; position: fixed;
bottom: 100rpx; bottom: 100rpx;
} }
.popclass { .popclass {
position: relative; position: relative;
border-radius: 24rpx 24rpx 0 0; border-radius: 24rpx 24rpx 0 0;
...@@ -556,7 +559,7 @@ page { ...@@ -556,7 +559,7 @@ page {
height: 88rpx; height: 88rpx;
margin: 0 auto; margin: 0 auto;
margin-top: 120rpx; margin-top: 120rpx;
margin-bottom:20rpx; margin-bottom: 20rpx;
background: #347BFF; background: #347BFF;
border-radius: 12rpx; border-radius: 12rpx;
font-weight: 500; font-weight: 500;
...@@ -572,4 +575,20 @@ page { ...@@ -572,4 +575,20 @@ page {
background: #fff; background: #fff;
color: #333; color: #333;
border: 2rpx solid #e1e1e1; border: 2rpx solid #e1e1e1;
}
.flex{
margin-top:7rpx;
display: flex;
align-items: center;
}
.wechat_icon {
width: 32rpx;
height: 32rpx;
}
.nickname {
font-weight: 400;
font-size: 24rpx;
color: #5A5E66;
margin-left: 8rpx;
} }
\ No newline at end of file \ No newline at end of file
/* packagesList/webView/pages/webView.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -247,6 +247,7 @@ export const checkScene = options => { ...@@ -247,6 +247,7 @@ export const checkScene = options => {
upgradeStaffDaily: 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily', 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'
} }
options.path = pagePath[query.page] options.path = pagePath[query.page]
......
/* subvehicleConversion/pages/activityPage/visitor/visitor.wxss */
\ No newline at end of file \ No newline at end of file
/* tabDate/pages/apprManage/apprManage.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -106,7 +106,7 @@ Page({ ...@@ -106,7 +106,7 @@ Page({
}); });
} }
}, },
error: () => {}, error: () => { },
}, },
"#modal2" "#modal2"
); );
...@@ -202,12 +202,18 @@ Page({ ...@@ -202,12 +202,18 @@ Page({
); );
}); });
} else { } else {
_userPortrait.push( let labelName = item.optionList.find((k) => k.confId == info[item.name])
item.optionList.find((k) => k.confId == info[item.name]) if (labelName?.label) {
?.otherName || _userPortrait.push(
item.optionList.find((k) => k.confId == info[item.name]) labelName?.otherName ||
?.confName labelName?.confName + ' ' + labelName?.label
); );
} else {
_userPortrait.push(
labelName?.otherName ||
labelName?.confName
);
}
} }
} }
} }
...@@ -263,9 +269,8 @@ Page({ ...@@ -263,9 +269,8 @@ Page({
}); });
} }
if (detail.carSeriesName) if (detail.carSeriesName)
detail.carType = `${detail.carBrand}-${ detail.carType = `${detail.carBrand}-${detail.carChildsBrandName || ""
detail.carChildsBrandName || "" }-${detail.carSeriesName}`;
}-${detail.carSeriesName}`;
if (detail.customerCoupon.createdDate) if (detail.customerCoupon.createdDate)
detail.time = new Date(detail.customerCoupon.createdDate).format( detail.time = new Date(detail.customerCoupon.createdDate).format(
"yyyy-MM-dd hh:mm:ss" "yyyy-MM-dd hh:mm:ss"
...@@ -389,7 +394,7 @@ Page({ ...@@ -389,7 +394,7 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {}, onReady: function () { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -404,25 +409,25 @@ Page({ ...@@ -404,25 +409,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () {}, onHide: function () { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () {}, onUnload: function () { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () {}, onPullDownRefresh: function () { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}, onReachBottom: function () { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {}, onShareAppMessage: function () { },
}); });
...@@ -44,6 +44,88 @@ const maritalStatus = [ ...@@ -44,6 +44,88 @@ const maritalStatus = [
confName: '未婚' confName: '未婚'
} }
] ]
// "职业(1:公务员(公检法),2:医生,3:教师,4:老板,5:律师,6:企业高管,7:IT/工程师,8:公司职员,9:其他")
const career = [
{
confId: '1',
confName: '公务员(公检法)'
},
{
confId: '2',
confName: '医生'
},
{
confId: '3',
confName: '教师'
},
{
confId: '4',
confName: '老板'
},
{
confId: '5',
confName: '律师'
},
{
confId: '6',
confName: '企业高管'
},
{
confId: '7',
confName: 'IT/工程师'
},
{
confId: '8',
confName: '公司职员'
},
{
confId: '9',
confName: '其他'
},
]
// (1:S 爽快型,2:K 侃价型,3:Y 依赖型,4:W 无语型,5:O 偶伴型,6:R 认捧型,7:T 挑剔型,8:H 好奇型")
const personality = [
{
confId: '1',
confName: 'S 爽快型',
label: '冲动、承担风险'
},
{
confId: '2',
confName: 'K 侃价型',
label: '谨慎、避免损失'
},
{
confId: '3',
confName: 'Y 依赖型',
label: '顺从别人'
},
{
confId: '4',
confName: 'W 无语型',
label: '内向、避免损失'
},
{
confId: '5',
confName: '0 偶伴型',
label: '避免损失、集体决策'
},
{
confId: '6',
confName: 'R 认捧型',
label: '寻求认同'
},
{
confId: '7',
confName: 'T 挑剔型',
label: '谨慎、避免损失'
},
{
confId: '8',
confName: 'H 好奇型',
label: '追求新奇'
},
]
const giftProduct = [ const giftProduct = [
{ {
confId: '1', confId: '1',
...@@ -179,14 +261,30 @@ var formData = [ ...@@ -179,14 +261,30 @@ var formData = [
optionsName: 'maritalStatus' optionsName: 'maritalStatus'
}, },
{ {
label: '附赠产品(每类产品只支持选一个选项)', label: '职业',
name: 'giftProductList', name: 'career',
isMult: true, optionList: career,
optionList: giftProduct,
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'sexList' optionsName: 'career'
},
{
label: '性格类型',
name: 'personality',
optionList: personality,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'personality'
}, },
// {
// label: '附赠产品(每类产品只支持选一个选项)',
// name: 'giftProductList',
// isMult: true,
// optionList: giftProduct,
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'sexList'
// },
{ {
label: '买车情况(单选)', label: '买车情况(单选)',
...@@ -253,5 +351,7 @@ export default { ...@@ -253,5 +351,7 @@ export default {
promoteList, promoteList,
satisfiedList, satisfiedList,
timeList, timeList,
formData formData,
career,
personality
} }
...@@ -11,24 +11,25 @@ Page({ ...@@ -11,24 +11,25 @@ Page({
detailForm: { detailForm: {
additionalInformation: '' additionalInformation: ''
}, },
customerSex:1 customerSex: 1
}, },
click(e) { click(e) {
let { pidx, idx } = e.currentTarget.dataset let { pidx, idx } = e.currentTarget.dataset
let { formData } = this.data let { formData } = this.data
let _item = formData[pidx] let _item = formData[pidx]
let _active = formData[pidx].optionList[idx].active let _active = formData[pidx].optionList[idx].active
// debugger
if (!_item.isMult) { if (!_item.isMult) {
this.setData({ this.setData({
[`formData[${pidx}].optionList`]: JSON.parse(JSON.stringify(CONSTANTDATA[_item.optionsName])) [`formData[${pidx}].optionList`]: JSON.parse(JSON.stringify(CONSTANTDATA[_item.optionsName]))
}) })
} }
// 赙赠产品 每类只能二选一 // 赙赠产品 每类只能二选一
if (_item.name == 'giftProductList' ) { if (_item.name == 'giftProductList') {
const noActiveIdx = idx % 2 == 0? idx+1:idx-1 const noActiveIdx = idx % 2 == 0 ? idx + 1 : idx - 1
this.setData({ this.setData({
[`formData[${pidx}].optionList[${noActiveIdx}].active`]:false [`formData[${pidx}].optionList[${noActiveIdx}].active`]: false
}) })
} }
...@@ -45,28 +46,28 @@ Page({ ...@@ -45,28 +46,28 @@ Page({
}) })
}, },
async recoverPortrait(id) { async recoverPortrait(id) {
let {code,data:info} = await api.portraitQuery({id}) let { code, data: info } = await api.portraitQuery({ id })
console.log(info); console.log(info);
if (code!= 0 ) return if (code != 0) return
let { formData } = this.data let { formData } = this.data
formData.forEach(item => { formData.forEach(item => {
if (info[item.name]) { if (info[item.name]) {
if (item.isMult) { if (item.isMult) {
console.log(item.name,info[item.name],'info[item.name]'); console.log(item.name, info[item.name], 'info[item.name]');
// let _list = info[item.name].split(',') // let _list = info[item.name].split(',')
let _list = info[item.name] let _list = info[item.name]
_list.forEach(n => { _list.forEach(n => {
item.optionList.find(k => k.confId == n).active = true item.optionList.find(k => k.confId == n).active = true
}) })
} else { } else {
item.optionList.find(k => k.confId == info[item.name]).active = true item.optionList.find(k => k.confId == info[item.name]).active = true
} }
// } // }
} else { } else {
if (item.name == 'customerSex') { if (item.name == 'customerSex') {
let {customerSex} = this.data let { customerSex } = this.data
item.optionList.find(k => k.confId == customerSex).active = true item.optionList.find(k => k.confId == customerSex).active = true
} }
} }
...@@ -77,19 +78,19 @@ if (code!= 0 ) return ...@@ -77,19 +78,19 @@ if (code!= 0 ) return
}, },
reset() { reset() {
let {formData} = this.data let { formData } = this.data
formData.forEach(item => { formData.forEach(item => {
// console.log(item?.optionList,'item?.optionList'); // console.log(item?.optionList,'item?.optionList');
// if(item.isMult) params[item.name] = [] // if(item.isMult) params[item.name] = []
if (item.name!='customerSex') { if (item.name != 'customerSex') {
item?.optionList?.forEach(subItem => { item?.optionList?.forEach(subItem => {
subItem.active = false subItem.active = false
}) })
} }
}) })
console.log(formData,'formData'); console.log(formData, 'formData');
this.setData({ this.setData({
formData formData
}) })
...@@ -100,10 +101,10 @@ if (code!= 0 ) return ...@@ -100,10 +101,10 @@ if (code!= 0 ) return
let params = {} let params = {}
formData.forEach(item => { formData.forEach(item => {
// console.log(item?.optionList,'item?.optionList'); // console.log(item?.optionList,'item?.optionList');
if(item.isMult) params[item.name] = [] if (item.isMult) params[item.name] = []
item?.optionList?.forEach(subItem => { item?.optionList?.forEach(subItem => {
if (subItem.active) { if (subItem.active) {
item.isMult? params[item.name].push(subItem.confId):( params[item.name] = subItem.confId) item.isMult ? params[item.name].push(subItem.confId) : (params[item.name] = subItem.confId)
} }
}) })
}) })
...@@ -122,8 +123,8 @@ if (code!= 0 ) return ...@@ -122,8 +123,8 @@ if (code!= 0 ) return
wx.hideLoading() wx.hideLoading()
if (code == '0') { if (code == '0') {
wx.$util.showToast('编辑成功') wx.$util.showToast('编辑成功')
// 仅刷新预约管理列表 // 仅刷新预约管理列表
wx.$util.refreshPageData(true) wx.$util.refreshPageData(true)
wx.$router.back() wx.$router.back()
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
...@@ -150,51 +151,51 @@ if (code!= 0 ) return ...@@ -150,51 +151,51 @@ if (code!= 0 ) return
}, },
onRoute(options) { onRoute(options) {
console.log(options); console.log(options);
const {customerId,customer} = options const { customerId, customer } = options
// let detail = { // let detail = {
// ...options.customerCoupon, // ...options.customerCoupon,
// ...options.customer, // ...options.customer,
// ...options // ...options
// } // }
this.setData({ this.setData({
customerId, customerId,
customerSex:customer?.customerSex||1 customerSex: customer?.customerSex || 1
}) })
console.log(customerId, 'customerId') console.log(customerId, 'customerId')
this.recoverPortrait(customerId) this.recoverPortrait(customerId)
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() { },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {} onShareAppMessage() { }
}) })
/* tabDate/pages/userPortrait/userPortrait.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
<textarea type="text" placeholder="{{item.placeholder || '请输入' + item.label}}" maxlength="{{item.maxlength}}" class="input" value="{{detailForm[item.name]}}" placeholder-class="input-placeholder" data-attr="{{item.name}}" bindinput="handleInput" /> <textarea type="text" placeholder="{{item.placeholder || '请输入' + item.label}}" maxlength="{{item.maxlength}}" class="input" value="{{detailForm[item.name]}}" placeholder-class="input-placeholder" data-attr="{{item.name}}" bindinput="handleInput" />
</view> </view>
<view wx:if="{{item.optionList}}" class="check-block"> <view wx:if="{{item.optionList}}" class="check-block">
<view class="check-box {{subItem.active ? 'active' : ''}}" wx:for="{{item.optionList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" bindtap="click" data-pidx="{{index}}" data-idx="{{idx}}"> <view class="check-box {{subItem.active ? 'active' : ''}} {{subItem.label?'labelText':''}}" wx:for="{{item.optionList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" bindtap="click" data-pidx="{{index}}" data-idx="{{idx}}">
{{subItem.confName}} <view class="labelTextName"> {{subItem.confName}}</view>
<view class="labelTextName labelTextNameColor">{{subItem.label}}</view>
<image wx:if="{{item.isMult && subItem.active}}" class="mult" src="../../images/check-active.png"></image> <image wx:if="{{item.isMult && subItem.active}}" class="mult" src="../../images/check-active.png"></image>
</view> </view>
</view> </view>
......
...@@ -33,6 +33,25 @@ ...@@ -33,6 +33,25 @@
margin-right: var(--fontSize20); margin-right: var(--fontSize20);
} }
.user-portrait .labelText {
height: var(--fontSize100);
display: flex;
flex-wrap: wrap;
flex-direction: column;
justify-content: center;
color: #292D33;
}
.user-portrait .labelText .labelTextName {
line-height: var(--fontSize32);
}
.user-portrait .labelText .labelTextNameColor {
/* line-height: var(--fontSize32); */
font-size: var(--fontSize20);
color: #999EA8;
}
.user-portrait .check-box.active { .user-portrait .check-box.active {
background: #347BFF14; background: #347BFF14;
border: var(--fontSize2) solid #347BFF; border: var(--fontSize2) solid #347BFF;
......
...@@ -234,4 +234,9 @@ module.exports = { ...@@ -234,4 +234,9 @@ module.exports = {
// params.payType = 1 // params.payType = 1
return api.post("dj.api.smartcarlife.weapp.waitinputorder.count", params); return api.post("dj.api.smartcarlife.weapp.waitinputorder.count", params);
}, },
/** 质保价格编辑接口 */
modifyWarrantyPrice(data) {
return api.post("dj.api.smartcarlife.customer.warrantyCard.modifyWarrantyPrice", data);
},
}; };
...@@ -29,6 +29,7 @@ Page({ ...@@ -29,6 +29,7 @@ Page({
showRatingPopup: false, showRatingPopup: false,
showRatingCard: true, // 显示评价卡片 showRatingCard: true, // 显示评价卡片
isMake: true, isMake: true,
warrantyEditObj: {}
}, },
RatingPopupSetting() { RatingPopupSetting() {
this.setData({ this.setData({
...@@ -45,6 +46,60 @@ Page({ ...@@ -45,6 +46,60 @@ Page({
selectTypeOrder: type, selectTypeOrder: type,
}); });
}, },
blur(e) {
console.log(e)
let { value } = e.detail
// let { shortcutList } = this.data
value = value.substring(0, 50)
// if (!value) {
// shortcutList.map(i => (i.active = false))
// }
this.setData({
['warrantyEditObj.warrantyPrice']: value,
// shortcutList,
focus: false
})
},
// 确定是否要显示
showWarranty(e) {
let { item } = e.currentTarget.dataset;
this.setData({
warrantyEditObj: item,
focus: true
})
wx.$modal(
this,
{
show: true,
title: '',
tabTitleShow: false,
success: (res) => {
let { orderCode } = this.data
api.modifyWarrantyPrice({ ...this.data.warrantyEditObj }).then((result) => {
wx.$util.showToast('更新成功')
this.getOrderDetail(orderCode);
}).catch((err) => {
});
// 跳转新增订单页面 并带特定参数
// let { selectType } = this.data;
// if (selectType == 1) {
// wx.$router.go("tabWorkOrder.createOrder", {
// scene,
// ...item,
// });
// } else {
// wx.$router.go("tabWorkOrder.defeatOrder", {
// scene,
// ...item,
// });
// }
},
error: () => { },
},
"#modal4"
);
},
// 确定是否要显示 // 确定是否要显示
showSelectTypeOrder({ scene = "", item = {} }) { showSelectTypeOrder({ scene = "", item = {} }) {
let { orderInfo } = this.data; let { orderInfo } = this.data;
...@@ -370,6 +425,7 @@ Page({ ...@@ -370,6 +425,7 @@ Page({
warrantyPeriod: e.upgradeWarrantyPeriod, warrantyPeriod: e.upgradeWarrantyPeriod,
goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName, goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName,
cardCode: e.cardCode, cardCode: e.cardCode,
warrantyPrice: e.warrantyPrice
}); });
} }
} }
......
...@@ -790,6 +790,54 @@ page { ...@@ -790,6 +790,54 @@ page {
border: 2rpx solid #347BFF; border: 2rpx solid #347BFF;
color: #3582EE; color: #3582EE;
} }
.modatcontent {
padding: 50rpx var(--fontSize48) 32rpx;
}
.textarea {
background: #F7F7F7;
border: var(--fontSize1) solid #C3C3C3;
border-radius: var(--fontSize12);
// width: calc(100% - var(--fontSize80));
width: 100%;
height: var(--fontSize240);
box-sizing: border-box;
margin: 0 auto var(--fontSize12);
padding: var(--fontSize25) 0;
font-size: var(--fontSize28);
color: #333333;
}
.title {
font-weight: 500;
font-size: 32rpx;
color: #292D33;
text-align: center;
margin-bottom: 32rpx
}
.productName {
font-weight: 400;
font-size: 30rpx;
color: #5A5E66;
text-align: center;
margin-bottom: 32rpx
}
.label {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 30rpx;
color: #5A5E66;
margin-bottom: 16rpx
}
.tips {
font-weight: 400;
font-size: 24rpx;
color: #999EA8;
}
} }
.meal-box { .meal-box {
...@@ -871,63 +919,30 @@ page { ...@@ -871,63 +919,30 @@ page {
margin-left: var(--fontSize12); margin-left: var(--fontSize12);
} }
.modal text, .modatcontentOrder {
.modal { padding: 30rpx 50rpx;
font-size: var(--fontSize28);
color: #333333;
}
.modal .orderCode {
margin-bottom: var(--fontSize20);
}
.modal .code {
color: #888888;
} }
.modal .color { .editIcon {
color: #F24724; margin-left: auto;
width: 32rpx;
height: 32rpx;
} }
.modal { .warranty-name {
.icon { display: flex;
width: 96rpx; align-items: center;
height: 96rpx;
margin-right: 30rpx;
}
.modalbox { .right {
display: flex; display: flex;
align-items: center; align-items: center;
box-sizing: border-box; margin-left: auto;
width: 522rpx; justify-content: center;
height: 136rpx;
background: #F7F8FA;
border-radius: 8rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #292D33;
padding-left: 24rpx;
margin: 0 auto;
&+.modalbox { .warranty-price {
margin-top: 16rpx; margin-left: 8rpx;
font-size: 28rpx;
color: #347BFF;
} }
} }
.act {
background: #347bff1a;
border: 2rpx solid #347BFF;
color: #3582EE;
}
}
.modatcontent {
box-sizing: border-box;
padding: var(--fontSize48) 0;
}
.modatcontentOrder {
padding: 30rpx 50rpx;
} }
\ No newline at end of file \ No newline at end of file
...@@ -370,16 +370,29 @@ Page({ ...@@ -370,16 +370,29 @@ Page({
console.log(e); console.log(e);
let { goodsList } = this.data; let { goodsList } = this.data;
let { value } = e.detail; let { value } = e.detail;
let { index, gindex } = e.currentTarget.dataset; let { index, gindex, item } = e.currentTarget.dataset;
let number = wx.$util.removeLeadingZerosAndEnsureNonNegative(value); let number = wx.$util.removeLeadingZerosAndEnsureNonNegative(value);
console.log(item, 'item');
// item.minSellPrice = 100
// item.validMinSellPrice = 'Y'
// 如果开启了最低价格校验
if (item.validMinSellPrice == 'Y' && item.minSellPrice > number) {
goodsList[index].goodsList[gindex].errorTarget = true
wx.$util.showToast('单价不可低于商品最低价')
// return false;
} else {
goodsList[index].goodsList[gindex].errorTarget = false
}
goodsList[index].goodsList[gindex].price = number; goodsList[index].goodsList[gindex].price = number;
//获取套餐内商品价格 //获取套餐内商品价格
goodsList[index].price = goodsList[index].goodsList.reduce((prev, cur) => { goodsList[index].price = goodsList[index].goodsList.reduce((prev, cur) => {
return Number(prev) + Number(cur.price); return Number(prev) + Number(cur.price);
}, 0); }, 0);
//获取套餐内商品总价 //获取套餐内商品总价
let total = goodsList[index].price * goodsList[index].count; let total = goodsList[index].price * goodsList[index].count;
goodsList[index].totalPrice = wx.$util.decimal(total, 2); goodsList[index].totalPrice = wx.$util.decimal(total, 2);
this.setData( this.setData(
{ {
goodsList, goodsList,
...@@ -393,33 +406,29 @@ Page({ ...@@ -393,33 +406,29 @@ Page({
let { orderObj, goodsList } = this.data; let { orderObj, goodsList } = this.data;
let { value } = e.detail; let { value } = e.detail;
let { index, item } = e.currentTarget.dataset; let { index, item } = e.currentTarget.dataset;
console.log(item, 'item');
let target = `goodsList[${index}].price`; let target = `goodsList[${index}].price`;
let number = wx.$util.removeLeadingZerosAndEnsureNonNegative(value); let number = wx.$util.removeLeadingZerosAndEnsureNonNegative(value);
this.setData({ this.setData({
[target]: number, //价格不能低于0 [target]: number, //价格不能低于0
}); });
// 如果开启了最低价格校验
let errorTarget = `goodsList[${index}].errorTarget`;
if (item.validMinSellPrice == 'Y' && item.shopMinPrice > number) {
// number = item.shopMinPrice > number
// this.setData({
// [errorTarget]: true, //显示错误
// });
wx.$util.showToast('单价不可低于商品最低价')
// return false;
} else {
this.setData({
[errorTarget]: false, //显示错误
});
}
this.setGoodsTotal(goodsList); this.setGoodsTotal(goodsList);
}, },
// removeLeadingZerosAndEnsureNonNegative(inputStr) {
// // 使用正则表达式去掉前导零
// let trimmedStr = inputStr.replace(/^0+/, "");
// let [number, decimal] = trimmedStr.split(".");
// if (decimal != undefined) {
// decimal = decimal.substring(0, 2);
// number += `.${decimal}`;
// trimmedStr = number;
// }
// // 将字符串转换为浮点数
// const numberValue = parseFloat(trimmedStr);
// // 如果转换后的值为 NaN 或者小于 0,则默认为 0
// if (isNaN(numberValue) || numberValue < 0) {
// return 0;
// }
// return trimmedStr;
// },
priceBlur(e) { priceBlur(e) {
let { index, item } = e.currentTarget.dataset; let { index, item } = e.currentTarget.dataset;
let target = `goodsList[${index}].price`; let target = `goodsList[${index}].price`;
...@@ -432,8 +441,22 @@ Page({ ...@@ -432,8 +441,22 @@ Page({
}, },
setGoodsTotal(goodsList) { setGoodsTotal(goodsList) {
let total = 0; let total = 0;
goodsList.map((i) => (total += i.count * i.price)); goodsList.forEach((i) => {
if (i.validMinSellPrice == 'Y' && i.shopMinPrice > i.price) {
i.errorTarget = true
}
if (i.goodsList) {
i.goodsList.forEach((item) => {
if (item.validMinSellPrice == 'Y' && item.minSellPrice > item.price) {
item.errorTarget = true
}
})
}
total += i.count * i.price
});
this.setData({ this.setData({
goodsList,
total: wx.$util.decimal(total, 2), total: wx.$util.decimal(total, 2),
}); });
}, },
...@@ -618,9 +641,13 @@ Page({ ...@@ -618,9 +641,13 @@ Page({
let { baseConfigData } = this.data; let { baseConfigData } = this.data;
let filmArr = []; let filmArr = [];
let arr = []; let arr = [];
let errTargetNum = 0
if (goodsList) { if (goodsList) {
goodsList.map((e) => { goodsList.map((e) => {
if (!e.isType) { if (!e.isType) {
if (e.errorTarget) {
errTargetNum++;
}
let obj = { let obj = {
baseGoodsId: e.baseGoodsId, baseGoodsId: e.baseGoodsId,
// upgradeGoodsId: e.id, // upgradeGoodsId: e.id,
...@@ -644,6 +671,9 @@ Page({ ...@@ -644,6 +671,9 @@ Page({
goodsList.map((e) => { goodsList.map((e) => {
if (e.isType) { if (e.isType) {
e.goodsList.forEach((g) => { e.goodsList.forEach((g) => {
if (g.errorTarget) {
errTargetNum++;
}
arr.push({ arr.push({
packageCode: e.packageCode, packageCode: e.packageCode,
packageName: e.packageName, packageName: e.packageName,
...@@ -662,6 +692,9 @@ Page({ ...@@ -662,6 +692,9 @@ Page({
if (orderObj.subOrderList.length == 0) { if (orderObj.subOrderList.length == 0) {
return "商品不能为空"; return "商品不能为空";
} }
if (errTargetNum) {
return "商品不能低于最低价格";
}
// } else { // } else {
// // 不升级删除商品参数 // // 不升级删除商品参数
// delete orderObj.subOrderList // delete orderObj.subOrderList
......
...@@ -294,7 +294,7 @@ page { ...@@ -294,7 +294,7 @@ page {
} }
.goods-box .goods .price input.error { .goods-box .goods .price input.error {
color: red; border: var(--fontSize2) solid #F24724;
} }
.goods-box .goods .price input.disabled { .goods-box .goods .price input.disabled {
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.price < 0 && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="1">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="1">x{{item.count}}</view>
</view> </view>
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.price < 0 && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view> </view>
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.price < 0 && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view>
</view> </view>
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ g.price }}" bindinput="changeMealPrice" data-item="{{ g }}" data-gindex="{{ gInx }}" data-index="{{ index }}" always-embed /> <input type="digit" value="{{ g.price }}" class="{{ g.errorTarget? 'error':''}}" bindinput="changeMealPrice" data-item="{{ g }}" data-gindex="{{ gInx }}" data-index="{{ index }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view>
</view> </view>
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.price < 0 && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="4">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="4">x{{item.count}}</view>
</view> </view>
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" /> <tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
</view> </view>
<recording-order-popup wx:if="{{showOrderpop && !(isErrorOrder)}}" outTradeNo="{{outTradeNo}}" show="{{showOrderpop}}" bind:success="navigator" title="请选择交易参考号" /> <recording-order-popup wx:if="{{showOrderpop && !(isErrorOrder)}}" outTradeNo="{{outTradeNo}}" show="{{showOrderpop}}" bind:success="navigator" title="请选择交易参考号" />
<merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2" scene="1"/> <merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2" scene="1" />
<merchant-seles show="{{ selesBox }}" title="选择合作门店" orderObj="{{ orderObj }}" sub-title="选择销售顾问" userInfo="{{ userInfo }}" singleSeller="{{ true }}" type="1" scene="1" /> <merchant-seles show="{{ selesBox }}" title="选择合作门店" orderObj="{{ orderObj }}" sub-title="选择销售顾问" userInfo="{{ userInfo }}" singleSeller="{{ true }}" type="1" scene="1" />
<sub-shop-merchant show="{{ subShopMerchantBox }}" title="选择二级流量方" selectedSelesMerchantId="{{ orderObj.merchantId }}" selectedCustomerInfo="{{ orderObj.customer.customerId }}" selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}" /> <sub-shop-merchant show="{{ subShopMerchantBox }}" title="选择二级流量方" selectedSelesMerchantId="{{ orderObj.merchantId }}" selectedCustomerInfo="{{ orderObj.customer.customerId }}" selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}" />
<car-brands show="{{ carBrandBox }}" bindconfirm="chooseCar" carSeriesId="{{ orderObj.customer.carSeriesId || '' }}" merchantId="{{ orderObj.merchantId || undefined }}" /> <car-brands show="{{ carBrandBox }}" bindconfirm="chooseCar" carSeriesId="{{ orderObj.customer.carSeriesId || '' }}" merchantId="{{ orderObj.merchantId || undefined }}" />
......
/* packageEquity/pages/carQuotation/fullSignture/fullSignture.wxss */
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/ocr/ocr.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -541,10 +541,8 @@ Page({ ...@@ -541,10 +541,8 @@ Page({
code code
} = result } = result
const warrantyCardVisible = data.cardCodeFlag && data.cardCodeFlag == 1 const warrantyCardVisible = data.cardCodeFlag && data.cardCodeFlag == 1
// const signatureSwitchValue = data.signatureSwitch && data.signatureSwitch == 1
this.setData({ this.setData({
warrantyCardVisible: !warrantyCardVisible warrantyCardVisible: !warrantyCardVisible
// signatureSwitch: signatureSwitchValue
}) })
}) })
}, },
......
/* tabWorkOrder/pages/orderDetail/orderDetail.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
<view class="name">{{g.upgradeGoodsAlias||g.upgradeGoodsName}}</view> <view class="name">{{g.upgradeGoodsAlias||g.upgradeGoodsName}}</view>
<view class="price">¥{{g.price}}</view> <view class="price">¥{{g.price}}</view>
</view> </view>
<view class="meal-bd-bottom">{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}}<view class="count">x{{g.number}}</view> <view class="meal-bd-bottom">{{g.upgradeGoodsType===1?g.positionStr: g.upgradeGoodsTypeName}}
<view class="count">x{{g.number}}</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -248,7 +249,7 @@ ...@@ -248,7 +249,7 @@
</block> --> </block> -->
</view> </view>
<!-- 已支付4 战败2 已评价6 三种状态才展示 并且不是通过失效客户录入的战败单 --> <!-- 已支付4 战败2 已评价6 三种状态才展示 并且不是通过失效客户录入的战败单 -->
<block wx:if="{{(!userInfo.isSuper && userInfo.loginRole != 3 && userInfo.userType == 2 && (orderInfo.status == 4 || orderInfo.status == 2 || orderInfo.status == 6)) && (orderInfo.subOrderList && orderInfo.subOrderList.length)}}"> <block wx:if="{{(!userInfo.isSuper && userInfo.loginRole != 3 && userInfo.userType == 2 && (orderInfo.status == 4 || orderInfo.status == 2 || orderInfo.status == 6)) && ((orderInfo.subOrderList && orderInfo.subOrderList.length) ||(orderInfo.packageGoodsList&&orderInfo.packageGoodsList.length))}}">
<!-- 不需要走签名逻辑 --> <!-- 不需要走签名逻辑 -->
<view wx:if="{{signatureSwitch&&orderInfo.selectPayType!=0}}" class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}"> <view wx:if="{{signatureSwitch&&orderInfo.selectPayType!=0}}" class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="btn text-center" bindtap="navOrderSignature">客户签名确认</view> <view class="btn text-center" bindtap="navOrderSignature">客户签名确认</view>
......
/* tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -130,7 +130,7 @@ class WxValidate { ...@@ -130,7 +130,7 @@ class WxValidate {
* 验证身份证号码 * 验证身份证号码
*/ */
idcard(value) { idcard(value) {
return that.optional(value) || /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value) return that.optional(value) || /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/.test(value)
}, },
/** /**
* 验证两个输入框的内容是否相同 * 验证两个输入框的内容是否相同
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!