Commit 172ca21d authored by rencs's avatar rencs

8.28 bug

parent 8560d93a
......@@ -98,7 +98,11 @@
<span slot="footer" class="dialog-footer">
<el-button @click="add_edit_dialog = false">取 消</el-button>
<el-button type="primary" @click="add_company_ok('company_form')">确 定</el-button>
<el-button
type="primary"
:disabled="btn_disable"
@click="add_company_ok('company_form')"
>确 定</el-button>
</span>
</el-dialog>
</div>
......@@ -193,6 +197,7 @@ export default {
mobile: "",
businessLicense: "",
},
btn_disable: null,
};
},
created() {
......@@ -208,7 +213,9 @@ export default {
add_company_ok(formname) {
this.$refs[formname].validate((valid) => {
if (valid) {
this.btn_disable = true;
if (this.title_text == "编辑公司") {
let that = this;
upd_company(this.company_form).then((res) => {
if (res.status == 200) {
this.$message({
......@@ -216,12 +223,14 @@ export default {
type: "success",
});
this.add_edit_dialog = false;
this.handleFilter();
} else {
this.$error({
message: res.message,
});
}
that.btn_disable = null;
});
return;
}
......@@ -310,11 +319,16 @@ export default {
this.add_edit_dialog = true;
this.title_text = "添加公司";
this.form_clear();
this.$nextTick(() => {
this.$refs["company_form"].clearValidate();
});
},
edit_item(row) {
this.add_edit_dialog = true;
this.title_text = "编辑公司";
this.$nextTick(() => {
this.$refs["company_form"].clearValidate();
});
this.company_form = {
id: row.id,
name: row.name,
......
......@@ -360,6 +360,7 @@ export default {
keyword: "",
location: "",
clientHeight: 500, // 屏幕高度
btn_disable: null,
};
},
......@@ -457,6 +458,7 @@ export default {
add_store_ok(formname) {
this.$refs[formname].validate((valid) => {
if (valid) {
this.btn_disable = true;
let addr_province = undefined;
let addr_city = undefined;
let addr_county = undefined;
......@@ -493,6 +495,7 @@ export default {
latitude: this.store_form.latitude, //纬度
longitude: this.store_form.longitude, //经度
};
let that = this;
add_store(data).then((res) => {
if (res.status == 200) {
this.$message({
......@@ -507,6 +510,7 @@ export default {
message: res.message,
});
}
that.btn_disable = null;
});
} else {
return false;
......@@ -657,6 +661,8 @@ export default {
let _this = this;
gc.getLocation(point, function (rs) {
var addComp = rs.addressComponents;
_this.changeProvince(rs.addressComponents.province);
_this.changeCity(rs.addressComponents.city);
_this.store_form.province = rs.addressComponents.province;
_this.store_form.city = rs.addressComponents.city;
if (rs.addressComponents && rs.addressComponents != "") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment