Commit b4e2e426 by 杨北旺

客户来源和门店收款时间

1 parent 48e771a2
Component({
properties: {
show: {
type: Boolean
},
},
data: {
hours: [],
days: [],
minutes: [],
dateValues: [],
hourValues: [],
minuteValues: []
},
methods: {
noScroll() { },
hide(e) {
let {
name
} = e.currentTarget.dataset
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
[name]: false
})
this.triggerEvent('close')
},
getDateList(startDate, endDate) {
const start = new Date(startDate);
const end = new Date(endDate);
const result = [];
let date = start;
while (date <= end) {
const dateItem = date.toISOString().slice(0, 10)
result.push(new Date(dateItem).format('yyyy.MM.dd'));
date.setDate(date.getDate() + 1);
}
this.getHourList(result)
},
getHourList(days) {
const hours = [],today = new Date();
for (let hour = 0; hour < today.getHours()+1; hour++) {
hours.push(hour.toString().padStart(2, '0'));
}
this.getMinuteList(days, hours)
},
getMinuteList(days, hours) {
const minutes = [];
const today = new Date()
for (let minute = 0; minute < today.getMinutes()+1; minute++) {
minutes.push(minute.toString().padStart(2, '0'));
}
// 设置默认时间
let { dateValues, hourValues, minuteValues } = this.data
const HOUR_STR = today.getHours().toString().padStart(2, '0')
const MUNTUE_STR = today.getMinutes().toString().padStart(2, '0')
const defalutHIndex = hours.indexOf(HOUR_STR)
const defalutMIndex = minutes.indexOf(MUNTUE_STR)
dateValues.push(days.length)
hourValues.push(defalutHIndex)
minuteValues.push(defalutMIndex)
this.currentDate = new Date().format('yyyy.MM.dd')
this.currentHour = HOUR_STR
this.currentMinute = MUNTUE_STR
this.setData({
hours,
days,
minutes,
dateValues,
hourValues,
minuteValues
})
},
changeDate(e) {
const { days } = this.data
const { value } = e.detail
const index = value[0]
this.currentDate = days[index]
},
changeHour(e) {
const { hours } = this.data
const { value } = e.detail
const index = value[0]
this.currentHour = hours[index]
},
changeMinutes(e) {
const { minutes } = this.data
const { value } = e.detail
const index = value[0]
this.currentMinute = minutes[index]
},
confirm(){
let str = ''
str = this.currentDate + ' ' + this.currentHour + ':' + this.currentMinute+":00"
const result = new Date(str).format('yyyy-MM-dd hh:mm:ss')
this.triggerEvent('confirm', result)
}
},
//组件的生命周期
lifetimes: {
attached: function () {
const today = new Date()
this.getDateList('2019.01.01', new Date(today.getFullYear(), today.getMonth(), today.getDate() + 1))
},
},
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!-- components/DatePicker/DatePicker.wxml -->
<block wx:if="{{show}}">
<view class="fixed-box fixed-date-box" catchtouchmove="noScroll">
<view class="fixed-bg" bindtap="hide" data-name="showDateSelect"></view>
<view class="fixed-content">
<view class="fixed-title text-center">门店收款时间</view>
<view class="fixed-body">
<picker-view class="picker picker_max" value="{{dateValues}}" indicator-class="indicator" bindchange="changeDate">
<picker-view-column>
<block wx:for="{{days}}" wx:key="index">
<view class="view">{{item}}</view>
</block>
</picker-view-column>
</picker-view>
<picker-view class="picker" value="{{hourValues}}" indicator-class="indicator" bindchange="changeHour">
<picker-view-column>
<block wx:for="{{hours}}" wx:key="index">
<view class="view">{{item}}</view>
</block>
</picker-view-column>
</picker-view>
<picker-view class="picker" value="{{minuteValues}}" indicator-class="indicator" bindchange="changeMinutes">
<picker-view-column>
<block wx:for="{{minutes}}" wx:key="index">
<view class="view">{{item}}</view>
</block>
</picker-view-column>
</picker-view>
</view>
<view class="fixed-footer">
<view class="fixed-cancel text-center" bindtap="hide" data-name="showDateSelect">
取消
</view>
<view class="fixed-confirm text-center" bindtap="confirm">确定</view>
</view>
</view>
</view>
</block>
\ No newline at end of file \ No newline at end of file
/* components/DatePicker/DatePicker.wxss */
.fixed-box {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 998;
perspective: 99999999px;
}
.fixed-bg {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
animation: show-bg .1s forwards .5s;
}
@keyframes show-bg {
0% {
background-color: rgba(0, 0, 0, 0);
}
100% {
background-color: rgba(0, 0, 0, .6);
}
}
.fixed-content {
position: absolute;
left: 50%;
top: 50%;
background: #FFFFFF;
border-radius: var(--fontSize20);
width: var(--fontSize622);
animation: show-modal .5s forwards;
}
@keyframes show-modal {
0% {
opacity: 0;
transform: translate3d(-50%, -50%, -99999999px);
}
100% {
opacity: 1;
transform: translate3d(-50%, -50%, 0);
}
}
.fixed-content .fixed-title {
height: var(--fontSize96);
font-size: var(--fontSize32);
color: #333333;
}
.fixed-date-box .fixed-body {
height: var(--fontSize360);
display: flex;
}
.fixed-date-box .picker {
width: 30%;
height: 100%;
}
.picker_max{
width: 40% !important;
}
.fixed-date-box .picker .view {
display: flex;
align-items: center;
justify-content: center;
font-size: var(--fontSize30);
color: #292D33;
}
.fixed-date-box .picker .view.disabled{
opacity: 0.5;
}
.fixed-date-box .indicator {
height: var(--fontSize96);
}
.fixed-date-box .picker .tips {
font-size: var(--fontSize20);
color: rgba(100, 101, 102, .5);
margin-left: var(--fontSize10);
}
.fixed-content .fixed-footer {
height: var(--fontSize96);
display: flex;
align-items: center;
position: relative;
}
.fixed-content .fixed-footer .text-center {
width: 50%;
height: 100%;
font-size: var(--fontSize32);
color: #333333;
}
.fixed-content .fixed-footer .fixed-confirm {
color: #347BFF;
}
.fixed-content .fixed-footer::after {
background-color: #EBEDF0;
width: var(--fontSize1);
height: 100%;
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
content: '';
}
.text-center{
display: flex;
justify-content: center;
align-items: center;
}
\ No newline at end of file \ No newline at end of file
...@@ -169,6 +169,7 @@ module.exports = { ...@@ -169,6 +169,7 @@ module.exports = {
staffDailyReportMerchantValid(data) { staffDailyReportMerchantValid(data) {
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data) // return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
data.sceneType = 0
return api.post('dj.api.smartcarlife.staff.daily.report.popup.need', data) return api.post('dj.api.smartcarlife.staff.daily.report.popup.need', data)
}, },
/** 员工是否需要推送开单预警 */ /** 员工是否需要推送开单预警 */
......
...@@ -126,7 +126,8 @@ Component({ ...@@ -126,7 +126,8 @@ Component({
}, { }, {
value: 1, value: 1,
name: '门店收款' name: '门店收款'
}] }],
successDateTime:''
}, },
/** /**
...@@ -517,8 +518,15 @@ Component({ ...@@ -517,8 +518,15 @@ Component({
let { let {
showError, showError,
insuranceCheck, insuranceCheck,
orderInfo orderInfo,
successDateTime
} = this.data } = this.data
if(successDateTime&&!orderInfo.resetOrder){
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
['orderInfo.pay2Time']: successDateTime,
})
}
if (showError) return wx.$util.showToast('权益价不能小于最低权益价') if (showError) return wx.$util.showToast('权益价不能小于最低权益价')
// 校验商品最低价 // 校验商品最低价
let goodsError = [] let goodsError = []
...@@ -598,6 +606,22 @@ Component({ ...@@ -598,6 +606,22 @@ Component({
}) })
attrname != 'quotedPriceUpdate' && this.cancelInsuranceCheck() attrname != 'quotedPriceUpdate' && this.cancelInsuranceCheck()
// console.log(thisPage.data) // console.log(thisPage.data)
},
onChanteSuccessDate(e){
this.setData({
successDateTime:e.detail,
showDateSelect:false
})
},
toSelectDate(){
this.setData({
showDateSelect:true
})
},
closeDateModal(){
this.setData({
showDateSelect:false
})
} }
// onChange (e){ // onChange (e){
// console.log(e); // console.log(e);
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
"van-collapse-item": "@vant/weapp/collapse-item/index", "van-collapse-item": "@vant/weapp/collapse-item/index",
"van-checkbox": "@vant/weapp/checkbox/index", "van-checkbox": "@vant/weapp/checkbox/index",
"popup-input": "../PopupInput/PopupInput", "popup-input": "../PopupInput/PopupInput",
"goods": "../GoodsPackage/Goods" "goods": "../GoodsPackage/Goods",
"date-select":"/components/DateSelect/dateSelect"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -81,6 +81,9 @@ ...@@ -81,6 +81,9 @@
<view class="right text-center {{ orderInfo.payType == 2?'active':'' }}" bindtap="changePayType" data-payType="2">门店收款</view> <view class="right text-center {{ orderInfo.payType == 2?'active':'' }}" bindtap="changePayType" data-payType="2">门店收款</view>
</view> </view>
</gl-cell> </gl-cell>
<gl-cell wx:if="{{ (orderInfo.payType == 2&&!orderInfo.resetOrder) || (orderInfo.payType==1&&orderInfo.outTradeNo&&!orderInfo.resetOrder) }}" value="{{successDateTime}}" bind:click="toSelectDate" haveArrow="{{true}}" placeholder="请选择时间" required="{{true}}" requiredAfter="{{true}}" border class="pay-type" label="门店收款时间" valueAlign="right" labelWidth="var(--fontSize200)">
</gl-cell>
<view class="box"> <view class="box">
<view class="title remarkTitle">备注</view> <view class="title remarkTitle">备注</view>
<van-field type="textarea" maxlength="30" autosize class="inputBox" border="{{ false }}" data-hold-keyboard value="{{ orderInfo.notes }}" data-attrName="notes" placeholder="请输入(30字以内)" data-attrType="" bindinput="handleInput"></van-field> <van-field type="textarea" maxlength="30" autosize class="inputBox" border="{{ false }}" data-hold-keyboard value="{{ orderInfo.notes }}" data-attrName="notes" placeholder="请输入(30字以内)" data-attrType="" bindinput="handleInput"></van-field>
...@@ -90,4 +93,5 @@ ...@@ -90,4 +93,5 @@
</van-collapse> </van-collapse>
<Gl-Button-Group bindbtnTap="btnTap" textNameObj="{{ textNameObj }}" /> <Gl-Button-Group bindbtnTap="btnTap" textNameObj="{{ textNameObj }}" />
</view> </view>
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ quotationGoodsList }}" chooseGoodsList="{{ orderInfo.vdQuotationGoodsList }}" />
\ No newline at end of file \ No newline at end of file
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ quotationGoodsList }}" chooseGoodsList="{{ orderInfo.vdQuotationGoodsList }}" />
<date-select show="{{showDateSelect}}" bind:close="closeDateModal" bind:confirm="onChanteSuccessDate"></date-select>
\ No newline at end of file \ No newline at end of file
...@@ -75,10 +75,18 @@ const ageList = [{ ...@@ -75,10 +75,18 @@ const ageList = [{
optionLabel: '51岁以上' optionLabel: '51岁以上'
}] }]
const salesTypeList = [{
optionId: 0,
optionLabel: '售前',
},{
optionId: 1,
optionLabel: '售后',
}]
export default { export default {
seatesList, seatesList,
customerTypeList, customerTypeList,
cardTypeList, cardTypeList,
buyCarTypeList, buyCarTypeList,
ageList ageList,
salesTypeList
} }
...@@ -107,7 +107,11 @@ const formRuleSimple = { ...@@ -107,7 +107,11 @@ const formRuleSimple = {
} : null } : null
} }
} }
] ],
salesType: [{
required: true,
message: '客户来源不能为空'
}],
} }
const firstObj = { const firstObj = {
...@@ -131,6 +135,17 @@ const firstObj = { ...@@ -131,6 +135,17 @@ const firstObj = {
requiredAfter: true requiredAfter: true
}, },
{ {
label: '客户来源',
name: 'salesType',
labelName: 'salesType',
type: 'select',
optionList: constantList.salesTypeList,
optionId: 'optionId',
optionLabel: 'optionLabel',
required: true,
requiredAfter: true
},
{
label: '性别', label: '性别',
name: 'ownerGender', name: 'ownerGender',
type: 'slot', type: 'slot',
...@@ -249,6 +264,17 @@ const firstObjSimple = { ...@@ -249,6 +264,17 @@ const firstObjSimple = {
requiredAfter: true requiredAfter: true
}, },
{ {
label: '客户来源',
name: 'salesType',
labelName: 'salesType',
type: 'select',
optionList: constantList.salesTypeList,
optionId: 'optionId',
optionLabel: 'optionLabel',
required: true,
requiredAfter: true
},
{
label: '性别', label: '性别',
name: 'ownerGender', name: 'ownerGender',
type: 'slot', type: 'slot',
......
...@@ -15,7 +15,8 @@ Page({ ...@@ -15,7 +15,8 @@ Page({
seat: '5', seat: '5',
price: '', price: '',
confirmStatus: false, confirmStatus: false,
saveStatus: false saveStatus: false,
salesType:'售前'
}, },
// owner: { // owner: {
// owner: 'test2', // owner: 'test2',
...@@ -222,6 +223,7 @@ Page({ ...@@ -222,6 +223,7 @@ Page({
let owner = this.getOwnerInfo() let owner = this.getOwnerInfo()
orderInfo.owner = owner orderInfo.owner = owner
orderInfo.check = check orderInfo.check = check
owner.salesType = owner.salesType=='售后'?1:0
console.log('orderInfo', orderInfo) console.log('orderInfo', orderInfo)
try { try {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
......
...@@ -40,7 +40,8 @@ Page({ ...@@ -40,7 +40,8 @@ Page({
carChildsBrandId: '', carChildsBrandId: '',
carChildsBrandName: '', carChildsBrandName: '',
carSeriesId: '', carSeriesId: '',
carSeriesName: '' carSeriesName: '',
salesType:'售前'
}, },
quotationGoodsList: [], //权益商品列表 quotationGoodsList: [], //权益商品列表
// owner: { // owner: {
...@@ -146,6 +147,7 @@ Page({ ...@@ -146,6 +147,7 @@ Page({
orderInfo.owner = owner orderInfo.owner = owner
orderInfo.check = true orderInfo.check = true
orderInfo.outTradeNo = outTradeNo orderInfo.outTradeNo = outTradeNo
owner.salesType = owner.salesType=='售后'?1:0
wx.showLoading('提交中...') wx.showLoading('提交中...')
quotationRecording(orderInfo) quotationRecording(orderInfo)
.then(result => { .then(result => {
...@@ -183,7 +185,8 @@ Page({ ...@@ -183,7 +185,8 @@ Page({
staffDailyReportMerchantValid({ staffDailyReportMerchantValid({
merchantId: userInfo.shopMerchantId, merchantId: userInfo.shopMerchantId,
yqMerchantId: userInfo.merchantId, yqMerchantId: userInfo.merchantId,
staffUuid: userInfo.uuid staffUuid: userInfo.uuid,
sceneType:0
}) })
.then(res => { .then(res => {
// console.log(res, 'staffDailyReportMerchantValid') // console.log(res, 'staffDailyReportMerchantValid')
...@@ -291,14 +294,17 @@ Page({ ...@@ -291,14 +294,17 @@ Page({
if (!status) return false if (!status) return false
if (!orderInfo.vdQuotationGoodsList.length) return wx.$util.showToast('请选择增值车损险商品') if (!orderInfo.vdQuotationGoodsList.length) return wx.$util.showToast('请选择增值车损险商品')
// 非标记错误,门店收款
if (!orderInfo.pay2Time&&orderInfo.payType==2&&!orderInfo.resetOrder) return wx.$util.showToast('请选择门店收款时间')
// 修改权益报价逻辑 // 修改权益报价逻辑
if (confirmStatus) return false if (confirmStatus) return false
this.setData({ this.setData({
confirmStatus: true confirmStatus: true
}) })
// 是订单补录直接走另外的补录逻辑 // 是订单补录直接走另外的补录逻辑
console.log(outTradeNo, '是订单补录直接走另外的补录逻辑') console.log(outTradeNo, '是订单补录直接走另外的补录逻辑')
if (!orderInfo.pay2Time&&orderInfo.payType==1&&!orderInfo.resetOrder&&outTradeNo) return wx.$util.showToast('请选择门店收款时间')
if (outTradeNo && !orderInfo.resetOrder) return this.setQuotationRecording() if (outTradeNo && !orderInfo.resetOrder) return this.setQuotationRecording()
// debugger // debugger
// 如果是门店收款 并且付款凭证没有填 // 如果是门店收款 并且付款凭证没有填
...@@ -308,6 +314,17 @@ Page({ ...@@ -308,6 +314,17 @@ Page({
showPopup: true, showPopup: true,
confirmStatus: false confirmStatus: false
}) })
if(orderInfo.paymentDocList.length){
let _tempMap = orderInfo.paymentDocList.map(el=>{
let obj = {
paymentDocUrl:el,
type:1
}
return obj
})
orderInfo.paymentDocList = _tempMap
}
wx.showLoading('报价中...') wx.showLoading('报价中...')
let result = await this.handleSecondConfirmCheck(true) let result = await this.handleSecondConfirmCheck(true)
...@@ -407,9 +424,10 @@ Page({ ...@@ -407,9 +424,10 @@ Page({
// 获取保险信息 // 获取保险信息
let orderInfo = this.getInsurance() let orderInfo = this.getInsurance()
let owner = this.getOwnerInfo() let owner = this.getOwnerInfo()
owner.salesType = owner.salesType=='售后'?1:0
orderInfo.owner = owner orderInfo.owner = owner
orderInfo.check = check orderInfo.check = check
console.log('orderInfo', orderInfo) console.log('orderInfo', orderInfo)
// debugger // debugger
try { try {
...@@ -514,6 +532,7 @@ Page({ ...@@ -514,6 +532,7 @@ Page({
orderInfo.resetOrder = this.resetOrder orderInfo.resetOrder = this.resetOrder
tableInfo.payType = 2 tableInfo.payType = 2
} }
tableInfo.owner.salesType = tableInfo.owner.salesType==1?'售后':'售前'
this.setData({ this.setData({
orderInfo: Object.assign(orderInfo, tableInfo, { orderInfo: Object.assign(orderInfo, tableInfo, {
insureList: [] insureList: []
...@@ -823,6 +842,12 @@ Page({ ...@@ -823,6 +842,12 @@ Page({
...owner, ...owner,
...customerInfo ...customerInfo
} }
if(customerInfo.salesType){
owner.salesType = '售后'
}else{
owner.salesType = '售前'
}
this.setData({ this.setData({
owner owner
}) })
......
...@@ -112,8 +112,8 @@ ...@@ -112,8 +112,8 @@
} }
}, },
"setting": { "setting": {
"compileHotReLoad": false "compileHotReLoad": true
}, },
"projectname": "%E7%B2%BE%E5%93%81%E5%8D%87%E7%BA%A7", "projectname": "dj-car-boutique-work-wechat",
"libVersion": "3.2.5" "libVersion": "3.2.5"
} }
\ No newline at end of file \ No newline at end of file
...@@ -57,7 +57,8 @@ Page({ ...@@ -57,7 +57,8 @@ Page({
standNo: '', standNo: '',
plateNumber: '', plateNumber: '',
customerSex: 1, customerSex: 1,
experienceFlag: 'Y' experienceFlag: 'Y',
salesType:0
}, },
selectPayType: 2, selectPayType: 2,
remark: '', remark: '',
...@@ -79,7 +80,15 @@ Page({ ...@@ -79,7 +80,15 @@ Page({
frontGearArr: [], frontGearArr: [],
sideRearGearArr: [], sideRearGearArr: [],
skylightArr: [], skylightArr: [],
baseConfigData: {} baseConfigData: {},
showSource:false,
Sourcecolumns:[{
type:0,
name:'售前'
},{
type:1,
name:'售后'
}],
}, },
showCustomPop() { showCustomPop() {
this.setData({ this.setData({
...@@ -670,6 +679,7 @@ Page({ ...@@ -670,6 +679,7 @@ Page({
} }
if (!orderObj.customer.customerSex) orderObj.customer.customerSex = 1 if (!orderObj.customer.customerSex) orderObj.customer.customerSex = 1
if (!orderObj.customer.experienceFlag) orderObj.customer.experienceFlag = 'N' if (!orderObj.customer.experienceFlag) orderObj.customer.experienceFlag = 'N'
if(!orderObj.customer.salesType) orderObj.customer.salesType = 0
this.setData({ this.setData({
orderObj, orderObj,
first: true, first: true,
...@@ -1017,6 +1027,24 @@ Page({ ...@@ -1017,6 +1027,24 @@ Page({
}) })
} }
}, },
toSelectCustomerSource(){
this.setData({
showSource:true
})
},
onChangeSource(e){
console.log(e);
const {type} = e.detail.value
this.setData({
showSource:false,
'orderObj.customer.salesType':type
})
},
onCloseSource(){
this.setData({
showSource:false
})
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
"coupon": "/components/Coupon/Coupon", "coupon": "/components/Coupon/Coupon",
"goods": "/components/Goods/Goods", "goods": "/components/Goods/Goods",
"customerInfo": "/components/CustomerInfo/CustomerInfo", "customerInfo": "/components/CustomerInfo/CustomerInfo",
"sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant" "sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant",
"van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index"
} }
} }
...@@ -93,6 +93,9 @@ ...@@ -93,6 +93,9 @@
always-embed></input> always-embed></input>
</gl-cell> </gl-cell>
</view> </view>
<gl-cell border label="客户来源" value="{{Sourcecolumns[orderObj.customer.salesType].name}}" bind:click="toSelectCustomerSource" haveArrow="{{true}}" placeholder="点击选择" requiredAfter required valueAlign="right" labelWidth="var(--fontSize140)">
</gl-cell>
<gl-cell <gl-cell
border border
label="性别" label="性别"
...@@ -565,3 +568,6 @@ ...@@ -565,3 +568,6 @@
qrCode="{{orderInfo.payOrder.outTradeNo}}" qrCode="{{orderInfo.payOrder.outTradeNo}}"
price="{{orderInfo.total_price}}" /> --> price="{{orderInfo.total_price}}" /> -->
<van-popup show="{{ showSource }}" position="bottom" bind:close="onCloseSource">
<van-picker show-toolbar title="客户来源" bind:cancel="onCloseSource" columns="{{ Sourcecolumns }}" value-key="name" bind:confirm="onChangeSource" />
</van-popup>
\ No newline at end of file \ No newline at end of file
...@@ -16,7 +16,21 @@ Page({ ...@@ -16,7 +16,21 @@ Page({
...order_mixins.data, ...order_mixins.data,
orderInfo: {}, orderInfo: {},
showTips: true, showTips: true,
artificerSelectObj: {} artificerSelectObj: {},
successDate:'',
showDateSelect:false,
isErrorOrder:false
},
getSelectDate(e){
this.setData({
successDate:e.detail,
showDateSelect:false
})
},
toshowDateModal(){
this.setData({
showDateSelect:true
})
}, },
closeTips() { closeTips() {
this.setData({ this.setData({
...@@ -74,7 +88,9 @@ Page({ ...@@ -74,7 +88,9 @@ Page({
selectPayType, selectPayType,
status, status,
orderCode orderCode
} },
successDate,
isErrorOrder
} = this.data } = this.data
let _this = this let _this = this
// 微信支付 // 微信支付
...@@ -110,6 +126,7 @@ Page({ ...@@ -110,6 +126,7 @@ Page({
_this.createPayOrder() _this.createPayOrder()
} }
} else { } else {
if(!successDate&&!isErrorOrder)return wx.$util.showToast('请选择门店付款时间')
this.setData({ this.setData({
showPopup: true showPopup: true
}) })
...@@ -122,18 +139,24 @@ Page({ ...@@ -122,18 +139,24 @@ Page({
orderCode orderCode
}, },
outTradeNo, outTradeNo,
payVoucherList payVoucherList,
successDate,
isErrorOrder
} = this.data } = this.data
let obj = { let obj = {
orderCode, orderCode,
payType: selectPayType payType: selectPayType
} }
if(selectPayType==2&&!isErrorOrder){
obj.successDate = successDate
}
if (payVoucherList?.length && outTradeNo) { if (payVoucherList?.length && outTradeNo) {
obj.payVoucherList = payVoucherList.map(v => { obj.payVoucherList = payVoucherList.map(v => {
return v?.url return v?.url
}) })
obj.outTradeNo = outTradeNo obj.outTradeNo = outTradeNo
} }
console.log(obj)
wx.$util.showLoading() wx.$util.showLoading()
// 状态更新 需刷新工单列表和预约管理列表 // 状态更新 需刷新工单列表和预约管理列表
wx.$util.refreshPageData() wx.$util.refreshPageData()
...@@ -230,6 +253,11 @@ Page({ ...@@ -230,6 +253,11 @@ Page({
if (options.orderCode) { if (options.orderCode) {
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
this.getDetail(options.orderCode) this.getDetail(options.orderCode)
if(options.isErrorOrder){
this.setData({
isErrorOrder:true
})
}
} }
}, },
async getDetail(orderCode) { async getDetail(orderCode) {
......
{ {
"navigationBarTitleText": "工单确认", "navigationBarTitleText": "工单确认",
"usingComponents": { "usingComponents": {
"artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup" "artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup",
"date-select":"/components/DateSelect/dateSelect"
} }
} }
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
<view class="tips">点击确认工单,根据操作结束工单。</view> <view class="tips">点击确认工单,根据操作结束工单。</view>
</block> </block>
</view> </view>
<view wx:if="{{!isErrorOrder}}" class="box date-box">
<view class="date-box-label">收款时间</view>
<view class="date-box-value" bind:tap="toshowDateModal">{{successDate || '请选择门店收款时间'}}</view>
</view>
<view class="box"> <view class="box">
<!-- 不升级 --> <!-- 不升级 -->
<!-- <block wx:if="{{orderInfo.selectPayType ==0}}"> <!-- <block wx:if="{{orderInfo.selectPayType ==0}}">
...@@ -220,4 +224,5 @@ ...@@ -220,4 +224,5 @@
orderInfo="{{orderInfo}}" orderInfo="{{orderInfo}}"
artificerSelectObj="{{artificerSelectObj}}" artificerSelectObj="{{artificerSelectObj}}"
bindconfirm="changeArtificer" /> bindconfirm="changeArtificer" />
<date-select show="{{showDateSelect}}" bind:confirm="getSelectDate"></date-select>
...@@ -54,4 +54,20 @@ margin-right: var(--fontSize12); ...@@ -54,4 +54,20 @@ margin-right: var(--fontSize12);
transform: translateY(-50%); transform: translateY(-50%);
width: var(--fontSize28); width: var(--fontSize28);
height: var(--fontSize26); height: var(--fontSize26);
}
.date-box{
display: flex;
align-items: center;
padding: var(--fontSize40);
}
.date-box-label{
font-weight: 400;
font-size: var(--fontSize28);
color: #999EA8;
margin-right: var(--fontSize40);
}
.date-box-value{
font-weight: 400;
font-size: var(--fontSize28);
color: #292D33;
} }
\ No newline at end of file \ No newline at end of file
...@@ -20,6 +20,7 @@ let toastList = { ...@@ -20,6 +20,7 @@ let toastList = {
} }
const phoneRex = /^[1]([3-9])[0-9]{9}$/ const phoneRex = /^[1]([3-9])[0-9]{9}$/
// orderSource 订单来源(1后台录入,2移动端预录客户,3移动端升级下单,4再次下单) // orderSource 订单来源(1后台录入,2移动端预录客户,3移动端升级下单,4再次下单)
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -56,7 +57,8 @@ Page({ ...@@ -56,7 +57,8 @@ Page({
standNo: '', standNo: '',
plateNumber: '', plateNumber: '',
customerSex: 1, customerSex: 1,
experienceFlag: 'Y' experienceFlag: 'Y',
salesType:0
}, },
// selectPayType: 0, // selectPayType: 0,
selectPayType: 2, selectPayType: 2,
...@@ -84,7 +86,15 @@ Page({ ...@@ -84,7 +86,15 @@ Page({
frontGearArr: [], // 前挡 frontGearArr: [], // 前挡
sideRearGearArr: [], // 侧后挡 sideRearGearArr: [], // 侧后挡
skylightArr: [], // 天窗 skylightArr: [], // 天窗
baseConfigData: {} baseConfigData: {},
showSource:false,
Sourcecolumns:[{
type:0,
name:'售前'
},{
type:1,
name:'售后'
}],
}, },
remarkInput(e) { remarkInput(e) {
...@@ -407,9 +417,10 @@ Page({ ...@@ -407,9 +417,10 @@ Page({
scene, scene,
isErrorOrder, isErrorOrder,
isAlreadyExistOrder, isAlreadyExistOrder,
submitStatus submitStatus,
} = this.data } = this.data
orderObj = wx.$util.deepClone(orderObj) orderObj = wx.$util.deepClone(orderObj)
// 如果是错单补录 禁用掉保存功能 或待跟进订单/预约订单 禁用建档 // 如果是错单补录 禁用掉保存功能 或待跟进订单/预约订单 禁用建档
if ((isErrorOrder && save) || (isAlreadyExistOrder && save)) return if ((isErrorOrder && save) || (isAlreadyExistOrder && save)) return
...@@ -523,6 +534,7 @@ Page({ ...@@ -523,6 +534,7 @@ Page({
} else { } else {
// 状态更新 需刷新工单列表和预约管理列表 // 状态更新 需刷新工单列表和预约管理列表
wx.$util.refreshPageData() wx.$util.refreshPageData()
if(this.data.isErrorOrder)data.isErrorOrder = true
wx.$router.redirectTo('confirmOrder', data) wx.$router.redirectTo('confirmOrder', data)
} }
} else { } else {
...@@ -601,6 +613,7 @@ Page({ ...@@ -601,6 +613,7 @@ Page({
return true return true
} }
} }
try { try {
target.map(key => { target.map(key => {
if (!obj[key]) { if (!obj[key]) {
...@@ -713,6 +726,7 @@ Page({ ...@@ -713,6 +726,7 @@ Page({
if (options.yqMerchantId && options.isAppointment) { if (options.yqMerchantId && options.isAppointment) {
orderObj.sellerMerchantId = options.yqMerchantId orderObj.sellerMerchantId = options.yqMerchantId
} }
if(!orderObj.customer.salesType) orderObj.customer.salesType = 0
console.log(orderObj, 'orderObj'); console.log(orderObj, 'orderObj');
this.setData({ this.setData({
currentWordNumber: orderObj?.remark?.length || 0, currentWordNumber: orderObj?.remark?.length || 0,
...@@ -1113,6 +1127,26 @@ Page({ ...@@ -1113,6 +1127,26 @@ Page({
} }
this.getSetting() this.getSetting()
}, },
toSelectCustomerSource(){
this.setData({
showSource:true
})
},
onChangeSource(e){
console.log(e);
const {type} = e.detail.value
this.setData({
showSource:false,
'orderObj.customer.salesType':type
})
},
onCloseSource(){
this.setData({
showSource:false
})
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
"coupon": "/components/Coupon/Coupon", "coupon": "/components/Coupon/Coupon",
"goods": "/components/Goods/Goods", "goods": "/components/Goods/Goods",
"customerInfo": "/components/CustomerInfo/CustomerInfo", "customerInfo": "/components/CustomerInfo/CustomerInfo",
"sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant" "sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant",
"van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index"
} }
} }
...@@ -115,6 +115,9 @@ ...@@ -115,6 +115,9 @@
></input> ></input>
</gl-cell> </gl-cell>
</view> </view>
<gl-cell border label="客户来源" value="{{Sourcecolumns[orderObj.customer.salesType].name}}" bind:click="toSelectCustomerSource" haveArrow="{{true}}" placeholder="点击选择" requiredAfter required valueAlign="right" labelWidth="var(--fontSize140)">
</gl-cell>
<gl-cell border label="性别" valueAlign="right" labelWidth="var(--fontSize140)"> <gl-cell border label="性别" valueAlign="right" labelWidth="var(--fontSize140)">
<view class="gender-box"> <view class="gender-box">
<view class="block text-center {{ orderObj.customer.customerSex==1?'':'right' }}" /> <view class="block text-center {{ orderObj.customer.customerSex==1?'':'right' }}" />
...@@ -489,6 +492,9 @@ ...@@ -489,6 +492,9 @@
</gl-cell> </gl-cell>
</view> </view>
<view class="box"> <view class="box">
<!-- <gl-cell wx:if="{{orderObj.selectPayType==2}}" value="{{successDateTime}}" bind:click="toSelectDate" haveArrow placeholder="请选择时间" required requiredAfter border class="pay-type" label="门店收款时间" valueAlign="right" labelWidth="var(--fontSize200)">
</gl-cell> -->
<view class="remark_box"> <view class="remark_box">
<view class="label">订单备注</view> <view class="label">订单备注</view>
<view class="textArea_box"> <view class="textArea_box">
...@@ -548,6 +554,9 @@ ...@@ -548,6 +554,9 @@
/> />
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" isSolarFilm="{{true}}" baseConfigData="{{baseConfigData}}" /> <goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" isSolarFilm="{{true}}" baseConfigData="{{baseConfigData}}" />
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" /> <customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" />
<van-popup show="{{ showSource }}" position="bottom" bind:close="onCloseSource">
<van-picker show-toolbar title="客户来源" bind:cancel="onCloseSource" columns="{{ Sourcecolumns }}" value-key="name" bind:confirm="onChangeSource" />
</van-popup>
<!-- <order-popup <!-- <order-popup
orderType="{{remarkBox}}" orderType="{{remarkBox}}"
show="{{remarkBox}}" show="{{remarkBox}}"
......
...@@ -54,7 +54,8 @@ Page({ ...@@ -54,7 +54,8 @@ Page({
standNo: '', standNo: '',
plateNumber: '', plateNumber: '',
customerSex: 1, customerSex: 1,
experienceFlag: 'Y' experienceFlag: 'Y',
salesType:0
}, },
// selectPayType: 0, // selectPayType: 0,
selectPayType: 2, selectPayType: 2,
...@@ -76,7 +77,15 @@ Page({ ...@@ -76,7 +77,15 @@ Page({
}, },
positionTypeList: [], positionTypeList: [],
currentWordNumber: 0, // 订单备注字数 currentWordNumber: 0, // 订单备注字数
baseConfigData: {} baseConfigData: {},
showSource:false,
Sourcecolumns:[{
type:0,
name:'售前'
},{
type:1,
name:'售后'
}],
}, },
showCustomPop() { showCustomPop() {
this.setData({ this.setData({
...@@ -596,6 +605,7 @@ Page({ ...@@ -596,6 +605,7 @@ Page({
if (options.yqMerchantId && options.isAppointment) { if (options.yqMerchantId && options.isAppointment) {
orderObj.sellerMerchantId = options.yqMerchantId orderObj.sellerMerchantId = options.yqMerchantId
} }
if(!orderObj.customer.salesType) orderObj.customer.salesType = 0
this.setData({ this.setData({
currentWordNumber: orderObj?.remark?.length || 0, currentWordNumber: orderObj?.remark?.length || 0,
orderObj, orderObj,
...@@ -933,6 +943,24 @@ Page({ ...@@ -933,6 +943,24 @@ Page({
} }
this.getSetting() this.getSetting()
}, },
toSelectCustomerSource(){
this.setData({
showSource:true
})
},
onChangeSource(e){
console.log(e);
const {type} = e.detail.value
this.setData({
showSource:false,
'orderObj.customer.salesType':type
})
},
onCloseSource(){
this.setData({
showSource:false
})
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
"coupon": "/components/Coupon/Coupon", "coupon": "/components/Coupon/Coupon",
"goods": "/components/Goods/Goods", "goods": "/components/Goods/Goods",
"customerInfo": "/components/CustomerInfo/CustomerInfo", "customerInfo": "/components/CustomerInfo/CustomerInfo",
"sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant" "sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant",
"van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -114,6 +114,9 @@ ...@@ -114,6 +114,9 @@
></input> ></input>
</gl-cell> </gl-cell>
</view> </view>
<gl-cell border label="客户来源" value="{{Sourcecolumns[orderObj.customer.salesType].name}}" bind:click="toSelectCustomerSource" haveArrow="{{true}}" placeholder="点击选择" requiredAfter required valueAlign="right" labelWidth="var(--fontSize140)">
</gl-cell>
<gl-cell border label="性别" valueAlign="right" labelWidth="var(--fontSize140)"> <gl-cell border label="性别" valueAlign="right" labelWidth="var(--fontSize140)">
<view class="gender-box"> <view class="gender-box">
<view class="block text-center {{ orderObj.customer.customerSex==1?'':'right' }}" /> <view class="block text-center {{ orderObj.customer.customerSex==1?'':'right' }}" />
...@@ -383,3 +386,6 @@ ...@@ -383,3 +386,6 @@
selectedCustomerInfo="{{ orderObj.customer.customerId }}" selectedCustomerInfo="{{ orderObj.customer.customerId }}"
selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}" selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}"
/> />
<van-popup show="{{ showSource }}" position="bottom" bind:close="onCloseSource">
<van-picker show-toolbar title="客户来源" bind:cancel="onCloseSource" columns="{{ Sourcecolumns }}" value-key="name" bind:confirm="onChangeSource" />
</van-popup>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!