Browse Source

余额查询页面调整

haizhouwang 2 years ago
parent
commit
1d50a1d40f
2 changed files with 159 additions and 106 deletions
  1. 9 0
      src/http/moudules/task.js
  2. 150 106
      src/views/FinancialManagement/AcountWithdrawal/AcountBalance.vue

+ 9 - 0
src/http/moudules/task.js

@@ -275,6 +275,15 @@ export const deptAccountPage = (data) => {
     })
 }
 
+// 账户余额分页查询
+export const findPageAccount = (data) => {
+    return axios({
+        url: '/insPayApply/findPageAccount',
+        method: 'post',
+        data
+    })
+}
+
 
 // 证件识别
 export const imgAI = (data) => {

+ 150 - 106
src/views/FinancialManagement/AcountWithdrawal/AcountBalance.vue

@@ -1,121 +1,165 @@
 <template>
   <div>
-   <div class="queryFrom" title="检索区">
-        <el-form ref="queryFormRef" :model="queryFrom" label-width="80px">
-          <el-row>
-            <el-col :span="5">
-              <el-form-item label="工号">
-                <el-input clearable size="small" placeholder="工号" v-model="queryFrom.id"></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :span="6">
-              <el-form-item>
-                <el-button size="small" @click="queryBalance">查询</el-button>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
+    <div class="queryFrom" title="检索区">
+      <el-form ref="queryFormRef" :model="queryFrom" label-width="80px">
+        <el-row>
+          <el-col :span="5">
+            <el-form-item label="工号">
+              <el-input
+                clearable
+                size="small"
+                placeholder="工号"
+                v-model="queryFrom.userid"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="5">
+            <el-form-item label="机构名称">
+              <el-cascader
+                class="widths"
+                size="small"
+                :options="institutionOptions"
+                v-model="queryFrom.deptId"
+                :props="{
+                  checkStrictly: true,
+                  value: 'id',
+                  label: 'name',
+                }"
+                @change="handleChange"
+                clearable
+              ></el-cascader>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6">
+            <el-form-item>
+              <el-button size="small" @click="queryBalance">查询</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
     </div>
-     <el-table :border="true" :data="tableData" :header-cell-style="{background:'#F2F7FC',fontWeight: '700',color:'#606266'}" style="width: 100%">
-          <el-table-column header-align="center" align="center" prop="id" label="工号" min-width="180"> </el-table-column>
-          <el-table-column header-align="center" align="center" prop="name" label="姓名" min-width="100"> </el-table-column>
-          <el-table-column header-align="center" align="center" prop="deptId" label="机构代码" min-width="100"> </el-table-column>
-          <el-table-column header-align="center" align="center" prop="mobile" label="电话" min-width="100"> </el-table-column>
-          <el-table-column header-align="center" align="center" prop="totalAmount" label="累计提现" min-width="100"> </el-table-column>
-          <el-table-column header-align="center" align="center" prop="applyAmount" label="提现中" min-width="100"> </el-table-column>
-          <el-table-column header-align="center" align="center" prop="accountBalance" label="可提现金额" min-width="100"> </el-table-column>
-          <el-table-column header-align="center" align="center" prop="payamount" label="已到账" min-width="100"> </el-table-column>
-        </el-table>
+    <kt-common-table
+      :showBatchDelete="false"
+      :showBatchPrint="false"
+      :showOperation="false"
+      :data="pageResult"
+      :columns="columns"
+      @findPage="queryBalance"
+    >
+    </kt-common-table>
   </div>
 </template>
 
 <script>
-  export default {
-    data() {
-      return {
-        queryFrom:{
-          "id":""
-        },
-        tableData:[],
+import KtCommonTable from "@/views/Core/KtCommonTable.vue";
+export default {
+  components: {
+    KtCommonTable,
+  },
+  data() {
+    return {
+      institutionOptions: [], //机构字典
+      pageResult: {
+        
+      },
+      pageRequest: {
+        //查询的默认条件
+        pageNum: 1,
+        pageSize: 10,
+      },
+      queryFrom: {
+        userid: "", //工号
+        deptId: "", //机构
+      },
+      columns: [
+        //数据列
+        { prop: "userid", label: "工号", minWidth: 160 },
+        { prop: "username", label: "姓名", minWidth: 80 },
+        { prop: "mobile", label: "手机号", minWidth: 100 },
+        { prop: "deptid", label: "机构代码", minWidth: 160 },
+        { prop: "deptname", label: "机构名称", minWidth: 100 },
+        { prop: "totalfee", label: "总手续费", minWidth: 100 },
+        { prop: "fxtotalfee", label: "总分销费", minWidth: 100 },
+        { prop: "applyfee", label: "手续费提现总金额", minWidth: 120 },
+        { prop: "payamount", label: "手续费已到账金额", minWidth: 120 },
+        { prop: "apply", label: "手续费支付中金额", minWidth: 120 },
+        { prop: "balance", label: "手续费可用余额", minWidth: 120 },
+        { prop: "fxapplyfee", label: "分销费提现总金额", minWidth: 120 },
+        { prop: "fxpayamount", label: "分销费已到账总金额", minWidth: 130 },
+        { prop: "fxapply", label: "分销费支付中金额", minWidth: 120 },
+        { prop: "fxbalance", label: "分销费可用余额", minWidth: 120 },
+      ],
+    };
+  },
+  created() {
+    //查询机构
+    this.$api.dept.findDeptTree().then((res) => {
+      this.institutionOptions = res.data;
+    });
+  },
+  mounted() {},
+  methods: {
+    //联级选择器触发事件
+    handleChange(val) {
+      if (val.length !== 0) {
+        this.queryFrom.deptId = val.at(-1);
+      } else {
+        this.queryFrom.deptId = "";
       }
     },
-    methods:{
-
-      queryBalance(){
-        var that = this;
-        if(!this.queryFrom.id){
-          return this.$message.info("请输入查询工号")
-        }
-        var id = this.queryFrom.id
-        this.tableData = [];
-        var a = {};
-        this.$api.user.findById(id).then((personRes) => {
-            console.log(personRes)
-            if(personRes.code ==200){
-              Object.assign(a,personRes.data.sysUser);
-              this.$api.task.payAccount(id).then((res) => {
-                if(personRes.code ==200){
-                  Object.assign(a,res.data);
-                  console.log(a)
-                  that.tableData.push(a);
-                }else{
-                  return this.$message.info("查询失败")
-                }
-              })
-
-            }else if(personRes.code ==-9999){
-              return this.$message.info("请输入正确的工号")
-            }else{
-              return this.$message.info("查询失败")
-            }
-        })
-
-
-
-
-        // this.$api.task.payAccount(id).then((res) => {
-        //   console.log(res.data)
-        //   var a = {};
-        //   Object.assign(a,res.data);
-        //   a.id = id;
-        //   console.log(a)
-        //   that.tableData.push(a);
-        // })
+    queryBalance(data) {
+      if (data && data.pageRequest) {
+        this.pageRequest.pageNum = data.pageRequest.pageNum;
+        this.pageRequest.pageSize = data.pageRequest.pageSize;
       }
-
-
-    }
-  }
+      this.$api.task
+        .findPageAccount({
+          ...this.pageRequest,
+          columnFilters: {
+            deptid: { name: "deptid", value: this.queryFrom.deptId },
+            userid: { name: "userid", value: this.queryFrom.userid },
+          },
+        })
+        .then((res) => {
+          if (res.code == 200) {
+            this.pageResult = res.data;
+          }
+        });
+    },
+  },
+};
 </script>
 
 <style scoped>
-  /* 顶部查询条件样式Start */
-  .queryFrom{
-      background: #F2F7FC;
-      position:relative;
-      border:1px solid #ddd;
-      border-radius: 10px;
-      margin: 15px;
-      padding: 20px;
-  }
-  .queryFrom:before{
-      content:attr(title);
-      position:absolute;
-      left:10%;
-      transform:translate(-50%,-130%);
-      padding:0 10px;
-      background-color:#fff;
-  }
-
+/* 顶部查询条件样式Start */
+.queryFrom {
+  background: #f2f7fc;
+  position: relative;
+  border: 1px solid #ddd;
+  border-radius: 10px;
+  margin: 15px;
+  padding: 20px;
+}
+.queryFrom:before {
+  content: attr(title);
+  position: absolute;
+  left: 10%;
+  transform: translate(-50%, -130%);
+  padding: 0 10px;
+  background-color: #fff;
+}
 
-  .queryFrom .el-row {
-    margin: 10px 0px;
-  }
-  .queryFrom .el-form-item {
-    margin-bottom: 0px;
-  }
-  .queryFrom .queryButton .el-form-item__content {
-    margin-left: 0px !important;
-  }
-  /* 顶部查询条件样式End */
+.queryFrom .el-row {
+  margin: 10px 0px;
+}
+.queryFrom .el-form-item {
+  margin-bottom: 0px;
+}
+.queryFrom .queryButton .el-form-item__content {
+  margin-left: 0px !important;
+}
+/* 顶部查询条件样式End */
+.el-cascader {
+  width: 100%;
+}
 </style>