Bladeren bron

收款账号问题

Shannon_mu 2 jaren geleden
bovenliggende
commit
58426013c9

+ 162 - 194
operationSupport/src/views/payService/collection/index.vue

@@ -1,211 +1,179 @@
 <template>
-  <div class="main">
-    <div class="search">
-      <dmp-newsearch
-        :normal="normal"
-        :query="mixins_query"
-        @search="queryList"
-      >
-        <template slot="companyOrgId">
-          <select-tree
-            class="new-select-tree"
-            selectTreeTitle="请选择公司"
-            placeholder="请选择公司"
-            :options="companyArray"
-            :props="defaultProps"
-            v-model="mixins_query.companyOrgId"
-          />
-        </template>
-        <div
-          class="search-icon opt"
-          slot="right-opt"
-        >
-          <el-tooltip
-            class="item"
-            effect="light"
-            placement="bottom"
-            content="新增"
-          >
-            <i
-              class="zoniot_font zoniot-icon-tianjia2"
-              @click="addOrEdit('add')"
-            ></i>
-          </el-tooltip>
+    <div class="main">
+        <div class="search">
+            <dmp-newsearch :normal="normal" :query="mixins_query" @search="queryList">
+                <template slot="companyOrgId">
+                    <select-tree
+                        class="new-select-tree"
+                        selectTreeTitle="请选择公司"
+                        placeholder="请选择公司"
+                        :options="companyArray"
+                        :props="defaultProps"
+                        v-model="mixins_query.companyOrgId"
+                    />
+                </template>
+                <div class="search-icon opt" slot="right-opt">
+                    <el-tooltip class="item" effect="light" placement="bottom" content="新增">
+                        <i class="zoniot_font zoniot-icon-tianjia2" @click="addOrEdit('add')"></i>
+                    </el-tooltip>
+                </div>
+            </dmp-newsearch>
         </div>
-      </dmp-newsearch>
-    </div>
-    <div class="roles-wrap">
-      <zz-table
-        :cols="cols"
-        :settings="{ showIndex: true, stripe: true }"
-        :loading="mixins_onQuery"
-        :data="mixins_list"
-        :pageset="mixins_pageset"
-        @page-change="pageChange"
-      >
-        <template
-          slot-scope="scope"
-          slot="opt"
-        >
-          <div class="opt">
-            <el-tooltip
-              effect="light"
-              placement="bottom"
-              content="编辑"
-            >
-              <i
-                class="zoniot_font zoniot-icon-bianji"
-                @click="addOrEdit('edit', scope.row)"
-              ></i>
-            </el-tooltip>
-            <el-tooltip
-              effect="light"
-              placement="bottom"
-              content="删除"
+        <div class="roles-wrap">
+            <zz-table
+                :cols="cols"
+                :settings="{ showIndex: true, stripe: true }"
+                :loading="mixins_onQuery"
+                :data="mixins_list"
+                :pageset="mixins_pageset"
+                @page-change="pageChange"
             >
-              <i
-                class="zoniot_font zoniot-icon-shanchu redText"
-                @click="deluserbyidFn(scope.row.id)"
-              ></i>
-            </el-tooltip>
-          </div>
-        </template>
-      </zz-table>
+                <template slot-scope="scope" slot="opt">
+                    <div class="opt">
+                        <el-tooltip effect="light" placement="bottom" content="编辑">
+                            <i class="zoniot_font zoniot-icon-bianji" @click="addOrEdit('edit', scope.row)"></i>
+                        </el-tooltip>
+                        <el-tooltip effect="light" placement="bottom" content="删除">
+                            <i class="zoniot_font zoniot-icon-shanchu redText" @click="deluserbyidFn(scope.row.id)"></i>
+                        </el-tooltip>
+                    </div>
+                </template>
+            </zz-table>
+        </div>
     </div>
-  </div>
 </template>
 
 <script>
 import list from '@utils/list.js';
 export default {
-  mixins: [list],
-  name: 'collection',
-  data () {
-    return {
-      cols: [
-        {
-          label: '公司名称',
-          prop: 'companyName'
-        },
-        {
-          label: '类型',
-          prop: 'payeeType',
-          format (val) {
-            if (val == '7') {
-              return '微信';
-            } else if (val == '2') {
-              return '支付宝';
-            }
-          }
-        },
-        {
-          label: '商户号',
-          prop: 'merchantNumber'
-        },
-        {
-          label: '支付密钥',
-          prop: 'paymentSecretKey'
-        },
-        {
-          label: '应用ID',
-          prop: 'appId'
-        },
-        {
-          label: '应用密钥',
-          prop: 'appSecretKey'
-        },
-        {
-          label: '操作',
-          width: '80',
-          slot: 'opt'
-        }
-      ],
-      defaultProps: {
-        value: 'id', // 唯一标识
-        label: 'orgName', // 标签显示
-        children: 'orgs' // 子级
-      },
-      normal: [
-        {
-          prop: 'companyOrgId',
-          slot: 'companyOrgId'
-        }
-      ],
-      mixins_post: 'get'
-    };
-  },
-  computed: {
-    companyArray () {
-      return this.$store.getters['getCompanyArray'];
-    }
-  },
-  created () {
-    if (this.$store.getters['getCompanyArray'].length === 0) {
-      this.getCompany('company');
-    }
-    if (this.$store.getters['getDepartmentArray'].length === 0) {
-      this.getCompany('department');
-    }
-    this.mixins_dataUrl = '/sc-charge/payee/account/page';
-    this.mixins_query = {};
-    this.mixins_search();
-  },
-  mounted () { },
-  methods: {
-    queryList (type = 'search') {
-      this.mixins_search(type);
+    mixins: [list],
+    name: 'collection',
+    data() {
+        return {
+            cols: [
+                {
+                    label: '公司名称',
+                    prop: 'companyName'
+                },
+                {
+                    label: '类型',
+                    prop: 'payeeType',
+                    format(val) {
+                        if (val == '1') {
+                            return '微信';
+                        } else if (val == '2') {
+                            return '支付宝';
+                        }
+                    }
+                },
+                {
+                    label: '商户号',
+                    prop: 'merchantNumber'
+                },
+                {
+                    label: '支付密钥',
+                    prop: 'paymentSecretKey'
+                },
+                {
+                    label: '应用ID',
+                    prop: 'appId'
+                },
+                {
+                    label: '应用密钥',
+                    prop: 'appSecretKey'
+                },
+                {
+                    label: '操作',
+                    width: '80',
+                    slot: 'opt'
+                }
+            ],
+            defaultProps: {
+                value: 'id', // 唯一标识
+                label: 'orgName', // 标签显示
+                children: 'orgs' // 子级
+            },
+            normal: [
+                {
+                    prop: 'companyOrgId',
+                    slot: 'companyOrgId'
+                }
+            ],
+            mixins_post: 'get'
+        };
     },
-    getCompany (type) {
-      this.$http.postForm('/sc-user-center/org/getOrgTree', { orgType: type }).then(({ status, data, msg }) => {
-        if (status === 0 && data) {
-          if (type == 'company') {
-            this.$store.commit('setCompanyArray', data);
-          } else if (type == 'department') {
-            this.$store.commit('setDepartmentArray', data);
-          }
+    computed: {
+        companyArray() {
+            return this.$store.getters['getCompanyArray'];
         }
-      });
     },
-    deluserbyidFn (id) {
-      this.$msgBox(`删除`, '删除后将无法恢复,请问是否继续?')
-        .then(() => {
-          this.$http.get('/sc-charge/payee/account/delete?id=' + id).then(({ status, data, msg }) => {
-            if (0 === status) {
-              this.$message({
-                type: 'success',
-                message: '删除成功!'
-              });
-              this.mixins_search();
-            } else {
-              this.$message.error(msg);
-            }
-          });
-        })
-        .catch(() => { });
-    },
-    addOrEdit (todo, data = {}) {
-      new Promise((resolve) => {
-        let title = '添加收款账号';
-        if (todo == 'add') {
-        } else {
-          title = '修改收款账号';
+    created() {
+        if (this.$store.getters['getCompanyArray'].length === 0) {
+            this.getCompany('company');
+        }
+        if (this.$store.getters['getDepartmentArray'].length === 0) {
+            this.getCompany('department');
         }
-        this.$store.dispatch('addPopup', {
-          url: '/payService/collection/stepPage/add.vue',
-          width: '524px',
-          height: '600px',
-          props: {
-            data,
-            todo,
-            companyArray: this.companyArray,
-            callback: resolve
-          },
-          title: title
-        });
-      }).then(() => {
+        this.mixins_dataUrl = '/sc-charge/payee/account/page';
+        this.mixins_query = {};
         this.mixins_search();
-      });
+    },
+    mounted() {},
+    methods: {
+        queryList(type = 'search') {
+            this.mixins_search(type);
+        },
+        getCompany(type) {
+            this.$http.postForm('/sc-user-center/org/getOrgTree', { orgType: type }).then(({ status, data, msg }) => {
+                if (status === 0 && data) {
+                    if (type == 'company') {
+                        this.$store.commit('setCompanyArray', data);
+                    } else if (type == 'department') {
+                        this.$store.commit('setDepartmentArray', data);
+                    }
+                }
+            });
+        },
+        deluserbyidFn(id) {
+            this.$msgBox(`删除`, '删除后将无法恢复,请问是否继续?')
+                .then(() => {
+                    this.$http.get('/sc-charge/payee/account/delete?id=' + id).then(({ status, data, msg }) => {
+                        if (0 === status) {
+                            this.$message({
+                                type: 'success',
+                                message: '删除成功!'
+                            });
+                            this.mixins_search();
+                        } else {
+                            this.$message.error(msg);
+                        }
+                    });
+                })
+                .catch(() => {});
+        },
+        addOrEdit(todo, data = {}) {
+            new Promise((resolve) => {
+                let title = '添加收款账号';
+                if (todo == 'add') {
+                } else {
+                    title = '修改收款账号';
+                }
+                this.$store.dispatch('addPopup', {
+                    url: '/payService/collection/stepPage/add.vue',
+                    width: '524px',
+                    height: '600px',
+                    props: {
+                        data,
+                        todo,
+                        companyArray: this.companyArray,
+                        callback: resolve
+                    },
+                    title: title
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
+        }
     }
-  }
 };
 </script>

+ 1 - 1
operationSupport/src/views/payService/collection/stepPage/add.vue

@@ -13,7 +13,7 @@
         </template>
         <template slot="payeeType">
             <el-select class="width65" v-model="formData.payeeType" clearable>
-                <el-option label="微信" :value="7"></el-option>
+                <el-option label="微信" :value="1"></el-option>
                 <el-option label="支付宝" :value="2"></el-option>
             </el-select>
         </template>

+ 7 - 7
operationSupport/vue.config.js

@@ -35,8 +35,8 @@ module.exports = {
             });
 
         // // 配置每次打包浏览器缓存文件名的随机性
-        const filename = path.posix.join('js', `${new Date().getTime()}_[name].js`);
-        config.mode('production').devtool(false).output.filename(filename).chunkFilename(filename);
+        // const filename = path.posix.join('js', `${new Date().getTime()}_[name].js`);
+        // config.mode('production').devtool(false).output.filename(filename).chunkFilename(filename);
     },
     // 配置全局样式变量
     css: {
@@ -60,11 +60,11 @@ module.exports = {
             //     }
             // })
         },
-        extract: {
-            // 打包后css文件名称添加时间戳
-            filename: `css/[name].${new Date().getTime()}.css`,
-            chunkFilename: `css/chunk.[id].${new Date().getTime()}.css`
-        }
+        // extract: {
+        //     // 打包后css文件名称添加时间戳
+        //     filename: `css/[name].${new Date().getTime()}.css`,
+        //     chunkFilename: `css/chunk.[id].${new Date().getTime()}.css`
+        // }
     },
     configureWebpack: {
         externals: {