Commit a10a1d7e by chenwq

地图样式。loading

1 parent 8f29722d
...@@ -369,7 +369,7 @@ export default { ...@@ -369,7 +369,7 @@ export default {
width: 136px !important; width: 136px !important;
} }
.gl-form-page .el-form .province-textarea .el-textarea { .gl-form-page .el-form .province-textarea .el-textarea {
width: 432px !important; width: 580px !important;
} }
.province-textarea { .province-textarea {
position: relative; position: relative;
......
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
<div class="edit-zone shop edit-box"> <div class="edit-zone shop edit-box">
<div class="container edit-container all-page"> <div class="container edit-container all-page">
<p class="page-title">基础信息</p> <p class="page-title">基础信息</p>
<div v-loading="loading">
<glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :isWatch="isWatch" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule"> <glsx-combi-form class="edit-form-container m-r-20" ref="editFormRef" :isEdit="isEdit" :isWatch="isWatch" :labelWidth="defaultLabelWidth" :isBlock="true" :formRef="editChildRef" :formObj="editForm" :formData="editFormData" :formRules="editRule">
<div slot="map" slot-scope="scope" class="flex"> <div slot="map" slot-scope="scope" class="flex">
<span class="province-icon">*</span> <span class="province-icon">*</span>
<Province ref="provinceForm" :subdistrict="subdistrict" :provinceLabel="scope.scope.labelName" :inline="scope.scope.inline" @selectProvince="selectProvince" @selectCity="selectCity" @selectAddressByMap="selectAddressByMap" :detailAddressLabel="detailAddressLabel"></Province> <Province ref="provinceForm" :subdistrict="subdistrict" :provinceLabel="scope.scope.labelName" :inline="scope.scope.inline" @selectProvince="selectProvince" @selectCity="selectCity" @selectAddressByMap="selectAddressByMap" :detailAddressLabel="detailAddressLabel"></Province>
</div> </div>
<div slot="business" slot-scope="scope" class="business"> <div slot="business" slot-scope="scope" class="business">
<el-select v-model="editForm[scope.scope.name]" multiple filterable placeholder="请选择" @change="handleMutiSelctChange"> <el-select v-model="editForm[scope.scope.name]" multiple filterable collapse-tags placeholder="请选择" @change="handleMutiSelctChange">
<el-option-group v-for="group in baseData.sceneList" :key="group.sceneCode" :label="group.name"> <el-option-group v-for="group in baseData.sceneList" :key="group.sceneCode" :label="group.name">
<el-option v-for="item in group.productList" :key="item.productCode" :label="item.productName" :value="item.productCode"></el-option> <el-option v-for="item in group.productList" :key="item.productCode" :label="item.productName" :value="item.productCode"></el-option>
</el-option-group> </el-option-group>
...@@ -17,6 +18,7 @@ ...@@ -17,6 +18,7 @@
</div> </div>
</glsx-combi-form> </glsx-combi-form>
</div> </div>
</div>
<GLFooter class="m-t-20"> <GLFooter class="m-t-20">
<el-button @click="handleCancel" size="medium">取消</el-button> <el-button @click="handleCancel" size="medium">取消</el-button>
<el-button type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button> <el-button type="primary" @click="handleConfirm" size="medium" :loading="loading">提交</el-button>
...@@ -39,6 +41,7 @@ export default { ...@@ -39,6 +41,7 @@ export default {
editType: 'add', editType: 'add',
id: '' id: ''
}, },
loading: false,
editStatus: false, editStatus: false,
editForm: { editForm: {
shopMerchantId: '', shopMerchantId: '',
...@@ -96,7 +99,7 @@ export default { ...@@ -96,7 +99,7 @@ export default {
label: '联系人', label: '联系人',
name: 'contactName', name: 'contactName',
type: 'input', type: 'input',
maxlength: 20 maxlength: 10
}, },
{ {
label: '联系电话', label: '联系电话',
...@@ -207,7 +210,10 @@ export default { ...@@ -207,7 +210,10 @@ export default {
oldPhone: this.routeInfo.merchantInfo?.phone, oldPhone: this.routeInfo.merchantInfo?.phone,
oldMerchantName: this.routeInfo.merchantInfo.shopMerchantName || '' oldMerchantName: this.routeInfo.merchantInfo.shopMerchantName || ''
} }
this.$apis.customer.getMerchantInfo({ merchantId: this.routeInfo.merchantInfo.shopMerchantId }).then(res => { this.loading = true
this.$apis.customer
.getMerchantInfo({ merchantId: this.routeInfo.merchantInfo.shopMerchantId })
.then(res => {
this.editForm.provinceCode = res.provinceCode this.editForm.provinceCode = res.provinceCode
this.editForm.provinceName = res.provinceName this.editForm.provinceName = res.provinceName
this.editForm.cityCode = res.cityCode this.editForm.cityCode = res.cityCode
...@@ -235,6 +241,9 @@ export default { ...@@ -235,6 +241,9 @@ export default {
this.editStatus = false this.editStatus = false
}) })
}) })
.finally(() => {
this.loading = false
})
}, },
hasDuplicate(arr1, arr2) { hasDuplicate(arr1, arr2) {
const set1 = new Set(arr1) const set1 = new Set(arr1)
...@@ -265,7 +274,6 @@ export default { ...@@ -265,7 +274,6 @@ export default {
return return
} }
if (!this.editForm.merchantBrandList?.length) { if (!this.editForm.merchantBrandList?.length) {
this.loading = false
this.$message({ this.$message({
message: '请选择主营品牌', message: '请选择主营品牌',
type: 'error' type: 'error'
...@@ -290,7 +298,9 @@ export default { ...@@ -290,7 +298,9 @@ export default {
}) })
.then(() => { .then(() => {
const apiName = this.routeInfo.editType == 'edit' ? 'updateMerchant' : 'createMerchant' const apiName = this.routeInfo.editType == 'edit' ? 'updateMerchant' : 'createMerchant'
this.$apis.customer[apiName](params).then(res => { this.loading = true
this.$apis.customer[apiName](params)
.then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
...@@ -299,6 +309,9 @@ export default { ...@@ -299,6 +309,9 @@ export default {
this.cancelJump() this.cancelJump()
} }
}) })
.finally(() => {
this.loading = false
})
}) })
.catch(() => { }) .catch(() => { })
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!