Commit b853cc6e by 李伟康

Merge branch 'V4.56.0' of http://192.168.3.233:8090/glsx/gl_tape into V4.56.0

2 parents b233d5b1 48cc5b4d
......@@ -115,6 +115,15 @@ module.exports = {
...data
})
},
// 权益提单相关接口
// 查询店铺配置
getShopMerchantPointConfig(data) {
return http.post({
method: 'dj.api.smartcarlife.shopMerchantPointConfig.get',
projectName: 'boutique',
...data
})
},
/** 根据订单状态统计订单数*/
statByStatus(data) {
return http.post({
......@@ -123,6 +132,14 @@ module.exports = {
...data
})
},
// 根据4s店商户好获取二级流浪方列表
getSubShopMerchantList(data) {
return http.post({
method: 'dj.api.smartcarlife.diversionMerchant.getDiversionMerchantRef',
projectName: 'boutique',
...data
})
},
/**搜索订单(含套餐) */
getWorkPackageGoodsList(data) {
return http.post({
......@@ -131,6 +148,22 @@ module.exports = {
...data
})
},
// 获取商户订单设置
getMerchantRecordingSettings(data) {
return http.post({
method: 'dj.api.smartcarlife.recordingSettings.getMerchantRecordingSettings',
projectName: 'boutique',
...data
})
},
// 获取园区店配置
getYqStoreConfig(data) {
return http.post({
method: 'dj.api.smarcarlife.yqMerchantConfig.detail',
projectName: 'boutique',
...data
})
},
/**补录订单 */
waitinputorder(data) {
return http.post({
......
......@@ -154,7 +154,7 @@
.icon-logo { width: calc(100vmin * (1173 / 768) * 0.06820119352088662); height: calc(100vmin * (1173 / 768) * 0.06820119352088662);
background-position: calc(100vmin * (1173 / 768) * -0.5647911338448423) calc(100vmin * (1173 / 768) * -0.10017050298380221);}
.icon-lssl-icon { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.08013640238704177) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
background-position: calc(100vmin * (1173 / 768) * -0.10017050298380221) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
.icon-mask-del { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331);
background-position: calc(100vmin * (1173 / 768) * -0.17902813299232737) calc(100vmin * (1173 / 768) * -0.5839727195225917);}
.icon-mask-edit { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331);
......@@ -254,7 +254,7 @@
.icon-role-2 { width: calc(100vmin * (1173 / 768) * 0.028985507246376812); height: calc(100vmin * (1173 / 768) * 0.028985507246376812);
background-position: calc(100vmin * (1173 / 768) * -0.4134697357203751) calc(100vmin * (1173 / 768) * -0.5839727195225917);}
.icon-rule { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.09846547314578005) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
background-position: calc(100vmin * (1173 / 768) * -0.1184995737425405) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
.icon-scan { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.5042625745950554) calc(100vmin * (1173 / 768) * -0.6312872975277067);}
.icon-scene-0 { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
......@@ -292,7 +292,7 @@
.icon-study-active { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * -0.41602728047740833) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
.icon-study-tips { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.11679454390451834) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
background-position: calc(100vmin * (1173 / 768) * -0.13682864450127877) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
.icon-study { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * -0.46675191815856776) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
.icon-submit { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
......@@ -306,7 +306,7 @@
.icon-tag-checked { width: calc(100vmin * (1173 / 768) * 0.02557544757033248); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.6547314578005116) calc(100vmin * (1173 / 768) * -0.46462063086104005);}
.icon-task-pass { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.13512361466325662) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
background-position: calc(100vmin * (1173 / 768) * -0.15515771526001704) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
.icon-tdcj-icon { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.43861892583120204) calc(100vmin * (1173 / 768) * -0.4079283887468031);}
.icon-time-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
......@@ -340,4 +340,6 @@
.icon-yw-icon { width: calc(100vmin * (1173 / 768) * 0.015345268542199489); height: calc(100vmin * (1173 / 768) * 0.015345268542199489);
background-position: calc(100vmin * (1173 / 768) * -0.021739130434782608) calc(100vmin * (1173 / 768) * -0.6312872975277067);}
.icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.06010230179028133) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
\ No newline at end of file
background-position: calc(100vmin * (1173 / 768) * -0.06010230179028133) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
.icon-blue-delete { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.08013640238704177) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
\ No newline at end of file

2.54 MB | W: | H:

2.54 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template>
<view>
<view v-for="(items, boxIdx) in formList" :key="boxIdx">
<view class="cell-box">
<view v-for="(item, idx) in items" :key="idx" class="cell" @click="onCellClick(item)" :class="[
item.noBorder ? '' : 'border',
item.onlyLabel ? 'small-height' : '',
item.class
]">
<view :class="['cell-label', { 'only-label': item.onlyLabel }]">
<view v-if="item.labellIcon" :class="['sprite-icon', `icon-${item.labellIcon}`]"></view>
{{ item.label }}
<view v-if="item.required" class="required">*</view>
</view>
<view class="cell-value">
<!-- 输入框 -->
<template v-if="item.type === 'input'">
<view class="input-box">
<input class="input-value" v-model="formData[item.value]" :placeholder="item.placeholder || '请输入'"
:maxlength="item.maxlength || 500" />
<view v-if="item.valueIcon" :class="['sprite-icon', `icon-${item.valueIcon}`]" @click="onValueClick(item)"></view>
</view>
</template>
<!-- 下拉选择 -->
<template v-else-if="item.type === 'select'">
<view v-if="formData[item.value] && formData[item.value][item.key]" class="value">
{{ formData[item.value][item.key] }}
<view v-for="(item, idx) in items" :key="idx" class="cell-row">
<view class="cell" @click="onCellClick(item)" :class="[
item.noBorder ? '' : 'border',
item.onlyLabel ? 'small-height' : '',
item.class
]">
<template v-if="!item.hidden">
<view :class="['cell-label', { 'only-label': item.onlyLabel }]">
<view v-if="item.labellIcon" :class="['sprite-icon', `icon-${item.labellIcon}`]"></view>
{{ item.label }}
<view v-if="item.required" class="required">*</view>
</view>
<view v-else class="placeholder value">
请选择
<view class="sprite-icon icon-icon-select"></view>
<view class="cell-value">
<!-- 输入框 -->
<template v-if="item.type === 'input'">
<view class="input-box">
<input class="input-value" v-model="formData[item.value]" :placeholder="item.placeholder || '请输入'"
:maxlength="item.maxlength || 500" />
<view v-if="item.valueIcon" :class="['sprite-icon', `icon-${item.valueIcon}`]"
@click="onValueClick(item)"></view>
</view>
</template>
<!-- 下拉选择 -->
<template v-else-if="item.type === 'select'">
<view class="value">
<template v-if="formData[item.value] && formData[item.value][item.key]">
<template v-if="item.showText && userInfo && userInfo[item.showText]">
{{ userInfo[item.showText] }}<text>|</text>
</template>
{{ formData[item.value][item.key] }}
</template>
<template v-else>
<span class="placeholder">请选择</span>
</template>
<view class="sprite-icon icon-icon-select"></view>
</view>
</template>
<!-- 单选框 -->
<template v-else-if="item.type === 'radio'">
<radio-group class="radio-group value" @change="onRadioChange($event, item)">
<label class="uni-list-cell uni-list-cell-pd" v-for="radio in item.radioList"
:key="radio.value + item.value">
<radio style="transform:scale(0.7)" :value="radio.value" :checked="radio.value == item.current" />
<view class="radio-name">{{ radio.name }}</view>
</label>
</radio-group>
</template>
<!-- 多行文本 -->
<template v-else-if="item.type === 'textarea'">
<textarea class="textarea" v-model="formData[item.value]" :placeholder="item.placeholder || '请输入'"
placeholder-class="textarea-placeholder" confirm-type="done" auto-height
:maxlength="item.maxlength"></textarea>
</template>
</view>
</template>
<!-- 单选框 -->
<template v-else-if="item.type === 'radio'">
<radio-group class="radio-group value" @change="onRadioChange($event, item)">
<label class="uni-list-cell uni-list-cell-pd" v-for="radio in item.radioList"
:key="radio.value + item.value">
<radio style="transform:scale(0.7)" :value="radio.value" :checked="radio.value == item.current" />
<view class="radio-name">{{ radio.name }}</view>
</label>
</radio-group>
</template>
<!-- 多行文本 -->
<template v-else-if="item.type === 'textarea'">
<textarea class="textarea" v-model="formData[item.value]" :placeholder="item.placeholder || '请输入'"
placeholder-class="textarea-placeholder" confirm-type="done" auto-height
:maxlength="item.maxlength"></textarea>
</template>
</view>
<slot v-if="item.addHtml" :name="item.addHtml"></slot>
</view>
</view>
</view>
......@@ -62,7 +72,7 @@ export default {
/**
* noBorder:默认false:有下边框,true:无下边框
* onlyLabel:判断是否只有label,默认false,主要是为了做样式区分
* class:cell-row:不一行显示,主要用于文本域
* class:cell-break:不一行显示,主要用于文本域
* required:是否为必填项,添加星号
* value: 绑定的字段名称
* key:如果绑定的字段名称为对象,则需要传入需要显示在页面上的属性名
......@@ -80,6 +90,14 @@ export default {
default: () => ({})
}
},
data() {
return {
userInfo: {}
}
},
mounted() {
this.userInfo = uni.$storage.get('userInfo') || {}
},
methods: {
onCellClick(item) {
if (item.type === 'select') {
......@@ -103,18 +121,20 @@ export default {
overflow: hidden;
margin-bottom: toRpx(18);
}
.cell-row {
padding-left: toRpx(32);
}
.cell {
display: flex;
align-items: center;
padding: 0 toRpx(32);
padding-right: toRpx(32);
height: toRpx(96);
&.small-height {
height: toRpx(72);
}
&.cell-row {
&.cell-break {
flex-direction: column;
align-items: normal;
height: auto;
......@@ -130,6 +150,7 @@ export default {
font-size: toRpx(28);
display: flex;
align-items: center;
.sprite-icon {
margin-right: toRpx(8);
}
......@@ -146,12 +167,12 @@ export default {
}
}
.cell-row .cell-label {
.cell-break .cell-label {
height: toRpx(96);
line-height: toRpx(96);
}
.cell-row .cell-value {
.cell-break .cell-value {
width: 100%;
margin-left: 0;
}
......@@ -178,15 +199,18 @@ export default {
align-items: center;
height: 100%;
}
.input-box {
display: flex;
align-items: center;
justify-content: flex-end;
height: 100%;
.sprite-icon {
margin-left: toRpx(8);
}
}
.input-value {
height: 100%;
text-align: right;
......@@ -212,7 +236,7 @@ export default {
display: inline-block;
}
.textarea {
width: 100%;
......
......@@ -124,6 +124,7 @@ export default {
uni.$storage.rm("noSignInUuid");
uni.$storage.rm("beisenToken");
uni.$storage.rm("studyCenterPermission");
uni.$storage.rm("boutique_YQorderSetting")
setTimeout(() => {
uni.hideLoading()
uni.reLaunch({
......
......@@ -4,319 +4,236 @@
<view class="box">
<scroll-view class="scroll-view" scroll-y="true">
<view class="box-content">
<GlCell :formList="formList" :formData="formData" @radioChange="radioChange" @handleValue="handleValue" @handleCell="handleCell"></GlCell>
<GlCell :formList="formList" :formData="orderObj" @radioChange="radioChange" @handleCell="handleCell">
<template slot="product">
<view class="shop-list">
<view class="shop-item">
<view class="sprite-icon icon-blue-delete"></view>
<view class="right">
<view class="shop-name">商品名称:小天窗-圣科隔热膜-前档膜-CGSS20最长商品名称名称有点长</view>
<view class="alias">商品别名:阿尔法 T5极狐非三电整车延保(新车2年6万公里)</view>
<view class="front-gear-box">
<view class="front-gear-input-box">
<view class="front-gear-label">前档玻璃</view>
<view class="front-gear-input">
<view class="unit">¥</view>
<input class="uni-input " type="digit" placeholder="请输入价格"
placeholder-style="font-size: 14px" />
</view>
</view>
<view class="control">
<view class="minus">-</view>
<input class="uni-input control-input" type="number" />
<view class="add">+</view>
</view>
</view>
</view>
</view>
</view>
</template>
<template slot="package">
<view class="package-list">
<view class="package-item">
<view class="header">
<view class="header-left">
<view class="sprite-icon icon-blue-delete"></view>
<view class="name">平步青云套餐</view>
</view>
<view class="price">¥6660.00</view>
</view>
<view class="goods-item">
<view class="goods-name">AITO汽车专享 M5中控屏钢化保护膜</view>
<view class="alias-name">商品别名:阿尔法 T5极狐非三电整车延保(新车2年6万公里)</view>
<view class="front-gear-box">
<view class="front-gear-input-box">
<view class="front-gear-label">前档玻璃</view>
<view class="front-gear-input">
<view class="unit">¥</view>
<input class="uni-input " type="digit" placeholder="请输入价格"
placeholder-style="font-size: 14px" />
</view>
</view>
<view class="control">
<view class="minus">-</view>
<input class="uni-input control-input" type="number" />
<view class="add">+</view>
</view>
</view>
</view>
<view class="goods-item">
<view class="goods-name">AITO汽车专享 M5中控屏钢化保护膜</view>
<view class="alias-name">商品别名:阿尔法 T5极狐非三电整车延保(新车2年6万公里)</view>
<view class="front-gear-box">
<view class="front-gear-input-box">
<view class="front-gear-label">前档玻璃</view>
<view class="front-gear-input">
<view class="unit">¥</view>
<input class="uni-input " type="digit" placeholder="请输入价格"
placeholder-style="font-size: 14px" />
</view>
</view>
<view class="control">
<view class="minus">-</view>
<input class="uni-input control-input" type="number" />
<view class="add">+</view>
</view>
</view>
</view>
</view>
</view>
</template>
<template slot="otherPay">
<view v-if="showPayTips" class="pay-tips">其他收款:当客户已向嘀加付款但无法使用流水补录时,新建工单应选择收款方为「嘀加收款」且支付方为「其他收款」。</view>
</template>
</GlCell>
</view>
<view @click="submit">直接下单</view>
</scroll-view>
</view>
<!-- 弹窗 -->
<order-popup ref="orderPopup" :data="popData" @onConfirm="onConfirm" :popupType="popupType" />
</view>
</template>
<script>
import OrderPopup from '@/components/OrderPopup/index.vue'
import GlCell from '../../../../components/Form/GlCell.vue';
import { FORM_LIST, popupTypeEnum } from '../contant'
export default {
name: 'CreateOrder',
components: {
GlCell
GlCell,
OrderPopup
},
data() {
return {
formData: {
carName: '',
phone: '',
user: '',
salesType: '1',
sexType: '1'
orderObj: {
userInfo: {},
deliveryUserInfo: {},
subShopMerchantInfo: {},
sellerUserInfo: {},
salesType: '0',
customerSex: '1',
experienceFlag: 'Y',
payeeType: 0,
selectPayType: '3',
carBrand: {}
},
formList: [
[
{
label: '销售顾问',
value: 'user',
type: 'select',
key: 'name',
required: true
},
{
label: '转化人员',
value: 'user',
type: 'select',
key: 'name',
required: true
},
],
[
{
label: '车主姓名1',
value: 'carName1',
maxlength: '10',
type: 'input',
required: true
},
{
label: '车主姓名1',
value: 'carName1',
maxlength: '10',
type: 'input',
required: true
},
{
label: '车架号',
value: 'carName1',
maxlength: '10',
type: 'input',
required: true,
valueIcon: 'icon-scanning'
},
{
label: '车牌号',
value: 'carName1',
maxlength: '10',
type: 'input',
valueIcon: 'icon-scanning'
},
{
label: '客户来源',
value: 'salesType',
type: 'radio',
current: '1',
radioList: [
{
value: '1',
name: '售前'
},
{
value: '2',
name: '售后'
}
]
},
{
label: '性别',
value: 'sexType',
type: 'radio',
current: '1',
radioList: [
{
value: '1',
name: '男'
},
{
value: '2',
name: '女'
}
]
},
{
label: '车主姓名1',
value: 'carName1',
maxlength: '10',
type: 'input',
required: true
},
{
label: '车主姓名1',
value: 'carName1',
maxlength: '10',
type: 'input',
required: true
},
],
[
{
label: '销售顾问',
value: 'user',
type: 'select',
key: 'name',
required: true
},
{
label: '请选择产品',
onlyLabel: true,
required: true,
noBorder: true
},
{
label: '前档',
value: 'user',
type: 'select',
key: 'name',
required: true,
labellIcon: 'front-gear'
},
{
label: '前侧窗玻璃',
value: 'user',
type: 'select',
key: 'name',
required: true,
labellIcon: 'front-window'
},
{
label: '销售顾问',
value: 'user',
type: 'select',
key: 'name',
required: true
},
{
label: '销售顾问',
value: 'user',
type: 'select',
key: 'name',
required: true
},
{
label: '销售顾问',
value: 'user',
type: 'select',
key: 'name',
required: true
},
],
[
{
label: '备注',
value: 'remark',
maxlength: '100',
type: 'textarea',
placeholder: '请输入 (100字以内)',
class: 'cell-row'
},
]
]
// fromList: [
// {
// label: '销售顾问',
// value: 'user',
// type: 'select',
// key: 'name',
// required: true
// },
// {
// label: '请选择产品',
// onlyLabel: true,
// required: true,
// noBorder: true
// },
// {
// label: '手机号',
// value: 'phone',
// maxlength: '11',
// type: 'input'
// },
// {
// label: '客户来源',
// value: 'salesType',
// type: 'radio',
// current: '1',
// radioList: [
// {
// value: '1',
// name: '售前'
// },
// {
// value: '2',
// name: '售后'
// }
// ]
// },
// {
// label: '性别',
// value: 'sexType',
// type: 'radio',
// current: '1',
// radioList: [
// {
// value: '1',
// name: '男'
// },
// {
// value: '2',
// name: '女'
// }
// ]
// },
// {
// label: '车牌号',
// value: 'carNumber',
// type: 'input',
// valueIcon: 'icon-scanning'
// },
// {
// label: '车主姓名1',
// value: 'carName1',
// maxlength: '10',
// type: 'input',
// required: true
// },
// {
// label: '车主姓名2',
// value: 'carName2',
// maxlength: '10',
// type: 'input',
// required: true
// },
// {
// label: '车主姓名3',
// value: 'carName3',
// maxlength: '10',
// type: 'input',
// required: true
// },
// {
// label: '车主姓名4',
// value: 'carName4',
// maxlength: '10',
// type: 'input',
// required: true
// },
// {
// label: '车主姓名5',
// value: 'carName5',
// maxlength: '10',
// type: 'input',
// required: true
// },
// {
// label: '车主姓名6',
// value: 'carName6',
// maxlength: '100',
// type: 'textarea',
// required: true,
// placeholder: '请输入 (100字以内)',
// class: 'cell-row'
// },
// ]
formList: FORM_LIST,
userInfo: {},
requiredList: [], // 录单设置的必填项
popData: {
customer: {}
},
popupType: 0,
popupTypeEnum,
}
},
computed: {
showPayTips() {
if (this.orderObj.payeeType == 0 && this.orderObj.selectPayType == 7) return true
else return false
}
},
mounted() {
console.log('mounted')
this.userInfo = uni.$storage.get('userInfo') || {}
this.initData()
},
methods: {
initData() {
const { userInfo } = this
this.getShopMerchantPointConfig(userInfo.shopMerchantId)
this.getSubShopMerchantList(userInfo.shopMerchantId)
this.getSetting()
// this.orderObj.userInfo = {
// id: 1,
// name: '测试'
// }
this.orderObj.sellerMerchant = {
sellerUserId: userInfo.uuid,
sellerName: userInfo.name
}
},
// 选择行事件
handleCell(val) {
console.log(val)
switch(val.value) {
case 'user':
setTimeout(() => {
this.formData.user ={
id: 1,
name: '波波的单店门店'
}
}, 1000)
break
default:
break
}
this.popupType = Object.keys(this.popupTypeEnum).find(key => this.popupTypeEnum[key] === val.value) * 1;
console.log(this.popupType)
this.$refs.orderPopup.open();
},
// 单选框change事件
radioChange(e, val) {
console.log(e, val)
this.formData[val.value] = e.detail.value
this.orderObj[val.value] = e.detail.value
},
handleValue(val) {
console.log(val)
uni.navigateTo({ url: '/pages/boutique/tool/ocr' })
onConfirm(val) {
console.log(val, 'onConfirm')
// 根据popupTypeEnum优化处理
const typeKey = this.popupTypeEnum[this.popupType];
if (typeKey) this.orderObj[typeKey] = val;
if (typeKey == 'carBrand') {
this.orderObj[typeKey].carInfo = `${val.carBrand}-${val.carChildsBrandName}-${val.carSeriesName}`
}
},
// 提交
submit() {
console.log(this.formData)
console.log(this.orderObj)
},
async getShopMerchantPointConfig(merchantId) {
const res = await uni.$api.boutiqueApi.getShopMerchantPointConfig({ merchantId })
if (res.pointsMultiRole == 'Y') {
// 找到formList中label为"交付专员"的对象,添加hidden: true
const deliveryCell = this.formList[0].find(item => item.label === '交付专员');
if (deliveryCell) {
deliveryCell.hidden = false;
}
}
},
// 判断二级流量方
async getSubShopMerchantList(merchantId) {
const res = await uni.$api.boutiqueApi.getSubShopMerchantList({ merchantId })
console.log(res, '流量方')
if (res && res.length) {
const cell = this.formList[0].find(item => item.label === '二级流量方');
if (cell) {
cell.hidden = false;
}
}
},
// 动态获取 车型 车架 车牌 是否必填
getYQorderInfo() {
return new Promise(async (resolve, reject) => {
const YQorderSetting = uni.$storage.get('boutique_YQorderSetting')
if (YQorderSetting) return resolve(YQorderSetting)
else {
const { userInfo } = this
let { merchantId, merchantName } = userInfo.subLoginUser
const res = await uni.$api.boutiqueApi.getMerchantRecordingSettings({ merchantId, merchantName })
console.log(res)
if (res) {
uni.$storage.set('boutique_YQorderSetting', res)
resolve(res)
}
}
})
},
// 获取车型、车架号、车牌号必填规则
async getSetting() {
const res = await this.getYQorderInfo()
console.log(res, '========')
const dictionaryObj = {
carTypeRequiredFlag: "carBrand",
standNoRequiredFlag: "standNo",
plateNumRequiredFlag: "plateNumber",
}
for (const key in dictionaryObj) {
const cell = this.formList[1].find(item => item.value === dictionaryObj[key]);
if (cell) cell.required = (res[key] == 'Y')
}
},
async getConfig() {
}
}
}
......@@ -326,13 +243,180 @@ export default {
.order {
height: 100%;
}
.box {
height: calc(100% - #{toRpx(120)});
.scroll-view {
height: 100%;
}
}
.box-content {
padding: 0 toRpx(48);
}
.shop-list {
padding: toRpx(12) toRpx(32) toRpx(12) 0;
.shop-item {
display: flex;
align-items: center;
background-color: #F5F7FA;
border-radius: toRpx(16);
margin-bottom: toRpx(16);
padding: toRpx(24);
.right {
flex: 1;
font-size: toRpx(28);
margin-left: toRpx(24);
.shop-name {
color: #FF781F;
}
.alias {
margin-top: toRpx(12);
font-size: toRpx(24);
color: #666;
}
}
}
}
.front-gear-box {
display: flex;
justify-content: space-between;
margin-top: toRpx(24);
.front-gear-input-box {
display: flex;
align-items: center;
.front-gear-label {
font-size: toRpx(24);
margin-right: toRpx(24);
color: #999999;
}
.front-gear-input {
position: relative;
display: flex;
border: toRpx(2) solid #EFF0F2;
background-color: #fff;
font-size: toRpx(28);
height: toRpx(70);
width: toRpx(250);
line-height: toRpx(70);
text-align: right;
.uni-input {
padding: 0 toRpx(32);
height: 100%;
}
.unit {
position: absolute;
top: 50%;
left: toRpx(32);
transform: translateY(-50%);
}
}
}
.control {
display: flex;
align-items: center;
.control-input {
width: toRpx(94);
height: toRpx(74);
background-color: #fff;
border: toRpx(2) solid #EFF0F2;
padding: 0 toRpx(10);
text-align: center;
}
.minus,
.add {
width: toRpx(80);
height: toRpx(74);
line-height: toRpx(70);
text-align: center;
background-color: #fff;
border-top: toRpx(2) solid #EFF0F2;
border-bottom: toRpx(2) solid #EFF0F2;
}
.minus {
border-radius: toRpx(12) 0 0 toRpx(12);
border-left: toRpx(2) solid #EFF0F2;
}
.add {
border-radius: 0 toRpx(12) toRpx(12) 0;
border-right: toRpx(2) solid #EFF0F2;
}
}
}
.package-list {
padding: toRpx(12) toRpx(32) toRpx(12) 0;
.package-item {
background-color: #F5F7FA;
border-radius: toRpx(16);
margin-bottom: toRpx(16);
.header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: toRpx(1.6) solid #dce1e6;
padding: toRpx(24);
&-left {
display: flex;
align-items: center;
font-size: toRpx(28);
.name {
margin-left: toRpx(26);
color: #999;
}
.price {
color: #666;
}
}
}
.goods-item {
padding: toRpx(24);
border-bottom: toRpx(1.6) solid #dce1e6;
&:last-child {
border-bottom: none;
}
.goods-name {
color: #FF781F;
font-size: toRpx(28);
}
.alias-name {
margin-top: toRpx(12);
font-size: toRpx(24);
color: #666;
}
}
}
}
.pay-tips {
padding: toRpx(24) toRpx(24) toRpx(24) 0;
font-size: toRpx(24);
color: #999;
}
</style>
\ No newline at end of file
const FORM_LIST = [
[
{
label: '销售顾问',
value: 'userInfo',
type: 'select',
key: 'staffName',
required: true,
showText: 'shopMerchantName'
},
{
label: '交付专员',
value: 'deliveryUserInfo',
type: 'select',
required: true,
key: 'staffName',
hidden: true,
showText: 'shopMerchantName'
},
{
label: '二级流量方',
value: 'subShopMerchantInfo',
type: 'select',
required: true,
key: 'subMerchantName',
hidden: true
},
{
label: '转化人员',
value: 'sellerUserInfo',
type: 'select',
key: 'staffName',
required: true,
showText: 'merchantName'
},
],
[
{
label: '车主姓名',
value: 'customer',
maxlength: '16',
type: 'input',
required: true
},
{
label: '客户来源',
value: 'salesType',
type: 'radio',
current: '0',
radioList: [
{
value: '0',
name: '售前'
},
{
value: '1',
name: '售后'
}
],
required: true
},
{
label: '性别',
value: 'customerSex',
type: 'radio',
current: '1',
radioList: [
{
value: '1',
name: '男'
},
{
value: '2',
name: '女'
}
]
},
{
label: '手机号',
value: 'customerPhone',
maxlength: '11',
type: 'input',
required: true
},
{
label: '选择车型',
value: 'carBrand',
type: 'select',
key: 'carInfo',
},
{
label: '车架号',
value: 'standNo',
maxlength: '17',
type: 'input'
},
{
label: '车牌号',
value: 'plateNumber',
maxlength: '8',
type: 'input'
},
{
label: '是否体验',
value: 'experienceFlag',
type: 'radio',
current: 'Y',
radioList: [
{
value: 'Y',
name: '是'
},
{
value: 'N',
name: '否'
}
]
},
],
[
{
label: '精品礼券',
value: 'couponInfo',
type: 'select',
key: 'name',
required: true
},
{
label: '请选择产品',
onlyLabel: true,
required: true,
noBorder: true
},
{
label: '前档',
value: 'user',
type: 'select',
key: 'name',
labellIcon: 'front-gear',
addHtml: 'product'
},
{
label: '前侧窗玻璃',
value: 'user',
type: 'select',
key: 'name',
labellIcon: 'front-window',
addHtml: 'product'
},
{
label: '后侧窗玻璃',
value: 'user',
type: 'select',
key: 'name',
labellIcon: 'rear-gear',
addHtml: 'product'
},
{
label: '后档',
value: 'user',
type: 'select',
key: 'name',
labellIcon: 'rear-window',
addHtml: 'product'
},
{
label: '天窗',
value: 'user',
type: 'select',
key: 'name',
labellIcon: 'sun-roof',
addHtml: 'product'
},
{
label: '套餐',
value: 'couponInfo',
type: 'select',
key: 'name',
required: true,
addHtml: 'package'
},
{
label: '精品礼券',
value: 'couponInfo',
type: 'select',
key: 'name',
required: true,
addHtml: 'product'
},
{
label: '收款方式',
value: 'payeeType',
type: 'radio',
key: 'name',
current: '0',
radioList: [
{
value: '0',
name: '嘀加收款'
},
{
value: '1',
name: '4s店收款'
}
],
},
{
label: '支付方式',
value: 'selectPayType',
type: 'radio',
key: 'name',
current: '0',
radioList: [
{
value: '3',
name: 'POS机'
},
{
value: '6',
name: '对公转账'
},
{
value: '7',
name: '其他收款'
}
],
addHtml: 'otherPay'
},
],
[
{
label: '备注',
value: 'remark',
maxlength: '100',
type: 'textarea',
placeholder: '请输入 (100字以内)',
class: 'cell-break'
},
]
]
const payType = [
{
value: '1',
name: '微信支付'
},
{
value: '2',
name: '线下收款'
},
{
value: '3',
name: 'POS机'
},
{
value: '4',
name: '支付宝支付'
},
{
value: '5',
name: '嘀加收款'
},
{
value: '6',
name: '对公转账'
},
{
value: '7',
name: '其他收款'
}
]
const popupTypeEnum = {
0: 'userInfo',
1: 'deliveryUserInfo',
2: 'subShopMerchantInfo',
3: 'sellerUserInfo',
4: 'carBrand'
}
export {
FORM_LIST,
popupTypeEnum,
payType
}
\ No newline at end of file
......@@ -40,8 +40,8 @@ export const STORAGE_OBJECTKEY = {
leadPage: 'leadPage',
recordTrackList: 'recordTrackList',
beisenToken: 'beisenToken',
messagePopShownDate: 'messagePopShownDate',
noticeTopInfo: 'noticeTopInfo',
studyCenterPermission: 'studyCenterPermission',
caseInfo: 'caseInfo',
boutique_YQorderSetting: 'boutique_YQorderSetting'
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!