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 = { ...@@ -102,5 +102,16 @@ module.exports = {
projectName: 'boutique', projectName: 'boutique',
...data ...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 \ No newline at end of file
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
.icon-change-account { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323); .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);} 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); .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); .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);} 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); .icon-coupon { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.015345268542199489);
...@@ -73,6 +73,8 @@ ...@@ -73,6 +73,8 @@
background-position: calc(100vmin * (1173 / 768) * -0.5277067348678602) calc(100vmin * (1173 / 768) * -0.4825234441602728);} 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); .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);} 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); .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);} 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); .icon-day-points { width: calc(100vmin * (1173 / 768) * 0.027280477408354646); height: calc(100vmin * (1173 / 768) * 0.027280477408354646);
...@@ -200,7 +202,7 @@ ...@@ -200,7 +202,7 @@
.icon-logo { width: calc(100vmin * (1173 / 768) * 0.06820119352088662); height: calc(100vmin * (1173 / 768) * 0.06820119352088662); .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);} 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); .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); .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);} 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); .icon-mask-edit { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331);
...@@ -308,7 +310,7 @@ ...@@ -308,7 +310,7 @@
.icon-role-2 { width: calc(100vmin * (1173 / 768) * 0.028985507246376812); height: calc(100vmin * (1173 / 768) * 0.028985507246376812); .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);} 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); .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); .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);} 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); .icon-scanIcon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
...@@ -358,7 +360,7 @@ ...@@ -358,7 +360,7 @@
.icon-study-active { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763); .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);} 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); .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); .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);} 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); .icon-submit { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
...@@ -374,7 +376,7 @@ ...@@ -374,7 +376,7 @@
.icon-tag-checked { width: calc(100vmin * (1173 / 768) * 0.02557544757033248); height: calc(100vmin * (1173 / 768) * 0.013640238704177323); .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);} 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); .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); .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);} 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); .icon-time-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
...@@ -398,7 +400,7 @@ ...@@ -398,7 +400,7 @@
.icon-total { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323); .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);} 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); .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); .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);} 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); .icon-uploadAdd { width: calc(100vmin * (1173 / 768) * 0.020460358056265986); height: calc(100vmin * (1173 / 768) * 0.020460358056265986);
......
<template> <template>
<view> <view
<view v-for="(items, boxIdx) in formList" :key="boxIdx"> class="gl-cell"
v-if="formList.length"
>
<view
v-for="(items, boxIdx) in formList"
:key="boxIdx"
class="cell-box-block"
>
<view class="cell-box"> <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"> <template v-for="(item, idx) in items">
<view v-if="!item.hidden"> <view v-if="!item.hidden">
<view class="cell-row" :key="idx"> <view
<view class="cell" @click="onCellClick(item)" :class="[item.noBorder ? '' : 'border', item.onlyLabel ? 'small-height' : '', item.class]"> 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 :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 }} {{ item.label }}
<view v-if="item.required" class="required">*</view> <view
v-if="item.required"
class="required"
>*</view>
</view> </view>
<view class="cell-value"> <view class="cell-value">
<!-- 输入框 --> <!-- 输入框 -->
<template v-if="item.type === 'input'"> <template v-if="item.type === 'input'">
<view class="input-box"> <view class="input-box">
<input class="input-value" v-model="formData[item.value]" :type="item.inputType || 'text'" <input
@blur="handleBlur($event, item)" :placeholder="item.placeholder || '请输入'" 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" :maxlength="item.maxlength ? item.maxlength : -1"
@input="item.inputType === 'number' && item.maxlength ? (formData[item.value] = String($event.target.value).slice(0, item.maxlength)) : null" /> placeholder-class="input-placeholder"
<view v-if="item.valueIcon" :class="['sprite-icon', `icon-${item.valueIcon}`]" @input="item.inputType === 'number' && item.maxlength ? (formData[item.value] = String($event.target.value).slice(0, item.maxlength)) : null"
@click="onValueClick(item)"></view> />
<view
v-if="item.valueIcon"
:class="['sprite-icon', `icon-${item.valueIcon}`]"
@click="onValueClick(item)"
></view>
</view> </view>
</template> </template>
<!-- 下拉选择 --> <!-- 下拉选择 -->
...@@ -41,20 +83,43 @@ ...@@ -41,20 +83,43 @@
</template> </template>
<!-- 单选框 --> <!-- 单选框 -->
<template v-else-if="item.type === 'radio'"> <template v-else-if="item.type === 'radio'">
<radio-group class="radio-group value" @change="onRadioChange($event, item)"> <radio-group
<label class="uni-list-cell uni-list-cell-pd" v-for="radio in item.radioList" :key="radio.value + item.value"> class="radio-group value"
<radio style="transform: scale(0.7)" :value="radio.value" :disabled="item.disabled || radio.disabled" :checked="radio.value == item.current" /> @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> <view class="radio-name">{{ radio.name }}</view>
</label> </label>
</radio-group> </radio-group>
</template> </template>
<!-- 多行文本 --> <!-- 多行文本 -->
<template v-else-if="item.type === 'textarea'"> <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> </template>
</view> </view>
</view> </view>
<slot v-if="item.addHtml" :name="item.addHtml"></slot> <slot
v-if="item.addHtml"
:name="item.addHtml"
></slot>
</view> </view>
</view> </view>
</template> </template>
...@@ -86,29 +151,33 @@ export default { ...@@ -86,29 +151,33 @@ export default {
formData: { formData: {
type: Object, type: Object,
default: () => ({}) default: () => ({})
},
titleList: {
type: Array,
default: () => []
} }
}, },
data() { data () {
return { return {
userInfo: {} userInfo: {}
} }
}, },
mounted() { mounted () {
this.userInfo = uni.$storage.get('userInfo') || {} this.userInfo = uni.$storage.get('userInfo') || {}
}, },
methods: { methods: {
onCellClick(item) { onCellClick (item) {
if (item.type === 'select') { if (item.type === 'select') {
this.$emit('handleCell', item) this.$emit('handleCell', item)
} }
}, },
onRadioChange(e, item) { onRadioChange (e, item) {
this.$emit('radioChange', e, item) this.$emit('radioChange', e, item)
}, },
onValueClick(item) { onValueClick (item) {
this.$emit('handleValue', item) this.$emit('handleValue', item)
}, },
handleBlur(e, item) { handleBlur (e, item) {
this.$emit('inputBlur', e, item) this.$emit('inputBlur', e, item)
} }
} }
...@@ -116,13 +185,27 @@ export default { ...@@ -116,13 +185,27 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.gl-cell {
.cell-box-block {
&:first-child {
.cell-box {
margin-top: 0;
}
}
}
}
.cell-box { .cell-box {
background-color: #fff; background-color: #fff;
border-radius: toRpx(16); border-radius: toRpx(16);
overflow: hidden; 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 { .cell-row {
padding-left: toRpx(32); padding-left: toRpx(32);
} }
...@@ -216,14 +299,19 @@ export default { ...@@ -216,14 +299,19 @@ export default {
.sprite-icon { .sprite-icon {
margin-left: toRpx(8); margin-left: toRpx(8);
} }
.input-placeholder {
color: #999ea8 !important;
font-size: toRpx(28) !important;
}
} }
.input-value { .input-value {
height: 100%; height: 100%;
text-align: right; text-align: right;
width: 100%; width: 100%;
border: none;
padding: 0;
} }
.input-bottom { .input-bottom {
min-height: toRpx(100); min-height: toRpx(100);
line-height: toRpx(56); 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 @@ ...@@ -26,7 +26,7 @@
:class="[ :class="[
{'sub-brand-name':j.isTitle}, {'sub-brand-name':j.isTitle},
{'item flex':!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)" @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 \ 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> <template>
<view class="employee-list"> <view class="employee-list">
<template v-for="(i, index) in 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> <view class="sprite-icon icon-tag-checked"></view>
{{ i.staffName }} {{ i.staffName }}
</view> </view>
...@@ -28,16 +32,18 @@ export default { ...@@ -28,16 +32,18 @@ export default {
{ cacheData } = params { cacheData } = params
this.currentId = '' this.currentId = ''
if (!search && cacheData && cacheData.length) { if (!search && cacheData && cacheData.length) {
console.log('getList', params,data)
this.initData(cacheData) this.initData(cacheData)
return return
} }
this.componentLoading(params)
const { shopMerchantId, sceneType, merchantId } = userInfo, const { shopMerchantId, sceneType, merchantId } = userInfo,
data = await uni.$api.popupApi.getEmployeeList({ apiTargetName = sceneType == 1 ? 'getEmployeeList' : 'getOrderScreenEmployeeList',
apiParams = {
merchantId: params.idKey == 'sellerUserId' ? merchantId : shopMerchantId, merchantId: params.idKey == 'sellerUserId' ? merchantId : shopMerchantId,
sceneList: params.idKey == 'sellerUserId' ? '' : [sceneType], sceneList: params.idKey == 'sellerUserId' ? '' : [sceneType],
name: searchValue }
}) if (searchValue) apiParams.name = searchValue
const data = await uni.$api.popupApi[apiTargetName](apiParams)
this.updateParams(params, data || []) this.updateParams(params, data || [])
}, },
initData (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 { ...@@ -23,6 +23,9 @@ export default {
}, },
noData () { noData () {
return !this.listData.length return !this.listData.length
},
sceneType(){
return uni.$storage.get('userInfo').sceneType
} }
}, },
watch: { watch: {
...@@ -42,7 +45,10 @@ export default { ...@@ -42,7 +45,10 @@ export default {
params.cacheData = data params.cacheData = data
} }
this.$emit('update:params', params) this.$emit('update:params', params)
},
componentLoading (params) {
params.loadComplete = false
this.$emit('update:params', this.params)
} }
} }
......
...@@ -14,6 +14,12 @@ ...@@ -14,6 +14,12 @@
* 11:套餐 * 11:套餐
* 12:其他精品 * 12:其他精品
* 13:时间选择 * 13:时间选择
* 14: 代保管人员
* 15: 商品类目
* 16: 年龄区间
* 17:所在城市
* 18: 座位数
* 19: 客户档案
*/ */
const componentConfig = { const componentConfig = {
...@@ -179,6 +185,41 @@ const componentConfig = { ...@@ -179,6 +185,41 @@ const componentConfig = {
title: '选择商品类目', title: '选择商品类目',
hideSearch: true, hideSearch: true,
loadComplete: false 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 } export default { componentConfig }
...@@ -44,6 +44,10 @@ import DateTime from './components/DateTime.vue' ...@@ -44,6 +44,10 @@ import DateTime from './components/DateTime.vue'
import DateTimeChange from './components/DateTimeChange.vue' import DateTimeChange from './components/DateTimeChange.vue'
import AgreementList from './components/AgreementList.vue' import AgreementList from './components/AgreementList.vue'
import GoodsCategory from './components/GoodsCategory.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 { export default {
components: { components: {
Popup, Popup,
...@@ -58,7 +62,11 @@ export default { ...@@ -58,7 +62,11 @@ export default {
DateTime, DateTime,
AgreementList, AgreementList,
DateTimeChange, DateTimeChange,
GoodsCategory GoodsCategory,
AgeRange,
City,
Seat,
Customer
}, },
name: '', name: '',
props: { props: {
...@@ -82,7 +90,8 @@ export default { ...@@ -82,7 +90,8 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
defaultTime: String defaultTime: String,
popupTitle: String
}, },
provide () { provide () {
...@@ -129,7 +138,7 @@ export default { ...@@ -129,7 +138,7 @@ export default {
}, },
computed: { computed: {
title () { title () {
return config.componentConfig[this.popupType].title return this.popupTitle || config.componentConfig[this.popupType].title
}, },
userInfo () { userInfo () {
return uni.$storage.get("userInfo") return uni.$storage.get("userInfo")
...@@ -310,6 +319,9 @@ export default { ...@@ -310,6 +319,9 @@ export default {
} }
.hide-search { .hide-search {
height: calc(100% - #{toRpx(280)}); height: calc(100% - #{toRpx(280)});
.popup-scroll-view{
padding-top: 0;
}
} }
.popup-footer { .popup-footer {
padding: toRpx(64) 0; padding: toRpx(64) 0;
......
...@@ -215,11 +215,10 @@ ...@@ -215,11 +215,10 @@
</template> </template>
<NoticePopup <NoticePopup
ref="reportNotice" ref="reportNotice"
title="提交成功" :title="noticeObj.title"
text="您的日报已提交成功" :text="noticeObj.text"
type="success" :type="noticeObj.type || 'success'"
:buttons="buttons" :buttons="noticeObj.buttons"
@buttonClick="back"
></NoticePopup> ></NoticePopup>
</view> </view>
</template> </template>
...@@ -243,6 +242,7 @@ export default { ...@@ -243,6 +242,7 @@ export default {
name: 'DailyReport', name: 'DailyReport',
data () { data () {
return { return {
noticeObj: {},
tabIndex: 0, tabIndex: 0,
to: '', to: '',
dateKey: {}, dateKey: {},
...@@ -608,13 +608,20 @@ export default { ...@@ -608,13 +608,20 @@ export default {
orderObj.recordStaffCount != value && orderObj.recordStaffCount != value &&
orderObj.lastStaffUuid && orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid userInfo.uuid != orderObj.lastStaffUuid
) uni.showModal({ ) {
title: '预警提示', this.noticeObj = {
content: `今日驻店人数与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,今日驻店人数将被清空。`, title: '重要提示',
showCancel: false, text: `今日驻店人数与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,今日驻店人数将被清空。`,
confirmText: '知道了', type: 'warning',
confirmColor: '#347BFF' buttons: [
}) {
text: '确定',
type: 'primary',
}
]
}
this.$nextTick(() => this.$refs.reportNotice.open())
}
} }
}, },
isNotEmpty (value) { isNotEmpty (value) {
...@@ -682,7 +689,21 @@ export default { ...@@ -682,7 +689,21 @@ export default {
uni.hideLoading() uni.hideLoading()
if (data) { if (data) {
this.isEditReport = false 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) { } catch (errorObj) {
uni.hideLoading() uni.hideLoading()
......
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
</view> </view>
</view> </view>
</template> </template>
<view class="form-item flex"> <!-- <view class="form-item flex">
<view class="label flex"> <view class="label flex">
未触客返店人数 未触客返店人数
</view> </view>
...@@ -191,7 +191,7 @@ ...@@ -191,7 +191,7 @@
:disabled="filterDisabled(isEditReport)" :disabled="filterDisabled(isEditReport)"
> >
</view> </view>
</view> </view> -->
<view class="form-item flex"> <view class="form-item flex">
<view class="label flex"> <view class="label flex">
备注 备注
...@@ -266,11 +266,10 @@ ...@@ -266,11 +266,10 @@
</template> </template>
<NoticePopup <NoticePopup
ref="reportNotice" ref="reportNotice"
title="提交成功" :title="noticeObj.title"
text="您的日报已提交成功" :text="noticeObj.text"
type="success" :type="noticeObj.type || 'success'"
:buttons="buttons" :buttons="noticeObj.buttons"
@buttonClick="back"
></NoticePopup> ></NoticePopup>
</view> </view>
</template> </template>
...@@ -297,6 +296,7 @@ export default { ...@@ -297,6 +296,7 @@ export default {
name: 'DailyReport', name: 'DailyReport',
data () { data () {
return { return {
noticeObj: {},
pickerTemplateList: Object.freeze([ pickerTemplateList: Object.freeze([
{ label: '单延保', value: 1 }, { label: '单延保', value: 1 },
{ label: '权益延保', value: 2 }, { label: '权益延保', value: 2 },
...@@ -357,7 +357,6 @@ export default { ...@@ -357,7 +357,6 @@ export default {
required: true, required: true,
min: 0, min: 0,
max: 100, max: 100,
inputPlaceholder: '',
refId: 'equityToShopCount', refId: 'equityToShopCount',
}, },
{ {
...@@ -367,16 +366,17 @@ export default { ...@@ -367,16 +366,17 @@ export default {
required: false, required: false,
min: 0, min: 0,
max: 100, max: 100,
},
{
label: '未触客返店人数',
key: 'notDeliveryReturnCount',
type: 'number',
min: 0,
max: 100,
} }
]), ]),
weeklyList: [], weeklyList: [],
isEditReport: false, isEditReport: false,
buttons: Object.freeze([
{
text: '返回首页',
type: 'primary'
}
]),
} }
}, },
computed: { computed: {
...@@ -500,11 +500,9 @@ export default { ...@@ -500,11 +500,9 @@ export default {
eventCode: 'app_daily_report' eventCode: 'app_daily_report'
}) //驻店日报埋点 }) //驻店日报埋点
this.initData() this.initData()
this.isEditReport = false
}, },
methods: { methods: {
back () {
uni.navigateBack()
},
initData () { initData () {
const { merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo const { merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo
this.orderObj = { this.orderObj = {
...@@ -695,13 +693,20 @@ export default { ...@@ -695,13 +693,20 @@ export default {
orderObj.recordStaffCount != value && orderObj.recordStaffCount != value &&
orderObj.lastStaffUuid && orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid userInfo.uuid != orderObj.lastStaffUuid
) uni.showModal({ ) {
title: '预警提示', this.noticeObj = {
content: `今日驻店人数与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,今日驻店人数将被清空。`, title: '重要提示',
showCancel: false, text: `今日驻店人数与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,今日驻店人数将被清空。`,
confirmText: '知道了', type: 'warning',
confirmColor: '#347BFF' buttons: [
}) {
text: '确定',
type: 'primary',
}
]
}
this.$nextTick(() => this.$refs.reportNotice.open())
}
} }
}, },
isNotEmpty (value) { isNotEmpty (value) {
...@@ -724,15 +729,11 @@ export default { ...@@ -724,15 +729,11 @@ export default {
} }
}, },
async submit () { async submit () {
uni.showLoading({
title: '提交中',
mask: true
})
uni.$track.add({ uni.$track.add({
eventCode: 'app_submit_daily_report' eventCode: 'app_submit_daily_report'
}) //提交驻店日报埋点 }) //提交驻店日报埋点
try { try {
let { orderObj, carBandList, hwOhterObjArray } = this let { orderObj, carBandList, hwOhterObjArray, userInfo } = this
orderObj.isAdmin = false orderObj.isAdmin = false
orderObj.oprBy = orderObj.staffUuid orderObj.oprBy = orderObj.staffUuid
orderObj.sceneType = 0 orderObj.sceneType = 0
...@@ -758,11 +759,33 @@ export default { ...@@ -758,11 +759,33 @@ export default {
item.equityToShopCount = item.equityToShopCount || 0 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) const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj)
uni.hideLoading() uni.hideLoading()
if (data) { if (data) {
this.isEditReport = false 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) { } catch (errorObj) {
uni.hideLoading() uni.hideLoading()
...@@ -802,7 +825,55 @@ export default { ...@@ -802,7 +825,55 @@ export default {
}, },
hideSelect () { hideSelect () {
this.$refs?.selectComponent?.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> </script>
...@@ -920,7 +991,7 @@ export default { ...@@ -920,7 +991,7 @@ export default {
overflow: hidden; overflow: hidden;
border-radius: toRpx(32); border-radius: toRpx(32);
.car-band-form-box { .car-band-form-box {
height: toRpx(384); height: toRpx(480);
position: relative; position: relative;
.box { .box {
position: absolute; position: absolute;
......
<template> <template>
<view> <view>
<view class="shop-list"> <view class="shop-list">
<view class="shop-item" v-for="(item, index) in list" :key="index"> <view
<view class="sprite-icon icon-blue-delete" @click="deleteGoods(index)"></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="right">
<view class="shop-name">商品名称:{{ item.multipleSpecificationsGoods ? <view class="shop-name">{{ goodsName(item) }}</view>
item.multipleSpecificationsGoods.baseGoodsName : item.goods.goodsAlias || item.goods.upgradeGoodsName || <view
item.goods.goodsInfo.goodsName }}</view> class="alias"
<view class="alias" v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.goodsAlias"
v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.goodsAlias">商品别名:{{ >商品别名:{{
item.multipleSpecificationsGoods.goods.goodsAlias }}</view> item.multipleSpecificationsGoods.goods.goodsAlias }}</view>
<view class="front-gear-box"> <view class="front-gear-box">
<view class="front-gear-input-box"> <view class="front-gear-input-box">
<template <template v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.specificationStr">
v-if="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods.specificationStr">
<view class="front-gear-label"> <view class="front-gear-label">
{{item.multipleSpecificationsGoods.goods.specificationStr}} {{item.multipleSpecificationsGoods.goods.specificationStr}}
</view> </view>
</template> </template>
<template v-if="item.goods"> <template v-if="item.goods">
<template <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)">
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"> <view class="front-gear-label">
{{ formatPosition((item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition), {{ formatPosition((item.goods.merchantGoodsPosition || item.goods.upgradeGoodsPosition),
positionTypeList)}} positionTypeList)}}
</view> </view>
</template> </template>
<template <template v-if="(item.goods.goodsInfo.goodsType == 1 || item.goods.upgradeGoodsType == 1) && !item.goods.merchantGoodsPosition && !item.goods.upgradeGoodsPosition">无部位属性</template>
v-if="(item.goods.goodsInfo.goodsType == 1 || item.goods.upgradeGoodsType == 1) && !item.goods.merchantGoodsPosition && !item.goods.upgradeGoodsPosition">无部位属性</template>
</template> </template>
<view class="front-gear-input"> <view class="front-gear-input">
<view class="unit">¥</view> <view class="unit">¥</view>
<template v-if="item.multipleSpecificationsGoods"> <template v-if="item.multipleSpecificationsGoods">
<input class="uni-input" type="digit" maxlength="9" placeholder="请输入价格" <input
class="uni-input"
type="digit"
maxlength="9"
placeholder="请输入价格"
placeholder-style="font-size: 14px" placeholder-style="font-size: 14px"
v-model="item.multipleSpecificationsGoods.goods.sellPrice" v-model="item.multipleSpecificationsGoods.goods.sellPrice"
@blur="validatePrice($event, item, index)" /> @blur="validatePrice($event, item, index)"
/>
</template> </template>
<template v-else> <template v-else>
<input class="uni-input" type="digit" maxlength="9" placeholder="请输入价格" <input
class="uni-input"
type="digit"
maxlength="9"
placeholder="请输入价格"
placeholder-style="font-size: 14px" placeholder-style="font-size: 14px"
v-model="item.goods.sellPrice" v-model="item.goods.sellPrice"
@blur="validatePrice($event, item, index)" /> @blur="validatePrice($event, item, index)"
/>
</template> </template>
<!-- <input class="uni-input" type="digit" maxlength="9" placeholder="请输入价格" <!-- <input class="uni-input" type="digit" maxlength="9" placeholder="请输入价格"
placeholder-style="font-size: 14px" placeholder-style="font-size: 14px"
...@@ -50,21 +64,35 @@ ...@@ -50,21 +64,35 @@
</view> </view>
</view> </view>
<view class="control"> <view class="control">
<view class="minus" @click="decreaseNumber(item)">-</view> <view
class="minus"
@click="decreaseNumber(item)"
>-</view>
<template v-if="item.multipleSpecificationsGoods"> <template v-if="item.multipleSpecificationsGoods">
<input class="uni-input control-input" type="number" maxlength="3" <input
class="uni-input control-input"
type="number"
maxlength="3"
v-model="item.multipleSpecificationsGoods.number" v-model="item.multipleSpecificationsGoods.number"
@blur="validateNumber($event, item)" /> @blur="validateNumber($event, item)"
/>
</template> </template>
<template v-else> <template v-else>
<input class="uni-input control-input" type="number" maxlength="3" <input
class="uni-input control-input"
type="number"
maxlength="3"
v-model="item.goods.number" v-model="item.goods.number"
@blur="validateNumber($event, item)" /> @blur="validateNumber($event, item)"
/>
</template> </template>
<!-- <input class="uni-input control-input" type="number" maxlength="3" <!-- <input class="uni-input control-input" type="number" maxlength="3"
:value="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods ? item.multipleSpecificationsGoods.goods.number : item.goods.number" :value="item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods ? item.multipleSpecificationsGoods.goods.number : item.goods.number"
@blur="validateNumber($event, item)" /> --> @blur="validateNumber($event, item)" /> -->
<view class="add" @click="increaseNumber(item)">+</view> <view
class="add"
@click="increaseNumber(item)"
>+</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -90,21 +118,30 @@ export default { ...@@ -90,21 +118,30 @@ export default {
default: {} default: {}
} }
}, },
created() { created () {
// 初始化商品数量 // 初始化商品数量
this.initProductNumbers() this.initProductNumbers()
}, },
mounted() { mounted () {
// 确保每次使用组件时都检查并设置number属性 // 确保每次使用组件时都检查并设置number属性
this.initProductNumbers() this.initProductNumbers()
}, },
updated() { updated () {
// 当组件数据更新时也检查number属性 // 当组件数据更新时也检查number属性
this.initProductNumbers() this.initProductNumbers()
}, },
methods: { 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) { if (this.list && this.list.length > 0) {
this.list.forEach(item => { this.list.forEach(item => {
if (!item.multipleSpecificationsGoods) { if (!item.multipleSpecificationsGoods) {
...@@ -117,20 +154,22 @@ export default { ...@@ -117,20 +154,22 @@ export default {
if (!item.multipleSpecificationsGoods.number) { if (!item.multipleSpecificationsGoods.number) {
this.$set(item.multipleSpecificationsGoods, 'number', '1') this.$set(item.multipleSpecificationsGoods, 'number', '1')
} }
} else {
} }
}) })
} }
}, },
filterIncludes(item, arr) { filterIncludes (item, arr) {
return arr.indexOf(item) > -1 return arr.indexOf(item) > -1
}, },
// 格式化位置信息 // 格式化位置信息
formatPosition(item, positionTypeList) { formatPosition (item, positionTypeList) {
const filterData = positionTypeList.filter(v => v.positionValue == item) const filterData = positionTypeList.filter(v => v.positionValue == item)
return (filterData.length && filterData[0] && filterData[0].positionName) || '' return (filterData.length && filterData[0] && filterData[0].positionName) || ''
}, },
// 验证价格输入 // 验证价格输入
validatePrice(event, item, index) { validatePrice (event, item, index) {
let value = event.detail.value let value = event.detail.value
console.log('value', value) console.log('value', value)
// 如果为空则设置为0 // 如果为空则设置为0
...@@ -194,7 +233,7 @@ export default { ...@@ -194,7 +233,7 @@ export default {
this.$emit('changeTotalPrice') this.$emit('changeTotalPrice')
}, },
// 验证数量输入 // 验证数量输入
validateNumber(event, item) { validateNumber (event, item) {
let value = event.detail.value let value = event.detail.value
// 限制只能输入整数 // 限制只能输入整数
value = value.replace(/[^\d]/g, '') value = value.replace(/[^\d]/g, '')
...@@ -214,7 +253,7 @@ export default { ...@@ -214,7 +253,7 @@ export default {
this.$emit('changeTotalPrice') this.$emit('changeTotalPrice')
}, },
// 增加数量 // 增加数量
increaseNumber(item) { increaseNumber (item) {
if (!item.multipleSpecificationsGoods) { if (!item.multipleSpecificationsGoods) {
// 处理普通商品 // 处理普通商品
if (!item.goods.number) { if (!item.goods.number) {
...@@ -239,7 +278,7 @@ export default { ...@@ -239,7 +278,7 @@ export default {
this.$emit('changeTotalPrice') this.$emit('changeTotalPrice')
}, },
// 减少数量 // 减少数量
decreaseNumber(item) { decreaseNumber (item) {
if (!item.multipleSpecificationsGoods) { if (!item.multipleSpecificationsGoods) {
// 处理普通商品 // 处理普通商品
// 如果商品数量不存在或小于等于1,设置为1 // 如果商品数量不存在或小于等于1,设置为1
...@@ -266,7 +305,7 @@ export default { ...@@ -266,7 +305,7 @@ export default {
this.$emit('changeTotalPrice') this.$emit('changeTotalPrice')
}, },
// 删除商品 // 删除商品
deleteGoods(index) { deleteGoods (index) {
this.list.splice(index, 1) this.list.splice(index, 1)
this.$emit('changeTotalPrice') this.$emit('changeTotalPrice')
} }
......
const FORM_LIST = [ const FORM_LIST = [
[ [
{ {
label: '销售顾问', label: '销售顾问/录单员',
value: 'employeeName', value: 'employeeName',
type: 'select', type: 'select',
// key: 'staffName', key: 'employeeName',
required: true, required: true,
showText: 'shopMerchantName' showText: 'shopMerchantName'
}, },
...@@ -13,36 +13,27 @@ const FORM_LIST = [ ...@@ -13,36 +13,27 @@ const FORM_LIST = [
value: 'deliveryEmployeeName', value: 'deliveryEmployeeName',
type: 'select', type: 'select',
required: true, required: true,
// key: 'staffName', key: 'deliveryEmployeeName',
hidden: true,
showText: 'shopMerchantName' 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: '车主姓名', label: '姓名',
value: 'customerName', value: 'owner',
maxlength: '16', maxlength: '16',
type: 'input', type: 'input',
required: true required: true
}, },
{ {
label: '联系电话',
value: 'phone',
maxlength: '11',
type: 'input',
required: true,
inputType: 'number'
},
{
label: '客户来源', label: '客户来源',
value: 'salesType', value: 'salesType',
type: 'radio', type: 'radio',
...@@ -61,139 +52,100 @@ const FORM_LIST = [ ...@@ -61,139 +52,100 @@ const FORM_LIST = [
}, },
{ {
label: '性别', label: '性别',
value: 'customerSex', value: 'ownerGender',
type: 'radio', type: 'radio',
current: '1', current: '男',
radioList: [ radioList: [
{ {
value: '1', value: '男',
name: '男' name: '先生'
}, },
{ {
value: '2', value: '女',
name: '女' name: '女士'
} }
] ]
}, },
{ {
label: '手机号', label: '年龄区间',
value: 'customerPhone', value: 'ageRange',
maxlength: '11', type: 'select',
type: 'input', key: 'ageRange'
required: true,
inputType: 'number'
}, },
{ {
label: '选择车型', label: '所在城市',
value: 'carBrand', value: 'city',
type: 'select', type: 'select',
key: 'carInfo' key: 'city'
}, },
{ {
label: '车架号(VIN)', label: '证件号码',
value: 'standNo', value: 'certificateNo',
maxlength: '17', maxlength: '18',
type: 'input' type: 'input'
}, },
{ {
label: '车牌号', label: '兴趣爱好',
value: 'plateNumber', value: 'hobby',
maxlength: '8', maxlength: '200',
type: 'input' type: 'input'
}, },
{ {
label: '是否体验', label: '陪伴人员',
value: 'experienceFlag', value: 'companion',
type: 'radio', maxlength: '200',
current: 'Y', type: 'input'
radioList: [
{
value: 'Y',
name: '是'
}, },
{
value: 'N',
name: '否'
}
]
}
], ],
[ [
{ {
label: '精品礼券', label: '车型',
value: 'couponInfo', value: 'carBrandText',
type: 'select', type: 'select',
key: 'name', key: 'carBrand',
required: true
},
{
label: '请选择产品',
onlyLabel: true,
required: true, 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: '后侧窗玻璃', label: '车辆颜色',
value: 'rearGear', value: 'carColor',
type: 'select', maxlength: '20',
key: 'name', type: 'input'
labellIcon: 'rear-gear',
addHtml: 'rearGear',
hidden: true
}, },
{ {
label: '后档', label: '车架号',
value: 'rearWindow', value: 'carVin',
type: 'select', maxlength: '17',
key: 'name', type: 'input',
labellIcon: 'rear-window', required: true
addHtml: 'rearWindow',
hidden: true
}, },
{ {
label: '天窗', label: '座位数',
value: 'sunRoof', value: 'seat',
type: 'select', type: 'select',
key: 'name', key: 'seat',
labellIcon: 'sun-roof', required: true
addHtml: 'sunRoof',
hidden: true
}, },
{ {
label: '套餐', label: '车辆价格',
value: 'package', value: 'price',
type: 'select', maxlength: '8',
key: 'name', type: 'input',
addHtml: 'package' required: true,
}, },
],
[
{ {
label: '其他精品', label: '购买商品',
value: 'skuGoods', value: 'skuGoods',
type: 'select', type: 'select',
key: 'name', key: 'skuGoods',
addHtml: 'skuGoods' addHtml: 'skuGoods'
}, },
],
[
{ {
label: '收款方式', label: '收款方',
value: 'payeeType', value: 'payee',
type: 'radio', type: 'radio',
key: 'name', key: 'name',
current: '1', current: '1',
...@@ -212,7 +164,7 @@ const FORM_LIST = [ ...@@ -212,7 +164,7 @@ const FORM_LIST = [
}, },
{ {
label: '支付方式', label: '支付方式',
value: 'selectPayType', value: 'payType',
type: 'radio', type: 'radio',
key: 'name', key: 'name',
current: '0', current: '0',
...@@ -231,15 +183,20 @@ const FORM_LIST = [ ...@@ -231,15 +183,20 @@ const FORM_LIST = [
// } // }
], ],
addHtml: 'otherPay' addHtml: 'otherPay'
} },
], {
[ label: '嘀加收款时间',
value: 'successDateTime',
key: 'todayShow',
type: 'select',
required: true
},
{ {
label: '备注', label: '备注',
value: 'remark', value: 'notes',
maxlength: '100', maxlength: '30',
type: 'textarea', type: 'textarea',
placeholder: '请输入 (100字以内)', placeholder: '请输入 (30字以内)',
class: 'cell-break' class: 'cell-break'
} }
] ]
...@@ -452,7 +409,7 @@ const DEFEAT_FORM_LIST = [ ...@@ -452,7 +409,7 @@ const DEFEAT_FORM_LIST = [
}, },
{ {
label: '收款方式', label: '收款方式',
value: 'payeeType', value: 'payee',
type: 'radio', type: 'radio',
key: 'name', key: 'name',
current: '1', current: '1',
...@@ -472,7 +429,7 @@ const DEFEAT_FORM_LIST = [ ...@@ -472,7 +429,7 @@ const DEFEAT_FORM_LIST = [
}, },
{ {
label: '支付方式', label: '支付方式',
value: 'selectPayType', value: 'payType',
type: 'radio', type: 'radio',
key: 'name', key: 'name',
current: '0', current: '0',
...@@ -612,7 +569,25 @@ const popupTypeEnum = { ...@@ -612,7 +569,25 @@ const popupTypeEnum = {
13: { 13: {
key: 'todayShow', key: 'todayShow',
list: '' list: ''
},
16: {
key: 'ageRange'
},
17: {
key: 'city'
},
18: {
key: 'seat'
},
19: {
key: 'customer'
} }
} }
const titleList = [
export { FORM_LIST, popupTypeEnum, payTypeList, DEFEAT_FORM_LIST } 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!