|
|
@@ -12,6 +12,16 @@
|
|
|
<div class="drawer__panel">
|
|
|
<el-row :gutter="20">
|
|
|
<el-form :model="form" :rules="rules" ref="form" size="mini" label-position="right" label-width="75px">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="联系人:" prop="name">
|
|
|
+ <el-input v-model="form.name" placeholder="请输入联系人"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="联系方式:" prop="phonenumber">
|
|
|
+ <el-input v-model="form.phonenumber" placeholder="请输入联系方式"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="省市县:" >
|
|
|
<el-cascader
|
|
|
@@ -64,7 +74,7 @@
|
|
|
</el-row>
|
|
|
<div class="fixed__btn__panel">
|
|
|
<el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">取 消</el-button>
|
|
|
- <el-button size="small" type="warning" @click="onSubmit" class="normal-btn-width">确 定</el-button>
|
|
|
+ <el-button size="small" type="warning" :loading="loading" @click="onSubmit" class="normal-btn-width">确 定</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
@@ -72,6 +82,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import {mapGetters} from "vuex";
|
|
|
+
|
|
|
export default {
|
|
|
name: "edit",
|
|
|
props:["data"],
|
|
|
@@ -110,16 +122,15 @@ export default {
|
|
|
typeData:[]
|
|
|
}
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ ...mapGetters({
|
|
|
+ loading:'loading'
|
|
|
+ })
|
|
|
+ },
|
|
|
methods:{
|
|
|
onshow(){
|
|
|
this.dialogFormVisible = true
|
|
|
- this.form.sys_enterpriseid = this.data.sys_enterpriseid
|
|
|
- this.form.contactsid = this.data.contactsid
|
|
|
- this.form.remarks = this.data.remarks
|
|
|
- this.form.address = this.data.address
|
|
|
- this.form.province = this.data.province
|
|
|
- this.form.city = this.data.city
|
|
|
- this.county = this.data.county
|
|
|
+ this.form = Object.assign({},this.form,this.data)
|
|
|
this.form.value[0] = this.data.province
|
|
|
this.form.value[1] = this.data.city
|
|
|
this.form.value[2] = this.data.county
|
|
|
@@ -134,13 +145,14 @@ export default {
|
|
|
onSubmit(){
|
|
|
this.$refs['form'].validate(async (valid) => {
|
|
|
if (!valid) return false
|
|
|
+ this.$store.commit('setLoading',true)
|
|
|
const res = await this.$api.requested({
|
|
|
"id": "20221018141802",
|
|
|
"content": this.form
|
|
|
})
|
|
|
this.tool.showMessage(res,() => {
|
|
|
- this.$emit("updateSuccess")
|
|
|
this.$refs['form'].resetFields()
|
|
|
+ this.$store.commit('setLoading',false)
|
|
|
this.dialogFormVisible = false
|
|
|
if (this.typeData !== ''){
|
|
|
this.setTag(this.form.contactsid)
|
|
|
@@ -192,4 +204,4 @@ export default {
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
-</style>
|
|
|
+</style>
|