Commit e4421fe0 by zhangxw

联调修改

1 parent d56cc6ef
......@@ -85,6 +85,10 @@ App({
}
})
} else {
this.globalData.yqdInfo = {}
this.globalData.YQorderSetting = ''
util.removeStorage()
wx.$relogin = relogin
router.reLaunch('pages.wxLogin')
}
},
......
......@@ -13,7 +13,7 @@ Component({
let { artificerList, orderInfo } = this.data
artificerList.map(i => {
i.active = false
if (i.technicianId == orderInfo?.technicianId) {
if (i.id == orderInfo?.technicianId) {
i.active = true
}
return i
......@@ -46,7 +46,7 @@ Component({
let { artificerList } = this.data
artificerList.map(i => {
i.active = false
if (i.technicianId == target?.technicianId) {
if (i.id == target?.id) {
i.active = true
}
return i
......@@ -67,13 +67,9 @@ Component({
if (!arr.length) {
return wx.$util.showToast('请选择技师')
}
let thisPage = wx.$router.getPageInstance()
orderInfo.technicianId = arr[0]?.technicianId || ''
orderInfo.technicianId = arr[0]?.id || ''
orderInfo.technicianName = arr[0]?.technicianName || ''
thisPage.setData({
orderInfo,
artificerSelectPopup: false
})
this.triggerEvent('confirm', orderInfo)
}
}
})
......@@ -2,11 +2,11 @@
<scroll-view class="artificer-select-popup-box" scroll-y enhanced="{{true}}" show-scrollbar="{{false}}">
<view class="box">
<view class="sub-title text-center">{{title}}</view>
<view class="merchant-box">
<view class="artificer-box">
<block wx:for="{{artificerList}}" wx:key="index">
<view class="merchantList {{item.active?'active':''}}" bindtap="changeItem" data-item="{{item}}"
<view class="artificerList {{item.active?'active':''}}" bindtap="changeItem" data-target="{{item}}"
data-index="{{index}}">
<view class="text-hide">{{item.subMerchantName}}</view>
<view class="text-hide">{{item.technicianName}}</view>
</view>
</block>
</view>
......
......@@ -27,12 +27,12 @@
.box{
padding: 0 32rpx;
}
.merchant-box{
.artificer-box{
max-height: 300rpx;
overflow: hidden;
transition: all .25s;
}
.merchantList {
.artificerList {
width: calc(100% - 50rpx);
height: 98rpx;
display: flex;
......@@ -43,13 +43,13 @@
padding: 0 25rpx;
transition: all .5s;
}
.merchantList.active {
.artificerList.active {
color: #3582EE;
font-weight: 700;
position: relative;
}
.merchantList.active::after {
.artificerList.active::after {
content: '';
position: absolute;
bottom: 0;
......@@ -59,13 +59,13 @@
height: 6rpx;
left: 25rpx;
}
.merchantList.active {
.artificerList.active {
color: #3582EE;
font-weight: 700;
position: relative;
}
.merchantList.active::after {
.artificerList.active::after {
content: '';
position: absolute;
bottom: 0;
......
......@@ -42,6 +42,7 @@
}
.text-hide {
font-size: 32rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
......
......@@ -102,7 +102,14 @@ Page({
activityId: activityId,
activityName: activityName
}
api.createFullPayOrderAPI(params)
wx.showLoading()
api.createFullPayOrderAPI(params).then(res => {
wx.hideLoading()
let { code } = res
if (code == '0') {
wx.$router.back()
}
})
}
}
})
......
......@@ -127,7 +127,6 @@ Page({
// data.paySuccessDate = data.paySuccessDate ? wx.$util.tsFormatTime(data.paySuccessDate, 'Y-M-D h:m:s') : ''
let paySuccessDate = data?.paySuccessDate || new Date()
data.paySuccessDate = wx.$util.tsFormatTime(paySuccessDate, 'Y年M月D日 h:m:s')
_this.changeOrderStatus()
if (code == 0) {
this.setData({
orderDetail: {
......
......@@ -6,6 +6,7 @@ const orderStatusObj = {
'3': '已支付',
'4': '已支付',
'-1': '战败',
'5': '已支付'
}
const orderStatusList = [{
confName: '待报价',
......
......@@ -23,8 +23,10 @@ Page({
},
onRoute(options) {
let id = options.id || 10
let orderId = options.orderId || ''
this.setData({
id
id,
orderId
})
},
onLoad(options) {
......@@ -201,7 +203,7 @@ Page({
},
changeOrderStatus(signUrl) {
let { id } = this.data
updateOrderStatus({ id, orderStatus: 3, customerNameUrl: signUrl })
updateOrderStatus({ id, orderStatus: 5, customerNameUrl: signUrl })
.then(result => {
this.navigator()
})
......
......@@ -45,7 +45,8 @@ Component({
1: '确认方案',
2: '去支付',
3: '去处理',
'-1': '去报价'
'-1': '去报价',
5: '去处理'
},
searchObj: {},
customerName: '',
......@@ -211,7 +212,7 @@ Component({
// wx.$router.go('createOrderCarQuotation', {
// id: target.id
// })
// 0待报价、1待确认、2待支付、3已支付、-1战败
// 0待报价、1待确认、2待支付、3已支付、-1战败 5已完成(已签名)
switch (target.orderStatus + '') {
// schemeConfirmation
case '0':
......@@ -240,16 +241,30 @@ Component({
}
break
case '3':
wx.$router.go('serviceInfo', {
orderId: target.orderId,
apiName: 'handler'
})
// wx.$router.go('serviceInfo', {
// orderId: target.orderId,
// apiName: 'handler'
// })
if (type == 'handle') { // 去处理
wx.$router.go('serviceInfo', {
orderId: target.orderId,
apiName: 'handler'
})
} else {
wx.$router.go('signature', { id: target.id, orderId: target.orderId })
}
break
case '-1':
wx.$router.go('createOrderCarQuotation', {
id: target.id
})
break
case '5':
wx.$router.go('serviceInfo', {
orderId: target.orderId,
apiName: 'handler'
})
break
}
this.setData({
id: target.id
......
......@@ -59,9 +59,9 @@
<image wx:if="{{item.ownerGender}}" class="icon-sex" src="{{item.ownerGender == '男' ? '../../../images/icon-man.png' : '../../../images/icon-woman.png'}}" />
</view>
<view class="header-status">
<!-- 0待报价、1待确认、2待支付、3已支付、-1战败 -->
<!-- 0待报价、1待确认、2待支付、3已支付、-1战败 5已完成(已签名)-->
<!-- == '3' -->
<view wx:if="{{ item.orderStatus == '3'||item.orderStatus =='4'}}">
<view wx:if="{{ item.orderStatus == '3'||item.orderStatus =='5'}}">
<span class="green-txt">{{orderStatusObj[item.orderStatus]}}</span>
<span class="header-price">¥ {{item.quotedPriceUpdate || ''}}</span>
</view>
......@@ -119,7 +119,7 @@
<!-- footer -->
<view class="item-footer">
<view>
<view wx:if="{{item.orderStatus == '3' }}" class="orange-txt">
<view wx:if="{{item.orderStatus == '3' || item.orderStatus == '5'}}" class="orange-txt">
<image class="icon-info" src="/packageEquity/images/icon-info.png"></image>
订单已支付,未录入权益合同
</view>
......@@ -136,6 +136,10 @@
<view wx:if="{{item.orderStatus == '2'}}" class="order-btn padding_20" bindtap="handleClickBtn" data-target="{{item}}" data-type="pay">
{{btnTxt[item.orderStatus]}}
</view>
<view wx:if="{{item.orderStatus == '3'}}" class="order-btn default-btn padding_20" bindtap="handleClickBtn" data-target="{{item}}">去签名</view>
<view wx:if="{{item.orderStatus == '3' || item.orderStatus == '5'}}" class="order-btn padding_20" bindtap="handleClickBtn" data-target="{{item}}" data-type="handle">
{{btnTxt[item.orderStatus]}}
</view>
<view wx:else class="order-btn default-btn" bindtap="handleClickBtn" data-target="{{item}}">
{{btnTxt[item.orderStatus]}}
</view>
......
......@@ -183,8 +183,8 @@ Page({
wx.$router.reLaunch('packageEquity.equityPage')
},
toFullPage() {
let { id } = this.data
wx.$router.go('fullSignture', { id })
let { id, orderId } = this.data
wx.$router.go('fullSignture', { id, orderId })
},
// 上传图片
toUploadImage(tempFilePaths) {
......@@ -213,7 +213,7 @@ Page({
},
changeOrderStatus(signUrl) {
let { id } = this.data
updateOrderStatus({ id, orderStatus: 3, customerNameUrl: signUrl })
updateOrderStatus({ id, orderStatus: 5, customerNameUrl: signUrl })
.then(result => {
wx.$util.hideLoading()
this.navigator()
......
......@@ -48,12 +48,12 @@ Page({
})
wx.$util.getViewInfo('.user-box', res => {
this.setData({
userBoxHeight: res.height
userBoxHeight: res?.height
})
},)
// 没有登录信息 或无开通场景 退出登录
if (!Object.keys(userInfo).length || !userInfo.openSceneArr?.length) {
app.login(true)
app.login(false)
}
},
......@@ -78,7 +78,7 @@ Page({
logOutAPI.logout().then(_res_ => {
let { code, message } = _res_
if (code == 0) {
app.login(true)
app.login(false)
} else {
_this.setData({
flag: false
......
......@@ -141,7 +141,6 @@ page {
align-items: center;
z-index: 20;
background-color: #fff;
border-radius: 40rpx;
font-size: 32rpx;
color: #fff;
letter-spacing: 13rpx;
......
......@@ -165,7 +165,7 @@ Page({
api.logout().then(_res_ => {
let { code, message } = _res_
if (code == 0) {
app.login(true)
app.login(false)
} else {
_this.setData({
flag: false
......
......@@ -52,7 +52,11 @@ Page({
},
updateCustomerInfo() {
let { orderInfo } = this.data
let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark']
console.log(orderInfo)
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 userInfo = {}
orderInfo = Object.assign(orderInfo, orderInfo.customer)
paramsList.map(item => {
......@@ -62,10 +66,8 @@ Page({
.updateOrderInfo(userInfo)
.then(result => {
wx.$util.hideLoading()
console.log(result)
if (result.code == 0 && result.data) {
wx.$refresh = true
this.back(orderObj.orderCode)
this.checkPayType()
} else {
wx.showToast({
title: result.message,
......@@ -79,16 +81,21 @@ Page({
})
},
next() {
let {
orderInfo: { selectPayType, status, orderCode }
, orderInfo} = this.data
let { orderInfo} = this.data
let _this = this
// console.log(orderCode)
// 有技师选项 并选择了技师 更新客户信息
if (orderInfo.isOpenArtificer && orderInfo.technicianId) {
this.updateCustomerInfo()
_this.updateCustomerInfo()
} else {
_this.checkPayType()
}
return
},
checkPayType() {
let {
orderInfo: { selectPayType, status, orderCode }
} = this.data
let _this = this
// 微信支付
if (selectPayType == 1) {
_this.setData({
......@@ -320,7 +327,17 @@ Page({
}
this.setData({
customerObj,
artificerList: orderInfo?.technicianConfigDTOList
artificerList: orderInfo?.technicianConfigDTOList,
orderInfo
})
},
// 选择技师确认
changeArtificer(e) {
let value = e?.detail || {}
this.setData({
artificerSelectPopup: false,
orderInfo: value
})
},
......
......@@ -42,7 +42,7 @@
<view class="cell">
<view class="label">抵用券:</view>
<view class="value">
{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}{{'派券人'}}
{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
</view>
</view>
<view class="line" />
......@@ -201,5 +201,6 @@
show="{{artificerSelectPopup}}"
title="选择技师"
artificerList="{{artificerList}}"
orderInfo="{{orderInfo}}" />
orderInfo="{{orderInfo}}"
bindconfirm="changeArtificer" />
......@@ -247,22 +247,6 @@ Page({
customerObj,
orderInfo
})
api.getMerchantIsSettingArtificer({merchantId: data?.merchantId}).then(res => {
let { code, data, message } = res
if (code == 0) {
let { customerObj, orderInfo } = this.data
customerObj[customerObj.length] = {
label: '选择技师:',
key: 'technicianName'
}
this.setData({
customerObj,
orderInfo
})
} else {
wx.$util.showToast(message)
}
})
},
getBarCode() {
......
......@@ -28,7 +28,7 @@
<view class="cell">
<view class="label">抵用礼券:</view>
<view class="value">
{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
</view>
</view>
</block>
......@@ -46,7 +46,7 @@
<view class="cell">
<view class="label">抵用券:</view>
<view class="value">
{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
</view>
</view>
<view class="line" />
......
......@@ -239,22 +239,6 @@ Page({
customerObj,
orderInfo
})
api.getMerchantIsSettingArtificer({merchantId: data?.merchantId}).then(res => {
let { code, data, message } = res
if (code == 0) {
let { customerObj, orderInfo } = this.data
customerObj[customerObj.length] = {
label: '选择技师:',
key: 'subShopMerchantName'
}
this.setData({
customerObj,
orderInfo
})
} else {
wx.$util.showToast(message)
}
})
},
getBarCode() {
......
......@@ -18,7 +18,7 @@
<view class="cell">
<view class="label">抵用礼券:</view>
<view class="value">
{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
{{orderInfo.couponName || ''}}{{orderInfo.customerCoupon.customerCouponCode ||''}}({{orderInfo.customerCoupon.employeeName || ''}})
</view>
</view>
</block>
......
......@@ -112,6 +112,14 @@ Page({
wx.$router.back()
}
},
// 选择技师
changeArtificer(e) {
let value = e?.detail || {}
this.setData({
artificerSelectPopup: false,
orderObj: value
})
},
submit(i) {
let { giveup } = i.currentTarget.dataset
// console.log(giveUp)
......@@ -157,10 +165,9 @@ Page({
if (orderObj.customer.buyTime) delete orderObj.customer.buyTime
// delete orderObj.customerCouponCode
delete orderObj.customer.createdDate
this.showLoading('提交中...')
let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark']
let paramsList = ['orderCode', 'customerId', 'customerName', 'customerPhone', 'customerSex', 'carBrandId', 'carBrand', 'carChildsBrandId', 'carChildsBrandName', 'carSeriesId', 'carSeriesName', 'standNo', 'plateNumber', 'experienceFlag', 'remark', 'technicianId', 'technicianName']
let userInfo = {}
orderObj = Object.assign(orderObj, orderObj.customer)
paramsList.map(item => {
......@@ -225,7 +232,6 @@ Page({
orderObj[e] = options[e]
}
})
if (!orderObj.customer) orderObj.customer = orderObj.customerInfo
if (!orderObj.customer.customerSex) orderObj.customer.customerSex = 1
if (!orderObj.customer.experienceFlag) orderObj.customer.experienceFlag = 'N'
......
......@@ -73,9 +73,9 @@
</gl-cell>
<gl-cell border valueAlign="right" label="备注" labelWidth="140rpx" bindclick="showPopup" data-show-name="showRemark" placeholder="30字以内" value="{{orderObj.remark}}" />
<gl-cell border wx:if="{{orderObj.isOpenArtificer}}" valueAlign="right" label="选择技师" labelWidth="140rpx" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="artificerSelectPopup">
<block wx:if="{{orderObj.customer.technicianName}}">
<block wx:if="{{orderObj.technicianName}}">
<view class="between">
技师
{{orderObj.technicianName}}
</view>
</block>
</gl-cell>
......@@ -237,4 +237,5 @@
show="{{artificerSelectPopup}}"
title="选择技师"
artificerList="{{artificerList}}"
orderInfo="{{orderObj.customer}}" />
orderInfo="{{orderObj}}"
bindconfirm="changeArtificer" />
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!