Commit 8db3a080 by cen

feat: 新增报告管理

1 parent 1c2f6af7
...@@ -523,7 +523,7 @@ module.exports = { ...@@ -523,7 +523,7 @@ module.exports = {
}) })
}, },
// 新学习中心 - 员工学习中心剩余时间 // 新学习中心 - 员工学习中心剩余时间
getStudyCenterResidueTime(data={}) { getStudyCenterResidueTime(data = {}) {
return http.post({ return http.post({
method: 'dj.api.pad.learning.center.residue.time', method: 'dj.api.pad.learning.center.residue.time',
projectName: 'pad', projectName: 'pad',
...@@ -531,7 +531,7 @@ module.exports = { ...@@ -531,7 +531,7 @@ module.exports = {
}) })
}, },
// 新学习中心 - 查询我的课程页签数量 // 新学习中心 - 查询我的课程页签数量
getMyCourseTabCount(data={}) { getMyCourseTabCount(data = {}) {
return http.post({ return http.post({
method: 'dj.api.pad.learning.center.myself.course.count', method: 'dj.api.pad.learning.center.myself.course.count',
projectName: 'pad', projectName: 'pad',
...@@ -539,7 +539,7 @@ module.exports = { ...@@ -539,7 +539,7 @@ module.exports = {
}) })
}, },
// 新学习中心 - 考试结果 // 新学习中心 - 考试结果
getExamResult(data={}) { getExamResult(data = {}) {
return http.post({ return http.post({
method: 'dj.api.pad.learning.center.beisen.exam.result', method: 'dj.api.pad.learning.center.beisen.exam.result',
projectName: 'pad', projectName: 'pad',
...@@ -547,20 +547,19 @@ module.exports = { ...@@ -547,20 +547,19 @@ module.exports = {
}) })
}, },
// 限制录单 // 限制录单
getLimitRecord(data={}) { getLimitRecord(data = {}) {
return http.post({ return http.post({
method: 'dj.api.pad.learning.center.study.permission', method: 'dj.api.pad.learning.center.study.permission',
projectName: 'pad', projectName: 'pad',
...data ...data
}) })
}, },
// VIN车架号校验 // VIN车架号校验
checkVinValidate(data={}) { checkVinValidate(data = {}) {
console.log("调用接口checkVinValidate",data); return http.post({
return http.post({ method: 'dj.pad.api.vin.validate',
method: 'dj.pad.api.vin.validate', projectName: 'pad',
projectName: 'pad', ...data
...data, })
}) }
},
} }
...@@ -248,5 +248,11 @@ module.exports = { ...@@ -248,5 +248,11 @@ module.exports = {
}, },
{ returnAll: true } { returnAll: true }
) )
},
/**
* 根据VIN查询查博士数据
*/
queryByVin(data) {
return gscPost('/chaboshi/queryByVin', data, { returnAll: true })
} }
} }
import { gscPost } from '../request/signHttp' import { gscPost } from '../request/signHttp'
module.exports = { module.exports = {
/** 二手车驻店日报列表 */ /** 二手车驻店日报列表 */
getCarDailyReportList (data) { getCarDailyReportList(data) {
return gscPost('/carDailyReport/list', { return gscPost('/carDailyReport/list', {
...data ...data
}) })
...@@ -10,7 +9,7 @@ module.exports = { ...@@ -10,7 +9,7 @@ module.exports = {
/** /**
* 新增二手车驻店日报 * 新增二手车驻店日报
*/ */
addCarDailyReport (data) { addCarDailyReport(data) {
return gscPost('/carDailyReport/add', { return gscPost('/carDailyReport/add', {
...data ...data
}) })
...@@ -18,7 +17,7 @@ module.exports = { ...@@ -18,7 +17,7 @@ module.exports = {
/** /**
* 二手车驻店日报详情 * 二手车驻店日报详情
*/ */
getCarDailyReportDetail (data) { getCarDailyReportDetail(data) {
return gscPost('/carDailyReport/detail', { return gscPost('/carDailyReport/detail', {
...data ...data
}) })
...@@ -26,7 +25,7 @@ module.exports = { ...@@ -26,7 +25,7 @@ module.exports = {
/** /**
* 修改二手车驻店日报 * 修改二手车驻店日报
*/ */
editCarDailyReport (data) { editCarDailyReport(data) {
return gscPost('/carDailyReport/edit', { return gscPost('/carDailyReport/edit', {
...data ...data
}) })
...@@ -34,39 +33,63 @@ module.exports = { ...@@ -34,39 +33,63 @@ module.exports = {
/** /**
* 交付单列表 * 交付单列表
*/ */
getDeliveryOrderPageList (data) { getDeliveryOrderPageList(data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderPageList', data ,{ return gscPost('/deliveryOrderManage/getDeliveryOrderPageList', data, {
returnAll: true returnAll: true
}) })
}, },
/** /**
* 交付单列表按照支付状态统计数量 * 交付单列表按照支付状态统计数量
*/ */
getDeliveryOrderListCount (data) { getDeliveryOrderListCount(data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderListCount', data) return gscPost('/deliveryOrderManage/getDeliveryOrderListCount', data)
}, },
/** /**
* 交付单详情 * 交付单详情
*/ */
getDeliveryOrderDetail (data) { getDeliveryOrderDetail(data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderDetail', data) return gscPost('/deliveryOrderManage/getDeliveryOrderDetail', data)
}, },
/** /**
* 交付单操作日志 * 交付单操作日志
*/ */
getDeliveryOrderOpLog (data) { getDeliveryOrderOpLog(data) {
return gscPost('/deliveryOrderManage/getDeliveryOrderOpLog', data) return gscPost('/deliveryOrderManage/getDeliveryOrderOpLog', data)
}, },
/** /**
* 客户确认到店 * 客户确认到店
*/ */
confirmArrive (data) { confirmArrive(data) {
return gscPost('/deliveryOrderManage/confirmArrive', data, { returnAll: true }) return gscPost('/deliveryOrderManage/confirmArrive', data, { returnAll: true })
}, },
/** /**
* 客户确认提车 * 客户确认提车
*/ */
confirmDelivery (data) { confirmDelivery(data) {
return gscPost('/deliveryOrderManage/confirmDelivery', data, { returnAll: true }) return gscPost('/deliveryOrderManage/confirmDelivery', data, { returnAll: true })
}, },
/**
* 车辆检测报告管理列表
*/
getCheckReportPageList(data) {
return gscPost('/checkReport/pageList', data, { returnAll: true })
},
/**
* 新增查询任务
*/
checkReportCreate(data) {
return gscPost('/checkReport/create', data, { returnAll: true })
},
/**
* 数量统计
*/
checkReportNumCount(data) {
return gscPost('/checkReport/numCount', data, { returnAll: true })
},
/**
* 检查是否具备访问按钮的权限
*/
checkVisitButton(data) {
return gscPost('/permissionAccess/checkVisitButton', data, { returnAll: true })
}
} }
No preview for this file type
...@@ -180,6 +180,9 @@ ...@@ -180,6 +180,9 @@
.mb-24 { .mb-24 {
margin-bottom: toRpx(24); margin-bottom: toRpx(24);
} }
.mb-28 {
margin-bottom: toRpx(28);
}
.mb-30 { .mb-30 {
margin-bottom: toRpx(30); margin-bottom: toRpx(30);
} }
......

2.94 MB | W: | H:

2.99 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -71,6 +71,13 @@ export default { ...@@ -71,6 +71,13 @@ export default {
name: 'DeliveryManagement', name: 'DeliveryManagement',
page: '/pages/usedCar/deliveryManagement/index', page: '/pages/usedCar/deliveryManagement/index',
sceneType: [7] sceneType: [7]
},
{
icon: 'report-management',
label: '报告管理',
name: 'ReportManagement',
page: '/pages/usedCar/reportManagement/index',
sceneType: [7]
} }
] ]
return entranceList.filter(e => e.sceneType.includes(sceneType)) return entranceList.filter(e => e.sceneType.includes(sceneType))
......
...@@ -197,7 +197,7 @@ export default { ...@@ -197,7 +197,7 @@ export default {
mounted() { mounted() {
uni.$logger.local.info('levelStudyPopup 开始监听mounted') uni.$logger.local.info('levelStudyPopup 开始监听mounted')
uni.$on('levelStudyPopup', obj => { uni.$on('levelStudyPopup', obj => {
uni.$logger.local.info('接收到学习弹窗事件', obj) uni.$logger.local.info('接收到学习弹窗事件', obj)
this.showExamPopup = true this.showExamPopup = true
}) })
const userInfo = uni.$storage.get('userInfo') || {} const userInfo = uni.$storage.get('userInfo') || {}
...@@ -549,9 +549,9 @@ export default { ...@@ -549,9 +549,9 @@ export default {
this.checkVersion() this.checkVersion()
}, },
async entranceClick(item) { async entranceClick(item) {
console.log(item, 'item')
// 清除评估单的图片视频资源缓存 // 清除评估单的图片视频资源缓存
const noInterceptPage = ['DailyReport', 'DeliveryManagement', 'ReportManagement'],
const noInterceptPage = ['DailyReport', 'DeliveryManagement'],
{ sceneType } = this { sceneType } = this
if (!noInterceptPage.includes(item.name)) { if (!noInterceptPage.includes(item.name)) {
if (sceneType != 7) { if (sceneType != 7) {
...@@ -573,6 +573,18 @@ export default { ...@@ -573,6 +573,18 @@ export default {
}) })
return return
} }
if (item.name === 'ReportManagement') {
const res = await uni.$api.usedCarApi.checkVisitButton({
buttonCode: 'quotation'
})
if (!res.data.data) {
uni.showToast({
title: '功能暂未开放',
icon: 'none'
})
return
}
}
if (item.page) if (item.page)
return uni.navigateTo({ return uni.navigateTo({
url: item.page url: item.page
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta'] const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 2 const index = 1
/** /**
* *
0本地 0本地
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/common/studyCenter/courseDetail", "path": "pages/common/studyCenter/courseDetail",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
...@@ -294,6 +294,12 @@ ...@@ -294,6 +294,12 @@
} }
}, },
{ {
"path": "pages/usedCar/reportManagement/index",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "pages/common/filePreview", "path": "pages/common/filePreview",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<!-- 弹窗 --> <!-- 弹窗 -->
<OrderPopup ref="orderPopup" :data="displayData" :isDefeatOrder="true" :externalData="[]" @onConfirm="onConfirm" :popupType="0" /> <OrderPopup ref="orderPopup" :data="displayData" :isDefeatOrder="true" :externalData="[]" @onConfirm="onConfirm" :popupType="0" />
<SelectCar ref="selectCar" title="选择车型" :car-brand-data="carBrandData" @car-selected="handleCarSelected" :on-load-year-data="loadYearDataForModel" /> <SelectCar ref="selectCar" title="选择车型" :car-brand-data="carBrandData" @car-selected="handleCarSelected" :on-load-year-data="loadYearDataForModel" :car-tips="carTips" />
<SelectCity <SelectCity
ref="selectCity" ref="selectCity"
title="选择城市" title="选择城市"
...@@ -557,7 +557,8 @@ export default { ...@@ -557,7 +557,8 @@ export default {
uploadOtherFields: [{ key: 41, label: '其他图片', required: false, accept: 'image', maxCount: 30, fullwidth: true }], uploadOtherFields: [{ key: 41, label: '其他图片', required: false, accept: 'image', maxCount: 30, fullwidth: true }],
currentField: null, currentField: null,
query: {}, query: {},
validateState: true validateState: true,
carTips: ''
} }
}, },
onLoad(options) { onLoad(options) {
...@@ -1338,6 +1339,18 @@ export default { ...@@ -1338,6 +1339,18 @@ export default {
.catch(err => { .catch(err => {
console.log('validateVinErr', result) console.log('validateVinErr', result)
}) })
uni.$api.evaluationApi
.queryByVin({
vin: this.formData.carBaseReqDTO.vin
})
.then(res => {
console.log('res:', res)
if (res.data.code == 0) {
this.carTips = res.data.data.base.commonName || ''
} else {
this.carTips = ''
}
})
uni.showToast({ title: '车架号识别完成并已自动填写到表单中', icon: 'none' }) uni.showToast({ title: '车架号识别完成并已自动填写到表单中', icon: 'none' })
uni.hideLoading() uni.hideLoading()
} else { } else {
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
@step-change="onStepChange" @step-change="onStepChange"
:isShowStepNumber="false" :isShowStepNumber="false"
></StepTab> ></StepTab>
<view v-if="carTips" class="carTips">{{ carTips }}</view>
<view class="list-component"> <view class="list-component">
<!-- 修复activeValue绑定,统一使用currentSelectedId --> <!-- 修复activeValue绑定,统一使用currentSelectedId -->
<SortByNameList :items="currentStepData" :activeValue="currentSelectedId" :activeField="'id'" :itemNameField="'name'" :groupKeyField="'letter'" :itemsPerRow="3" :itemSpacing="32" @item-click="handleItemClick" :enableFastScroll="false" /> <SortByNameList :items="currentStepData" :activeValue="currentSelectedId" :activeField="'id'" :itemNameField="'name'" :groupKeyField="'letter'" :itemsPerRow="3" :itemSpacing="32" @item-click="handleItemClick" :enableFastScroll="false" />
...@@ -47,6 +48,10 @@ export default { ...@@ -47,6 +48,10 @@ export default {
onLoadYearData: { onLoadYearData: {
type: Function, type: Function,
default: () => Promise.resolve([]) default: () => Promise.resolve([])
},
carTips: {
type: String,
default: ''
} }
}, },
data() { data() {
...@@ -448,4 +453,14 @@ export default { ...@@ -448,4 +453,14 @@ export default {
} }
} }
} }
.carTips {
border-radius: toRpx(16);
background: #fef4e8;
padding: toRpx(16) 0;
color: #f59619;
font-size: toRpx(26);
font-weight: 400;
text-align: center;
margin: 0 toRpx(48) toRpx(16);
}
</style> </style>
...@@ -173,7 +173,20 @@ ...@@ -173,7 +173,20 @@
<view class="tab-panel-title">二手车转让协议</view> <view class="tab-panel-title">二手车转让协议</view>
<view class="gridBoxNoPadding"> <view class="gridBoxNoPadding">
<template v-for="(item, index) in vehicleItems"> <template v-for="(item, index) in vehicleItems">
<view v-if="(!detailsInfo.signingInfo.saleContract.depositPrice ? item.key !== 'signingInfo.saleContract.depositPrice' && item.key !== 'signingInfo.saleContract.finalPrice' : item.key !== 'signingInfo.saleContract.fullPrice') && (item.key !== 'signingInfo.saleContract.thirdPartyTransactionVoucher' || formatValue(item, detailsInfo))" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]"> <view
v-if="
(!detailsInfo.signingInfo.saleContract.depositPrice ? item.key !== 'signingInfo.saleContract.depositPrice' && item.key !== 'signingInfo.saleContract.finalPrice' : item.key !== 'signingInfo.saleContract.fullPrice') &&
(item.key !== 'signingInfo.saleContract.thirdPartyTransactionVoucher' || formatValue(item, detailsInfo)) &&
(item.key !== 'signingInfo.saleContract.handler' || detailsInfo.signingInfo.saleContract.signerType === 2) &&
(item.key !== 'signingInfo.saleContract.idCard' || detailsInfo.signingInfo.saleContract.signerType === 0 || detailsInfo.signingInfo.saleContract.signerType === 1) &&
(item.key !== 'signingInfo.saleContract.orgLicenseNumber' || detailsInfo.signingInfo.saleContract.signerType === 1 || detailsInfo.signingInfo.saleContract.signerType === 2) &&
(item.key !== 'signingInfo.saleContract.idCardFrontUrl' || (formatValue(item, detailsInfo) && (detailsInfo.signingInfo.saleContract.signerType === 0 || detailsInfo.signingInfo.saleContract.signerType === 1))) &&
(item.key !== 'signingInfo.saleContract.idCardBackUrl' || (formatValue(item, detailsInfo) && (detailsInfo.signingInfo.saleContract.signerType === 0 || detailsInfo.signingInfo.saleContract.signerType === 1))) &&
(item.key !== 'signingInfo.saleContract.orgLicenseUrl' || (formatValue(item, detailsInfo) && (detailsInfo.signingInfo.saleContract.signerType === 1 || detailsInfo.signingInfo.saleContract.signerType === 2)))
"
:key="index"
:class="['flex align-start', { 'full-width': item.fullWidth }, { 'align-center': item.type == 'link' }]"
>
<view class="title-label-see mr-16">{{ item.label }}</view> <view class="title-label-see mr-16">{{ item.label }}</view>
<view v-if="item.type == 'image'"> <view v-if="item.type == 'image'">
<!-- 三方/委托交易凭证可能是视频 --> <!-- 三方/委托交易凭证可能是视频 -->
...@@ -563,13 +576,26 @@ export default { ...@@ -563,13 +576,26 @@ export default {
{ label: '尾款金额', key: 'signingInfo.saleContract.finalPrice', cell: '元' }, { label: '尾款金额', key: 'signingInfo.saleContract.finalPrice', cell: '元' },
{ label: '全款金额', key: 'signingInfo.saleContract.fullPrice', cell: '元' }, { label: '全款金额', key: 'signingInfo.saleContract.fullPrice', cell: '元' },
{ label: '签约车主', key: 'signingInfo.saleContract.partAName' }, { label: '签约车主', key: 'signingInfo.saleContract.partAName' },
{
label: '签署人类型',
key: 'signingInfo.saleContract.signerType',
formatter: value => {
if (value === 1) return '企业委托'
if (value === 0) return '个人'
if (value === 2) return '企业'
return value || '-'
}
},
{ label: '经办人', key: 'signingInfo.saleContract.handler' },
{ label: '手机号码', key: 'signingInfo.saleContract.phone' }, { label: '手机号码', key: 'signingInfo.saleContract.phone' },
{ label: '身份证号', key: 'signingInfo.saleContract.idCard' }, { label: '身份证号', key: 'signingInfo.saleContract.idCard' },
{ label: '营业执照号', key: 'signingInfo.saleContract.orgLicenseNumber' },
{ label: '合同模版名称', key: 'signingInfo.saleContract.docTemplateName' }, { label: '合同模版名称', key: 'signingInfo.saleContract.docTemplateName' },
{ label: '交车时间', key: 'signingInfo.saleContract.handoverTime' }, { label: '交车时间', key: 'signingInfo.saleContract.handoverTime' },
{ label: '交车地点', key: 'signingInfo.saleContract.handoverAddress' }, { label: '交车地点', key: 'signingInfo.saleContract.handoverAddress' },
{ label: '身份证国徽面', key: 'signingInfo.saleContract.idCardFrontUrl', type: 'image' }, { label: '身份证国徽面', key: 'signingInfo.saleContract.idCardFrontUrl', type: 'image' },
{ label: '身份证人像面', key: 'signingInfo.saleContract.idCardBackUrl', type: 'image' }, { label: '身份证人像面', key: 'signingInfo.saleContract.idCardBackUrl', type: 'image' },
{ label: '营业执照图片', key: 'signingInfo.saleContract.orgLicenseUrl', type: 'image' },
{ label: '三方/委托交易凭证', key: 'signingInfo.saleContract.thirdPartyTransactionVoucher', type: 'image' }, { label: '三方/委托交易凭证', key: 'signingInfo.saleContract.thirdPartyTransactionVoucher', type: 'image' },
{ label: '查阅合同', key: 'signingInfo.saleContract.contractUrl', type: 'link' } { label: '查阅合同', key: 'signingInfo.saleContract.contractUrl', type: 'link' }
], ],
......
const ORDER_STATUS = {
0: '生成中',
1: '生成成功',
2: '生成失败'
}
const PAYMENT_STATUS = {
0: '待支付',
1: '已结清'
}
const OP_TYPE = {
1: '创建交付工单',
2: '确认客户到店',
3: '确认客户提车'
}
module.exports = {
ORDER_STATUS,
PAYMENT_STATUS,
OP_TYPE
}
<template> <template>
<view class="detail-box"> <view class="detail-box">
<view class="nav-bar"> <view class="nav-bar">
<view <view class="back" @click="backPage">
class="back" <uni-icons type="left" :size="20" color="#000"></uni-icons>
@click="backPage"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view> </view>
<view class="title">展业工具</view> <view class="title">展业工具</view>
</view> </view>
...@@ -17,49 +10,20 @@ ...@@ -17,49 +10,20 @@
<view class="detail-left"> <view class="detail-left">
<view class="common-title">展业</view> <view class="common-title">展业</view>
<view class="content"> <view class="content">
<image <image class="banner" src="../../../assets/images/common/tool_banner.png" mode="scaleToFill" />
class="banner"
src="../../../assets/images/common/tool_banner.png"
mode="scaleToFill"
/>
<template v-if="toolComponentName !== 'DailyReport'"> <template v-if="toolComponentName !== 'DailyReport'">
<Entrance @entranceClick="entranceClick"></Entrance> <Entrance @entranceClick="entranceClick"></Entrance>
</template> </template>
<template v-else> <template v-else>
<uni-calendar <uni-calendar ref="calendar" :clearDate="false" :endDate="endDate" :showMonth="false" @monthSwitch="currentMonth = `${$event.year}-${$event.month}`" openBeforeChange @beforeChange="changeDate" @change="currentDate = $event.fulldate" backgroundColor="transparent" :selected="selectedDays" :date="currentDate" />
ref="calendar"
:clearDate="false"
:endDate="endDate"
:showMonth="false"
@monthSwitch="currentMonth = `${$event.year}-${$event.month}`"
openBeforeChange
@beforeChange="changeDate"
@change="currentDate = $event.fulldate"
backgroundColor="transparent"
:selected="selectedDays"
:date="currentDate"
/>
</template> </template>
</view> </view>
</view> </view>
<view class="detail-right"> <view class="detail-right">
<component <component :ref="`detail-${toolComponentName}-Ref`" :is="toolComponentName" @jump="jump" :transmission-of-data="transmissionOfData" :currentDate="currentDate" :currentMonth="currentMonth" @setCalendarSelected="selectedDays = $event" />
:ref="`detail-${toolComponentName}-Ref`"
:is="toolComponentName"
@jump="jump"
:transmission-of-data="transmissionOfData"
:currentDate="currentDate"
:currentMonth="currentMonth"
@setCalendarSelected="selectedDays = $event"
/>
</view> </view>
</view> </view>
<NoticePopup <NoticePopup ref="notice" title="重要提示" text="内容尚未提交,是否退出编辑?" type="warning"></NoticePopup>
ref="notice"
title="重要提示"
text="内容尚未提交,是否退出编辑?"
type="warning"
></NoticePopup>
</view> </view>
</template> </template>
...@@ -77,7 +41,7 @@ export default { ...@@ -77,7 +41,7 @@ export default {
DailyReport, DailyReport,
NoticePopup NoticePopup
}, },
data () { data() {
return { return {
toolComponentName: '', toolComponentName: '',
transmissionOfData: null, transmissionOfData: null,
...@@ -87,7 +51,7 @@ export default { ...@@ -87,7 +51,7 @@ export default {
selectedDays: [] selectedDays: []
} }
}, },
onLoad (options) { onLoad(options) {
if (options.componentName) this.toolComponentName = options.componentName if (options.componentName) this.toolComponentName = options.componentName
if (options.currentDate) this.setCurrentDate(options.currentDate) if (options.currentDate) this.setCurrentDate(options.currentDate)
uni.$on('jumpToDailyReport', currentDate => { uni.$on('jumpToDailyReport', currentDate => {
...@@ -95,7 +59,7 @@ export default { ...@@ -95,7 +59,7 @@ export default {
if (currentDate) this.setCurrentDate(currentDate) if (currentDate) this.setCurrentDate(currentDate)
}) })
}, },
onBackPress (options) { onBackPress(options) {
if (options.from === 'backbutton') { if (options.from === 'backbutton') {
// 物理返回按钮触发 // 物理返回按钮触发
// 阻止默认行为,即不执行页面返回 // 阻止默认行为,即不执行页面返回
...@@ -106,14 +70,14 @@ export default { ...@@ -106,14 +70,14 @@ export default {
return false return false
}, },
methods: { methods: {
setCurrentDate (currentDate) { setCurrentDate(currentDate) {
this.currentDate = currentDate this.currentDate = currentDate
this.currentMonth = dayjs(currentDate).format('YYYY-MM') this.currentMonth = dayjs(currentDate).format('YYYY-MM')
}, },
async entranceClick (item) { async entranceClick(item) {
if(this.toolComponentName == item.name) return if (this.toolComponentName == item.name) return
const noInterceptPage = ['DailyReport'] const noInterceptPage = ['DailyReport']
if (!noInterceptPage.includes(item.name) && ((await this.checkDailyReport()))) return if (!noInterceptPage.includes(item.name) && (await this.checkDailyReport())) return
// 保存当前选择的组件信息,但不立即切换 // 保存当前选择的组件信息,但不立即切换
const selectedItem = item const selectedItem = item
if (this.toolComponentName === selectedItem.name && (!this.transmissionOfData || this.transmissionOfData.type !== 'supplementOrder')) return if (this.toolComponentName === selectedItem.name && (!this.transmissionOfData || this.transmissionOfData.type !== 'supplementOrder')) return
...@@ -127,7 +91,7 @@ export default { ...@@ -127,7 +91,7 @@ export default {
this.openNotice(selectedItem) this.openNotice(selectedItem)
}, },
openNotice (selectedItem, back = true, callBack) { openNotice(selectedItem, back = true, callBack) {
// 配置弹窗按钮 // 配置弹窗按钮
this.$refs.notice.buttonsList = [ this.$refs.notice.buttonsList = [
{ {
...@@ -156,19 +120,19 @@ export default { ...@@ -156,19 +120,19 @@ export default {
// 打开弹窗 // 打开弹窗
this.$refs.notice.open() this.$refs.notice.open()
}, },
async backPage () { async backPage() {
const openNotice = await this.checkReport() const openNotice = await this.checkReport()
if (openNotice) this.openNotice() if (openNotice) this.openNotice()
else uni.navigateBack() else uni.navigateBack()
}, },
// name:跳转组件名,val:跳转参数 // name:跳转组件名,val:跳转参数
jump (name, val) { jump(name, val) {
this.toolComponentName = name this.toolComponentName = name
if (val) { if (val) {
this.transmissionOfData = val this.transmissionOfData = val
} }
}, },
async checkReport () { async checkReport() {
let dailyReportRef = this.$refs['detail-DailyReport-Ref'] let dailyReportRef = this.$refs['detail-DailyReport-Ref']
if (dailyReportRef) { if (dailyReportRef) {
let { isDateWithin7Days, isFilled } = dailyReportRef let { isDateWithin7Days, isFilled } = dailyReportRef
...@@ -176,7 +140,7 @@ export default { ...@@ -176,7 +140,7 @@ export default {
} }
return true return true
}, },
async changeDate (e) { async changeDate(e) {
if (e.fullDate == this.currentDate) return if (e.fullDate == this.currentDate) return
const openNotice = await this.checkReport() const openNotice = await this.checkReport()
if (!openNotice) return this.$refs.calendar.manualChangeDate(e) if (!openNotice) return this.$refs.calendar.manualChangeDate(e)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!