wangnana 4 年之前
父節點
當前提交
1a8ae4f72c

+ 0 - 8
src/api/channel.js

@@ -44,14 +44,6 @@ export default {
       // data:data
     })
   },
-  //是否有效
-  supplierValid(data){
-    return request({
-      url:"/supplier/setIsValid",
-      method:"put",
-      data: data
-    })
-  },
 
   // <!-- -->
   //编辑

+ 0 - 44
src/api/userList.js

@@ -24,18 +24,6 @@ export default {
         data: operator
       })
     },
-    customerDelect(customerId){
-      return request({
-        url:"/customer/del/" + customerId,
-        method:"put",
-      })
-    },
-    customerValid(customerId,status){
-      return request({
-        url:"/customer/valid/" + customerId  + '/'  + status,
-        method:"put",
-      })
-    },
     //产品详情
     paroductDetails(param){
       return request({
@@ -127,38 +115,6 @@ export default {
         method:"post",
         data:data
       })
-   },
-   //加款新增
-   paymentAdd(data){
-      return request({
-        url:"/payment/add",
-        method:"post",
-        data:data
-      })
-   },
-   //加款编辑
-   paymentUpdate(data){
-      return request({
-        url:"/payment/update",
-        method:"post",
-        data:data
-      })
-   },
-   //银行卡
-   bankcard(data){
-      return request({
-        url:"/bankcard/list",
-        method:"post",
-        data:data
-      })
-   },
-   //撤销
-   revocation(data){
-      return request({
-        url:"/payment/cancel",
-        method:"post",
-        data:data
-      })
    }
   }
  

+ 2 - 2
src/components/SvgIcon/index.vue

@@ -34,8 +34,8 @@ export default {
 
 <style scoped>
 .svg-icon {
-  width: 1.1em;
-  height: 1.1em;
+  width: 1em;
+  height: 1em;
   vertical-align: -0.15em;
   fill: currentColor;
   overflow: hidden;

文件差異過大導致無法顯示
+ 0 - 0
src/icons/svg/主页.svg


+ 1 - 0
src/icons/svg/分发列表 .svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1623310091384" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5582" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><defs><style type="text/css"></style></defs><path d="M932.352 265.216H614.4c-19.456 0-35.328-14.336-35.328-31.744 0-17.408 15.872-31.744 35.328-31.744h317.952c19.456 0 35.328 14.336 35.328 31.744 0 17.408-15.872 31.744-35.328 31.744z m0 158.72H614.4c-19.456 0-35.328-14.336-35.328-31.744 0-17.408 15.872-31.744 35.328-31.744h317.952c19.456 0 35.328 14.336 35.328 31.744 0 17.408-15.872 31.744-35.328 31.744z m0 253.44H614.4c-19.456 0-35.328-14.336-35.328-31.744 0-17.408 15.872-31.744 35.328-31.744h317.952c19.456 0 35.328 14.336 35.328 31.744 0 17.408-15.872 31.744-35.328 31.744z m0 158.72H614.4c-19.456 0-35.328-14.336-35.328-31.744 0-17.408 15.872-31.744 35.328-31.744h317.952c19.456 0 35.328 14.336 35.328 31.744 0 17.408-15.872 31.744-35.328 31.744zM367.104 487.424H155.648C97.28 487.424 49.664 444.416 49.664 392.192V201.728c0-52.224 47.616-95.232 105.984-95.232h211.968c58.368 0 105.984 42.496 105.984 95.232v190.464c-0.512 52.224-47.616 95.232-106.496 95.232z m-211.456-317.44c-19.456 0-35.328 14.336-35.328 31.744v190.464c0 17.408 15.872 31.744 35.328 31.744h211.968c19.456 0 35.328-14.336 35.328-31.744V201.728c0-17.408-15.872-31.744-35.328-31.744H155.648z m211.456 761.344H155.648c-58.368 0-105.984-42.496-105.984-95.232v-190.464c0-52.224 47.616-95.232 105.984-95.232h211.968c58.368 0 105.984 42.496 105.984 95.232v190.464c-0.512 52.224-47.616 95.232-106.496 95.232z m-211.456-317.44c-19.456 0-35.328 14.336-35.328 31.744v190.464c0 17.408 15.872 31.744 35.328 31.744h211.968c19.456 0 35.328-14.336 35.328-31.744v-190.464c0-17.408-15.872-31.744-35.328-31.744H155.648z" p-id="5583" fill="#ffffff"></path></svg>

+ 1 - 0
src/icons/svg/列表.svg

@@ -0,0 +1 @@
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1623309913536" class="icon" viewBox="0 0 1331 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3323" xmlns:xlink="http://www.w3.org/1999/xlink" width="62.390625" height="48"><defs><style type="text/css"></style></defs><path d="M0 0m46.029795 0l92.059591 0q46.029795 0 46.029795 46.029795l0 92.059591q0 46.029795-46.029795 46.029795l-92.059591 0q-46.029795 0-46.029795-46.029795l0-92.059591q0-46.029795 46.029795-46.029795Z" fill="#ffffff" p-id="3324"></path><path d="M276.178772 0m46.029795 0l828.536316 0q46.029795 0 46.029795 46.029795l0 92.059591q0 46.029795-46.029795 46.029795l-828.536316 0q-46.029795 0-46.029795-46.029795l0-92.059591q0-46.029795 46.029795-46.029795Z" fill="#ffffff" p-id="3325"></path><path d="M0 368.238362m46.029795 0l92.059591 0q46.029795 0 46.029795 46.029796l0 92.05959q0 46.029795-46.029795 46.029796l-92.059591 0q-46.029795 0-46.029795-46.029796l0-92.05959q0-46.029795 46.029795-46.029796Z" fill="#ffffff" p-id="3326"></path><path d="M276.178772 368.238362m46.029795 0l828.536316 0q46.029795 0 46.029795 46.029796l0 92.05959q0 46.029795-46.029795 46.029796l-828.536316 0q-46.029795 0-46.029795-46.029796l0-92.05959q0-46.029795 46.029795-46.029796Z" fill="#ffffff" p-id="3327"></path><path d="M0 736.476725m46.029795 0l92.059591 0q46.029795 0 46.029795 46.029795l0 92.059591q0 46.029795-46.029795 46.029795l-92.059591 0q-46.029795 0-46.029795-46.029795l0-92.059591q0-46.029795 46.029795-46.029795Z" fill="#ffffff" p-id="3328"></path><path d="M276.178772 736.476725m46.029795 0l828.536316 0q46.029795 0 46.029795 46.029795l0 92.059591q0 46.029795-46.029795 46.029795l-828.536316 0q-46.029795 0-46.029795-46.029795l0-92.059591q0-46.029795 46.029795-46.029795Z" fill="#ffffff" p-id="3329"></path></svg>

+ 1 - 1
src/icons/svg/订单列表.svg

@@ -1 +1 @@
-<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1623382221512" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2160" xmlns:xlink="http://www.w3.org/1999/xlink" width="600" height="600"><defs><style type="text/css"></style></defs><path d="M619.085 285.768H400.596c-22.056 0-40-17.944-40-40v-81.995c0-22.056 17.944-40 40-40h218.488c22.056 0 40 17.944 40 40v81.995c0.001 22.056-17.944 40-39.999 40z m-198.489-60h178.488v-41.995H420.596v41.995z" p-id="2161"></path><path d="M773.485 900.228h-522.97c-38.599 0-70-31.401-70-70V257.267c0-38.598 31.401-70 70-70h41.486c16.568 0 30 13.431 30 30 0 16.568-13.432 30-30 30h-41.486c-5.514 0-10 4.486-10 10v572.961c0 5.514 4.486 10 10 10h522.97c5.514 0 10-4.486 10-10V257.267c0-5.514-4.486-10-10-10h-45.806c-16.568 0-30-13.432-30-30 0-16.569 13.432-30 30-30h45.806c38.598 0 70 31.402 70 70v572.961c0 38.598-31.402 70-70 70z" p-id="2162"></path><path d="M660.515 442.511h-297.03c-16.568 0-30-13.432-30-30s13.432-30 30-30h297.03c16.568 0 30 13.432 30 30s-13.431 30-30 30zM563.485 592.031h-200c-16.568 0-30-13.432-30-30s13.432-30 30-30h200c16.568 0 30 13.432 30 30s-13.432 30-30 30zM563.485 741.552h-200c-16.568 0-30-13.432-30-30s13.432-30 30-30h200c16.568 0 30 13.432 30 30s-13.432 30-30 30z" p-id="2163"></path></svg>
+<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1622789594511" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10529" xmlns:xlink="http://www.w3.org/1999/xlink" width="300" height="300"><defs><style type="text/css"></style></defs><path d="M619.085 285.768H400.596c-22.056 0-40-17.944-40-40v-81.995c0-22.056 17.944-40 40-40h218.488c22.056 0 40 17.944 40 40v81.995c0.001 22.056-17.944 40-39.999 40z m-198.489-60h178.488v-41.995H420.596v41.995z" p-id="10530"></path><path d="M773.485 900.228h-522.97c-38.599 0-70-31.401-70-70V257.267c0-38.598 31.401-70 70-70h41.486c16.568 0 30 13.431 30 30 0 16.568-13.432 30-30 30h-41.486c-5.514 0-10 4.486-10 10v572.961c0 5.514 4.486 10 10 10h522.97c5.514 0 10-4.486 10-10V257.267c0-5.514-4.486-10-10-10h-45.806c-16.568 0-30-13.432-30-30 0-16.569 13.432-30 30-30h45.806c38.598 0 70 31.402 70 70v572.961c0 38.598-31.402 70-70 70z" p-id="10531"></path><path d="M660.515 442.511h-297.03c-16.568 0-30-13.432-30-30s13.432-30 30-30h297.03c16.568 0 30 13.432 30 30s-13.431 30-30 30zM563.485 592.031h-200c-16.568 0-30-13.432-30-30s13.432-30 30-30h200c16.568 0 30 13.432 30 30s-13.432 30-30 30zM563.485 741.552h-200c-16.568 0-30-13.432-30-30s13.432-30 30-30h200c16.568 0 30 13.432 30 30s-13.432 30-30 30z" p-id="10532"></path></svg>

+ 1 - 1
src/router/index.js

@@ -13,7 +13,7 @@ export const constantRoutes = [
     hidden: true,
     children: [
       {
-        path: '/redirect/:path*',
+        path: '/redirect/:path*',//?
         component: () => import('@/views/redirect/index')
       }
     ]

+ 291 - 0
src/views/channel/account.vue

@@ -0,0 +1,291 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container" style="margin: 10px 0 10px 0">
+      <span class="textSpan">供应商名称:</span>
+      <el-select
+        v-model="select"
+        slot="prepend"
+        placeholder="请选择"
+        filterable
+        clearable
+      >
+        <el-option label="餐厅名" value="1"></el-option>
+        <el-option label="订单号" value="2"></el-option>
+        <el-option label="用户电话" value="3"></el-option>
+      </el-select>
+      <el-button type="primary" plain icon="el-icon-search">搜索</el-button>
+      <el-button
+        type="primary"
+        plain
+        icon="el-icon-plus"
+        @click="dialogFormVisible = true"
+        >加款</el-button
+      >
+    </div>
+    <!-- 列表 -->
+    <el-table :data="tableData" border style="width: 100%" v-loading="loading">
+      <el-table-column
+        align="center"
+        show-overflow-tooltip
+        prop="cardNo"
+        label="银行卡"
+        width="190"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        show-overflow-tooltip
+        prop="bankDeposit"
+        label="开户行"
+        width="150"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        show-overflow-tooltip
+        prop="account"
+        label="账户"
+        width="80"
+      ></el-table-column>
+      <!-- 自行添加的供应商名称 -->
+      <el-table-column
+        align="center"
+        show-overflow-tooltip
+        prop="supplierName"
+        label="供应商名称"
+        width="180"
+      ></el-table-column>
+      <el-table-column
+        align="center"
+        show-overflow-tooltip
+        prop="payer"
+        label="加款人"
+      >
+      </el-table-column>
+      <el-table-column
+        align="center"
+        style="padding:0"
+        label="凭证"
+        prop="imgurl"
+        width="100"
+      >
+      <template slot-scope="scope">
+          <img :src="scope.row.imgurl" style="width:100" >
+     </template>
+      
+      </el-table-column> 
+      <el-table-column
+        align="center"
+        show-overflow-tooltip
+        prop="amount"
+        label="加款金额"
+      >
+      </el-table-column>
+      <el-table-column
+        align="center"
+        show-overflow-tooltip
+        prop="time"
+        label="加款时间"
+      >
+      </el-table-column>
+      <el-table-column
+        align="center"
+        show-overflow-tooltip
+        prop="paymentAccount"
+        label="出款账户"
+      >
+      </el-table-column>
+      <el-table-column align="center" fixed="right" label="操作" width="190">
+        <template
+          slot-scope="scope"
+          fixed="right"
+          width="300"
+          style="display:flex"
+        >
+          <el-button
+            @click="handleEdit(scope.row)"
+            size="small"
+            type="warning"
+            plain
+            icon="el-icon-edit"
+            >修改</el-button
+          >
+          <el-button
+            @click="handleEdit(scope.row)"
+            size="small"
+            type="danger"
+            plain
+            icon="el-icon-edit"
+            >撤销</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <el-dialog
+      title="新增加款"
+      :visible.sync="dialogFormVisible"
+      width="55%"
+      center
+    >
+      <el-form :model="form">
+        <el-form-item
+          label="银行卡"
+          prop="card_no"
+          :label-width="formLabelWidth"
+        >
+          <el-input
+            v-model="form.cardNo"
+            autocomplete="off"
+            placeholder="请输入银行卡"
+          ></el-input>
+        </el-form-item>
+
+        <el-form-item label="供应商账户" :label-width="formLabelWidth">
+          <el-input
+            v-model="form.account"
+            autocomplete="off"
+            placeholder="请输入供应商账户"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="加款金额" :label-width="formLabelWidth">
+          <el-input
+            v-model="form.amount"
+            autocomplete="off"
+            placeholder="请输入加款金额"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="出款账户" :label-width="formLabelWidth">
+          <el-input
+            v-model="form.paymentAccount"
+            autocomplete="off"
+            placeholder="请输入出款账户"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="凭证" :label-width="formLabelWidth">
+          <el-upload
+            ref="upload"
+            action="#"
+            list-type="picture-card"
+            :fileList="fileList"
+            :limit="1"
+            :auto-upload="false"
+            :on-change="handleDownload"
+          >
+            <i slot="default" class="el-icon-plus"></i>
+            <div slot="file" slot-scope="{file}">
+                    <img
+                        class="el-upload-list__item-thumbnail"
+                        :src="file.url" alt=""
+                    >
+                    <!-- //图片三个按钮事件 -->
+                    <span class="el-upload-list__item-actions">
+                        <span
+                        class="el-upload-list__item-preview"
+                        @click="handlePictureCardPreview(file)"
+                        >
+                        <i class="el-icon-zoom-in"></i>
+                        </span>
+                        <span
+                            class="el-upload-list__item-delete"
+                            @click="handleRemove(file)"
+                            >
+                            <i class="el-icon-delete"></i>
+                         </span>
+                     
+                    </span>
+                    </div>
+          </el-upload>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="dialogFormVisible = false"
+          >确 定</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import api from '@/api/userList'
+export default {
+  data() {
+    return {
+      loading:false,
+      select: "",
+      dialogFormVisible: false,
+      formLabelWidth: "120px",
+      tableData: [
+        {
+          cardNo: "622823462645264622", //银行卡
+          bankDeposit: "中国农业银行", //开户行
+          account: "供应商", //账户
+          supplierName: "是否包含国际公司", //供应商名称
+          payer: "德赫亚", //加款人
+          //   certificate: "wghhjngfrtyhuuhnunuh", //凭证
+          imgurl: "https://iconfont.alicdn.com/t/1520995303822.jpg@100h_100w.jpg", //凭证
+          amount: "100000", //加款金额
+          time: "2021-06-11", //加款时间
+          paymentAccount: "吃掉你" //出款账户
+        }
+      ],
+      form: {
+        card_no: "", //银行卡
+        account: "", //供应商账户
+        // certificate: "", //凭证
+        imgurl: "", //凭证
+        amount: "", //加款金额
+        paymentAccount: "", //出款账户
+      },
+      fileList:[],//上传的文件列表
+
+    };
+  },
+  methods:{
+      //将凭证上传到服务器
+      handleDownload(event,file, fileList,){
+        console.log(event)
+        console.log(file)
+        console.log(fileList)
+        const params = new FormData()
+        params.append('file', event.raw)
+        api.account.Upload(params).then((res)=>{
+          if(res.data.status == 200){
+                let image=res.data.image_url
+                this.dataForm.imgurl=image
+                console.log(res)
+            }else{
+                this.$notify.error({
+                title: '错误',
+                message: res.msg
+                });
+            } 
+        })
+      }
+  }
+};
+</script>
+<style scoped>
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
+</style>

+ 5 - 5
src/views/channel/channel.vue

@@ -18,11 +18,11 @@
       <!-- 表格数据 -->
       <el-table v-loading="loading" :data="tableData" border style="width: 100%">
 
-            <el-table-column label="序号" width="60" align="center">
-                <template slot-scope="scope">
-                <span>{{ scope.$index + 1 }}</span>
-                </template>
-            </el-table-column>
+          <el-table-column label="通道ID" align="center" show-overflow-tooltip>
+              <template slot-scope="scope">
+                  <span>{{ scope.row.channelId }}</span>
+              </template>
+          </el-table-column>
 
           <el-table-column label="通道名称" align="center" show-overflow-tooltip>
               <template slot-scope="scope" @click="hookLook(scope.row)">

+ 8 - 39
src/views/channel/index.vue

@@ -8,11 +8,7 @@
     </div>
     <el-table v-loading="loading" :data="tableData" border style="width: 100%">
 
-      <el-table-column label="序号" width="60" align="center">
-          <template slot-scope="scope">
-          <span>{{ scope.$index + 1 }}</span>
-          </template>
-      </el-table-column>
+
       <el-table-column label="供应商名称" width="100" align="center" show-overflow-tooltip>
         <template slot-scope="scope" @click="handleLook(scope.row)">
            <el-button type="text" @click="handleLook(scope.row)">{{ scope.row.supplierName }}</el-button>
@@ -59,8 +55,10 @@
 
       <el-table-column label="操作" fixed="right" min-width="300" align="center">
         <template slot-scope="scope">
-          <el-button v-if="scope.row.isValid==0" size="small" icon="el-icon-circle-check" type="success" plain @click="ModifyState(scope.row,1)">有效</el-button>
-          <el-button v-if="scope.row.isValid==1" size="small" icon="el-icon-circle-close" type="info" plain @click="ModifyState(scope.row,0)">无效</el-button>
+          <!-- <el-button v-if="scope.row.isValid==0" size="small" icon="el-icon-circle-check" type="success" plain @click="ModifyState(scope.row)">有效</el-button>
+          <el-button v-if="scope.row.isValid==1" size="small" icon="el-icon-circle-close" type="info" plain @click="ModifyState(scope.row)">无效</el-button> -->
+
+          <el-button size="small" type="primary"  icon="el-icon-plus" plain @click="amountAdd(scope.row)">加款</el-button>
           <el-button size="small" icon="el-icon-edit" type="warning" plain  @click="handleEdit(scope.row)">编辑</el-button>
           <el-button size="small" icon="el-icon-delete" type="danger" autofocus plain  @click="ModifyDelete(scope.row,$event)">删除</el-button>
         </template>
@@ -893,38 +891,9 @@ export default {
     },
 
     // 状态
-    ModifyState(row,i) {
-      this.$confirm('是否修改 '+row.supplierName+' 的状态', '提示', {
-            confirmButtonText: '确定',
-            cancelButtonText: '取消',
-            type: 'warning'
-          }).then(()=>{
-            let code = JSON.parse(JSON.stringify(row))
-            code.isValid = i   // 2:暂停   1:有效
-            let info = {
-              isValid:code.isValid,
-              supplierId:code.supplierId
-            }
-            api.supplierValid(info).then(response => {
-            if (response.status == "200") {
-              this.$message({
-                type: 'success',
-                message: '操作成功'
-              })
-              this.reLoad()
-            } else {
-              this.$message({
-                type: 'error',
-                message: response.data.msg
-              })
-            }
-            })
-          }).catch(() => {
-            this.$message({
-              type: 'info',
-              message: '已取消'
-            });          
-          });
+    ModifyState(data) {
+      console.log(data.isValid)
+      data.isValid ^= 1
     },
     // 删除
     ModifyDelete(row,e) {

+ 1 - 1
src/views/orderList/index.vue

@@ -668,7 +668,7 @@ export default {
  .black-item{
     background: #19191b25;
     color: rgba(22, 22, 22, 0.651);
-    border: 1px solid #2d2d361e;
+    border: 1px solid #2d2d3663;
  }
  .black-item:hover{
     background: #2d2d36d0;

+ 1 - 1
src/views/product/index.vue

@@ -133,7 +133,7 @@
             </el-form-item>
             <el-form-item label="产品所属地区" :label-width="formLabelWidth" prop="areaName" >
               <!-- <el-input v-model="dataForm.ZONE" style="width: 90%;" placeholder="请选择产品地区" /> -->
-              <el-select size="small" v-model="dataForm.areaName" filterable  clearable placeholder="请选择产品地区" style="width: 90%" >
+              <el-select size="small" v-model="dataForm.areaName" clearable placeholder="请选择产品地区" style="width: 90%" >
                 <el-option
                 v-for="item in provinceList"
                 :key="item.name"

+ 430 - 0
src/views/product/proindex.vue

@@ -0,0 +1,430 @@
+<template>
+  <div class="app-container">
+    <div class="filter-container" style="margin: 10px 0 10px 0">
+      <!-- 搜索字段 -->
+       <div class="flex">
+            <div class="w_input">
+                <span class="textSpan"> 运营商:</span>
+                <el-select size="small" v-model="body.Isp" clearable placeholder="请选择运营商" style="width: 65%" >
+                <el-option
+                  v-for="item in status"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                />
+                </el-select>
+            </div>
+             <div class="w_input">
+                <span class="textSpan"> 面额:</span>
+                 <el-input
+                        v-model="body.productPrice"
+                        style="width: 65%;"
+                        placeholder="请输入面额"
+                        size="small"
+                        clearable
+                    />
+            </div>
+             <div class="w_input">
+                <span class="textSpan">产品名称:</span>
+                 <el-input
+                        v-model="body.productName"
+                        style="width:65%;"
+                        placeholder="请输入名称"
+                        size="small"
+                        clearable
+                    />
+            </div>
+        </div>
+        <!-- 新增与搜索 -->
+        <div class="flexend"> 
+            <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="handleSearch">搜索</el-button>           
+             <el-button class="classitem" style="marginRight:50px"  type="primary" plain  icon="el-icon-plus"  @click="handleAdd">新增
+            </el-button>   
+        </div>
+        <!-- 表格 -->
+      <el-table v-loading="loading" :data="tableData"  border style="width: 100%">  
+        <!-- <el-table-column type="selection" /> -->
+        <el-table-column label="序号" width="60" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="产品名称" width="180"  align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span>{{ scope.row.productName }}</span>
+          </template>
+        </el-table-column>
+
+        <!-- <el-table-column label="产品编号"  align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span>{{ scope.row.productId }}</span>
+          </template>
+        </el-table-column> -->
+
+        <el-table-column label="产品编码" width="120" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span>{{ scope.row.packageId }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="面额" width="100"  align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span>{{ scope.row.productPrice }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="运营商" width="100" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <!-- 运营商  1 : 移动  2 : 电信  3 : 联通 -->
+            <span v-if="scope.row.operator==1">移动</span>
+            <span v-if="scope.row.operator==2">电信</span>
+            <span v-if="scope.row.operator==3">联通</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="产品所属地区" width="120" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span>{{ scope.row.areaName }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="创建时间" width="170" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <span>{{ scope.row.createTime }}</span>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="操作" fixed="right" width="190" align="center">
+            <template slot-scope="scope">
+              <!--<el-button @click="handRest(scope.row)" type="warning" size="small">重置密码</el-button>-->
+              <el-button size="small" icon="el-icon-edit" type="warning" plain @click="handleEdit(scope.row)">编辑</el-button>
+              <el-button size="small" icon="el-icon-delete" type="danger" plain @click="handleDelete(scope.row,$event)">删除
+              </el-button>
+            </template>
+          </el-table-column>
+
+      </el-table>
+      <!-- 分页 -->
+        <div class="pagination">
+              <el-pagination
+              current-page.sync="page"
+              @size-change="handleSizeChange"
+              :current-page="page"
+              @current-change="handleCurrentChange"
+              :page-sizes="[10, 20, 30, 50]"
+              :page-size="size"
+              layout="total, sizes, prev, pager, next, jumper"
+              background
+              :total="total">
+            </el-pagination>
+        </div>
+      <!-- 添加或修改对话框 -->
+        <el-dialog :title="operation?'新增产品':'编辑产品'" :visible.sync="dialogFormVisible" center>
+          <el-form ref="dataForm" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
+            <el-form-item label="产品名称" :label-width="formLabelWidth" prop="productName" >
+              <el-input v-model.trim="dataForm.productName" style="width: 90%;"  placeholder="请输入产品名称" />
+            </el-form-item>
+            <el-form-item label="面额" :label-width="formLabelWidth"   prop="productPrice">
+              <el-input v-model.trim="dataForm.productPrice" style="width: 90%;"  placeholder="请输入面额" />
+            </el-form-item>
+            <el-form-item label="产品编码" v-if="operation" :label-width="formLabelWidth" prop="packageId" >
+              <el-input v-model.trim="dataForm.packageId"  style="width: 90%;"  placeholder="请输入产品编码" />
+            </el-form-item>
+            <el-form-item label="产品所属地区" :label-width="formLabelWidth" prop="areaName" >
+              <!-- <el-input v-model="dataForm.ZONE" style="width: 90%;" placeholder="请选择产品地区" /> -->
+              <el-select size="small" v-model="dataForm.areaName" clearable placeholder="请选择产品地区" style="width: 90%" >
+                <el-option
+                v-for="item in provinceList"
+                :key="item.name"
+                :label="item.name"
+                :value="item.name"
+                />
+                </el-select>
+            </el-form-item>
+            <el-form-item label="运营商" :label-width="formLabelWidth"  prop="operator">
+               <el-select size="small" v-model="dataForm.operator"  placeholder="请选择运营商" style="width: 90%" >
+                <el-option
+                v-for="item in status"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+                />
+                </el-select>
+            </el-form-item>
+            <el-form-item label="产品类型" :label-width="formLabelWidth"  prop="productType">
+               <el-select size="small" v-model="dataForm.productType"  placeholder="请选择产品类型" style="width: 90%" >
+                <el-option
+                v-for="item in type"
+                :key="item.id"
+                :label="item.name"
+                :value="item.id"
+                />
+                </el-select>
+            </el-form-item>
+
+          </el-form>
+          <div slot="footer" class="dialog-footer">
+            <el-button @click="dialogFormVisible = false">取 消</el-button>
+            <el-button type="primary" @click="submitForm">确 定</el-button>
+          </div>
+        </el-dialog>
+    </div>
+  </div>  
+</template>
+
+<script>
+
+import { Search,province,ProductAdd,ProductEdit,ProductDel }  from '@/api/product'
+export default {
+  data() {
+    return {
+      isDelete:0,
+      body:{
+          productName:"",
+          productPrice:"",
+          Isp:""
+      },
+      provinceList:[],   //省份
+      type:[{
+        id:1,
+        name:"话费"
+      },{
+        id:2,
+        name:"流量"
+      }],
+      status:[{  
+          id:1,
+          name:"移动"
+      },{  
+          id:2,
+          name:"电信"
+      },{  
+          id:3,
+          name:"联通"
+      },
+      ],
+      tableData: [],
+      operation: false, // true:新增, false:编辑
+      dialogFormVisible: false, // 控制弹出框
+      formLabelWidth: '120px',   //新增宽度
+       rules2: {
+        productName: [{ required: true, message: '请输入产品名称', trigger: 'blur' }],
+        productId: [{ required: true, message: '请输入产品编号', trigger: 'blur' }],
+        productType: [{ required: true, message: '请输入产品类型', trigger: 'blur' } ],
+        operator: [{ required: true, message: '请输入运营商', trigger: 'blur' } ],
+        areaName: [{ required: true, message: '请输入所属地区', trigger: 'blur' } ],
+        packageId: [{ required: true, message: '请输入产品编码', trigger: 'blur' } ],
+        productPrice: [{ required: true, message: '请输入面额', trigger: 'blur' } ],
+      },
+      relues:{},
+      dataForm:{
+        productName:"",
+        productPrice:"",
+        areaName:"",
+        operator:"",
+        productType:"",
+        productId:""
+      },
+      page:1,
+      size:10,
+      total:0,
+      loading:false
+    }
+  },
+  created(){
+    this.getTenantList()
+    this.onprovince()   //省份
+  },
+  methods: {
+    //表格数据
+    getTenantList() {
+      this.loading = true
+      const params = new URLSearchParams()
+      params.append('productName', this.body.productName)
+      params.append('productPrice', this.body.productPrice)
+      params.append('operator', this.body.Isp)
+      params.append('current', this.page)
+      params.append('size', this.size)
+      params.append('isDelete', this.isDelete)
+      Search(params).then((res) => {
+        this.loading = false
+        this.tableData=res.data.data.records
+        this.total=res.data.data.total
+      })
+    },
+    //省份数据
+    onprovince(){
+      province().then((res)=>{
+        // console.log(res)
+        let province = res.data.data
+        let arry=province.map((res)=>{
+          return {name:res}
+        })
+       this.provinceList = arry
+      })
+    },
+    //搜索
+    handleSearch(){
+      this.page = 1
+      this.getTenantList()
+    },
+    //新增
+    handleAdd(){
+      this.dialogFormVisible = true
+      this.operation = true
+      this.dataForm={
+        productName:"",
+        productPrice:"",
+        areaName:"",
+        operator:"",
+        productId:""
+      }
+      if(this.$refs['dataForm']){
+               this.$refs['dataForm'].resetFields();
+           }
+    },
+    //编辑
+    handleEdit: function(row) {
+      
+      this.dataForm={}
+      // this.rules2 = {}
+      this.dialogFormVisible = true
+      this.operation = false 
+      let newObj=JSON.parse(JSON.stringify(row))
+      this.dataForm = newObj
+     if(this.$refs['dataForm']){
+               this.$refs['dataForm'].resetFields();
+           }
+      // this.dataForm = Object.assign({}, row)
+      // this.dataForm.jobId = row.jobId
+    },
+    //新增或修改API
+    submitForm(){
+        this.$refs['dataForm'].validate((valid) => {
+          if (valid) {
+            if (!this.operation) {
+              // 编辑
+              ProductEdit(this.dataForm).then(response => {
+                if (response.data.status == 200) {
+                  this.$message({
+                    type: 'success',
+                    message: '操作成功'
+                  })
+                  this.dialogFormVisible = false
+                  this.getTenantList()
+                } else {
+                  this.$message({
+                    type: 'error',
+                    message: response.data.message
+                  })
+                }
+              })
+            } else {
+              console.log(this.dataForm)
+            //   // 添加
+              ProductAdd(this.dataForm).then(response => {
+                console.log(response)
+                if (response.data.status == "200") {
+                  this.$message({
+                    type: 'success',
+                    message: '操作成功'
+                  })
+                  this.dialogFormVisible = false
+                  this.getTenantList()
+                } else {
+                  // console.log("醋味")
+                  // this.$message({
+                  //   type: 'error',
+                  //   message: response.message
+                  // })
+                }
+              })
+            }
+          }
+        })
+    },
+
+    // 删除
+    handleDelete: function(row,e) {
+      const that = this
+      let target=e.target;
+      if(target.nodeName == 'SPAN' || target.nodeName == 'I'){
+            target = e.target.parentNode;
+      }
+       target.blur();
+      this.$confirm('此操作将删除产品:' + row.productName, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+        //  let info={
+        //     isDelete : 1,
+        //     packageId:row.packageId,
+        //   }
+        //   row.isDelete = 1
+          ProductDel(row.productId).then(response => {
+            if (response.status === 200) {
+              this.$message({
+                type: 'success',
+                message: '操作成功'
+              })
+              that.getTenantList()
+            } else {
+              this.$message({
+                type: 'error',
+                message: response.data.msg
+              })
+            }
+          })
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消删除'
+          })
+        })
+    },
+    //分页
+      handleSizeChange:function(val){
+        this.size=val
+        this.getTenantList()
+      },
+       // 换页
+    handleCurrentChange: function(val) {
+      this.page = val
+      this.getTenantList()
+    },
+  }
+}
+</script>
+
+<style scoped>
+.flex{
+     width: 90%;
+     display: flex;
+     flex-direction: row;
+     margin-bottom: 10px;
+     /* flex-wrap: wrap; */
+     justify-content: flex-start;
+ }
+  .w_input{
+     width:35.333%;
+ }
+ .textSpan{
+   position: relative;
+   top: 0;
+     font-size: 14px;
+     font-weight: 600;
+     color:rgb(87, 86, 86)
+ }
+  .flexend{
+   display: flex;
+   justify-content: flex-end;
+   /* padding-right: 2rem; */
+   width: 100%;
+   /* margin: 0 auto; */
+   padding-bottom: 20px;
+ }
+</style>

+ 129 - 0
src/views/test/index.vue

@@ -0,0 +1,129 @@
+<template>
+  <div class="container">
+    <div class="top">
+      <!-- 第一行 -->
+      <div class="flex">
+        <div class="col">
+          <span class="title">订单号:</span>
+          <el-input placeholder="请输入订单号" style="width:65%;"></el-input>
+        </div>
+        <div class="col">
+          <span class="title">手机号:</span>
+          <el-input placeholder="请输入手机号" style="width:65%;"></el-input>
+        </div>
+        <div class="col">
+          <span class="title">通道名称:</span>
+          <el-input placeholder="请输入通道名称" style="width:65%;"></el-input>
+        </div>
+      
+      <!-- 第二行 -->
+        <div class="col">
+          <span class="title">订单状态:</span>
+            <el-select v-model="select" slot="prepend" placeholder="请输入订单状态" style="width:65%;">
+              <el-option label="已发" value="1"></el-option>
+              <el-option label="成功" value="2"></el-option>
+              <el-option label="失败" value="3"></el-option>
+            </el-select>
+        </div>
+        <div class="col">
+          <span class="title">面额:</span>
+          <el-input placeholder="请输入订单号" style="width:65%;"></el-input>
+        </div>
+        <div class="col">
+          <span class="title">归属地:</span>
+            <el-cascader
+             placeholder="请选择归属地"
+             style="width:65%;"
+              v-model="value"
+              :options="options"
+              @change="handleChange"
+            ></el-cascader>
+        </div>
+        <!-- 第三行 -->
+        <div class="col">
+          <span class="title">通道名称:</span>
+          <el-input placeholder="请输入通道名称" style="width:65%;"></el-input>
+        </div>
+        <div class="col">
+          <span class="title">分发ID号:</span>
+            <el-select v-model="select" slot="prepend" placeholder="请输入订单号" style="width:65%;">
+              <el-option label="移动" value="1"></el-option>
+              <el-option label="联通" value="2"></el-option>
+              <el-option label="电信" value="3"></el-option>
+            </el-select>
+        </div>
+        <div class="col senddate" >
+          <span class="title">发送时间:</span>
+          <el-input placeholder="请输入通道名称" style="width:65%;"></el-input>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    data() {
+      return {
+
+        options: [
+          {value: 1,
+          label: '上海',
+            children: [
+              { value: 2, label: '普陀' },
+              { value: 3, label: '黄埔' },
+              { value: 4, label: '徐汇' }
+            ]
+          }, {
+            value: 5,
+            label: '江苏',
+            children: [
+              { value: 6, label: '南京' },
+              { value: 7, label: '苏州' },
+              { value: 8, label: '无锡' }
+            ]
+          }, {
+            value: 9,
+            label: '浙江',
+            children: [
+              { value: 10, label: '杭州' },
+              { value: 11, label: '宁波' },
+              { value: 12, label: '嘉兴' }
+            ]
+          },{
+            value: 13,
+            label: '陕西',
+            children: [
+              { value: 14, label: '西安' },
+              { value: 15, label: '延安' }
+            ]
+          }, {
+            value: 16,
+            label: '新疆维吾尔族自治区',
+            children: [
+              { value: 17, label: '乌鲁木齐' },
+              { value: 18, label: '克拉玛依' }
+            ]
+          }
+          ]
+}
+    }
+  }
+</script>
+<style scoped>
+.top {
+  margin: 13px;
+}
+.flex {
+  width: 100%;
+  display: flex;
+  margin: 6px;
+  flex-wrap: wrap;
+}
+.title {
+  display: inline-block;
+}
+.col {
+  width: 33.33%;
+  margin-bottom: 3px;
+}
+</style>

+ 101 - 287
src/views/userList/account.vue

@@ -2,12 +2,12 @@
   <div class="app-container">
       <div class="filter-container" style="margin: 10px 0 10px 0">
         <span class="textSpan">客户名称:</span>
-        <el-select v-model="body.relationId" filterable  clearable  placeholder="请选择">
+        <el-select v-model="body.customerId" filterable  clearable  placeholder="请选择">
         <el-option
           v-for="item in userList"
-          :key="item.relationId"
+          :key="item.customerId"
           :label="item.customerName"
-          :value="item.relationId">   
+          :value="item.customerId">
         </el-option>
       </el-select>
         <el-button class="filter-item" icon="el-icon-search" type="primary" plain @click="Search">搜索</el-button>
@@ -15,111 +15,81 @@
       </div>
       <!-- 列表 -->
       <el-table v-loading="loading" :data="tableData" border style="width: 100%">
-          <el-table-column label="客户" width="120" align="center" show-overflow-tooltip>
-                <template slot-scope="scope">
-                  <el-button type="text" @click="hookLook(scope.row)">{{ scope.row.customerName }}</el-button>
-                </template>
-              </el-table-column>
-           <el-table-column label="加款金额" width="110" align="center" show-overflow-tooltip>
-                <template slot-scope="scope">
-                  <span>{{ scope.row.amount / 10000 }}</span>
-                </template>
-              </el-table-column>
-                <el-table-column label="出款账户" width="110"  align="center" show-overflow-tooltip>
-                <template slot-scope="scope">
-                  <span>{{ scope.row.paymentAccount }}</span>
+              <el-table-column label="银行卡" width="190"  align="center" show-overflow-tooltip>
+                <template slot-scope="scope"> 
+                  <span>{{ scope.row.cardNo }}</span>
                 </template>
               </el-table-column>
-                 <el-table-column label="开户行"  width="170" align="center" show-overflow-tooltip>
+              <el-table-column label="开户行"  align="center" show-overflow-tooltip>
                 <template slot-scope="scope">
                   <span>{{ scope.row.bankDeposit }}</span>
                 </template>
               </el-table-column>
-              <el-table-column label="全称"  align="center" show-overflow-tooltip>
+              <el-table-column label="账户"  align="center" show-overflow-tooltip>
                 <template slot-scope="scope">
                   <span>{{ scope.row.account }}</span>
                 </template>
               </el-table-column>
-              <el-table-column label="银行卡" width="190"  align="center" show-overflow-tooltip>
-                <template slot-scope="scope"> 
-                  <span>{{ scope.row.cardNo }}</span>
+              <el-table-column label="客户" width="120" align="center" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  <span>{{ scope.row.customerName }}</span>
                 </template>
               </el-table-column>
-           
-            
               <el-table-column label="加款人"  align="center" show-overflow-tooltip>
                 <template slot-scope="scope">
                   <span>{{ scope.row.payer }}</span>
                 </template>
               </el-table-column>
-              <el-table-column label="凭证" width="120"  align="center">
+              <el-table-column label="凭证"  align="center" show-overflow-tooltip>
                 <template slot-scope="scope">
-                  <el-image 
-                    style="width: 100px; height: 80px"
-                    :src="scope.row.certificate" 
-                    :preview-src-list="new Array(scope.row.certificate)">
-                  </el-image>
+                  <span>{{ scope.row.certificate }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="加款金额" align="center" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  <span>{{ scope.row.amount }}</span>
                 </template>
               </el-table-column>
-           
               
-              <el-table-column label="加款时间" width="120" align="center" show-overflow-tooltip>
+              <el-table-column label="加款时间"  align="center" show-overflow-tooltip>
                 <template slot-scope="scope">
                   <span>{{ scope.row.time }}</span>
                 </template>
               </el-table-column>
-            
+              <el-table-column label="出款账户"  align="center" show-overflow-tooltip>
+                <template slot-scope="scope">
+                  <span>{{ scope.row.paymentAccount }}</span>
+                </template>
+              </el-table-column>
 
               <el-table-column label="操作" fixed="right" width="200" align="center">
                 <template slot-scope="scope">
                   <el-button size="small" icon="el-icon-edit" type="warning" plain @click="handleEdit(scope.row)">修改</el-button>
-                  <el-button size="small" icon="el-icon-edit" type="danger" plain @click="handleRevocation(scope.row)">撤销</el-button>
+                  <el-button size="small" icon="el-icon-edit" type="danger" plain @click="handleEdit(scope.row)">撤销</el-button>
                 </template>
               </el-table-column>
       </el-table>
         <!-- 新增加款 -->
       <el-dialog :title="operation?'新增加款':'编辑加款'" :visible.sync="dialogFormVisible" width="55%" center>
-        <el-form ref="dataForm" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
-              <el-form-item label="客户" prop="cardNo" :label-width="formLabelWidth"  >
-                <el-select v-model="dataForm.relationId" filterable  clearable  placeholder="请选择客户" style="width:100%">
-                  <el-option
-                    v-for="item in userList"
-                    :key="item.relationId"
-                    :label="item.customerName"
-                    :value="item.relationId">
-                  </el-option>
-                </el-select>
-              </el-form-item>
-              <!-- <el-form-item label="全称" prop="account" :label-width="formLabelWidth"  >
-                <el-input v-model="dataForm.account" placeholder="请输入" />
-              </el-form-item> -->
+        <el-form ref="AddNewData" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
               <el-form-item label="银行卡" prop="cardNo" :label-width="formLabelWidth"  >
-                 <el-select v-model="dataForm.cardNo" filterable  clearable  placeholder="请选择银行卡" value-key="id" @change="changeSel" style="width:100%">
-                  <el-option
-                    v-for="item in card"
-                    :key="item.id"
-                    :label="item.cardNo"
-                    :value="item">
-                  </el-option>
-                </el-select>
+                <el-input v-model="dataForm.cardNo" placeholder="请输入银行卡" />
               </el-form-item>
-                <!-- <el-form-item label="开户行" prop="bankDeposit" :label-width="formLabelWidth"  >
+                <el-form-item label="供应商账户" prop="bankDeposit" :label-width="formLabelWidth"  >
                 <el-input v-model="dataForm.bankDeposit" placeholder="请输入供应商账户" />
-              </el-form-item> -->
+              </el-form-item>
                 <el-form-item label="加款金额" prop="amount" :label-width="formLabelWidth"  >
                 <el-input v-model="dataForm.amount" placeholder="请输入加款金额" />
-              </el-form-item>
-               <el-form-item label="出款账户" :label-width="formLabelWidth"  >
-                <el-input v-model="dataForm.paymentAccount" placeholder="请输入出款账户" />
               </el-form-item>
                 <!-- <el-form-item label="凭证" :label-width="formLabelWidth"  >
                 <el-input v-model="dataForm.certificate" placeholder="请输入凭证" />
               </el-form-item> -->
               <el-form-item label="凭证" prop="imgUrl" :label-width="formLabelWidth">
-                    <el-upload
+                <el-upload
                 ref = "upload"
                 action="#"
-                list-type="picture-card"       
+                list-type="picture-card"
+             
                 :on-change="handleDownload"
                 :file-list="fileList"
                 :limit="1"
@@ -153,73 +123,18 @@
                 <img width="100%" :src="dialogImageUrl" >
                 </el-dialog>
                 </el-form-item> 
-               
-                <!-- <el-form-item label="备注" :label-width="formLabelWidth"  >
+                <el-form-item label="出款账户" :label-width="formLabelWidth"  >
+                <el-input v-model="dataForm.paymentAccount" placeholder="请输入出款账户" />
+              </el-form-item>
+                <el-form-item label="备注" :label-width="formLabelWidth"  >
                 <el-input v-model="dataForm.distinguish" placeholder="请输入备注" />
-              </el-form-item> -->
+              </el-form-item>
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button @click="dialogFormVisible = false">取 消</el-button>
           <el-button type="primary" @click="submitForm">确 定</el-button>
         </div>
       </el-dialog>
-        <!-- 详情 -->
-      <el-dialog title="详情" :visible.sync="dataFormVisible" width="55%" center>
-        <el-form ref="dataForm" :model="dataForm" :rules="rules2" label-width="80px" size="small" label-position="right">
-              <el-form-item label="客户" prop="cardNo" :label-width="formLabelWidth"  >
-                <el-input v-model="dataForm.customerName" disabled></el-input>
-              </el-form-item>
-              <el-form-item label="全称" prop="account" :label-width="formLabelWidth"  >
-                <el-input v-model="dataForm.account" placeholder="请输入" disabled/>
-              </el-form-item>
-              <el-form-item label="银行卡" prop="cardNo" :label-width="formLabelWidth"  >
-                <el-input v-model="dataForm.cardNo" disabled></el-input>
-              </el-form-item>
-                <el-form-item label="开户行" prop="bankDeposit" :label-width="formLabelWidth"  >
-                <el-input v-model="dataForm.bankDeposit" disabled placeholder="请输入供应商账户" />
-              </el-form-item>
-                <el-form-item label="加款金额" prop="amount" :label-width="formLabelWidth"  >
-                <el-input v-model="dataForm.amount" disabled placeholder="请输入加款金额" />
-              </el-form-item>
-               <el-form-item label="出款账户" :label-width="formLabelWidth"  >
-                <el-input v-model="dataForm.paymentAccount" disabled placeholder="请输入出款账户" />
-              </el-form-item>
-                <el-form-item label="加款人" :label-width="formLabelWidth"  >
-                <el-input v-model="dataForm.payer" disabled placeholder="加款人" />
-                </el-form-item>
-              <el-form-item label="凭证" prop="imgUrl"  :label-width="formLabelWidth">
-                  <el-image 
-                    style="width: 200px; height: 200px"
-                    :src="dataForm.certificate" 
-                    :preview-src-list="new Array(dataForm.certificate)">
-                  </el-image>
-                </el-form-item> 
-               
-                <!-- <el-form-item label="备注" :label-width="formLabelWidth"  >
-                <el-input v-model="dataForm.distinguish" placeholder="请输入备注" />
-              </el-form-item> -->
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-          <el-button @click="dataFormVisible = false">取 消</el-button>
-          <el-button type="primary" @click="dataFormVisible = false">确 定</el-button>
-        </div>
-      </el-dialog>
-
-         <!-- 分页 -->
-    <div class="pagination">
-      <el-pagination
-        current-page.sync="body.current"
-        :current-page="body.current"
-        :page-sizes="[10, 20, 30, 50]"
-        :page-size="body.size"
-        layout="total, sizes, prev, pager, next, jumper"
-        background
-        :total="total"
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-      />
-    </div>
-
 
   </div>
 </template>
@@ -234,13 +149,11 @@ export default {
        body:{
           size:10,
           current:1,
+          distinguish:2,
           customerId:""
       },
        total:0,
-      dataForm:{
-        distinguish:2,
-        type:"customer"
-      },
+      dataForm:{},
       rules2:{
             phoneNo: [{ required: true, message: '请输入手机', trigger: 'blur' } ],
       },
@@ -257,54 +170,22 @@ export default {
         // redenvelopesVOS:[],
         fileList:[],
         url:"",
-        urlList:[],
-        card:[],
-        cardNo:"",
-        dataFormVisible:false
+        urlList:[]
+
     }
   },
   created(){
     this.user()
     this.reLoad()
-    this.bankcardURL()
   },
   methods: {
-    //银行卡
-    bankcardURL(){
-      let distinguish = {
-        distinguish:2,
-        relationId:""
-        }
-      api.account.bankcard(distinguish).then((res)=>{
-        this.card = res.data.data
-        console.log(this.card)
-      })
-    },
-    //银行卡下拉选择
-    changeSel(row){
-      this.dataForm.account = row.account
-      this.dataForm.bankDeposit = row.bankDeposit
-      this.dataForm.cardNo = row.cardNo
-    },
-    //客户名称
     user(){
       let user = "{customerName}"
       api.account.userList(user).then((res) => {
         this.loading =false
-        let userList = res.data.data
-        userList.map((res)=>{
-          // let user = {
-          //   relationId:res.customerId,
-          //   customerName:res.customerName
-          // }
-          res.relationId = res.customerId.toString()
-          delete res.customerId
-          return res
-        })
-        this.userList = userList
+        this.userList = res.data.data
       })
     },
-    //表格数据
     reLoad(){
       this.loading = true
       api.account.Search(this.body).then((res) => {
@@ -313,125 +194,51 @@ export default {
         this.total = res.data.data.total
       })
     },
-    //查看
-    hookLook(row){
-      let code = JSON.parse(JSON.stringify(row)) 
-      code.amount = code.amount / 10000
-      this.dataForm = code
-      this.dataFormVisible = true
+    Search(){
+      this.body.current = 1
+      this.reLoad()
     },
     //新增
     handlerAdd(){
       this.operation = true // true:新增, false:编辑
             this.dialogFormVisible = true // 控制弹出框
             this.dataForm = {}
-            this.imgurl = ""
-            this.fileList=[]   //图片
-            this.cardNo = ""
             if(this.$refs['dataForm']){
                  this.$refs['dataForm'].resetFields();
             }
     },
-    //编辑
-    handleEdit(row){
-      //图片的判断
-      if(row.certificate){
-            let obj=new Object()
-            obj.url=row.certificate
-            let list=new Array()
-            list.push(obj)
-            this.fileList=list
-        }else{
-            this.fileList=[]
-        }
-      
-    
-      let code = JSON.parse(JSON.stringify(row)) 
-         code.amount = code.amount / 10000
+    //新增和修改API
+        submitForm(){
          
-      this.dataForm = code
-      console.log(row)
-      if(this.$refs['dataForm']){
-            this.$refs['dataForm'].resetFields();
-      }
-      this.operation = false
-      this.dialogFormVisible = true
-    },
-    //撤销
-    handleRevocation(row){
-            row.undo = 1
-            row.type = "customer"
-            let that = this
-            that.$confirm('是否撤销该数据', '提示', {
-                confirmButtonText: '确定',
-                cancelButtonText: '取消',
-                type: 'warning'
-            })
-            .then(() => {
-                api.account.revocation(row).then((res)=>{
-                     if (res.status === 200) {
-                        that.$message({
+          this.$refs['dataForm'].validate((valid) => {
+                  if (valid) {
+                    if (!this.operation) {
+
+                    } else {
+                      console.log(this.dataForm)
+                    //   // 添加
+                    let dataForm = this.dataForm
+                    let list = []
+                    list.push(dataForm)
+                      api.add(list).then(response => {
+                        if (response.status === 200) {
+                          this.$message({
                             type: 'success',
-                            message: '成功拉入黑名单'
-                        })
-                        that.getTenantList()
-                     } else {
-                        that.$message({
+                            message: '操作成功'
+                          })
+                          this.dialogFormVisible = false
+                          this.reLoad()
+                        } else {
+                          this.$message({
                             type: 'error',
-                            message: res.msg
-                        })
-                     }
-                })
-            })    
-    },
-    //新增和修改API
-      submitForm(){
-        this.dataForm.distinguish=2
-        this.dataForm.type="customer"
-        // this.dataForm.undo = 0
-          let dataForm = this.dataForm
-        this.$refs['dataForm'].validate((valid) => {
-                if (valid) {
-                  if (!this.operation) {
-                    api.account.paymentUpdate(dataForm).then(response => {
-                      if (response.status === 200) {
-                        this.$message({
-                          type: 'success',
-                          message: '操作成功'
-                        })
-                        this.dialogFormVisible = false
-                        this.reLoad()
-                      } else {
-                        this.$message({
-                          type: 'error',
-                          message: response.data.msg
-                        })
-                      }
-                    })
-                  } else {
-                    console.log(this.dataForm)
-                  //   // 添加
-                
-
-                    api.account.paymentAdd(dataForm).then(response => {
-                      if (response.status === 200) {
-                        this.$message({
-                          type: 'success',
-                          message: '操作成功'
-                        })
-                        this.dialogFormVisible = false
-                        this.reLoad()
-                      } else {
-                        this.$message({
-                          type: 'error',
-                          message: response.data.msg
-                        })
-                      }
-                    })
+                            message: response.data.msg
+                          })
+                        }
+                      })
+                    }
                   }
-                }
-              })
-      },
+                })
+        },
      //清除图片
      handleRemove(file) {
         this.$refs.upload.clearFiles()
@@ -449,7 +256,7 @@ export default {
         params.append('file', event.raw)
         api.account.Upload(params).then((res)=>{
           if(res.data.status == 200){
-                let image=res.data.data
+                let image=res.data.image_url
                 this.dataForm.certificate=image
                 console.log(res)
             }else{
@@ -459,31 +266,38 @@ export default {
                 });
             } 
         })
-
+      //   axios({
+      //   method: 'post',
+      //   url: `http://47.108.168.172:6888/up_photo`,
+      //   // headers:{
+      //   //     "Content-Type": "multipart/form-data"
+      //   // },
+      //   data:params
+      // },)
+      //   .then(response => {
+      //       if(response.data.status == 200){
+      //           let image=response.data.image_url
+      //           this.dataForm.imgUrl=image
+      //       }else{
+      //           this.$notify.error({
+      //           title: '错误',
+      //           message: response.msg
+      //           });
+      //       } 
+      //   })
+      //   .catch(error => {
+      //     this.$notify.error({
+      //     title: '错误',
+      //     message: response.msg
+      //   });
+      //   });
 
       },   
-        //搜索
-    Search() {
-      this.body.current = 1
-      this.reLoad()
-    },
-    //页码
-    handleSizeChange(val) {
-      this.body.size = val
-      this.reLoad()
-    },
-    //换页
-    handleCurrentChange(val) {
-      this.body.current = val
-      this.reLoad()
-    }
   },
 
 }
 </script>
 
-<style >
-.el-upload-list__item {
-  transition: none !important;
-}
+<style>
+
 </style>

+ 2 - 2
src/views/userList/index.vue

@@ -750,7 +750,7 @@ export default {
         type: 'warning'
       }).then(() => {
         row.isDeleted = 1
-        api.index.customerDelect(row.customerId).then((resp)=>{
+        api.index.update(row).then((resp)=>{
           if (resp.status === 200) {
             this.$message({
               type: 'success',
@@ -1086,7 +1086,7 @@ export default {
       }).then(()=>{
         let code = JSON.parse(JSON.stringify(row))
         code.status = i   // 2:暂停   1:有效
-        api.index.customerValid(code.customerId,code.status).then(response => {
+        api.index.update(code).then(response => {
         if (response.status === 200) {
           this.$message({
             type: 'success',

部分文件因文件數量過多而無法顯示