liujq 3 лет назад
Родитель
Сommit
7c42a074a1

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/index.html


+ 0 - 0
dist/static/css/chunk-9f050880.4d0a9fd9.css → dist/static/css/chunk-d5ce7d10.4d0a9fd9.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/js/app.14c08e85.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/js/app.a0d17e31.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/js/chunk-9f050880.23afcdb8.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
dist/static/js/chunk-d5ce7d10.af796ebd.js


+ 3 - 0
src/api/user.js

@@ -97,4 +97,7 @@ export default {
   admsaleuserdel: params => { // 销售列表 删除
     return getRequestNoSort('/adm/sale/user/del', params, 'loading')
   },
+  admsaleuseredit: params => { // 销售列表 编辑
+    return getRequestNoSort('/adm/sale/user/edit', params, 'loading')
+  },
 }

+ 3 - 5
src/views/user/appSale.vue

@@ -12,8 +12,6 @@
       :page-size="pageSize"
       :total-records="totalRecords"
       @currentChange="pageHandle"
-      :isAdd="true"
-      @add="openPopup"
     />
     <popup-edit
       :isShow="isDtlShow"
@@ -25,7 +23,7 @@
 <script>
 import { arrToObj } from '@/utils'
 import SearchForm from './components/searchForm/AppSale'
-import PopupEdit from './components/popup/IREdit'
+import PopupEdit from './components/popup/AppSaleEdit'
 import baseTable from '_m/baseTable.js'
 export default {
   name: 'index',
@@ -67,9 +65,9 @@ export default {
         { label: '微信头像', prop: 'avatar', type: 'img' },
         { label: '微信电话', prop: 'phone' },
         { label: '更新时间', prop: 'update_at' },
-        { label: '操作', width: 100, type: 'handle2', operations:
+        { label: '操作', width: 200, type: 'handle2', operations:
           [
-            // { label: '编辑', func: this.openPopup, btnType: 'primary' },
+            { label: '编辑', func: this.openPopup, btnType: 'primary' },
             { label: '删除', func: this.delHandle, btnType: 'danger' },
           ]
         }

+ 84 - 0
src/views/user/components/popup/AppSaleEdit.vue

@@ -0,0 +1,84 @@
+<template>
+  <div>
+    <el-dialog
+      v-loading="loading"
+      :show-close="false"
+      :close-on-click-modal="false"
+      :visible.sync="isShow"
+      :title="this.curObj && this.curObj.id ? '编辑置业' : '添加置业'"
+      :fullscreen="false"
+      width="470px"
+      custom-class="xl-dialog"
+      center
+    >
+      <base-form ref="ruleForm" :data="formData" :is-inline="false" label-width="110px">
+        <div slot="footer">
+          <el-button class="xl-form-btn t2" @click="close">关 闭</el-button>
+          <el-button class="xl-form-btn t1" @click="close('confirm')">确定</el-button>
+        </div>
+      </base-form>
+    </el-dialog>
+  </div>
+</template>
+<script>
+export default {
+  components: {},
+  mixins: [...mixins],
+  props: {
+    isShow: Boolean,
+    curObj: Object
+  },
+  inject: ['parentData'],
+  data() {
+    return {
+      formData: [],
+      loading: true,
+      cObj: {},
+      isShowMap: false
+    }
+  },
+  watch: {
+    isShow: function(val) {
+      if (val) {
+        this.getDef()
+      }
+    },
+  },
+  methods: {
+    getDef() {
+      const params = { ...this.curObj }
+      this.formData = [
+        { label: '置业经理', key: 'sale_name', rules: 1 },
+        { label: '头像', key: 'sale_avatar', type: 'uploads', rules: 1 },
+        { label: '联系电话', key: 'sale_phone', class: 'c-2', rules: 1 },
+        { label: '销售标签', key: 'custom_tag', class: 'c-2', rules: 1 },
+      ]
+      this.setDefaultValue(params)
+    },
+    close(str) {
+      if (str === 'confirm') {
+        this.$refs['ruleForm'].$refs['baseForm'].validate((valid) => {
+          if (valid) {
+            const oldform = this.$refs.ruleForm.baseForm
+            let newForm = { ...oldform }
+            let apiStr = 'admsaleuseredit'
+            if (this.curObj.id) {
+              apiStr = 'admsaleuseredit'
+              newForm.id = this.curObj.id
+            }
+            this.$api.user[apiStr](newForm).then(data => {
+              this.$msgs(this.curObj.id ? '编辑成功' : '新增成功')
+              this.$emit('close', newForm)
+            })
+          }
+        })
+      } else {
+        this.$emit('close')
+        this.setDefaultValue()
+      }
+    },
+  }
+}
+</script>
+<style lang="scss" scoped>
+</style>

Некоторые файлы не были показаны из-за большого количества измененных файлов