Commit 6ed24e5d by 前端

BUG修复

1 parent 925c8c41
...@@ -68,7 +68,8 @@ export const scheduling_inviteStatus = [ ...@@ -68,7 +68,8 @@ export const scheduling_inviteStatus = [
{ confId: 1, confValue: '待预约' }, { confId: 1, confValue: '待预约' },
{ confId: 2, confValue: '已预约' }, { confId: 2, confValue: '已预约' },
{ confId: 3, confValue: '取消预约' }, { confId: 3, confValue: '取消预约' },
{ confId: 4, confValue: '超时未到店' }, { confId: 4, confValue: '已施工' },
{ confId: 5, confValue: '已施工' }, { confId: 5, confValue: '超时未到店' },
{ confId: 6, confValue: '已撤销' } { confId: 6, confValue: '已撤销' },
{ confId: 7, confValue: '已支付' }
] ]
...@@ -203,6 +203,12 @@ export default { ...@@ -203,6 +203,12 @@ export default {
params.inviteDateStr = params.dateTime + ' ' + params.times + ':00' params.inviteDateStr = params.dateTime + ' ' + params.times + ':00'
delete params.dateTime delete params.dateTime
delete params.times delete params.times
const targetTime = new Date(params.inviteDateStr).getTime() // 转为时间戳
const now = new Date().getTime() // 当前时间戳
if (targetTime < now) {
this.$message.warning('预约时间不能选择已过去的时间')
return
}
this.$apis.invitation.dateUpdate(params).then(res => { this.$apis.invitation.dateUpdate(params).then(res => {
this.$notify({ this.$notify({
type: 'success', type: 'success',
......
...@@ -163,10 +163,20 @@ export default { ...@@ -163,10 +163,20 @@ export default {
this.infoForm.saturdayFlag = item.saturdayFlag this.infoForm.saturdayFlag = item.saturdayFlag
this.infoForm.sundayFlag = item.sundayFlag this.infoForm.sundayFlag = item.sundayFlag
}) })
} else {
this.resetData() // 如果返回数据为空,则重置数据
} }
}) })
}, },
resetData() {
this.infoForm.saturdayFlag = 'N'
this.infoForm.sundayFlag = 'N'
this.infoForm.workItem.forEach(item => {
item.maxCount = 0
})
},
yqMerchantPage() { yqMerchantPage() {
this.$apis.invitation.yqMerchantPage({ currentPage: 1, pageSize: 99999 }).then(res => { this.$apis.invitation.yqMerchantPage({ currentPage: 1, pageSize: 99999 }).then(res => {
this.baseData.yqMerchantList = res.list this.baseData.yqMerchantList = res.list
......
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
slot="auth-button" slot="auth-button"
slot-scope="scope"> slot-scope="scope">
<el-button type="text" <el-button type="text"
@click="handleReservation(scope.scope)">预约时间</el-button> @click="handleReservation(scope.scope)"
v-if="[1, 2, 3, 5].includes(scope.scope.inviteStatus)">预约时间</el-button>
<el-button type="text" <el-button type="text"
@click="handleRamrk(scope.scope)">备注</el-button> @click="handleRamrk(scope.scope)">备注</el-button>
</div> </div>
...@@ -234,15 +235,15 @@ export default { ...@@ -234,15 +235,15 @@ export default {
return new Promise(resolve => { return new Promise(resolve => {
this.searchFormSearch = this.$common.utils.deepClone(this.searchForm) this.searchFormSearch = this.$common.utils.deepClone(this.searchForm)
if (this.searchFormSearch.couponDate) { if (this.searchFormSearch.couponDate) {
this.searchFormSearch.getCouponStartDate = dayjs(this.searchFormSearch.couponDate[0], 'YYYY-MM-DD HH:mm:ss') this.searchFormSearch.getCouponStartDate = dayjs(this.searchFormSearch.couponDate[0]).format('YYYY-MM-DD HH:mm:ss')
this.searchFormSearch.getCouponEndDate = dayjs(this.searchFormSearch.couponDate[1], 'YYYY-MM-DD') + ' 23:59:59' this.searchFormSearch.getCouponEndDate = dayjs(this.searchFormSearch.couponDate[1]).format('YYYY-MM-DD') + ' 23:59:59'
} else { } else {
delete this.searchFormSearch.getCouponStartDate delete this.searchFormSearch.getCouponStartDate
delete this.searchFormSearch.getCouponEndDate delete this.searchFormSearch.getCouponEndDate
} }
if (this.searchFormSearch.toShopDate) { if (this.searchFormSearch.toShopDate) {
this.searchFormSearch.toShopStartDate = dayjs(this.searchFormSearch.toShopDate[0], 'YYYY-MM-DD HH:mm:ss') this.searchFormSearch.toShopStartDate = dayjs(this.searchFormSearch.toShopDate[0]).format('YYYY-MM-DD HH:mm:ss')
this.searchFormSearch.toShopEndDate = dayjs(this.searchFormSearch.toShopDate[1], 'YYYY-MM-DD') + ' 23:59:59' this.searchFormSearch.toShopEndDate = dayjs(this.searchFormSearch.toShopDate[1]).format('YYYY-MM-DD') + ' 23:59:59'
} else { } else {
delete this.searchFormSearch.toShopStartDate delete this.searchFormSearch.toShopStartDate
delete this.searchFormSearch.toShopEndDate delete this.searchFormSearch.toShopEndDate
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!