|
@@ -216,22 +216,6 @@
|
|
|
<el-form-item label="联系手机" prop="mobile">
|
|
|
<el-input v-model="form.mobile" placeholder="请输入联系手机" />
|
|
|
</el-form-item>
|
|
|
-
|
|
|
-<!-- <el-form-item label="所在地区">-->
|
|
|
-<!-- <span style="color: #f56c6c;float: left;position: absolute;left: -77px;">*</span>-->
|
|
|
-<!-- <Area :areaProp="areaProp" @changeArea="changeArea" ref="area"/>-->
|
|
|
-<!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="代理商等级" prop="agentLevel" v-if="form.isPid == 0 || form.id == undefined">
|
|
|
- <el-select v-model="form.agentLevel" placeholder="请选择代理商等级" clearable >
|
|
|
- <el-option
|
|
|
- v-for="item in agentLevelList"
|
|
|
- :key="item.level"
|
|
|
- :label="item.name"
|
|
|
- :value="item.level"
|
|
|
- :disabled="item.isNone == 1"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
- </el-form-item> -->
|
|
|
<el-form-item label="代理商等级" prop="agentLevel" v-if="form.isPid == 0 || this.title == '添加代理商'">
|
|
|
<el-select v-model="form.agentLevel" placeholder="请选择代理商等级" clearable >
|
|
|
<el-option
|
|
@@ -259,7 +243,8 @@
|
|
|
</el-form-item> -->
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ {{this.subLoading}}
|
|
|
+ <el-button type="primary" @click="submitForm" :loading="subLoading">确 定</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -280,6 +265,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ subLoading: false,
|
|
|
// 登录用户
|
|
|
user: {},
|
|
|
maxRate: '',
|
|
@@ -588,17 +574,26 @@ export default {
|
|
|
this.form.provinceName = this.startArea.provinceName
|
|
|
this.form.cityName = this.startArea.cityName
|
|
|
this.form.districtName = this.startArea.districtName
|
|
|
+
|
|
|
+ // 不允许重复提交
|
|
|
+ this.subLoading = true
|
|
|
if (this.form.id != null) {
|
|
|
updateAgent(this.form).then(response => {
|
|
|
this.msgSuccess("修改成功");
|
|
|
+ this.subLoading = false
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
+ }).catch((error) => {
|
|
|
+ this.subLoading = true
|
|
|
});
|
|
|
} else {
|
|
|
addAgent(this.form).then(response => {
|
|
|
this.msgSuccess("新增成功");
|
|
|
+ this.subLoading = false
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
|
+ }).catch((error) => {
|
|
|
+ this.subLoading = true
|
|
|
});
|
|
|
}
|
|
|
}
|