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
{
"component": true,
"usingComponents": {}
}
\ 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
/* 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
......@@ -169,6 +169,7 @@ module.exports = {
staffDailyReportMerchantValid(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)
},
/** 员工是否需要推送开单预警 */
......
......@@ -126,7 +126,8 @@ Component({
}, {
value: 1,
name: '门店收款'
}]
}],
successDateTime:''
},
/**
......@@ -517,8 +518,15 @@ Component({
let {
showError,
insuranceCheck,
orderInfo
orderInfo,
successDateTime
} = this.data
if(successDateTime&&!orderInfo.resetOrder){
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
['orderInfo.pay2Time']: successDateTime,
})
}
if (showError) return wx.$util.showToast('权益价不能小于最低权益价')
// 校验商品最低价
let goodsError = []
......@@ -598,6 +606,22 @@ Component({
})
attrname != 'quotedPriceUpdate' && this.cancelInsuranceCheck()
// 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){
// console.log(e);
......
......@@ -7,6 +7,7 @@
"van-collapse-item": "@vant/weapp/collapse-item/index",
"van-checkbox": "@vant/weapp/checkbox/index",
"popup-input": "../PopupInput/PopupInput",
"goods": "../GoodsPackage/Goods"
"goods": "../GoodsPackage/Goods",
"date-select":"/components/DateSelect/dateSelect"
}
}
\ No newline at end of file
......@@ -81,6 +81,9 @@
<view class="right text-center {{ orderInfo.payType == 2?'active':'' }}" bindtap="changePayType" data-payType="2">门店收款</view>
</view>
</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="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>
......@@ -90,4 +93,5 @@
</van-collapse>
<Gl-Button-Group bindbtnTap="btnTap" textNameObj="{{ textNameObj }}" />
</view>
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ quotationGoodsList }}" chooseGoodsList="{{ orderInfo.vdQuotationGoodsList }}" />
\ 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
......@@ -75,10 +75,18 @@ const ageList = [{
optionLabel: '51岁以上'
}]
const salesTypeList = [{
optionId: 0,
optionLabel: '售前',
},{
optionId: 1,
optionLabel: '售后',
}]
export default {
seatesList,
customerTypeList,
cardTypeList,
buyCarTypeList,
ageList
ageList,
salesTypeList
}
......@@ -107,7 +107,11 @@ const formRuleSimple = {
} : null
}
}
]
],
salesType: [{
required: true,
message: '客户来源不能为空'
}],
}
const firstObj = {
......@@ -131,6 +135,17 @@ const firstObj = {
requiredAfter: true
},
{
label: '客户来源',
name: 'salesType',
labelName: 'salesType',
type: 'select',
optionList: constantList.salesTypeList,
optionId: 'optionId',
optionLabel: 'optionLabel',
required: true,
requiredAfter: true
},
{
label: '性别',
name: 'ownerGender',
type: 'slot',
......@@ -249,6 +264,17 @@ const firstObjSimple = {
requiredAfter: true
},
{
label: '客户来源',
name: 'salesType',
labelName: 'salesType',
type: 'select',
optionList: constantList.salesTypeList,
optionId: 'optionId',
optionLabel: 'optionLabel',
required: true,
requiredAfter: true
},
{
label: '性别',
name: 'ownerGender',
type: 'slot',
......
......@@ -15,7 +15,8 @@ Page({
seat: '5',
price: '',
confirmStatus: false,
saveStatus: false
saveStatus: false,
salesType:'售前'
},
// owner: {
// owner: 'test2',
......@@ -222,6 +223,7 @@ Page({
let owner = this.getOwnerInfo()
orderInfo.owner = owner
orderInfo.check = check
owner.salesType = owner.salesType=='售后'?1:0
console.log('orderInfo', orderInfo)
try {
return new Promise(async (resolve, reject) => {
......
......@@ -40,7 +40,8 @@ Page({
carChildsBrandId: '',
carChildsBrandName: '',
carSeriesId: '',
carSeriesName: ''
carSeriesName: '',
salesType:'售前'
},
quotationGoodsList: [], //权益商品列表
// owner: {
......@@ -146,6 +147,7 @@ Page({
orderInfo.owner = owner
orderInfo.check = true
orderInfo.outTradeNo = outTradeNo
owner.salesType = owner.salesType=='售后'?1:0
wx.showLoading('提交中...')
quotationRecording(orderInfo)
.then(result => {
......@@ -183,7 +185,8 @@ Page({
staffDailyReportMerchantValid({
merchantId: userInfo.shopMerchantId,
yqMerchantId: userInfo.merchantId,
staffUuid: userInfo.uuid
staffUuid: userInfo.uuid,
sceneType:0
})
.then(res => {
// console.log(res, 'staffDailyReportMerchantValid')
......@@ -291,14 +294,17 @@ Page({
if (!status) return false
if (!orderInfo.vdQuotationGoodsList.length) return wx.$util.showToast('请选择增值车损险商品')
// 非标记错误,门店收款
if (!orderInfo.pay2Time&&orderInfo.payType==2&&!orderInfo.resetOrder) return wx.$util.showToast('请选择门店收款时间')
// 修改权益报价逻辑
if (confirmStatus) return false
this.setData({
confirmStatus: true
})
// 是订单补录直接走另外的补录逻辑
console.log(outTradeNo, '是订单补录直接走另外的补录逻辑')
if (!orderInfo.pay2Time&&orderInfo.payType==1&&!orderInfo.resetOrder&&outTradeNo) return wx.$util.showToast('请选择门店收款时间')
if (outTradeNo && !orderInfo.resetOrder) return this.setQuotationRecording()
// debugger
// 如果是门店收款 并且付款凭证没有填
......@@ -308,6 +314,17 @@ Page({
showPopup: true,
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('报价中...')
let result = await this.handleSecondConfirmCheck(true)
......@@ -407,9 +424,10 @@ Page({
// 获取保险信息
let orderInfo = this.getInsurance()
let owner = this.getOwnerInfo()
owner.salesType = owner.salesType=='售后'?1:0
orderInfo.owner = owner
orderInfo.check = check
console.log('orderInfo', orderInfo)
// debugger
try {
......@@ -514,6 +532,7 @@ Page({
orderInfo.resetOrder = this.resetOrder
tableInfo.payType = 2
}
tableInfo.owner.salesType = tableInfo.owner.salesType==1?'售后':'售前'
this.setData({
orderInfo: Object.assign(orderInfo, tableInfo, {
insureList: []
......@@ -823,6 +842,12 @@ Page({
...owner,
...customerInfo
}
if(customerInfo.salesType){
owner.salesType = '售后'
}else{
owner.salesType = '售前'
}
this.setData({
owner
})
......
......@@ -112,8 +112,8 @@
}
},
"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"
}
\ No newline at end of file
......@@ -57,7 +57,8 @@ Page({
standNo: '',
plateNumber: '',
customerSex: 1,
experienceFlag: 'Y'
experienceFlag: 'Y',
salesType:0
},
selectPayType: 2,
remark: '',
......@@ -79,7 +80,15 @@ Page({
frontGearArr: [],
sideRearGearArr: [],
skylightArr: [],
baseConfigData: {}
baseConfigData: {},
showSource:false,
Sourcecolumns:[{
type:0,
name:'售前'
},{
type:1,
name:'售后'
}],
},
showCustomPop() {
this.setData({
......@@ -670,6 +679,7 @@ Page({
}
if (!orderObj.customer.customerSex) orderObj.customer.customerSex = 1
if (!orderObj.customer.experienceFlag) orderObj.customer.experienceFlag = 'N'
if(!orderObj.customer.salesType) orderObj.customer.salesType = 0
this.setData({
orderObj,
first: true,
......@@ -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 @@
"coupon": "/components/Coupon/Coupon",
"goods": "/components/Goods/Goods",
"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 @@
always-embed></input>
</gl-cell>
</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="性别"
......@@ -565,3 +568,6 @@
qrCode="{{orderInfo.payOrder.outTradeNo}}"
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
......@@ -16,7 +16,21 @@ Page({
...order_mixins.data,
orderInfo: {},
showTips: true,
artificerSelectObj: {}
artificerSelectObj: {},
successDate:'',
showDateSelect:false,
isErrorOrder:false
},
getSelectDate(e){
this.setData({
successDate:e.detail,
showDateSelect:false
})
},
toshowDateModal(){
this.setData({
showDateSelect:true
})
},
closeTips() {
this.setData({
......@@ -74,7 +88,9 @@ Page({
selectPayType,
status,
orderCode
}
},
successDate,
isErrorOrder
} = this.data
let _this = this
// 微信支付
......@@ -110,6 +126,7 @@ Page({
_this.createPayOrder()
}
} else {
if(!successDate&&!isErrorOrder)return wx.$util.showToast('请选择门店付款时间')
this.setData({
showPopup: true
})
......@@ -122,18 +139,24 @@ Page({
orderCode
},
outTradeNo,
payVoucherList
payVoucherList,
successDate,
isErrorOrder
} = this.data
let obj = {
orderCode,
payType: selectPayType
}
if(selectPayType==2&&!isErrorOrder){
obj.successDate = successDate
}
if (payVoucherList?.length && outTradeNo) {
obj.payVoucherList = payVoucherList.map(v => {
return v?.url
})
obj.outTradeNo = outTradeNo
}
console.log(obj)
wx.$util.showLoading()
// 状态更新 需刷新工单列表和预约管理列表
wx.$util.refreshPageData()
......@@ -230,6 +253,11 @@ Page({
if (options.orderCode) {
wx.$util.showLoading('加载中...')
this.getDetail(options.orderCode)
if(options.isErrorOrder){
this.setData({
isErrorOrder:true
})
}
}
},
async getDetail(orderCode) {
......
{
"navigationBarTitleText": "工单确认",
"usingComponents": {
"artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup"
"artificer-select-popup" : "/components/ArtificerSelectPopup/artificerSelectPopup",
"date-select":"/components/DateSelect/dateSelect"
}
}
......@@ -17,6 +17,10 @@
<view class="tips">点击确认工单,根据操作结束工单。</view>
</block>
</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">
<!-- 不升级 -->
<!-- <block wx:if="{{orderInfo.selectPayType ==0}}">
......@@ -220,4 +224,5 @@
orderInfo="{{orderInfo}}"
artificerSelectObj="{{artificerSelectObj}}"
bindconfirm="changeArtificer" />
<date-select show="{{showDateSelect}}" bind:confirm="getSelectDate"></date-select>
......@@ -54,4 +54,20 @@ margin-right: var(--fontSize12);
transform: translateY(-50%);
width: var(--fontSize28);
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
......@@ -20,6 +20,7 @@ let toastList = {
}
const phoneRex = /^[1]([3-9])[0-9]{9}$/
// orderSource 订单来源(1后台录入,2移动端预录客户,3移动端升级下单,4再次下单)
Page({
/**
* 页面的初始数据
......@@ -56,7 +57,8 @@ Page({
standNo: '',
plateNumber: '',
customerSex: 1,
experienceFlag: 'Y'
experienceFlag: 'Y',
salesType:0
},
// selectPayType: 0,
selectPayType: 2,
......@@ -84,7 +86,15 @@ Page({
frontGearArr: [], // 前挡
sideRearGearArr: [], // 侧后挡
skylightArr: [], // 天窗
baseConfigData: {}
baseConfigData: {},
showSource:false,
Sourcecolumns:[{
type:0,
name:'售前'
},{
type:1,
name:'售后'
}],
},
remarkInput(e) {
......@@ -407,9 +417,10 @@ Page({
scene,
isErrorOrder,
isAlreadyExistOrder,
submitStatus
submitStatus,
} = this.data
orderObj = wx.$util.deepClone(orderObj)
// 如果是错单补录 禁用掉保存功能 或待跟进订单/预约订单 禁用建档
if ((isErrorOrder && save) || (isAlreadyExistOrder && save)) return
......@@ -523,6 +534,7 @@ Page({
} else {
// 状态更新 需刷新工单列表和预约管理列表
wx.$util.refreshPageData()
if(this.data.isErrorOrder)data.isErrorOrder = true
wx.$router.redirectTo('confirmOrder', data)
}
} else {
......@@ -601,6 +613,7 @@ Page({
return true
}
}
try {
target.map(key => {
if (!obj[key]) {
......@@ -713,6 +726,7 @@ Page({
if (options.yqMerchantId && options.isAppointment) {
orderObj.sellerMerchantId = options.yqMerchantId
}
if(!orderObj.customer.salesType) orderObj.customer.salesType = 0
console.log(orderObj, 'orderObj');
this.setData({
currentWordNumber: orderObj?.remark?.length || 0,
......@@ -1113,6 +1127,26 @@ Page({
}
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 @@
"coupon": "/components/Coupon/Coupon",
"goods": "/components/Goods/Goods",
"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 @@
></input>
</gl-cell>
</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)">
<view class="gender-box">
<view class="block text-center {{ orderObj.customer.customerSex==1?'':'right' }}" />
......@@ -489,6 +492,9 @@
</gl-cell>
</view>
<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="label">订单备注</view>
<view class="textArea_box">
......@@ -548,6 +554,9 @@
/>
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" isSolarFilm="{{true}}" baseConfigData="{{baseConfigData}}" />
<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
orderType="{{remarkBox}}"
show="{{remarkBox}}"
......
......@@ -54,7 +54,8 @@ Page({
standNo: '',
plateNumber: '',
customerSex: 1,
experienceFlag: 'Y'
experienceFlag: 'Y',
salesType:0
},
// selectPayType: 0,
selectPayType: 2,
......@@ -76,7 +77,15 @@ Page({
},
positionTypeList: [],
currentWordNumber: 0, // 订单备注字数
baseConfigData: {}
baseConfigData: {},
showSource:false,
Sourcecolumns:[{
type:0,
name:'售前'
},{
type:1,
name:'售后'
}],
},
showCustomPop() {
this.setData({
......@@ -596,6 +605,7 @@ Page({
if (options.yqMerchantId && options.isAppointment) {
orderObj.sellerMerchantId = options.yqMerchantId
}
if(!orderObj.customer.salesType) orderObj.customer.salesType = 0
this.setData({
currentWordNumber: orderObj?.remark?.length || 0,
orderObj,
......@@ -933,6 +943,24 @@ Page({
}
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 @@
"coupon": "/components/Coupon/Coupon",
"goods": "/components/Goods/Goods",
"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
......@@ -114,6 +114,9 @@
></input>
</gl-cell>
</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)">
<view class="gender-box">
<view class="block text-center {{ orderObj.customer.customerSex==1?'':'right' }}" />
......@@ -383,3 +386,6 @@
selectedCustomerInfo="{{ orderObj.customer.customerId }}"
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!