Commit 3333d172 by zhangxw

自测修改

1 parent ad2e2d42
......@@ -2,9 +2,9 @@
<scroll-view class=" scroll" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}">
<block wx:for="{{tabList}}" wx:key="index">
<view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}" id="to-{{index}}">
<text id="tab-{{index}}" class="text-item">
<text class="tab-item-text">{{item.text || item }}</text><text wx:if="{{item.count >= 0}}" style="font-size: var(--fontSize20);">{{item.count > 99 ? '99+' : item.count}}</text>
</text>
<view id="tab-{{index}}" class="text-item">
<view class="tab-item-text">{{item.text || item }}</view><view wx:if="{{item.count >= 0}}" style="font-size: var(--fontSize20);">{{item.count > 99 ? '99+' : item.count}}</view>
</view>
</view>
</block>
<!-- <view class="active-doc" style="{{activeStyle}}" /> -->
......@@ -15,7 +15,7 @@
<block wx:for="{{tabList}}" wx:key="index">
<!-- style="color:{{tabIndex==index?'#347BFF':''}};" -->
<view class="tab-item {{tabIndex==index?'active':''}}" bindtap="change" data-index="{{index}}">
<text id="tab-{{index}}" class="text-item"><text class="tab-item-text">{{item.text || item }}</text><text wx:if="{{item.count >= 0}}" style="font-size: var(--fontSize20);">{{item.count > 99 ? '99+' : item.count}}</text></text>
<view id="tab-{{index}}" class="text-item"><view class="tab-item-text">{{item.text || item }}</view><view wx:if="{{item.count >= 0}}" style="font-size: var(--fontSize20);">{{item.count > 99 ? '99+' : item.count}}</view></view>
</view>
</block>
<view class="active-doc" style="{{activeStyle}}" />
......
......@@ -41,6 +41,13 @@
text-align: center;
}
.tab-item .text-item {
height: 38rpx;
display: flex;
align-items: center;
justify-content: center;
}
.scroll .tab-item {
width: fit-content;
min-width: var(--fontSize144);
......@@ -52,6 +59,10 @@
padding: 0 var(--fontSize10);
}
.scroll .tab-item .text-item {
margin-top: 20rpx;
}
.scroll .active::after {
position: absolute;
bottom: 1rpx;
......
......@@ -62,7 +62,7 @@ Component({
return
}
wx.chooseMedia({
wx.chooseImage({
count: count,
mediaType: ['image'],
success(res) {
......@@ -84,13 +84,7 @@ Component({
})
try {
for (const item of tempFiles) {
const val = item.tempFilePath
// 兼容企微将内容保存至相册
if (sysInfo.environment) {
wx.saveImageToPhotosAlbum({
filePath: val,
})
}
const val = item.path
const imgType = val.split('.')[1]
const type = imgType === 'unknown' ? 'jpg' : imgType
const _res = await new Promise((resolve, reject) => {
......
<!--packageUsedCar/pages/evaluationForm/components/ButtonModule/ButtonModule.wxml-->
<view class="button-module flex">
<view wx:if="{{status == 20 && subStatus == 1}}" class="common-btn ml-24" catch:tap="handleClick" data-type="contract">撤回合同</view>
<view class="common-btn" catch:tap="handleClick" data-type="details">详情</view>
<view wx:if="{{!subStatus && status != 100 && status != '-1'}}" class="common-btn ml-24" catch:tap="handleClick" data-type="edit">编辑</view>
<view wx:if="{{status == 20 && !subStatus}}" class="common-btn ml-24" catch:tap="handleClick" data-type="requote" data-setTrack="evaluate_requote">重新报价</view>
<view wx:if="{{status == 20 && !subStatus}}" class="common-btn blue-btn ml-24" catch:tap="handleClick" data-type="sign" data-setTrack="evaluate_sign">客户签约</view>
<view wx:if="{{status == 20 && subStatus == 1}}" class="common-btn ml-24" catch:tap="handleClick" data-type="contract">撤回合同</view>
<view wx:if="{{subStatus == 1}}" class="common-btn gray-btn ml-24" catch:tap="handleClick" data-type="signing">签约中</view>
<view wx:if="{{subStatus == 2 || subStatus == 3}}" class="common-btn gray-btn ml-24" catch:tap="handleClick" data-type="paying" >支付中</view>
<view wx:if="{{status == 30 && !subStatus}}" class="common-btn ml-24" catch:tap="handleClick" data-type="cancelSign" data-setTrack="evaluate_cancel_sign">取消签约</view>
......
......@@ -65,7 +65,11 @@ Component({
name: '尾款支付中',
type: 'primary'
}
}
},
// vehicleCategoryMap: {
// 1: '置换车',
// 2: '报废车'
// }
},
/**
......
......@@ -19,6 +19,7 @@
<view class="car-number mr-4 mb-4">{{ carInfo.registrationDateStr }}</view>
<view class="car-number mr-4 mb-4">{{ carInfo.mileageStr }}</view>
<view class="car-number">{{ carInfo.transferCountStr }}</view>
<!-- <view class="car-number">{{ vehicleCategoryMap[1] }}</view> -->
</view>
<view>
<view class="flex align-center">
......
......@@ -110,7 +110,8 @@ Page({
],
query: null,
uploadFieldsWithImages: [],
confirmCarFieldsWithImages: []
confirmCarFieldsWithImages: [],
videoFormObj: {}
},
navbarReady(e) {
......@@ -220,12 +221,125 @@ Page({
})
},
handleImageUpload(e) {
uploadImages(e) {
let { field, type } = e.currentTarget.dataset
let _this = this
let count = field.maxCount - field?.uploadImages.length
const index = _this.data[type]?.findIndex(val => val.key == field.key )
// let sysInfo = wx.getSystemInfoSync()
_this.closeChangeUploadType()
wx.chooseImage({
count: count,
success(res) {
for (const file of res.tempFiles) {
if (file.size > 10 * 1024 * 1024) {
return wx.showToast({
title: '图片上传最大10MB',
icon: 'none'
})
}
}
const upload = async (tempFiles) => {
wx.showLoading({
title: '上传中',
mask: true
})
try {
for (const item of tempFiles) {
const val = item.path
const imgType = val.split('.')[1]
const upType = imgType === 'unknown' ? 'jpg' : imgType
const _res = await new Promise((resolve, reject) => {
wx.getFileSystemManager().readFile({
filePath: val, // 选择图片返回的相对路径
encoding: 'base64', // 编码格式
success: resolve,
fail: reject
})
})
const img = await api.uploadImg({
file: `${upType}@${_res.data}`
})
const { code, data, message } = img
if (code == 0) {
_this.data[type][index].uploadImages?.push({url: data, isVideo: false})
_this.setData({
[`${type}`]: _this.data[type],
[`formData.${field.key}`]: _this.data[type][index].uploadImages?.map(val => { return val.url })?.join(',')
})
} else {
wx.$util.showToast(message)
}
}
} catch (error) {
wx.$util.showToast("上传失败,请重试")
} finally {
wx.hideLoading()
}
}
upload(res?.tempFiles)
}
})
},
uploadVideos(e) {
let { field, type } = e.currentTarget.dataset
let _this = this
const index = _this.data[type]?.findIndex(val => val.key == field.key )
_this.closeChangeUploadType()
wx.chooseVideo({
maxDuration: 60,
success(res) {
if (res.size > 100 * 1024 * 1024) {
return wx.showToast({
title: '视频上传最大100MB',
icon: 'none'
})
}
const upload = async (tempFiles) => {
wx.showLoading({
title: '上传中',
mask: true
})
try {
for (const item of tempFiles) {
const val = item.tempFilePath
const imgType = val.split('.')[1]
const upType = imgType === 'unknown' ? 'jpg' : imgType
const _res = await new Promise((resolve, reject) => {
wx.getFileSystemManager().readFile({
filePath: val, // 选择图片返回的相对路径
encoding: 'base64', // 编码格式
success: resolve,
fail: reject
})
})
const img = await api.uploadFileWithCover({
file: `${upType}@${_res.data}`
})
const { code, data, message } = img
if (code == 0) {
_this.data[type][index].uploadImages?.push({url: data.videoUrl, isVideo: true, coverUrl: data.coverUrl})
_this.setData({
[`${type}`]: _this.data[type],
[`formData.${field.key}`]: data.videoUrl
})
} else {
wx.$util.showToast(message)
}
}
} catch (error) {
wx.$util.showToast("上传失败,请重试")
} finally {
wx.hideLoading()
}
}
upload([res])
}
})
},
uploadMedia(field, count, index, type) {
let _this = this
wx.chooseMedia({
count: count,
mediaType: field.video ? ['image', 'video'] : ['image'],
......@@ -253,7 +367,7 @@ Page({
}
}
}
const uploadImages = async (tempFiles) => {
const upload = async (tempFiles) => {
wx.showLoading({
title: '上传中',
mask: true
......@@ -261,18 +375,6 @@ Page({
try {
for (const item of tempFiles) {
const val = item.tempFilePath
// 兼容企微将内容保存至相册
// if (sysInfo.environment) {
// if (fileType == 'video') {
// wx.saveVideoToPhotosAlbum({
// filePath: val
// })
// } else {
// wx.saveImageToPhotosAlbum({
// filePath: val,
// })
// }
// }
const imgType = val.split('.')[1]
const uploadType = imgType === 'unknown' ? 'jpg' : imgType
const _res = await new Promise((resolve, reject) => {
......@@ -308,20 +410,72 @@ Page({
wx.hideLoading()
}
}
uploadImages(res?.tempFiles)
upload(res?.tempFiles)
}
})
},
handleImageUpload(e) {
let { field, type } = e.currentTarget.dataset
let _this = this
let count = field.maxCount - field?.uploadImages.length
const index = _this.data[type]?.findIndex(val => val.key == field.key )
let sysInfo = wx.getSystemInfoSync()
if (sysInfo.environment) { // 企微打开
if (field.video) {
const obj = _this.data[type]?.find(val => val.key == field.key)
_this.setData({showUploadType: true, videoFormObj: obj})
} else {
_this.uploadImages({currentTarget: {dataset: {field: field, type: type}}})
}
} else {
_this.uploadMedia(field, count, index, type)
}
},
// 关闭选择上传类型弹窗
closeChangeUploadType() {
this.setData({showUploadType: false})
},
previewMedia(e) {
let { media, index } = e.currentTarget.dataset
media?.forEach(val => {
val.type = val.isVideo ? 'video': 'image',
val.poster = val.isVideo ? val.coverUrl : ''
})
wx.previewMedia({
sources: media,
current: index || 0
let sysInfo = wx.getSystemInfoSync()
const hasVideo = media?.some(item => item.isVideo)
if (sysInfo.environment) { // 企微打开
if (hasVideo) {
this.setData({
videoPreviewShow: true,
previewVideoUrl: media[0]?.url,
previewVideoPoster: media[0]?.poster
})
} else {
wx.previewImage({
urls: media?.map(val => { return val.url }),
current: index || 0
})
wx.previewMedia({
sources: media,
current: index || 0
})
}
} else {
wx.previewMedia({
sources: media,
current: index || 0
})
}
},
closeVideoPreview() {
this.setData({
videoPreviewShow: false,
previewVideoUrl: '',
previewVideoPoster: ''
})
},
......
{
"usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index"
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-overlay": "@vant/weapp/overlay/index",
"van-icon": "@vant/weapp/icon/index"
},
"navigationStyle": "custom"
}
\ No newline at end of file
......@@ -319,4 +319,38 @@ page {
}
}
}
}
.file-type-popup {
.popup-content{
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
.title{
margin-top: var(--fontSize24);
font-size: var(--fontSize24);
color: #9B9B9E;
}
.popup-item{
font-size: var(--fontSize32);
color: #222222;
font-weight: 500;
width: 100%;
height: var(--fontSize112);
text-align: center;
line-height: var(--fontSize112);
border-bottom: var(--fontSize1) solid #EBEDF0;
}
}
}
.wrapper {
width: 100%;
height: 100%;
position: relative;
.close-box {
position: absolute;
left: 0;
z-index: 1;
padding-left: 20rpx;
}
}
\ No newline at end of file
......@@ -177,4 +177,27 @@
<view class="btn" bindtap="confirmRepeal">保存</view>
</view>
</view>
</view>
\ No newline at end of file
</view>
<!-- 选择上传类型 -->
<van-popup
class="file-type-popup"
show="{{showUploadType}}"
position="bottom"
bind:close="closeChangeUploadType"
round
>
<view class="popup-content">
<view class="title">请选择</view>
<view class="popup-item" bindtap="uploadImages" data-field="{{videoFormObj}}" data-type="uploadFieldsWithImages">上传图片</view>
<view class="popup-item" bindtap="uploadVideos" data-field="{{videoFormObj}}" data-type="uploadFieldsWithImages">上传视频</view>
</view>
</van-popup>
<!-- 企微端预览视频 -->
<page-container show="{{videoPreviewShow}}" bind:afterleave="closeVideoPreview">
<van-overlay show="{{ videoPreviewShow }}" bind:click="onClickHide" z-index="99999">
<view class="wrapper" wx:if="{{videoPreviewShow}}">
<view class="close-box" catch:tap="closeVideoPreview" style="top: calc({{navBarHeight}}px - 60rpx);"><van-icon name="arrow-left" color="#FFFFFF" size="24"></van-icon></view>
<video style="width: 100%;height: 100%;" autoplay src="{{previewVideoUrl}}" poster="{{previewVideoPoster}}" />
</view>
</van-overlay>
</page-container>
\ No newline at end of file
......@@ -5,7 +5,7 @@
<view class="search-box">
<view class="search-input" style="width:{{ staffUuid?'100%':'' }}">
<image src="/images/search.png" class="search-icon" />
<input type="text" placeholder="客户姓名/车牌号/订单编号/手机号" class="input" confirm-type="search" value="{{ keyWord }}" placeholder-class="input-placeholder" bindinput="searchInput" bindconfirm="searchConfirm" />
<input type="text" placeholder="客户姓名/车牌号/工单编号/手机号" class="input" confirm-type="search" value="{{ keyWord }}" placeholder-class="input-placeholder" bindinput="searchInput" bindconfirm="searchConfirm" />
<block wx:if="{{ keyWord }}">
<view bindtap="handleReset" class="clearBtn">
<image src="/images/clear.png" class="search-clear" />
......
......@@ -122,17 +122,17 @@ Page({
payerIdCardFrontUrl: '',
payerIdCardBackUrl: '',
payerBankCardUrl: '',
motorBook: '1',
motorRegistrationCertificate: '1',
motorBook: '0',
motorRegistrationCertificate: '0',
idCarFrontBack: '',
purchaseReceipt: '0',
purchaseInvoice: '0',
trafficScreenshot: '1',
carKey: '1',
trafficScreenshot: '0',
carKey: '0',
carKeyCount: '',
trafficInsurance: '1',
trafficInsurance: '0',
insuranceCard: '0',
transferPhoto: '1',
transferPhoto: '0',
other: '0',
otherText: '',
handoverTime: '',
......@@ -229,7 +229,8 @@ Page({
],
query: null,
show: false,
value1: dayjs().format('YYYY-MM-DD HH:mm:ss')
value1: dayjs().format('YYYY-MM-DD HH:mm:ss'),
sysInfo: {}
},
/**
......@@ -240,7 +241,8 @@ Page({
query: options,
'formData.evalPrice': options.evalPrice,
'formData.handoverTime': dayjs().format('YYYY-MM-DD HH:mm:00'),
currentDate: new Date().getTime()
currentDate: new Date().getTime(),
sysInfo: wx.getSystemInfoSync()
}, () => {
this.getEvalOrderSimpleDetail()
})
......@@ -626,12 +628,119 @@ Page({
wx.showToast({ title: "定位失败,请检查权限", icon: "none" })
}
},
// 上传图片
handleImageUpload(e) {
let _this = this
// 兼容企微端仅上传图片
uploadImages(e) {
let { field } = e.currentTarget.dataset
// let sysInfo = wx.getSystemInfoSync()
let _this = this
_this.closeChangeUploadType()
wx.chooseImage({
count: 1,
success(res) {
for (const file of res.tempFiles) {
if (file.size > 10 * 1024 * 1024) {
return wx.showToast({
title: '图片上传最大10MB',
icon: 'none'
})
}
}
const upload = async (tempFiles) => {
wx.showLoading({
title: '上传中',
mask: true
})
try {
for (const item of tempFiles) {
const val = item.path
const imgType = val.split('.')[1]
const type = imgType === 'unknown' ? 'jpg' : imgType
const _res = await new Promise((resolve, reject) => {
wx.getFileSystemManager().readFile({
filePath: val, // 选择图片返回的相对路径
encoding: 'base64', // 编码格式
success: resolve,
fail: reject
})
})
const img = await api.uploadImg({
file: `${type}@${_res.data}`
})
const { code, data, message } = img
if (code == 0) {
_this.setData({
[`formData.${field}`]: data
})
} else {
wx.$util.showToast(message)
}
}
} catch (error) {
wx.$util.showToast("上传失败,请重试")
} finally {
wx.hideLoading()
}
}
upload(res?.tempFiles)
}
})
},
// 兼容企微上传视频
uploadVideos() {
let _this = this
_this.closeChangeUploadType()
wx.chooseVideo({
maxDuration: 60,
success(res) {
if (res.size > 100 * 1024 * 1024) {
return wx.showToast({
title: '视频上传最大100MB',
icon: 'none'
})
}
const upload = async (tempFiles) => {
wx.showLoading({
title: '上传中',
mask: true
})
try {
for (const item of tempFiles) {
const val = item.tempFilePath
const imgType = val.split('.')[1]
const type = imgType === 'unknown' ? 'mp4' : imgType
const _res = await new Promise((resolve, reject) => {
wx.getFileSystemManager().readFile({
filePath: val, // 选择图片返回的相对路径
encoding: 'base64', // 编码格式
success: resolve,
fail: reject
})
})
const img = await api.uploadFileWithCover({
file: `${type}@${_res.data}`
})
const { code, data, message } = img
if (code == 0) {
_this.setData({
'formData.thirdPartyTransactionVoucher': data.videoUrl,
thirdPartyTransactionType: 'video',
thirdPartyTransactionCoverUrl: data?.coverUrl
})
} else {
wx.$util.showToast(message)
}
}
} catch (error) {
wx.$util.showToast("上传失败,请重试")
} finally {
wx.hideLoading()
}
}
upload([res])
}
})
},
uploadMedia(field) {
let _this = this
wx.chooseMedia({
count: 1,
mediaType: field == 'thirdPartyTransactionVoucher' ? ['image', 'video'] : ['image'],
......@@ -659,7 +768,7 @@ Page({
}
}
}
const uploadImages = async (tempFiles) => {
const upload = async (tempFiles) => {
wx.showLoading({
title: '上传中',
mask: true
......@@ -667,18 +776,6 @@ Page({
try {
for (const item of tempFiles) {
const val = item.tempFilePath
// 兼容企微将内容保存至相册
// if (sysInfo.environment) {
// if (fileType == 'video') {
// wx.saveVideoToPhotosAlbum({
// filePath: val
// })
// } else {
// wx.saveImageToPhotosAlbum({
// filePath: val,
// })
// }
// }
const imgType = val.split('.')[1]
const type = imgType === 'unknown' ? 'jpg' : imgType
const _res = await new Promise((resolve, reject) => {
......@@ -718,10 +815,32 @@ Page({
wx.hideLoading()
}
}
uploadImages(res?.tempFiles)
upload(res?.tempFiles)
}
})
},
// 关闭选择上传类型弹窗
closeChangeUploadType() {
this.setData({showUploadType: false})
},
// 上传图片
handleImageUpload(e) {
let _this = this
let { field } = e.currentTarget.dataset
let { sysInfo } = _this.data
if (sysInfo.environment) { // 企微打开
if (field == 'thirdPartyTransactionVoucher') { // 选择图片或视频
_this.setData({
showUploadType: true
})
} else {
_this.uploadImages({currentTarget: {dataset: {field: field}}})
}
} else {
_this.uploadMedia(field)
}
},
// 删除图片
removeMedia(e) {
let { field } = e.currentTarget.dataset
......@@ -752,15 +871,28 @@ Page({
// 预览三方/委托交易凭证视频
previewMedia(e) {
let { media, coverurl } = e.currentTarget.dataset
let { sysInfo } = this.data
let obj = {
url: media,
type: 'video',
poster: coverurl
}
wx.previewMedia({
sources: [obj],
current: 0
})
if (sysInfo.environment) { // 企微预览视频
this.setData({
videoPreviewShow: true,
previewVideoUrl: media,
previewVideoPoster: coverurl
})
} else {
wx.previewMedia({
sources: [obj],
current: 0
})
}
},
closeVideoPreview() {
this.setData({videoPreviewShow: false})
},
checkChange(e) {
......@@ -774,6 +906,9 @@ Page({
checkboxList?.forEach(val => {
if (val.key == target.key && !val.disabled) {
val.checked = !target.checked
this.setData({
[`formData.${target.key}`]: val.checked ? '1' : '0'
})
}
})
this.setData({
......
{
"usingComponents": {
"van-popup": "@vant/weapp/popup/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index"
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"van-overlay": "@vant/weapp/overlay/index",
"van-icon": "@vant/weapp/icon/index"
},
"navigationStyle": "custom"
}
\ No newline at end of file
......@@ -317,6 +317,7 @@ page {
}
}
.confirm-box {
margin: 0 -20rpx;
height: 100%;
overflow: auto;
scrollbar-width: none;
......@@ -327,11 +328,11 @@ page {
height: 0 !important;
}
.tips {
margin: 0 -20rpx;
background: #fef5ea;
color: #FF9D0A;
font-size: 28rpx;
padding: 16rpx 32rpx;
background: #fef5ea;
color: #FF9D0A;
font-size: 28rpx;
padding: 16rpx 32rpx;
box-sizing: border-box;
.tips-icon {
width: 32rpx;
height: 32rpx;
......@@ -340,6 +341,7 @@ page {
}
}
.box-class1 {
margin: 0 20rpx;
background: #ffffff;
border-radius: 16rpx;
margin-top: 20rpx;
......@@ -454,4 +456,38 @@ page {
}
.justify-between {
justify-content: space-between;
}
.file-type-popup {
.popup-content{
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
.title{
margin-top: var(--fontSize24);
font-size: var(--fontSize24);
color: #9B9B9E;
}
.popup-item{
font-size: var(--fontSize32);
color: #222222;
font-weight: 500;
width: 100%;
height: var(--fontSize112);
text-align: center;
line-height: var(--fontSize112);
border-bottom: var(--fontSize1) solid #EBEDF0;
}
}
}
.wrapper {
width: 100%;
height: 100%;
position: relative;
.close-box {
position: absolute;
left: 0;
z-index: 1;
padding-left: 20rpx;
}
}
\ No newline at end of file
......@@ -467,4 +467,27 @@
bind:confirm="bindDateChange"
/>
</van-popup>
</view>
\ No newline at end of file
<!-- 选择上传类型 -->
<van-popup
class="file-type-popup"
show="{{showUploadType}}"
position="bottom"
bind:close="closeChangeUploadType"
round
>
<view class="popup-content">
<view class="title">请选择</view>
<view class="popup-item" bindtap="uploadImages" data-field="thirdPartyTransactionVoucher">上传图片</view>
<view class="popup-item" bindtap="uploadVideos">上传视频</view>
</view>
</van-popup>
</view>
<!-- 企微端预览视频 -->
<page-container show="{{videoPreviewShow}}" bind:afterleave="closeVideoPreview">
<van-overlay show="{{ videoPreviewShow }}" bind:click="onClickHide" z-index="99999">
<view class="wrapper" wx:if="{{videoPreviewShow}}">
<view class="close-box" catch:tap="closeVideoPreview" style="top: calc({{navBarHeight}}px - 60rpx);"><van-icon name="arrow-left" color="#FFFFFF" size="24"></van-icon></view>
<video style="width: 100%;height: 100%;" autoplay src="{{previewVideoUrl}}" poster="{{previewVideoPoster}}" />
</view>
</van-overlay>
</page-container>
......@@ -79,8 +79,8 @@ Page({
},
back() {
let { reportObj, isDateWithin7Days } = this.data
if (!reportObj?.id && isDateWithin7Days) {
let { reportObj, isDateWithin7Days, isFilled } = this.data
if (!isFilled && isDateWithin7Days) {
wx.showModal({
title: '重要提示',
content: '内容尚未提交,是否退出编辑',
......@@ -260,8 +260,8 @@ Page({
* 点击了上一周,选择周数字减一,然后直接调用工具类中一个方法获取到数据
*/
lastWeek: function (e) {
let { reportObj, isDateWithin7Days } = this.data
if (!reportObj?.id && isDateWithin7Days) {
let { isDateWithin7Days, isFilled } = this.data
if (!isFilled && isDateWithin7Days) {
wx.showModal({
title: '重要提示',
content: '内容尚未提交,是否退出编辑',
......@@ -298,8 +298,8 @@ Page({
* 点击了下一周,选择周数字加一,然后直接调用工具类中一个方法获取到数据
*/
nextWeek: function (e) {
let { reportObj, isDateWithin7Days } = this.data
if (!reportObj?.id && isDateWithin7Days) {
let { reportObj, isDateWithin7Days, isFilled } = this.data
if (!isFilled && isDateWithin7Days) {
wx.showModal({
title: '重要提示',
content: '内容尚未提交,是否退出编辑',
......@@ -338,8 +338,8 @@ Page({
* 选中了某一日,改变selectDay为选中日
*/
dayClick(e) {
let { timeBean, reportObj, isDateWithin7Days } = this.data
if (!reportObj?.id && isDateWithin7Days) {
let { timeBean, reportObj, isDateWithin7Days, isFilled } = this.data
if (!isFilled && isDateWithin7Days) {
wx.showModal({
title: '重要提示',
content: '内容尚未提交,是否退出编辑',
......
......@@ -59,6 +59,7 @@ class Request {
header,
dataType: 'json',
responseType: 'text',
timeout: noSignAttr?.includes('file') ? 120 * 1000 : 60 * 1000,
success(response) {
/**业务代码 */
let {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!