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