Commit 8cba28ac by liaoym

Merge branch 'SAAS+V5.5.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.5.0

# Conflicts:
#	assets/css/sprite.scss
#	assets/images/sprite.png
2 parents 6c3448e0 03ad8f71
import http from '../request/http'
module.exports = {
/** 报价单分页列表 */
quotationPage(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page',
projectName: 'boutique',
...data
})
},
/** 根据id查询报价单数据 */
getQuotationInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate',
projectName: 'boutique',
...data
})
},
/** 查询报价单信息 */
getQuotationInfoById(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.find.by.id',
projectName: 'boutique',
...data
})
}
}
......@@ -102,5 +102,16 @@ module.exports = {
projectName: 'boutique',
...data
})
},
/**
* 获取提单客户档案列表
*
*/
getQuotationCustomerList (data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.page',
projectName: 'boutique',
...data
})
}
}
\ No newline at end of file
......@@ -48,7 +48,7 @@
.icon-change-account { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.44714407502131287) calc(100vmin * (1173 / 768) * -0.4113384484228474);}
.icon-clone { width: calc(100vmin * (1173 / 768) * 0.010230179028132993); height: calc(100vmin * (1173 / 768) * 0.010230179028132993);
background-position: calc(100vmin * (1173 / 768) * -0.21014492753623187) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.22847399829497017) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-coupon-arrow { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.46717817561807334) calc(100vmin * (1173 / 768) * -0.4113384484228474);}
.icon-coupon { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.015345268542199489);
......@@ -73,6 +73,8 @@
background-position: calc(100vmin * (1173 / 768) * -0.5277067348678602) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
.icon-customer-flow { width: calc(100vmin * (1173 / 768) * 0.12617220801364024); height: calc(100vmin * (1173 / 768) * 0.08994032395566923);
background-position: calc(100vmin * (1173 / 768) * -0.3674339300937766) calc(100vmin * (1173 / 768) * -0.09505541346973571);}
.icon-customer-list { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.1184995737425405) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-daily-report { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
background-position: calc(100vmin * (1173 / 768) * -0.3955669224211424) calc(100vmin * (1173 / 768) * -0.5400682011935208);}
.icon-day-points { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
......@@ -200,7 +202,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.1184995737425405) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.13682864450127877) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-mask-del { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331);
background-position: calc(100vmin * (1173 / 768) * -0.6547314578005116) calc(100vmin * (1173 / 768) * -0.31415174765558396);}
.icon-mask-edit { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331);
......@@ -308,7 +310,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.07246376811594203) calc(100vmin * (1173 / 768) * -0.6381074168797954);}
.icon-rule { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.13682864450127877) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.15515771526001704) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-scan { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.5132139812446718) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-scanIcon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
......@@ -358,7 +360,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.15217391304347827) calc(100vmin * (1173 / 768) * -0.5400682011935208);}
.icon-study-tips { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.15515771526001704) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.17348678601875533) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-study { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * -0.2028985507246377) calc(100vmin * (1173 / 768) * -0.5400682011935208);}
.icon-submit { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
......@@ -374,7 +376,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.4151747655583973) calc(100vmin * (1173 / 768) * -0.4113384484228474);}
.icon-task-pass { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.17348678601875533) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.1918158567774936) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-tdcj-icon { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.05541346973572037) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-time-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
......@@ -398,7 +400,7 @@
.icon-total { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.020034100596760442) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-two-arrow { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.010230179028132993);
background-position: calc(100vmin * (1173 / 768) * -0.1918158567774936) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
background-position: calc(100vmin * (1173 / 768) * -0.21014492753623187) calc(100vmin * (1173 / 768) * -0.6986359761295823);}
.icon-upload-play { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.10230179028132992) calc(100vmin * (1173 / 768) * -0.6751918158567775);}
.icon-uploadAdd { width: calc(100vmin * (1173 / 768) * 0.020460358056265986); height: calc(100vmin * (1173 / 768) * 0.020460358056265986);
......
<template>
<view>
<view v-for="(items, boxIdx) in formList" :key="boxIdx">
<view
class="gl-cell"
v-if="formList.length"
>
<view
v-for="(items, boxIdx) in formList"
:key="boxIdx"
class="cell-box-block"
>
<view class="cell-box">
<template v-if="titleList.length">
<view
class="cell-title flex"
v-if="titleList[boxIdx] && (titleList[boxIdx].name || titleList[boxIdx].addHtml)"
>
<template v-if="titleList[boxIdx].name">
{{titleList[boxIdx].name}}
</template>
<template v-if="titleList[boxIdx].addHtml">
<slot :name="titleList[boxIdx].addHtml" />
</template>
</view>
</template>
<template v-for="(item, idx) in items">
<view v-if="!item.hidden">
<view class="cell-row" :key="idx">
<view class="cell" @click="onCellClick(item)" :class="[item.noBorder ? '' : 'border', item.onlyLabel ? 'small-height' : '', item.class]">
<view
class="cell-row"
:key="idx"
>
<view
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>
<view
v-if="item.labellIcon"
:class="['sprite-icon', `icon-${item.labellIcon}`]"
></view>
{{ item.label }}
<view v-if="item.required" class="required">*</view>
<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]" :type="item.inputType || 'text'"
@blur="handleBlur($event, item)" :placeholder="item.placeholder || '请输入'"
<input
class="input-value"
v-model="formData[item.value]"
:type="item.inputType || 'text'"
@blur="handleBlur($event, item)"
:placeholder="item.placeholder || '请输入'"
:maxlength="item.maxlength ? item.maxlength : -1"
@input="item.inputType === 'number' && item.maxlength ? (formData[item.value] = String($event.target.value).slice(0, item.maxlength)) : null" />
<view v-if="item.valueIcon" :class="['sprite-icon', `icon-${item.valueIcon}`]"
@click="onValueClick(item)"></view>
placeholder-class="input-placeholder"
@input="item.inputType === 'number' && item.maxlength ? (formData[item.value] = String($event.target.value).slice(0, item.maxlength)) : null"
/>
<view
v-if="item.valueIcon"
:class="['sprite-icon', `icon-${item.valueIcon}`]"
@click="onValueClick(item)"
></view>
</view>
</template>
<!-- 下拉选择 -->
......@@ -41,20 +83,43 @@
</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" :disabled="item.disabled || radio.disabled" :checked="radio.value == item.current" />
<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"
:disabled="item.disabled || radio.disabled"
: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>
<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>
</view>
<slot v-if="item.addHtml" :name="item.addHtml"></slot>
<slot
v-if="item.addHtml"
:name="item.addHtml"
></slot>
</view>
</view>
</template>
......@@ -86,29 +151,33 @@ export default {
formData: {
type: Object,
default: () => ({})
},
titleList: {
type: Array,
default: () => []
}
},
data() {
data () {
return {
userInfo: {}
}
},
mounted() {
mounted () {
this.userInfo = uni.$storage.get('userInfo') || {}
},
methods: {
onCellClick(item) {
onCellClick (item) {
if (item.type === 'select') {
this.$emit('handleCell', item)
}
},
onRadioChange(e, item) {
onRadioChange (e, item) {
this.$emit('radioChange', e, item)
},
onValueClick(item) {
onValueClick (item) {
this.$emit('handleValue', item)
},
handleBlur(e, item) {
handleBlur (e, item) {
this.$emit('inputBlur', e, item)
}
}
......@@ -116,13 +185,27 @@ export default {
</script>
<style scoped lang="scss">
.gl-cell {
.cell-box-block {
&:first-child {
.cell-box {
margin-top: 0;
}
}
}
}
.cell-box {
background-color: #fff;
border-radius: toRpx(16);
overflow: hidden;
margin-bottom: toRpx(18);
margin-top: toRpx(18);
}
.cell-title {
min-height: 72rpx;
padding: 0 32rpx;
color: #6c6f75;
font-size: 24rpx;
}
.cell-row {
padding-left: toRpx(32);
}
......@@ -216,14 +299,19 @@ export default {
.sprite-icon {
margin-left: toRpx(8);
}
.input-placeholder {
color: #999ea8 !important;
font-size: toRpx(28) !important;
}
}
.input-value {
height: 100%;
text-align: right;
width: 100%;
border: none;
padding: 0;
}
.input-bottom {
min-height: toRpx(100);
line-height: toRpx(56);
......
<template>
<view class="age-list">
<template v-for="(i, index) in list">
<view
:key="index"
@click="choose(i)"
:class="['item flex', { active: currentId ? i == currentId : i == data[params.idKey] }]"
>
<view class="sprite-icon icon-tag-checked"></view>
{{ i }}
</view>
</template>
</view>
</template>
<script type="text/ecmascript-6">
import popupmixin from './popupmixin'
export default {
mixins: [popupmixin],
name: 'AgeRange',
inject: ['userInfo'],
data () {
return {
}
},
mounted () {
},
methods: {
async getList () {
const { params } = this
this.currentId = ''
let data = [
'20岁以下',
'21-30岁',
'31-40岁',
'41-50岁',
'51岁以上'
]
this.updateParams(params, data)
},
initData (data) {
this.list = data
this.$emit('onComplete')
},
handleSearch (searchValue) {
this.list = []
this.getList(searchValue, true)
},
choose (i) {
this.currentId = i
this.$emit('choose', i)
}
}
}
</script>
<style scoped lang="scss">
.age-list {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
......@@ -26,7 +26,7 @@
:class="[
{'sub-brand-name':j.isTitle},
{'item flex':!j.isTitle},
{active: (currentId ? j.id == currentId : j.id == data.customer[params.idKey]) && !j.isTitle}
{active: (currentId ? j.id == currentId : (j.id == (data.customer ? data.customer[params.idKey] : '') || j.id == data[params.idKey])) && !j.isTitle}
]"
@click="choose(j,c)"
>
......
<template>
<view class="city-list-box">
<view class="step-box flex">
<view
:class="['step flex',{'step-active':currentStep == 1}]"
@click="currentStep = 1"
>
{{currentIds[0] || '选择省份'}}
</view>
<view :class="['step flex',{'step-active':currentStep == 2}]">{{currentIds[1]|| '选择城市'}}</view>
</view>
<scroll-view
class="scroll-view"
scroll-y
:scroll-into-view="letter"
:scroll-top="scrollTop"
>
<template v-if="listData.length">
<template v-for="(i, index) in viewList">
<view
class="item-box"
:key="index"
:id="i.letter"
>
<view class="letter-title flex">{{i.letter}}</view>
<view class="city-list">
<template v-for="(c,cindex) in i.list">
<view
:class="['item flex',{
active: currentIds.length ? c.name == currentIds[c.level - 1] : c.name == data[params.idKeys[c.level - 1]]
}]"
:key="cindex"
@click="choose(c)"
>
{{c.name}}
<view class="sprite-icon icon-tag-checked"></view>
</view>
</template>
</view>
</view>
</template>
</template>
</scroll-view>
<view class="letter-list">
<template v-for="(i, index) in viewList">
<view
class="letter-item"
:key="index"
@click="letter = i.letter"
>
{{i.letter}}
</view>
</template>
</view>
</view>
</template>
<script type='text/ecmascript-6'>
import popupmixin from './popupmixin'
import pinyin from 'pinyin.js'
export default {
mixins: [popupmixin],
name: 'City',
data () {
return {
letter: 'A',
scrollTop: 0,
currentStep: 1
}
},
computed: {
viewList () {
let { listData, currentStep, currentIds } = this,
childList = null
if (currentStep == 2) listData.map(e => {
let item = e.list.find(i => i.name == currentIds[0])
if (!childList && item) childList = item.list
})
return currentStep == 1 ? listData : childList
},
},
mounted () {
},
methods: {
async getList () {
const { params } = this,
{ cacheData } = params
this.currentId = ''
if (cacheData && cacheData.length) {
this.initData(cacheData)
return
}
try {
const { data: {
code,
data,
msg
} } = await uni.$api.evaluationApi
.apiRegion({
keyword: '全国',
sub_admin: 3,
extensions_code: 1
})
if (code == 0) {
let { status, districts } = JSON.parse(data)
if (status === 0 && districts && districts.length) {
let provinceData = districts[0].districts
provinceData = provinceData.map(item => {
item.districts = item.districts.map(e => this.addLetterToItem(e))
return this.addLetterToItem(item)
})
this.formatCityData(provinceData)
} else throw '加载数据失败'
} else throw msg
} catch (error) {
this.updateParams(params, [])
if (error) uni.showToast({
title: error,
icon: 'none',
mask: true
})
}
},
formatCityData (data) {
const { params } = this
let letterList = Array.from(new Set([...data.map((e) => e.letter)])).sort(),
province = letterList.map(e => {
let list = []
data.map(i => {
if (i.letter == e) {
let childLetterList = Array.from(new Set([...i.districts.map((e) => e.letter)])).sort()
i.list = childLetterList.map(c => {
let districts = []
i.districts.map(d => {
if (d.letter == c) {
districts.push(d)
}
})
return {
letter: c,
list: districts
}
})
list.push(i)
}
})
return {
letter: e,
list,
}
})
this.updateParams(params, province)
},
initData (data) {
this.list = data
this.$emit('onComplete')
},
choose (item) {
let { level, name } = item,
{ currentIds } = this
if (level == 2) {
this.currentIds = [currentIds[0], name]
let chooseItem = {
province: currentIds[0],
city: name
}
this.$emit('choose', chooseItem)
} else {
this.currentIds = [name]
this.currentStep = 2
this.scrollTop = 10
setTimeout(() => {
this.scrollTop = 0
}, 100)
}
},
addLetterToItem (item) {
if (!item || !item.name) {
return { ...item, letter: '#' }
}
try {
const firstChar = item.name.charAt(0)
if (/[一-龥]/.test(firstChar)) {
let pinyinResult
try {
pinyinResult = pinyin(firstChar)
} catch (e1) {
console.warn('pinyin without options failed:', e1)
try {
pinyinResult = pinyin(firstChar, { style: 0 })
} catch (e2) {
console.warn('pinyin with simple options failed:', e2)
const simplePinyinMap = {
安: 'A',
北: 'B',
重: 'C',
川: 'C',
大: 'D',
东: 'D',
福: 'F',
甘: 'G',
广: 'G',
贵: 'G',
海: 'H',
河: 'H',
黑: 'H',
湖: 'H',
吉: 'J',
江: 'J',
辽: 'L',
内: 'N',
宁: 'N',
青: 'Q',
山: 'S',
陕: 'S',
上: 'S',
四: 'S',
台: 'T',
天: 'T',
西: 'X',
新: 'X',
云: 'Y',
浙: 'Z'
}
return {
...item,
letter: simplePinyinMap[firstChar] || '#'
}
}
}
let letter = '#'
if (pinyinResult && pinyinResult.length > 0) {
if (Array.isArray(pinyinResult[0])) {
letter = pinyinResult[0][0].charAt(0).toUpperCase()
} else if (typeof pinyinResult[0] === 'string') {
letter = pinyinResult[0].charAt(0).toUpperCase()
} else if (typeof pinyinResult === 'string') {
letter = pinyinResult.charAt(0).toUpperCase()
}
}
if (/^[A-Z]$/.test(letter)) {
return { ...item, letter }
} else {
const simplePinyinMap = {
安: 'A',
阿: 'A'
}
return {
...item,
letter: simplePinyinMap[firstChar] || '#'
}
}
} else {
const letter = firstChar.toUpperCase()
return { ...item, letter: /^[A-Z]$/.test(letter) ? letter : '#' }
}
} catch (error) {
console.error('获取首字母失败:', error)
return { ...item, letter: '#' }
}
},
}
}
</script>
<style scoped lang='scss'>
.city-list-box {
position: relative;
height: 100%;
width: 100%;
.step-box {
height: toRpx(64);
justify-content: center;
gap: 0 96rpx;
position: relative;
margin-bottom: 16rpx;
.step {
height: 64rpx;
border-radius: 12rpx;
background: #f2f2f2;
justify-content: center;
padding: 0 32rpx;
color: #666666;
font-size: 28rpx;
}
.step-active {
background: #dee7ff;
color: #347bff;
}
&::after {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
content: '';
width: 16rpx;
height: 2rpx;
background: #cccccc;
}
}
.scroll-view {
height: calc(100% - #{toRpx(80)});
}
.letter-list {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 0;
color: #888888;
font-size: toRpx(28);
line-height: toRpx(40);
padding: 0 toRpx(18);
text-align: center;
}
.item-box {
margin-bottom: toRpx(32);
.letter-title {
color: #888888;
font-size: toRpx(28);
height: toRpx(40);
background: #f5f7fa;
padding-left: toRpx(48);
margin-bottom: toRpx(16);
}
.city-list {
margin: 0 toRpx(48);
.brand-name {
color: #333333;
font-size: toRpx(32);
line-height: toRpx(44);
margin: toRpx(16) 0;
}
.sub-brand-name {
color: #888888;
font-size: toRpx(28);
line-height: toRpx(40);
width: 100%;
flex-shrink: 0;
}
}
}
.city-list {
// display: grid;
// grid-template-columns: repeat(4, 1fr);
gap: toRpx(32);
display: flex;
// gap: toRpx(32) 0;
flex-wrap: wrap;
.item {
width: calc((100% - #{toRpx(96)}) / 4);
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
}
</style>
\ No newline at end of file
<template>
<view class="customer-list">
<template v-for="(i, index) in listData">
<view
:key="index"
@click="choose(i)"
:class="['item flex', { active: checkActive(i) }]"
>
<view class="sprite-icon icon-tag-checked"></view>
<template v-if="i.customerName">
{{i.customerName}}
</template>
<template v-if="i.carSeriesName">
<view class="car-model">({{i.carChildsBrandName || ''}}-{{i.carSeriesName}})</view>
</template>
<template v-if="i.customerPhone">
<view class="phone">|{{i.customerPhone}}</view>
</template>
</view>
</template>
</view>
</template>
<script type="text/ecmascript-6">
import popupmixin from './popupmixin'
export default {
mixins: [popupmixin],
name: 'Customer',
inject: ['userInfo'],
data () {
return {
}
},
mounted () {
},
methods: {
async getList (searchValue, search) {
const { userInfo, params } = this,
{ cacheData } = params
this.currentId = ''
if (!search && cacheData && cacheData.length) {
this.initData(cacheData)
return
}
this.componentLoading(params)
const { shopMerchantId } = userInfo,
apiParams = {
merchantId: shopMerchantId,
pageSize: 999999,
currentPage: 1,
search: searchValue
}
const { list } = await uni.$api.popupApi.getQuotationCustomerList(apiParams)
this.updateParams(params, list || [])
},
initData (data) {
this.list = data
this.$emit('onComplete')
},
handleSearch (searchValue) {
this.list = []
this.getList(searchValue, true)
},
choose (i) {
let { params: { idKey } } = this
this.currentId = i[idKey]
this.$emit('choose', i)
},
checkActive (i) {
let { currentId, data, params } = this
return currentId ? i.customerPhone == currentId : i.customerPhone == data[params.idKey]
}
}
}
</script>
<style scoped lang="scss">
.customer-list {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
<template>
<view class="employee-list">
<template v-for="(i, index) in list">
<view :key="index" @click="choose(i)" :class="['item flex', { active: currentId ? i.uuid == currentId : i.uuid == data[params.idKey] }]">
<view
:key="index"
@click="choose(i)"
:class="['item flex', { active: currentId ? i.uuid == currentId : i.uuid == data[params.idKey] }]"
>
<view class="sprite-icon icon-tag-checked"></view>
{{ i.staffName }}
</view>
......@@ -28,16 +32,18 @@ export default {
{ cacheData } = params
this.currentId = ''
if (!search && cacheData && cacheData.length) {
console.log('getList', params,data)
this.initData(cacheData)
return
}
this.componentLoading(params)
const { shopMerchantId, sceneType, merchantId } = userInfo,
data = await uni.$api.popupApi.getEmployeeList({
apiTargetName = sceneType == 1 ? 'getEmployeeList' : 'getOrderScreenEmployeeList',
apiParams = {
merchantId: params.idKey == 'sellerUserId' ? merchantId : shopMerchantId,
sceneList: params.idKey == 'sellerUserId' ? '' : [sceneType],
name: searchValue
})
}
if (searchValue) apiParams.name = searchValue
const data = await uni.$api.popupApi[apiTargetName](apiParams)
this.updateParams(params, data || [])
},
initData (data) {
......
<template>
<view class="seat-list">
<template v-for="(i, index) in list">
<view
:key="index"
@click="choose(i)"
:class="['item flex', { active: currentId ? i == currentId : i == data[params.idKey] }]"
>
<view class="sprite-icon icon-tag-checked"></view>
{{ i }}
</view>
</template>
</view>
</template>
<script type="text/ecmascript-6">
import popupmixin from './popupmixin'
export default {
mixins: [popupmixin],
name: 'Seat',
inject: ['userInfo'],
data () {
return {
}
},
mounted () {
},
methods: {
async getList () {
const { params } = this
this.currentId = ''
let data = [
'1',
'2',
'3',
'4',
'5',
'6',
'7',
]
this.updateParams(params, data)
},
initData (data) {
this.list = data
this.$emit('onComplete')
},
handleSearch (searchValue) {
this.list = []
this.getList(searchValue, true)
},
choose (i) {
this.currentId = i
this.$emit('choose', i)
}
}
}
</script>
<style scoped lang="scss">
.seat-list {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: toRpx(32);
margin: 0 toRpx(48);
.item {
justify-content: center;
height: toRpx(72);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
</style>
......@@ -23,6 +23,9 @@ export default {
},
noData () {
return !this.listData.length
},
sceneType(){
return uni.$storage.get('userInfo').sceneType
}
},
watch: {
......@@ -42,7 +45,10 @@ export default {
params.cacheData = data
}
this.$emit('update:params', params)
},
componentLoading (params) {
params.loadComplete = false
this.$emit('update:params', this.params)
}
}
......
......@@ -14,6 +14,12 @@
* 11:套餐
* 12:其他精品
* 13:时间选择
* 14: 代保管人员
* 15: 商品类目
* 16: 年龄区间
* 17:所在城市
* 18: 座位数
* 19: 客户档案
*/
const componentConfig = {
......@@ -179,6 +185,41 @@ const componentConfig = {
title: '选择商品类目',
hideSearch: true,
loadComplete: false
},
16: {
name: 'AgeRange',
title: '年龄区间',
idKey: 'ageRange',
hideSearch: true,
loadComplete: false
},
17: {
name: 'City',
title: '所在城市',
hideSearch: true,
loadComplete: false,
nullTips: '请选择所在城市',
cacheData: [],
noData: false,
idKeys: ['province','city']
},
18:{
name:'Seat',
title:'座位数',
idKey: 'seat',
hideSearch: true,
loadComplete: false,
},
19:{
name:'Customer',
title:'客户档案',
loadComplete: false,
placeholder: '查找',
idKey: 'customerPhone',
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false
}
}
export default { componentConfig }
......@@ -44,6 +44,10 @@ import DateTime from './components/DateTime.vue'
import DateTimeChange from './components/DateTimeChange.vue'
import AgreementList from './components/AgreementList.vue'
import GoodsCategory from './components/GoodsCategory.vue'
import AgeRange from './components/AgeRange.vue'
import City from './components/City.vue'
import Seat from './components/Seat.vue'
import Customer from './components/Customer.vue'
export default {
components: {
Popup,
......@@ -58,7 +62,11 @@ export default {
DateTime,
AgreementList,
DateTimeChange,
GoodsCategory
GoodsCategory,
AgeRange,
City,
Seat,
Customer
},
name: '',
props: {
......@@ -82,7 +90,8 @@ export default {
type: Boolean,
default: false
},
defaultTime: String
defaultTime: String,
popupTitle: String
},
provide () {
......@@ -129,7 +138,7 @@ export default {
},
computed: {
title () {
return config.componentConfig[this.popupType].title
return this.popupTitle || config.componentConfig[this.popupType].title
},
userInfo () {
return uni.$storage.get("userInfo")
......@@ -310,6 +319,9 @@ export default {
}
.hide-search {
height: calc(100% - #{toRpx(280)});
.popup-scroll-view{
padding-top: 0;
}
}
.popup-footer {
padding: toRpx(64) 0;
......
......@@ -215,11 +215,10 @@
</template>
<NoticePopup
ref="reportNotice"
title="提交成功"
text="您的日报已提交成功"
type="success"
:buttons="buttons"
@buttonClick="back"
:title="noticeObj.title"
:text="noticeObj.text"
:type="noticeObj.type || 'success'"
:buttons="noticeObj.buttons"
></NoticePopup>
</view>
</template>
......@@ -243,6 +242,7 @@ export default {
name: 'DailyReport',
data () {
return {
noticeObj: {},
tabIndex: 0,
to: '',
dateKey: {},
......@@ -608,13 +608,20 @@ export default {
orderObj.recordStaffCount != value &&
orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid
) uni.showModal({
title: '预警提示',
content: `今日驻店人数与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,今日驻店人数将被清空。`,
showCancel: false,
confirmText: '知道了',
confirmColor: '#347BFF'
})
) {
this.noticeObj = {
title: '重要提示',
text: `今日驻店人数与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,今日驻店人数将被清空。`,
type: 'warning',
buttons: [
{
text: '确定',
type: 'primary',
}
]
}
this.$nextTick(() => this.$refs.reportNotice.open())
}
}
},
isNotEmpty (value) {
......@@ -682,7 +689,21 @@ export default {
uni.hideLoading()
if (data) {
this.isEditReport = false
this.$refs.reportNotice.open()
this.noticeObj = {
title: '提交成功',
text: '您的日报已提交成功',
type: 'success',
buttons: [
{
text: '返回首页',
type: 'primary',
callback: _ => {
uni.navigateBack()
}
}
]
}
this.$nextTick(() => this.$refs.reportNotice.open())
}
} catch (errorObj) {
uni.hideLoading()
......
......@@ -170,7 +170,7 @@
</view>
</view>
</template>
<view class="form-item flex">
<!-- <view class="form-item flex">
<view class="label flex">
未触客返店人数
</view>
......@@ -191,7 +191,7 @@
:disabled="filterDisabled(isEditReport)"
>
</view>
</view>
</view> -->
<view class="form-item flex">
<view class="label flex">
备注
......@@ -266,11 +266,10 @@
</template>
<NoticePopup
ref="reportNotice"
title="提交成功"
text="您的日报已提交成功"
type="success"
:buttons="buttons"
@buttonClick="back"
:title="noticeObj.title"
:text="noticeObj.text"
:type="noticeObj.type || 'success'"
:buttons="noticeObj.buttons"
></NoticePopup>
</view>
</template>
......@@ -297,6 +296,7 @@ export default {
name: 'DailyReport',
data () {
return {
noticeObj: {},
pickerTemplateList: Object.freeze([
{ label: '单延保', value: 1 },
{ label: '权益延保', value: 2 },
......@@ -357,7 +357,6 @@ export default {
required: true,
min: 0,
max: 100,
inputPlaceholder: '',
refId: 'equityToShopCount',
},
{
......@@ -367,16 +366,17 @@ export default {
required: false,
min: 0,
max: 100,
},
{
label: '未触客返店人数',
key: 'notDeliveryReturnCount',
type: 'number',
min: 0,
max: 100,
}
]),
weeklyList: [],
isEditReport: false,
buttons: Object.freeze([
{
text: '返回首页',
type: 'primary'
}
]),
}
},
computed: {
......@@ -388,7 +388,7 @@ export default {
},
infoObject () {
let { tabIndex, carBandList, orderObj: { templateType, totalOrderMoney } } = this,
{ brandType, firstBrandId } = carBandList[tabIndex],
{ brandType, firstBrandId } = carBandList[tabIndex],
/**模版为广联权益 */
TemplateType3 = templateType == 3,//
NotAitoAndTemplateType3 = brandType != 0 || TemplateType3, //非问界 或者 广联权益 时隐藏
......@@ -500,11 +500,9 @@ export default {
eventCode: 'app_daily_report'
}) //驻店日报埋点
this.initData()
this.isEditReport = false
},
methods: {
back () {
uni.navigateBack()
},
initData () {
const { merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo
this.orderObj = {
......@@ -695,13 +693,20 @@ export default {
orderObj.recordStaffCount != value &&
orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid
) uni.showModal({
title: '预警提示',
content: `今日驻店人数与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,今日驻店人数将被清空。`,
showCancel: false,
confirmText: '知道了',
confirmColor: '#347BFF'
})
) {
this.noticeObj = {
title: '重要提示',
text: `今日驻店人数与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,今日驻店人数将被清空。`,
type: 'warning',
buttons: [
{
text: '确定',
type: 'primary',
}
]
}
this.$nextTick(() => this.$refs.reportNotice.open())
}
}
},
isNotEmpty (value) {
......@@ -724,15 +729,11 @@ export default {
}
},
async submit () {
uni.showLoading({
title: '提交中',
mask: true
})
uni.$track.add({
eventCode: 'app_submit_daily_report'
}) //提交驻店日报埋点
try {
let { orderObj, carBandList, hwOhterObjArray } = this
let { orderObj, carBandList, hwOhterObjArray, userInfo } = this
orderObj.isAdmin = false
orderObj.oprBy = orderObj.staffUuid
orderObj.sceneType = 0
......@@ -758,11 +759,33 @@ export default {
item.equityToShopCount = item.equityToShopCount || 0
})
}
// 非调休 日报填报前参数校验
let check = await this.dailyReportCheck(orderObj)
console.log(check, 'check')
if (check && !(userInfo?.isSuper || userInfo?.loginRole == 3)) return false
uni.showLoading({
title: '提交中',
mask: true
})
const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj)
uni.hideLoading()
if (data) {
this.isEditReport = false
this.$refs.reportNotice.open()
this.noticeObj = {
title: '提交成功',
text: '您的日报已提交成功',
type: 'success',
buttons: [
{
text: '返回首页',
type: 'primary',
callback: _ => {
uni.navigateBack()
}
}
]
}
this.$nextTick(() => this.$refs.reportNotice.open())
}
} catch (errorObj) {
uni.hideLoading()
......@@ -802,7 +825,55 @@ export default {
},
hideSelect () {
this.$refs?.selectComponent?.hideSelect()
}
},
async dailyReportCheck (params) {
try {
let { carBandList } = this
let data = await uni.$api.boutiqueApi.dailyReportCheck(params)
if (!data) {
return false
}
// 根据车型做对应的文字处理
let context = ''
let showModal = false
data.forEach(item => {
if (!item.isCheckPass) {
showModal = true
carBandList.forEach(el => {
if (el.brandType == item.brandType) {
context += `【${item.brandName}】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值${item.differenceValue
},请相关驻店销售对齐核销再次提交\t\n`
}
})
}
})
if (showModal) {
return new Promise(resolve => {
this.noticeObj = {
title: '重要提示',
text: context,
type: 'warning',
buttons: [
{
text: '确定',
type: 'primary',
callback: _ => {
resolve(true)
this.$refs.reportNotice.close()
}
}
]
}
this.$nextTick(() => this.$refs.reportNotice.open())
})
} else {
return false
}
} catch (error) {
return false
}
},
}
}
</script>
......@@ -920,7 +991,7 @@ export default {
overflow: hidden;
border-radius: toRpx(32);
.car-band-form-box {
height: toRpx(384);
height: toRpx(480);
position: relative;
.box {
position: absolute;
......
<template>
<view>
<view class="shop-list">
<view class="shop-item" v-for="(item, index) in list" :key="index">
<view class="sprite-icon icon-blue-delete" @click="deleteGoods(index)"></view>
<view
class="shop-item"
v-for="(item, index) in list"
:key="index"
>
<view
class="sprite-icon icon-blue-delete"
@click="deleteGoods(index)"
></view>
<view class="right">
<view class="shop-name">商品名称:{{ item.multipleSpecificationsGoods ?
item.multipleSpecificationsGoods.baseGoodsName : item.goods.goodsAlias || item.goods.upgradeGoodsName ||
item.goods.goodsInfo.goodsName }}</view>
<view class="alias"
v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.goodsAlias">商品别名:{{
<view class="shop-name">{{ goodsName(item) }}</view>
<view
class="alias"
v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.goodsAlias"
>商品别名:{{
item.multipleSpecificationsGoods.goods.goodsAlias }}</view>
<view class="front-gear-box">
<view class="front-gear-input-box">
<template
v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.specificationStr">
<template v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.specificationStr">
<view class="front-gear-label">
{{item.multipleSpecificationsGoods.goods.specificationStr}}
</view>
</template>
<template v-if="item.goods">
<template
v-if="(item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition) && (item.goods.goodsInfo.goodsType == 1 || item.goods.upgradeGoodsType == 1 || item.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.goods.upgradeGoodsType == baseConfigData.selfBuildFilmType)">
<template v-if="(item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition) && (item.goods.goodsInfo.goodsType == 1 || item.goods.upgradeGoodsType == 1 || item.goods.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.goods.upgradeGoodsType == baseConfigData.selfBuildFilmType)">
<view class="front-gear-label">
{{ formatPosition((item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition),
positionTypeList)}}
</view>
</template>
<template
v-if="(item.goods.goodsInfo.goodsType == 1 || item.goods.upgradeGoodsType == 1) && !item.goods.merchantGoodsPosition && !item.goods.upgradeGoodsPosition">无部位属性</template>
<template v-if="(item.goods.goodsInfo.goodsType == 1 || item.goods.upgradeGoodsType == 1) && !item.goods.merchantGoodsPosition && !item.goods.upgradeGoodsPosition">无部位属性</template>
</template>
<view class="front-gear-input">
<view class="unit">¥</view>
<template v-if="item.multipleSpecificationsGoods">
<input class="uni-input" type="digit" maxlength="9" placeholder="请输入价格"
placeholder-style="font-size: 14px"
<input
class="uni-input"
type="digit"
maxlength="9"
placeholder="请输入价格"
placeholder-style="font-size: 14px"
v-model="item.multipleSpecificationsGoods.goods.sellPrice"
@blur="validatePrice($event, item, index)" />
@blur="validatePrice($event, item, index)"
/>
</template>
<template v-else>
<input class="uni-input" type="digit" maxlength="9" placeholder="请输入价格"
placeholder-style="font-size: 14px"
<input
class="uni-input"
type="digit"
maxlength="9"
placeholder="请输入价格"
placeholder-style="font-size: 14px"
v-model="item.goods.sellPrice"
@blur="validatePrice($event, item, index)" />
@blur="validatePrice($event, item, index)"
/>
</template>
<!-- <input class="uni-input" type="digit" maxlength="9" placeholder="请输入价格"
placeholder-style="font-size: 14px"
......@@ -50,21 +64,35 @@
</view>
</view>
<view class="control">
<view class="minus" @click="decreaseNumber(item)">-</view>
<view
class="minus"
@click="decreaseNumber(item)"
>-</view>
<template v-if="item.multipleSpecificationsGoods">
<input class="uni-input control-input" type="number" maxlength="3"
v-model="item.multipleSpecificationsGoods.number"
@blur="validateNumber($event, item)" />
<input
class="uni-input control-input"
type="number"
maxlength="3"
v-model="item.multipleSpecificationsGoods.number"
@blur="validateNumber($event, item)"
/>
</template>
<template v-else>
<input class="uni-input control-input" type="number" maxlength="3"
v-model="item.goods.number"
@blur="validateNumber($event, item)" />
<input
class="uni-input control-input"
type="number"
maxlength="3"
v-model="item.goods.number"
@blur="validateNumber($event, item)"
/>
</template>
<!-- <input class="uni-input control-input" type="number" maxlength="3"
:value="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods ? item.multipleSpecificationsGoods.goods.number : item.goods.number"
@blur="validateNumber($event, item)" /> -->
<view class="add" @click="increaseNumber(item)">+</view>
<view
class="add"
@click="increaseNumber(item)"
>+</view>
</view>
</view>
</view>
......@@ -90,21 +118,30 @@ export default {
default: {}
}
},
created() {
created () {
// 初始化商品数量
this.initProductNumbers()
},
mounted() {
mounted () {
// 确保每次使用组件时都检查并设置number属性
this.initProductNumbers()
},
updated() {
updated () {
// 当组件数据更新时也检查number属性
this.initProductNumbers()
},
methods: {
goodsName (item) {
let { goodsFlag } = item,
str = ''
if (goodsFlag == 3) str = ''
else str = item.multipleSpecificationsGoods ?
item.multipleSpecificationsGoods.baseGoodsName : item.goods.goodsAlias || item.goods.upgradeGoodsName ||
item.goods.goodsInfo.goodsName
return str
},
// 初始化商品数量方法
initProductNumbers() {
initProductNumbers () {
if (this.list && this.list.length > 0) {
this.list.forEach(item => {
if (!item.multipleSpecificationsGoods) {
......@@ -117,20 +154,22 @@ export default {
if (!item.multipleSpecificationsGoods.number) {
this.$set(item.multipleSpecificationsGoods, 'number', '1')
}
} else {
}
})
}
},
filterIncludes(item, arr) {
filterIncludes (item, arr) {
return arr.indexOf(item) > -1
},
// 格式化位置信息
formatPosition(item, positionTypeList) {
formatPosition (item, positionTypeList) {
const filterData = positionTypeList.filter(v => v.positionValue == item)
return (filterData.length && filterData[0] && filterData[0].positionName) || ''
},
// 验证价格输入
validatePrice(event, item, index) {
validatePrice (event, item, index) {
let value = event.detail.value
console.log('value', value)
// 如果为空则设置为0
......@@ -172,9 +211,9 @@ export default {
}
} else if (item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) {
// 多规格商品的最小价格检查
if (item.multipleSpecificationsGoods.goods.validMinSellPrice === 'Y' &&
item.multipleSpecificationsGoods.goods.minSellPrice &&
parseFloat(value) < parseFloat(item.multipleSpecificationsGoods.goods.minSellPrice)) {
if (item.multipleSpecificationsGoods.goods.validMinSellPrice === 'Y' &&
item.multipleSpecificationsGoods.goods.minSellPrice &&
parseFloat(value) < parseFloat(item.multipleSpecificationsGoods.goods.minSellPrice)) {
console.log('最小值', item.multipleSpecificationsGoods.goods.minSellPrice)
uni.showToast({
title: '单价不可低于商品最低价',
......@@ -194,7 +233,7 @@ export default {
this.$emit('changeTotalPrice')
},
// 验证数量输入
validateNumber(event, item) {
validateNumber (event, item) {
let value = event.detail.value
// 限制只能输入整数
value = value.replace(/[^\d]/g, '')
......@@ -214,7 +253,7 @@ export default {
this.$emit('changeTotalPrice')
},
// 增加数量
increaseNumber(item) {
increaseNumber (item) {
if (!item.multipleSpecificationsGoods) {
// 处理普通商品
if (!item.goods.number) {
......@@ -239,7 +278,7 @@ export default {
this.$emit('changeTotalPrice')
},
// 减少数量
decreaseNumber(item) {
decreaseNumber (item) {
if (!item.multipleSpecificationsGoods) {
// 处理普通商品
// 如果商品数量不存在或小于等于1,设置为1
......@@ -266,7 +305,7 @@ export default {
this.$emit('changeTotalPrice')
},
// 删除商品
deleteGoods(index) {
deleteGoods (index) {
this.list.splice(index, 1)
this.$emit('changeTotalPrice')
}
......
const FORM_LIST = [
[
{
label: '销售顾问',
label: '销售顾问/录单员',
value: 'employeeName',
type: 'select',
// key: 'staffName',
key: 'employeeName',
required: true,
showText: 'shopMerchantName'
},
......@@ -13,36 +13,27 @@ const FORM_LIST = [
value: 'deliveryEmployeeName',
type: 'select',
required: true,
// key: 'staffName',
hidden: true,
key: 'deliveryEmployeeName',
showText: 'shopMerchantName'
},
{
label: '二级流量方',
value: 'subShopMerchantName',
type: 'select',
required: true,
// key: 'subMerchantName',
hidden: true
},
{
label: '转化人员',
value: 'sellerName',
type: 'select',
// key: 'staffName',
required: true,
showText: 'merchantName'
}
],
[
{
label: '车主姓名',
value: 'customerName',
label: '姓名',
value: 'owner',
maxlength: '16',
type: 'input',
required: true
},
{
label: '联系电话',
value: 'phone',
maxlength: '11',
type: 'input',
required: true,
inputType: 'number'
},
{
label: '客户来源',
value: 'salesType',
type: 'radio',
......@@ -61,139 +52,100 @@ const FORM_LIST = [
},
{
label: '性别',
value: 'customerSex',
value: 'ownerGender',
type: 'radio',
current: '1',
current: '男',
radioList: [
{
value: '1',
name: '男'
value: '男',
name: '先生'
},
{
value: '2',
name: '女'
value: '女',
name: '女士'
}
]
},
{
label: '手机号',
value: 'customerPhone',
maxlength: '11',
type: 'input',
required: true,
inputType: 'number'
label: '年龄区间',
value: 'ageRange',
type: 'select',
key: 'ageRange'
},
{
label: '选择车型',
value: 'carBrand',
label: '所在城市',
value: 'city',
type: 'select',
key: 'carInfo'
key: 'city'
},
{
label: '车架号(VIN)',
value: 'standNo',
maxlength: '17',
label: '证件号码',
value: 'certificateNo',
maxlength: '18',
type: 'input'
},
{
label: '车牌号',
value: 'plateNumber',
maxlength: '8',
label: '兴趣爱好',
value: 'hobby',
maxlength: '200',
type: 'input'
},
{
label: '是否体验',
value: 'experienceFlag',
type: 'radio',
current: 'Y',
radioList: [
{
value: 'Y',
name: '是'
},
{
value: 'N',
name: '否'
}
]
}
label: '陪伴人员',
value: 'companion',
maxlength: '200',
type: 'input'
},
],
[
{
label: '精品礼券',
value: 'couponInfo',
label: '车型',
value: 'carBrandText',
type: 'select',
key: 'name',
required: true
},
{
label: '请选择产品',
onlyLabel: true,
key: 'carBrand',
required: true,
noBorder: true
},
{
label: '前挡',
value: 'frontGear',
type: 'select',
key: 'name',
labellIcon: 'front-gear',
addHtml: 'frontGear',
hidden: true
},
{
label: '前侧窗玻璃',
value: 'frontWindow',
type: 'select',
key: 'name',
labellIcon: 'front-window',
addHtml: 'frontWindow',
hidden: true
},
{
label: '后侧窗玻璃',
value: 'rearGear',
type: 'select',
key: 'name',
labellIcon: 'rear-gear',
addHtml: 'rearGear',
hidden: true
label: '车辆颜色',
value: 'carColor',
maxlength: '20',
type: 'input'
},
{
label: '后档',
value: 'rearWindow',
type: 'select',
key: 'name',
labellIcon: 'rear-window',
addHtml: 'rearWindow',
hidden: true
label: '车架号',
value: 'carVin',
maxlength: '17',
type: 'input',
required: true
},
{
label: '天窗',
value: 'sunRoof',
label: '座位数',
value: 'seat',
type: 'select',
key: 'name',
labellIcon: 'sun-roof',
addHtml: 'sunRoof',
hidden: true
key: 'seat',
required: true
},
{
label: '套餐',
value: 'package',
type: 'select',
key: 'name',
addHtml: 'package'
label: '车辆价格',
value: 'price',
maxlength: '8',
type: 'input',
required: true,
},
],
[
{
label: '其他精品',
label: '购买商品',
value: 'skuGoods',
type: 'select',
key: 'name',
key: 'skuGoods',
addHtml: 'skuGoods'
},
],
[
{
label: '收款方式',
value: 'payeeType',
label: '收款方',
value: 'payee',
type: 'radio',
key: 'name',
current: '1',
......@@ -212,7 +164,7 @@ const FORM_LIST = [
},
{
label: '支付方式',
value: 'selectPayType',
value: 'payType',
type: 'radio',
key: 'name',
current: '0',
......@@ -231,15 +183,20 @@ const FORM_LIST = [
// }
],
addHtml: 'otherPay'
}
],
[
},
{
label: '嘀加收款时间',
value: 'successDateTime',
key: 'todayShow',
type: 'select',
required: true
},
{
label: '备注',
value: 'remark',
maxlength: '100',
value: 'notes',
maxlength: '30',
type: 'textarea',
placeholder: '请输入 (100字以内)',
placeholder: '请输入 (30字以内)',
class: 'cell-break'
}
]
......@@ -452,7 +409,7 @@ const DEFEAT_FORM_LIST = [
},
{
label: '收款方式',
value: 'payeeType',
value: 'payee',
type: 'radio',
key: 'name',
current: '1',
......@@ -472,7 +429,7 @@ const DEFEAT_FORM_LIST = [
},
{
label: '支付方式',
value: 'selectPayType',
value: 'payType',
type: 'radio',
key: 'name',
current: '0',
......@@ -612,7 +569,25 @@ const popupTypeEnum = {
13: {
key: 'todayShow',
list: ''
},
16: {
key: 'ageRange'
},
17: {
key: 'city'
},
18: {
key: 'seat'
},
19: {
key: 'customer'
}
}
export { FORM_LIST, popupTypeEnum, payTypeList, DEFEAT_FORM_LIST }
const titleList = [
null,
{ addHtml: 'customer' },
{ name: '车辆信息' },
{ name: '增值车损险' },
{ name: '其他信息' },
]
export { FORM_LIST, popupTypeEnum, payTypeList, DEFEAT_FORM_LIST, titleList }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!