Commit 2ac400b0 by 李伟康

feat(api): 添加商户基础场景码列表查询接口

- 新增 getMerchantBaseSceneCodeList 方法用于查询员工账号上架门店的小场景值
- 在 dailyTemplateApi 模块中导出新的接口方法
- 更新 Entrance 组件中的驻店日报入口配置逻辑
- 重构驻店日报入口的条件判断和展示逻辑
- 优化入口列表的过滤和展示机制
- 添加新的接口文档注释说明
1 parent a5e76c7b
......@@ -108,6 +108,16 @@ const getGoodsOrderList = async (data = {}) => {
...data
})
}
/**
* 查询员工账号上架门店的小场景值
*/
const getMerchantBaseSceneCodeList = async (data = {}) => {
return http.post({
method: 'dj.api.smartcarlife.staffBaseInfo.merchant.baseSceneCode.list',
projectName: 'boutique',
...data
})
}
module.exports = {
getDailyTemplate,
......@@ -118,5 +128,6 @@ module.exports = {
saveDraft,
getDiscussionStaffList,
submitReport,
getGoodsOrderList
getGoodsOrderList,
getMerchantBaseSceneCodeList
}
......@@ -161,14 +161,6 @@ export default {
noInterception: true
},
{
icon: 'daily-report',
label: '驻店日报-新',
name: 'staffDailyReport',
page: '/pages/common/dailyNewspaper/index',
eventCode: 'staff_daily_report_page',
noInterception: true
},
{
icon: 'store-daily-report',
label: '门店日报',
name: 'storeDailyReport',
......@@ -190,10 +182,18 @@ export default {
{ sceneType, shopMerchantId } = userInfo,
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.map(e => {
if (['staffDailyReport', 'storeDailyReport', 'NegotiationDetail'].includes(e.name)) e.sceneType = [0, 1]
})
}
this.$store.dispatch('setNewReport', newReport)
// 先根据场景过滤
let list = entranceList.filter(e => e.sceneType?.includes(sceneType))
// 加载阶段或不允许显示时,移除工资申诉入口
......
......@@ -345,7 +345,7 @@ export default {
/**
* 获取门店分类
*/
this.getSceneByMerchantId()
this.getMerchantBaseSceneCodeList()
},
methods: {
// 处理开始测评(参考 detail.vue 的实现)
......@@ -770,13 +770,16 @@ export default {
handleTouchStart() {
uni.$emit('reset_timeout')
},
async getSceneByMerchantId() {
const merchantId = uni.$storage.get('userInfo').shopMerchantId,
data = await uni.$api.commonApi.getSceneByMerchantId({
merchantId
async getMerchantBaseSceneCodeList() {
const { shopMerchantId: merchantId, uuid } = uni.$storage.get('userInfo'),
{ sceneType } = this,
data = await uni.$api.dailyTemplateApi.getMerchantBaseSceneCodeList({
merchantId,
staffUuid: uuid,
sceneType
})
let baseSceneCode = []
if (data && data.length) baseSceneCode = data.map(e => Number(e.baseSceneCode))
if (data && data.length) baseSceneCode = data.map(e => Number(e))
uni.$storage.set('baseSceneCode', baseSceneCode)
}
}
......
......@@ -7,6 +7,9 @@ export default {
computed: {
userInfo() {
return uni.$storage.get('userInfo') || {}
},
isNewReport() {
return this.$store.state.user.newReport
}
},
mounted() {},
......@@ -51,7 +54,7 @@ export default {
cancelColor: '#292D33',
confirmText: modalInfo.confirmText,
confirmColor: '#347BFF',
success: (res) => {
success: res => {
// wx.__HAS_SHOW_MODAL = false;
// if (res.cancel) _this.showNextModal();
if (res.cancel) this.showNextModal()
......@@ -64,7 +67,7 @@ export default {
* 轻改日报
*/
staffDailyReport() {
let { userInfo } = this
let { userInfo, isNewReport } = this
return new Promise((resolve, reject) => {
uni.$api.interceptionApi
.staffDailyReportMerchantValid({
......@@ -74,6 +77,7 @@ export default {
sceneType: 1
})
.then(data => {
console.log(data)
if (data) {
// 获取当前日期
let currentDate = new Date()
......@@ -91,11 +95,22 @@ export default {
console.log(formattedDate)
const pages = getCurrentPages(),
currentPage = pages[pages.length - 1]
if (currentPage.route == 'pages/boutique/tool/index') uni.$emit('jumpToDailyReport', formattedDate)
else
uni.navigateTo({
url: `/pages/boutique/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
})
if (currentPage.route == 'pages/boutique/tool/index') {
if (isNewReport)
uni.redirectTo({
url: `/pages/common/dailyNewspaper/index?componentName=StaffDailyReport&currentDate=${formattedDate}`
})
else uni.$emit('jumpToDailyReport', formattedDate)
} else {
if (isNewReport)
uni.navigateTo({
url: `/pages/common/dailyNewspaper/index?componentName=StaffDailyReport&currentDate=${formattedDate}`
})
else
uni.navigateTo({
url: `/pages/boutique/tool/index?componentName=DailyReport&currentDate=${formattedDate}`
})
}
}
})
resolve(true)
......
......@@ -5,39 +5,22 @@
<template v-if="loadComplete">
<template v-if="list.length">
<view class="daily-report-container">
<template v-for="(i,index) in list">
<view
:class="['list-box',{ 'no-child': !i.children.length }]"
:key="index"
>
<template v-for="(i, index) in list">
<view :class="['list-box', { 'no-child': !i.children.length }]" :key="index">
<view class="list-title flex">
{{ i.label }}
<template v-if="!i.children.length">
<view
class="add flex"
@click="addItem(index)"
>
<view :class="['add flex', { 'disabled': !saveBtn }]" @click="addItem(index)">
<view class="add-icon"></view>
新增
</view>
</template>
</view>
<template v-if="i.children.length">
<Table
:columns="i.children[0]"
:data="i.children"
titleKey="label"
tableStyle="padding-right:32rpx"
customTable
cornerText="序号"
LeftWidth="104rpx"
@rowClick="handleRowClick"
:tableIndex="index"
hasFooter
@clickAdd="addItem(index)"
:maxLength="i.rules.maxLength"
>
<template v-slot:customCell="{row, colIndex}">
<Table :columns="i.children[0]" :data="i.children" titleKey="label" tableStyle="padding-right:32rpx"
customTable cornerText="序号" LeftWidth="104rpx" @rowClick="handleRowClick" :tableIndex="index"
hasFooter @clickAdd="addItem(index)" :maxLength="i.rules.maxLength">
<template v-slot:customCell="{ row, colIndex }">
<text>{{ formatValue(row[colIndex].value) }}</text>
<template v-if="row[colIndex].unit && formatValue(row[colIndex].value) != '-'">
<text class="unit">{{ row[colIndex].unit }}</text>
......@@ -50,20 +33,14 @@
</view>
<view class="footer">
<Footer>
<view
class="btn"
@click="$emit('submitReport',list)"
>保存</view>
<view class="btn default-btn" @click="saveBtn = true" v-if="!saveBtn">编辑</view>
<view class="btn" @click="$emit('submitReport', list)" v-else>保存</view>
</Footer>
</view>
</template>
<nothing v-else />
</template>
<EditForm
ref="editForm"
@onDel="delItem"
@onConfirm="confirm"
/>
<EditForm ref="editForm" @onDel="delItem" @onConfirm="confirm" />
</view>
</template>
......@@ -81,17 +58,19 @@ export default {
templateData: {
type: Array,
default: () => []
}
},
ReportStatus: null
},
data () {
data() {
return {
loadComplete: false,
list: []
list: [],
saveBtn: true
}
},
watch: {
templateData: {
handler (val) {
handler(val) {
this.loadComplete = false
this.list = utils.deepClone(val)
setTimeout(() => {
......@@ -100,31 +79,46 @@ export default {
},
immediate: true,
deep: true
},
ReportStatus: {
handler(val) {
this.saveBtn = val != 1
},
immediate: true,
deep: true
},
saveBtn: {
handler(val) {
this.$emit('getSaveBtnStatus', val)
},
immediate: true,
deep: true
}
},
mounted () {
mounted() {
},
methods: {
handleRowClick (row, rowIndex, index) {
handleRowClick(row, rowIndex, index) {
let parent = this.list[index]
this.$refs.editForm.open(row, rowIndex, index, parent)
},
delItem (c_index, index) {
delItem(c_index, index) {
this.list[index].children.splice(c_index, 1)
},
addItem (index) {
let { templateData } = this,
addItem(index) {
let { templateData, saveBtn } = this,
parent = this.list[index]
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
this.$refs.editForm.open(data, c_index, index, parent)
},
confirm (data, c_index, index) {
confirm(data, c_index, index) {
this.$set(this.list[index].children, c_index, utils.deepClone(data))
},
formatValue (value) {
return value !== null && value !=='' && value !== undefined ? value : '-'
formatValue(value) {
return value !== null && value !== '' && value !== undefined ? value : '-'
}
}
}
......@@ -134,6 +128,7 @@ export default {
.daily-report {
height: 100%;
position: relative;
&-container {
height: calc(100% - #{toRpx(184)});
padding: 0 48rpx;
......@@ -141,22 +136,27 @@ export default {
overflow-y: auto;
transform: translateY(48rpx);
}
.common-title {
position: absolute;
top: 0;
left: 0;
}
.list-box {
width: 100%;
border-radius: 16rpx;
background: #fff;
padding: 0 0 32rpx 32rpx;
margin-bottom: 32rpx;
.list-title {
font-size: 32rpx;
font-weight: 600;
line-height: 44rpx;
padding: 32rpx 32rpx 24rpx 0;
transition: all .25s ease-in-out;
.add {
margin-left: auto;
height: 64rpx;
......@@ -168,11 +168,13 @@ export default {
font-size: 30rpx;
font-weight: 500;
color: #2c66f7;
&-icon {
position: relative;
width: 28rpx;
height: 28rpx;
margin-right: 10rpx;
&::before,
&::after {
position: absolute;
......@@ -183,24 +185,36 @@ export default {
background: #4673ff;
border-radius: 4rpx;
}
&::before {
width: 4rpx;
height: 28rpx;
}
&::after {
width: 28rpx;
height: 4rpx;
}
}
}
.disabled{
opacity: .5;
}
}
}
.no-child {
padding-bottom: 0;
.list-title {
padding-bottom: 32rpx;
}
}
.footer {
transform: translateY(48rpx);
height: 136rpx;
.btn {
margin: 0 168rpx;
width: 100%;
......@@ -214,6 +228,11 @@ export default {
font-size: 28rpx;
font-weight: 500;
}
.default-btn {
background: #3b73ff1a;
color: #4673ff;
}
}
}
</style>
\ No newline at end of file
......@@ -4,10 +4,7 @@
<Detail :templateData="templateData" />
</template>
<template v-else>
<Edit
:templateData="templateData"
@submitReport="submitReport"
/>
<Edit :templateData="templateData" @submitReport="submitReport" @getSaveBtnStatus="saveBtnStatus = $event" :ReportStatus="ReportStatus" />
</template>
</view>
</template>
......@@ -21,15 +18,14 @@ export default {
mixins: [mixins],
name: 'NegotiationDetail',
data () {
data() {
return {
}
},
computed: {
},
mounted () {
this.loadComplete = true
mounted() {
},
methods: {
}
......
......@@ -18,18 +18,20 @@
</template>
<template v-else>
<FormItem :formItem="i" :rules="i.rules" @onSelect="onSelect($event, index)"
@onInput="onInput($event, index)" :disabled="itemDisabled(i)" />
@onInput="onInput($event, index)" :disabled="itemDisabled(i)" :readonly="!saveBtn" />
</template>
</template>
<template v-else>
<view class="list-title flex">
{{ i.label }}
</view>
<template v-if="i.children.length">
<template v-for="(c, c_index) in i.children">
<FormItem class="form-item" :formItem="c" :key="c_index" :rules="i.childrenRules[c.key]"
@onSelect="onSelect($event, index, c_index)" @onInput="onInput($event, index, c_index)"
:disabled="itemDisabled(c)" />
<view class="list-title flex">
{{ i.label }}
</view>
<template v-if="i.children.length">
<template v-for="(c, c_index) in i.children">
<FormItem class="form-item" :formItem="c" :key="c_index" :rules="i.childrenRules[c.key]"
@onSelect="onSelect($event, index, c_index)" @onInput="onInput($event, index, c_index)"
:disabled="itemDisabled(c)" :readonly="!saveBtn" />
</template>
</template>
</template>
</template>
......@@ -38,7 +40,8 @@
</view>
<view class="footer">
<Footer>
<view class="btn" @click="$emit('submitReport', list)">保存</view>
<view class="btn default-btn" @click="saveBtn = true" v-if="!saveBtn">编辑</view>
<view class="btn" @click="$emit('submitReport', list)" v-else>保存</view>
</Footer>
</view>
</template>
......@@ -62,12 +65,14 @@ export default {
templateData: {
type: Array,
default: () => []
}
},
ReportStatus: null
},
data() {
return {
loadComplete: false,
list: []
list: [],
saveBtn: true
}
},
watch: {
......@@ -75,13 +80,26 @@ export default {
handler(val) {
this.loadComplete = false
this.list = utils.deepClone(val)
console.log(this.list)
setTimeout(() => {
this.loadComplete = true
}, 200)
},
immediate: true,
deep: true
},
ReportStatus: {
handler(val) {
this.saveBtn = val != 1
},
immediate: true,
deep: true
},
saveBtn: {
handler(val) {
this.$emit('getSaveBtnStatus', val)
},
immediate: true,
deep: true
}
},
mounted() {
......@@ -285,6 +303,11 @@ export default {
font-size: 28rpx;
font-weight: 500;
}
.default-btn {
background: #3b73ff1a;
color: #4673ff;
}
}
}
</style>
\ No newline at end of file
<template>
<view class="report-content ">
<template v-if="!isToday">
<template v-if="!editableDate">
<Detail :templateData="templateData" />
</template>
<template v-else>
<Edit
:templateData="templateData"
@submitReport="submitReport"
/>
<Edit :templateData="templateData" @submitReport="submitReport" @getSaveBtnStatus="saveBtnStatus = $event"
:ReportStatus="ReportStatus" />
</template>
</view>
</template>
......@@ -20,15 +18,15 @@ export default {
components: { Detail, Edit },
mixins: [mixins],
name: 'StaffDailyReport',
data () {
data() {
return {
}
},
computed: {
},
mounted () {
this.loadComplete = true
mounted() {
},
methods: {
}
......
<template>
<view class="report-content ">
<view :class="['report-component',{'opacity':showNegotiationList}]">
<view :class="['report-component',{'opacity':showNegotiationList},{'show':showReport}]">
<template v-if="!isToday || ReportStatus == 1">
<Detail :templateData="templateData" />
</template>
......@@ -11,6 +11,8 @@
@saveReport="saveReport"
@submitReport="submitReport"
:reportDate="currentDate"
:ReportStatus="ReportStatus"
@getSaveBtnStatus="saveBtnStatus = $event"
/>
</template>
</view>
......@@ -36,7 +38,8 @@ export default {
name: 'StoreDailyReport',
data () {
return {
showNegotiationList: false
showNegotiationList: false,
showReport: true
}
},
......@@ -59,7 +62,12 @@ export default {
},
methods: {
changeComponent (val) {
this.showNegotiationList = val
if(!val) {
setTimeout(() => { this.showNegotiationList = false }, 450)
}
else this.showNegotiationList = true
this.showReport = !val
this.$emit('changeComponent', {
title: val ? '洽谈明细表' : '',
icon: val ? 'negotiation-detail' : ''
......@@ -74,9 +82,12 @@ export default {
.report-component {
height: 100%;
position: relative;
transition: all 0.5s ease-in-out;
}
.opacity {
opacity: 0;
visibility: hidden;
left: -100%;
}
.show{
left: 0;
}
</style>
\ No newline at end of file
<template>
<view class="list">
<view :class="['list', { out: isOut }]">
<view class="common-title">
</view>
<view class="list-box">
......@@ -26,7 +26,7 @@
</view>
<view class="footer">
<Footer>
<view class="btn" @click="$emit('back')">返回</view>
<view class="btn" @click="back">返回</view>
</Footer>
</view>
</view>
......@@ -41,7 +41,7 @@ import utils from '@/utils/utils'
export default {
name: 'negotiationList',
components: { Nothing, Footer, Table },
inject: ['userInfo'],
inject: ['userInfo','sceneType'],
props: {
currentDate: {
......@@ -55,6 +55,7 @@ export default {
if (val) {
this.getDiscussionStaffList(val)
this.currentIndex = 0
this.isOut = false
}
},
immediate: true,
......@@ -67,7 +68,8 @@ export default {
staffList: [],
loadComplete: false,
currentIndex: 0,
list: []
list: [],
isOut: false
}
},
mounted() {
......@@ -81,9 +83,11 @@ export default {
async getDiscussionStaffList(reportDate) {
this.loadComplete = false
const { shopMerchantId } = this.userInfo,
{sceneType} = this,
data = await uni.$api.dailyTemplateApi.getDiscussionStaffList({
merchantId: shopMerchantId,
reportDate
reportDate,
sceneType
})
this.staffList = data || []
this.loadComplete = true
......@@ -92,12 +96,13 @@ export default {
},
async getReportDetail(item) {
const { shopMerchantId } = this.userInfo,
{ currentDate } = this,
{ currentDate, sceneType } = this,
data = await uni.$api.dailyTemplateApi.getReportDetail({
merchantId: shopMerchantId,
staffUuid: item.staffUuid,
templateType: 3,
reportDate: currentDate
reportDate: currentDate,
sceneType
})
if (data) {
let list = JSON.parse(data.jsonContent || '[]')
......@@ -151,6 +156,10 @@ export default {
this.list = list
}
},
back() {
this.isOut = true
this.$emit('back')
}
}
}
</script>
......@@ -244,6 +253,10 @@ export default {
}
}
.list.out {
animation: list-right-out 0.5s ease-in-out;
}
@keyframes list-left-in {
0% {
left: 100%;
......@@ -253,4 +266,14 @@ export default {
left: 0;
}
}
@keyframes list-right-out {
0% {
left: 0;
}
100% {
left: 100%;
}
}
</style>
\ No newline at end of file
......@@ -49,7 +49,7 @@
</view>
<template v-if="hasFooter">
<view class="footer-row" :style="{ width: tableWidth }" v-if="maxLength && tableData.length < maxLength">
<view class="add" @click="$emit('clickAdd')"></view>
<view :class="['add', { 'disabled': disabled }]" @click="add"></view>
</view>
</template>
</view>
......@@ -113,6 +113,10 @@ export default {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false
},
},
data() {
return {
......@@ -141,11 +145,15 @@ export default {
mounted() {
},
methods: {
add() {
if (this.disabled) return
this.$emit('clickAdd')
},
formatValue(value) {
return value !== null && value !== '' && value !== undefined ? value : '-'
},
handleRowClick(row, rowIndex) {
if (this.isDetail) return
if (this.isDetail || this.disabled) return
// 清除之前的定时器
if (this.clickTimer) {
clearTimeout(this.clickTimer)
......@@ -352,4 +360,8 @@ export default {
.is-detail {
color: #999 !important;
}
.disabled {
opacity: .5;
}
</style>
\ No newline at end of file
......@@ -171,26 +171,22 @@ export default {
}
)
},
back() {
let now = dayjs().format('YYYY-MM-DD')
if (this.currentDate == now) {
if (this.templateType == 2) {
if (this.reportStatus != 1) this.exitInterception()
else this.backPage()
} else {
this.exitInterception()
}
} else this.backPage()
async back() {
const openNotice = await this.checkReport()
console.log(openNotice)
if (openNotice) this.exitInterception()
else this.backPage()
},
async getReportList() {
const { uuid, shopMerchantId } = this.userInfo,
{ templateType, dayList } = this
{ templateType, dayList, SCENE_TYPE: sceneType } = this
const data = await uni.$api.dailyTemplateApi.getReportList({
merchantId: shopMerchantId,
staffUuid: uuid,
templateType,
reportStartDate: dayList[0],
reportEndDate: dayList[dayList.length - 1]
reportEndDate: dayList[dayList.length - 1],
sceneType
})
let selectedDay = []
dayList.map(e => {
......@@ -274,20 +270,21 @@ export default {
this.getReportDetail()
},
async checkReport() {
let { templateType, reportStatus } = this,
currentComponent = this.$refs[`ref-${this.componentName}`]
if (currentComponent.isToday) {
if (templateType == 2) {
return reportStatus != 1
} else {
return true
}
let componentRef = this.$refs[`ref-${this.componentName}`],
{ templateData, templateType, currentDate } = this
if (templateType != 1) {
if (!componentRef.isToday) return false
} else {
let lastDay = dayjs().subtract(7, 'day')
if (!lastDay.isBefore(dayjs(currentDate), 'day')) return false
}
return false
return templateData.length ? componentRef.saveBtnStatus : false
},
async changeDate(e) {
if (e.fullDate == this.currentDate) return
const openNotice = await this.checkReport()
console.log(openNotice)
if (!openNotice) {
this.$refs.calendar.manualChangeDate(e)
this.changeCurrentDate(e)
......@@ -330,12 +327,13 @@ export default {
try {
const { uuid, shopMerchantId } = this.userInfo,
nowDate = dayjs().format('YYYY-MM-DD'),
{ templateType, currentDate } = this,
{ templateType, currentDate, SCENE_TYPE: sceneType } = this,
data = await uni.$api.dailyTemplateApi.getReportDetail({
merchantId: shopMerchantId,
staffUuid: uuid,
templateType,
reportDate: currentDate
reportDate: currentDate,
sceneType
})
if (data) {
......@@ -367,10 +365,16 @@ export default {
}
})
this.templateData = templateData
console.log(templateData)
} else {
if (nowDate == currentDate) this.getDailyTemplate()
else uni.hideLoading()
if (this.templateType == 1) {
let lastDay = dayjs().subtract(7, 'day')
if (lastDay.isBefore(dayjs(currentDate), 'day')) this.getDailyTemplate()
else uni.hideLoading()
} else {
if (nowDate == currentDate) this.getDailyTemplate()
else uni.hideLoading()
}
}
} catch (error) {
uni.showToast({ title: error, icon: 'none', mask: true })
......@@ -498,6 +502,7 @@ export default {
height: toRpx(144);
justify-content: start;
padding-left: toRpx(32);
transition: all 0.5s ease-in-out;
.sprite-icon {
margin-right: toRpx(24);
......
......@@ -7,7 +7,8 @@ export default {
data() {
return {
dayjs,
nowDate: dayjs().format('YYYY-MM-DD')
nowDate: dayjs().format('YYYY-MM-DD'),
saveBtnStatus: false
}
},
props: {
......@@ -19,12 +20,18 @@ export default {
ReportStatus: null
},
computed: {
/**可编辑日期 */
editableDate() {
let lastDay = dayjs().subtract(7, 'day'),
{ currentDate } = this
return lastDay.isBefore(dayjs(currentDate), 'day')
},
isToday() {
return this.currentDate == this.nowDate
},
reportParams() {
let { shopMerchantId, shopMerchantName, uuid, name } = this.userInfo,
{ currentDate, templateType, dailyReportRecordId } = this,
let { shopMerchantId, shopMerchantName, uuid, name, merchantId, merchantName } = this.userInfo,
{ currentDate, templateType, dailyReportRecordId, sceneType } = this,
params = {
merchantId: shopMerchantId,
merchantName: shopMerchantName,
......@@ -32,7 +39,10 @@ export default {
staffUuid: uuid,
staffName: name,
dailyReportSource: 2, //1:生意助手员工版小程序,2:平板电脑
templateType: templateType()
templateType: templateType(),
yqMerchantId: merchantId,
yqMerchantName: merchantName,
sceneType
}
if (dailyReportRecordId()) params.dailyReportRecordId = dailyReportRecordId()
return params
......@@ -111,13 +121,19 @@ export default {
uni.showToast({ title: error, icon: 'none', mask: true })
}
},
submitReport(res) {
async submitReport(res) {
try {
const { shopMerchantId } = this.userInfo,
{ sceneType } = this,
carBrandList = await uni.$api.boutiqueApi.getDailyReportCarBrand({
merchantId: shopMerchantId,
sceneType
})
console.log(carBrandList)
const phoneRegex = /^1[3456789]\d{9}$/
uni.showLoading({ title: '提交中...', mask: true })
let { reportParams } = this,
list = utils.deepClone(res)
console.log('提交日报', list)
let jsonContent = JSON.stringify(list)
let requestJson = buildAppNormalizedListsFromJsonContent(jsonContent)
list.map(e => {
......@@ -169,6 +185,12 @@ export default {
if (e.type == 'subform') delete e.children
})
requestJson.carBrandList = carBrandList.map(({ firstBrandId, firstBrandName, brandId, brandName }) => ({
firstBrandId,
firstBrandName,
brandId,
brandName
}))
reportParams.jsonContent = JSON.stringify(list)
reportParams.requestJson = JSON.stringify(requestJson)
console.log('提交日报', reportParams)
......
......@@ -40,6 +40,7 @@ export default {
customerKey: Date.now(), //客户信息KEY
currentCarInfo: {},//当前选中的车品牌车系
carBrandOpenStatus: false, // 车品牌选择弹窗是否打开
newReport: false, // 是否新日报
};
},
mutations: {
......@@ -97,6 +98,9 @@ export default {
setCarBrandOpenStatus (state, value) {
state.carBrandOpenStatus = value;
},
setNewReport (state, value) {
state.newReport = value;
},
},
actions: {
......@@ -138,5 +142,9 @@ export default {
setCarBrandOpenStatus ({ commit }, value) {
commit('setCarBrandOpenStatus', value)
},
setNewReport ({ commit }, value) {
commit('setNewReport', value)
},
},
};
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!