Commit db28cb03 by 张立顺

Merge branch 'SAAS+V4.46-1031' into 'SAAS+V4.46.1-1107'

上线合并

See merge request !339
2 parents 77ea6c9a 2d23fada
Showing 89 changed files with 1451 additions and 839 deletions
......@@ -28,7 +28,7 @@ import eventbus from "./utils/eventbus";
import api from "./api/api";
import { Version } from "glsx-common-sdk";
import { areaList } from "@vant/area-data"; //预加载省市区
// 将 api.reNoSignIn() 函数包装为节流函数
// 将 api.reNoSignIn() 函数包装为防抖函数
const debouncedReNoSignIn = debounce(function (noSignInUuid, that) {
console.log("debouncedReNoSignIn2222");
api
......@@ -37,9 +37,16 @@ const debouncedReNoSignIn = debounce(function (noSignInUuid, that) {
})
.then((res) => {
let { code, data } = res;
if (code == "0" && data) {
if (code == "0" && data) {
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 {
util.removeStorage();
removeSystemStorage();
......
......@@ -14,7 +14,12 @@
</block>
</view>
<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="change_btn" bind:tap="toPoint">我的积分</view>
<image class="icon_card" bindtap="jumpAccount" src="{{IMG_URL}}bank-card.png" mode="" />
......
......@@ -466,4 +466,20 @@ page {
background: #fff;
color: #333;
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
......@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布
* 5cdptest
*/
let index = 1;
let index = 2;
const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion;
......
......@@ -10,13 +10,13 @@ module.exports = {
params,
);
},
// 获取收益明细列表
getScoreListApi(data) {
let params = data || {}
return api.post( "dj.api.smartcarlife.score.list",
// 获取收益明细列表
getScoreListApi(data) {
let params = data || {}
return api.post("dj.api.smartcarlife.score.list",
params
);
},
);
},
/** 根据id查询银行卡详情 */
getStaffBankDetail(data) {
let params = data || {}
......@@ -60,5 +60,20 @@ module.exports = {
"dj.api.smartcarlife.withdrawal.insert",
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
// 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
/* 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
<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
......@@ -5,6 +5,23 @@ Page({
listData: [],
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) {
MineApi.getWithdrawalListApi().then(res => {
if (res.code==0 && res.data) {
......
......@@ -75,6 +75,17 @@ page {
margin-left: auto;
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 {
......@@ -136,4 +147,9 @@ page {
display: flex;
align-items: center;
justify-content: space-between;
}
\ No newline at end of file
}
.error-icon{
width: 24rpx;
height: 56rpx;
margin-left:4rpx;
}
......@@ -29,12 +29,17 @@
</block>
<view class="countText flex">
-{{item.withdrawalScore}}
<view wx:if="{{item.type == -1}}" class="type">
消耗积分
</view>
<view wx:else class="type">
{{item.type == 3 ?'银行卡':'微信'}}兑换
</view>
<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>
</block>
<block wx:else>
<view wx:if="{{item.type == -1}}" class="type">
消耗积分
</view>
<view wx:else class="type">
{{item.type == 3 ?'银行卡':item.type == 1?'零钱':'微信'}}兑换
</view>
</block>
</view>
<view class="line"></view>
<view class="date_wrap flex_scb">
......
......@@ -3,7 +3,12 @@ Page({
data: {
},
onRoute(options) {
console.log(options)
this.setData({
title:options.title
})
},
toWatchNote(){
wx.$router.reLaunch('integration.record')
},
......
<view class="container">
<gl-image mode="widthFix" class="icon" src="/bankAccount/success_icon_1.png" />
<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">到达您的微信零钱,请留意到账情况</view> -->
<view class="btn_group flex_cc">
......
// integration/pages/point/toCash/toCash.js
import MineApi from '../../../api'
import api from '~/api/api'
import Dialog from '@vant/weapp/dialog/dialog';
Page({
data: {
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() {
if (this.submit) return wx.$api.showToast('有一笔兑换正在进行')
let {
sumbitScore
sumbitScore,
tabIndex,
user,
score: {
existWechatMotivationWithdrawal
},
rateInfo,
tabData,
} = this.data
let withDrawType = 3
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(rateInfo){
// rateQuery = {
......@@ -29,10 +140,14 @@ Page({
// this.toShowModal(sumbitScore)
// return
// }
this.comfirmSumbit(sumbitScore,withDrawType)
this.comfirmSumbit(sumbitScore, withDrawType)
},
// 提现确认模块
comfirmSumbit(sumbitScore,withDrawType,rateQuery={}){
comfirmSumbit(sumbitScore, withDrawType, rateQuery = {}) {
let {
tabIndex,
tabData,
} = this.data;
Dialog.confirm({
title: '提示',
message: `请确认是否将${sumbitScore}积分进行兑换`,
......@@ -43,11 +158,15 @@ Page({
MineApi.WithdrawalApi({
withdrawalScore: sumbitScore,
withDrawType,
withdrawalSource: 2,
wechatAppId: wx.getAccountInfoSync().miniProgram.appId,
sourceFrom: 1 // 来源 0:活动 1:阳光激励
}).then(res => {
wx.hideLoading();
if (res.code == 0) {
wx.$router.redirectTo('integration.success')
wx.$router.redirectTo(`integration.success`, {
title: tabData[tabIndex]
})
} else {
wx.$api.showToast(res.message)
this.submit = false
......@@ -61,54 +180,62 @@ Page({
});
},
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({
user: options.user,
tabData,
score: options.score,
sumbitScore: options?.score?.motivationWithdrawalScore
})
},
/**添加手续费提示 */
toShowModal(sumbitScore){
toShowModal(sumbitScore) {
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 = {
count:sumbitScore,
money:money,
rate:`${Rate*100}%`
count: sumbitScore,
money: money,
rate: `${Rate*100}%`
}
this.setData({
showRate:true,
rateMoney:obj
showRate: true,
rateMoney: obj
})
},
/**获取手续费 */
getRateInfo(){
getRateInfo() {
const userStorage = wx.$storage.get("userInfo");
MineApi.getRate({merchantId:userStorage.merchantId}).then(res=>{
this.setData({
rateInfo:res
})
MineApi.getRate({
merchantId: userStorage.merchantId
}).then(res => {
this.setData({
rateInfo: res
})
})
},
toJump(){
this.comfirmSumbit(this.tixianQuery.sumbitScore,this.tixianQuery.withDrawType,this.tixianQuery.rateQuery)
toJump() {
this.comfirmSumbit(this.tixianQuery.sumbitScore, this.tixianQuery.withDrawType, this.tixianQuery.rateQuery)
},
accSub(arg1, arg2) {
let r1, r2, m, n;
try {
r1 = arg1.toString().split(".")[1].length;
} catch (e) {
r1 = 0;
}
try {
r2 = arg2.toString().split(".")[1].length;
} catch (e) {
r2 = 0;
}
m = Math.pow(10, Math.max(r1, r2)); //last modify by deeka //动态控制精度长度
n = (r1 >= r2) ? r1 : r2;
return ((arg1 * m - arg2 * m) / m).toFixed(n);
let r1, r2, m, n;
try {
r1 = arg1.toString().split(".")[1].length;
} catch (e) {
r1 = 0;
}
try {
r2 = arg2.toString().split(".")[1].length;
} catch (e) {
r2 = 0;
}
m = Math.pow(10, Math.max(r1, r2)); //last modify by deeka //动态控制精度长度
n = (r1 >= r2) ? r1 : r2;
return ((arg1 * m - arg2 * m) / m).toFixed(n);
}
})
\ No newline at end of file
{
"usingComponents": {
"van-dialog": "@vant/weapp/dialog/index",
"modal": "../../../components/Modal"
"modal": "../../../components/Modal",
"tab":"../../../components/Tab/Tab"
},
"navigationBarTitleText":"兑换"
}
\ No newline at end of file
......@@ -6,13 +6,7 @@ page {
background-color: #fff;
}
.container {
padding: 32rpx;
.container_title {
margin: 8rpx 0 24rpx;
font-size: 36rpx;
font-weight: 600;
color: #292D33;
}
padding: 32rpx;
}
.input_wrapper {
......@@ -80,4 +74,63 @@ background-color: #fff;
display: flex;
align-items: 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
<!--integration/pages/point/toCash/toCash.wxml-->
<block>
<view class="tab">
<tab tab="{{tabData}}" openScroll="{{tabData.length <= 1}}" index="{{tabIndex}}" bindclick="tabClick"></tab>
</view>
<view class="container">
<view class="container_title">阳光激励兑换</view>
<view class="input_wrapper">
<view class="title">兑换积分</view>
<view class="int_widget flex_scb">
<input type="digit" value="{{sumbitScore}}" disabled class="intClass" />
</view>
<view class="score_tip">银行卡可兑换积分:{{score.motivationWithdrawalScore}}</view>
<view class="score_tip">银行卡可兑换积分:{{tabData[tabIndex] == '微信兑换'?score.wechatMotivationWithdrawalScore:score.motivationWithdrawalScore}}</view>
</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>
<van-dialog id="van-dialog" />
</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> -->
......@@ -287,6 +287,7 @@ Page({
});
},
init(userInfo) {
console.log(8989)
this.setData({
userInfo,
});
......@@ -590,7 +591,6 @@ Page({
},
onRoute(options) {
// console.log(options, "options");
wx.__HAS_SHOW_MODAL = false;
if (options && options.tabIndex) {
this.changeTabBar({
......
/* packageEquity/pages/TabBar/equityPage.wxss */
\ No newline at end of file
/* packageEquity/pages/aiCheck/redundance/redundance.wxss */
\ 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
/* 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
/* packageEquity/pages/aiInspectionReception/aiInspectionReception.wxss */
\ No newline at end of file
/* packageEquity/pages/carEquity/carBrands/carBrands.wxss */
\ No newline at end of file
/* packageEquity/pages/carEquity/carSeries/carSeries.wxss */
\ No newline at end of file
......@@ -302,7 +302,7 @@
<van-uploader
class="plus"
file-list="{{ imgObj.other }}"
upload-text="上传照片n最多9张"
upload-text="上传照片\n最多9张"
max-count="9"
deletable
preview-size="var(--fontSize192)"
......
......@@ -46,7 +46,12 @@ Page({
dialogObj: {},
scrollTop: 0,
cardSetting: true,
isAsk: false
isAsk: false,
// vin二次确认弹窗
showVinDialog: false,
secFormData: {},
tempVin: '',
e: {}
},
getPickerObj(obj) {
let data = []
......@@ -325,48 +330,92 @@ Page({
scrollTop: height // 滚动到的位置(距离顶部 px)
})
},
handleSecondConfirm(e) {
let { serviceInfo, conSecondObj, isAsk } = this.data
if (isAsk) {
return true
}
if (e.detail?.type == 'confirm') {
secondChange() {
let { showVinDialog } = this.data
this.setData({
showVinDialog: !showVinDialog
})
},
handleSecClose() {
let { tempVin } = this.data
this.setData({
secFormData: {
carVin: ''
},
isAsk: false
})
if (tempVin) {
this.setData({
isAsk: true
['serviceInfo.vin']: tempVin,
tempVin: ''
})
carLifeApi
.checkVin({
vin: serviceInfo.vin
}
this.secondChange()
},
handleSecConfirm(e) {
let { detail } = e
this.setData({
['serviceInfo.vin']: detail.carVin,
tempVin: detail.carVin
})
this.api()
},
api() {
let { serviceInfo, conSecondObj, isAsk, e } = this.data
this.setData({
isAsk: true
})
carLifeApi
.checkVin({
vin: serviceInfo.vin
})
.then(res => {
this.setData({
isAsk: false
})
.then(res => {
this.setData({
isAsk: false
})
if (res.code == '0') {
if (res.code == '0') {
this.confirm(e)
} else if (res.code == '-2') {
if (conSecondObj.vin == serviceInfo.vin) {
this.confirm(e)
} else if (res.code == '-2') {
if (conSecondObj.vin == serviceInfo.vin) {
this.confirm(e)
this.setData({
['conSecondObj.vin']: ''
})
} else {
this.setData({
['conSecondObj.vin']: serviceInfo.vin,
dialogObj: JSON.parse(JSON.stringify(errorObj)),
['dialogObj.tipTxt']: res.message,
isDialogShow: true
})
}
this.setData({
['conSecondObj.vin']: '',
e: {}
})
} else {
this.setData({
['conSecondObj.vin']: serviceInfo.vin,
dialogObj: JSON.parse(JSON.stringify(errorObj)),
['dialogObj.tipTxt']: res.message,
isDialogShow: true
isDialogShow: true,
e: {}
})
wx.$util.showToast(res.message || '接口异常')
}
})
} else {
this.setData({
dialogObj: JSON.parse(JSON.stringify(errorObj)),
['dialogObj.tipTxt']: res.message,
isDialogShow: true,
e: {}
})
wx.$util.showToast(res.message || '接口异常')
}
})
},
handleSecondConfirm(e) {
console.log(e)
let { serviceInfo, conSecondObj, isAsk } = this.data
if (isAsk) {
return true
}
if (e.detail?.type == 'confirm') {
this.setData({
secFormData: {
carVin: serviceInfo.vin
},
e: e
})
this.secondChange()
} else {
this.confirm(e)
}
......
......@@ -3,6 +3,7 @@
"usingComponents": {
"first-step": "../components/FirstStep/FirstStep",
"second-step": "../components/SecondStep/SecondStep",
"shade-tip": "../components/ShadeTip/ShadeTip"
"shade-tip": "../components/ShadeTip/ShadeTip",
"vin-sec-dialog": "../../carQuotation/components/VinSecDialog/VinSecDialog"
}
}
......@@ -3,4 +3,6 @@
<first-step wx:if="{{step == 'first'}}" id="FirstStep" serviceInfo="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bindconfirm="handleFirstConfirm" binddraft="handleSecondConfirm"></first-step>
<second-step wx:if="{{step == 'second'}}" cardSetting="{{cardSetting}}" id="SecondStep" serviceInfo="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bindvaliderror="handleErrorJump" bindconfirm="handleSecondConfirm" binddraft="handleSecondConfirm"></second-step>
<shade-tip isShow="{{isDialogShow}}" type="{{dialogObj.type}}" title="{{dialogObj.title}}" tipTxt="{{dialogObj.tipTxt}}" btnTxt="{{dialogObj.btnTxt}}" bindclick="handleTipClick" bindclose="handleTipClose" data-type="{{dialogObj.type}}"></shade-tip>
</view>
\ No newline at end of file
</view>
<!-- vin二次复核 -->
<vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog>
\ No newline at end of file
// packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.js
Component({
/**
* 组件的属性列表
*/
properties: {
showVinDialog: Boolean,
secFormData: Object
},
/**
* 组件的初始数据
*/
data: {
vinFormat: '',
formData: {
carVin: ''
},
disable: true,
that: this,
beforeClose: null,
},
lifetimes: {
attached() {
let { carVin } = this.data.secFormData
this.setData({
'formData.carVin': carVin || '',
vinFormat: carVin.replace(/(.{4})/g, "$1 ")
})
}
},
/**
* 组件的方法列表
*/
methods: {
handleInput(e) {
let inputValue = e.detail
this.setData({
'formData.carVin': inputValue
})
},
changeVal(e) {
let { attr, val } = e.target.dataset
this.setData({
[attr]: false
})
},
dialogClost(type) {
this.setData({
beforeClose: (action) =>
new Promise((resolve) => {
if (action === 'confirm') {
// 点击确定,根据传入的状态判断是否取消
resolve(type)
} else if (action === 'cancel') {
// 取消则直接关闭
resolve(true)
}
}),
})
},
onClose() {
this.triggerEvent('onClose')
},
onConfirm(e) {
let { carVin } = this.data.formData
if (!carVin) {
wx.$util.showToast('车架号不能为空')
return this.dialogClost(false) // 表单校验不通过
}
if (!(/^[a-zA-Z0-9]{17}$/.test(carVin))) {
wx.$util.showToast('车架号请输入17位数字和字母')
return this.dialogClost(false) // 表单校验不通过
}
this.triggerEvent('onConfirm', { carVin: carVin })
this.dialogClost(true) // 表单校验通过
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.wxss */
.dialog-class {
font-size: var(--fontSize28);
font-weight: 400;
z-index: 9999;
}
.title_text {
font-family: PingFangSC-Medium;
color: #222222;
font-size: var(--fontSize32);
font-weight: 600;
text-align: center;
}
.message-box {
font-size: var(--fontSize28);
color: #000000a6;
padding: 40rpx 40rpx 50rpx;
}
.label {
padding: 32rpx 0 8rpx;
}
.vin-row {
display: flex;
align-items: center;
}
.vin-txt {
background: #F4F5F7;
border: 2rpx solid #EFF0F2;
border-radius: 12rpx;
font-size: var(--fontSize28);
color: #999999;
flex: 1;
padding: 30rpx 24rpx;
}
.vin-input {
font-size: var(--fontSize28);
padding: 24rpx 24rpx !important;
border: 2rpx solid #EFF0F2;
border-radius: 12rpx;
}
.pictureIcon {
display: inline-block;
width: var(--fontSize36);
height: var(--fontSize36);
margin: 0 24rpx;
flex-shrink: 0;
}
\ No newline at end of file
<!--packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.wxml-->
<van-dialog use-slot title="车架号复核" show="{{ showVinDialog }}" class="dialog-class" width="var(--fontSize622)" show-cancel-button confirmButtonText="确认提交" confirm-button-color="#3582EE" use-title-slot="{{ true }}" bind:confirm="onConfirm" bind:close="onClose" before-close="{{beforeClose}}">
<view slot="title">
<view class="title_text">车架号复核</view>
</view>
<view class="message-box">
<view>请核对车架号是否正确,如信息有误后期将无法申请补偿服务!</view>
<view class="label">车架号:</view>
<view class="vin-row">
<view style="flex: 1;">
<view class="vin-txt" wx:if="{{disable}}">{{vinFormat}}</view>
<van-field wx:else custom-class="vin-input" custom-style="width: 100%; font-size: var(--fontSize28); background: #F4F5F7;" value="{{formData.carVin}}" autosize hold-keyboard placeholder="请输入车架号" maxlength="17" data-attr="carVin" bindinput="handleInput" />
</view>
<image wx:if="{{disable}}" class="pictureIcon" src="/packageEquity/images/icon-edit.png" data-attr="disable" data-val="false" bindtap="changeVal" />
</view>
</view>
</van-dialog>
\ No newline at end of file
......@@ -56,12 +56,48 @@ Page({
dataAttrName: 'owner',
step: 'first',
// step: 'second',
needChangeList: ['price', 'base', 'threePremium', 'carInsidePremium', 'passengerPremium', 'payPrice']
needChangeList: ['price', 'base', 'threePremium', 'carInsidePremium', 'passengerPremium', 'payPrice'],
// vin二次确认弹窗
showVinDialog: false,
secFormData: {},
tempVin: ''
},
secondChange() {
let { showVinDialog } = this.data
this.setData({
showVinDialog: !showVinDialog
})
},
handleSecClose() {
let { tempVin } = this.data
this.setData({
secFormData: {
carVin: ''
},
})
if (tempVin) {
console.log(tempVin, 'tempVin----')
this.setData({
'owner.carVin': tempVin,
tempVin: ''
})
}
this.secondChange()
},
handleSecConfirm(e) {
let { detail } = e
this.setData({
['owner.carVin']: detail.carVin,
tempVin: detail.carVin
})
},
reWrite(type, data) {
console.log(type, data)
let { owner } = this.data
if (type == 'vehicleCertificate') {
this.setData({
tempVin: this.data.owner.carVin
})
let { vinNo: carVin, seatingCapacity: seat, engineNo: engineNumber, carColor } = data
owner = Object.assign(owner, {
carVin,
......@@ -69,6 +105,15 @@ Page({
engineNumber,
carColor
})
owner.carVin = ''
if (carVin) {
this.setData({
secFormData: {
carVin: carVin
}
})
this.secondChange(carVin)
}
}
if (type == 'idCard') {
// debugger
......
......@@ -2,7 +2,8 @@
"navigationBarTitleText": "服务信息",
"usingComponents": {
"first-step": "../components/FirstStep/FirstStep",
"second-step": "../components/SecondStep/SecondStep"
"second-step": "../components/SecondStep/SecondStep",
"vin-sec-dialog": "../components/VinSecDialog/VinSecDialog"
},
"navigationStyle": "custom"
}
......@@ -16,4 +16,6 @@
<view class="layout" style="padding-top:{{navBarHeight}}px; ">
<first-step wx:if="{{step == 'first'}}" id="FirstStep" serviceInfo="{{owner}}" dataAttrName="{{dataAttrName}}" orderInfo="{{orderInfo}}" bindconfirm="handleFirstConfirm" bindeditSave="handleEditSave" mode="{{0}}" />
<second-step wx:if="{{step == 'second'}}" id="SecondStep" orderInfo="{{orderInfo}}" quotationGoodsList="{{quotationGoodsList}}" bindconfirm="handleSecondConfirm" bindeditSave="handleEditSave" />
</view>
\ No newline at end of file
</view>
<!-- vin二次复核 -->
<vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog>
\ No newline at end of file
......@@ -96,17 +96,52 @@ Page({
"quotedPriceUpdate",
"minEquityPrice",
],
firstEnter: true
firstEnter: true,
// vin二次确认弹窗
showVinDialog: false,
secFormData: {},
tempVin: ''
},
closeTips() {
this.setData({
showTips: false,
});
},
secondChange() {
let { showVinDialog } = this.data
this.setData({
showVinDialog: !showVinDialog
})
},
handleSecClose() {
let { tempVin } = this.data
this.setData({
secFormData: {
carVin: ''
},
})
if (tempVin) {
this.setData({
'owner.carVin': tempVin,
tempVin: ''
})
}
this.secondChange()
},
handleSecConfirm(e) {
let { detail } = e
this.setData({
['owner.carVin']: detail.carVin,
tempVin: detail.carVin
})
},
reWrite(type, data) {
console.log(type, data);
let { owner } = this.data;
if (type == "vehicleCertificate") {
this.setData({
tempVin: this.data.owner.carVin
})
let {
vinNo: carVin,
seatingCapacity: seat,
......@@ -119,6 +154,15 @@ Page({
engineNumber,
carColor,
});
owner.carVin = ''
if (carVin) {
this.setData({
secFormData: {
carVin: carVin
}
})
this.secondChange(carVin)
}
}
if (type == "idCard") {
let {
......@@ -318,6 +362,7 @@ Page({
orderInfo.paymentDocList = _tempMap
}
// -------
wx.showLoading("报价中...");
let result = await this.handleSecondConfirmCheck(true);
let { code, data: id, message } = result;
......
......@@ -3,7 +3,8 @@
"usingComponents": {
"first-step": "../components/FirstStep/FirstStep",
"second-step": "../components/SecondStepSimple/SecondStep",
"order-popup": "../components/OrderPopup/OrderPopup"
"order-popup": "../components/OrderPopup/OrderPopup",
"vin-sec-dialog": "../components/VinSecDialog/VinSecDialog"
},
"navigationStyle": "custom"
}
/* packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.wxss */
\ No newline at end of file
......@@ -25,4 +25,6 @@
<view class="confirm text-center" bindtap="submit">提交工单</view>
</view> -->
</view>
<order-popup orderType="{{orderInfo.payType }}" resetTransNo="{{orderInfo.transactionNo || orderInfo.outTradeNo}}" resetOrder="{{orderInfo.resetOrder}}" wx:if="{{showPopup}}" show="{{showPopup}}" />
\ No newline at end of file
<order-popup orderType="{{orderInfo.payType }}" resetTransNo="{{orderInfo.transactionNo || orderInfo.outTradeNo}}" resetOrder="{{orderInfo.resetOrder}}" wx:if="{{showPopup}}" show="{{showPopup}}" />
<!-- vin二次复核 -->
<vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog>
\ No newline at end of file
/* packageEquity/pages/carQuotation/fullSignture/fullSignture.wxss */
\ No newline at end of file
/* packageEquity/pages/carQuotation/reception/reception.wxss */
\ No newline at end of file
/* packageEquity/pages/carQuotation/updateOrderInfo/updateOrderInfo.wxss */
\ No newline at end of file
......@@ -11,90 +11,90 @@ Page({
*/
data: {
customerObj: [{
label: '客户姓名',
key: 'customerName'
},
{
label: '手机号',
key: 'customerPhone',
// color: '#347BFF',
// callBack: 'makePhoneCall',
copy: true
},
{
label: '性别',
key: 'customerSex',
enum: {
1: '男',
2: '女'
}
},
{
label: '年龄区间',
key: 'customerAgeRange',
},
{
label: '所在城市',
key: 'customerCity',
},
{
label: '兴趣爱好',
key: 'customerHobby'
},
{
label: '陪伴人员',
key: 'customerCompanion'
},
{
label: '销售顾问',
key: 'employeeName'
},
{
label: '客户画像',
key: 'userPortrait',
portrait: true
label: '客户姓名',
key: 'customerName'
},
{
label: '手机号',
key: 'customerPhone',
// color: '#347BFF',
// callBack: 'makePhoneCall',
copy: true
},
{
label: '性别',
key: 'customerSex',
enum: {
1: '男',
2: '女'
}
},
{
label: '年龄区间',
key: 'customerAgeRange',
},
{
label: '所在城市',
key: 'customerCity',
},
{
label: '兴趣爱好',
key: 'customerHobby'
},
{
label: '陪伴人员',
key: 'customerCompanion'
},
{
label: '销售顾问',
key: 'employeeName'
},
{
label: '客户画像',
key: 'userPortrait',
portrait: true
}
],
carInfoObk: [{
label: '客户车型',
key: 'carSeriesName'
},
{
label: '车辆颜色',
key: 'carColor'
},
{
label: '座位数',
key: 'carSeat'
},
{
label: '车辆价格',
key: 'carPrice'
},
{
label: '车架号码',
key: 'carVin'
},
label: '客户车型',
key: 'carSeriesName'
},
{
label: '车辆颜色',
key: 'carColor'
},
{
label: '座位数',
key: 'carSeat'
},
{
label: '车辆价格',
key: 'carPrice'
},
{
label: '车架号码',
key: 'carVin'
},
],
recordObj: [{
label: '跟进人',
key: 'follower'
},
{
label: ['事', '件'],
key: 'eventDesc',
// enum: {
// 1: '车主领券',
// 2: '车主预约',
// 3: '预约时间',
// 4: '修改时间',
// 5: '取消预约'
// }
},
{
label: ['备', '注'],
key: 'remark'
}
label: '跟进人',
key: 'follower'
},
{
label: ['事', '件'],
key: 'eventDesc',
// enum: {
// 1: '车主领券',
// 2: '车主预约',
// 3: '预约时间',
// 4: '修改时间',
// 5: '取消预约'
// }
},
{
label: ['备', '注'],
key: 'remark'
}
],
},
......@@ -195,7 +195,20 @@ Page({
_userPortrait.push(item.optionList.find(k => k.confId == n).confName)
})
} 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 = [
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 = [
{
confId: '1',
......@@ -179,14 +261,30 @@ var formData = [
optionsName: 'maritalStatus'
},
{
label: '附赠产品(每类产品只支持选一个选项)',
name: 'giftProductList',
isMult: true,
optionList: giftProduct,
label: '职业',
name: 'career',
optionList: career,
optionId: 'confId',
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: '买车情况(单选)',
......@@ -253,5 +351,7 @@ export default {
promoteList,
satisfiedList,
timeList,
formData
formData,
career,
personality
}
/* packageEquity/pages/collegeScene/collegeScene.wxss */
\ No newline at end of file
......@@ -34,17 +34,6 @@
catchinput="input"
/>
</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 class="fixed-footer">
<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
/* packageEquity/pages/ocrEquityModules/ocrEquityModules.wxss */
\ No newline at end of file
/* packageEquity/pages/receptionDetail/receptionDetail.wxss */
\ No newline at end of file
/* pages/sceneIndex/sceneIndex.wxss */
\ No newline at end of file
/* pages/log/log.wxss */
\ No newline at end of file
/* pages/sceneIndex/sceneIndex.wxss */
\ No newline at end of file
......@@ -43,4 +43,12 @@ module.exports = {
params,
);
},
// 查询员工微信openid
getStaffDetailApi(data) {
let params = data || {}
return api.post(
"dj.api.smartcarlife.staff.wechat.detail",
params
);
},
}
\ No newline at end of file
......@@ -222,9 +222,3 @@
<button class="modal_btn" catchtap="toEditBankAccount" >去编辑</button>
</view>
</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
......@@ -53,6 +53,7 @@ page {
color: #323436;
font-weight: 600;
}
.point-box {
display: flex;
align-items: center;
......@@ -455,6 +456,7 @@ page {
.work-box .disabled {
opacity: .5;
}
.logout-box {
width: calc(100% - 40rpx);
background: #FFFFFF;
......@@ -511,8 +513,9 @@ page {
.fixbtn {
position: fixed;
bottom: 100rpx;
}
.popclass {
position: relative;
border-radius: 24rpx 24rpx 0 0;
......@@ -556,7 +559,7 @@ page {
height: 88rpx;
margin: 0 auto;
margin-top: 120rpx;
margin-bottom:20rpx;
margin-bottom: 20rpx;
background: #347BFF;
border-radius: 12rpx;
font-weight: 500;
......@@ -572,4 +575,20 @@ page {
background: #fff;
color: #333;
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
/* packagesList/webView/pages/webView.wxss */
\ No newline at end of file
......@@ -247,6 +247,7 @@ export const checkScene = options => {
upgradeStaffDaily: 'tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily',
deliveryTarget: 'packageEquity/pages/deliveryTarget/deliveryTarget',
'aiDetail': 'packageEquity/pages/aiExcercise/ai/ai',
'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex',
'tabDateIndex': 'pages/tabDateIndex/pages/tabDateIndex'
}
options.path = pagePath[query.page]
......
/* subvehicleConversion/pages/activityPage/visitor/visitor.wxss */
\ No newline at end of file
/* tabDate/pages/apprManage/apprManage.wxss */
\ No newline at end of file
......@@ -106,7 +106,7 @@ Page({
});
}
},
error: () => {},
error: () => { },
},
"#modal2"
);
......@@ -202,12 +202,18 @@ Page({
);
});
} else {
_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
);
}
}
}
}
......@@ -263,9 +269,8 @@ Page({
});
}
if (detail.carSeriesName)
detail.carType = `${detail.carBrand}-${
detail.carChildsBrandName || ""
}-${detail.carSeriesName}`;
detail.carType = `${detail.carBrand}-${detail.carChildsBrandName || ""
}-${detail.carSeriesName}`;
if (detail.customerCoupon.createdDate)
detail.time = new Date(detail.customerCoupon.createdDate).format(
"yyyy-MM-dd hh:mm:ss"
......@@ -389,7 +394,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {},
onReady: function () { },
/**
* 生命周期函数--监听页面显示
......@@ -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 = [
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 = [
{
confId: '1',
......@@ -179,14 +261,30 @@ var formData = [
optionsName: 'maritalStatus'
},
{
label: '附赠产品(每类产品只支持选一个选项)',
name: 'giftProductList',
isMult: true,
optionList: giftProduct,
label: '职业',
name: 'career',
optionList: career,
optionId: 'confId',
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: '买车情况(单选)',
......@@ -253,5 +351,7 @@ export default {
promoteList,
satisfiedList,
timeList,
formData
formData,
career,
personality
}
......@@ -11,24 +11,25 @@ Page({
detailForm: {
additionalInformation: ''
},
customerSex:1
customerSex: 1
},
click(e) {
let { pidx, idx } = e.currentTarget.dataset
let { formData } = this.data
let _item = formData[pidx]
let _active = formData[pidx].optionList[idx].active
// debugger
if (!_item.isMult) {
this.setData({
[`formData[${pidx}].optionList`]: JSON.parse(JSON.stringify(CONSTANTDATA[_item.optionsName]))
})
}
// 赙赠产品 每类只能二选一
if (_item.name == 'giftProductList' ) {
const noActiveIdx = idx % 2 == 0? idx+1:idx-1
if (_item.name == 'giftProductList') {
const noActiveIdx = idx % 2 == 0 ? idx + 1 : idx - 1
this.setData({
[`formData[${pidx}].optionList[${noActiveIdx}].active`]:false
[`formData[${pidx}].optionList[${noActiveIdx}].active`]: false
})
}
......@@ -45,28 +46,28 @@ Page({
})
},
async recoverPortrait(id) {
let {code,data:info} = await api.portraitQuery({id})
console.log(info);
if (code!= 0 ) return
async recoverPortrait(id) {
let { code, data: info } = await api.portraitQuery({ id })
console.log(info);
if (code != 0) return
let { formData } = this.data
formData.forEach(item => {
if (info[item.name]) {
if (item.isMult) {
console.log(item.name,info[item.name],'info[item.name]');
// let _list = info[item.name].split(',')
let _list = info[item.name]
_list.forEach(n => {
item.optionList.find(k => k.confId == n).active = true
})
} else {
item.optionList.find(k => k.confId == info[item.name]).active = true
}
if (item.isMult) {
console.log(item.name, info[item.name], 'info[item.name]');
// let _list = info[item.name].split(',')
let _list = info[item.name]
_list.forEach(n => {
item.optionList.find(k => k.confId == n).active = true
})
} else {
item.optionList.find(k => k.confId == info[item.name]).active = true
}
// }
} else {
if (item.name == 'customerSex') {
let {customerSex} = this.data
let { customerSex } = this.data
item.optionList.find(k => k.confId == customerSex).active = true
}
}
......@@ -77,19 +78,19 @@ if (code!= 0 ) return
},
reset() {
let {formData} = this.data
let { formData } = this.data
formData.forEach(item => {
// console.log(item?.optionList,'item?.optionList');
// if(item.isMult) params[item.name] = []
if (item.name!='customerSex') {
if (item.name != 'customerSex') {
item?.optionList?.forEach(subItem => {
subItem.active = false
subItem.active = false
})
}
})
console.log(formData,'formData');
console.log(formData, 'formData');
this.setData({
formData
})
......@@ -100,10 +101,10 @@ if (code!= 0 ) return
let params = {}
formData.forEach(item => {
// console.log(item?.optionList,'item?.optionList');
if(item.isMult) params[item.name] = []
if (item.isMult) params[item.name] = []
item?.optionList?.forEach(subItem => {
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
wx.hideLoading()
if (code == '0') {
wx.$util.showToast('编辑成功')
// 仅刷新预约管理列表
wx.$util.refreshPageData(true)
// 仅刷新预约管理列表
wx.$util.refreshPageData(true)
wx.$router.back()
} else {
wx.$util.showToast(message)
......@@ -150,51 +151,51 @@ if (code!= 0 ) return
},
onRoute(options) {
console.log(options);
const {customerId,customer} = options
const { customerId, customer } = options
// let detail = {
// ...options.customerCoupon,
// ...options.customer,
// ...options
// ...options.customerCoupon,
// ...options.customer,
// ...options
// }
this.setData({
customerId,
customerSex:customer?.customerSex||1
})
console.log(customerId, 'customerId')
this.recoverPortrait(customerId)
this.setData({
customerId,
customerSex: customer?.customerSex || 1
})
console.log(customerId, '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
......@@ -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" />
</view>
<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}}">
{{subItem.confName}}
<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}}">
<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>
</view>
</view>
......
......@@ -33,6 +33,25 @@
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 {
background: #347BFF14;
border: var(--fontSize2) solid #347BFF;
......
......@@ -234,4 +234,9 @@ module.exports = {
// params.payType = 1
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({
showRatingPopup: false,
showRatingCard: true, // 显示评价卡片
isMake: true,
warrantyEditObj: {}
},
RatingPopupSetting() {
this.setData({
......@@ -45,6 +46,60 @@ Page({
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 = {} }) {
let { orderInfo } = this.data;
......@@ -370,6 +425,7 @@ Page({
warrantyPeriod: e.upgradeWarrantyPeriod,
goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName,
cardCode: e.cardCode,
warrantyPrice: e.warrantyPrice
});
}
}
......
......@@ -790,6 +790,54 @@ page {
border: 2rpx solid #347BFF;
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 {
......@@ -871,63 +919,30 @@ page {
margin-left: var(--fontSize12);
}
.modal text,
.modal {
font-size: var(--fontSize28);
color: #333333;
}
.modal .orderCode {
margin-bottom: var(--fontSize20);
}
.modal .code {
color: #888888;
.modatcontentOrder {
padding: 30rpx 50rpx;
}
.modal .color {
color: #F24724;
.editIcon {
margin-left: auto;
width: 32rpx;
height: 32rpx;
}
.modal {
.icon {
width: 96rpx;
height: 96rpx;
margin-right: 30rpx;
}
.warranty-name {
display: flex;
align-items: center;
.modalbox {
.right {
display: flex;
align-items: center;
box-sizing: border-box;
width: 522rpx;
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;
margin-left: auto;
justify-content: center;
&+.modalbox {
margin-top: 16rpx;
.warranty-price {
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
......@@ -370,16 +370,29 @@ Page({
console.log(e);
let { goodsList } = this.data;
let { value } = e.detail;
let { index, gindex } = e.currentTarget.dataset;
let { index, gindex, item } = e.currentTarget.dataset;
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].price = goodsList[index].goodsList.reduce((prev, cur) => {
return Number(prev) + Number(cur.price);
}, 0);
//获取套餐内商品总价
let total = goodsList[index].price * goodsList[index].count;
goodsList[index].totalPrice = wx.$util.decimal(total, 2);
this.setData(
{
goodsList,
......@@ -393,33 +406,29 @@ Page({
let { orderObj, goodsList } = this.data;
let { value } = e.detail;
let { index, item } = e.currentTarget.dataset;
console.log(item, 'item');
let target = `goodsList[${index}].price`;
let number = wx.$util.removeLeadingZerosAndEnsureNonNegative(value);
this.setData({
[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);
},
// 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) {
let { index, item } = e.currentTarget.dataset;
let target = `goodsList[${index}].price`;
......@@ -432,8 +441,22 @@ Page({
},
setGoodsTotal(goodsList) {
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({
goodsList,
total: wx.$util.decimal(total, 2),
});
},
......@@ -618,9 +641,13 @@ Page({
let { baseConfigData } = this.data;
let filmArr = [];
let arr = [];
let errTargetNum = 0
if (goodsList) {
goodsList.map((e) => {
if (!e.isType) {
if (e.errorTarget) {
errTargetNum++;
}
let obj = {
baseGoodsId: e.baseGoodsId,
// upgradeGoodsId: e.id,
......@@ -644,6 +671,9 @@ Page({
goodsList.map((e) => {
if (e.isType) {
e.goodsList.forEach((g) => {
if (g.errorTarget) {
errTargetNum++;
}
arr.push({
packageCode: e.packageCode,
packageName: e.packageName,
......@@ -662,6 +692,9 @@ Page({
if (orderObj.subOrderList.length == 0) {
return "商品不能为空";
}
if (errTargetNum) {
return "商品不能低于最低价格";
}
// } else {
// // 不升级删除商品参数
// delete orderObj.subOrderList
......
......@@ -294,7 +294,7 @@ page {
}
.goods-box .goods .price input.error {
color: red;
border: var(--fontSize2) solid #F24724;
}
.goods-box .goods .price input.disabled {
......
......@@ -135,7 +135,7 @@
<view class="price_count">
<view class="price">
<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 class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="1">x{{item.count}}</view>
</view>
......@@ -168,7 +168,7 @@
<view class="price_count">
<view class="price">
<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 class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view>
......@@ -201,7 +201,7 @@
<view class="price_count">
<view class="price">
<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 class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view>
</view>
......@@ -238,7 +238,7 @@
<view class="price_count">
<view class="price">
<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 class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view>
</view>
......@@ -268,7 +268,7 @@
<view class="price_count">
<view class="price">
<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 class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="4">x{{item.count}}</view>
</view>
......@@ -356,7 +356,7 @@
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
</view>
<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" />
<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 }}" />
......
/* packageEquity/pages/carQuotation/fullSignture/fullSignture.wxss */
\ No newline at end of file
/* tabWorkOrder/pages/ocr/ocr.wxss */
\ No newline at end of file
......@@ -541,10 +541,8 @@ Page({
code
} = result
const warrantyCardVisible = data.cardCodeFlag && data.cardCodeFlag == 1
// const signatureSwitchValue = data.signatureSwitch && data.signatureSwitch == 1
this.setData({
warrantyCardVisible: !warrantyCardVisible
// signatureSwitch: signatureSwitchValue
})
})
},
......
/* tabWorkOrder/pages/orderDetail/orderDetail.wxss */
\ No newline at end of file
......@@ -42,7 +42,8 @@
<view class="name">{{g.upgradeGoodsAlias||g.upgradeGoodsName}}</view>
<view class="price">¥{{g.price}}</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>
......@@ -248,7 +249,7 @@
</block> -->
</view>
<!-- 已支付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 class="btn text-center" bindtap="navOrderSignature">客户签名确认</view>
......
/* tabWorkOrder/pages/upgradeStaffDaily/upgradeStaffDaily.wxss */
\ No newline at end of file
......@@ -130,7 +130,7 @@ class WxValidate {
* 验证身份证号码
*/
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!