Commit 7d8ac596 by zhangxw

二级流量方字段

1 parent 45f5e37f
...@@ -6,7 +6,7 @@ import NP from 'number-precision' ...@@ -6,7 +6,7 @@ import NP from 'number-precision'
const app = getApp() const app = getApp()
let toastList = { let toastList = {
userId: '销售顾问不能为空', userId: '销售顾问不能为空',
// subShopMerchantId: '二级流量方不能为空', subShopMerchantId: '二级流量方不能为空',
customerName: '车主姓名不能为空', customerName: '车主姓名不能为空',
customerPhone: '手机号不能为空', customerPhone: '手机号不能为空',
sellerUserId: '转化人员不能为空', sellerUserId: '转化人员不能为空',
......
...@@ -28,6 +28,24 @@ ...@@ -28,6 +28,24 @@
</block> </block>
</gl-cell> </gl-cell>
</view> </view>
<view class="subShopMerchantId" wx:if="{{isShowSubShopMerchant}}">
<gl-cell
border
valueAlign="right"
label="二级流量方"
requiredAfter
labelWidth="180rpx"
required
haveArrow
bindclick="showPopup"
data-show-name="subShopMerchantBox"
placeholder="点击选择"
disabled="{{orderObj.orderSource == 5}}">
<block wx:if="{{orderObj.subShopMerchantName}}">
<view class="between">{{orderObj.subShopMerchantName}}</view>
</block>
</gl-cell>
</view>
<view class="sellerUserId"> <view class="sellerUserId">
<gl-cell <gl-cell
border border
...@@ -53,24 +71,6 @@ ...@@ -53,24 +71,6 @@
</view> </view>
</view> </view>
<view class="box"> <view class="box">
<!-- <view class="subShopMerchantId" wx:if="{{isShowSubShopMerchant}}">
<gl-cell
border
valueAlign="right"
label="二级流量方"
requiredAfter
labelWidth="180rpx"
required
haveArrow
bindclick="showPopup"
data-show-name="subShopMerchantBox"
placeholder="点击选择"
disabled="{{orderObj.orderSource == 5}}">
<block wx:if="{{orderObj.subShopMerchantName}}">
<view class="between">{{orderObj.subShopMerchantName}}</view>
</block>
</gl-cell>
</view> -->
<view class="customerName"> <view class="customerName">
<gl-cell <gl-cell
border border
...@@ -503,12 +503,12 @@ ...@@ -503,12 +503,12 @@
userInfo="{{userInfo}}" userInfo="{{userInfo}}"
type="1" type="1"
oderType="recorder" /> oderType="recorder" />
<!-- <sub-shop-merchant <sub-shop-merchant
show="{{subShopMerchantBox}}" show="{{subShopMerchantBox}}"
title="选择二级流量方" title="选择二级流量方"
selectedSelesMerchantId="{{orderObj.merchantId}}" selectedSelesMerchantId="{{orderObj.merchantId}}"
selectedCustomerInfo="{{orderObj.customer.customerId}}" selectedCustomerInfo="{{orderObj.customer.customerId}}"
selectedSubShopMerchantId="{{orderObj.subShopMerchantId}}" /> --> selectedSubShopMerchantId="{{orderObj.subShopMerchantId}}" />
<car-brands <car-brands
show="{{carBrandBox}}" show="{{carBrandBox}}"
bindconfirm="chooseCar" bindconfirm="chooseCar"
......
...@@ -291,18 +291,18 @@ Page({ ...@@ -291,18 +291,18 @@ Page({
warrantyCardList warrantyCardList
}) })
// 校验是否显示二级流量方 // 校验是否显示二级流量方
// if (data.subShopMerchantName) { if (data.subShopMerchantName) {
// let { customerObj } = this.data let { customerObj } = this.data
// if(customerObj.findIndex(val =>val?.key && val.key == 'subShopMerchantName') < 0) { if(customerObj.findIndex(val =>val?.key && val.key == 'subShopMerchantName') < 0) {
// customerObj[customerObj.length - 2] = { customerObj[customerObj.length - 2] = {
// label: '二级流量方:', label: '二级流量方',
// key: 'subShopMerchantName' key: 'subShopMerchantName'
// } }
// } }
// this.setData({ this.setData({
// customerObj customerObj
// }) })
// } }
// // 有配置技师 // // 有配置技师
// if (data?.technicianConfigDTOList?.length > 0) { // if (data?.technicianConfigDTOList?.length > 0) {
// this.isArtificer(data) // this.isArtificer(data)
......
...@@ -270,18 +270,18 @@ Page({ ...@@ -270,18 +270,18 @@ Page({
this.getServiceBaseInfo(data.merchantId) this.getServiceBaseInfo(data.merchantId)
// if (data.status == 6) return // if (data.status == 6) return
// 校验是否显示二级流量方 // 校验是否显示二级流量方
// if (data.subShopMerchantName) { if (data.subShopMerchantName) {
// let { customerObj } = this.data let { customerObj } = this.data
// if (customerObj.findIndex(val =>val?.key && val.key == 'subShopMerchantName') < 0) { if (customerObj.findIndex(val =>val?.key && val.key == 'subShopMerchantName') < 0) {
// customerObj[customerObj.length - 2] = { customerObj[customerObj.length - 2] = {
// label: '二级流量方:', label: '二级流量方',
// key: 'subShopMerchantName' key: 'subShopMerchantName'
// } }
// } }
// this.setData({ this.setData({
// customerObj customerObj
// }) })
// } }
// 门店是否配置技师 // 门店是否配置技师
// if (data?.technicianConfigDTOList?.length > 0) { // if (data?.technicianConfigDTOList?.length > 0) {
// this.isArtificer(data) // this.isArtificer(data)
......
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
</block> </block>
<block wx:if="{{orderInfo.selectPayType == 0}}"> <block wx:if="{{orderInfo.selectPayType == 0}}">
<view class="cell"> <view class="cell">
<view class="label">拒升理由:</view> <view class="label">拒升理由</view>
<view class="value"> <view class="value">
{{orderInfo.customer.refusalReason?orderInfo.customer.refusalReason:""}} {{orderInfo.customer.refusalReason?orderInfo.customer.refusalReason:""}}
</view> </view>
......
...@@ -6,7 +6,7 @@ import { getYQorderInfo } from '~/store/index' ...@@ -6,7 +6,7 @@ import { getYQorderInfo } from '~/store/index'
const app = getApp() const app = getApp()
let toastList = { let toastList = {
employeeName: '销售顾问不能为空', employeeName: '销售顾问不能为空',
// subShopMerchantId: '二级流量方不能为空', subShopMerchantId: '二级流量方不能为空',
customerName: '车主姓名不能为空', customerName: '车主姓名不能为空',
customerPhone: '手机号不能为空', customerPhone: '手机号不能为空',
sellerUserId: '转化人员不能为空', sellerUserId: '转化人员不能为空',
......
...@@ -58,7 +58,8 @@ ...@@ -58,7 +58,8 @@
</view> </view>
</block> </block>
</gl-cell> </gl-cell>
<!-- <view class="subShopMerchantId" wx:if="{{isShowSubShopMerchant}}"> </view>
<view class="subShopMerchantId" wx:if="{{isShowSubShopMerchant}}">
<gl-cell <gl-cell
border border
valueAlign="right" valueAlign="right"
...@@ -75,8 +76,7 @@ ...@@ -75,8 +76,7 @@
<view class="between">{{orderObj.subShopMerchantName}}</view> <view class="between">{{orderObj.subShopMerchantName}}</view>
</block> </block>
</gl-cell> </gl-cell>
</view> --> </view>
</view>
<view class="sellerUserId"> <view class="sellerUserId">
<gl-cell <gl-cell
border border
...@@ -278,9 +278,9 @@ ...@@ -278,9 +278,9 @@
carSeriesId="{{ orderObj.carSeriesId || '' }}" carSeriesId="{{ orderObj.carSeriesId || '' }}"
merchantId="{{ orderObj.merchantId || undefined }}" merchantId="{{ orderObj.merchantId || undefined }}"
/> />
<!-- <sub-shop-merchant <sub-shop-merchant
show="{{subShopMerchantBox}}" show="{{subShopMerchantBox}}"
title="选择二级流量方" title="选择二级流量方"
selectedSelesMerchantId="{{orderObj.merchantId}}" selectedSelesMerchantId="{{orderObj.merchantId}}"
selectedSubShopMerchantId="{{orderObj.subShopMerchantId}}" /> --> selectedSubShopMerchantId="{{orderObj.subShopMerchantId}}" />
...@@ -8,7 +8,7 @@ import { ...@@ -8,7 +8,7 @@ import {
const app = getApp() const app = getApp()
let toastList = { let toastList = {
userId: '销售顾问不能为空', userId: '销售顾问不能为空',
// subShopMerchantId: '二级流量方不能为空', subShopMerchantId: '二级流量方不能为空',
customerName: '车主姓名不能为空', customerName: '车主姓名不能为空',
customerPhone: '手机号不能为空', customerPhone: '手机号不能为空',
sellerUserId: '转化人员不能为空', sellerUserId: '转化人员不能为空',
...@@ -79,6 +79,7 @@ Page({ ...@@ -79,6 +79,7 @@ Page({
positionTypeList: [], positionTypeList: [],
currentWordNumber: 0, // 订单备注字数 currentWordNumber: 0, // 订单备注字数
copyGoodsData: [], copyGoodsData: [],
isShowSubShopMerchant: false,
frontGearArr: [], // 前档 frontGearArr: [], // 前档
sideRearGearArr: [], // 侧后档 sideRearGearArr: [], // 侧后档
skylightArr: [] // 天窗 skylightArr: [] // 天窗
...@@ -473,7 +474,7 @@ Page({ ...@@ -473,7 +474,7 @@ Page({
// } // }
// } // }
this.showLoading('提交中...') this.showLoading('提交中...')
let apiName = save && !isErrorOrder ? 'createPrerecordedOrder' : isErrorOrder ? 'correctionOrder' : 'createWithPay' let apiName = save && !isErrorOrder ? 'createPrerecordedOrder' : isErrorOrder ? 'correctionOrder' : 'createWithPay'
// 太阳膜下单入口 // 太阳膜下单入口
submitObj.filmOrder = 0 submitObj.filmOrder = 0
......
...@@ -27,6 +27,24 @@ ...@@ -27,6 +27,24 @@
</block> </block>
</gl-cell> </gl-cell>
</view> </view>
<view class="subShopMerchantId" wx:if="{{ isShowSubShopMerchant }}">
<gl-cell
border
valueAlign="right"
label="二级流量方"
requiredAfter
labelWidth="180rpx"
required
haveArrow
bindclick="showPopup"
data-show-name="subShopMerchantBox"
placeholder="点击选择"
>
<block wx:if="{{ orderObj.subShopMerchantName }}">
<view class="between">{{orderObj.subShopMerchantName}}</view>
</block>
</gl-cell>
</view>
<view class="sellerUserId"> <view class="sellerUserId">
<gl-cell <gl-cell
border border
...@@ -72,24 +90,7 @@ ...@@ -72,24 +90,7 @@
</view> </view>
</gl-cell> --> </gl-cell> -->
<!-- <view class="subShopMerchantId" wx:if="{{ isShowSubShopMerchant }}">
<gl-cell
border
valueAlign="right"
label="二级流量方"
requiredAfter
labelWidth="180rpx"
required
haveArrow
bindclick="showPopup"
data-show-name="subShopMerchantBox"
placeholder="点击选择"
>
<block wx:if="{{ orderObj.subShopMerchantName }}">
<view class="between">{{orderObj.subShopMerchantName}}</view>
</block>
</gl-cell>
</view> -->
<view class="customerName"> <view class="customerName">
<gl-cell <gl-cell
border border
...@@ -513,13 +514,13 @@ ...@@ -513,13 +514,13 @@
</block> </block>
<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" />
<merchant-seles show="{{ selesBox }}" title="选择合作门店" orderObj="{{ orderObj }}" sub-title="选择销售顾问" userInfo="{{ userInfo }}" singleSeller="{{true}}" type="1" /> <merchant-seles show="{{ selesBox }}" title="选择合作门店" orderObj="{{ orderObj }}" sub-title="选择销售顾问" userInfo="{{ userInfo }}" singleSeller="{{true}}" type="1" />
<!-- <sub-shop-merchant <sub-shop-merchant
show="{{ subShopMerchantBox }}" show="{{ subShopMerchantBox }}"
title="选择二级流量方" title="选择二级流量方"
selectedSelesMerchantId="{{ orderObj.merchantId }}" selectedSelesMerchantId="{{ orderObj.merchantId }}"
selectedCustomerInfo="{{ orderObj.customer.customerId }}" selectedCustomerInfo="{{ orderObj.customer.customerId }}"
selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}" selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}"
/> --> />
<car-brands <car-brands
show="{{ carBrandBox }}" show="{{ carBrandBox }}"
bindconfirm="chooseCar" bindconfirm="chooseCar"
......
...@@ -5,6 +5,11 @@ import { ...@@ -5,6 +5,11 @@ import {
getPositionList getPositionList
} from '~/store/index' } from '~/store/index'
const phoneRex = /^[1]([3-9])[0-9]{9}$/ const phoneRex = /^[1]([3-9])[0-9]{9}$/
let toastList = {
employeeName: '销售顾问不能为空',
subShopMerchantId: '二级流量方不能为空',
sellerUserId: '转化人员不能为空'
}
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -438,7 +443,15 @@ Page({ ...@@ -438,7 +443,15 @@ Page({
submit(i) { submit(i) {
this.checkPhoneUseConfig() this.checkPhoneUseConfig()
let { orderObj, notUpgradeOrderList, dateObj, isStandNo, isCarBrand, isPlateNumber } = this.data let { orderObj, notUpgradeOrderList, dateObj, isStandNo, isCarBrand, isPlateNumber } = this.data
let key = this.checkRequired(orderObj)
// debugger
if (key) {
this.showToast(toastList[key])
wx.pageScrollTo({
selector: `.${key}`
})
return
}
for (let index = 0; index < notUpgradeOrderList.length; index++) { for (let index = 0; index < notUpgradeOrderList.length; index++) {
if (!notUpgradeOrderList[index].customer.customerName) { if (!notUpgradeOrderList[index].customer.customerName) {
return this.showToast(`请输入第${index + 1}位客户姓名`) return this.showToast(`请输入第${index + 1}位客户姓名`)
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"car-brands": "/components/CarBrands/CarBrands", "car-brands": "/components/CarBrands/CarBrands",
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles", "merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
"goods": "/components/Goods/Goods", "goods": "/components/Goods/Goods",
"customerInfo": "/components/CustomerInfo/CustomerInfo" "customerInfo": "/components/CustomerInfo/CustomerInfo",
"sub-shop-merchant" : "/components/subShopMerchant/subShopMerchant"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -53,6 +53,24 @@ ...@@ -53,6 +53,24 @@
</block> </block>
</gl-cell> </gl-cell>
</view> </view>
<view class="subShopMerchantId" wx:if="{{ isShowSubShopMerchant }}">
<gl-cell
border
valueAlign="right"
label="二级流量方"
requiredAfter
labelWidth="180rpx"
required
haveArrow
bindclick="showPopup"
data-show-name="subShopMerchantBox"
placeholder="点击选择"
>
<block wx:if="{{ orderObj.subShopMerchantName }}">
<view class="between">{{orderObj.subShopMerchantName}}</view>
</block>
</gl-cell>
</view>
<view class="sellerUserId"> <view class="sellerUserId">
<gl-cell <gl-cell
border border
...@@ -412,4 +430,11 @@ ...@@ -412,4 +430,11 @@
<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" />
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ notUpgradeOrderList[selectCustomIndex].subOrderList || [] }}" isSolarFilm="{{true}}"/> <goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ notUpgradeOrderList[selectCustomIndex].subOrderList || [] }}" isSolarFilm="{{true}}"/>
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" /> <customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" />
<sub-shop-merchant
show="{{ subShopMerchantBox }}"
title="选择二级流量方"
selectedSelesMerchantId="{{ orderObj.merchantId }}"
selectedCustomerInfo="{{ orderObj.customer.customerId }}"
selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}"
/>
...@@ -188,18 +188,18 @@ Page({ ...@@ -188,18 +188,18 @@ Page({
this.getServiceBaseInfo(data.merchantId) this.getServiceBaseInfo(data.merchantId)
this.getSignatureSwitch(data.merchantId) this.getSignatureSwitch(data.merchantId)
// 校验是否显示二级流量方 // 校验是否显示二级流量方
// if (data.subShopMerchantName) { if (data.subShopMerchantName) {
// let { customerObj } = this.data let { customerObj } = this.data
// if (customerObj.findIndex(val => val?.key &&val.key == 'subShopMerchantName') < 0) { if (customerObj.findIndex(val => val?.key &&val.key == 'subShopMerchantName') < 0) {
// customerObj[customerObj.length - 2] = { customerObj[customerObj.length - 2] = {
// label: '二级流量方:', label: '二级流量方',
// key: 'subShopMerchantName' key: 'subShopMerchantName'
// } }
// } }
// this.setData({ this.setData({
// customerObj customerObj
// }) })
// } }
// // 门店是否配置技师 // // 门店是否配置技师
// if (data?.technicianConfigDTOList?.length > 0) { // if (data?.technicianConfigDTOList?.length > 0) {
// this.isArtificer(data) // this.isArtificer(data)
......
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
</block> </block>
<block wx:if="{{orderInfo.selectPayType == 0}}"> <block wx:if="{{orderInfo.selectPayType == 0}}">
<view class="cell"> <view class="cell">
<view class="label">拒升理由:</view> <view class="label">拒升理由</view>
<view class="value"> <view class="value">
{{orderInfo.customer.refusalReason?orderInfo.customer.refusalReason:""}} {{orderInfo.customer.refusalReason?orderInfo.customer.refusalReason:""}}
</view> </view>
......
...@@ -168,7 +168,7 @@ page { ...@@ -168,7 +168,7 @@ page {
.box .cell .label { .box .cell .label {
flex-shrink: 0; flex-shrink: 0;
width: 152rpx; width: 160rpx;
} }
.box .cell .label.icon{ .box .cell .label.icon{
......
...@@ -224,18 +224,18 @@ Page({ ...@@ -224,18 +224,18 @@ Page({
// warrantyCardList.length && this.getBarCode() // warrantyCardList.length && this.getBarCode()
// this.getServiceBaseInfo(data.merchantId) // this.getServiceBaseInfo(data.merchantId)
// 校验是否显示二级流量方 // 校验是否显示二级流量方
// if (data.subShopMerchantName) { if (data.subShopMerchantName) {
// let { customerObj } = this.data let { customerObj } = this.data
// if (customerObj.findIndex(val => val.key == 'subShopMerchantName') < 0) { if (customerObj.findIndex(val => val.key == 'subShopMerchantName') < 0) {
// customerObj[customerObj.length - 2] = { customerObj[customerObj.length - 2] = {
// label: '二级流量方:', label: '二级流量方',
// key: 'subShopMerchantName' key: 'subShopMerchantName'
// } }
// } }
// this.setData({ this.setData({
// customerObj customerObj
// }) })
// } }
// 门店是否配置技师 // 门店是否配置技师
// if (data?.technicianConfigDTOList?.length > 0) { // if (data?.technicianConfigDTOList?.length > 0) {
// this.isArtificer(data) // this.isArtificer(data)
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"merchant-seles": "/components/Merchant-Seles/Merchant-Seles", "merchant-seles": "/components/Merchant-Seles/Merchant-Seles",
"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"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -28,6 +28,24 @@ ...@@ -28,6 +28,24 @@
</block> </block>
</gl-cell> </gl-cell>
</view> </view>
<view class="subShopMerchantId" wx:if="{{isShowSubShopMerchant}}">
<gl-cell
border
valueAlign="right"
label="二级流量方"
requiredAfter
labelWidth="180rpx"
required
haveArrow
bindclick="showPopup"
data-show-name="subShopMerchantBox"
placeholder="点击选择"
disabled="{{orderObj.orderSource == 5}}">
<block wx:if="{{orderObj.subShopMerchantName}}">
<view class="between">{{orderObj.subShopMerchantName}}</view>
</block>
</gl-cell>
</view>
<view class="sellerUserId"> <view class="sellerUserId">
<gl-cell <gl-cell
border border
...@@ -358,3 +376,10 @@ ...@@ -358,3 +376,10 @@
/> />
<goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" /> <goods show="{{ goodsBox }}" bindconfirm="chooseGoods" goodsData="{{ goodsData }}" chooseGoodsList="{{ goodsList }}" />
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" /> <customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" />
<sub-shop-merchant
show="{{ subShopMerchantBox }}"
title="选择二级流量方"
selectedSelesMerchantId="{{ orderObj.merchantId }}"
selectedCustomerInfo="{{ orderObj.customer.customerId }}"
selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}"
/>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!