Commit 95f7f0f6 by 李伟康

feat: 新增日报相关功能并优化门店日报流程

1.  新增多选组件OptionsComponent,支持自定义多选场景
2.  新增日报标签、实际交付日期字段,适配精品和权益工具页
3.  调整环境配置,切换默认环境为uat
4.  新增客户标签映射字典与格式化展示
5.  优化弹窗交互与表单校验逻辑
6.  新增门店日报专属路由与拦截配置
7.  修复部分页面样式与代码格式问题
1 parent f9fe7ce2
......@@ -221,14 +221,14 @@ export default {
pageDirect: true,
noInterception: true
},
{
icon: 'negotiation-detail',
name: 'NegotiationDetail',
label: '洽谈明细',
page: '/pages/common/dailyNewspaper/index',
eventCode: 'negotiation_detail_page',
noInterception: true
},
// {
// icon: 'negotiation-detail',
// name: 'NegotiationDetail',
// label: '洽谈明细',
// page: '/pages/common/dailyNewspaper/index',
// eventCode: 'negotiation_detail_page',
// noInterception: true
// },
]
try {
let userInfo = uni.$storage.get('userInfo'),
......@@ -236,14 +236,15 @@ export default {
newReport = await this.isNewVersionNeed(shopMerchantId)
if (newReport && sceneType != 7) {
let [staffDailyReport] = entranceList
entranceList[0] = {
...staffDailyReport,
name: 'staffDailyReport',
page: '/pages/common/dailyNewspaper/index',
eventCode: 'staff_daily_report_page',
}
// entranceList[0] = {
// ...staffDailyReport,
// name: 'staffDailyReport',
// page: '/pages/common/dailyNewspaper/index',
// eventCode: 'staff_daily_report_page',
// }
delete entranceList[0]
entranceList.map(e => {
if (['staffDailyReport', 'storeDailyReport', 'NegotiationDetail'].includes(e.name)) e.sceneType = [0, 1]
if (['storeDailyReport'].includes(e.name)) e.sceneType = [0, 1]
})
}
this.$store.dispatch('setNewReport', newReport)
......
<template>
<view class="gl-cell">
<view
v-for="(items, boxIdx) in formList"
:key="boxIdx"
class="cell-box-block"
>
<view
class="cell-box"
v-if="items.some(i => !i.hidden)"
:style="cellBoxStyle"
>
<view v-for="(items, boxIdx) in formList" :key="boxIdx" class="cell-box-block">
<view class="cell-box" v-if="items.some(i => !i.hidden)" :style="cellBoxStyle">
<template v-if="titleList.length">
<view
class="cell-title flex"
v-if="titleList[boxIdx] && (titleList[boxIdx].name || titleList[boxIdx].addHtml)"
>
<view class="cell-title flex"
v-if="titleList[boxIdx] && (titleList[boxIdx].name || titleList[boxIdx].addHtml)">
<template v-if="titleList[boxIdx].name">
{{titleList[boxIdx].name}}
{{ titleList[boxIdx].name }}
</template>
<template v-if="titleList[boxIdx].addHtml">
<slot :name="titleList[boxIdx].addHtml" />
</template>
<template v-if="collapseControl">
<view
:class="['collapse-control',{down:!titleList[boxIdx].collapseAll}]"
@click="collapseAll(boxIdx)"
>
<view :class="['collapse-control', { down: !titleList[boxIdx].collapseAll }]"
@click="collapseAll(boxIdx)">
<view class="sprite-icon icon-collapse-all"></view>
</view>
</template>
......@@ -33,53 +21,29 @@
</template>
<template v-for="(item, idx) in items">
<view :key="idx">
<view
:class="['cell-row',{'cell-hide':collapseControl && !titleList[boxIdx].collapseAll}]"
:key="idx"
v-if="!item.hidden"
>
<view
class="cell"
@click="onCellClick(item)"
:class="[item.noBorder ? '' : 'border', item.onlyLabel ? 'small-height' : '', item.class]"
>
<view :class="['cell-row', { 'cell-hide': collapseControl && !titleList[boxIdx].collapseAll }]" :key="idx"
v-if="!item.hidden">
<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>
<template v-if="item.labelTips">
<view
class="label-tips"
@click.stop="onLabelTipsClick(item)"
>{{ item.labelTips }}</view>
<view class="label-tips" @click.stop="onLabelTipsClick(item)">{{ item.labelTips }}</view>
</template>
</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 || '请输入'"
:maxlength="item.maxlength ? item.maxlength : -1"
placeholder-class="input-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" placeholder-class="input-placeholder"
@input="item.inputType === 'number' && item.maxlength ? (formData[item.value] = String($event.target.value).slice(0, item.maxlength)) : null"
:disabled="item.readonly || item.disabled || false"
/>
<view
v-if="item.valueIcon"
:class="['sprite-icon', `icon-${item.valueIcon}`]"
@click="onValueClick(item)"
></view>
:disabled="item.readonly || item.disabled || false" />
<view v-if="item.valueIcon" :class="['sprite-icon', `icon-${item.valueIcon}`]"
@click="onValueClick(item)"></view>
</view>
</template>
<!-- 下拉选择 -->
......@@ -100,43 +64,39 @@
</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.65) translateY(-3px)"
:value="radio.value"
:disabled="item.disabled || radio.disabled"
:checked="radio.value == item.current"
/>
<view class="radio-name">{{ radio.name }}</view>
</label>
</radio-group>
<template v-if="item.multiple">
<view class="radio-group value">
<label class="uni-list-cell uni-list-cell-pd" v-for="radio in item.radioList"
:key="radio.value + item.value" @click="onRadioChange(radio.value, item)">
<radio style="transform: scale(0.65) translateY(-3px)" :value="radio.value"
:disabled="item.disabled || radio.disabled"
color="#4673FF"
:checked="formData[item.value] && formData[item.value].includes(radio.value)" />
<view class="radio-name">{{ radio.name }}</view>
</label>
</view>
</template>
<template v-else>
<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.65) translateY(-3px)" :value="radio.value"
color="#4673FF"
:disabled="item.disabled || radio.disabled" :checked="radio.value == item.current" />
<view class="radio-name">{{ radio.name }}</view>
</label>
</radio-group>
</template>
</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>
<template v-else-if="item.type === 'single-calendar'">
<view
class="value"
@click="openCalendar(boxIdx,idx)"
>
<template v-if="!item.addHtml && formData[item.value]">
<view class="value" @click="openCalendar(boxIdx, idx)">
<template v-if="!item.addHtml && formData[item.value]">
{{ formData[item.value] }}
</template>
<template v-else>
......@@ -144,23 +104,14 @@
</template>
<view class="sprite-icon icon-icon-select"></view>
</view>
<uni-calendar
:ref="`calendar-${boxIdx}-${idx}`"
:insert="false"
:clearDate="false"
:startDate="item.startDate || ''"
:endDate="item.endDate || ''"
:date="formData[item.value] || item.endDate"
showBottomBtn
@confirm="confirmCalendar($event,item.value )"
/>
<uni-calendar :ref="`calendar-${boxIdx}-${idx}`" :insert="false" :clearDate="false"
:startDate="item.startDate || ''" :endDate="item.endDate || ''"
:date="formData[item.value] || item.endDate" showBottomBtn
@confirm="confirmCalendar($event, item.value)" />
</template>
<template v-else-if="item.type === 'range-calendar'">
<view
class="value"
@click="openCalendar(boxIdx,idx)"
>
<template v-if="!item.addHtml && formData[item.value]">
<view class="value" @click="openCalendar(boxIdx, idx)">
<template v-if="!item.addHtml && formData[item.value]">
{{ formData[item.value] }}
</template>
<template v-else>
......@@ -168,37 +119,21 @@
</template>
<view class="sprite-icon icon-icon-select"></view>
</view>
<uni-calendar
:ref="`calendar-${boxIdx}-${idx}`"
range
:insert="false"
:clearDate="false"
:startDate="item.startDate || ''"
:endDate="item.endDate || ''"
:rangeValue="formData[item.value]"
showBottomBtn
@confirm="confirmCalendar($event,item.value)"
/>
<uni-calendar :ref="`calendar-${boxIdx}-${idx}`" range :insert="false" :clearDate="false"
:startDate="item.startDate || ''" :endDate="item.endDate || ''" :rangeValue="formData[item.value]"
showBottomBtn @confirm="confirmCalendar($event, item.value)" />
</template>
<slot
v-else-if="item.cellHtml"
:name="item.cellHtml"
></slot>
<slot v-else-if="item.cellHtml" :name="item.cellHtml"></slot>
<template v-if="item.suffix">
<view class="suffix">{{item.suffix}}</view>
<view class="suffix">{{ item.suffix }}</view>
</template>
</view>
</view>
<slot
v-if="item.addHtml"
:name="item.addHtml"
></slot>
<slot v-if="item.addHtml" :name="item.addHtml"></slot>
</view>
<view
v-if="item.rowHtml"
:class="['row-html',{'cell-hide':collapseControl && !titleList[boxIdx].collapseAll}]"
>
<view v-if="item.rowHtml"
:class="['row-html', { 'cell-hide': collapseControl && !titleList[boxIdx].collapseAll }]">
<slot :name="item.rowHtml"></slot>
</view>
</view>
......@@ -241,40 +176,40 @@ export default {
cellBoxStyle: String,
index: Number
},
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, this.index)
}
},
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, this.index)
},
collapseAll (index) {
collapseAll(index) {
this.$emit('collapseAll', index)
},
confirmCalendar (e, key) {
confirmCalendar(e, key) {
this.$emit('confirmCalendar', e, key, this.index)
},
openCalendar (index, ind) {
openCalendar(index, ind) {
let [calendar] = this.$refs[`calendar-${index}-${ind}`]
if (calendar) calendar.open()
},
onLabelTipsClick (item) {
onLabelTipsClick(item) {
this.$emit('handleLabelTips', item)
}
}
......@@ -291,37 +226,45 @@ export default {
}
}
}
.cell-box {
background-color: #fff;
border-radius: toRpx(16);
overflow: hidden;
margin-top: toRpx(18);
}
.cell-title {
min-height: 72rpx;
padding: 0 32rpx;
color: #777;
font-size: 24rpx;
.collapse-control {
margin-left: auto;
width: 48rpx;
height: 48rpx;
transition: all 0.15s;
.sprite-icon {
zoom: 2;
}
}
.down {
transform: rotate(180deg);
}
}
.cell-row {
padding-left: toRpx(32);
transition: all 0.15s;
}
.cell-hide {
height: 0;
}
.cell {
display: flex;
align-items: center;
......@@ -348,12 +291,14 @@ export default {
font-size: toRpx(28);
display: flex;
align-items: center;
.label-tips {
margin-left: 8rpx;
color: #4673ff;
font-size: 24rpx;
font-weight: 400;
}
.sprite-icon {
margin-right: toRpx(8);
}
......@@ -389,10 +334,12 @@ export default {
font-size: toRpx(28);
display: flex;
align-items: center;
.suffix {
flex-shrink: 0;
margin-left: 16rpx;
}
uni-input {
font-size: toRpx(28);
}
......@@ -408,6 +355,7 @@ export default {
height: 100%;
width: 100%;
word-break: break-all;
.sprite-icon {
margin-bottom: toRpx(2);
}
......@@ -423,6 +371,7 @@ export default {
.sprite-icon {
margin-left: toRpx(8);
}
.input-placeholder {
color: #999ea8 !important;
font-size: toRpx(28) !important;
......@@ -437,6 +386,7 @@ export default {
padding: 0;
background-color: transparent;
}
.input-bottom {
min-height: toRpx(100);
line-height: toRpx(56);
......
......@@ -517,7 +517,7 @@ export default {
/**
* 获取员工场景小分类
*/
this.getStaffBaseSceneCodeList()
// this.getStaffBaseSceneCodeList()
/**
* 获取门店场景小分类
*/
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 3
const index = 1
/**
*
0本地
......
......@@ -98,13 +98,13 @@ export default {
if (currentPage.route == 'pages/boutique/tool/index') {
if (isNewReport)
uni.redirectTo({
url: `/pages/common/dailyNewspaper/index?componentName=StaffDailyReport&currentDate=${formattedDate}`
url: `/pages/common/dailyNewspaper/index?componentName=StoreDailyReport&currentDate=${formattedDate}`
})
else uni.$emit('jumpToDailyReport', formattedDate)
} else {
if (isNewReport)
uni.navigateTo({
url: `/pages/common/dailyNewspaper/index?componentName=StaffDailyReport&currentDate=${formattedDate}`
url: `/pages/common/dailyNewspaper/index?componentName=StoreDailyReport&currentDate=${formattedDate}`
})
else
uni.navigateTo({
......@@ -207,6 +207,7 @@ export default {
sceneType: 0
})
.then(data => {
return resolve(false)
if (data) {
// 获取当前日期
let currentDate = new Date()
......@@ -226,13 +227,13 @@ export default {
if (currentPage.route == 'pages/equity/tool/index') {
if (isNewReport)
uni.redirectTo({
url: `/pages/common/dailyNewspaper/index?componentName=StaffDailyReport&currentDate=${formattedDate}`
url: `/pages/common/dailyNewspaper/index?componentName=StoreDailyReport&currentDate=${formattedDate}`
})
else uni.$emit('jumpToDailyReport', formattedDate)
} else {
if (isNewReport)
uni.navigateTo({
url: `/pages/common/dailyNewspaper/index?componentName=StaffDailyReport&currentDate=${formattedDate}`
url: `/pages/common/dailyNewspaper/index?componentName=StoreDailyReport&currentDate=${formattedDate}`
})
else
uni.navigateTo({
......
......@@ -3,11 +3,13 @@
<view class="order-card" @click.stop="cardClick">
<view class="order-card-top-box flex justify-between">
<text>{{ orderCardDetail.customer.customerName }}</text>
<view class="status text-center" :style="{ color: orderCardDetail.statuscolor, 'background-color': orderCardDetail.statusbackground }">
<view class="status text-center"
:style="{ color: orderCardDetail.statuscolor, 'background-color': orderCardDetail.statusbackground }">
<view v-if="orderCardDetail.status == 1 || orderCardDetail.status == 3">
<view v-if="status[orderCardDetail.status].background">
<view class="arc y-center">
<view class="outside box-center" :style="{ 'background-color': status[orderCardDetail.status].background }" />
<view class="outside box-center"
:style="{ 'background-color': status[orderCardDetail.status].background }" />
<view class="inside box-center" :style="{ 'background-color': status[orderCardDetail.status].color }" />
</view>
</view>
......@@ -18,15 +20,15 @@
</view>
</view>
<view>
<view class="goods-list" :style="{ paddingBottom: cardGoodsList.length < 1 ? '0' : '' }" v-if="cardGoodsList.length > 0">
<view class="goods-list" :style="{ paddingBottom: cardGoodsList.length < 1 ? '0' : '' }"
v-if="cardGoodsList.length > 0">
<view>
<view v-for="(i, sindex) in cardGoodsList" :key="sindex" class="goods flex justify-between" :class="{ 'no-margin': cardGoodsList.length === 1 }" v-if="orderCardDetail.showAllGoodsListFlag ? true : sindex < 2">
<view v-for="(i, sindex) in cardGoodsList" :key="sindex" class="goods flex justify-between"
:class="{ 'no-margin': cardGoodsList.length === 1 }"
v-if="orderCardDetail.showAllGoodsListFlag ? true : sindex < 2">
<view class="goods-name flex align-center">
<view class="point"></view>
<view
v-if="shouldShowMarketingIcon(i)"
class="sprite-icon icon-activeIcon marketing-icon"
></view>
<view v-if="shouldShowMarketingIcon(i)" class="sprite-icon icon-activeIcon marketing-icon"></view>
<text class="goods-name-text text-hide">{{ getGoodsDisplayName(i) }}</text>
</view>
<view class="goods-price">
......@@ -75,41 +77,53 @@
</view>
</view>
<view class="info-box">
<view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryUserId ? pointsMultiObj : orderObj" :key="sindex">
<view class="order-list align-center"
v-for="(item, sindex) in orderCardDetail.deliveryUserId ? pointsMultiObj : orderObj" :key="sindex">
<view class="order flex align-center">
<view class="order-label">{{ item.label }}</view>
<view class="order-value flex">
<view v-if="item.arr" class="flex">
<view v-if="orderCardDetail[item.arr[1]]" class="flex">
<view v-for="(k, arr_index) in item.arr" :key="arr_index" class="flex">
<view class="order-value-item text-hide flex">
<view v-if="arr_index == 1">
<text class="split">|</text>
<template v-if="item.format">
{{ item.format(orderCardDetail) }}
</template>
<template v-else>
<view v-if="item.arr" class="flex">
<view v-if="orderCardDetail[item.arr[1]]" class="flex">
<view v-for="(k, arr_index) in item.arr" :key="arr_index" class="flex">
<view class="order-value-item text-hide flex">
<view v-if="arr_index == 1">
<text class="split">|</text>
</view>
{{ orderCardDetail[k] }}
</view>
{{ orderCardDetail[k] }}
</view>
</view>
<view v-else>{{ orderCardDetail[item.key] || '' }}</view>
</view>
<view v-else>{{ orderCardDetail[item.key] || '' }}</view>
</view>
<view v-else>{{ orderCardDetail[item.key] || '' }}</view>
</template>
</view>
</view>
</view>
</view>
<!-- 支付方式 -->
<view class="order-payType flex" v-if="orderCardDetail.selectPayType !== undefined && orderCardDetail.selectPayType !== null">
<view class="order-payType flex"
v-if="orderCardDetail.selectPayType !== undefined && orderCardDetail.selectPayType !== null">
<view class="payType flex align-center">
<view class="payType-label">支付方式</view>
<view class="payType-value flex align-center">
{{ payType[orderCardDetail['selectPayType']] }}
<image v-if="orderCardDetail.selectPayType == 1" class="payType-image" :src="IMG_URL + 'miniProgram/wxPay.png'" mode="" />
<image v-if="orderCardDetail.selectPayType == 2" class="payType-image" :src="IMG_URL + 'miniProgram/store_pay.png'" mode="" />
<image v-if="orderCardDetail.selectPayType == 3" class="payType-image" :src="IMG_URL + 'miniProgram/posPay.png'" mode="" />
<image v-if="orderCardDetail.selectPayType == 1" class="payType-image"
:src="IMG_URL + 'miniProgram/wxPay.png'" mode="" />
<image v-if="orderCardDetail.selectPayType == 2" class="payType-image"
:src="IMG_URL + 'miniProgram/store_pay.png'" mode="" />
<image v-if="orderCardDetail.selectPayType == 3" class="payType-image"
:src="IMG_URL + 'miniProgram/posPay.png'" mode="" />
</view>
</view>
<view v-if="orderCardDetail.status != 1 && orderCardDetail.selectPayType != 0 && orderCardDetail.total_price != 0" class="order-price flex align-center">
<view
v-if="orderCardDetail.status != 1 && orderCardDetail.selectPayType != 0 && orderCardDetail.total_price != 0"
class="order-price flex align-center">
<view class="order-price-label">实付金额</view>
<view class="price">
<text class="unit">¥</text>
......@@ -123,7 +137,8 @@
<view class="staff-label">施工技师</view>
<view class="staff-value">{{ orderCardDetail.technicianName }}</view>
</view>
<PublishPopup ref="recordOrderPopup" popupClass="recordOrderPopup" type="center" :showClose="true" :isMaskClick="false" title="请选择录单入口">
<PublishPopup ref="recordOrderPopup" popupClass="recordOrderPopup" type="center" :showClose="true"
:isMaskClick="false" title="请选择录单入口">
<template #content>
<view class="modatcontent">
<view class="modalbox com" :class="selectType == 1 ? 'act' : ''" @click="changeType(1)">
......@@ -134,11 +149,14 @@
<view class="sprite-icon icon-defeatOrder"></view>
战败下单
</view>
<view v-if="isSettingExpiredTraffic && !isScan" class="modalbox cancle" :class="selectType == 3 ? 'act' : ''" @click="changeType(3)">
<view v-if="isSettingExpiredTraffic && !isScan" class="modalbox cancle" :class="selectType == 3 ? 'act' : ''"
@click="changeType(3)">
<view class="sprite-icon icon-isExpiredTrafficIcon"></view>
失效客户
</view>
<view class="modalbox cancle" v-if="orderCardDetail.constructionFlag !== 'Y' && orderCardDetail.selectPayType !== 1 && orderCardDetail.selectPayType !== 3 && orderCardDetail.selectPayType !== 4 && orderCardDetail.status !== 9" :class="selectType == 4 ? 'act' : ''" @click="changeType(4)">
<view class="modalbox cancle"
v-if="orderCardDetail.constructionFlag !== 'Y' && orderCardDetail.selectPayType !== 1 && orderCardDetail.selectPayType !== 3 && orderCardDetail.selectPayType !== 4 && orderCardDetail.status !== 9"
:class="selectType == 4 ? 'act' : ''" @click="changeType(4)">
<view class="sprite-icon icon-revokeOrder"></view>
撤销工单
</view>
......@@ -152,7 +170,9 @@
</template>
</PublishPopup>
<!-- 学习中心权限弹窗 -->
<StudyPopup :show.sync="showStudyPermissionPopup" title="" :width="848" :height="870" :topImage="require('@/assets/images/common/warning-notice.webp')" :topImageWidth="848" :topImageHeight="248" style="overflow: hidden">
<StudyPopup :show.sync="showStudyPermissionPopup" title="" :width="848" :height="870"
:topImage="require('@/assets/images/common/warning-notice.webp')" :topImageWidth="848" :topImageHeight="248"
style="overflow: hidden">
<StudyCenterPermissionPopup :lockReason="lockReason" @confirm="handleStudyPermissionConfirm" />
</StudyPopup>
</view>
......@@ -167,6 +187,8 @@ import StudyPopup from '@/components/StudyPopup.vue'
import StudyCenterPermissionPopup from '@/components/StudyCenterPermissionPopup.vue'
import { shouldShowMarketingIcon as checkMarketingIcon } from '@/utils/marketingFlag'
import { debounce } from 'lodash'
import dayjs from 'dayjs'
export default {
mixins: [interceptionMixin],
name: 'OrderCard',
......@@ -203,6 +225,9 @@ export default {
return [...singles, ...packageList]
}
return subList
},
customerTags() {
return order_mixins.data.CUSTOMER_TAGS || {}
}
},
data() {
......@@ -216,6 +241,22 @@ export default {
key: 'baseSceneName'
},
{
label: '日报标签',
key: 'customerTags',
format: (item) => {
let val = item.customer?.customerTags
return val ? val.split(',').map(e => this.customerTags[e] || e).join('/') : '-'
}
},
{
label: '实际交付日期',
key: 'actualDeliveryDate',
format: (item) => {
let val = item.customer?.actualDeliveryDate
return val ? dayjs(val).format('YYYY-MM-DD') : '-'
}
},
{
label: '销售顾问 /录单员',
arr: ['merchantName', 'employeeName']
},
......@@ -242,6 +283,22 @@ export default {
key: 'baseSceneName'
},
{
label: '日报标签',
key: 'customerTags',
format: (item) => {
let val = item.customer?.customerTags
return val ? val.split(',').map(e => this.customerTags[e] || e).join('/') : '-'
}
},
{
label: '实际交付日期',
key: 'actualDeliveryDate',
format: (item) => {
let val = item.customer?.actualDeliveryDate
return val ? dayjs(val).format('YYYY-MM-DD') : '-'
}
},
{
label: '销售顾问',
arr: ['merchantName', 'employeeName']
},
......@@ -321,8 +378,8 @@ export default {
} else if (userType == 2) {
item
? this.showSelectType({
item
})
item
})
: this.$emit('jump', name, { paramsData: this.orderCardDetail, type: 'createWithPay' })
} else {
utils.showNoAccess()
......@@ -429,14 +486,17 @@ export default {
width: toRpx(848);
height: toRpx(968);
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%);
.popup-top-box {
text-align: left;
padding: toRpx(48) toRpx(64);
&-title {
color: #1a1a1a;
font-size: toRpx(40);
font-weight: 500;
}
.icon-close {
font-size: toRpx(40) !important;
color: rgba(26, 26, 26, 0.6) !important;
......@@ -446,6 +506,7 @@ export default {
.modatcontent {
box-sizing: border-box;
padding: 0 toRpx(64);
.modalbox {
display: flex;
align-items: center;
......@@ -458,9 +519,11 @@ export default {
color: #292d33;
font-size: toRpx(28);
font-weight: 500;
& + .modalbox {
&+.modalbox {
margin-top: toRpx(16);
}
.sprite-icon {
margin: 0 toRpx(24) 0 toRpx(32);
}
......@@ -471,6 +534,7 @@ export default {
background: #347bff1a;
}
}
.footer-box {
width: 100%;
height: toRpx(164);
......@@ -478,6 +542,7 @@ export default {
position: absolute;
bottom: 0;
border-radius: 0 0 toRpx(32) toRpx(32);
.btn {
width: 40%;
height: toRpx(80);
......@@ -489,9 +554,11 @@ export default {
font-size: toRpx(32);
font-weight: 500;
}
.cancle-btn {
background: #f0f1f5;
}
.sure-btn {
color: #fff;
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
......@@ -499,6 +566,7 @@ export default {
}
}
}
.order-card {
padding: toRpx(36) toRpx(32);
border-radius: toRpx(24);
......@@ -507,6 +575,7 @@ export default {
box-shadow: 0 toRpx(8) toRpx(24) 0 #2a61eb1a;
margin-bottom: toRpx(24);
}
.status {
padding: toRpx(8);
font-size: toRpx(24);
......@@ -514,6 +583,7 @@ export default {
border-radius: toRpx(4);
border: toRpx(1) solid transparent;
}
.errorBox {
background: #f7f8fa;
border-radius: toRpx(16);
......@@ -522,18 +592,21 @@ export default {
font-size: toRpx(24);
margin-bottom: toRpx(20);
}
.errorTips {
color: #eb4e4e;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(16);
}
.priceName {
color: #5a5e66;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(30);
}
.info-box {
display: flex;
flex-wrap: wrap;
......@@ -564,6 +637,7 @@ export default {
font-size: toRpx(24);
color: #666666;
font-weight: 400;
.split {
margin: 0 toRpx(6);
}
......@@ -575,6 +649,7 @@ export default {
width: 50%;
padding: toRpx(10) toRpx(20) toRpx(10) 0;
box-sizing: border-box;
.payType-label {
width: toRpx(120);
margin-right: toRpx(24);
......@@ -595,6 +670,7 @@ export default {
box-sizing: border-box;
padding-right: 0;
padding-left: toRpx(20);
.order-price-label {
width: toRpx(120);
margin-right: toRpx(24);
......@@ -628,6 +704,7 @@ export default {
width: 50%;
padding: toRpx(10) toRpx(20) toRpx(10) 0;
box-sizing: border-box;
.staff-label {
width: toRpx(120);
margin-right: toRpx(24);
......@@ -635,6 +712,7 @@ export default {
font-weight: 400;
color: #999ea8;
}
.staff-value {
font-size: toRpx(24);
color: #666666;
......@@ -650,14 +728,17 @@ export default {
background: #f5f7fa;
margin: toRpx(20) 0;
padding: toRpx(20) toRpx(32);
.goods {
color: #333333;
font-size: toRpx(28);
font-weight: 400;
margin-bottom: toRpx(16);
&.no-margin {
margin-bottom: 0;
}
.goods-name {
flex: 1;
min-width: 0;
......@@ -686,6 +767,7 @@ export default {
}
}
}
.goods-more {
color: #4673ff;
font-size: toRpx(24);
......
import dayjs from 'dayjs'
const CUSTOMER_TAGS = {
1: '已触客',
2: '已拉群',
3: '已交付引荐',
4: '首保维保客户 ',
5: '事故车客户'
}
module.exports = {
data: {
CUSTOMER_TAGS,
orderObj: [
{
label: '工单编号',
......@@ -29,6 +38,18 @@ module.exports = {
key: 'customerName'
},
{
label: '日报标签',
key: 'customerTags',
format: (data) => {
return data.split(',').map(item => CUSTOMER_TAGS[item]).join('/')
}
},
{
label:'实际交付日期',
key: 'actualDeliveryDate',
format: (val) => dayjs(val).format('YYYY-MM-DD')
},
{
label: '性别',
key: 'customerSex',
enum: {
......
......@@ -6,7 +6,8 @@
<text class="fs-32 fw-7">等待客户付款</text>
<text class="fs-26 ml-12">点击下一步,锁定并生成工单码。</text>
</view>
<view class="top-tips flex align-center" v-if="orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7">
<view class="top-tips flex align-center"
v-if="orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7">
<view class="fs-32 fw-7">请上传付款凭证结束工单</view>
<view class="fs-26 ml-12">点击确认工单,提交付款凭证。</view>
</view>
......@@ -14,7 +15,9 @@
<view class="fs-32 fw-7">请提交客户拒绝升级原因</view>
<view class="fs-26 ml-12">点击确认工单,根据操作结束工单。</view>
</view>
<view v-if="!isErrorOrder && (orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7)" class="box date-box box-shell flex justify-between align-center">
<view
v-if="!isErrorOrder && (orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7)"
class="box date-box box-shell flex justify-between align-center">
<view class="date-box-label">
收款时间
<text class="required">*</text>
......@@ -31,10 +34,7 @@
<view class="meal-box" v-for="(item, index) in orderInfo.packageGoodsList">
<view class="meal-hd flex justify-between align-center">
<view class="meal-hd-name flex align-center">
<view
v-if="shouldShowMarketingIcon(item)"
class="sprite-icon icon-activeIcon marketing-icon"
></view>
<view v-if="shouldShowMarketingIcon(item)" class="sprite-icon icon-activeIcon marketing-icon"></view>
<view>{{ item.packageAlias || item.packageName }}</view>
</view>
<view class="price">¥{{ item.finalPrice }}</view>
......@@ -59,10 +59,7 @@
<view class="good mt-16" v-for="(item, index) in orderInfo.subOrderList">
<view class="flex justify-between align-center">
<view class="good-name flex align-center">
<view
v-if="shouldShowMarketingIcon(item)"
class="sprite-icon icon-activeIcon marketing-icon"
></view>
<view v-if="shouldShowMarketingIcon(item)" class="sprite-icon icon-activeIcon marketing-icon"></view>
<text class="good-name-text text-hide">商品名称:{{ replaceItemText(item.upgradeGoodsName) || '' }}</text>
</view>
<text class="good-price">¥{{ item.price }}</text>
......@@ -78,7 +75,8 @@
</view>
<view class="flex align-center py-16 coupon" v-if="orderInfo">
<view class="sprite-icon icon-coupon"></view>
<text class="fs-28 coupon-name">{{ orderInfo.couponName || '' }}{{ orderInfo.customerCoupon.customerCouponCode || '' }}({{ orderInfo.customerCoupon.employeeName || '' }})</text>
<text class="fs-28 coupon-name">{{ orderInfo.couponName || '' }}{{ orderInfo.customerCoupon.customerCouponCode
|| '' }}({{ orderInfo.customerCoupon.employeeName || '' }})</text>
</view>
<view class="flex justify-end align-center mt-24" v-if="orderInfo">
<text class="good-total-lable">商品总金额:</text>
......@@ -113,11 +111,13 @@
<view class="customize-btn" v-if="item.dateChange" @click.stop="customizeDate">自定义</view>
</view>
<view v-if="(orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length">
<view
v-if="(orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length">
<view class="flex align-center pt-8">
<view class="label">付款凭证</view>
<view class="image-box">
<view class="value" @click.stop="previewImage" v-for="(item, index) in orderInfo.payVoucherList" :key="index">
<view class="value" @click.stop="previewImage" v-for="(item, index) in orderInfo.payVoucherList"
:key="index">
<view class="image">
<!-- <image src="{{item.payVoucher}}" /> -->
</view>
......@@ -144,19 +144,24 @@
<view class="label">{{ item.label }}</view>
<view class="flex flex-1">
<view class="value" :style="{ color: item.color || '#333' }">
<view v-if="item.arr">
<view v-if="orderInfo[item.arr[1]]" class="flex">
<view v-for="(i, ind) in item.arr" :key="ind">
<view class="value-item text-hide">
<text v-if="ind == 1" class="lineText">|</text>
{{ orderInfo[i] }}
<template v-if="item.format">
{{ item.format(orderInfo[item.key]) }}
</template>
<template v-else>
<view v-if="item.arr">
<view v-if="orderInfo[item.arr[1]]" class="flex">
<view v-for="(i, ind) in item.arr" :key="ind">
<view class="value-item text-hide">
<text v-if="ind == 1" class="lineText">|</text>
{{ orderInfo[i] }}
</view>
</view>
</view>
</view>
</view>
<view v-else>
{{ item.enum ? item.enum[orderInfo[item.key]] : orderInfo[item.key] || '' }}
</view>
<view v-else>
{{ item.enum ? item.enum[orderInfo[item.key]] : orderInfo[item.key] || '' }}
</view>
</template>
</view>
<view v-if="item.copy" class="copy-btn" @click="setCopyData(orderInfo[item.key])">
<view class="sprite-icon icon-icon-copy copy"></view>
......@@ -179,7 +184,8 @@
<view class="confirm btn" @click.stop="confirm">确认</view>
</view>
</view>
<PublishPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" @confirm="confirmTips">
<PublishPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false"
@confirm="confirmTips">
<template #content>
<view>
<image class="tipsPopupBg" :src="popupBg" />
......@@ -192,7 +198,8 @@
</view>
</template>
</PublishPopup>
<PublishPopup ref="calendarPopup" popupClass="calendarPopup" :showClose="false" :showTitle="false" @confirm="confirmCalendar">
<PublishPopup ref="calendarPopup" popupClass="calendarPopup" :showClose="false" :showTitle="false"
@confirm="confirmCalendar">
<template #content>
<uni-calendar class="calendar" :showMonth="false" :endDate="endDate" @change="calendarChange" />
</template>
......@@ -213,7 +220,8 @@
<view class="pos-popup" v-if="orderInfo">
<view class="price">¥{{ orderInfo.total_price }}</view>
<image class="qrcode" :src="orderInfo.selectPayType == 1 ? wxqrcode : posQrCode"></image>
<view class="level-1-tips">{{ orderInfo.selectPayType == 1 ? '请让客户打开微信扫描上方付款码进行支付' : '请使用POS机扫描此码,再向客户收款' }}</view>
<view class="level-1-tips">{{ orderInfo.selectPayType == 1 ? '请让客户打开微信扫描上方付款码进行支付' : '请使用POS机扫描此码,再向客户收款' }}
</view>
<view class="level-2-tips">超过24小时未支付将关闭此订单</view>
</view>
</template>
......@@ -273,7 +281,7 @@ export default {
mounted() {
// this.getPositionList()
// // "this.transmissionOfData.orderCode"
// this.getDetail('250826172036851')
// this.getDetail('260812100446807')
// this.successDate = dayjs().format('YYYY-MM-DD HH:mm:ss')
},
methods: {
......@@ -663,11 +671,13 @@ export default {
height: toRpx(744);
border-radius: toRpx(42);
background: rgb(255, 255, 255) !important;
.tipsPopupBg {
border-radius: toRpx(42) toRpx(42) 0 0;
width: 100%;
height: toRpx(244);
}
.title {
color: #333333;
font-size: toRpx(40);
......@@ -675,48 +685,58 @@ export default {
text-align: center;
margin-top: toRpx(48);
}
.tipsConent {
color: #666666;
font-size: toRpx(32);
font-weight: 400;
padding: toRpx(16) toRpx(64);
line-height: toRpx(48);
text {
color: #347bff;
}
}
}
::v-deep .calendarPopup .uni-popup__wrapper {
width: 100%;
height: 62vh;
.calendar {
width: 100%;
height: calc(100% - #{toRpx(164)});
}
}
::v-deep .payPopup .uni-popup__wrapper {
width: 60%;
border-radius: toRpx(48);
background: #ffffff !important;
.popup-top {
border-radius: toRpx(48) toRpx(48) 0 0;
background: url('@/assets/images/boutique/payTipsBc.webp') no-repeat;
background-size: 100% 100%;
margin-bottom: toRpx(16);
.popup-top-box {
color: #333333;
font-size: toRpx(36);
font-weight: 500;
text-align: center;
padding: toRpx(32);
.popup-top-box-title {
flex: 1;
}
.icon-close {
text-align: end;
}
}
}
.pos-popup {
text-align: center;
box-shadow: 0 toRpx(12) toRpx(24) 0 #2c66f726;
......@@ -725,23 +745,27 @@ export default {
background: #ffffff;
margin: 0 auto toRpx(63) auto;
padding: toRpx(63) 0;
.qrcode {
width: toRpx(320);
height: toRpx(320);
margin-bottom: toRpx(32);
}
.price {
color: #4673ff;
font-size: toRpx(56);
font-weight: 700;
margin-bottom: toRpx(32);
}
.level-1-tips {
color: #1a1a1a;
font-size: toRpx(40);
font-weight: 500;
margin-bottom: toRpx(16);
}
.level-2-tips {
color: #808291;
font-size: toRpx(32);
......@@ -749,6 +773,7 @@ export default {
}
}
}
.order-confirm {
position: relative;
height: 100%;
......@@ -757,63 +782,82 @@ export default {
border-radius: toRpx(16);
height: calc(100% - #{toRpx(296)});
overflow-y: scroll;
&::-webkit-scrollbar {
width: 0;
height: 0;
background: transparent;
}
}
.px-48 {
padding: 0 toRpx(48);
}
.pt-6 {
padding-top: toRpx(6);
}
.pt-8 {
padding-top: toRpx(8);
}
.pt-16 {
padding-top: toRpx(16);
}
.pt-12 {
padding-top: toRpx(12);
}
.pt-24 {
padding-top: toRpx(24);
}
.fs-14 {
font-size: toRpx(14);
}
.fs-32 {
font-size: toRpx(32);
}
.fs-28 {
font-size: toRpx(28);
}
.fs-26 {
font-size: toRpx(26);
}
.fw-7 {
font-weight: 700;
}
.fs-13 {
font-size: toRpx(13);
}
.ml-12 {
margin-left: toRpx(12);
}
.mt-16 {
margin-top: toRpx(16);
}
.mt-24 {
margin-top: toRpx(24);
}
.py-16 {
padding: toRpx(16) 0;
}
.flex-1 {
flex: 1;
}
.date-box {
display: flex;
align-items: center;
......@@ -836,27 +880,32 @@ export default {
color: #f00;
margin-left: toRpx(8);
}
.handlerBtn {
color: #4673ff;
font-size: toRpx(26);
font-weight: 400;
margin-left: toRpx(8);
}
.customize-btn {
color: #4673ff;
font-size: toRpx(26);
font-weight: 400;
margin-left: toRpx(16);
}
.copy-btn {
display: flex;
align-items: center;
color: #808291;
.copy {
margin-right: toRpx(8);
margin-left: toRpx(20);
}
}
.top-tips {
width: 100%;
height: toRpx(86);
......@@ -866,17 +915,20 @@ export default {
color: #fff;
padding: toRpx(48) toRpx(32);
}
.box-shell {
width: 100%;
border-radius: toRpx(16);
background: #ffffff;
padding: toRpx(24) toRpx(32);
margin-top: toRpx(16);
&-title {
font-size: toRpx(28);
color: #333333;
font-weight: 400;
}
.meal-box {
border-radius: toRpx(24);
border: toRpx(2) solid #dce0e6;
......@@ -895,53 +947,64 @@ export default {
font-size: toRpx(32);
font-weight: 400;
margin-bottom: toRpx(20);
.meal-hd-name {
flex: 1;
min-width: 0;
}
.price {
font-weight: 500;
}
}
.meal-bd {
background: #f6f7fa;
border-radius: toRpx(16);
padding: 0 toRpx(32);
box-sizing: border-box;
.meal-bd-head {
border-bottom: toRpx(2) solid #dce0e6;
padding: toRpx(24) 0;
.name {
color: #333333;
font-size: toRpx(28);
font-weight: 400;
min-width: 0;
}
.meal-bd-bottom {
color: #999999;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(8);
}
.price {
color: #333333;
font-size: toRpx(28);
font-weight: 400;
}
}
.meal-bd-box:last-child .meal-bd-head {
border-bottom: none;
}
}
}
.good-list {
margin-top: toRpx(16);
.good {
color: #333333;
font-size: toRpx(28);
border-radius: toRpx(24);
background: #f5f7fa;
padding: toRpx(24);
.good-name {
font-weight: 400;
flex: 4;
......@@ -956,26 +1019,31 @@ export default {
white-space: nowrap;
}
}
.marketing-icon {
display: inline-block !important;
flex-shrink: 0;
margin-right: toRpx(8);
}
.good-price {
font-weight: 500;
flex: 1;
text-align: right;
}
.good-alias {
font-size: toRpx(24);
font-weight: 400;
}
.good-sku {
color: #999999;
font-size: toRpx(24);
font-weight: 400;
margin-right: toRpx(24);
}
.good-count {
color: #999999;
font-size: toRpx(24);
......@@ -983,8 +1051,10 @@ export default {
}
}
}
.coupon {
border-bottom: 1px solid #f7f7f6;
.coupon-name {
color: #292d33;
font-size: toRpx(28);
......@@ -998,6 +1068,7 @@ export default {
font-size: toRpx(28);
font-weight: 400;
}
.good-total-value {
color: #4673ff;
font-size: toRpx(40);
......@@ -1008,12 +1079,14 @@ export default {
.value .value-item text {
margin: 0 toRpx(6);
}
.label {
width: toRpx(156);
width: toRpx(186);
color: #999999;
font-size: toRpx(26);
font-weight: 400;
}
.value {
color: #222222;
font-size: toRpx(26);
......@@ -1028,6 +1101,7 @@ export default {
bottom: toRpx(24);
width: 100%;
left: 0;
.btn {
width: 42%;
height: toRpx(80);
......@@ -1037,11 +1111,13 @@ export default {
line-height: toRpx(80);
text-align: center;
}
.confirm {
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #ffffff;
margin-left: toRpx(32);
}
.edit {
background: #3b73ff1a;
color: #4673ff;
......
......@@ -4,43 +4,55 @@
<view class="box">
<scroll-view class="scroll-view" scroll-y="true">
<view class="box-content">
<GlCell :formList="formList" :formData="orderObj" :titleList="titleList" @radioChange="radioChange" @inputBlur="inputBlur" @handleCell="handleCell">
<GlCell :formList="formList" :formData="orderObj" :titleList="titleList" @radioChange="radioChange"
@inputBlur="inputBlur" @handleCell="handleCell" @confirmCalendar="confirmCalendar">
<template slot="customer">
<view class="customer-title flex">
客户信息
<view
class="customer-file flex"
@click="
handleCell({
key: 'customer'
})
"
>
<view class="customer-file flex" @click="
handleCell({
key: 'customer'
})
">
<view class="sprite-icon icon-customer-list"></view>
客户档案
</view>
</view>
</template>
<template slot="frontGear">
<Product v-if="orderObj.frontGear" @changeTotalPrice="changeTotalPrice" :list="orderObj.frontGear" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
<Product v-if="orderObj.frontGear" @changeTotalPrice="changeTotalPrice" :list="orderObj.frontGear"
:positionTypeList="positionTypeList" :baseConfigData="baseConfigData"
:orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
</template>
<template slot="frontWindow">
<Product v-if="orderObj.frontWindow" @changeTotalPrice="changeTotalPrice" :list="orderObj.frontWindow" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
<Product v-if="orderObj.frontWindow" @changeTotalPrice="changeTotalPrice" :list="orderObj.frontWindow"
:positionTypeList="positionTypeList" :baseConfigData="baseConfigData"
:orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
</template>
<template slot="rearWindow">
<Product v-if="orderObj.rearWindow" @changeTotalPrice="changeTotalPrice" :list="orderObj.rearWindow" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
<Product v-if="orderObj.rearWindow" @changeTotalPrice="changeTotalPrice" :list="orderObj.rearWindow"
:positionTypeList="positionTypeList" :baseConfigData="baseConfigData"
:orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
</template>
<template slot="rearGear">
<Product v-if="orderObj.rearGear" @changeTotalPrice="changeTotalPrice" :list="orderObj.rearGear" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
<Product v-if="orderObj.rearGear" @changeTotalPrice="changeTotalPrice" :list="orderObj.rearGear"
:positionTypeList="positionTypeList" :baseConfigData="baseConfigData"
:orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
</template>
<template slot="sunRoof">
<Product v-if="orderObj.sunRoof" @changeTotalPrice="changeTotalPrice" :list="orderObj.sunRoof" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
<Product v-if="orderObj.sunRoof" @changeTotalPrice="changeTotalPrice" :list="orderObj.sunRoof"
:positionTypeList="positionTypeList" :baseConfigData="baseConfigData"
:orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Product>
</template>
<template slot="package">
<Package v-if="orderObj.package" @changeTotalPrice="changeTotalPrice" :list="orderObj.package" :positionTypeList="positionTypeList" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></Package>
<Package v-if="orderObj.package" @changeTotalPrice="changeTotalPrice" :list="orderObj.package"
:positionTypeList="positionTypeList" :orderTypeCode="orderObj.orderTypeCode"
:show-marketing-icon="true"></Package>
</template>
<template slot="skuGoods">
<SkuGoods v-if="orderObj.skuGoods" :list="orderObj.skuGoods" @changeTotalPrice="changeTotalPrice" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></SkuGoods>
<SkuGoods v-if="orderObj.skuGoods" :list="orderObj.skuGoods" @changeTotalPrice="changeTotalPrice"
:positionTypeList="positionTypeList" :baseConfigData="baseConfigData"
:orderTypeCode="orderObj.orderTypeCode" :show-marketing-icon="true"></SkuGoods>
<view class="total" v-if="totalPrice > 0">
<view class="total-left">总价</view>
<view class="total-right">¥{{ totalPrice }}</view>
......@@ -55,7 +67,9 @@
</scroll-view>
</view>
<!-- 弹窗 -->
<order-popup ref="orderPopup" :data="orderObj" :dataKey="valueKey" @onConfirm="onConfirm" :externalData="externalData" :popupType="popupType" :show-marketing-icon="true" :boutique-order-types-only="boutiqueOrderTypesOnly" />
<order-popup ref="orderPopup" :data="orderObj" :dataKey="valueKey" @onConfirm="onConfirm"
:externalData="externalData" :popupType="popupType" :show-marketing-icon="true"
:boutique-order-types-only="boutiqueOrderTypesOnly" />
</view>
</template>
......@@ -148,19 +162,45 @@ export default {
rearGear: null, // 4
sunRoof: null, // 5, 6,7
package: null,
skuGoods: null // upgradeGoodsPosition 为空,则是其他精品单商品
skuGoods: null, // upgradeGoodsPosition 为空,则是其他精品单商品
customerTags: [], // 日报标签
actualDeliveryDate: '', // 实际交付日期
}
this.initData()
}
},
immediate: true
},
'orderObj.salesType': {
handler(newVal) {
const selected = Boolean(this.orderObj && (this.orderObj.baseSceneCodeValue || this.orderObj.baseSceneCode))
let formList = this.formList
let { isHarmony } = this
formList.map(item => {
item.map(child => {
if (child.value == 'customerTags') {
let hidden = !selected || newVal == 2
child.hidden = hidden
if (hidden) this.$set(this.orderObj, 'customerTags', [])
}
if (child.value == 'actualDeliveryDate') {
let hidden = (isHarmony ? ![3].includes(+newVal) : ![0, 3].includes(+newVal)) || !selected
child.hidden = hidden
if (hidden) this.$set(this.orderObj, 'actualDeliveryDate', '')
}
})
})
this.formList = formList
},
immediate: true,
deep: true
}
},
data() {
return {
orderCreateType: 'createWithPay', // supplementOrder(补录订单) createWithPay(新增)
titleList,
formList: utils.deepClone(FORM_LIST),
formList: [],
baseConfigData: {},
requiredList: [], // 录单设置的必填项
orderObj: {
......@@ -177,7 +217,9 @@ export default {
rearGear: null, // 4
sunRoof: null, // 5, 6,7
package: null,
skuGoods: null // upgradeGoodsPosition 为空,则是其他精品单商品
skuGoods: null, // upgradeGoodsPosition 为空,则是其他精品单商品
customerTags: [], // 日报标签
actualDeliveryDate: '', // 实际交付日期
}, // 弹窗传入的数据},
popupType: 0,
popupTypeEnum,
......@@ -217,19 +259,55 @@ export default {
hideSceneNameField() {
const { sceneType } = this.userInfo || {}
return sceneType == 1 && this.orderCreateType === 'createWithPay'
}
},
isHarmony() {
const { channelType } = uni.$storage.get('userInfo')
return channelType == 1
},
},
mounted() {
let formList = utils.deepClone(FORM_LIST),
dailyTagList = [
{
value: '1',
name: '已触客'
},
{
value: '2',
name: '已拉群'
},
{
value: '3',
name: '已交付引荐'
},
{
value: '4',
name: '首保维保客户 '
},
{
value: '5',
name: '事故车客户'
}
]
formList.forEach(item => {
item.forEach(child => {
if (child.value == 'customerTags') {
child.radioList = this.isHarmony ? dailyTagList : dailyTagList.filter(item => ['1'].includes(item.value))
}
})
})
console.log('mounted', this.orderCreateType)
console.log(formList, 'formList')
this.baseConfigData = uni.$storage.get('mock_data') || {}
this.formList = formList
this.initData()
},
methods: {
updateSceneGate () {
updateSceneGate() {
const selected = Boolean(this.orderObj && (this.orderObj.baseSceneCodeValue || this.orderObj.baseSceneCode))
const list = this.formList || []
list.forEach(group => {
;(group || []).forEach(item => {
; (group || []).forEach(item => {
if (!item) return
if (item._originHidden === undefined) item._originHidden = Boolean(item.hidden)
if (!selected) {
......@@ -245,9 +323,9 @@ export default {
this.formList = list
return selected
},
async initRecentSceneEcho () {
async initRecentSceneEcho() {
try {
const userInfo = this.userInfo || (uni.$storage.get('userInfo') || {})
const userInfo = this.userInfo || uni.$storage.get('userInfo') || {}
const phone = userInfo.phone
const userSceneType = userInfo.sceneType
if (!phone || userSceneType === undefined || userSceneType === null) return
......@@ -256,6 +334,7 @@ export default {
phone,
sceneType: userSceneType
})
recent.baseSceneCode = '100101'
// HTTP 层已将 data.data 解包,recent 直接是 { baseSceneCode: '...' }
const recentBaseSceneCode = recent?.baseSceneCode || recent?.uuid
if (!recentBaseSceneCode) return
......@@ -275,7 +354,7 @@ export default {
// 同步表单展示(GlCell 某些字段依赖 current)
const sceneCell = this.formList?.[0]?.find(v => v && v.value === 'baseSceneCode')
if (sceneCell) sceneCell.current = item.name || item.staffName || ''
} catch (e) {}
} catch (e) { }
},
// 计算单个商品的最终价格(与页面展示保持一致:先算单件优惠价,再乘数量,均向上取整两位)
calculateFinalPrice(goods, sellPrice, number, orderTypeCode) {
......@@ -612,12 +691,27 @@ export default {
},
// 单选框change事件
radioChange(e, val) {
console.log(e, val)
this.$set(this.orderObj, val.value, e.detail.value)
if (val.value == 'payeeType') {
this.changePayee()
if (val.multiple) {
let key = val.value,
value = this.orderObj[key] || []
if (value.includes(e)) {
value = value.filter(item => item !== e)
} else {
value.push(e)
}
this.$set(this.orderObj, key, value)
} else {
this.$set(this.orderObj, val.value, e.detail.value)
if (val.value == 'payeeType') {
this.changePayee()
}
}
},
// 选择日期事件
confirmCalendar(e, key) {
let value = e.fulldate
this.$set(this.orderObj, key, value)
},
// 弹窗确认回调
onConfirm(val, flag) {
this.externalData = []
......@@ -701,7 +795,7 @@ export default {
this.$set(this.orderObj, 'baseSceneCodeValue', chooseContent.baseSceneCode || chooseContent.uuid)
this.$set(this.orderObj, 'sceneType', chooseContent.sceneType)
// 选择后保存最近选中场景(sceneType 用登录场景)
const userInfo = this.userInfo || (uni.$storage.get('userInfo') || {})
const userInfo = this.userInfo || uni.$storage.get('userInfo') || {}
if (userInfo.phone) {
uni.$api.equityApi.saveUserRecentScene({
phone: userInfo.phone,
......@@ -990,8 +1084,6 @@ export default {
return
}
// 低价提示
const belowMinSellItems = collectBelowMinSellPriceItems(this.orderObj)
if (belowMinSellItems.length > 0) {
......@@ -1012,11 +1104,17 @@ export default {
// 场景名称:界面展示用 name;提交入参需要 code
if (obj.baseSceneCodeValue) obj.baseSceneCode = obj.baseSceneCodeValue
delete obj.baseSceneCodeValue
const otherCustomer = ['standNo', 'plateNumber', 'customerSex', 'experienceFlag', 'salesType']
const otherCustomer = ['standNo', 'plateNumber', 'customerSex', 'experienceFlag', 'salesType','actualDeliveryDate','customerTags']
obj.customer = {
...obj.customer,
...otherCustomer.reduce((acc, key) => {
if (obj[key] !== undefined) {
if(key == 'customerTags'){
obj[key] = obj[key].join(',')
}
if(key == 'actualDeliveryDate'){
obj[key] += ' 00:00:00'
}
acc[key] = obj[key]
delete obj[key]
}
......@@ -1261,10 +1359,10 @@ export default {
notUpgradeExperience: 'foEfRequiredFlag',
notUpgradeRejectionReason: 'foRrRequiredFlag'
}
;(data.orderFieldSettingList || []).forEach(e => {
const key = keyMap[e.fieldKey] || e.fieldKey
YQorderSetting[key] = e.isRequired ? 'Y' : 'N'
})
; (data.orderFieldSettingList || []).forEach(e => {
const key = keyMap[e.fieldKey] || e.fieldKey
YQorderSetting[key] = e.isRequired ? 'Y' : 'N'
})
YQorderSetting.shopMerchantId = userInfo.shopMerchantId
// 过滤园区店是否需要屏蔽手机号选项
......@@ -1335,9 +1433,7 @@ export default {
const { shopMerchantId, sceneType, merchantId } = userInfo,
data = await uni.$api.popupApi.getEmployeeList({
merchantId: orderObj.idKey == 'sellerUserId' ? merchantId : shopMerchantId,
sceneList: orderObj.idKey == 'sellerUserId'
? ''
: [this.orderObj.sceneType != null ? this.orderObj.sceneType : sceneType]
sceneList: orderObj.idKey == 'sellerUserId' ? '' : [this.orderObj.sceneType != null ? this.orderObj.sceneType : sceneType]
})
if (data && data.length) {
this.employeeList = data
......@@ -1683,19 +1779,11 @@ export default {
const newStrategyConfig = this.buildStrategyConfigFromDiscountFields(item, goodsOrderTypeCode)
goodsData.strategyConfig = newStrategyConfig
}
const resolvedMarketingFlag =
item.marketingFlag ??
temp.marketingFlag ??
data.multipleSpecificationsGoods?.marketingFlag ??
getMarketingFlag(data)
const resolvedMarketingFlag = item.marketingFlag ?? temp.marketingFlag ?? data.multipleSpecificationsGoods?.marketingFlag ?? getMarketingFlag(data)
if (resolvedMarketingFlag != null && resolvedMarketingFlag !== '') {
goodsData.marketingFlag = resolvedMarketingFlag
}
const resolvedActivityId =
item.activityId ??
temp.activityId ??
data.multipleSpecificationsGoods?.activityId ??
getActivityId(data)
const resolvedActivityId = item.activityId ?? temp.activityId ?? data.multipleSpecificationsGoods?.activityId ?? getActivityId(data)
if (resolvedActivityId != null && resolvedActivityId !== '') {
goodsData.activityId = resolvedActivityId
}
......@@ -1745,9 +1833,7 @@ export default {
if ((activityId == null || activityId === '') && catalogMatch) {
activityId = getActivityId(catalogMatch)
if ((activityId == null || activityId === '') && orderItem.goodsFlag == 3 && goods?.merchantGoodsId) {
const pkgGoods = catalogMatch.packageGoods?.goodsList?.find(
g => g.merchantGoodsId == goods.merchantGoodsId
)
const pkgGoods = catalogMatch.packageGoods?.goodsList?.find(g => g.merchantGoodsId == goods.merchantGoodsId)
activityId = pkgGoods?.activityId
}
}
......@@ -1826,9 +1912,7 @@ export default {
item.packageGoods.activityId = catalogActivityId
}
item.packageGoods.goodsList?.forEach(g => {
const catalogGoods = catalogMatch.packageGoods?.goodsList?.find(
cg => cg.merchantGoodsId == g.merchantGoodsId
)
const catalogGoods = catalogMatch.packageGoods?.goodsList?.find(cg => cg.merchantGoodsId == g.merchantGoodsId)
if (!catalogGoods) return
if (catalogGoods.marketingFlag != null && catalogGoods.marketingFlag !== '' && (g.marketingFlag == null || g.marketingFlag === '')) {
g.marketingFlag = catalogGoods.marketingFlag
......@@ -2014,8 +2098,8 @@ export default {
console.log('获取订单备注***', customerId)
if (!customerId) return
try {
const res = await uni.$api.commonApi.updateGoodsOrderRemark({ id:customerId })
console.log('获取订单备注***', res)
const res = await uni.$api.commonApi.updateGoodsOrderRemark({ id: customerId })
console.log('获取订单备注***', res)
const remark = res?.remark || ''
this.$set(this.orderObj, 'remark', remark)
} catch (e) {
......@@ -2061,7 +2145,7 @@ export default {
.then(result => {
this.validateState = result.data.valid
})
.catch(() => {})
.catch(() => { })
}
}
}
......@@ -2128,8 +2212,10 @@ export default {
margin-left: toRpx(20);
color: #347bff;
font-size: toRpx(24);
.sprite-icon {
margin-right: toRpx(4);
transform: translateY(toRpx(3));
}
}
}
......
<template>
<view class="order-detail">
<view class="common-title">{{ orderInfo.constructionFlag == 'Y' && orderInfo.status != 10 ? '完成施工' : '工单详情' }}</view>
<view class="common-title">{{ orderInfo.constructionFlag == 'Y' && orderInfo.status != 10 ? '完成施工' : '工单详情' }}
</view>
<view v-if="isShow" class="px-48 scroll-y" :class="{ 'construction-flag-y': !isMake }">
<view class="top-tips flex align-center" v-if="orderInfo.status != 10 && orderInfo.status != 9 && orderInfo.constructionFlag !== 'Y'">
<view class="top-tips flex align-center"
v-if="orderInfo.status != 10 && orderInfo.status != 9 && orderInfo.constructionFlag !== 'Y'">
<view class="sprite-icon icon-successIcon checkbox-filled"></view>
<view>
<view class="fs-34 fw-5">客户已付款</view>
......@@ -29,7 +31,8 @@
<view class="flex justify-between align-center">
<view class="box-shell-title">审批</view>
<view class="status-tag" :class="`status-tag-${orderInfo.goodsOrderApplyStatus}`">
{{ goodsOrderApplyStatus && orderInfo.goodsOrderApplyStatus ? goodsOrderApplyStatus[orderInfo.goodsOrderApplyStatus] : '-' }}
{{ goodsOrderApplyStatus && orderInfo.goodsOrderApplyStatus ?
goodsOrderApplyStatus[orderInfo.goodsOrderApplyStatus] : '-' }}
</view>
</view>
......@@ -42,7 +45,9 @@
<view class="value" :style="{ color: i.statusColor }">{{ i.status }}</view>
</view>
<view class="item-mark">
<view :class="['circle', { first: index == 0, 'status-approved': i.status === '审批通过', 'status-pending': i.status === '审批中', 'status-rejected': i.status === '驳回' }]"></view>
<view
:class="['circle', { first: index == 0, 'status-approved': i.status === '审批通过', 'status-pending': i.status === '审批中', 'status-rejected': i.status === '驳回' }]">
</view>
<view class="mark-line" v-if="index != logList.length - 1"></view>
</view>
</view>
......@@ -107,7 +112,9 @@
</view>
<view class="flex align-center my-16">
<view class="sprite-icon icon-coupon fs-14"></view>
<text class="fs-14 coupon-name">{{ orderInfo.couponName || '' }}{{ orderInfo.customerCoupon.customerCouponCode || '' }}({{ orderInfo.customerCoupon.employeeName || '' }})</text>
<text class="fs-14 coupon-name">{{ orderInfo.couponName || '' }}{{ orderInfo.customerCoupon.customerCouponCode
|| ''
}}({{ orderInfo.customerCoupon.employeeName || '' }})</text>
</view>
<view class="flex justify-end align-center">
<text class="good-total-lable">商品总金额:</text>
......@@ -142,11 +149,13 @@
<!-- <view class="customize-btn" v-if="item.dateChange" @click.stop="customizeDate">自定义</view> -->
</view>
<view v-if="(orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length">
<view
v-if="(orderInfo.selectPayType == 2 || orderInfo.selectPayType == 5 || orderInfo.selectPayType == 6 || orderInfo.selectPayType == 7) && orderInfo.payVoucherList.length">
<view class="flex align-start pt-16">
<view class="label">付款凭证</view>
<view class="image-box flex">
<view class="value" @click="previewImage" v-for="(item, index) in orderInfo.payVoucherList" :key="index">
<view class="value" @click="previewImage" v-for="(item, index) in orderInfo.payVoucherList"
:key="index">
<view class="image">
<image :src="item.payVoucher" />
</view>
......@@ -173,19 +182,24 @@
<view class="label">{{ item.label }}</view>
<view class="flex flex-1">
<view class="value" :style="{ color: item.color || '#333' }">
<view v-if="item.arr">
<view v-if="orderInfo[item.arr[1]]" class="flex">
<view v-for="(i, ind) in item.arr" :key="ind">
<view class="value-item text-hide">
<text v-if="ind == 1" class="lineText">|</text>
{{ orderInfo[i] }}
<template v-if="item.format">
{{ item.format(orderInfo[item.key]) }}
</template>
<template v-else>
<view v-if="item.arr">
<view v-if="orderInfo[item.arr[1]]" class="flex">
<view v-for="(i, ind) in item.arr" :key="ind">
<view class="value-item text-hide">
<text v-if="ind == 1" class="lineText">|</text>
{{ orderInfo[i] }}
</view>
</view>
</view>
</view>
</view>
<view v-else>
{{ item.enum ? item.enum[orderInfo[item.key]] : orderInfo[item.key] || '' }}
</view>
<view v-else>
{{ item.enum ? item.enum[orderInfo[item.key]] : orderInfo[item.key] || '' }}
</view>
</template>
</view>
<view v-if="item.copy" class="copy-btn" @click="setCopyData(orderInfo[item.key])">
<view class="sprite-icon icon-icon-copy copy"></view>
......@@ -212,7 +226,8 @@
<view class="label">质保产品</view>
<view class="value">{{ replaceItemText(item.goodsName) }}</view>
</view>
<view class="flex align-center edit-warranty" @click="warrantyEdit(item)" v-if="orderInfo.constructionFlag == 'Y'">
<view class="flex align-center edit-warranty" @click="warrantyEdit(item)"
v-if="orderInfo.constructionFlag == 'Y'">
<view class="sprite-icon icon-edit mr-8"></view>
质保价格
</view>
......@@ -244,16 +259,19 @@
</view>
</view>
<view class="flex align-center footer-box justify-center" v-if="isMake && orderInfo.status !== 12 && orderInfo.goodsOrderApplyStatus != 1 && orderInfo.goodsOrderApplyStatus != 2">
<view class="flex align-center footer-box justify-center"
v-if="isMake && orderInfo.status !== 12 && orderInfo.goodsOrderApplyStatus != 1 && orderInfo.goodsOrderApplyStatus != 2">
<view class="edit btn flex-1" @click="repeal">撤销工单</view>
</view>
<!-- <view class="flex align-center footer-box justify-center" v-if="orderInfo.constructionFlag == 'Y'">
<view class="edit btn flex-1" @click="repeal">再来一单</view>
</view> -->
<!-- 已支付4 战败2 已评价6 三种状态才展示 并且不是通过失效客户录入的战败单 -->
<view v-if="!userInfo.isSuper && userInfo.loginRole != 3 && userInfo.loginRole != 6 && userInfo.userType == 2 && (orderInfo.status == 4 || orderInfo.status == 2 || orderInfo.status == 6) && ((orderInfo.subOrderList && orderInfo.subOrderList.length) || (orderInfo.packageGoodsList && orderInfo.packageGoodsList.length))">
<view
v-if="!userInfo.isSuper && userInfo.loginRole != 3 && userInfo.loginRole != 6 && userInfo.userType == 2 && (orderInfo.status == 4 || orderInfo.status == 2 || orderInfo.status == 6) && ((orderInfo.subOrderList && orderInfo.subOrderList.length) || (orderInfo.packageGoodsList && orderInfo.packageGoodsList.length))">
<!-- 不需要走签名逻辑 -->
<view v-if="signatureSwitch && orderInfo.selectPayType != 0" class="btn-box" :class="isFullSucreen ? 'isFullSucreen-btn' : ''">
<view v-if="signatureSwitch && orderInfo.selectPayType != 0" class="btn-box"
:class="isFullSucreen ? 'isFullSucreen-btn' : ''">
<view class="btn text-center" bindtap="navOrderSignature">客户签名确认</view>
</view>
<view v-else class="btn-box" :class="isFullSucreen ? 'isFullSucreen-btn' : ''">
......@@ -263,7 +281,8 @@
</view>
</view>
</view>
<PublishPopup ref="calendarPopup" popupClass="calendarPopup" :showClose="false" :showTitle="false" @confirm="confirmCalendar">
<PublishPopup ref="calendarPopup" popupClass="calendarPopup" :showClose="false" :showTitle="false"
@confirm="confirmCalendar">
<template #content>
<uni-calendar class="calendar" :showMonth="false" @change="calendarChange" />
</template>
......@@ -296,12 +315,14 @@
</view>
</template>
</PublishPopup>
<PublishPopup :key="popupKey" ref="warrantyPopup" popupClass="warrantyPopup" type="center" title="质保价格" :showClose="true" @confirm="confirmEdit">
<PublishPopup :key="popupKey" ref="warrantyPopup" popupClass="warrantyPopup" type="center" title="质保价格"
:showClose="true" @confirm="confirmEdit">
<template #content>
<view class="warranty-content">
<view class="name">产品:{{ replaceItemText(warrantyEditObj.goodsName) }}</view>
<view class="label">质保价格</view>
<textarea class="warranty-input" v-model="warrantyEditObj.warrantyPrice" maxlength="50" placeholder="请输入(最多50字)" />
<textarea class="warranty-input" v-model="warrantyEditObj.warrantyPrice" maxlength="50"
placeholder="请输入(最多50字)" />
<view class="tips">质保价格输入的内容会在车主查询质保卡时显示</view>
</view>
</template>
......@@ -377,7 +398,7 @@ export default {
popupKey: 0
}
},
async mounted() {},
async mounted() { },
methods: {
shouldShowMarketingIcon(item) {
return checkMarketingIcon(item, true)
......@@ -674,7 +695,7 @@ export default {
this.$set(this.warrantyCardList[index], 'barCodeUrl', data)
console.log(this.warrantyCardList, 'getBarCode')
})
.catch(err => {})
.catch(err => { })
}, 1000 * index)
})
},
......@@ -769,7 +790,7 @@ export default {
this.$refs.warrantyPopup.closePopup()
this.getOrderDetail(this.orderInfo.orderCode)
})
.catch(err => {})
.catch(err => { })
}
}
}
......@@ -778,17 +799,20 @@ export default {
.order-detail {
position: relative;
height: 100%;
// Popup样式
::v-deep .tipsPopup .uni-popup__wrapper {
width: toRpx(848);
height: toRpx(744);
border-radius: toRpx(42);
background: rgb(255, 255, 255) !important;
.tipsPopupBg {
border-radius: toRpx(42) toRpx(42) 0 0;
width: 100%;
height: toRpx(244);
}
.title {
color: #333333;
font-size: toRpx(40);
......@@ -796,6 +820,7 @@ export default {
text-align: center;
margin-top: toRpx(48);
}
.tipsConent {
text-align: center;
color: #666666;
......@@ -803,10 +828,12 @@ export default {
font-weight: 400;
padding: toRpx(16) toRpx(64);
line-height: toRpx(48);
text {
color: #347bff;
}
}
.isExistTips-btn-box {
display: flex;
justify-content: center;
......@@ -814,6 +841,7 @@ export default {
border-radius: 0 0 toRpx(42) toRpx(42);
bottom: toRpx(40);
width: 100%;
.btn {
height: toRpx(80);
border-radius: toRpx(48);
......@@ -832,11 +860,13 @@ export default {
}
}
}
::v-deep .warrantyPopup .uni-popup__wrapper {
width: 36%;
height: toRpx(808);
border-radius: toRpx(32);
background: #fff !important;
.popup-top-box {
padding: toRpx(48) toRpx(64);
border-radius: toRpx(32);
......@@ -845,20 +875,24 @@ export default {
text-align: left;
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%) !important;
}
.warranty-content {
padding: toRpx(0) toRpx(64);
.name {
color: #666666;
font-size: toRpx(32);
font-weight: 400;
margin-bottom: toRpx(48);
}
.label {
color: #333333;
font-size: toRpx(32);
font-weight: 400;
margin-bottom: toRpx(24);
}
.warranty-input {
border-radius: 12px;
background: #f4f5f7;
......@@ -866,12 +900,14 @@ export default {
width: 100%;
margin-bottom: toRpx(24);
padding: toRpx(32) toRpx(32) toRpx(32) toRpx(32);
.uni-textarea-placeholder {
color: #999999;
font-size: toRpx(32);
font-weight: 400;
}
}
.tips {
color: #666666;
font-size: toRpx(28);
......@@ -879,101 +915,132 @@ export default {
}
}
}
::v-deep .calendarPopup .uni-popup__wrapper {
width: 100%;
height: 62vh;
.calendar {
width: 100%;
height: calc(100% - #{toRpx(164)});
}
}
.scroll-y {
height: calc(100% - #{toRpx(248)});
overflow-y: scroll;
&::-webkit-scrollbar {
width: 0;
height: 0;
background: transparent;
}
}
.construction-flag-y {
height: calc(100% - #{toRpx(182)});
}
.px-48 {
padding: 0 toRpx(48);
}
.pt-6 {
padding-top: toRpx(6);
}
.pt-8 {
padding-top: toRpx(8);
}
.pt-16 {
padding-top: toRpx(16);
}
.pt-20 {
padding-top: toRpx(20);
}
.pt-12 {
padding-top: toRpx(12);
}
.mb-12 {
margin-bottom: toRpx(12);
}
.fs-14 {
font-size: toRpx(14);
}
.fs-32 {
font-size: toRpx(32);
}
.fs-26 {
font-size: toRpx(26);
}
.fs-34 {
font-size: toRpx(34);
}
.fw-5 {
font-weight: 500;
}
.fw-7 {
font-weight: 700;
}
.fs-13 {
font-size: toRpx(13);
}
.ml-12 {
margin-left: toRpx(12);
}
.mr-8 {
margin-right: toRpx(8);
}
.mt-12 {
margin-top: toRpx(12);
}
.mt-20 {
margin-top: toRpx(20);
}
.my-16 {
margin: toRpx(16) 0;
}
.py-8 {
padding: toRpx(8) 0;
}
.py-16 {
padding: toRpx(16) 0;
}
.pt-32 {
padding-top: toRpx(32) !important;
}
.mb-20 {
margin-bottom: toRpx(20);
}
.cl-gray {
color: #666666;
}
.flex-1 {
flex: 1;
}
.date-box {
display: flex;
align-items: center;
......@@ -996,27 +1063,32 @@ export default {
color: #f00;
margin-left: toRpx(8);
}
.handlerBtn {
color: #4673ff;
font-size: toRpx(26);
font-weight: 400;
margin-left: toRpx(8);
}
.customize-btn {
color: #4673ff;
font-size: toRpx(26);
font-weight: 400;
margin-left: toRpx(16);
}
.copy-btn {
display: flex;
align-items: center;
color: #808291;
.copy {
margin-right: toRpx(8);
margin-left: toRpx(20);
}
}
.top-tips {
width: 100%;
height: toRpx(152);
......@@ -1025,26 +1097,31 @@ export default {
color: #333333;
padding: 0 toRpx(32);
position: relative;
.checkbox-filled {
margin-right: toRpx(24);
}
.topTipsRightIcon {
position: absolute !important;
bottom: 0;
right: toRpx(16);
}
}
.box-shell {
width: 100%;
border-radius: toRpx(16);
background: #ffffff;
padding: toRpx(24) toRpx(32);
margin-top: toRpx(16);
&-title {
font-size: toRpx(28);
color: #333333;
font-weight: 400;
}
.status-tag-3 {
color: #2cca74;
font-size: toRpx(24);
......@@ -1053,6 +1130,7 @@ export default {
border-radius: toRpx(4);
border: toRpx(2) solid #2cca74;
}
.status-tag-4 {
color: #f24724;
font-size: toRpx(24);
......@@ -1061,6 +1139,7 @@ export default {
border-radius: toRpx(4);
border: toRpx(2) solid #f24724;
}
.status-tag-2 {
color: #faa827;
font-size: toRpx(24);
......@@ -1069,6 +1148,7 @@ export default {
border-radius: toRpx(4);
border: toRpx(2) solid #faa827;
}
.status-tag-1 {
color: #faa827;
font-size: toRpx(24);
......@@ -1077,30 +1157,38 @@ export default {
border-radius: toRpx(4);
border: toRpx(2) solid #faa827;
}
.log-info {
margin-bottom: 0;
.log-box {
padding-top: toRpx(32);
.log-item {
min-height: toRpx(84);
position: relative;
padding-left: toRpx(60);
.item {
margin-top: toRpx(16);
.label {
width: toRpx(168);
width: toRpx(186);
color: #292d33;
}
.value {
width: calc(100% - #{toRpx(168)});
width: calc(100% - #{toRpx(186)});
word-break: break-all;
}
}
.item-mark {
position: absolute;
top: 0;
left: 0;
width: toRpx(32);
.mark-line {
height: toRpx(80);
width: toRpx(2);
......@@ -1110,6 +1198,7 @@ export default {
left: 50%;
transform: translateX(-50%);
}
.circle {
position: relative;
width: toRpx(20);
......@@ -1119,11 +1208,13 @@ export default {
margin: toRpx(8) auto 0;
z-index: 2;
}
.first {
width: toRpx(32);
height: toRpx(32);
background: #d6e4ff;
position: relative;
&::before,
&::after {
content: '';
......@@ -1133,11 +1224,13 @@ export default {
left: 50%;
transform: translate(-50%, -50%);
}
&::before {
width: toRpx(20);
height: toRpx(20);
background: var(--status-color, #2c66f7);
}
&::after {
width: toRpx(10);
height: toRpx(10);
......@@ -1146,6 +1239,7 @@ export default {
}
}
}
.log-title {
color: #333333;
font-size: toRpx(32);
......@@ -1154,8 +1248,10 @@ export default {
}
}
}
.remarkBox {
margin-top: toRpx(32);
.labelremark {
color: #999999;
font-size: toRpx(26);
......@@ -1164,6 +1260,7 @@ export default {
margin-right: toRpx(16);
flex-shrink: 0;
}
.valueremark {
color: #222222;
font-size: toRpx(26);
......@@ -1174,6 +1271,7 @@ export default {
white-space: normal;
}
}
.meal-box {
border-radius: toRpx(24);
border: toRpx(2) solid #dce0e6;
......@@ -1186,52 +1284,63 @@ export default {
flex-shrink: 0;
margin-right: toRpx(8);
}
.meal-hd {
color: #333333;
font-size: toRpx(32);
font-weight: 400;
margin-bottom: toRpx(20);
.meal-hd-name {
flex: 1;
min-width: 0;
}
.price {
font-weight: 500;
}
}
.meal-bd {
background: #f6f7fa;
border-radius: toRpx(16);
padding: 0 toRpx(32);
box-sizing: border-box;
.meal-bd-head {
border-bottom: toRpx(2) solid #dce0e6;
padding: toRpx(24) 0;
.name {
color: #333333;
font-size: toRpx(28);
font-weight: 400;
min-width: 0;
}
.meal-bd-bottom {
color: #999999;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(8);
}
.price {
color: #333333;
font-size: toRpx(28);
font-weight: 400;
}
}
.meal-bd-box:last-child .meal-bd-head {
border-bottom: none;
}
}
}
.good-list {
margin-top: toRpx(16);
.good {
color: #333333;
font-size: toRpx(28);
......@@ -1239,6 +1348,7 @@ export default {
background: #f5f7fa;
padding: toRpx(30) toRpx(24) toRpx(24) toRpx(24);
margin-bottom: toRpx(16);
.good-name {
font-weight: 400;
flex: 4;
......@@ -1253,25 +1363,30 @@ export default {
white-space: nowrap;
}
}
.marketing-icon {
display: inline-block !important;
flex-shrink: 0;
margin-right: toRpx(8);
}
.good-price {
font-weight: 500;
flex: 1;
text-align: right;
}
.good-alias {
font-size: toRpx(24);
font-weight: 400;
}
.good-sku {
color: #999999;
font-size: toRpx(24);
font-weight: 400;
}
.good-count {
color: #999999;
font-size: toRpx(24);
......@@ -1279,17 +1394,20 @@ export default {
}
}
}
.coupon-name {
color: #292d33;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(8);
}
.good-total-lable {
color: #757980;
font-size: toRpx(28);
font-weight: 400;
}
.good-total-value {
color: #4673ff;
font-size: toRpx(40);
......@@ -1300,22 +1418,26 @@ export default {
.value .value-item text {
margin: 0 toRpx(6);
}
.label {
width: toRpx(156);
width: toRpx(186);
color: #999999;
font-size: toRpx(26);
font-weight: 400;
}
.value {
color: #222222;
font-size: toRpx(26);
font-weight: 400;
}
.image-box {
.image {
width: toRpx(106);
height: toRpx(112);
margin-right: toRpx(16);
image {
width: 100%;
height: 100%;
......@@ -1329,37 +1451,44 @@ export default {
.value .value-item text {
margin: 0 toRpx(6);
}
.label {
width: toRpx(156);
color: #999999;
font-size: toRpx(26);
font-weight: 400;
}
.value {
color: #222222;
font-size: toRpx(26);
font-weight: 400;
}
.codeImg-box {
.barCode {
color: #292d33;
font-size: toRpx(28);
font-weight: 400;
}
.barCodeImg {
width: toRpx(600);
height: toRpx(158);
}
}
.edit-warranty {
color: #347bff;
font-size: toRpx(28);
font-weight: 400;
}
}
.warranty-tips {
margin-bottom: toRpx(12);
}
.customerService {
width: toRpx(320);
height: toRpx(320);
......@@ -1371,6 +1500,7 @@ export default {
bottom: toRpx(24);
width: 100%;
left: 0;
.btn {
width: 80%;
height: toRpx(80);
......@@ -1380,11 +1510,13 @@ export default {
line-height: toRpx(80);
text-align: center;
}
.confirm {
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
color: #ffffff;
margin-left: toRpx(32);
}
.edit {
background: #3b73ff1a;
color: #4673ff;
......
......@@ -75,6 +75,19 @@ const FORM_LIST = [
required: true
},
{
hidden: false,
label: '日报标签',
value:'customerTags',
type:'radio',
multiple: true,
},
{
hidden: false,
label:'实际交付日期',
value:'actualDeliveryDate',
type:"single-calendar"
},
{
label: '性别',
value: 'customerSex',
type: 'radio',
......
......@@ -193,7 +193,7 @@ export default {
},
async entranceClick (item) {
if (this.toolComponentName == item.name) return
const noInterceptPage = ['DailyReport']
const noInterceptPage = ['DailyReport','storeDailyReport']
// 原禁止提单inspectionOfProhibitionBill方法被替换getLimitRecord
// if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
if (!noInterceptPage.includes(item.name) && (await this.checkDailyReport())) return
......
......@@ -47,11 +47,14 @@
</view>
<view class="footer">
<Footer>
<view :class="['btn default-btn', { w50: !saveBtn || !showPushBtn }]" @click="$emit('showNegotiationList')">查看洽谈明细表汇总</view>
<view :class="['btn default-btn',{w50:!saveBtn || !showPushBtn}]" @click="saveBtn = true" v-if="!saveBtn">编辑</view>
<!-- <view :class="['btn default-btn', { w100: !saveBtn || !showPushBtn }]" @click="$emit('showNegotiationList')">
查看洽谈明细表汇总</view> -->
<view :class="['btn default-btn', { w100: !saveBtn || !showPushBtn }]" @click="saveBtn = true"
v-if="!saveBtn">编辑
</view>
<template v-else>
<view :class="['btn default-btn',{w50:!showPushBtn}]" @click="$emit('saveReport', list)">保存</view>
<view class="btn" @click="$emit('submitReport', list )" v-if="showPushBtn">上报数据</view>
<view :class="['btn default-btn', { w100: !showPushBtn }]" @click="$emit('saveReport', list)">保存</view>
<view class="btn" @click="$emit('submitReport', list)" v-if="showPushBtn">上报数据</view>
</template>
</Footer>
</view>
......@@ -75,7 +78,7 @@ import DailyPopup from '../components/DailyPopup/index.vue'
export default {
name: 'StoreDailyReport',
components: { Table, Nothing, Footer, EditForm, FormItem, DailyPopup },
inject: ['userInfo', 'sceneType'],
inject: ['userInfo', 'sceneType','dailyReportRecordId'],
props: {
templateData: {
type: Array,
......@@ -83,8 +86,8 @@ export default {
},
reportDate: String,
ReportStatus: null,
isToday:Boolean,
SubmissionStatus:null
isToday: Boolean,
SubmissionStatus: null
},
data() {
return {
......@@ -94,8 +97,8 @@ export default {
}
},
computed: {
showPushBtn(){
return this.SubmissionStatus != 1 && this.isToday
showPushBtn() {
return this.SubmissionStatus == 2 && this.isToday && this.dailyReportRecordId()
}
},
watch: {
......@@ -105,7 +108,7 @@ export default {
this.list = utils.deepClone(val)
setTimeout(() => {
this.loadComplete = true
if (val.length) this.getMonthlyPendingCount()
// if (val.length) this.getMonthlyPendingCount()
}, 200)
},
immediate: true,
......@@ -129,12 +132,22 @@ export default {
mounted() {
},
methods: {
getCurrentStaff() {
const { name, uuid } = uni.$storage.get("userInfo"),
key = 'F2-107-6'
return {
name,
uuid,
key
}
},
itemShow(i) {
if (i.rules) {
let { keys, result } = i.rules,
{ list } = this
if (keys && result) {
console.log(result, keys)
let params = keys.map((c, index) => `val${index + 1}`),
// 将 new Function 改为 eval 方式
func = eval(`(function(${params.join(',')}) { return ${result}; })`),
......@@ -165,11 +178,22 @@ export default {
addItem(index) {
let { templateData, saveBtn } = this
if (!saveBtn) return
this.list[index].children.push(templateData[index].origin_children)
let data = this.list[index].children[this.list[index].children.length - 1],
c_index = this.list[index].children.length - 1,
parent = this.list[index]
this.$refs.editForm.open(data, c_index, index, parent)
try {
this.list[index].children.push(templateData[index].origin_children)
let data = this.list[index].children[this.list[index].children.length - 1],
c_index = this.list[index].children.length - 1,
parent = this.list[index]
let { name, uuid, key } = this.getCurrentStaff()
data.forEach(item => {
if (item.key == key) {
item.value = name
item[key] = uuid
}
})
this.$refs.editForm.open(data, c_index, index, parent)
} catch (error) {
console.log(error)
}
},
confirm(data, c_index, index) {
this.$set(this.list[index].children, c_index, utils.deepClone(data))
......@@ -385,7 +409,7 @@ export default {
}
.btn {
width: calc(100% / 3 - #{toRpx(32)});
width: calc(100% / 2 - #{toRpx(32)});
height: toRpx(80);
display: flex;
justify-content: center;
......@@ -401,8 +425,9 @@ export default {
background: #3b73ff1a;
color: #4673ff;
}
.w50{
width: calc(100% / 2 - #{toRpx(32)});
.w100 {
width: 100%;
}
}
}
......
<template>
<view class="car-model-box">
<scroll-view
class="scroll-view"
scroll-y
:scroll-into-view="letter"
>
<scroll-view class="scroll-view" scroll-y :scroll-into-view="letter">
<template v-if="listData.length">
<template v-for="(i, index) in listData">
<view
class="item-box"
:key="index"
:id="i.letter"
>
<view class="letter-title flex">{{i.letter}}</view>
<template v-for="(c,cindex) in i.list">
<view
class="car-model"
:key="cindex"
>
<view class="brand-name">{{c.name}}</view>
<view class="item-box" :key="index" :id="i.letter">
<view class="letter-title flex">{{ i.letter }}</view>
<template v-for="(c, cindex) in i.list">
<view class="car-model" :key="cindex">
<view class="brand-name">{{ c.name }}</view>
<template v-for="(j, jindex) in c.childs">
<view
:key="jindex"
class="car-block"
>
<view
class="sub-brand-name"
@click="getCarSeries(j,c)"
>
{{j.name}}
<view :key="jindex" class="car-block">
<view class="sub-brand-name" @click="getCarSeries(j, c)">
{{ j.name }}
</view>
<view class="series-list">
<template v-for="(k, kindex) in j.childs">
<view
class="series-name"
:key="kindex"
>
<view
class="series-name flex"
@click="getCarTypeList(k)"
>
{{k.name}}
<uni-icons
:type="`${k.childs && k.childs.length && k.open ?'down':'right'}`"
size="18"
></uni-icons>
<view class="series-name" :key="kindex">
<view :class="['series-name flex', { active: checkActive(k) }]" @click="getCarTypeList(c,j, k)">
{{ k.name }}
<uni-icons :type="`${k.childs && k.childs.length && k.open ? 'down' : 'right'}`"
size="18"></uni-icons>
</view>
<view
class="brand-list"
v-if="k.open"
>
<template v-for="(s,sindex) in k.childs">
<view
:class="['item flex',{active: checkActive(s)}]"
:key="`${s.id}_${sindex}`"
@click.stop="chooseCarType(s,c)"
>
{{s.name}}
<view class="brand-list" v-if="k.open">
<template v-for="(s, sindex) in k.childs">
<view :class="['item flex', { active: checkActive(s) }]" :key="`${s.id}_${sindex}`"
@click.stop="chooseCarType(s, c)">
{{ s.name }}
<view class="sprite-icon icon-tag-checked"></view>
</view>
</template>
......@@ -76,12 +45,8 @@
</scroll-view>
<view class="letter-list">
<template v-for="(i, index) in listData">
<view
class="letter-item"
:key="index"
@click="letter = i.letter"
>
{{i.letter}}
<view class="letter-item" :key="index" @click="letter = i.letter">
{{ i.letter }}
</view>
</template>
</view>
......@@ -93,15 +58,15 @@ import popupmixin from './popupmixin'
export default {
mixins: [popupmixin],
name: 'CarModelList',
data () {
data() {
return {
letter: 'A',
}
},
mounted () {
mounted() {
},
methods: {
async getList (searchValue) {
async getList(searchValue) {
const { userInfo, params } = this,
{ cacheData } = params
this.currentId = ''
......@@ -115,7 +80,7 @@ export default {
{ carBrandList } = data[0]
this.updateParams(params, carBrandList || [])
},
initData (carData) {
initData(carData) {
let { params: { idKey }, data: { customer, carInfo } } = this,
letterList = Array.from(new Set([...carData.map((e) => e.letter)])),
carModelList = letterList.map(e => {
......@@ -134,7 +99,7 @@ export default {
this.list = carModelList
this.$emit('onComplete')
},
handleSearch (searchValue) {
handleSearch(searchValue) {
if (!searchValue) {
this.searchStatus = false
this.letter = 'A'
......@@ -178,7 +143,7 @@ export default {
}
},
async getCarSeries (j, c) {
async getCarSeries(j, c) {
if (j.childs && j.childs.length) return
uni.showLoading({
mask: true
......@@ -191,7 +156,17 @@ export default {
j.childs = data
this.$forceUpdate()
},
async getCarTypeList (k) {
async getCarTypeList(c,j, k) {
let chooseItem = {
vehicleBrandId: c.id,
vehicleBrandName: c.name,
vehicleSubBrandId: j.id,
vehicleSubBrandName: j.name,
vehicleSeriesId: k.id,
vehicleSeriesName: k.name
}
this.currentId = k.id
this.$emit('choose', chooseItem)
if (k.childs && k.childs.length) {
k.open = !k.open
this.$forceUpdate()
......@@ -215,7 +190,7 @@ export default {
})
},
chooseCarType (s, c) {
chooseCarType(s, c) {
let chooseItem = {
vehicleBrandId: c.id,
vehicleBrandName: c.name,
......@@ -229,11 +204,11 @@ export default {
this.currentId = s.id
this.$emit('choose', chooseItem)
},
checkActive (s) {
checkActive(s) {
let { currentId, data, params, data: { key } } = this,
carInfo = data[key] || {}
return (currentId ? s.id == currentId : s.id == carInfo[params.idKey] || '' )
return (currentId ? s.id == currentId : s.id == carInfo[params.idKey] || '')
},
}
}
......@@ -244,9 +219,11 @@ export default {
position: relative;
height: 100%;
width: 100%;
.scroll-view {
height: 100%;
}
.letter-list {
position: absolute;
top: 50%;
......@@ -258,8 +235,10 @@ export default {
padding: 0 toRpx(18);
text-align: center;
}
.item-box {
margin-bottom: toRpx(32);
.letter-title {
color: #888888;
font-size: toRpx(28);
......@@ -267,8 +246,10 @@ export default {
background: #f5f7fa;
padding-left: toRpx(48);
}
.car-model {
margin: 0 toRpx(48);
.brand-name {
color: #000;
font-size: toRpx(40);
......@@ -276,9 +257,11 @@ export default {
margin: toRpx(20) 0;
font-weight: 500;
}
.car-block {
border-bottom: toRpx(2) solid #dce0e6;
}
.sub-brand-name {
color: #333;
font-size: toRpx(32);
......@@ -288,17 +271,23 @@ export default {
margin: toRpx(16) 0;
padding-left: toRpx(10);
}
.series-name {
color: #555;
font-size: toRpx(28);
font-size: toRpx(30);
line-height: toRpx(40);
width: 100%;
flex-shrink: 0;
margin-bottom: toRpx(16);
padding-left: toRpx(20);
}
.series-name.active {
color: #2c66f7;
font-weight: 500;
}
}
}
.brand-list {
// display: grid;
// grid-template-columns: repeat(4, 1fr);
......@@ -307,17 +296,18 @@ export default {
// gap: toRpx(32) 0;
flex-wrap: wrap;
padding: 0 toRpx(20);
.item {
width: calc((100% - #{toRpx(96)}) / 4);
justify-content: center;
min-height: toRpx(72);
min-height: toRpx(64);
border-radius: toRpx(8);
border: toRpx(2) solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: toRpx(32);
padding: toRpx(10) toRpx(20);
font-size: toRpx(26);
padding: toRpx(6) toRpx(14);
box-sizing: border-box;
.sprite-icon {
display: none;
......@@ -326,10 +316,12 @@ export default {
right: 0;
}
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
......
<template>
<view class="options-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>
{{ i.label }}
</view>
</template>
</view>
</template>
<script type="text/ecmascript-6">
import popupmixin from './popupmixin'
export default {
mixins: [popupmixin],
name: 'OptionsComponent',
inject: ['userInfo'],
data() {
return {
}
},
computed: {
},
mounted() {
},
methods: {
async getList() {
const hasCommonElement = (arrA, arrB) => {
return arrA.some(item => arrB.includes(item))
}
const isSubset = (arrA, arrB) => {
// 检查arrB的每个元素是否都在arrA中
const setA = new Set(arrA)
return arrB.every(item => setA.has(item))
}
let { params, data: { options }, STORE_BASE_SCENE_CODE, CAR_BRAND_ID } = this
this.currentId = ''
this.currentIds = []
this.chooseList = []
this.componentLoading(params)
options = options.filter(item => {
// 品牌过滤
let filterBrand = true,
filterScene = true,
brandId = true,
flag = true
if (item.filterBrandId && item.filterBrandId.length) {
filterBrand = !isSubset(item.filterBrandId, CAR_BRAND_ID)
} else {
brandId = item.brandId && item.brandId.length ? hasCommonElement(item.brandId, CAR_BRAND_ID) : true
}
filterScene = item.baseSceneCode&& item.baseSceneCode?.length ? hasCommonElement(item.baseSceneCode, STORE_BASE_SCENE_CODE) : true
flag = filterBrand && brandId && filterScene
if(item.matchEffect) flag = true
return flag
})
this.updateParams(params, options || [])
},
initData(list) {
const { data, data: { key }, params: { multiple } } = this
if (data[key]) {
if (!multiple) {
this.currentId = data[key]
let item = list.find(i => i.value == this.currentId)
this.$emit('choose', item)
} else {
let arr = data[key]
if (typeof arr == 'string') arr = arr.split(',')
this.chooseList = arr.map(i => list.find(e => e.value == i))
this.currentIds = arr
this.$emit('choose', this.chooseList)
}
}
this.list = list
this.$emit('onComplete')
},
choose(i) {
let { params: { multiple }, currentIds } = this
if (!multiple) {
this.currentId = i.value
this.$emit('choose', i)
} else {
let index = currentIds.indexOf(i.value)
if (index == -1) {
this.currentIds.push(i.value)
this.chooseList.push(i)
} else {
this.currentIds.splice(index, 1)
this.chooseList.splice(index, 1)
}
this.$emit('choose', this.chooseList)
}
},
checkActive(i) {
let { currentId, currentIds, data: { key }, data } = this
if (currentIds && currentIds.length) return currentIds.includes(i.value)
return currentId ? i.value == currentId : i.value == data[key]
}
}
}
</script>
<style scoped lang="scss">
.options-list {
display: grid;
grid-template-columns: repeat(4, 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>
export default {
inject: ['userInfo', 'baseConfigData'],
data () {
data() {
return {
list: [],
searchStatus: false,
searchList: [],
chooseList: [],
currentId: '',
currentIds: [],
currentIds: []
}
},
props: {
......@@ -16,22 +16,31 @@ export default {
dataKey: String,
isDefeatOrder: Boolean,
positionTypeList: Array,
reqParams: Object,
reqParams: Object
},
computed: {
listData () {
listData() {
return this.searchStatus ? this.searchList : this.list
},
noData () {
noData() {
return !this.listData.length
},
sceneType(){
sceneType() {
return uni.$storage.get('userInfo').sceneType
},
CAR_BRAND_ID() {
const carBrandList = uni.$storage.get('carBrandList'),
carBrandId = carBrandList.map(item => item.id)
return carBrandId
},
STORE_BASE_SCENE_CODE() {
const storeBaseSceneCode = uni.$storage.get('storeBaseSceneCode')
return storeBaseSceneCode
}
},
watch: {
noData: {
handler (val) {
handler(val) {
let { params } = this
params.noData = val
this.updateParams(params)
......@@ -40,17 +49,16 @@ export default {
}
},
methods: {
updateParams (params, data) {
updateParams(params, data) {
if (data) {
this.initData && this.initData(data)
params.cacheData = data
}
this.$emit('update:params', params)
},
componentLoading (params) {
componentLoading(params) {
params.loadComplete = false
this.$emit('update:params', this.params)
}
}
}
\ No newline at end of file
}
......@@ -71,6 +71,18 @@ const componentConfig = {
loadComplete: false,
searchValue: '',
noData: false
},
7: {
name: 'OptionsComponent',
title: '多选',
multiple: true,
placeholder: '请输入选项',
nullTips: '请选择选项',
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false,
hideSearch: true
}
}
......
......@@ -100,6 +100,7 @@ import OrderList from './components/OrderList.vue'
import DateTime from './components/DateTime.vue'
import dayjs from 'dayjs';
import utils from '@/utils/utils'
import OptionsComponent from './components/OptionsComponent.vue'
export default {
components: {
......@@ -108,6 +109,7 @@ export default {
CarModelList,
OrderList,
DateTime,
OptionsComponent,
},
name: '',
props: {
......
......@@ -77,6 +77,15 @@ export default {
return rules?.maxDate ? dayjs(eval(rules.maxDate)).format('YYYY-MM-DD') : '2099-12-31'
}
},
STORE_BASE_SCENE_CODE() {
const storeBaseSceneCode = uni.$storage.get('storeBaseSceneCode')
return storeBaseSceneCode.map(item => String(item)) || []
},
CAR_BRAND_ID() {
const carBrandList = uni.$storage.get('carBrandList'),
carBrandId = carBrandList.map(item => String(item.id))
return carBrandId || []
},
},
mounted() {
},
......@@ -95,6 +104,19 @@ export default {
* @param parent 父级数据
*/
open(data, c_index, index, parent) {
const hasCommonElement = (arrA, arrB) => {
arrA = arrA.map(item => String(item))
arrB = arrB.map(item => String(item))
return arrA.some(i => arrB.includes(i))
}
data.forEach(item => {
if (item.type == 'select' && !item.optionsKey) {
item.options = item.options.filter(i => i.baseSceneCode && i.baseSceneCode?.length ? hasCommonElement(i.baseSceneCode, this.STORE_BASE_SCENE_CODE) : true)
}
})
data.$sceneCodes = this.STORE_BASE_SCENE_CODE
data.$brandIds = this.CAR_BRAND_ID || []
this.data = utils.deepClone(data) || {}
this.c_index = c_index || 0
this.index = index || 0
......@@ -131,8 +153,9 @@ export default {
func = eval(`(function(${params.join(',')}) { return ${result}; })`),
value = []
keys.map(key => {
let item = data.find(i => i.key == key)
if (item) value.push(item.value || null)
let i = data.find(i => i.key == key)
if (data[key]) value.push(data[key])
if (i) value.push(i.type == 'multipleSelect' ? i[i.key] : i.value || null)
})
let show = func(...value)
item.show = show
......@@ -150,8 +173,12 @@ export default {
onInput(val, index) {
this.$set(this.data[index], 'value', val)
},
onSelect(val, index) {
this.$set(this.data[index], 'value', val)
onSelect(item, index) {
console.log(item, index)
let { key } = this.data[index]
console.log(this.data[index])
this.$set(this.data[index], key, item.value)
this.$set(this.data[index], 'value', item.label)
},
openSelect(item, type, index) {
let list = this.data || []
......@@ -169,12 +196,15 @@ export default {
/** 根据 popupType 处理数据
* 5: 日期时间选择
* 6: 日历
* 7: 多选
*/
if (popupType == 6 || popupType == 5) {
this.$set(this.data[itemIndex], 'value', chooseContent)
} else if (popupType == 3) {
const { vehicleBrandName, vehicleSubBrandName, vehicleSeriesName, vehicleShapeName } = chooseContent
this.$set(this.data[itemIndex], 'value', `${vehicleBrandName}-${vehicleSubBrandName}-${vehicleSeriesName}-${vehicleShapeName}`)
let carName = `${vehicleBrandName}-${vehicleSubBrandName}-${vehicleSeriesName}`
if (vehicleShapeName) carName += `-${vehicleShapeName}`
this.$set(this.data[itemIndex], 'value', carName)
this.$set(this.data[itemIndex], this.data[itemIndex].key, chooseContent)
} else if (popupType == 4) {
......@@ -189,6 +219,11 @@ export default {
})
}
} else if (popupType == 7) {
let label = chooseContent.map(item => item.label).join('/'),
value = chooseContent.map(item => item.value)
this.$set(this.data[itemIndex], 'value', label)
this.$set(this.data[itemIndex], this.data[itemIndex].key, value)
} else {
this.$set(this.data[itemIndex], 'value', chooseContent.staffName)
this.$set(this.data[itemIndex], this.data[itemIndex].key, chooseContent.uuid)
......
......@@ -31,8 +31,8 @@
</template>
<template v-else>
<picker class="picker" mode="selector" @change="select" :range="item.options || []" range-key="label">
<view :class="['select flex', { 'placeholderStyle': !item.value }]" ><text
class="text-hide">{{ item.value || item.placeholder || '请选择' }}</text>
<view :class="['select flex', { 'placeholderStyle': !item.value }]"><text class="text-hide">{{ item.value
|| item.placeholder || '请选择' }}</text>
<view class="sprite-icon icon-icon-select"></view>
</view>
</picker>
......@@ -75,10 +75,7 @@
</template>
<script type='text/ecmascript-6'>
import dayjs from 'dayjs';
import utils from '@/utils/utils'
import permision from '@/js_sdk/wa-permission/permission.js'
export default {
name: 'FormItem',
props: {
......@@ -142,10 +139,10 @@ export default {
if (item.optionsKey || ['date', 'datetime', 'carBrandSelect'].includes(item.type)) {
if (item.optionsKey == 'storeStaffList' && item.type == 'select') popupType = 1
if (item.optionsKey == 'orderList') popupType = 4
if (item.optionsKey == 'options') popupType = 7
this.$emit('openSelect', item, popupType)
} else {
this.$emit('onSelect', item.options[e.detail.value].value)
this.$emit('onSelect', item.options[e.detail.value])
}
},
async clickPrefix() {
......@@ -415,7 +412,8 @@ export default {
background: #f4f5f7;
padding: toRpx(24);
box-sizing: border-box;
.select{
.select {
width: 100%;
height: 100%;
display: block;
......
......@@ -78,7 +78,7 @@ export default {
dailyReportRecordId: '',
reportStatus: '',
submissionStatus: '',
submissionDate:''
submissionDate: ''
}
},
onBackPress(options) {
......@@ -104,10 +104,10 @@ export default {
carBrandId = carBrandList.map(item => item.id)
return carBrandId
},
BASE_SCENE_CODE() {
const baseSceneCode = uni.$storage.get('baseSceneCode')
return baseSceneCode
},
// BASE_SCENE_CODE() {
// const baseSceneCode = uni.$storage.get('baseSceneCode')
// return baseSceneCode
// },
STORE_BASE_SCENE_CODE() {
const storeBaseSceneCode = uni.$storage.get('storeBaseSceneCode')
return storeBaseSceneCode
......@@ -212,14 +212,10 @@ export default {
const setA = new Set(arrA)
return arrB.every(item => setA.has(item))
}
const { templateType, CAR_BRAND_ID, BASE_SCENE_CODE, STORE_BASE_SCENE_CODE } = this,
const { templateType, CAR_BRAND_ID, STORE_BASE_SCENE_CODE } = this,
data = await uni.$api.dailyTemplateApi.getDailyTemplate(templateType),
baseCode = templateType == 2 ? STORE_BASE_SCENE_CODE : BASE_SCENE_CODE
baseCode = STORE_BASE_SCENE_CODE
let templateData = Object.values(data)
// .filter(item => {
// // 场景类型过滤
// return item.sceneType.length ? item.sceneType.includes(SCENE_TYPE) : true
// })
.filter(item => {
// 品牌过滤
if (item.filterBrandId && item.filterBrandId.length) {
......@@ -270,6 +266,7 @@ export default {
}
})
uni.hideLoading()
console.log(templateData)
this.templateData = templateData
},
setCurrentDate(currentDate) {
......@@ -283,13 +280,9 @@ export default {
},
async checkReport() {
let componentRef = this.$refs[`ref-${this.componentName}`],
{ templateData, templateType, currentDate } = this
// if (templateType != 1) {
// if (!componentRef.isToday) return false
// } else {
{ templateData, currentDate } = this
let lastDay = dayjs().subtract(30, 'day')
if (!lastDay.isBefore(dayjs(currentDate), 'day')) return false
// }
return templateData.length ? componentRef.saveBtnStatus : false
},
......@@ -450,8 +443,8 @@ export default {
uni.showLoading({ title: '提交中...', mask: true })
const saveData = await uni.$api.dailyTemplateApi.saveDraft(reportParams)
if (saveData) {
const dailyReportRecordId = await this.getReportDetail(true),
data = await uni.$api.dailyTemplateApi.submitReport({ dailyReportRecordId })
const { dailyReportRecordId } = this,
data = await uni.$api.dailyTemplateApi.submitReport({ dailyReportRecordId })
uni.hideLoading()
if (data) {
uni.showToast({ title: '操作成功', icon: 'success', mask: true })
......
......@@ -19,7 +19,7 @@ export default {
},
ReportStatus: null,
SubmissionStatus: null,
submissionDate:[String, Number]
submissionDate: [String, Number]
},
computed: {
/**可编辑日期 */
......@@ -33,7 +33,7 @@ export default {
},
reportParams() {
let { shopMerchantId, shopMerchantName, uuid, name, merchantId, merchantName } = this.userInfo,
{ currentDate, templateType, dailyReportRecordId, sceneType, SubmissionStatus , submissionDate} = this,
{ currentDate, templateType, dailyReportRecordId, sceneType, SubmissionStatus, submissionDate } = this,
params = {
merchantId: shopMerchantId,
merchantName: shopMerchantName,
......@@ -44,11 +44,11 @@ export default {
templateType: templateType(),
yqMerchantId: merchantId,
yqMerchantName: merchantName,
sceneType,
sceneType
}
if (!SubmissionStatus) params.submissionStatus = 2
else params.submissionStatus = SubmissionStatus
if(!submissionDate) params.submissionDate = dayjs().format('YYYY-MM-DD HH:mm:ss')
if (!submissionDate) params.submissionDate = dayjs().format('YYYY-MM-DD HH:mm:ss')
else params.submissionDate = dayjs(submissionDate).format('YYYY-MM-DD HH:mm:ss')
if (dailyReportRecordId()) params.dailyReportRecordId = dailyReportRecordId()
return params
......@@ -67,8 +67,9 @@ export default {
func = eval(`(function(${params.join(',')}) { return ${result}; })`),
value = []
keys.map(key => {
let item = data.find(i => i.key == key)
if (item) value.push(item.value || null)
let i = data.find(i => i.key == key)
if (data[key]) value.push(data[key])
if (i) value.push(i.type == 'multipleSelect' ? i[i.key] : i.value || null)
})
let show = func(...value)
return show
......@@ -141,10 +142,11 @@ export default {
})
const { shopMerchantId } = this.userInfo,
{ sceneType } = this,
carBrandList = await uni.$api.boutiqueApi.getDailyReportCarBrand({
merchantId: shopMerchantId,
sceneType
}) || []
carBrandList =
(await uni.$api.boutiqueApi.getDailyReportCarBrand({
merchantId: shopMerchantId,
sceneType
})) || []
requestJson.carBrandList = carBrandList.map(({ firstBrandId, firstBrandName, brandId, brandName }) => ({
firstBrandId,
firstBrandName,
......@@ -169,7 +171,7 @@ export default {
}
},
async submitReport(res) {
let reportParams = await this.saveReport(res, true)
let reportParams = await this.saveReport(res, true)
this.$emit('submitReport', reportParams)
}
}
......
const CUSTOMER_TAGS = {
1: '已触客',
2: '已拉群',
3: '已交付引荐',
4: '首保维保客户 ',
5: '事故车客户'
}
module.exports = {
data: {
CUSTOMER_TAGS,
orderObj: [
{
label: '工单编号',
......@@ -29,6 +37,21 @@ module.exports = {
key: 'customerName'
},
{
label: '日报标签',
key: 'customerTags',
format: data => {
return data
.split(',')
.map(item => CUSTOMER_TAGS[item])
.join('/')
}
},
{
label: '实际交付日期',
key: 'actualDeliveryDate',
format: val => dayjs(val).format('YYYY-MM-DD')
},
{
label: '性别',
key: 'customerSex',
enum: {
......@@ -220,7 +243,7 @@ module.exports = {
goodsOrderApplyStatus: {
0: '审批中', //区域运营待审核
1: '审批通过', //线上运营待审核
2: '审批驳回',
2: '审批驳回'
},
orderType: {
1: '正常订单',
......@@ -228,7 +251,7 @@ module.exports = {
3: '买赠策略',
4: '冲量活动',
5: '组合付款',
6:'内部结算'
6: '内部结算'
}
}
}
......@@ -5,18 +5,16 @@
<view class="box">
<scroll-view class="scroll-view" scroll-y="true">
<view class="box-content">
<GlCell :formList="formList" :formData="orderObj" @radioChange="radioChange" @inputBlur="inputBlur" @handleCell="handleCell" :titleList="titleList">
<GlCell :formList="formList" :formData="orderObj" @radioChange="radioChange" @inputBlur="inputBlur"
@handleCell="handleCell" :titleList="titleList" @confirmCalendar="confirmCalendar">
<template slot="customer">
<view class="customer-title flex">
客户信息
<view
class="customer-file flex"
@click="
handleCell({
key: 'customer'
})
"
>
<view class="customer-file flex" @click="
handleCell({
key: 'customer'
})
">
<view class="sprite-icon icon-customer-list"></view>
客户档案
</view>
......@@ -24,7 +22,9 @@
</template>
<template slot="skuGoods">
<template v-if="orderObj.skuGoods.length">
<SkuGoods :list="orderObj.skuGoods" @changeTotalPrice="changeTotalPrice" :positionTypeList="positionTypeList" :baseConfigData="baseConfigData" :orderTypeCode="orderObj.orderTypeCode"></SkuGoods>
<SkuGoods :list="orderObj.skuGoods" @changeTotalPrice="changeTotalPrice"
:positionTypeList="positionTypeList" :baseConfigData="baseConfigData"
:orderTypeCode="orderObj.orderTypeCode"></SkuGoods>
</template>
<template v-if="orderObj.total > 0">
<view class="total">
......@@ -46,7 +46,8 @@
</view>
</view>
<!-- 弹窗 -->
<order-popup ref="orderPopup" :data="orderObj" :dataKey="valueKey" @onConfirm="onConfirm" :externalData="externalData" :popupType="popupType" :popupTitle="popupTitle" />
<order-popup ref="orderPopup" :data="orderObj" :dataKey="valueKey" @onConfirm="onConfirm"
:externalData="externalData" :popupType="popupType" :popupTitle="popupTitle" />
<template v-if="showUpload">
<view class="upload-box">
<upload-proof-of-payment @back="clearPayMentDocList" @confirm="uploadConfirm" />
......@@ -120,6 +121,31 @@ export default {
},
deep: true,
immediate: true
},
"orderObj.salesType": {
handler(newVal) {
const selected = Boolean(this.orderObj && (this.orderObj.baseSceneCodeValue || this.orderObj.baseSceneCode))
console.log(newVal, 'newVal')
let formList = this.formList
formList.map(item => {
item.map(child => {
if (child.value == 'customerTags') {
let hidden = !selected || newVal == 2
child.hidden = hidden
if (hidden) this.$set(this.orderObj, 'customerTags', [])
}
if (child.value == 'actualDeliveryDate') {
let hidden = ![0].includes(+newVal) || !selected
child.hidden = hidden
if (hidden) this.$set(this.orderObj, 'actualDeliveryDate', '')
}
})
})
this.formList = formList
},
immediate: true,
deep: true
}
},
data() {
......@@ -149,7 +175,9 @@ export default {
ownerGender: '男',
salesType: '0',
carInfo: {},
price: ''
price: '',
customerTags: [], // 日报标签
actualDeliveryDate: '', // 实际交付日期
}, // 弹窗传入的数据},
popupType: 0,
popupTypeEnum,
......@@ -184,11 +212,11 @@ export default {
this.initData()
},
methods: {
updateSceneGate () {
updateSceneGate() {
const selected = Boolean(this.orderObj && (this.orderObj.baseSceneCodeValue || this.orderObj.baseSceneCode))
const list = this.formList || []
list.forEach(group => {
;(group || []).forEach(item => {
; (group || []).forEach(item => {
if (!item) return
if (item._originHidden === undefined) item._originHidden = Boolean(item.hidden)
if (!selected) {
......@@ -201,7 +229,7 @@ export default {
this.formList = list
return selected
},
async initRecentSceneEcho () {
async initRecentSceneEcho() {
try {
const userInfo = this.userInfo || (uni.$storage.get('userInfo') || {})
const phone = userInfo.phone
......@@ -231,7 +259,7 @@ export default {
// 同步表单展示(GlCell 部分字段依赖 current)
const sceneCell = this.formList?.[0]?.find(v => v && v.value === 'baseSceneCode')
if (sceneCell) sceneCell.current = item.name || item.staffName || ''
} catch (e) {}
} catch (e) { }
},
async getQuotationInfoById(id) {
try {
......@@ -584,7 +612,7 @@ export default {
0: pointsMultiRole == 'Y' ? '销售顾问/录单员' : '推荐人',
4: '车型',
13: payType == 2 ? '4S店收款时间' : '嘀加收款时间',
29:'确认业务场景名称'
29: '确认业务场景名称'
}[this.popupType]
// 确保 orderPopup 引用存在后再调用 open 方法
if (this.$refs.orderPopup && this.$refs.orderPopup.open) {
......@@ -595,8 +623,19 @@ export default {
},
// 单选框change事件
radioChange(e, val) {
this.$set(this.orderObj, val.value, e.detail.value)
if (val.value == 'payee') this.changePayee()
if (val.multiple) {
let key = val.value,
value = this.orderObj[key] || []
if (value.includes(e)) {
value = value.filter(item => item !== e)
} else {
value.push(e)
}
this.$set(this.orderObj, key, value)
} else {
this.$set(this.orderObj, val.value, e.detail.value)
if (val.value == 'payee') this.changePayee()
}
},
// 弹窗确认回调
onConfirm(val, flag) {
......@@ -1184,12 +1223,19 @@ export default {
return pre
}, [])
let keyList = ['mode', 'payee', 'payType', 'referrerId', 'referrer', 'deliveryId', 'deliveryName', 'total', 'notes', 'tradeNo', 'transactionNo', 'paymentDocList', 'id', 'orderId', 'pay2Time'],
customerKeyList = ['owner', 'phone', 'certificateNo', 'carVin', 'seat', 'price', 'ownerGender', 'city', 'ageRange', 'hobby', 'companion', 'carColor', 'salesType']
customerKeyList = ['owner', 'phone', 'certificateNo', 'carVin', 'seat', 'price', 'ownerGender', 'city', 'ageRange', 'hobby', 'companion', 'carColor', 'salesType', 'customerTags', 'actualDeliveryDate']
keyList.map(key => {
if (orderInfo[key] != null) params[key] = orderInfo[key]
})
customerKeyList.map(key => {
if (orderInfo[key] != null) params.owner[key] = orderInfo[key]
if (orderInfo[key] != null) {
if (key == 'customerTags'){
if(orderInfo[key].length > 0) orderInfo[key] = orderInfo[key].join(',')
else orderInfo[key] = ''
}
if (orderInfo[key] && key == 'actualDeliveryDate') orderInfo[key] += ' 00:00:00'
params.owner[key] = orderInfo[key]
}
})
if (orderInfo.ownerId) params.owner.id = orderInfo.ownerId
return params
......@@ -1394,7 +1440,9 @@ export default {
certificateNo: customerInfo.customerCertificateNo || '',
salesType,
carVin: customerInfo.carVin || '',
carColor: customerInfo.carColor || ''
carColor: customerInfo.carColor || '',
customerTags: customerInfo.customerTags || [],
actualDeliveryDate: customerInfo.actualDeliveryDate ? dayjs(customerInfo.actualDeliveryDate).format('YYYY-MM-DD') : ''
})
this.formList[1].map(e => {
if (e.value == 'salesType') e.current = salesType
......@@ -1465,7 +1513,12 @@ export default {
this.showUpload = false
this.orderObj.paymentDocList = []
this.orderObj.transactionNo = ''
}
},
// 选择日期事件
confirmCalendar(e, key) {
let value = e.fulldate
this.$set(this.orderObj, key, value)
},
}
}
</script>
......@@ -1474,14 +1527,17 @@ export default {
.order {
height: 100%;
position: relative;
&-box {
visibility: visible;
height: 100%;
}
.hide {
opacity: 0;
visibility: hidden;
}
.upload-box {
position: absolute;
left: 0;
......@@ -1528,9 +1584,11 @@ export default {
font-size: toRpx(24);
color: #999;
}
.btns {
padding: toRpx(24) toRpx(128);
gap: toRpx(32);
.save {
background: #3b73ff1a;
color: #4673ff;
......@@ -1538,6 +1596,7 @@ export default {
font-weight: 500;
}
}
.btn {
display: flex;
align-items: center;
......@@ -1548,11 +1607,13 @@ export default {
border-radius: toRpx(48);
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
}
.customer-title {
.customer-file {
margin-left: toRpx(20);
color: #347bff;
font-size: toRpx(24);
.sprite-icon {
margin-right: toRpx(4);
}
......
......@@ -6,15 +6,22 @@
<text class="mr-20">{{ orderCardDetail.customerName }}</text>
<!-- 标记为已开票的 不可编辑客户信息 invoicing 2已开票 -->
<view v-if="isOrder">
<view v-if="orderCardDetail.orderStatus == 3 || orderCardDetail.orderStatus == 5 || orderCardDetail.orderStatus == -1" @click="jumpUpdate" :class="['updateInfo flex', orderCardDetail.orderStatus == '6' || orderCardDetail.invoicing == '2' ? 'isHide' : '']">
<view
v-if="orderCardDetail.orderStatus == 3 || orderCardDetail.orderStatus == 5 || orderCardDetail.orderStatus == -1"
@click="jumpUpdate"
:class="['updateInfo flex', orderCardDetail.orderStatus == '6' || orderCardDetail.invoicing == '2' ? 'isHide' : '']">
<view class="sprite-icon icon-edit mr-8"></view>
客户信息
</view>
</view>
</view>
<!-- 待上传合同协议且是已支付的订单 -->
<view class="status text-center" :style="{ color: (status[0] && status[0].color) || '#FF9D0A', 'background-color': (status[0] && status[0].background) || '#FFF5E6' }" v-if="orderCardDetail.zyPayStatus == 1 && (orderCardDetail.orderStatus == 3 || orderCardDetail.orderStatus == 4 || orderCardDetail.orderStatus == 7)">待上传</view>
<view v-else class="status text-center" :style="{ color: currentStatusConfig.color, 'background-color': currentStatusConfig.background }">
<view class="status text-center"
:style="{ color: (status[0] && status[0].color) || '#FF9D0A', 'background-color': (status[0] && status[0].background) || '#FFF5E6' }"
v-if="orderCardDetail.zyPayStatus == 1 && (orderCardDetail.orderStatus == 3 || orderCardDetail.orderStatus == 4 || orderCardDetail.orderStatus == 7)">
待上传</view>
<view v-else class="status text-center"
:style="{ color: currentStatusConfig.color, 'background-color': currentStatusConfig.background }">
{{ currentStatusConfig.text }}
</view>
</view>
......@@ -48,7 +55,9 @@
<view class="order-value flex">{{ goodsOrderApplyStatus[orderCardDetail.approveStatus] || '-' }}</view>
</view>
</view>
<view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryId ? pointsMultiObj : orderObj" :key="sindex" v-if="(item.key !== 'remark' || orderCardDetail.orderStatus === '-1') && (item.key !== 'payTime' || orderCardDetail.orderStatus === '3' || orderCardDetail.orderStatus === '5')">
<view class="order-list align-center"
v-for="(item, sindex) in orderCardDetail.deliveryId ? pointsMultiObj : orderObj" :key="sindex"
v-if="(item.key !== 'remark' || orderCardDetail.orderStatus === '-1') && (item.key !== 'payTime' || orderCardDetail.orderStatus === '3' || orderCardDetail.orderStatus === '5')">
<view v-if="item.key == 'remark' || item.key == 'payTime' || item.key == 'createdTime'">
<view class="order flex align-center" v-if="item.key == 'remark' && orderCardDetail.orderStatus == '-1'">
<view class="order-label">{{ item.label }}</view>
......@@ -56,7 +65,8 @@
<view>{{ orderCardDetail[item.key] || '' }}</view>
</view>
</view>
<view class="order flex align-center" v-if="item.key == 'payTime' && (orderCardDetail.orderStatus == '3' || orderCardDetail.orderStatus == '5')">
<view class="order flex align-center"
v-if="item.key == 'payTime' && (orderCardDetail.orderStatus == '3' || orderCardDetail.orderStatus == '5')">
<view class="order-label">{{ item.label }}</view>
<view class="order-value">
<view>{{ orderCardDetail[item.key] || '' }}</view>
......@@ -72,28 +82,35 @@
<view class="order flex align-center" v-else>
<view class="order-label">{{ item.label }}</view>
<view class="order-value flex">
<view v-if="item.arr" class="flex">
<view v-if="orderCardDetail[item.arr[1]]" class="flex">
<view v-for="(k, arr_index) in item.arr" :key="arr_index" class="flex">
<view class="order-value-item text-hide flex">
<view v-if="arr_index == 1">
<text class="split">|</text>
<template v-if="item.format">
{{ item.format(orderCardDetail) }}
</template>
<template v-else>
<view v-if="item.arr" class="flex">
<view v-if="orderCardDetail[item.arr[1]]" class="flex">
<view v-for="(k, arr_index) in item.arr" :key="arr_index" class="flex">
<view class="order-value-item text-hide flex">
<view v-if="arr_index == 1">
<text class="split">|</text>
</view>
<text class="value-text">{{ orderCardDetail[k] }}</text>
</view>
<text class="value-text">{{ orderCardDetail[k] }}</text>
</view>
</view>
<view v-else class="order-value-single">
<text class="value-text">{{ orderCardDetail[item.key] || '' }}</text>
</view>
</view>
<view v-else class="order-value-single">
<text class="value-text">{{ orderCardDetail[item.key] || '' }}</text>
</view>
</view>
<view v-else class="order-value-single flex">
<text class="value-text" v-if="item.mapValue">{{ item.mapValue[orderCardDetail[item.key]] || '' }}</text>
<text v-else class="value-text">{{ orderCardDetail[item.key] || '' }}</text>
<view v-if="item.canCopy && orderCardDetail[item.key]" class="copy-btn" @click.stop="copyText(orderCardDetail[item.key])">
<view class="sprite-icon icon-icon-copy copy"></view>
<view v-else class="order-value-single flex">
<text class="value-text" v-if="item.mapValue">{{ item.mapValue[orderCardDetail[item.key]] || ''
}}</text>
<text v-else class="value-text">{{ orderCardDetail[item.key] || '' }}</text>
<view v-if="item.canCopy && orderCardDetail[item.key]" class="copy-btn"
@click.stop="copyText(orderCardDetail[item.key])">
<view class="sprite-icon icon-icon-copy copy"></view>
</view>
</view>
</view>
</template>
</view>
</view>
</view>
......@@ -127,12 +144,14 @@
<view class="staff-value">{{ orderCardDetail.technicianName }}</view>
</view>
<view v-if="orderCardDetail.zyPayStatus != 1" class="">
<view class="flex px-24 tips" v-if="(orderCardDetail.orderStatus == 3 && orderCardDetail.equityOrderStatus == 0 && orderCardDetail.equityGoodsFlag == 1) || (orderCardDetail.orderStatus == 5 && orderCardDetail.equityOrderStatus == 0)">
<view class="flex px-24 tips"
v-if="(orderCardDetail.orderStatus == 3 && orderCardDetail.equityOrderStatus == 0 && orderCardDetail.equityGoodsFlag == 1) || (orderCardDetail.orderStatus == 5 && orderCardDetail.equityOrderStatus == 0)">
<view class="sprite-icon icon-study-tips"></view>
订单已支付,未录入权益合同
</view>
<!-- 已录单未签名 -->
<view class="flex px-24 tips" v-else-if="orderCardDetail.orderStatus == 3 && orderCardDetail.equityOrderStatus == 2">
<view class="flex px-24 tips"
v-else-if="orderCardDetail.orderStatus == 3 && orderCardDetail.equityOrderStatus == 2">
<view class="sprite-icon icon-study-tips"></view>
订单已支付,尚未签名确认
</view>
......@@ -165,9 +184,11 @@
</view>
</view>
<NoticePopup ref="notice" title="提示" text="是否撤销该笔客户工单,撤销后客户工单为「已撤销」状态,不再统计订单数和订单金额。" type="warning"></NoticePopup>
<NoticePopup ref="reportNotice" :title="noticeObj.title" :text="noticeObj.text" :type="noticeObj.type || 'success'" :buttons="noticeObj.buttons"></NoticePopup>
<NoticePopup ref="reportNotice" :title="noticeObj.title" :text="noticeObj.text" :type="noticeObj.type || 'success'"
:buttons="noticeObj.buttons"></NoticePopup>
<ContractPopup ref="contractPopupRef" @onConfirm="onConfirm"></ContractPopup>
<PublishPopup ref="defeatOrderPopup" popupClass="defeatOrderPopup" type="center" :showClose="true" :isMaskClick="false" title="战败原因">
<PublishPopup ref="defeatOrderPopup" popupClass="defeatOrderPopup" type="center" :showClose="true"
:isMaskClick="false" title="战败原因">
<template #content>
<view class="defeat-order-box modatcontent">
<textarea class="defeat-textarea" placeholder="请填写战败原因" maxlength="30" v-model="textareaValue" />
......@@ -180,7 +201,8 @@
</view>
</template>
</PublishPopup>
<PublishPopup ref="errorOrderPopup" popupClass="errorOrderPopup" type="center" :showClose="true" :isMaskClick="false" title="工单标记">
<PublishPopup ref="errorOrderPopup" popupClass="errorOrderPopup" type="center" :showClose="true"
:isMaskClick="false" title="工单标记">
<template #content>
<view class="error-order-box modatcontent">
<view class="error-order-title">订单编号:{{ orderCardDetail.payId }}</view>
......@@ -206,6 +228,8 @@ import { interceptionMixin } from '@/mixin/index'
import PublishPopup from '@/components/PublishPopup.vue'
import NoticePopup from '@/components/NoticePopup.vue'
import ContractPopup from './ContractPopup.vue'
import dayjs from 'dayjs'
export default {
mixins: [interceptionMixin],
name: 'OrderCard',
......@@ -388,6 +412,9 @@ export default {
}
return config
},
customerTags() {
return order_mixins.data.CUSTOMER_TAGS || {}
}
},
data() {
......@@ -401,6 +428,22 @@ export default {
key: 'baseSceneName'
},
{
label: '日报标签',
key: 'customerTags',
format: (item) => {
let val = item?.customerTags
return val ? val.split(',').map(e => this.customerTags[e] || e).join('/') : '-'
}
},
{
label: '实际交付日期',
key: 'actualDeliveryDate',
format: (item) => {
let val = item?.actualDeliveryDate
return val ? dayjs(val).format('YYYY-MM-DD') : '-'
}
},
{
label: '销售顾问 /录单员',
arr: ['merchantName', 'referrerName']
},
......@@ -461,6 +504,22 @@ export default {
key: 'baseSceneName'
},
{
label: '日报标签',
key: 'customerTags',
format: (item) => {
let val = item?.customerTags
return val ? val.split(',').map(e => this.customerTags[e] || e).join('/') : '-'
}
},
{
label: '实际交付日期',
key: 'actualDeliveryDate',
format: (item) => {
let val = item?.actualDeliveryDate
return val ? dayjs(val).format('YYYY-MM-DD') : '-'
}
},
{
label: '销售顾问',
arr: ['merchantName', 'referrerName']
},
......@@ -867,11 +926,13 @@ export default {
padding: toRpx(48) toRpx(64);
border-radius: toRpx(32) toRpx(32) 0 0;
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%);
&-title {
color: #1a1a1a;
font-size: toRpx(40);
font-weight: 500;
}
.icon-close {
font-size: toRpx(40) !important;
color: rgba(26, 26, 26, 0.6) !important;
......@@ -881,6 +942,7 @@ export default {
.modatcontent {
box-sizing: border-box;
padding: 0 toRpx(64);
.modalbox {
display: flex;
align-items: center;
......@@ -893,9 +955,11 @@ export default {
color: #292d33;
font-size: toRpx(28);
font-weight: 500;
& + .modalbox {
&+.modalbox {
margin-top: toRpx(16);
}
.sprite-icon {
margin: 0 toRpx(24) 0 toRpx(32);
}
......@@ -906,6 +970,7 @@ export default {
background: #347bff1a;
}
}
.footer-box {
width: 100%;
height: toRpx(164);
......@@ -913,6 +978,7 @@ export default {
position: absolute;
bottom: 0;
border-radius: 0 0 toRpx(32) toRpx(32);
.btn {
width: 40%;
height: toRpx(80);
......@@ -924,15 +990,18 @@ export default {
font-size: toRpx(32);
font-weight: 500;
}
.cancle-btn {
background: #f0f1f5;
}
.sure-btn {
color: #fff;
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
margin-left: toRpx(32);
}
}
.defeat-textarea {
height: toRpx(568);
border-radius: toRpx(16);
......@@ -940,11 +1009,13 @@ export default {
width: 100%;
padding: toRpx(24);
box-sizing: border-box;
.uni-input-wrapper {
background: #f5f7fa;
}
}
}
::v-deep .errorOrderPopup .uni-popup__wrapper {
position: relative;
border-radius: toRpx(32);
......@@ -952,16 +1023,19 @@ export default {
width: toRpx(848);
height: toRpx(512);
background-color: #fff !important;
.popup-top-box {
text-align: left;
padding: toRpx(48) toRpx(64);
border-radius: toRpx(32) toRpx(32) 0 0;
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%);
&-title {
color: #1a1a1a;
font-size: toRpx(40);
font-weight: 500;
}
.icon-close {
font-size: toRpx(40) !important;
color: rgba(26, 26, 26, 0.6) !important;
......@@ -971,6 +1045,7 @@ export default {
.modatcontent {
box-sizing: border-box;
padding: 0 toRpx(64);
.modalbox {
display: flex;
align-items: center;
......@@ -983,9 +1058,11 @@ export default {
color: #292d33;
font-size: toRpx(28);
font-weight: 500;
& + .modalbox {
&+.modalbox {
margin-top: toRpx(16);
}
.sprite-icon {
margin: 0 toRpx(24) 0 toRpx(32);
}
......@@ -995,11 +1072,13 @@ export default {
border: toRpx(2) solid #347bff;
background: #347bff1a;
}
.error-order-title {
color: #666666;
font-size: toRpx(32);
font-weight: 400;
}
.error-order-content {
margin-top: toRpx(16);
color: #666666;
......@@ -1007,6 +1086,7 @@ export default {
font-weight: 400;
}
}
.footer-box {
width: 100%;
height: toRpx(164);
......@@ -1014,6 +1094,7 @@ export default {
position: absolute;
bottom: 0;
border-radius: 0 0 toRpx(32) toRpx(32);
.btn {
width: 40%;
height: toRpx(80);
......@@ -1025,9 +1106,11 @@ export default {
font-size: toRpx(32);
font-weight: 500;
}
.cancle-btn {
background: #f0f1f5;
}
.sure-btn {
color: #fff;
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
......@@ -1035,6 +1118,7 @@ export default {
}
}
}
.order-card {
padding: toRpx(36) toRpx(32);
border-radius: toRpx(24);
......@@ -1043,6 +1127,7 @@ export default {
box-shadow: 0 toRpx(8) toRpx(24) 0 #2a61eb1a;
margin-bottom: toRpx(24);
}
.status {
padding: toRpx(8);
font-size: toRpx(24);
......@@ -1050,6 +1135,7 @@ export default {
border-radius: toRpx(4);
border: toRpx(1) solid transparent;
}
.errorBox {
background: #f7f8fa;
border-radius: toRpx(16);
......@@ -1058,12 +1144,14 @@ export default {
font-size: toRpx(24);
margin-bottom: toRpx(20);
}
.priceName {
color: #5a5e66;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(30);
}
.info-box {
display: flex;
flex-wrap: wrap;
......@@ -1124,16 +1212,19 @@ export default {
font-size: toRpx(26);
font-weight: 700;
}
.price {
color: #347bff;
font-size: toRpx(32);
font-weight: 700;
align-items: baseline;
}
.construction-staff {
width: 50%;
padding: toRpx(10) toRpx(20) toRpx(10) 0;
box-sizing: border-box;
.staff-label {
width: toRpx(120);
margin-right: toRpx(24);
......@@ -1141,6 +1232,7 @@ export default {
font-weight: 400;
color: #999ea8;
}
.staff-value {
font-size: toRpx(24);
color: #666666;
......@@ -1156,14 +1248,17 @@ export default {
background: #f5f7fa;
margin: toRpx(20) 0;
padding: toRpx(20) toRpx(32);
.goods {
color: #333333;
font-size: toRpx(28);
font-weight: 400;
margin-bottom: toRpx(16);
&.no-margin {
margin-bottom: 0;
}
.goods-name {
.point {
width: toRpx(12);
......@@ -1176,6 +1271,7 @@ export default {
}
}
}
.goods-more {
color: #4673ff;
font-size: toRpx(24);
......@@ -1184,6 +1280,7 @@ export default {
margin-top: toRpx(12);
}
}
.item-footer {
display: flex;
justify-content: end;
......@@ -1193,6 +1290,7 @@ export default {
border-top: 1 solid #ededed;
padding: toRpx(32) toRpx(32) 0;
}
.btn_class {
display: flex;
gap: toRpx(16);
......@@ -1303,6 +1401,7 @@ export default {
width: toRpx(192);
height: toRpx(64);
}
.tips {
display: flex;
align-items: center;
......@@ -1314,6 +1413,7 @@ export default {
background: #fef5ea;
margin: toRpx(16) 0;
color: #ff9d0a;
&-text {
margin-top: toRpx(4);
}
......@@ -1322,6 +1422,7 @@ export default {
margin-right: toRpx(8);
}
}
.copy-btn {
display: flex;
align-items: center;
......@@ -1333,13 +1434,16 @@ export default {
margin-left: toRpx(16);
}
}
.order-card-top-box {
margin-bottom: toRpx(6);
}
.order-card-bottom-box {
border-bottom: toRpx(2) solid #f7f7f6;
padding-bottom: toRpx(20);
}
.updateInfo {
color: #347bff;
font-size: toRpx(24);
......@@ -1351,12 +1455,14 @@ export default {
.updateInfo.isHide {
display: none;
}
.errorTips {
color: #eb4e4e;
font-size: toRpx(24);
font-weight: 400;
margin-left: toRpx(16);
}
.refund-box {
margin-left: toRpx(16);
background: #fff2e0;
......
......@@ -60,6 +60,29 @@ const FORM_LIST = [
required: true
},
{
hidden: false,
label: '日报标签',
value: 'customerTags',
type: 'radio',
multiple: true,
radioList: [
{
value: '1',
name: '已触客'
},
{
value: '3',
name: '已交付引荐'
},
]
},
{
hidden: false,
label: '实际交付日期',
value: 'actualDeliveryDate',
type:"single-calendar"
},
{
label: '性别',
value: 'ownerGender',
type: 'radio',
......
......@@ -203,7 +203,7 @@ export default {
},
async entranceClick (item) {
if (this.toolComponentName == item.name) return
const noInterceptPage = ['DailyReport']
const noInterceptPage = ['DailyReport','storeDailyReport']
// if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()) || (await this.inspectionOfProhibitionBill()))) return
if (!noInterceptPage.includes(item.name) && (await this.checkDailyReport())) return
// 提示去学习中心弹窗
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!