ソースを参照

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

QuKatie 3 年 前
コミット
68d18a6b8b

+ 33 - 2
src/api/base/credentials.js

@@ -1,13 +1,14 @@
 import request from '@/router/axios';
 
 //凭证配置列表
-export function customerList(data,moduleName) {
+export function customerList(data,module,accountId) {
     return request({
         url: 'api/trade-finance/jdmodule/list',
         method: 'get',
         params: {
             ...data,
-            moduleName
+            module,
+            accountId
         }
     })
 }
@@ -18,3 +19,33 @@ export const getDeptLazyTree = () => {
         method: 'get'
     })
 }
+//获取
+export const getAccountList = () => {
+    return request({
+        url: 'api/trade-finance/settlement/getAccountList',
+        method: 'get'
+    })
+}
+//列删除
+export const jdmoduleDelete = (id) => {
+    return request({
+        url: 'api/trade-finance/jdmodule/delete?id='+id,
+        method: 'post'
+    })
+}
+//修改单据
+export const jdmoduleUpdate = (data) => {
+    return request({
+        url: 'api/trade-finance/jdmodule/update',
+        method: 'post',
+        data:data
+    })
+}
+//新增单据
+export const jdmoduleSave = (data) => {
+    return request({
+        url: 'api/trade-finance/jdmodule/save',
+        method: 'post',
+        data:data
+    })
+}

+ 35 - 0
src/api/system/configurationLedger.js

@@ -0,0 +1,35 @@
+import request from '@/router/axios';
+
+//凭证配置列表
+export function customerList(data) {
+    return request({
+        url: 'api/trade-finance/jdtenant/list',
+        method: 'get',
+        params: {
+            ...data,
+        }
+    })
+}
+//列删除
+export const jdmoduleDelete = (id) => {
+    return request({
+        url: 'api/trade-finance/jdtenant/remove?ids='+id,
+        method: 'post'
+    })
+}
+//新增单据
+export const jdmoduleSave = (data) => {
+    return request({
+        url: 'api/trade-finance/jdtenant/save',
+        method: 'post',
+        data:data
+    })
+}
+//修改单据
+export const jdmoduleUpdate = (data) => {
+    return request({
+        url: 'api/trade-finance/jdtenant/update',
+        method: 'post',
+        data:data
+    })
+}

+ 196 - 52
src/views/base/credentials.vue

@@ -1,35 +1,51 @@
 <template>
   <div>
-    <basic-container style="width: 20%;float: left">
+    <basic-container style="width: 25%;float: left">
+      <avue-tree :option="getList" :data="accountList" @node-click="nodeClickTwo"/>
+    </basic-container>
+    <basic-container style="width: 15%;float: left">
       <avue-tree :option="treeOption" :data="treeData" @node-click="nodeClick"/>
     </basic-container>
-    <basic-container style="width: 80%;float: right">
+    <basic-container style="width: 60%;float: right">
       <avue-crud
           :data="data"
           :option="option"
           :page.sync="page"
           @on-load="onLoad"
+          @row-del="rowDel"
+          @row-save="rowSave"
+          @row-update="rowUpdate"
+          @search-change="searchChange"
+          @search-reset="searchReset"
           @refresh-change="refreshChange"
       ></avue-crud>
     </basic-container>
   </div>
 </template>
 <script>
-import {customerList,getDeptLazyTree} from '@/api/base/credentials'
+import {
+  customerList,
+  getAccountList,
+  getDeptLazyTree,
+  jdmoduleDelete,
+  jdmoduleSave,
+  jdmoduleUpdate
+} from '@/api/base/credentials'
+
 export default {
   name: "credentials",
   data() {
     return {
       page: {
         size: 10,
-        current:1
+        current: 1
       },
       treeData: [],
+      accountList: [],
       treeOption: {
         nodeKey: 'id',
         lazy: true,
         treeLoad: function (node, resolve) {
-          console.log(node)
           const parentId = (node.level === 0) ? 0 : node.data.id;
           getDeptLazyTree(parentId).then(res => {
             resolve(res.data.data.map(item => {
@@ -50,10 +66,37 @@ export default {
           children: 'children'
         }
       },
+      getList: {
+        nodeKey: 'id',
+        lazy: true,
+        treeLoad: function (node, resolve) {
+          const parentId = (node.level === 0) ? 0 : node.data.id;
+          getAccountList(parentId).then(res => {
+            resolve(res.data.data.map(item => {
+              return {
+                ...item,
+                leaf: !item.hasChildren
+              }
+            }))
+          });
+        },
+        addBtn: false,
+        menu: false,
+        size: 'small',
+        props: {
+          labelText: '标题',
+          label: 'accountName',
+          value: 'accountId',
+          children: 'children'
+        }
+      },
       data: [],
-      treeDeptName:'',
+      treeDeptName: '',
+      accountId: '',
       option: {
-        addBtn: false,
+        searchMenuPosition: "right",
+        searchMenuSpan: 18,
+        index: true,
         align: 'center',
         menuAlign: 'center',
         column: [
@@ -65,72 +108,173 @@ export default {
             props: {
               label: "dictValue",
               value: "dictValue"
-            },
-            search:true
-          },
-          {
-            label: '币种代码',
-            prop: 'dc'
-          },
-          {
-            label: '币种名称',
-            prop: 'projectCode'
+            }
           },
           {
+            label: '业务币种',
+            display: false,
+            children: [{
+              label: '币种代码',
+              prop: 'currencyCode',
+              type: "select",
+              dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
+              props: {
+                label: "dictValue",
+                value: "dictValue"
+              },
+              rules: [{
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }],
+              search: true
+            }, {
+              label: '币种名称',
+              prop: 'currency',
+              rules: [{
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }]
+            }]
+          }, {
             label: '凭证类型',
-            prop: 'projectName'
-          },
-          {
-            label: '类型名称',
-            prop: 'accountName'
-          },
-          {
-            label: '分录类型',
-            prop: 'accountName'
-          },
-          {
-            label: '科目代码',
-            prop: 'accountName'
-          },
-          {
-            label: '科目名称',
-            prop: 'accountName'
-          },
-          {
+            display: false,
+            children: [{
+              label: '凭证类型',
+              prop: 'voucherType',
+              rules: [{
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }]
+            }, {
+              label: '凭证名称',
+              prop: 'voucher',
+              rules: [{
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }]
+            }]
+          }, {
+            label: '分录',
+            display: false,
+            children: [{
+              label: '分录类型',
+              prop: 'projectType',
+              rules: [{
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }]
+            }, {
+              label: '科目代码',
+              prop: 'projectCode',
+              rules: [{
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }]
+            }, {
+              label: '科目名称',
+              prop: 'projectName',
+              rules: [{
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }]
+            }]
+          }, {
             label: '金额方向',
-            prop: 'accountName'
-          },
-          {
-            label: '静态值',
-            prop: 'accountName'
-          },
-          {
-            label: '附加公司',
-            prop: 'accountName'
+            prop: 'accountName',
+            rules: [{
+              required: true,
+              message: " ",
+              trigger: "blur"
+            }]
+          }, {
+            label: '摘要',
+            display: false,
+            children: [{
+              label: '静态值',
+              prop: 'abstractStatic',
+              rules: [{
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }]
+            }, {
+              label: '附加公式',
+              prop: 'abstractFormula'
+            }]
           }
         ]
       }
     }
   },
   methods: {
-    onLoad(page) {
-      customerList({size: page.size,current: page.current},this.treeDeptName).then(res=>{
-        console.log(res)
+    //列表查询
+    onLoad(page, params) {
+      if (!this.accountId) return this.$message.warning('请选择套账')
+      customerList({...params, size: page.size, current: page.current}, this.treeDeptName, this.accountId).then(res => {
         this.data = res.data.data.records
         this.page.total = res.data.data.total
       })
     },
+    // 模块名称选中后触发列表查询
     nodeClick(data) {
-      console.log(data)
       this.treeDeptName = data.dictValue;
       this.page.currentPage = 1;
       this.onLoad(this.page);
     },
-    refreshChange(){
-      this.onLoad(this.page)
+    // 套账选中后触发列表查询
+    nodeClickTwo(data) {
+      this.accountId = data.accountId
+      this.page.currentPage = 1;
+      this.onLoad(this.page);
+    },
+    //刷新按钮触发
+    refreshChange() {
+      this.onLoad(this.page);
+    },
+    //表单搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done()
+    },
+    //清空
+    searchReset() {
+      this.page.currentPage = 1;
+      this.treeDeptName = this.accountId = ''
+      this.onLoad(this.page);
+    },
+    //新增
+    rowSave(row, done, loading) {
+      jdmoduleSave(row).then(() => {
+        this.$message.success('新增成功');
+        loading()
+        done()
+      })
+    },
+    //编辑
+    rowUpdate(row, index, done, loading) {
+      jdmoduleUpdate(row).then(() => {
+        this.$message.success('修改成功');
+        this.onLoad(this.page);
+        loading()
+        done()
+      })
+    },
+    //删除
+    rowDel(row, index, done) {
+      jdmoduleDelete(row.id).then(() => {
+        this.$message.success('删除成功');
+        done()
+      })
     }
   }
-
 }
 </script>
 

+ 0 - 1
src/views/basicData/basicStorageType/index.vue

@@ -118,7 +118,6 @@ export default {
     },
     //新增子项和新增触发查询所有
     beforeOpen(done, type) {
-      console.log('1111')
       if (["add", "edit"].includes(type)) {
         this.initData();
       }

+ 0 - 1
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -1001,7 +1001,6 @@ export default {
     },
     //费用编辑导入触发
     choiceCost() {
-      console.log('1111')
       if (this.tableDataCost.length === 1) {
         this.advantageProjectData[this.choiceIndex].feeName = this.tableDataCost[0].cname
         this.advantageProjectData[this.choiceIndex].itemId = this.tableDataCost[0].id

+ 0 - 1
src/views/mallManagement/commodity/productList/index.vue

@@ -266,7 +266,6 @@ export default {
       this.onLoad(this.page);
     },
     searchChange(params, done) {
-      console.log('1111')
       this.query = params;
       this.page.currentPage = 1;
       this.onLoad(this.page, params);

+ 121 - 0
src/views/system/configurationLedger.vue

@@ -0,0 +1,121 @@
+<template>
+  <basic-container>
+    <avue-crud
+        :data="data"
+        :option="option"
+        :page.sync="page"
+        @on-load="onLoad"
+        @row-del="rowDel"
+        @row-save="rowSave"
+        @row-update="rowUpdate"
+        @search-change="searchChange"
+        @refresh-change="refreshChange"
+    ></avue-crud>
+  </basic-container>
+</template>
+
+<script>
+import {customerList,jdmoduleDelete, jdmoduleSave, jdmoduleUpdate} from "@/api/system/configurationLedger";
+
+export default {
+  name: "configurationLedger",
+  data() {
+    return {
+      data:[],
+      page: {
+        size: 10,
+        current:1
+      },
+      option: {
+        index: true,
+        searchMenuPosition: "right",
+        searchMenuSpan: 12,
+        align: 'center',
+        menuAlign: 'center',
+        column: [
+          {
+            label: "所属租户",
+            prop: "tenantId",
+            type: "tree",
+            dicUrl: "/api/blade-system/tenant/select",
+            props: {
+              label: "tenantName",
+              value: "tenantId"
+            },
+            search:true,
+            rules: [{
+              required: true,
+              message: " ",
+              trigger: "click"
+            }]
+          },{
+            label: '账户名称',
+            prop: 'accountName',
+            search:true
+          },{
+            label: '客户ID',
+            prop: 'clientId'
+          },{
+            label: '客户密钥',
+            prop: 'clientSecret'
+          },{
+            label: '客户帐号',
+            prop: 'username'
+          },{
+            label: '帐号密码',
+            prop: 'password'
+          }
+        ]
+      }
+    }
+  },
+  methods:{
+    //列表查询
+    onLoad(page,params) {
+      customerList({...params,size: page.size,current: page.current}).then(res=>{
+        this.data = res.data.data.records
+        this.page.total = res.data.data.total
+      })
+    },
+    //刷新按钮触发
+    refreshChange(){
+      this.onLoad(this.page);
+    },
+    //表单搜索按钮触发
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, params);
+      done()
+    },
+    //新增
+    rowSave(row, done, loading) {
+      jdmoduleSave(row).then(()=>{
+        this.$message.success('新增成功');
+        this.onLoad(this.page);
+        loading()
+        done()
+      })
+    },
+    //编辑
+    rowUpdate(row, index, done, loading) {
+      jdmoduleUpdate(row).then(()=>{
+        this.$message.success('修改成功');
+        this.onLoad(this.page);
+        loading()
+        done()
+      })
+    },
+    //删除
+    rowDel(row, index, done){
+      jdmoduleDelete(row.id).then(()=>{
+        this.$message.success('删除成功');
+        done()
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 0 - 16
src/views/system/dept.vue

@@ -208,7 +208,6 @@
     },
     methods: {
       initData() {
-        console.log('1111')
         getDeptTree().then(res => {
           console.log(res)
           const column = this.findObject(this.option.column, "parentId");
@@ -223,7 +222,6 @@
         this.$refs.crud.rowAdd();
       },
       rowSave(row, done, loading) {
-        console.log('1111')
         add(row).then((res) => {
           // 获取新增数据的相关字段
           const data = res.data.data;
@@ -242,7 +240,6 @@
         });
       },
       rowUpdate(row, index, done, loading) {
-        console.log('1111')
         update(row).then(() => {
           this.$message({
             type: "success",
@@ -256,7 +253,6 @@
         });
       },
       rowDel(row, index, done) {
-        console.log('1111')
         this.$confirm("确定将选择数据删除?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
@@ -275,7 +271,6 @@
           });
       },
       handleDelete() {
-        console.log('1111')
         if (this.selectionList.length === 0) {
           this.$message.warning("请选择至少一条数据");
           return;
@@ -303,13 +298,11 @@
           });
       },
       searchReset() {
-        console.log('1111')
         this.query = {};
         this.parentId = 0;
         this.onLoad(this.page);
       },
       searchChange(params, done) {
-        console.log('1111')
         this.query = params;
         this.parentId = '';
         this.page.currentPage = 1;
@@ -317,16 +310,13 @@
         done();
       },
       selectionChange(list) {
-        console.log('1111')
         this.selectionList = list;
       },
       selectionClear() {
-        console.log('1111')
         this.selectionList = [];
         this.$refs.crud.toggleSelection();
       },
       beforeOpen(done, type) {
-        console.log('1111')
         if (["add", "edit"].includes(type)) {
           this.initData();
         }
@@ -339,7 +329,6 @@
         done();
       },
       beforeClose(done) {
-        console.log('1111')
         this.parentId = "";
         const column = this.findObject(this.option.column, "parentId");
         column.value = "";
@@ -347,19 +336,15 @@
         done();
       },
       currentChange(currentPage) {
-        console.log('1111')
         this.page.currentPage = currentPage;
       },
       sizeChange(pageSize) {
-        console.log('1111')
         this.page.pageSize = pageSize;
       },
       refreshChange() {
-        console.log('1111')
         this.onLoad(this.page, this.query);
       },
       onLoad(page, params = {}) {
-        console.log('1111')
         this.loading = true;
         getLazyList(this.parentId, Object.assign(params, this.query)).then(res => {
           this.data = res.data.data;
@@ -368,7 +353,6 @@
         });
       },
       treeLoad(tree, treeNode, resolve) {
-        console.log('1111')
         const parentId = tree.id;
         getLazyList(parentId).then(res => {
           console.log(res.data.data)

+ 1 - 1
src/views/system/user.vue

@@ -302,7 +302,7 @@
               display: false
             },
             {
-              label: "用户平台1",
+              label: "用户平台",
               type: "select",
               dicUrl: "/api/blade-system/dict/dictionary?code=user_type",
               props: {