Fix:[#3143]【商城小程序】供应商入驻资料填写页面—未填写营业时间也可以提交
This commit is contained in:
@@ -87,7 +87,7 @@ export default {
|
||||
components: {
|
||||
uniPopup
|
||||
},
|
||||
props: ["callback", "items", "defaultValue"],
|
||||
props: ["callback", "items", "defaultValue", 'disabled'],
|
||||
data() {
|
||||
return {
|
||||
value: "请选择",
|
||||
@@ -107,7 +107,7 @@ export default {
|
||||
},
|
||||
defaultValue(newValue) {
|
||||
this.value = newValue;
|
||||
// this.adjustDefaultValue();
|
||||
this.adjustDefaultValue();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -147,6 +147,7 @@ export default {
|
||||
return idx;
|
||||
},
|
||||
open() {
|
||||
if(this.disabled) return;
|
||||
if (this.$refs.popup.showPopup) {
|
||||
this.$refs.popup.close();
|
||||
return;
|
||||
|
||||
@@ -388,7 +388,7 @@
|
||||
<text class="required">*</text>
|
||||
</template>
|
||||
<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
|
||||
ref="cityselect2"
|
||||
:defaultValue="form.area"
|
||||
@@ -714,7 +714,7 @@ export default {
|
||||
indexSupplierType: 0,
|
||||
district: [],
|
||||
isAgree: false,
|
||||
show: true,
|
||||
show: false,
|
||||
notice: '',
|
||||
showRemove: false,
|
||||
isDraft: null,
|
||||
@@ -731,7 +731,14 @@ export default {
|
||||
const type = options.type
|
||||
const local = uni.getStorageSync(type)
|
||||
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: '',
|
||||
cover: '',
|
||||
coverVideo: '',
|
||||
@@ -748,7 +755,7 @@ export default {
|
||||
serviceTime: '00:00',
|
||||
serviceEndTime: '23:59'
|
||||
}
|
||||
this.formSupplier = local || {
|
||||
this.formSupplier = !this.reviewing && local || {
|
||||
name: '',
|
||||
avatar: '',
|
||||
contact: '',
|
||||
@@ -761,6 +768,7 @@ export default {
|
||||
position: ''
|
||||
}
|
||||
this.formSupplier.subType = type
|
||||
|
||||
if (type === 'goods_supplier') {
|
||||
this.infoTitle = '特产'
|
||||
this.pageKeyId = 'merchantApplyGoodsSupplier'
|
||||
@@ -775,6 +783,7 @@ export default {
|
||||
},
|
||||
onUnload() {
|
||||
uni.setStorageSync(this.formSupplier.subType, this.formSupplier)
|
||||
uni.setStorageSync(this.formSupplier.subType+'_quaPics', this.quaPics)
|
||||
uni.setStorageSync(this.formSupplier.subType + '_form', this.form)
|
||||
},
|
||||
onReady() {
|
||||
@@ -848,6 +857,9 @@ export default {
|
||||
}
|
||||
this.isDraft = data.isDraft
|
||||
this.reviewStatus = data.reviewStatus
|
||||
if(data.isDraft === null) {
|
||||
this.show = true
|
||||
}
|
||||
if (data.isDraft !== 1) {
|
||||
switch (data.reviewStatus) {
|
||||
case 0:
|
||||
@@ -879,7 +891,7 @@ export default {
|
||||
}
|
||||
// 商家资质
|
||||
this.quaPics = []
|
||||
const quaPicsTemp = this.form.qualification.split(',')
|
||||
const quaPicsTemp = this.form.qualification && this.form.qualification.split(',') || []
|
||||
if (quaPicsTemp.length > 0) {
|
||||
quaPicsTemp.map(item => {
|
||||
if (item) {
|
||||
|
||||
Reference in New Issue
Block a user