Fix:[#3143]【商城小程序】供应商入驻资料填写页面—未填写营业时间也可以提交

This commit is contained in:
modendeveloper
2025-01-23 01:08:05 +08:00
parent 3f22aa26b7
commit 3a66811a52
2 changed files with 20 additions and 7 deletions
+3 -2
View File
@@ -87,7 +87,7 @@ export default {
components: { components: {
uniPopup uniPopup
}, },
props: ["callback", "items", "defaultValue"], props: ["callback", "items", "defaultValue", 'disabled'],
data() { data() {
return { return {
value: "请选择", value: "请选择",
@@ -107,7 +107,7 @@ export default {
}, },
defaultValue(newValue) { defaultValue(newValue) {
this.value = newValue; this.value = newValue;
// this.adjustDefaultValue(); this.adjustDefaultValue();
} }
}, },
mounted() { mounted() {
@@ -147,6 +147,7 @@ export default {
return idx; return idx;
}, },
open() { open() {
if(this.disabled) return;
if (this.$refs.popup.showPopup) { if (this.$refs.popup.showPopup) {
this.$refs.popup.close(); this.$refs.popup.close();
return; return;
+17 -5
View File
@@ -388,7 +388,7 @@
<text class="required">*</text> <text class="required">*</text>
</template> </template>
<template #value> <template #value>
<view class="u-text__value" :class="{'area-item':form.area.length===0}"> <view class="u-text__value" :class="{'area-item':form.area && form.area.length===0}">
<CitySelect <CitySelect
ref="cityselect2" ref="cityselect2"
:defaultValue="form.area" :defaultValue="form.area"
@@ -714,7 +714,7 @@ export default {
indexSupplierType: 0, indexSupplierType: 0,
district: [], district: [],
isAgree: false, isAgree: false,
show: true, show: false,
notice: '', notice: '',
showRemove: false, showRemove: false,
isDraft: null, isDraft: null,
@@ -731,7 +731,14 @@ export default {
const type = options.type const type = options.type
const local = uni.getStorageSync(type) const local = uni.getStorageSync(type)
const local_form = uni.getStorageSync(type + '_form') const local_form = uni.getStorageSync(type + '_form')
this.form = local_form || { this.quaPics = uni.getStorageSync(type + '_quaPics') || []
if(!local_form.serviceTime) {
local_form.serviceTime = '00:00'
}
if(!local_form.serviceEndTime) {
local_form.serviceEndTime = '23:59'
}
this.form = !this.reviewing && local_form || {
name: '', name: '',
cover: '', cover: '',
coverVideo: '', coverVideo: '',
@@ -748,7 +755,7 @@ export default {
serviceTime: '00:00', serviceTime: '00:00',
serviceEndTime: '23:59' serviceEndTime: '23:59'
} }
this.formSupplier = local || { this.formSupplier = !this.reviewing && local || {
name: '', name: '',
avatar: '', avatar: '',
contact: '', contact: '',
@@ -761,6 +768,7 @@ export default {
position: '' position: ''
} }
this.formSupplier.subType = type this.formSupplier.subType = type
if (type === 'goods_supplier') { if (type === 'goods_supplier') {
this.infoTitle = '特产' this.infoTitle = '特产'
this.pageKeyId = 'merchantApplyGoodsSupplier' this.pageKeyId = 'merchantApplyGoodsSupplier'
@@ -775,6 +783,7 @@ export default {
}, },
onUnload() { onUnload() {
uni.setStorageSync(this.formSupplier.subType, this.formSupplier) uni.setStorageSync(this.formSupplier.subType, this.formSupplier)
uni.setStorageSync(this.formSupplier.subType+'_quaPics', this.quaPics)
uni.setStorageSync(this.formSupplier.subType + '_form', this.form) uni.setStorageSync(this.formSupplier.subType + '_form', this.form)
}, },
onReady() { onReady() {
@@ -848,6 +857,9 @@ export default {
} }
this.isDraft = data.isDraft this.isDraft = data.isDraft
this.reviewStatus = data.reviewStatus this.reviewStatus = data.reviewStatus
if(data.isDraft === null) {
this.show = true
}
if (data.isDraft !== 1) { if (data.isDraft !== 1) {
switch (data.reviewStatus) { switch (data.reviewStatus) {
case 0: case 0:
@@ -879,7 +891,7 @@ export default {
} }
// 商家资质 // 商家资质
this.quaPics = [] this.quaPics = []
const quaPicsTemp = this.form.qualification.split(',') const quaPicsTemp = this.form.qualification && this.form.qualification.split(',') || []
if (quaPicsTemp.length > 0) { if (quaPicsTemp.length > 0) {
quaPicsTemp.map(item => { quaPicsTemp.map(item => {
if (item) { if (item) {