Răsfoiți Sursa

2024年11月11日 -zzx

zouzexu 6 luni în urmă
părinte
comite
b4283295e6

+ 1 - 1
config/dev.env.js

@@ -4,5 +4,5 @@ const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
-  BASE_API: '"http://192.168.2.47:8080"'
+  BASE_API: '"http://192.168.2.21:8080"'
 })

+ 19 - 0
src/api/channel.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+//获取渠道列表
+export function channelList(params) {
+    return request({
+      url:'/pms/cThirdPartyInfo/list',
+      method:'get',
+      params:params
+    })
+  }
+
+//   渠道上账列表
+  export function upCheckList(params) {
+    return request({
+      url:'/ums/umsThirdPartyDetail/list',
+      method:'get',
+      params:params
+    })
+  }

+ 48 - 239
src/views/channel/info/index.vue

@@ -5,48 +5,21 @@
       <div>
         <i class="el-icon-search"></i>
         <span>筛选搜索</span>
-        <el-button
-          style="float: right"
-          type="primary"
-          @click="handleSearchList()"
-          size="small"
-        >
+        <el-button style="float: right" type="primary" @click="handleSearchList()" size="small">
           查询搜索
         </el-button>
-        <el-button
-          style="float: right; margin-right: 15px"
-          @click="handleResetSearch()"
-          size="small"
-        >
+        <el-button style="float: right; margin-right: 15px" @click="handleResetSearch()" size="small">
           重置
         </el-button>
       </div>
       <div style="margin-top: 15px">
-        <el-form
-          :inline="true"
-          :model="listQuery"
-          size="small"
-          label-width="140px"
-        >
+        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
           <el-form-item label="渠道名称:">
-            <el-input
-              v-model="listQuery.keyword"
-              class="input-width"
-              placeholder="请输入渠道名称"
-              clearable
-            ></el-input>
+            <el-input v-model="listQuery.keyword" class="input-width" placeholder="请输入渠道名称" clearable></el-input>
           </el-form-item>
           <el-form-item label="创建时间:">
-            <el-date-picker
-              v-model="date"
-              size="small"
-              value-format="yyyy-MM-dd"
-              class="item-width-350 ml10"
-              type="datetimerange"
-              range-separator="至"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
-            >
+            <el-date-picker v-model="date" size="small" value-format="yyyy-MM-dd" class="item-width-350 ml10"
+              type="datetimerange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
             </el-date-picker>
           </el-form-item>
         </el-form>
@@ -55,80 +28,32 @@
     <el-card class="operate-container" shadow="never">
       <i class="el-icon-tickets"></i>
       <span>数据列表</span>
-      <el-button
-        size="mini"
-        class="btn-add"
-        @click="handleAdd()"
-        style="margin-left: 20px"
-        >添加</el-button
-      >
+      <el-button size="mini" class="btn-add" @click="handleAdd()" style="margin-left: 20px">添加</el-button>
     </el-card>
     <div class="table-container">
-      <el-table
-        ref="adminTable"
-        :data="list"
-        style="width: 100%"
-        v-loading="listLoading"
-        border
-      >
-        <el-table-column label="渠道编号" width="100" align="center">
-          <template slot-scope="scope">
-            {{'--'}}
-          </template>
-        </el-table-column>
-        <el-table-column label="渠道名称" align="center">
-          <template slot-scope="scope">
-            {{'--'}}
-          </template>
-        </el-table-column>
-        <el-table-column label="联系人" align="center">
-          <template slot-scope="scope">
-            {{'--'}}
-          </template>
-        </el-table-column>
-        <el-table-column label="手机号" align="center">
-          <template slot-scope="scope">
-            {{'--'}}
-          </template>
-        </el-table-column>
+      <el-table ref="adminTable" :data="list" style="width: 100%" v-loading="listLoading" border>
+        <el-table-column label="渠道编号" width="100" align="center" prop="appId"></el-table-column>
+        <el-table-column label="渠道名称" align="center" prop="ecName"></el-table-column>
+        <el-table-column label="联系人" align="center" prop="contactName"></el-table-column>
+        <el-table-column label="手机号" align="center" prop="contactPhone"></el-table-column>
         <el-table-column label="渠道服务费/元" width="160" align="center">
           <template slot-scope="scope">
-            {{'--'}}
+            {{ '--' }}
           </template>
         </el-table-column>
         <el-table-column label="使用状态" width="160" align="center">
           <template slot-scope="scope">
-            {{'--'}}
-          </template>
-        </el-table-column>
-        <el-table-column label="创建人" width="140" align="center">
-          <template slot-scope="scope">
-            {{'--'}}
-          </template>
-        </el-table-column>
-        <el-table-column label="创建时间" width="140" align="center">
-          <template slot-scope="scope">
-            {{'--'}}
-          </template>
-        </el-table-column>
-        <el-table-column label="更新人" width="140" align="center">
-          <template slot-scope="scope">
-            {{'--'}}
-          </template>
-        </el-table-column>
-        <el-table-column label="更新时间" width="140" align="center">
-          <template slot-scope="scope">
-            {{'--'}}
+            <el-tag type='success' v-if="scope.row.status === 1">正常</el-tag>
+            <el-tag type="danger" v-else>禁用</el-tag>
           </template>
         </el-table-column>
+        <el-table-column label="创建人" width="140" align="center" prop="createBy"></el-table-column>
+        <el-table-column label="创建时间" width="140" align="center" prop="createTime"></el-table-column>
+        <el-table-column label="更新人" width="140" align="center" prop="updateBy"></el-table-column>
+        <el-table-column label="更新时间" width="140" align="center" prop="updateTime"></el-table-column>
         <el-table-column label="操作" width="180" align="center">
           <template slot-scope="scope">
-            <el-button
-              size="mini"
-              type="primary"
-              plain
-              @click="handleUpdate(scope.$index, scope.row)"
-            >
+            <el-button size="mini" type="primary" plain @click="handleUpdate(scope.$index, scope.row)">
               编辑
             </el-button>
           </template>
@@ -136,98 +61,43 @@
       </el-table>
     </div>
     <div class="pagination-container">
-      <el-pagination
-        background
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        layout="total, sizes,prev, pager, next,jumper"
-        :current-page.sync="listQuery.pageNum"
-        :page-size="listQuery.pageSize"
-        :page-sizes="[10, 15, 20]"
-        :total="total"
-      >
+      <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        layout="total, sizes,prev, pager, next,jumper" :current-page.sync="listQuery.pageNum"
+        :page-size="listQuery.pageSize" :page-sizes="[10, 15, 20]" :total="total">
       </el-pagination>
     </div>
-    <el-dialog
-      :title="isEdit ? '编辑' : '添加'"
-      :visible.sync="dialogVisible"
-      width="40%"
-    >
+    <el-dialog :title="isEdit ? '编辑' : '添加'" :visible.sync="dialogVisible" width="40%">
       <el-form :model="admin" ref="adminForm" label-width="150px" size="small">
         <el-form-item label="渠道编号:">
-          <el-input v-model="admin.username" style="width: 250px"></el-input>
+          <el-input v-model="admin.appId" style="width: 250px"></el-input>
         </el-form-item>
         <el-form-item label="渠道名称:">
-          <el-input v-model="admin.nickName" style="width: 250px"></el-input>
+          <el-input v-model="admin.ecName" style="width: 250px"></el-input>
         </el-form-item>
         <el-form-item label="联系人:">
-          <el-input v-model="admin.email" style="width: 250px"></el-input>
+          <el-input v-model="admin.contactName" style="width: 250px"></el-input>
         </el-form-item>
         <el-form-item label="手机号:">
-          <el-input
-            v-model="admin.password"
-            type="number"
-            style="width: 250px"
-          ></el-input>
+          <el-input v-model="admin.contactPhone" type="number" style="width: 250px"></el-input>
         </el-form-item>
         <el-form-item label="渠道服务费:">
-          <el-input
-            v-model="admin.note"
-            type="text"
-            :rows="5"
-            style="width: 250px"
-          ></el-input>
+          <el-input v-model="admin.note" type="text" :rows="5" style="width: 250px"></el-input>
           <div>当前平台服务费为0.1</div>
         </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisible = false" size="small">取 消</el-button>
-        <el-button type="primary" @click="handleDialogConfirm()" size="small"
-          >确 定</el-button
-        >
-      </span>
-    </el-dialog>
-    <el-dialog title="分配角色" :visible.sync="allocDialogVisible" width="30%">
-      <el-select
-        v-model="allocRoleIds"
-        multiple
-        placeholder="请选择"
-        size="small"
-        style="width: 80%"
-      >
-        <el-option
-          v-for="item in allRoleList"
-          :key="item.id"
-          :label="item.name"
-          :value="item.id"
-        >
-        </el-option>
-      </el-select>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="allocDialogVisible = false" size="small"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          @click="handleAllocDialogConfirm()"
-          size="small"
-          >确 定</el-button
-        >
+        <el-button type="primary" @click="handleDialogConfirm()" size="small">确 定</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 <script>
 import {
-  fetchList,
   createAdmin,
   updateAdmin,
-  updateStatus,
-  deleteAdmin,
-  getRoleByAdmin,
-  allocRole,
 } from "@/api/login";
-import { fetchAllRoleList } from "@/api/role";
+import {channelList} from "@/api/channel";
 import { formatDate } from "@/utils/date";
 
 const defaultListQuery = {
@@ -248,7 +118,7 @@ export default {
   name: "adminList",
   data() {
     return {
-      date:'',
+      date: '',
       listQuery: Object.assign({}, defaultListQuery),
       list: null,
       total: null,
@@ -276,69 +146,45 @@ export default {
     },
   },
   methods: {
+    // 重置搜索框
     handleResetSearch() {
       this.listQuery = Object.assign({}, defaultListQuery);
     },
+
+    // 搜索
     handleSearchList() {
       this.listQuery.pageNum = 1;
       this.getList();
     },
+
+    // 每页条数
     handleSizeChange(val) {
       this.listQuery.pageNum = 1;
       this.listQuery.pageSize = val;
       this.getList();
     },
+
+    // 当前页
     handleCurrentChange(val) {
       this.listQuery.pageNum = val;
       this.getList();
     },
+
+    // 添加
     handleAdd() {
       this.dialogVisible = true;
       this.isEdit = false;
       this.admin = Object.assign({}, defaultAdmin);
     },
-    handleStatusChange(index, row) {
-      this.$confirm("是否要修改该状态?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      })
-        .then(() => {
-          updateStatus(row.id, { status: row.status }).then((response) => {
-            this.$message({
-              type: "success",
-              message: "修改成功!",
-            });
-          });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "取消修改",
-          });
-          this.getList();
-        });
-    },
-    handleDelete(index, row) {
-      this.$confirm("是否要删除该用户?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(() => {
-        deleteAdmin(row.id).then((response) => {
-          this.$message({
-            type: "success",
-            message: "删除成功!",
-          });
-          this.getList();
-        });
-      });
-    },
+
+    // 编辑
     handleUpdate(index, row) {
       this.dialogVisible = true;
       this.isEdit = true;
       this.admin = Object.assign({}, row);
     },
+
+    // 编辑或增加确定回调
     handleDialogConfirm() {
       this.$confirm("是否要确认?", "提示", {
         confirmButtonText: "确定",
@@ -366,53 +212,16 @@ export default {
         }
       });
     },
-    handleAllocDialogConfirm() {
-      this.$confirm("是否要确认?", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-      }).then(() => {
-        let params = new URLSearchParams();
-        params.append("adminId", this.allocAdminId);
-        params.append("roleIds", this.allocRoleIds);
-        allocRole(params).then((response) => {
-          this.$message({
-            message: "分配成功!",
-            type: "success",
-          });
-          this.allocDialogVisible = false;
-        });
-      });
-    },
-    handleSelectRole(index, row) {
-      this.allocAdminId = row.id;
-      this.allocDialogVisible = true;
-      this.getRoleListByAdmin(row.id);
-    },
+
+    // 获取列表
     getList() {
       this.listLoading = true;
-      fetchList(this.listQuery).then((response) => {
+      channelList(this.listQuery).then((response) => {
         this.listLoading = false;
         this.list = response.data.list;
         this.total = response.data.total;
       });
     },
-    getAllRoleList() {
-      fetchAllRoleList().then((response) => {
-        this.allRoleList = response.data;
-      });
-    },
-    getRoleListByAdmin(adminId) {
-      getRoleByAdmin(adminId).then((response) => {
-        let allocRoleList = response.data;
-        this.allocRoleIds = [];
-        if (allocRoleList != null && allocRoleList.length > 0) {
-          for (let i = 0; i < allocRoleList.length; i++) {
-            this.allocRoleIds.push(allocRoleList[i].id);
-          }
-        }
-      });
-    },
   },
 };
 </script>

+ 9 - 45
src/views/channel/upCheck/index.vue

@@ -33,31 +33,15 @@
         </el-card>
         <div class="table-container">
             <el-table ref="adminTable" :data="list" style="width: 100%" v-loading="listLoading" border>
-                <el-table-column label="渠道编号" width="100" align="center">
-                    <template slot-scope="scope">
-                        {{ '--' }}
-                    </template>
-                </el-table-column>
-                <el-table-column label="渠道名称" align="center">
-                    <template slot-scope="scope">
-                        {{ '--' }}
-                    </template>
-                </el-table-column>
+                <el-table-column label="渠道编号" width="100" align="center" prop="authCode"></el-table-column>
+                <el-table-column label="渠道名称" align="center" prop="ecName"></el-table-column>
                 <el-table-column label="渠道上账金额/元" align="center">
                     <template slot-scope="scope">
-                        {{ '--' }}
-                    </template>
-                </el-table-column>
-                <el-table-column label="操作人" align="center">
-                    <template slot-scope="scope">
-                        {{ '--' }}
-                    </template>
-                </el-table-column>
-                <el-table-column label="操作时间" width="160" align="center">
-                    <template slot-scope="scope">
-                        {{ '--' }}
+                        {{ "--" }}
                     </template>
                 </el-table-column>
+                <el-table-column label="操作人" align="center" prop="updateBy"></el-table-column>
+                <el-table-column label="操作时间" width="160" align="center" prop="updateTime"></el-table-column>
             </el-table>
         </div>
         <div class="pagination-container">
@@ -69,11 +53,7 @@
     </div>
 </template>
 <script>
-import {
-    fetchList,
-    getRoleByAdmin,
-} from "@/api/login";
-import { fetchAllRoleList } from "@/api/role";
+import { upCheckList } from "@/api/channel";
 import { formatDate } from "@/utils/date";
 
 const defaultListQuery = {
@@ -94,7 +74,7 @@ export default {
     name: "adminList",
     data() {
         return {
-            date: '',
+            date: "",
             listQuery: Object.assign({}, defaultListQuery),
             list: null,
             total: null,
@@ -138,29 +118,13 @@ export default {
         },
         getList() {
             this.listLoading = true;
-            fetchList(this.listQuery).then((response) => {
+            upCheckList(this.listQuery).then((response) => {
                 this.listLoading = false;
                 this.list = response.data.list;
                 this.total = response.data.total;
             });
         },
-        getAllRoleList() {
-            fetchAllRoleList().then((response) => {
-                this.allRoleList = response.data;
-            });
-        },
-        getRoleListByAdmin(adminId) {
-            getRoleByAdmin(adminId).then((response) => {
-                let allocRoleList = response.data;
-                this.allocRoleIds = [];
-                if (allocRoleList != null && allocRoleList.length > 0) {
-                    for (let i = 0; i < allocRoleList.length; i++) {
-                        this.allocRoleIds.push(allocRoleList[i].id);
-                    }
-                }
-            });
-        },
     },
 };
 </script>
-<style></style>
+<style></style>

+ 1 - 1
src/views/channel/useCondition/index.vue

@@ -129,7 +129,7 @@
                 <el-form-item label="本次上账金额/元:">
                     <el-input v-model="admin.note" placeholder="请输入上账金额" type="text" :rows="5"
                         style="width: 250px"></el-input>
-                        <el-checkbox v-model="checked">负数</el-checkbox>
+                        <el-checkbox v-if="!isEdit" v-model="checked">负数</el-checkbox>
                 </el-form-item>
                 <el-form-item label="上传凭证:">
                     <el-upload action="https://jsonplaceholder.typicode.com/posts/" list-type="picture-card"