Commit db6cf45a by 张立顺

Merge branch 'dev_v4.31.0_1031' of http://192.168.3.233:8090/saas_plus/dj-car-bo…

…utique-work-wechat into dev_v4.31.0_1031
2 parents 2b956143 0114e6f6
...@@ -18,7 +18,7 @@ Component({ ...@@ -18,7 +18,7 @@ Component({
return i return i
}) })
this.setData({ this.setData({
artificerList: copyArtificerList, artificerList: wx.$util.deepClone(copyArtificerList),
selectedTechnicianId: artificerSelectObj?.technicianId, selectedTechnicianId: artificerSelectObj?.technicianId,
searchValue: '' searchValue: ''
}) })
...@@ -74,24 +74,19 @@ Component({ ...@@ -74,24 +74,19 @@ Component({
}, },
changeItem(e) { changeItem(e) {
let { target } = e.currentTarget.dataset let { target } = e.currentTarget.dataset
let { artificerList, copyArtificerList } = this.data let { artificerList } = this.data
artificerList.map(i => { let { copyArtificerList } = wx.$util.deepClone(this.data)
i.active = false artificerList.forEach(i => {
if (i.id == target?.id) { if (i.id != target?.id) i.active = false
i.active = true if (i.id == target?.id) i.active = !i.active
}
return i
}) })
copyArtificerList.map(i => { copyArtificerList.forEach(i => {
i.active = false if (i.id != target?.id) i.active = false
if (i.id == target?.id) { if (i.id == target?.id) i.active = !i.active
i.active = true
}
return i
}) })
this.setData({ this.setData({
artificerList: artificerList, artificerList,
copyArtificerList: copyArtificerList, copyArtificerList,
selectedTechnicianId: target.id selectedTechnicianId: target.id
}) })
}, },
...@@ -108,10 +103,14 @@ Component({ ...@@ -108,10 +103,14 @@ Component({
}) })
}, },
async confirm() { async confirm() {
let { copyArtificerList, orderInfo, artificerSelectObj } = this.data let { copyArtificerList, orderInfo, artificerSelectObj, selectedTechnicianId } = this.data
let arr = copyArtificerList?.filter(v => v.active) || [] let arr = copyArtificerList?.filter(v => v.active) || []
if (!arr.length) { if (!arr.length) {
return wx.$util.showToast('请选择技师') // return wx.$util.showToast('请选择技师')
// 未选技师 将selectedTechnicianId清除
this.setData({
selectedTechnicianId: ''
})
} }
let obj = { let obj = {
...artificerSelectObj, ...artificerSelectObj,
......
...@@ -41,23 +41,50 @@ Component({ ...@@ -41,23 +41,50 @@ Component({
} }
} }
}, },
phoneShow: Boolean, // 是否显示手机号输入项
isAdditionRecordOrder: Boolean, // 是否是补录 isAdditionRecordOrder: Boolean, // 是否是补录
customerPhone: { customerPhone: {
type: Number, type: Number,
observer: function (n, o) { observer: function (n, o) {
const phoneRex = /^[1]([3-9])[0-9]{9}$/ const phoneRex = /^[1]([3-9])[0-9]{9}$/
if (phoneRex.test(n)) { if (phoneRex.test(n)) {
let { merchantId, phoneShow, isAdditionRecordOrder } = this.data this.getCustomerCouponList(n)
this.getCouponList(this.data.merchantId)
}
}
},
returnFun: Boolean,
pageName: {
type: String
},
filmOrder: String // 下单类型
},
lifetimes: {
attached() {}
},
/**
* 组件的初始数据
*/
data: {
couponList: [],
customerCouponList: []
},
/**
* 组件的方法列表
*/
methods: {
customerPhoneBlur() {
const phoneRex = /^[1]([3-9])[0-9]{9}$/
let { merchantId, customerPhone } = this.data
if (phoneRex.test(customerPhone)) {
let thisPage = wx.$router.getPageInstance() let thisPage = wx.$router.getPageInstance()
let { let {
orderObj orderObj
} = thisPage.data } = thisPage.data
let params = { let params = {
phone: n, phone: customerPhone,
merchantId: merchantId merchantId: merchantId
} }
if (!orderObj.orderCode && phoneShow && !isAdditionRecordOrder) { // 新下单 且可以手动输入手机号
orderAPI.getQueryCouponInfoByPhone(params).then(res => { orderAPI.getQueryCouponInfoByPhone(params).then(res => {
let { code, data, message } = res let { code, data, message } = res
if (code == 0) { if (code == 0) {
...@@ -73,9 +100,9 @@ Component({ ...@@ -73,9 +100,9 @@ Component({
carSeriesName: data.carSeriesName, carSeriesName: data.carSeriesName,
customerName: data.customerName, customerName: data.customerName,
customerPhone: data.customerPhone, customerPhone: data.customerPhone,
customerSex: data.customerSex, customerSex: data.customerSex || orderObj?.customer.customerSex,
plateNumber: data.plateNumber, plateNumber: data.plateNumber,
experienceFlag: orderObj?.experienceFlag || 'Y' // 默认是体验 experienceFlag: orderObj?.customer.experienceFlag || 'Y' // 默认是体验
}, },
couponName: data.couponName, couponName: data.couponName,
customerCouponCode: data.customerCouponCode, customerCouponCode: data.customerCouponCode,
...@@ -89,37 +116,11 @@ Component({ ...@@ -89,37 +116,11 @@ Component({
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
this.getCustomerCouponList(n) this.getCustomerCouponList(customerPhone)
this.getCouponList(this.data.merchantId, !(data && Object.keys(data)?.length)) this.getCouponList(this.data.merchantId, !(data && Object.keys(data)?.length))
}) })
} else {
this.getCustomerCouponList(n)
this.getCouponList(this.data.merchantId)
} }
}
}
},
returnFun: Boolean,
pageName: {
type: String
}, },
filmOrder: String // 下单类型
},
lifetimes: {
attached() {}
},
/**
* 组件的初始数据
*/
data: {
couponList: [],
customerCouponList: []
},
/**
* 组件的方法列表
*/
methods: {
getCustomerCouponList(customerPhone) { getCustomerCouponList(customerPhone) {
// statusList 客户券状态 0待使用 1使用中 2已回收 3已使用 // statusList 客户券状态 0待使用 1使用中 2已回收 3已使用
let params = { let params = {
......
<!--packageCrowdFunding/pages/activityList/activityList.wxml--> <!--packageCrowdFunding/pages/activityList/activityList.wxml-->
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back"> <navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back">
<view class="navigation-title" bindtap="showActivityPicker"> <view class="navigation-title" bindtap="showActivityPicker">
<view class="navigation-title-text text-hide">{{activityName}}</view> <view class="navigation-title-text text-hide">{{activityName}}</view>
......
...@@ -455,7 +455,7 @@ ...@@ -455,7 +455,7 @@
.list .item .order { .list .item .order {
font-size: 24rpx; font-size: 24rpx;
color: #333333; color: #292D33;
margin-bottom: 20rpx; margin-bottom: 20rpx;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -471,7 +471,7 @@ ...@@ -471,7 +471,7 @@
.list .item .order .order-label { .list .item .order .order-label {
width: 138rpx; width: 138rpx;
color: #9B9B9E; color: #999EA8;
} }
.list .item .order .order-value { .list .item .order .order-value {
......
...@@ -67,10 +67,10 @@ ...@@ -67,10 +67,10 @@
</view> </view>
<view class="activity-list"> <view class="activity-list">
<view class="activity-pay"> <view class="activity-pay">
<view class="havePaid">已支付· <view class="havePaid">已支付 ·
<view class="havePaidSum">{{item.payedCount}}</view> <view class="havePaidSum">{{item.payedCount}}</view>
</view> </view>
<view class="unpaid">待支付· <view class="unpaid">待支付 ·
<view class="unpaidNum">{{item.notPayedCount}}</view> <view class="unpaidNum">{{item.notPayedCount}}</view>
</view> </view>
</view> </view>
......
...@@ -285,6 +285,7 @@ ...@@ -285,6 +285,7 @@
.activity-box .activity-list .activity-pay .havePaid .havePaidSum { .activity-box .activity-list .activity-pay .havePaid .havePaidSum {
color: #FF9D0A; color: #FF9D0A;
padding-left: 8rpx;
} }
.activity-box .activity-list .activity-pay .unpaid { .activity-box .activity-list .activity-pay .unpaid {
...@@ -294,6 +295,7 @@ ...@@ -294,6 +295,7 @@
.activity-box .activity-list .activity-pay .unpaid .unpaidNum { .activity-box .activity-list .activity-pay .unpaid .unpaidNum {
color: #EB4E4E; color: #EB4E4E;
padding-left: 8rpx;
} }
.no-data { .no-data {
......
...@@ -125,9 +125,9 @@ page { ...@@ -125,9 +125,9 @@ page {
} */ } */
.list .item .name image { .list .item .name image {
width: 24rpx; width: 32rpx;
height: 24rpx; height: 32rpx;
margin-left: 12rpx; margin-left: 8rpx;
} }
.list .item.gray .name image { .list .item.gray .name image {
......
...@@ -139,9 +139,9 @@ page { ...@@ -139,9 +139,9 @@ page {
} }
.list .item .name .name-sex-icon{ .list .item .name .name-sex-icon{
width: 24rpx; width: 32rpx;
height: 24rpx; height: 32rpx;
margin-left: 12rpx; margin-left: 8rpx;
} }
......
<!-- pages/equity/index.wxml --> <!-- pages/equity/index.wxml -->
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{ true }}" navStyle="{{tabIndex != 3 ? '' : 'background-color: rgba(0,0,0,0);box-shadow:none;'}}" bindshowMenuPopup="showMenuPopup"> <navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showMenu="{{ true }}" navStyle="{{tabIndex != 3 ? '' : 'background-color: rgba(0,0,0,0);box-shadow:none;'}}" bindshowMenuPopup="showMenuPopup">
<view class="navigation-title" wx:if="{{tabIndex != 3}}"> <view class="navigation-title" wx:if="{{tabIndex != 3}}">
<view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo_newCarConversion && userInfo.default4SStoreInfo_newCarConversion.merchantName}}</view> <view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo_newCarConversion && userInfo.default4SStoreInfo_newCarConversion.merchantName}}</view>
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<span class="phone">{{item.customerCoupon.employeeName}}</span> <span class="phone">{{item.customerCoupon.employeeName}}</span>
<!-- {{c.name}} {{c.active?'active':''}} {{c.isTitle?'title':''}} --> <!-- {{c.name}} {{c.active?'active':''}} {{c.isTitle?'title':''}} -->
<view class="icon"> <view class="icon">
<image src="../images/choose.png" /> <image src="/components/images/choose.png" />
</view> </view>
</view> </view>
</block> </block>
......
...@@ -212,6 +212,10 @@ Page({ ...@@ -212,6 +212,10 @@ Page({
}) })
}, },
phoneBlur() {
this.selectComponent('#coupon')?.customerPhoneBlur && this.selectComponent('#coupon')?.customerPhoneBlur()
},
changeGender(e) { changeGender(e) {
let { gender } = e.currentTarget.dataset let { gender } = e.currentTarget.dataset
wx.vibrateShort() wx.vibrateShort()
......
...@@ -124,6 +124,7 @@ ...@@ -124,6 +124,7 @@
placeholder-class="placeholder-class" placeholder-class="placeholder-class"
value="{{orderObj.customer.customerPhone}}" value="{{orderObj.customer.customerPhone}}"
bindinput="input" bindinput="input"
bindblur="phoneBlur"
data-name="customer.customerPhone" data-name="customer.customerPhone"
disabled="{{orderObj.orderSource == 5||orderObj.orderSource == 6}}" disabled="{{orderObj.orderSource == 5||orderObj.orderSource == 6}}"
always-embed></input> always-embed></input>
...@@ -528,6 +529,7 @@ ...@@ -528,6 +529,7 @@
userInfo="{{userInfo}}" userInfo="{{userInfo}}"
type="2" /> type="2" />
<coupon <coupon
id="coupon"
show="{{couponBox}}" show="{{couponBox}}"
pageName="additionRecordOrder" pageName="additionRecordOrder"
class="coupon" class="coupon"
...@@ -536,7 +538,6 @@ ...@@ -536,7 +538,6 @@
customerPhone="{{orderObj.customer.customerPhone}}" customerPhone="{{orderObj.customer.customerPhone}}"
yqMerchantId="{{orderObj.sellerMerchantId}}" yqMerchantId="{{orderObj.sellerMerchantId}}"
returnFun="{{returnFun}}" returnFun="{{returnFun}}"
phoneShow="{{ !phoneShow }}"
isAdditionRecordOrder /> isAdditionRecordOrder />
<goods <goods
show="{{goodsBox}}" show="{{goodsBox}}"
......
...@@ -79,7 +79,9 @@ Page({ ...@@ -79,7 +79,9 @@ Page({
orderInfo.associateOrderCode = orderInfo.orderCode orderInfo.associateOrderCode = orderInfo.orderCode
delete orderInfo.orderCode delete orderInfo.orderCode
orderInfo.selectPayType = 2 orderInfo.selectPayType = 2
wx.$router.redirectTo('createOrder', orderInfo) // filmOrder 1精品升级
let urlName = orderInfo?.filmOrder == 1 ? 'premiumUpgrade' : 'createOrder'
wx.$router.redirectTo(urlName, orderInfo)
// wx.showToast({ // wx.showToast({
// icon: 'success', // icon: 'success',
// title: '确定按钮点击' // title: '确定按钮点击'
...@@ -128,6 +130,7 @@ Page({ ...@@ -128,6 +130,7 @@ Page({
// 选择技师 // 选择技师
selectArtificer(e) { selectArtificer(e) {
// 已施工完成不可操作
return return
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
this.setData({ this.setData({
...@@ -411,7 +414,8 @@ Page({ ...@@ -411,7 +414,8 @@ Page({
// delete orderInfo.orderCode // delete orderInfo.orderCode
// 去除掉错误订单对应的关联码 // 去除掉错误订单对应的关联码
// delete orderInfo.associateOrderCode // delete orderInfo.associateOrderCode
let deleteList = ['orderCode', 'associateOrderCode', 'merchantDistributionList', 'expenseCategoryList', 'profitAllocatinList','clientSignatureDTOList','customerPhotos','rating','sellerName','sellerUserId','sellerMerchantName','sellerMerchantId'] // 1031车膜下单版本 再次下单去掉商品信息 需重新选择
let deleteList = ['orderCode', 'associateOrderCode', 'merchantDistributionList', 'expenseCategoryList', 'profitAllocatinList','clientSignatureDTOList','customerPhotos','rating','sellerName','sellerUserId','sellerMerchantName','sellerMerchantId', 'subOrderList']
for (var i = 0; i < deleteList.length; i++) { for (var i = 0; i < deleteList.length; i++) {
// console.log(arr[i]) // console.log(arr[i])
delete orderInfo[deleteList[i]] delete orderInfo[deleteList[i]]
......
...@@ -34,7 +34,6 @@ Page({ ...@@ -34,7 +34,6 @@ Page({
{ {
customerName: '', customerName: '',
customerPhone: '', customerPhone: '',
standNo: '',
customerSex: 1, customerSex: 1,
confirmIndex: false confirmIndex: false
} }
...@@ -63,7 +62,8 @@ Page({ ...@@ -63,7 +62,8 @@ Page({
tipsText: '本表单用于快速创建客户待跟进订单', tipsText: '本表单用于快速创建客户待跟进订单',
showTips: true, showTips: true,
type: 1 type: 1
} },
selectCustomIndex: 0
}, },
routerBack() { routerBack() {
wx.$router.back() wx.$router.back()
...@@ -89,7 +89,6 @@ Page({ ...@@ -89,7 +89,6 @@ Page({
let customer = { let customer = {
customerName: '', customerName: '',
customerPhone: '', customerPhone: '',
standNo: '',
customerSex: 1 customerSex: 1
} }
let { notUpgradeOrderList } = this.data let { notUpgradeOrderList } = this.data
...@@ -104,6 +103,16 @@ Page({ ...@@ -104,6 +103,16 @@ Page({
}) })
}, 0) }, 0)
}, },
chooseCar(e) {
let { selectCustomIndex, notUpgradeOrderList } = this.data
notUpgradeOrderList[selectCustomIndex] = {
...notUpgradeOrderList[selectCustomIndex],
...e.detail
}
this.setData({
notUpgradeOrderList
})
},
/**设置日期 */ /**设置日期 */
setTimeList(dateNum) { setTimeList(dateNum) {
// console.log('time') // console.log('time')
...@@ -256,9 +265,10 @@ Page({ ...@@ -256,9 +265,10 @@ Page({
return (360 * Math.atan(_Y / _X)) / (2 * Math.PI) return (360 * Math.atan(_Y / _X)) / (2 * Math.PI)
}, },
showPopup(e) { showPopup(e) {
let { showName } = e.currentTarget.dataset let { showName, index } = e.currentTarget.dataset
this.setData({ this.setData({
[showName]: true [showName]: true,
selectCustomIndex: index
}) })
}, },
input(e) { input(e) {
...@@ -286,13 +296,10 @@ Page({ ...@@ -286,13 +296,10 @@ Page({
submit(i) { submit(i) {
this.checkPhoneUseConfig() this.checkPhoneUseConfig()
console.log(i)
let { type } = i.currentTarget.dataset let { type } = i.currentTarget.dataset
console.log(type) let { orderObj, notUpgradeOrderList, dateObj } = this.data
let { orderObj, notUpgradeOrderList, dateObj, isStandNo } = this.data
let key = this.checkRequired(orderObj) let key = this.checkRequired(orderObj)
console.log(key)
// debugger // debugger
if (key) { if (key) {
this.showToast(toastList[key]) this.showToast(toastList[key])
...@@ -303,8 +310,6 @@ Page({ ...@@ -303,8 +310,6 @@ Page({
} }
for (let index = 0; index < notUpgradeOrderList.length; index++) { for (let index = 0; index < notUpgradeOrderList.length; index++) {
// const element = array[index];
// let
if (!notUpgradeOrderList[index].customerName) { if (!notUpgradeOrderList[index].customerName) {
return this.showToast(`请输入第${index + 1}位客户姓名`) return this.showToast(`请输入第${index + 1}位客户姓名`)
} }
...@@ -312,9 +317,9 @@ Page({ ...@@ -312,9 +317,9 @@ Page({
this.showToast(`请输入第${index + 1}位客户正确的手机号`) this.showToast(`请输入第${index + 1}位客户正确的手机号`)
return return
} }
if (isStandNo && !notUpgradeOrderList[index].standNo) { // if (isStandNo && !notUpgradeOrderList[index].standNo) {
return this.showToast(`请输入第${index + 1}位客户车架号`) // return this.showToast(`请输入第${index + 1}位客户车架号`)
} // }
} }
orderObj = { orderObj = {
...@@ -329,9 +334,10 @@ Page({ ...@@ -329,9 +334,10 @@ Page({
} }
this.showLoading('提交中...') this.showLoading('提交中...')
console.log('orderObj', orderObj)
// return // return
const apiName = type == 'success' ? 'createPrerecordedOrderBatch' : 'notUpgradeOrder' const apiName = type == 'success' ? 'createPrerecordedOrderBatch' : 'notUpgradeOrder'
// 选择车型会有数据干扰 删除参数
delete orderObj.customer
api[apiName](orderObj).then(res => { api[apiName](orderObj).then(res => {
wx.hideLoading() wx.hideLoading()
// console.log(orderObj, res) // console.log(orderObj, res)
...@@ -491,7 +497,7 @@ Page({ ...@@ -491,7 +497,7 @@ Page({
onRoute(res) { onRoute(res) {
console.log(res, 'onroute') console.log(res, 'onroute')
res && this.initOPtions(res) res && this.initOPtions(res)
this.getSetting() // this.getSetting()
}, },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
......
...@@ -113,8 +113,7 @@ ...@@ -113,8 +113,7 @@
data-ind='{{ind}}' data-ind='{{ind}}'
data-index='{{ind}}'> data-index='{{ind}}'>
<view <view
class="item content " class="item content"
catchtap="jump"
data-ind='{{ind}}' data-ind='{{ind}}'
data-index='{{ind}}' data-index='{{ind}}'
bindtouchstart="touchstart" bindtouchstart="touchstart"
...@@ -183,7 +182,7 @@ ...@@ -183,7 +182,7 @@
data-name="customerPhone" data-name="customerPhone"
always-embed></input> always-embed></input>
</gl-cell> </gl-cell>
<gl-cell <!-- <gl-cell
border border
required="{{isStandNo}}" required="{{isStandNo}}"
valueAlign="right" valueAlign="right"
...@@ -204,6 +203,23 @@ ...@@ -204,6 +203,23 @@
data-name="standNo" data-name="standNo"
maxlength="17" maxlength="17"
always-embed></input> always-embed></input>
</gl-cell> -->
<gl-cell
border
valueAlign="right"
label="选择车型"
labelWidth="140rpx"
haveArrow
placeholder="点击选择"
bindclick="showPopup"
data-show-name="carBrandBox"
data-index="{{ind}}"
>
<block wx:if="{{ li.carSeriesName }}">
<view class="between">
{{li.carBrand}}-{{li.carChildsBrandName}}-{{li.carSeriesName}}
</view>
</block>
</gl-cell> </gl-cell>
</view> </view>
<view <view
...@@ -256,6 +272,12 @@ ...@@ -256,6 +272,12 @@
userInfo="{{userInfo}}" userInfo="{{userInfo}}"
type="1" /> type="1" />
<merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2" /> <merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2" />
<car-brands
show="{{ carBrandBox }}"
bindconfirm="chooseCar"
carSeriesId="{{ orderObj.carSeriesId || '' }}"
merchantId="{{ orderObj.merchantId || undefined }}"
/>
<!-- <sub-shop-merchant <!-- <sub-shop-merchant
show="{{subShopMerchantBox}}" show="{{subShopMerchantBox}}"
title="选择二级流量方" title="选择二级流量方"
......
...@@ -168,7 +168,6 @@ Page({ ...@@ -168,7 +168,6 @@ Page({
} }
} }
}) })
console.log(arr)
if (arr[0]?.upgradeGoodsList?.length < 1 || arr?.length < 1) { if (arr[0]?.upgradeGoodsList?.length < 1 || arr?.length < 1) {
let errorText = ['', '前档', '侧后档', '天窗', '其它精品'] let errorText = ['', '前档', '侧后档', '天窗', '其它精品']
return this.showToast(selectPayType == 0 ? '门店无战败商品': `门店无配置${errorText[type]}商品`) return this.showToast(selectPayType == 0 ? '门店无战败商品': `门店无配置${errorText[type]}商品`)
...@@ -212,6 +211,10 @@ Page({ ...@@ -212,6 +211,10 @@ Page({
}) })
}, },
phoneBlur() {
this.selectComponent('#coupon')?.customerPhoneBlur && this.selectComponent('#coupon')?.customerPhoneBlur()
},
changeGender(e) { changeGender(e) {
let { let {
gender gender
...@@ -400,12 +403,10 @@ Page({ ...@@ -400,12 +403,10 @@ Page({
isAlreadyExistOrder isAlreadyExistOrder
} = this.data } = this.data
orderObj = wx.$util.deepClone(orderObj) orderObj = wx.$util.deepClone(orderObj)
console.log(orderObj)
// 如果是错单补录 禁用掉保存功能 或待跟进订单/预约订单 禁用建档 // 如果是错单补录 禁用掉保存功能 或待跟进订单/预约订单 禁用建档
if ((isErrorOrder && save) || (isAlreadyExistOrder && save)) return if ((isErrorOrder && save) || (isAlreadyExistOrder && save)) return
let key = this.checkRequired(save, orderObj) let key = this.checkRequired(save, orderObj)
console.log(key)
// debugger // debugger
if (key) { if (key) {
toastList[key] && this.showToast(toastList[key]) toastList[key] && this.showToast(toastList[key])
...@@ -520,6 +521,7 @@ Page({ ...@@ -520,6 +521,7 @@ Page({
checkGoods(save, subOrderList, priceDisabled, goodsList, orderObj) { checkGoods(save, subOrderList, priceDisabled, goodsList, orderObj) {
if (save) return false if (save) return false
// if (orderObj.selectPayType != 0) { // if (orderObj.selectPayType != 0) {
let filmArr = []
if (goodsList) { if (goodsList) {
goodsList.map(e => { goodsList.map(e => {
let obj = { let obj = {
...@@ -530,10 +532,12 @@ Page({ ...@@ -530,10 +532,12 @@ Page({
merchantGoodsId: e.id || e.merchantGoodsId merchantGoodsId: e.id || e.merchantGoodsId
} }
if (e.price < e.shopMinPrice && orderObj.selectPayType != 0) priceDisabled = false if (e.price < e.shopMinPrice && orderObj.selectPayType != 0) priceDisabled = false
if (e?.goodsInfo?.goodsType == 1 || e?.upgradeGoodsType == 1) filmArr.push(obj)
subOrderList.push(obj) subOrderList.push(obj)
}) })
orderObj.subOrderList = subOrderList orderObj.subOrderList = subOrderList
} }
if (!filmArr.length) return '车膜升级请选择太阳膜产品录单'
if (subOrderList.length == 0) { if (subOrderList.length == 0) {
return '商品不能为空' return '商品不能为空'
} }
...@@ -844,6 +848,12 @@ Page({ ...@@ -844,6 +848,12 @@ Page({
if ([5, 6, 7].includes(subVal.merchantGoodsPosition)) { if ([5, 6, 7].includes(subVal.merchantGoodsPosition)) {
skylightArr.push(subVal) skylightArr.push(subVal)
} }
if (subOrderList?.length) {
subOrderList.forEach(subV => {
// 历史子订单商品部位被更改 再次下单将部位更新
if (subVal.merchantGoodsPosition && subV.upgradeGoodsPosition && subVal.merchantGoodsPosition != subV.upgradeGoodsPosition && subVal.upgradeGoodsId == subV.upgradeGoodsId) subV.upgradeGoodsPosition = subVal.merchantGoodsPosition
})
}
}) })
}) })
...@@ -1043,10 +1053,6 @@ Page({ ...@@ -1043,10 +1053,6 @@ Page({
if (res.associateOrderCode) { if (res.associateOrderCode) {
tipsProps.showTips = true tipsProps.showTips = true
tipsProps.tipsText = '原订单录入信息有误,请重新提交正确的订单信息。' tipsProps.tipsText = '原订单录入信息有误,请重新提交正确的订单信息。'
} else if (res.orderCode || res.againOrder) {
// 以建档(预约列表)/待跟进工单不可建档
isAlreadyExistOrder = true
tipsProps.showTips = false
} }
this.setData({ this.setData({
tipsProps, tipsProps,
...@@ -1057,7 +1063,6 @@ Page({ ...@@ -1057,7 +1063,6 @@ Page({
res.returnFun = true res.returnFun = true
// 扫描核销进入新建工单 不可建档 // 扫描核销进入新建工单 不可建档
isAlreadyExistOrder = true isAlreadyExistOrder = true
tipsProps.showTips = false
// 修复 res 为...res 解决对象没有拓展的问题 // 修复 res 为...res 解决对象没有拓展的问题
this.setData({ this.setData({
...res, ...res,
......
...@@ -131,6 +131,7 @@ ...@@ -131,6 +131,7 @@
placeholder-class="placeholder-class" placeholder-class="placeholder-class"
value="{{ orderObj.customer.customerPhone }}" value="{{ orderObj.customer.customerPhone }}"
bindinput="input" bindinput="input"
bindblur="phoneBlur"
data-name="customer.customerPhone" data-name="customer.customerPhone"
disabled="{{ orderObj.orderSource == 5||orderObj.orderSource == 6 }}" disabled="{{ orderObj.orderSource == 5||orderObj.orderSource == 6 }}"
always-embed always-embed
...@@ -534,6 +535,7 @@ ...@@ -534,6 +535,7 @@
value="{{ orderObj.remark }}" value="{{ orderObj.remark }}"
/> />
<coupon <coupon
id="coupon"
show="{{ couponBox }}" show="{{ couponBox }}"
class="coupon" class="coupon"
bindconfirm="chooseCoupon" bindconfirm="chooseCoupon"
...@@ -542,7 +544,6 @@ ...@@ -542,7 +544,6 @@
yqMerchantId="{{ orderObj.sellerMerchantId }}" yqMerchantId="{{ orderObj.sellerMerchantId }}"
selectPayType="{{orderObj.selectPayType}}" selectPayType="{{orderObj.selectPayType}}"
returnFun="{{ returnFun }}" returnFun="{{ returnFun }}"
phoneShow="{{ !phoneShow }}"
/> />
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" isSolarFilm="{{true}}" /> <goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" isSolarFilm="{{true}}" />
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" /> <customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" />
......
...@@ -381,7 +381,7 @@ ...@@ -381,7 +381,7 @@
</view> </view>
</view> </view>
</block> </block>
<view class="addBtn" bindtap="addUserItem" id="addBtn" wx:if="{{notUpgradeOrderList.length <= 10}}"> <view class="addBtn" bindtap="addUserItem" id="addBtn" wx:if="{{notUpgradeOrderList.length < 10}}">
<image class="addIcon" src="../../images/addIcon.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" /> <image class="addIcon" src="../../images/addIcon.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" />
<text class="text">新增客户</text> <text class="text">新增客户</text>
</view> </view>
......
...@@ -166,6 +166,10 @@ Page({ ...@@ -166,6 +166,10 @@ Page({
}) })
}, },
phoneBlur() {
this.selectComponent('#coupon')?.customerPhoneBlur && this.selectComponent('#coupon')?.customerPhoneBlur()
},
changeGender(e) { changeGender(e) {
let { let {
gender gender
...@@ -701,10 +705,10 @@ Page({ ...@@ -701,10 +705,10 @@ Page({
subOrderList subOrderList
} = orderObj } = orderObj
const selectPayType = orderObj.selectPayType == 0 const selectPayType = orderObj.selectPayType == 0
const positionTypeList = await getPositionList() || [] // const positionTypeList = await getPositionList() || []
this.setData({ // this.setData({
positionTypeList // positionTypeList
}) // })
api api
.getOrderBaseGoodsList({ .getOrderBaseGoodsList({
merchantId, merchantId,
...@@ -724,9 +728,9 @@ Page({ ...@@ -724,9 +728,9 @@ Page({
}) })
let goodsData = data let goodsData = data
const filterList = goodsData.reduce((list, item) => { const filterList = goodsData.reduce((list, item) => {
item.upgradeGoodsList.forEach(val => { // item.upgradeGoodsList.forEach(val => {
val.positionStr = positionTypeList.filter(v => v.positionValue == val.merchantGoodsPosition)[0]?.positionName // val.positionStr = positionTypeList.filter(v => v.positionValue == val.merchantGoodsPosition)[0]?.positionName
}) // })
item.upgradeGoodsList && list.push(...item.upgradeGoodsList) item.upgradeGoodsList && list.push(...item.upgradeGoodsList)
return list return list
}, []) }, [])
...@@ -892,10 +896,6 @@ Page({ ...@@ -892,10 +896,6 @@ Page({
if (res.associateOrderCode) { if (res.associateOrderCode) {
tipsProps.showTips = true tipsProps.showTips = true
tipsProps.tipsText = '原订单录入信息有误,请重新提交正确的订单信息。' tipsProps.tipsText = '原订单录入信息有误,请重新提交正确的订单信息。'
} else if (res.orderCode || res.againOrder) {
// 以建档(预约列表)/待跟进工单不可建档
isAlreadyExistOrder = true
tipsProps.showTips = false
} }
this.setData({ this.setData({
tipsProps, tipsProps,
...@@ -906,7 +906,6 @@ Page({ ...@@ -906,7 +906,6 @@ Page({
res.returnFun = true res.returnFun = true
// 扫描核销进入新建工单 不可建档 // 扫描核销进入新建工单 不可建档
isAlreadyExistOrder = true isAlreadyExistOrder = true
tipsProps.showTips = false
// 修复 res 为...res 解决对象没有拓展的问题 // 修复 res 为...res 解决对象没有拓展的问题
this.setData({ this.setData({
...res, ...res,
......
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
placeholder-class="placeholder-class" placeholder-class="placeholder-class"
value="{{ orderObj.customer.customerPhone }}" value="{{ orderObj.customer.customerPhone }}"
bindinput="input" bindinput="input"
bindblur="phoneBlur"
data-name="customer.customerPhone" data-name="customer.customerPhone"
disabled="{{ orderObj.orderSource == 5||orderObj.orderSource == 6 }}" disabled="{{ orderObj.orderSource == 5||orderObj.orderSource == 6 }}"
always-embed always-embed
...@@ -344,6 +345,7 @@ ...@@ -344,6 +345,7 @@
value="{{ orderObj.remark }}" value="{{ orderObj.remark }}"
/> />
<coupon <coupon
id="coupon"
show="{{ couponBox }}" show="{{ couponBox }}"
class="coupon" class="coupon"
bindconfirm="chooseCoupon" bindconfirm="chooseCoupon"
...@@ -352,7 +354,6 @@ ...@@ -352,7 +354,6 @@
yqMerchantId="{{ orderObj.sellerMerchantId }}" yqMerchantId="{{ orderObj.sellerMerchantId }}"
selectPayType="{{orderObj.selectPayType}}" selectPayType="{{orderObj.selectPayType}}"
returnFun="{{ returnFun }}" returnFun="{{ returnFun }}"
phoneShow="{{ !phoneShow}}"
filmOrder="1" filmOrder="1"
/> />
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" /> <goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" />
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!