Просмотр исходного кода

Merge branch 'mergeBranch' into orangeUrgent

qymljy 1 год назад
Родитель
Сommit
a2b712974b

+ 2 - 2
src/HDrpManagement/competitor/detail/modules/addressManage/list.vue

@@ -3,7 +3,7 @@
     <div >
       <add v-if="tool.checkAuth($route.name,'addressManage')" class="inline-16" :data="data" @insertSuccess="onSuccess" ></add>
       <el-input
-          placeholder="请输入内容"
+          placeholder="搜索"
           v-model="search"
           clearable
           style="width:200px"
@@ -129,4 +129,4 @@ export default {
 }
 
 
-</style>
+</style>

+ 22 - 4
src/HDrpManagement/competitor/detail/modules/addressManage/modules/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="onshow">新增客户地址</el-button>
+    <el-button size="small" type="primary" @click="onshow">新</el-button>
     <el-drawer
         title=" 新建客户地址"
         :visible.sync="dialogFormVisible"
@@ -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
@@ -66,13 +76,15 @@
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="onCancel" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" :disabled="value.length === 0 && form.address === ''" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
+        <el-button size="small"  :loading="loading" type="primary" @click="onSubmit" class="normal-btn-width">确 定</el-button>
       </div>
     </el-drawer>
   </div>
 </template>
 
 <script>
+import {mapGetters} from "vuex";
+
 export default {
   name: "add",
   props:["data"],
@@ -110,6 +122,11 @@ export default {
       typeData:[]
     }
   },
+  computed:{
+    ...mapGetters({
+      loading:'loading'
+    })
+  },
   methods:{
     onshow(){
       this.form.sys_enterpriseid = this.data.sys_enterpriseid
@@ -119,13 +136,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("insertSuccess")
           this.$refs['form'].resetFields()
+          this.$store.commit('setLoading',false)
           this.form = {
             contactsid: 0,
             sys_enterpriseid: "",
@@ -223,4 +241,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 22 - 10
src/HDrpManagement/competitor/detail/modules/addressManage/modules/edit.vue

@@ -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>

+ 1 - 1
src/HDrpManagement/publicCustomer/modules/detail/addressManage/modules/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="onshow">新增客户地址</el-button>
+    <el-button size="small" type="primary" @click="onshow">新增客新建户地址</el-button>
     <el-drawer
         title=" 新建客户地址"
         :visible.sync="dialogFormVisible"

+ 2 - 2
src/SDrpManagement/QuotedPrice/detail/modules/addressManage/modules/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="mini" type="primary" @click="onshow">新增客户地址</el-button>
+    <el-button size="mini" type="primary" @click="onshow">新</el-button>
     <el-dialog
         :visible.sync="dialogFormVisible"
         width="900px"
@@ -114,4 +114,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 3 - 3
src/SDrpManagement/salerPrivatecustomer/detail/modules/addressManage/modules/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="onshow">新增客户地址</el-button>
+    <el-button size="small" type="primary" @click="onshow">新</el-button>
     <el-drawer
         title=" 新建客户地址"
         :visible.sync="dialogFormVisible"
@@ -14,12 +14,12 @@
           <el-form :model="form" :rules="rules"  ref="form"  size="mini" label-position="right" label-width="90px">
             <el-col :span="24">
               <el-form-item  label="联系人:" prop="name">
-                <el-input  rows="2" v-model="form.name" placeholder="请输入联系人"></el-input>
+                <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  rows="2" v-model="form.phonenumber" placeholder="请输入联系电话"></el-input>
+                <el-input   v-model="form.phonenumber" placeholder="请输入联系电话"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="24">

+ 0 - 11
src/SDrpManagement/salerPrivatecustomer/detail/modules/addressManage/modules/edit.vue

@@ -138,18 +138,7 @@ export default {
   },
   methods:{
     onshow(){
-      console.log(this.data,"编辑数据")
       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.value[0] = this.data.province
-      // this.form.value[1] = this.data.city
-      // this.form.value[2] = this.data.county
       this.form = Object.assign({},this.form,this.data)
       if (this.form.isdefault === 0){
         this.form.isdefault = '0'