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