Commit b7fd9af3 by cen

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

2 parents 1cf8281a 594c7e74

148 KB | W: | H:

82 KB | W: | H:

assets/images/common/warning-notice.png
assets/images/common/warning-notice.png
assets/images/common/warning-notice.png
assets/images/common/warning-notice.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -223,7 +223,7 @@ export default { ...@@ -223,7 +223,7 @@ export default {
// 查询素材 // 查询素材
async getSoure () { async getSoure () {
let baseConfigData = await uni.$api.systemApi.getBoutiqueMockData(true), let baseConfigData = await uni.$api.systemApi.getBoutiqueMockData(true),
{moduleList, toolList, defaultCarId } = baseConfigData { moduleList, toolList, defaultCarId } = baseConfigData
this.$store.state.boutique.baseConfigData = baseConfigData this.$store.state.boutique.baseConfigData = baseConfigData
this.moduleList = moduleList this.moduleList = moduleList
this.toolList = toolList this.toolList = toolList
...@@ -327,9 +327,12 @@ export default { ...@@ -327,9 +327,12 @@ export default {
/**客户邀约接待 */ /**客户邀约接待 */
reception (customer) { reception (customer) {
this.currentCarId = '' this.currentCarId = ''
this.$nextTick(() => { this.$nextTick(async () => {
let { customerType } = this let { customerType } = this
if (customerType == -1) this.start(false) //开始接待 if (customerType == -1) {
const flag = await this.start(false)
if (!flag) return
} //开始接待
this.customerType = 0 this.customerType = 0
this.jumpPage() this.jumpPage()
this.$nextTick(() => this.$store.dispatch('setCustomerInfo', customer)) this.$nextTick(() => this.$store.dispatch('setCustomerInfo', customer))
......
<template> <template>
<!-- :key="dateKey" --> <!-- -->
<view class="daily-report"> <view class="daily-report">
<view class="common-title">填写日报</view> <view class="common-title">填写日报</view>
<scroll-view <scroll-view
:class="['repoet-view',{full:!orderObj.isDateWithin7Days}]" :class="['repoet-view',{full:!orderObj.isDateWithin7Days}]"
scroll-y scroll-y
:scroll-into-view="to"
@scroll="to = ''"
> >
<view
class="repoet-box"
:key="dateKey"
>
<template v-if="loadComplete"> <template v-if="loadComplete">
<view class="box"> <view class="box">
<view class="sub-title">轻改日报</view> <view class="sub-title">轻改日报</view>
<template v-for="(i,index) in formObject.report"> <template v-for="(i,index) in reportObject">
<view <view
class="form-item flex" class="form-item flex"
:key="index" :key="index"
:id="i.refId || ''"
> >
<view class="label flex"> <view class="label flex">
{{i.label}} {{i.label}}
<template v-if="i.required"> <template v-if="index != 0 || (i.required && orderObj.pickerValue == 0)">
<view class="required">*</view> <view class="required">*</view>
</template> </template>
</view> </view>
...@@ -93,6 +101,7 @@ ...@@ -93,6 +101,7 @@
<view <view
:class="['form-item flex',{name:i.name}]" :class="['form-item flex',{name:i.name}]"
:key="ind" :key="ind"
:id="i.refId ? `${i.refId}_${index}` : ''"
> >
<template v-if="i.name"> <template v-if="i.name">
个人相关 个人相关
...@@ -100,7 +109,7 @@ ...@@ -100,7 +109,7 @@
<template v-else> <template v-else>
<view class="label flex"> <view class="label flex">
{{i.label}} {{i.label}}
<template v-if="i.required"> <template v-if="i.required && orderObj.pickerValue == 0">
<view class="required">*</view> <view class="required">*</view>
</template> </template>
</view> </view>
...@@ -121,6 +130,7 @@ ...@@ -121,6 +130,7 @@
</view> </view>
</template> </template>
</template> </template>
</view>
</scroll-view> </scroll-view>
<template v-if="orderObj.isDateWithin7Days"> <template v-if="orderObj.isDateWithin7Days">
<view class="btn-box flex"> <view class="btn-box flex">
...@@ -151,10 +161,12 @@ ...@@ -151,10 +161,12 @@
</view> </view>
</template> </template>
<NoticePopup <NoticePopup
ref="notice" ref="reportNotice"
title="提交成功" title="提交成功"
text="您的日报已提交成功" text="您的日报已提交成功"
type="success" type="success"
:buttons="buttons"
@buttonClick="back"
></NoticePopup> ></NoticePopup>
</view> </view>
</template> </template>
...@@ -178,16 +190,17 @@ export default { ...@@ -178,16 +190,17 @@ export default {
name: 'DailyReport', name: 'DailyReport',
data () { data () {
return { return {
to: '',
dateKey: Date.now(), dateKey: Date.now(),
loadComplete: false, loadComplete: false,
formObject: { reportObject: Object.freeze([
report: [
{ {
label: '今日驻店人数(按店)', label: '今日驻店人数(按店)',
value: 'staffCount', value: 'staffCount',
type: 'input', type: 'input',
required: true, required: true,
inputType: 'number' inputType: 'number',
refId: 'staffCount'
}, },
{ {
label: '当日调休', label: '当日调休',
...@@ -203,13 +216,13 @@ export default { ...@@ -203,13 +216,13 @@ export default {
{ {
label: '个人成交总金额', label: '个人成交总金额',
value: 'totalOrderMoney', value: 'totalOrderMoney',
required: true,
}, },
] ]),
},
orderObj: {}, orderObj: {},
carBandList: [], carBandList: [],
hwOhterObjArray: [ hwOhterObjArray: Object.freeze([
{ {
label: '店端实际交车数', label: '店端实际交车数',
key: 'deliveryCount', key: 'deliveryCount',
...@@ -217,6 +230,7 @@ export default { ...@@ -217,6 +230,7 @@ export default {
required: true, required: true,
min: 0, min: 0,
max: 100, max: 100,
refId: 'deliveryCount'
}, },
{ {
label: '店端总未触客数', label: '店端总未触客数',
...@@ -225,6 +239,7 @@ export default { ...@@ -225,6 +239,7 @@ export default {
required: true, required: true,
min: 0, min: 0,
max: 100, max: 100,
refId: 'notDeliveryCount'
}, },
{ {
label: '实际售前触客数', label: '实际售前触客数',
...@@ -233,7 +248,8 @@ export default { ...@@ -233,7 +248,8 @@ export default {
required: true, required: true,
min: 0, min: 0,
max: 100, max: 100,
inputPlaceholder: '' inputPlaceholder: '',
refId: 'equityToShopCount'
}, },
{ {
label: '实际售后触客数', label: '实际售后触客数',
...@@ -257,9 +273,15 @@ export default { ...@@ -257,9 +273,15 @@ export default {
disabled: true, disabled: true,
inputPlaceholder: '自动填入系统数据' inputPlaceholder: '自动填入系统数据'
} }
], ]),
weeklyList: [], weeklyList: [],
isEditReport: false isEditReport: false,
buttons: Object.freeze([
{
text: '返回首页',
type: 'primary'
}
])
} }
}, },
computed: { computed: {
...@@ -291,18 +313,18 @@ export default { ...@@ -291,18 +313,18 @@ export default {
}, },
currentDate: { currentDate: {
handler (val) { handler (val) {
this.getStaffDailyReportDetail() if (this.carBandList.length) this.getStaffDailyReportDetail()
// console.log(val)
}, },
deep: true, deep: true,
// immediate: true
} }
}, },
mounted () { mounted () {
this.initData() this.initData()
this.getDailyReportCarBrand()
}, },
methods: { methods: {
back () {
uni.navigateBack()
},
initData () { initData () {
const { merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo const { merchantId, merchantName, name, uuid, shopMerchantId, shopMerchantName } = this.userInfo
this.orderObj = { this.orderObj = {
...@@ -313,7 +335,7 @@ export default { ...@@ -313,7 +335,7 @@ export default {
merchantId: shopMerchantId, merchantId: shopMerchantId,
merchantName: shopMerchantName merchantName: shopMerchantName
} }
this.getStaffDailyReportDetail() this.getDailyReportCarBrand()
}, },
async getDailyReportCarBrand () { async getDailyReportCarBrand () {
let { userInfo } = this, let { userInfo } = this,
...@@ -323,7 +345,7 @@ export default { ...@@ -323,7 +345,7 @@ export default {
sceneType: 1 sceneType: 1
}) })
this.carBandList = data this.carBandList = data
console.log(this.carBandList) this.getStaffDailyReportDetail()
}, },
setMonthDay () { setMonthDay () {
let { mouthNumber } = this, let { mouthNumber } = this,
...@@ -388,6 +410,9 @@ export default { ...@@ -388,6 +410,9 @@ export default {
hwOhterObjArray, hwOhterObjArray,
orderObj } = this, orderObj } = this,
{ shopMerchantId, merchantId, uuid } = userInfo { shopMerchantId, merchantId, uuid } = userInfo
uni.showLoading({
mask: true
})
const data = await uni.$api.boutiqueApi.getStaffDailyReportDetail({ const data = await uni.$api.boutiqueApi.getStaffDailyReportDetail({
yqMerchantId: merchantId, yqMerchantId: merchantId,
merchantId: shopMerchantId, merchantId: shopMerchantId,
...@@ -396,6 +421,7 @@ export default { ...@@ -396,6 +421,7 @@ export default {
sceneType: 1, sceneType: 1,
reportTypeList: [-1] reportTypeList: [-1]
}) })
uni.hideLoading()
let { brandDataList, remark } = data let { brandDataList, remark } = data
if (brandDataList && brandDataList.length) { if (brandDataList && brandDataList.length) {
carBandList = carBandList.map(item => { carBandList = carBandList.map(item => {
...@@ -459,7 +485,7 @@ export default { ...@@ -459,7 +485,7 @@ export default {
staffCountError: false, staffCountError: false,
} }
this.loadComplete = true this.loadComplete = true
this.dateKey = Date.now()
}, },
title (item) { title (item) {
let title = '' let title = ''
...@@ -502,12 +528,35 @@ export default { ...@@ -502,12 +528,35 @@ export default {
item.equityToShopCount = item.equityToShopCount || 0 item.equityToShopCount = item.equityToShopCount || 0
}) })
} }
if (orderObj.pickerValue == 0) {
if (orderObj.staffCount == null) throw {
message: '今日驻店人数(按店)',
refId: 'staffCount'
}
orderObj.brandDataList.map((e, index) => {
if (e.deliveryCount == null) throw { message: '店端实际交车数', refId: `deliveryCount_${index}` }
if (!e.notDeliveryCount == null) throw { message: '店端总未触客数', refId: `notDeliveryCount_${index}` }
if (!e.equityToShopCount == null) throw { message: '实际售前触客数', refId: `equityToShopCount_${index}` }
})
}
const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj) const data = await uni.$api.boutiqueApi.saveStaffDailyReport(orderObj)
if (data) { if (data) {
this.isEditReport = false this.isEditReport = false
this.$refs.notice.open() this.$refs.reportNotice.open()
} }
} catch (error) { } catch (errorObj) {
console.log(errorObj)
if (errorObj.message) {
uni.showToast({
title: `${errorObj.message}不能为空`,
icon: 'none'
})
this.to = errorObj.refId
} else uni.showToast({
title: typeof errorObj == 'string' ? errorObj : errorObj.toString(),
icon: 'none'
})
} }
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!