Commit 7d8ac596 by zhangxw

二级流量方字段

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