Commit 2cc1b3cf by zhangxw

联调修改

1 parent d5026eb0
Showing 43 changed files with 302 additions and 234 deletions
......@@ -146,5 +146,12 @@ module.exports = {
// 获取园区店下的4s店
getSceneMerchantRefStoreList(data) {
return api.post('dj.api.scenemerchantref.query4SRefByYqShop', data)
},
// 获取门店下的员工(推荐人)众筹场景
getStaffListByMerchantAPI(data) {
let params = data || {}
params.sceneList = [3]
return api.post('dj.api.smartcarlife.employee.getByMerchantId', params)
}
}
......@@ -82,8 +82,8 @@
{
"root": "packageCrowdFunding",
"name": "packageCrowdFunding",
"pages": ["pages/index/index", "pages/paidOrder/paidOrder","pages/activityList/activityList","pages/activityPay/activityPay","pages/paymentSuccess/paymentSuccess",
"pages/balanceNote/balanceNote","pages/newOrder/newOrder"]
"pages": ["pages/paidOrder/paidOrder","pages/activityList/activityList","pages/activityPay/activityPay","pages/paymentSuccess/paymentSuccess",
"pages/balanceNote/balanceNote","pages/newOrder/newOrder", "pages/additionRecordOrder/additionRecordOrder"]
}
],
"usingComponents": {
......
......@@ -28,4 +28,9 @@ module.exports = {
let params = data || {}
return api.post('dj.api.smartcarlife.weapp.waitinputorder.page', params)
},
// 创建子订单(已收款补录订单)
creatFullPayOrderAPI(data) {
return api.post('dj.api.smartcarlife.shopmallSubOrder.createFullPayOrder', data)
}
}
......@@ -78,7 +78,7 @@ Component({
handleCellClick(e) {
let { target, idx } = e.currentTarget.dataset
switch (target.type) {
case 'orderNo':
case 'outTradeNo':
this.setData({
targetIdx: idx
})
......
......@@ -35,9 +35,9 @@
<text wx:if="{{item.suffix}}" class="input-suffix">{{item.suffix}}</text>
</view>
<!-- 流水号 -->
<view wx:if="{{item.type == 'orderNo'}}" class="orderNo">
<view wx:if="{{formData.orderNo}}">
{{formData.orderNo}}
<view wx:if="{{item.type == 'outTradeNo'}}" class="no_class">
<view wx:if="{{formData.outTradeNo}}" class="text-hide">
{{formData.outTradeNo}}
</view>
<view wx:else class="placeholder-class">{{item.placeholder || '请选择'}}</view>
</view>
......
......@@ -47,7 +47,9 @@
text-overflow: ellipsis;
}
.orderNo {
.no_class {
text-align: right;
padding: 40rpx 0;
margin-left: 30rpx;
max-width: 100%;
}
\ No newline at end of file
// packageCrowdFunding/components/OrderNoPopup/OrderNoPopup.js
import api from '../../../api/api.js'
Component({
/**
* 组件的属性列表
......@@ -8,22 +9,12 @@ Component({
type: Boolean,
observer: function(n) {
if (n) {
// 获取交易参考号数据
let { orderNoList, orderInfo } = this.data
orderNoList.map(i => {
i.active = false
if (i.orderNo == orderInfo.orderNo) {
i.active = true
}
return i
})
this.setData({orderNoList})
this.getWaitinputorder()
}
}
},
title: String,
orderInfo: Object,
orderNoList: Array
orderInfo: Object
},
/**
......@@ -33,16 +24,20 @@ Component({
itemFormObj: [
{
label: '交易参考号',
prop: 'orderNo'
prop: 'outTradeNo'
}, {
label: '支付时间',
prop: 'payTime'
prop: 'accountDate'
}, {
label: '交易金额',
prop: 'payAmount',
prop: 'totalFee',
type: 'price'
}
]
],
currentPage: 1,
pageSize: 10,
pages: '',
orderNoList: []
},
/**
......@@ -55,13 +50,52 @@ Component({
let { orderNoList } = this.data
orderNoList.map(i => {
i.active = false
if (i.orderNo == target.orderNo) {
if (i.outTradeNo == target.outTradeNo) {
i.active = true
}
return i
})
this.setData({orderNoList})
},
restPageNum() {
this.setData({
currentPage: 1
})
this.getWaitinputorder()
},
scrollonReachBottom() {
let { pages, currentPage } = this.data
// 判断当前页是否是末页
if (pages == currentPage) return wx.$util.showToast('列表已到底')
this.setData({
currentPage: currentPage + 1
})
this.getWaitinputorder()
},
getWaitinputorder() {
let { currentPage, pageSize, orderNoList, orderInfo } = this.data
api
.waitinputorder({ currentPage, pageSize })
.then(result => {
let { code, data } = result
if (code == 0) {
data.list.forEach(element => {
element.accountDate = new Date(element.accountDate).format('yyyy-MM-dd hh:mm:ss')
element.totalFee = element.totalFee / 100
element.active = false
if (element.outTradeNo == orderInfo.outTradeNo) {
element.active = true
}
})
this.setData({
orderNoList: currentPage == 1 ? data.list : [...orderNoList, ...data.list],
pages: data.pages,
triggered: false
})
}
})
.catch(err => {})
},
confirm() {
let { orderNoList, orderInfo } = this.data
let arr = orderNoList?.filter(v => v.active) || []
......@@ -72,7 +106,7 @@ Component({
})
}
let thisPage = wx.$router.getPageInstance()
orderInfo.orderNo = arr[0]?.orderNo || ''
orderInfo.outTradeNo = arr[0]?.outTradeNo || ''
thisPage.setData({
orderInfo,
orderNoPopup: false
......
......@@ -2,7 +2,15 @@
<wxs src="index.wxs" module="filter" />
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="60%">
<view class="sub-title text-center">{{title}}</view>
<scroll-view class="order_no_box" scroll-y enhanced="{{true}}" show-scrollbar="{{false}}">
<scroll-view
class="order_no_box"
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="restPageNum"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="104"
refresher-triggered="{{triggered}}">
<block wx:for="{{orderNoList}}" wx:key="index">
<view class="order_no_item {{item.active?'active':''}}" bindtap="changeOrderNo" data-target="{{item}}">
<view class="message">
......
......@@ -38,6 +38,9 @@ Component({
wx.$router.go(choiceList[0].url,{
activityName: this.data.activityName
})
this.setData({
show: false
})
},
cancel() {
let thisPage = wx.$router.getPageInstance()
......
......@@ -13,7 +13,7 @@
<!-- </view>-->
<!-- </view>-->
<!--</popup>-->
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="460rpx">
<popup show="{{show}}" bindconfirm="confirm" bindcancel="cancel" height="480rpx">
<view class="sub-title text-center">请选择创建订单方式</view>
<block wx:for="{{optionList}}" wx:key="index">
<view class="picker_item {{item.active?'active':''}}" bindtap="changeitem" data-target="{{item}}">
......
......@@ -6,7 +6,7 @@ Page({
*/
data: {
tabIndex: 0,
navBarHeight:100,
navBarHeight: 0,
defaultOderSelect:'',
showPicker:false,
oderSelectItem:[{merchantName:1},{merchantName:2}],
......@@ -24,8 +24,15 @@ Page({
})
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
navBarHeight
})
},
back() {
wx.$router.reLaunch('pages.sceneIndex')
wx.$router.back()
},
/**
......
<!--packageCrowdFunding/pages/activityList/activityList.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{true}}" bindback="back">
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back">
<view class="navigation-title" bindtap="showStorePicker">
<view class="navigation-title-text text-hide">{{activityName}}</view>
<view class="arrow">
......
.navigation-title{
display: flex;
align-items: center;
justify-content: center;
}
.navigation-title .arrow {
flex-shrink: 0;
width: 32rpx;
height: 32rpx;
margin-left: 4rpx;
transform: rotate(180deg);
transition: all 0.5s;
}
.headerBar {
box-sizing: border-box;
position: relative;
......
/* packageCrowdFunding/pages/activityPay/activityPay.wxss */
\ No newline at end of file
// packageCrowdFunding/pages/additionRecordOrder/additionRecordOrder.js
import constantData from './constant/data'
import api from "../../api"
const app = getApp()
Page({
/**
......@@ -7,50 +9,23 @@ Page({
*/
data: {
orderObj: constantData.orderObj,
orderInfo: {orderNo: '52632145854', goodId: 2, referrerId: 2},
orderNoPopup: false,
orderNoList: [{
orderNo: '52632145852',
payTime: '2023.03.01 16:30:52',
payAmount: '100'
}, {
orderNo: '52632145854',
payTime: '2023.03.01 16:30:52',
payAmount: '100'
}, {
orderNo: '52632145853',
payTime: '2023.03.01 16:30:52',
payAmount: '100'
}, {
orderNo: '52632145855',
payTime: '2023.03.01 16:30:52',
payAmount: '100'
}, {
orderNo: '52632145856',
payTime: '2023.03.01 16:30:52',
payAmount: '100'
}, {
orderNo: '52632145857',
payTime: '2023.03.01 16:30:52',
payAmount: '100'
}]
orderInfo: {},
orderNoPopup: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// 推荐人
let { orderObj } = this.data
orderObj.orderFormList[3].optionList = [{
referrerId: 1,
referrerName: '张三'
}, {
referrerId: 2,
referrerName: '李四'
}]
this.setData({
orderObj
})
if (app.globalData?.staffListRange && orderObj?.orderFormList) {
orderObj.orderFormList[orderObj.orderFormList.length - 1].optionList = app.globalData.staffListRange
}
this.setData({orderObj})
},
onRoute(options) {
},
// 交易流水号
......@@ -71,6 +46,7 @@ Page({
confirm() {
let { orderInfo } = this.data
let userInfo = wx.$util.getUserInfo()
let validObj = wx.$util.checkRule(orderInfo, constantData.formRule)
if (validObj) {
wx.$util.showToast(validObj.message)
......@@ -83,7 +59,16 @@ Page({
confirmColor: '#3582EE',
success(res) {
if (res.confirm) {
// _this.getInviteDetail(id)
let params = {
outTradeNo: orderInfo.outTradeNo,
customerName: orderInfo.customerName,
customerPhone: orderInfo.customerPhone,
userId: orderInfo.uuid,
employeeName: orderInfo.staffName,
merchantId: userInfo?.default4SStoreInfo?.merchantId,
merchantName: userInfo?.default4SStoreInfo?.merchantName
}
api.creatFullPayOrderAPI(params)
}
}
})
......
......@@ -14,11 +14,11 @@
</view>
</view>
<order-no-popup
wx:if="{{orderNoPopup}}"
show="{{orderNoPopup}}"
title="请选择交易参考号"
orderInfo="{{orderInfo}}"
orderNoList="{{orderNoList}}"/>
<picker-select
orderInfo="{{orderInfo}}"/>
<picker-select
show="{{showPickerSelect}}"
title="请选择{{pickerTitle}}"
pickerObj="{{pickerObj}}"
......
const phoneRex = /^[1]([3-9])[0-9]{9}$/
const formRule = {
orderNo: [{ required: true, message: '交易流水号不能为空' }],
outTradeNo: [{ required: true, message: '交易流水号不能为空' }],
customerName: [{ required: true, message: '客户名称不能为空' }],
customerPhone: [
{ required: true, message: '联系电话不能为空' },
......@@ -10,15 +10,15 @@ const formRule = {
}
}
],
referrerId: [{ required: true, message: '推荐人不能为空' }],
uuid: [{ required: true, message: '推荐人不能为空' }],
}
const orderObj = {
orderFormList: [
{
label: '交易流水号',
name: 'referrer',
type: 'orderNo',
name: 'outTradeNo',
type: 'outTradeNo',
haveArrow: true,
noCellHeight: true,
placeholder: '请选择'
......@@ -36,11 +36,11 @@ const orderObj = {
},
{
label: '推荐人',
name: 'referrer',
name: 'uuid',
type: 'select',
optionList: [],
optionId: 'referrerId',
optionName: 'referrerName',
optionId: 'uuid',
optionName: 'staffName',
noBorder: true
}
],
......@@ -49,15 +49,7 @@ const orderObj = {
label: '商品名称',
name: 'shopName',
type: 'select',
optionList: [{
goodId: 1,
goodName: '商品1'
}, {
goodId: 2,
goodName: '商品2'
}],
optionId: 'goodId',
optionName: 'goodName'
readonly: true
},
{
label: '订金金额',
......
......@@ -47,7 +47,7 @@ Page({
wx.$router.go('activityPay')
},
back() {
wx.$router.go('activityList')
wx.$router.back()
},
/**
* 生命周期函数--监听页面加载
......
......@@ -26,7 +26,7 @@
color: #fff;
font-size: 28rpx;
display: flex;
margin-top: 40rpx;
.sum{
font-size: 34rpx } }
......
/* packageCrowdFunding/pages/balanceNote/balanceNote.wxss */
\ No newline at end of file
// packageCrowdFunding/pages/index/index.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
/* packageCrowdFunding/pages/index/index.wxss */
\ No newline at end of file
<!--packageCrowdFunding/pages/index/index.wxml-->
<text>packageCrowdFunding/pages/index/index.wxml</text>
......@@ -26,8 +26,8 @@ const orderObj = {
name: 'employeeName',
type: 'select',
optionList: [],
optionId: 'referrerId',
optionName: 'referrerName'
optionId: 'uuid',
optionName: 'staffName'
}
],
shopFormList: [
......
// packageCrowdFunding/pages/newOrder/newOrder.js
import constantData from './constant/data'
const app = getApp()
Page({
/**
......@@ -14,22 +15,15 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options)
console.log(this.data.orderObj)
// 推荐人
let { orderObj } = this.data
orderObj.orderFormList[3].optionList = [{
referrerId: 1,
referrerName: '张三'
}, {
referrerId: 2,
referrerName: '李四'
}]
this.setData({
orderObj
})
if (app.globalData?.staffListRange && orderObj?.orderFormList) {
orderObj.orderFormList[orderObj.orderFormList.length - 1].optionList = app.globalData.staffListRange
}
this.setData({orderObj})
},
back(){
wx.$router.go('activityList')
wx.$router.back()
},
confirm(e){
......
/* packageCrowdFunding/pages/newOrder/newOrder.wxss */
\ No newline at end of file
import { get4SStoreList } from '~/store/index'
import { get4SStoreList, getStaffListByMerchant } from '~/store/index'
Page({
/**
* 页面的初始数据
......@@ -22,7 +22,13 @@ Page({
getStoreList(e) {
// 获取园区店下的4s店数据 超管拉全部数据
let { userInfo } = this.data
get4SStoreList({ yqMerchantId: userInfo?.isSuper ? '' : userInfo?.merchantId, merchantName: e?.detail.value })
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
scene: 3,
merchantName: e?.detail.value,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
}
get4SStoreList(params)
.then(result => {
userInfo = wx.$util.getUserInfo()
let selectStroeIndex =
......@@ -33,6 +39,11 @@ Page({
return v.merchantId == userInfo?.default4SStoreInfo?.merchantId
})
: 0
// 获取门店下的员工(推荐人)
let params = {
merchantId: userInfo?.default4SStoreInfo?.merchantId
}
getStaffListByMerchant({...params})
this.setData({
storeListRange: result,
userInfo,
......@@ -48,10 +59,14 @@ Page({
let value = (e.detail ?? '') === '' ? selectStroeIndex : e.detail
let default4SStoreInfo = storeListRange[value]
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), default4SStoreInfo })
this.selectComponent('#page-0')?.onLoad()
this.setData({
userInfo: { ...wx.$util.getUserInfo(), default4SStoreInfo }
})
// 获取门店下的员工(推荐人)
let params = {
merchantId: storeListRange[value]?.merchantId
}
getStaffListByMerchant({...params})
},
......
/* packageCrowdFunding/pages/paymentSuccess/paymentSuccess.wxss */
\ No newline at end of file
......@@ -17,6 +17,7 @@ Page({
// 倒计时10s功能
countDownTimer() {
let sec = 10
let { id, orderId } = this.data
let that = this
timer = setInterval(() => {
let objNameStr = 'textNameObj.confirmName'
......@@ -28,18 +29,21 @@ Page({
if (sec == -1) {
clearInterval(timer) // 清除定时器
// 跳转提单页面
this.navigator()
// this.navigator()
// 跳转签名页面
wx.$router.redirectTo('signature', { id, orderId })
}
}, 1000)
},
btnTap(e) {
console.log(e)
let { name } = e.detail
let { id, orderId } = this.data
if (name == 'confirm') {
this.navigator()
wx.$router.redirectTo('signature', { id, orderId })
} else {
// this.triggerEvent('editSave')
wx.$router.redirectTo('signature', { id })
this.navigator()
// wx.$router.reLaunch('packageEquity.equityPage')
// wx.$router.reLaunch('packageEquity.index')
}
......@@ -71,12 +75,12 @@ Page({
})
},
onRoute(options) {
console.log(options)
let { orderDetail, orderCode, orderId } = options
let { orderDetail, orderCode, orderId, id } = options
this.setData({
orderCode: orderCode,
orderDetail,
orderId
orderId,
id
})
this.getOrderDetail()
// this.countDownTimer()
......
......@@ -9,7 +9,7 @@
<view class="descText">
<text>1.</text>
<text class="fontBold">客户服务合同</text>
<text>:手机端支持ocr快速出单,点下一步去提单或权益订单补录;</text>
<text>:手机端支持ocr快速出单,点下一步去签名;</text>
</view>
<view class="descText">
2.
......
......@@ -189,7 +189,8 @@ Page({
}).then(res => {
// _this.saveToHttp(img)
let { data } = res
_this.saveToHttp(data)
// _this.saveToHttp(data)
this.changeOrderStatus(data)
})
},
fail() {
......@@ -197,6 +198,21 @@ Page({
}
})
},
changeOrderStatus(signUrl) {
let { id } = this.data
updateOrderStatus({ id, orderStatus: 3, customerNameUrl: signUrl })
.then(result => {
this.navigator()
})
.catch(err => {})
},
navigator() {
let { orderId } = this.data
wx.$router.go('serviceInfo', {
orderId: orderId,
apiName: 'handler'
})
},
// 上传签名到后端
saveToHttp(signUrl) {
let { id } = this.data
......
// packageEquity/pages/carQuotation/index/index.js
import { quotationPage, getQuotationStatistics } from '../../../api'
import { quotationPage, getQuotationStatistics, updateOrderStatus } from '../../../api'
import data from '../constant/data'
import constantData from '../constant/data'
Component({
......@@ -251,14 +251,33 @@ Component({
})
break
}
this.setData({
id: target.id
})
},
remarkCancel() {
this.setData({
showRemark: false
})
},
remarkConfirm() {
// 战败接口
}
remarkConfirm(e) {
let value = e.detail
let { id } = this.data
if (value) {
updateOrderStatus({
id,
orderStatus: -1,
remark: value
}).then(res => {
let { code, message } = res
if (code == 0) {
wx.$util.showToast('提交成功')
this.onLoad()
} else {
wx.$util.showToast(message)
}
})
}
},
}
})
......@@ -157,4 +157,4 @@
<!-- 超管isSuper/商户类型 userType 1账号不可操作 -->
<image data-target="addOrder" wx:if="{{!userInfo.isSuper && userInfo.userType == 2}}" bind:tap="handleClickOrderBtn" class="addOrder" src="/packageEquity/images/addOrder.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" binderror="" bindload="" />
</view>
<remark-popup wx:if="{{showRemark}}" title="战败原因" show="{{showRemark}}" required="{{true}}" bindcancel="remarkCancel" bindconfirm="remarkConfirm" placeholder="请填写战败原因" maxlength="30" value="{{sufferReason}}" />
<remark-popup wx:if="{{showRemark}}" title="战败原因" show="{{showRemark}}" required="{{true}}" bindcancel="remarkCancel" bindconfirm="remarkConfirm" placeholder="请填写战败原因" maxlength="15" value="{{sufferReason}}" />
// packageEquity/pages/carQuotation/schemeConfirmation/schemeConfirmation.js
import { quotationPicture, updateOrderStatus, quotationGenerate } from '../../../api'
import { quotationPicture, updateOrderStatus, quotationGenerate, quotationUpgrade } from '../../../api'
import { quotedImgUrl } from '~/config'
Page({
/**
......@@ -67,7 +67,18 @@ Page({
console.log(wx.$router)
// this.triggerEvent('confirm')
// wx.$router.redirectTo('signature', { id })
wx.$router.redirectTo('CarQuotationPay', { id })
// 报价单支付订单生成
let para = {
id,
customerNameUrl: '',
orderStatus: 2
}
quotationUpgrade(para).then(res => {
wx.$util.hideLoading()
console.log(res, 'res')
let { code, data } = res
code == 0 && wx.$router.redirectTo('CarQuotationPay', { data, id })
})
} else if (name == 'edit') {
// this.triggerEvent('editSave')
this.backEdit()
......
......@@ -14,7 +14,7 @@ Page({
y: 0
},
textNameObj: {
confirmName: '前往提单',
confirmName: '已完成,去提单',
// editName: '修改',
cancelName: '稍后处理'
},
......@@ -28,8 +28,10 @@ Page({
},
onRoute(options) {
let id = options.id || 10
let orderId = options.orderId
this.setData({
id
id,
orderId
})
},
onLoad(options) {
......@@ -199,7 +201,9 @@ Page({
file: `${type}@${_res.data}`
}).then(res => {
let { data } = res
_this.saveToHttp(data)
// _this.saveToHttp(data)
// 更新报价单状态
this.changeOrderStatus(data)
})
},
fail() {
......@@ -207,6 +211,21 @@ Page({
}
})
},
changeOrderStatus(signUrl) {
let { id } = this.data
updateOrderStatus({ id, orderStatus: 3, customerNameUrl: signUrl })
.then(result => {
this.navigator()
})
.catch(err => {})
},
navigator() {
let { orderId } = this.data
wx.$router.go('serviceInfo', {
orderId: orderId,
apiName: 'handler'
})
},
// 上传签名到后端
saveToHttp(signUrl) {
let { id } = this.data
......
......@@ -202,7 +202,7 @@ Page({
if (v.sceneOpenFlag === 0) openSceneArr.push(v.scene)
})
if (!openSceneArr.length) {
wx.$util.showToast('暂无开通场景')
wx.$util.showToast('暂无开通业务,请联系总部管理员')
} else {
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), openSceneArr })
// 只开通一个场景直接跳转页面
......
......@@ -247,3 +247,22 @@ export const get4SStoreList = options => {
})
})
}
/** 获取门店下的员工(推荐人) */
export const getStaffListByMerchant = options => {
return new Promise((resolve, reject) => {
const app = getApp()
api
.getStaffListByMerchantAPI(options)
.then(res => {
let { code, data } = res
if (code == 0) {
app.globalData.staffListRange = data
resolve(app.globalData.staffListRange)
}
})
.catch(error => {
console.log(error)
})
})
}
......@@ -120,12 +120,4 @@ module.exports = {
waitinputorderSelectById(data) {
return api.post('dj.api.smartcarlife.weapp.waitinputorder.selectById', data)
},
/** 获取门店是否配置施工技师 */
getMerchantIsSettingArtificer(data) {
return api.post('', data)
},
/** 获取门店下的所有技师 */
getArtificerListByMerchant(data) {
return api.post('', data)
}
}
......@@ -252,8 +252,10 @@ Page({
customerObj
})
}
// 校验是否显示选择技师
this.isArtificer(data)
// 有配置技师
if (data?.technicianConfigDTOList?.length > 0) {
this.isArtificer(data)
}
} else {
wx.showModal({
title: '温馨提示',
......@@ -272,7 +274,7 @@ Page({
},
isArtificer(data) {
let { customerObj } = this.data
let { customerObj, orderInfo } = this.data
customerObj[customerObj.length] = {
label: '选择技师:',
key: 'subShopMerchantName',
......@@ -280,23 +282,8 @@ Page({
callBack: 'selectArtificer'
}
this.setData({
customerObj
})
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)
}
customerObj,
artificerList: orderInfo?.technicianConfigDTOList
})
},
......
......@@ -211,8 +211,10 @@ Page({
customerObj
})
}
// 获取门店是否配置技师
this.isArtificer(data)
// 门店是否配置技师
if (data?.technicianConfigDTOList?.length > 0) {
this.isArtificer(data)
}
} else {
wx.showModal({
title: '温馨提示',
......@@ -235,7 +237,7 @@ Page({
orderInfo.isOpenArtificer = true
customerObj[customerObj.length] = {
label: '选择技师:',
key: 'subShopMerchantName'
key: 'technicianName'
}
this.setData({
customerObj,
......@@ -247,7 +249,7 @@ Page({
let { customerObj, orderInfo } = this.data
customerObj[customerObj.length] = {
label: '选择技师:',
key: 'subShopMerchantName'
key: 'technicianName'
}
this.setData({
customerObj,
......
......@@ -203,8 +203,10 @@ Page({
customerObj
})
}
// 获取门店是否配置技师
this.isArtificer(data)
// 门店是否配置技师
if (data?.technicianConfigDTOList?.length > 0) {
this.isArtificer(data)
}
} else {
wx.showModal({
title: '温馨提示',
......
......@@ -225,7 +225,6 @@ Page({
orderObj[e] = options[e]
}
})
console.log(orderObj)
if (!orderObj.customer) orderObj.customer = orderObj.customerInfo
if (!orderObj.customer.customerSex) orderObj.customer.customerSex = 1
......@@ -233,7 +232,8 @@ Page({
this.setData({
orderObj,
first: true,
flag: true
flag: true,
artificerList: orderObj?.technicianConfigDTOList
})
},
getSetting() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!