Commit e520d6d0 by 前端

Merge branch 'develop' into 'master'

Develop

See merge request !164
2 parents 319d5aee c9daff53
......@@ -62,7 +62,7 @@ Component({
copyArtificerList.map(i => {
i.active = false
if (i.id == selectedTechnicianId) i.active = true
if (i.technicianName.indexOf(value) != -1) {
if (i.staffName.indexOf(value) != -1) {
arr.push(i)
}
})
......@@ -106,8 +106,9 @@ Component({
if (!arr.length) {
return wx.$util.showToast('请选择技师')
}
orderInfo.technicianUuid = arr[0]?.uuid || ''
orderInfo.technicianId = arr[0]?.id || ''
orderInfo.technicianName = arr[0]?.technicianName || ''
orderInfo.technicianName = arr[0]?.staffName || ''
this.triggerEvent('confirm', orderInfo)
}
}
......
......@@ -11,7 +11,7 @@
<view class="checked_img">
<image wx:if="{{item.active}}" src="{{IMG_URL}}checked.png"></image>
</view>
<view class="text_box"><view class="text-hide">{{item.technicianName}}</view></view>
<view class="text_box"><view class="text-hide">{{item.staffName}}</view></view>
</view>
</block>
</scroll-view>
......
......@@ -12,6 +12,16 @@ Component({
}
}
},
selectPayType: {
type: Number,
observer: function (n) {
// console.log(n,'selectPayType');
if (n == 0) {
this.checkCoupon()
// defaultSelectCoupon()
}
}
},
merchantId: {
type: Number,
observer: function (n, o) {
......@@ -90,7 +100,8 @@ Component({
api
.getCouponList({
merchantId,
yqMerchantId
yqMerchantId,
orderByType:9, // 按时间排序
})
.then(res => {
let { code, data, message } = res
......@@ -180,8 +191,9 @@ Component({
customerCouponList,
chooseItem
})
// 追加一个逻辑 订单补录并且不是回显的话
if (pageName == 'additionRecordOrder' && !orderObj.couponName && !orderObj.customerCouponCode) {
// 追加一个逻辑 订单补录并且不是回显的话 或则订单是战败
// pageName == 'additionRecordOrder' &&
if ( (pageName == 'additionRecordOrder' || this.data.selectPayType == 0 )&&!orderObj.couponName && !orderObj.customerCouponCode) {
if (couponList.length) {
// couponList.find((item)=>{
// return item.list.length &&
......
......@@ -4,7 +4,21 @@ Component({
* 组件的属性列表
*/
properties: {
tabList: Array
tabList: Array,
activeIndex: {
type: Number,
observer: function (n) {
console.log(this.data.tabIndex,'activeIndex',n);
console.log(this.data.tabIndex!= n);
if (this.data.tabIndex!= n) {
this.setData({
tabIndex:this.data.activeIndex
})
this.setTab(this.data.tabIndex)
}
}
}
},
/**
* 组件的初始数据
......@@ -14,7 +28,9 @@ Component({
},
lifetimes: {
ready() {
this.setTab()
console.log('lifetimes',this.data.tabIndex);
console.log('lifetimes',this.data.activeIndex);
this.setTab(this.data.tabIndex)
}
},
/**
......
......@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 5cdptest
*/
let index = 3
let index = 2
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
......
/* packageEquity/pages/carEquity/previewList/previewList.wxss */
page {
background: #f3f5f7;
}
.item_box {
box-sizing: border-box;
padding: 32rpx;
width: 710rpx;
height: 120rpx;
margin: 20rpx auto 0;
display: flex;
align-items: center;
justify-content: space-between;
background: #FFFFFF;
box-shadow: 0 6rpx 16rpx 0 #cdcdd159;
border-radius: 16rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32rpx;
color: #222222;
}
.arrow {
width: 20rpx;
height: 20rpx;
border-top: 2rpx solid transparent;
border-right: 2rpx solid #ccc;
border-bottom: 2rpx solid #ccc;
border-left: 2rpx solid transparent;
transform: rotate(-45deg) translateY(-4rpx);
margin-left: 16rpx;
transition: all .3s;
}
.prevIcon {
margin-left: auto;
margin-right: 40rpx;
}
.downloadIcon{
margin-left: 40prx;}
.icon {
width: 40rpx;
height: 40rpx;
/* packageEquity/pages/carEquity/previewList/previewList.wxss */
page {
background: #f3f5f7;
}
.item_box {
box-sizing: border-box;
padding: 32rpx;
width: 710rpx;
height: 120rpx;
margin: 20rpx auto 0;
display: flex;
align-items: center;
justify-content: space-between;
background: #FFFFFF;
box-shadow: 0 6rpx 16rpx 0 #cdcdd159;
border-radius: 16rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32rpx;
color: #222222;
}
.arrow {
width: 20rpx;
height: 20rpx;
border-top: 2rpx solid transparent;
border-right: 2rpx solid #ccc;
border-bottom: 2rpx solid #ccc;
border-left: 2rpx solid transparent;
transform: rotate(-45deg) translateY(-4rpx);
margin-left: 16rpx;
transition: all .3s;
}
.prevIcon {
margin-left: auto;
margin-right: 40rpx;
}
.downloadIcon{
margin-left: 40prx;}
.icon {
width: 40rpx;
height: 40rpx;
}
\ No newline at end of file
/* components/Goods/Goods.wxss */
/* @import '../Coupon/Coupon.wxss'; */
.coupon-box {
width: calc(100% + 64rpx);
height: 100%;
margin-left: -32rpx;
}
.coupon {
height: calc(100% - 104rpx);
}
.box {
border-bottom: 2rpx solid #EBEDF0;
padding-left: 72rpx;
}
.title {
padding: 18rpx 0 0 32rpx;
font-size: 32rpx;
color: #333333;
height: 88rpx;
box-sizing: border-box;
}
.text-center{
text-align: center;
}
.item {
box-sizing: border-box;
padding: 23rpx 0;
border-top: 2rpx solid #EBEDF0;
/* height: 84rpx; */
display: flex;
/* align-items: center; */
align-items: start;
font-size: 28rpx;
color: #888888;
position: relative;
}
.item.disabled{
color: #ccc;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.serveName{
width: 100%;
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: break-word;
}
.item .icon{
display: none;
width: 32rpx;
height: 32rpx;
position: absolute;
top: 28rpx;
left: -52rpx;
/* transform: translateY(-50%); */
}
.item.active{
color: #3582EE;
}
.item.active .icon{
display: block;
}
.nothing{
padding: 100rpx;
text-align: center;
color: #999;
}
.item {
justify-content: space-between;
padding-right: 32rpx;
}
.title .tips {
font-size: 24rpx;
color: #999999;
}
.item .value {
/* width: calc(100% - 180rpx); */
width: 100%;
display: flex;
/* flex-direction: ; */
justify-content: space-between;
}
.item .labelWidth {
width: calc(100% - 180rpx);
/* display: flex; */
}
.item .value .name {
max-width: 85%;
}
.item .value .name .warning_text{
color: #F24724;
margin-left: 10rpx;
font-size: 22rpx;
}
.item .value .textWidth {
max-width: 100%;
}
.item .value .last {
max-width: 15%;
}
.item .value .price {
/* color: #3582EE; */
font-weight: 500;
font-size: 28rpx;
color: #EB4E4E;
}
.item .control {
display: flex;
align-items: center;
}
.item .control .minus,
.item .control .add {
width: 44rpx;
height: 44rpx;
color: #3582EE;
background: #F7F7F7;
border-radius: 6rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
font-weight: 700;
}
.item .control .input {
width: 72rpx;
height: 40rpx;
text-align: center;
font-size: 28rpx;
color: #333333;
margin: 0 5rpx;
}
.disableSelect {
opacity: 0.4;
}
.item .icon {
display: block;
}
.item .icon .arc {
width: 100%;
height: 100%;
border: 2rpx solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
.nothing {
padding: 100rpx;
text-align: center;
color: #999;
/* components/Goods/Goods.wxss */
/* @import '../Coupon/Coupon.wxss'; */
.coupon-box {
width: calc(100% + 64rpx);
height: 100%;
margin-left: -32rpx;
}
.coupon {
height: calc(100% - 104rpx);
}
.box {
border-bottom: 2rpx solid #EBEDF0;
padding-left: 72rpx;
}
.title {
padding: 18rpx 0 0 32rpx;
font-size: 32rpx;
color: #333333;
height: 88rpx;
box-sizing: border-box;
}
.text-center{
text-align: center;
}
.item {
box-sizing: border-box;
padding: 23rpx 0;
border-top: 2rpx solid #EBEDF0;
/* height: 84rpx; */
display: flex;
/* align-items: center; */
align-items: start;
font-size: 28rpx;
color: #888888;
position: relative;
}
.item.disabled{
color: #ccc;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.serveName{
width: 100%;
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: break-word;
}
.item .icon{
display: none;
width: 32rpx;
height: 32rpx;
position: absolute;
top: 28rpx;
left: -52rpx;
/* transform: translateY(-50%); */
}
.item.active{
color: #3582EE;
}
.item.active .icon{
display: block;
}
.nothing{
padding: 100rpx;
text-align: center;
color: #999;
}
.item {
justify-content: space-between;
padding-right: 32rpx;
}
.title .tips {
font-size: 24rpx;
color: #999999;
}
.item .value {
/* width: calc(100% - 180rpx); */
width: 100%;
display: flex;
/* flex-direction: ; */
justify-content: space-between;
}
.item .labelWidth {
width: calc(100% - 180rpx);
/* display: flex; */
}
.item .value .name {
max-width: 85%;
}
.item .value .name .warning_text{
color: #F24724;
margin-left: 10rpx;
font-size: 22rpx;
}
.item .value .textWidth {
max-width: 100%;
}
.item .value .last {
max-width: 15%;
}
.item .value .price {
/* color: #3582EE; */
font-weight: 500;
font-size: 28rpx;
color: #EB4E4E;
}
.item .control {
display: flex;
align-items: center;
}
.item .control .minus,
.item .control .add {
width: 44rpx;
height: 44rpx;
color: #3582EE;
background: #F7F7F7;
border-radius: 6rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
font-weight: 700;
}
.item .control .input {
width: 72rpx;
height: 40rpx;
text-align: center;
font-size: 28rpx;
color: #333333;
margin: 0 5rpx;
}
.disableSelect {
opacity: 0.4;
}
.item .icon {
display: block;
}
.item .icon .arc {
width: 100%;
height: 100%;
border: 2rpx solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
.nothing {
padding: 100rpx;
text-align: center;
color: #999;
}
\ No newline at end of file
......@@ -8,6 +8,7 @@ Page({
*/
data: {
...order_mixins.data,
activeIndex:0,
orderObj: [
{
label: '销售顾问',
......@@ -358,7 +359,10 @@ Page({
})
e.total_price = e.totalPrice
e.totalPrice = Number(wx.$util.decimal(e.totalPrice, 2)).toFixed(2)
let orderType = userInfo.userType == 1 && e.status != 9 && e.status != 1 && e.selectPayType != 3 && e.selectPayType != 1
let orderType = userInfo.userType == 1 && e.status != 9 && e.status != 1 && ![1,3,4].includes(e.selectPayType)
// let orderType = userInfo.userType !== 1 && e.status != 9 && e.status != 1 && e.selectPayType != 3 && e.selectPayType != 1
console.log(userType);
console.log(orderType);
e.repeal = userType && orderType
// 处理subOrderList 商品为空的情况
e.subOrderList = e.subOrderList.filter(item => item.merchantGoodsId)
......@@ -453,6 +457,23 @@ Page({
// wx.setStorageSync('waitCode', list)
// })
// },
onRoute (options) {
// console.log('activeIndex' in options);
if ('activeIndex' in options) {
// let { searchObj } = this.data
// delete searchObj.inviteStatus
this.setData({
activeIndex:options.activeIndex,
// searchObj.inviteStatusList
})
}
// if (wx.$refresh ) {
// this.search()
// // this.getStatByPeriod()
// // this.getiIviteRecord()
// }
// console.log(options,'options');
},
/**
* 生命周期函数--监听页面加载
*/
......
......@@ -27,7 +27,7 @@
</view>
</view>
</view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick" />
<tab-bar tabList="{{tabList}}" bindclick="tabClick" activeIndex="{{activeIndex}}" />
</view>
<!-- 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销 -->
<block wx:if="{{flag}}">
......
......@@ -8,6 +8,7 @@ Page({
*/
data: {
tabIndex: 0,
activeIndex:0,
phoneShow: false,
inviteObj: {
dayInvited: 0,
......@@ -248,6 +249,7 @@ Page({
})
},
tabClick(e) {
console.log('tabClick',e.detail);
let { searchObj } = this.data
delete searchObj.inviteStatus
this.setData({
......@@ -304,8 +306,8 @@ Page({
this.setData({
phoneShow: app.globalData.YQorderSetting?.yqPhoneConfig
})
this.getStatByPeriod()
this.getiIviteRecord()
// this.getStatByPeriod()
// this.getiIviteRecord()
},
getiIviteRecord() {
// let params = {}
......@@ -366,6 +368,8 @@ Page({
}
if (keyword) obj.keyword = keyword
if (tabIndex != 0) obj.inviteStatusList = tabIndex == 1 ? [2] : [1, 3]
console.log(tabIndex,obj);
// debugger
api.getInviteList(obj).then(res => {
wx.hideLoading()
console.log(obj, res)
......@@ -418,7 +422,6 @@ Page({
},
setInviteDate() {
let { dateItem, inviteDateStr } = this.data
api
.setInviteDate({
id: dateItem.id,
......@@ -440,6 +443,23 @@ Page({
}
})
},
onRoute (options) {
// console.log('activeIndex' in options);
if ('activeIndex' in options) {
// let { searchObj } = this.data
// delete searchObj.inviteStatus
this.setData({
activeIndex:options.activeIndex,
// searchObj.inviteStatusList
})
}
if (wx.$refresh ) {
this.search()
// this.getStatByPeriod()
// this.getiIviteRecord()
}
console.log(options,'options');
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
......@@ -449,11 +469,11 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
if (wx.$refresh) {
this.search()
this.getStatByPeriod()
this.getiIviteRecord()
}
// if (wx.$refresh) {
// this.search()
// // this.getStatByPeriod()
// // this.getiIviteRecord()
// }
},
/**
......
......@@ -26,7 +26,7 @@
</view>
</view>
</view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick" />
<tab-bar tabList="{{tabList}}" bindclick="tabClick" activeIndex="{{activeIndex}}"/>
</view>
<view class="list-bar">
<view>今日预约 · <span class="txt-blue">{{inviteObj.dayInvited || 0}}</span></view>
......
......@@ -169,6 +169,15 @@ Page({
})
this.tapPicker()
},
navTabPage (e){
let { item } = e.currentTarget.dataset
if ('activeIndex' in item) {
wx.$refresh = true
wx.$router.go(item.url,{activeIndex:item.activeIndex})
} else {
wx.$router.go(item.url)
}
},
jump(e) {
let { item, type } = e.currentTarget.dataset
let { userInfo } = this.data
......
......@@ -48,7 +48,7 @@
</view>
</view>
<view class="customStatistic">
<veiw class="customItem" wx:for="{{ totalList }}" wx:key="index">
<veiw class="customItem" wx:for="{{ totalList }}" data-item="{{item}}" bindtap="navTabPage" wx:key="index">
<veiw class="label">{{item.name}}</veiw>
<view class="number">
<text class="unit" wx:if="{{ item.unit }}">{{item.unit}}</text>
......@@ -185,6 +185,17 @@
</view>
</view>
</view>
<block wx:if="{{ isNoStaff }}">
<view class="conTitle utils">展业工具</view>
<div class="menu noStaff">
<block wx:for="{{ menu }}" wx:key="index">
<view class="item" bindtap="jump" data-item="{{ item }}" data-type="{{ userInfo.userType }}">
<image src="../../images/tabIcon0{{ index+1 }}.png" />
<view class="label">{{item.name}}</view>
</view>
</block>
</div>
</block>
<!-- 员工不给看统计数据 -->
<view class="content" wx:if="{{ userInfo.loginRole&&userInfo.loginRole!=4 }}">
<view class="box table">
......@@ -326,17 +337,7 @@
<view class="table-tips">到底了~</view>
</block> -->
</view>
<block wx:if="{{ isNoStaff }}">
<view class="conTitle utils">展业工具</view>
<div class="menu noStaff">
<block wx:for="{{ menu }}" wx:key="index">
<view class="item" bindtap="jump" data-item="{{ item }}" data-type="{{ userInfo.userType }}">
<image src="../../images/tabIcon0{{ index+1 }}.png" />
<view class="label">{{item.name}}</view>
</view>
</block>
</div>
</block>
</view>
</block>
<!-- </scroll-view> -->
......
......@@ -67,33 +67,43 @@ export default {
{
name: '服务客户',
itemName: 'totalCustomer',
index: 1
index: 1,
url: 'tabOperating.index'
},
{
name: '已预约客户',
itemName: 'totalInvited',
index: 2
index: 2,
url: 'tabDate.index',
activeIndex:1
},
{
name: '待预约客户',
itemName: 'totalWaitToInvited',
index: 3
index: 3,
url: 'tabDate.index',
activeIndex:2
},
{
name: '转化订单',
itemName: 'totalUpgrade',
index: 4
index: 4,
url:'pages.index',
activeIndex:2
},
{
name: '战败订单',
itemName: 'totalNotUpgrade',
index: 5
index: 5,
url:'pages.index',
activeIndex:3
},
{
name: '客单价',
itemName: 'customerUnitPrice',
unit: '¥',
index: 6
index: 6,
url: 'tabOperating.index'
}
// {
......
......@@ -132,5 +132,10 @@ module.exports = {
getOrderByCustomerCouponId(data) {
// return api.post('dj.api.smartcarlife.order.getOrderByCustomerCouponId ', data)
return api.get('dj.api.smartcarlife.order.getOrderByCustomerCouponId', data)
},
/** 获取园区店配置技师数据 */
getQYTechnicianList(data) {
return api.post('dj.api.smartcarlife.technician.list', data)
}
}
......@@ -56,7 +56,7 @@ Page({
if (!orderInfo?.customer?.orderCode) {
delete orderInfo?.customer?.orderCode
}
let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark', 'technicianId', 'technicianName']
let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark', 'technicianUuid', 'technicianId', 'technicianName']
let userInfo = {}
orderInfo = Object.assign(orderInfo, orderInfo.customer)
paramsList.map(item => {
......@@ -295,10 +295,16 @@ Page({
customerObj
})
}
// 有配置技师
if (data?.technicianConfigDTOList?.length > 0) {
this.isArtificer(data)
}
// // 有配置技师
// if (data?.technicianConfigDTOList?.length > 0) {
// this.isArtificer(data)
// }
// 获取园区店技师配置信息
api.getQYTechnicianList({yqMerchantId: wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId}).then(respone => {
if (respone?.code == 0) {
if (respone?.data.length > 0) this.isArtificer(respone.data)
}
})
} else {
wx.showModal({
title: '温馨提示',
......@@ -329,7 +335,8 @@ Page({
}
this.setData({
customerObj,
artificerList: orderInfo?.technicianConfigDTOList,
artificerList: data, // 园区店配置的技师数据
// artificerList: orderInfo?.technicianConfigDTOList,
orderInfo
})
},
......
......@@ -200,7 +200,7 @@ Page({
}
// 处理订单是否显示 操作按钮 支付方式为pos和微信 并且订单状态是 4和6
// data.failureFlag != 'Y'
data.canOperate = [1, 3].includes(data.selectPayType) && [4, 6].includes(data.status)
data.canOperate = [1, 3, 4].includes(data.selectPayType) && [4, 6].includes(data.status)
const orderInfo = data
console.log(orderInfo);
const clientSignatureDTOList = orderInfo.clientSignatureDTOList?.[0] || []
......@@ -238,6 +238,12 @@ Page({
if (data?.technicianConfigDTOList?.length > 0) {
this.isArtificer(data)
}
// 获取园区店技师配置数据 wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
api.getQYTechnicianList({yqMerchantId: wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId}).then(respone => {
if (respone?.code == 0) {
if (respone?.data.length > 0) this.isArtificer(respone.data)
}
})
} else {
wx.showModal({
title: '温馨提示',
......@@ -258,6 +264,7 @@ Page({
isArtificer(data) {
let { customerObj, orderInfo } = this.data
orderInfo.isOpenArtificer = true
orderInfo.technicianList = data || [] // 技师数据
if (customerObj.findIndex(val => val?.key && val.key == 'technicianName') < 0) {
customerObj[customerObj.length] = {
label: '选择技师:',
......
......@@ -249,6 +249,7 @@ Page({
this.checkPhoneUseConfig()
let { save } = i.currentTarget.dataset
let { goodsList, orderObj, scene, isErrorOrder, isAlreadyExistOrder } = this.data
orderObj = wx.$util.deepClone(orderObj)
console.log(orderObj)
// 如果是错单补录 禁用掉保存功能 或待跟进订单/预约订单 禁用建档
if ((isErrorOrder && save) || (isAlreadyExistOrder && save)) return
......@@ -264,18 +265,6 @@ Page({
return
}
if (!phoneRex.test(orderObj.customer.customerPhone)) {
this.showToast('请输入正确的手机号')
return
}
if (orderObj.customer.standNo) {
const vinRex = /[^\w]/g
if (vinRex.test(orderObj.customer.standNo)) {
this.showToast('请输入正确的VIN码')
return
}
}
let subOrderList = []
let priceDisabled = true
let goodsKey = this.checkGoods(save, subOrderList, priceDisabled, goodsList, orderObj)
......@@ -292,13 +281,22 @@ Page({
// return console.log(orderObj)
// 是订单修正就把错误单号带上
if (isErrorOrder) orderObj.oldOrderCode = orderObj.associateOrderCode
let submitObj = JSON.parse(JSON.stringify(orderObj))
let submitObj = wx.$util.deepClone(orderObj)
if (save) {
// 建档删除卡券商品支付方式参数
delete submitObj.subOrderList
delete submitObj.customerCouponCode
delete submitObj.selectPayType
}
if (submitObj.selectPayType == 0) {
const deleteArr = ['plateNumber', 'standNo', 'carBrand']
delete submitObj.remark
submitObj.customer.experienceFlag = 'Y'
deleteArr.forEach(element => {
delete submitObj.customer[element]
})
}
// for (let k = 0; k < goodsList; k++) {
// let item = goodsList[k]
// try {
......@@ -382,12 +380,32 @@ Page({
checkRequired(save, obj) {
// 导入动态校验字段
let { requiredList } = this.data
// console.log(requiredList) ...requiredList,
let target = save ? ['userId', 'merchantId', 'employeeName', ...requiredList, 'customerName', 'customerPhone', 'sellerUserId', 'sellerName', 'sellerMerchantId'] : ['userId', 'merchantId', 'employeeName', ...requiredList, 'customerName', 'customerPhone', 'sellerUserId', 'sellerName', 'sellerMerchantId', 'customerCouponCode']
// let target = save ? ['userId', 'merchantId', 'employeeName', ...requiredList, 'customerName', 'customerPhone', 'sellerUserId', 'sellerName', 'sellerMerchantId']
// : ['userId', 'merchantId', 'employeeName', ...requiredList, 'customerName', 'customerPhone', 'sellerUserId', 'sellerName', 'sellerMerchantId', 'customerCouponCode']
let target = ['userId', 'merchantId', 'employeeName', ...requiredList, 'customerName', 'customerPhone', 'sellerUserId', 'sellerName', 'sellerMerchantId']
if (save) {
target.push('customerCouponCode')
}
// 是战败就去除一些无用字段
if (obj.selectPayType == 0) {
target = target.filter(item => !['carBrand', 'standNo', 'plateNumber'].includes(item))
}
obj = {
...obj,
...obj.customer
}
if (!phoneRex.test(obj.customer.customerPhone)) {
this.showToast('请输入正确的手机号')
return false
}
if (obj.customer.standNo && obj.selectPayType != 0) {
const vinRex = /[^\w]/g
if (vinRex.test(obj.customer.standNo)) {
this.showToast('请输入正确的VIN码')
return false
}
}
try {
target.map(key => {
if (!obj[key]) {
......
......@@ -358,7 +358,8 @@ Page({
})
e.total_price = e.totalPrice
e.totalPrice = Number(wx.$util.decimal(e.totalPrice, 2)).toFixed(2)
let orderType = userInfo.userType == 1 && e.status != 9 && e.status != 1 && e.selectPayType != 3 && e.selectPayType != 1
// e.selectPayType != 3 && e.selectPayType != 1
let orderType = userInfo.userType == 1 && e.status != 9 && e.status != 1 && ![1,3,4].includes(e.selectPayType)
e.repeal = userType && orderType
// 处理subOrderList 商品为空的情况
e.subOrderList = e.subOrderList.filter(item => item.merchantGoodsId)
......
......@@ -199,10 +199,16 @@ Page({
customerObj
})
}
// 门店是否配置技师
if (data?.technicianConfigDTOList?.length > 0) {
this.isArtificer(data)
}
// // 门店是否配置技师
// if (data?.technicianConfigDTOList?.length > 0) {
// this.isArtificer(data)
// }
// 获取园区店技师配置数据 wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId
api.getQYTechnicianList({yqMerchantId: wx.$util.getStorageSync('dj_boutique_user_info')?.merchantId}).then(respone => {
if (respone?.code == 0) {
if (respone?.data.length > 0) this.isArtificer(respone.data)
}
})
} else {
wx.showModal({
title: '温馨提示',
......@@ -223,6 +229,7 @@ Page({
isArtificer(data) {
let { customerObj, orderInfo } = this.data
orderInfo.isOpenArtificer = true
orderInfo.technicianList = data || [] // 技师数据
if (customerObj.findIndex(val =>val?.key && val.key == 'technicianName') < 0) {
customerObj[customerObj.length] = {
label: '选择技师:',
......
......@@ -167,7 +167,7 @@ Page({
delete orderObj.customer.createdDate
this.showLoading('提交中...')
let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark', 'technicianId', 'technicianName']
let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark', 'technicianUuid', 'technicianId', 'technicianName']
let userInfo = {}
orderObj = Object.assign(orderObj, orderObj.customer)
paramsList.map(item => {
......@@ -239,7 +239,8 @@ Page({
orderObj,
first: true,
flag: true,
artificerList: orderObj?.technicianConfigDTOList
// artificerList: orderObj?.technicianConfigDTOList
artificerList: orderObj?.technicianList
})
},
getSetting() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!