Browse Source

Merge branch 'test' of https://gitee.com/hcst/adsp-vue into test

zhuxinbo 5 years ago
parent
commit
ad7a79e45f

+ 194 - 0
src/views/modules/agent/KuaishouAgentAccountList.vue

@@ -0,0 +1,194 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="广告主ID">
+              <a-input placeholder="请输入广告主ID" v-model="queryParam.accountId"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="广告主名称">
+              <a-input placeholder="请输入广告主名称" v-model="queryParam.accountName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="公司名称">
+              <a-input placeholder="请输入公司名称" v-model="queryParam.corporationName"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8" >
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <a-button type="primary" icon="download" @click="handleExportXls('快手代理商账户表')">导出</a-button>
+    </div>
+
+    <!-- table区域-begin -->
+    <div>
+
+      <a-table
+        ref="table"
+        size="middle"
+        bordered
+        rowKey="id"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        @change="handleTableChange">
+
+      </a-table>
+    </div>
+    <!-- table区域-end -->
+  </a-card>
+</template>
+
+<script>
+  import KuaishouAgentAccountModal from './modules/KuaishouAgentAccountModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: "KuaishouAgentAccountList",
+    mixins:[JeecgListMixin],
+    components: {
+      KuaishouAgentAccountModal
+    },
+    data () {
+      return {
+        description: '快手代理商账户表管理页面',
+        // 表头
+        columns: [
+		   {
+            title: '广告主ID',
+            align:"center",
+            dataIndex: 'accountId',
+          },
+          {
+            title: '用户ID',
+            align:"center",
+            dataIndex: 'userId'
+          },
+		   {
+            title: '广告主名称',
+            align:"center",
+            dataIndex: 'accountName'
+           },
+		   {
+            title: '现金余额',
+            align:"center",
+            dataIndex: 'balance'
+           },
+		   {
+            title: '信用余额',
+            align:"center",
+            dataIndex: 'creditBalance'
+           },
+		   // {
+       //      title: 'extendedBalance',
+       //      align:"center",
+       //      dataIndex: 'extendedBalance'
+       //     },
+		   {
+            title: '返点余额',
+            align:"center",
+            dataIndex: 'rebate'
+           },
+		   // {
+       //      title: 'preRebate',
+       //      align:"center",
+       //      dataIndex: 'preRebate'
+       //     },
+		   {
+            title: '框返余额',
+            align:"center",
+            dataIndex: 'contractRebate'
+           },
+		   {
+            title: '激励余额',
+            align:"center",
+            dataIndex: 'directRebate'
+           },
+		   {
+            title: '总余额',
+            align:"center",
+            dataIndex: 'totalBalance'
+           },
+		   // {
+       //      title: 'kuaibiBalance',
+       //      align:"center",
+       //      dataIndex: 'kuaibiBalance'
+       //     },
+		   // {
+       //      title: 'pushBalance',
+       //      align:"center",
+       //      dataIndex: 'pushBalance'
+       //     },
+		   // {
+       //      title: 'recharged',
+       //      align:"center",
+       //      dataIndex: 'recharged'
+       //     },
+		   {
+            title: '公司名称',
+            align:"center",
+            dataIndex: 'corporationName'
+           },
+		   {
+            title: '审核状态',
+            align:"center",
+            dataIndex: 'reviewStatus',
+             customRender: (text, row, index) => {
+               if (text == 1) { // 前4行数据以a标签的形式被渲染
+                 return '审核中'
+               }else if(text == 2){
+                 return '审核通过'
+               }else if(text == 3){
+                 return '审核拒绝';
+               }
+             }
+           },
+		   // {
+       //      title: 'frozenStatus',
+       //      align:"center",
+       //      dataIndex: 'frozenStatus'
+       //     },
+		   // {
+       //      title: 'transferAccountStatus',
+       //      align:"center",
+       //      dataIndex: 'transferAccountStatus'
+       //     },
+        ],
+		url: {
+          list: "/kuaishou/kuaishouAgentAccount/list",
+          delete: "/kuaishou/kuaishouAgentAccount/delete",
+          deleteBatch: "/kuaishou/kuaishouAgentAccount/deleteBatch",
+          exportXlsUrl: "kuaishou/kuaishouAgentAccount/exportXls",
+       },
+    }
+  },
+  computed: {
+    importExcelUrl: function(){
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+    methods: {
+     
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 220 - 0
src/views/modules/agent/modules/KuaishouAgentAccountModal.vue

@@ -0,0 +1,220 @@
+<template>
+  <a-modal
+    :title="title"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="关闭">
+    
+    <a-spin :spinning="confirmLoading">
+      <a-form :form="form">
+      
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="accountId">
+          <a-input placeholder="请输入accountId" v-decorator="['accountId', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="accountName">
+          <a-input placeholder="请输入accountName" v-decorator="['accountName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="balance">
+          <a-input-number v-decorator="[ 'balance', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="creditBalance">
+          <a-input-number v-decorator="[ 'creditBalance', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="extendedBalance">
+          <a-input-number v-decorator="[ 'extendedBalance', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="rebate">
+          <a-input-number v-decorator="[ 'rebate', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="preRebate">
+          <a-input-number v-decorator="[ 'preRebate', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="contractRebate">
+          <a-input-number v-decorator="[ 'contractRebate', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="directRebate">
+          <a-input-number v-decorator="[ 'directRebate', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="totalBalance">
+          <a-input-number v-decorator="[ 'totalBalance', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="kuaibiBalance">
+          <a-input-number v-decorator="[ 'kuaibiBalance', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="pushBalance">
+          <a-input-number v-decorator="[ 'pushBalance', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="recharged">
+          <a-input placeholder="请输入recharged" v-decorator="['recharged', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="corporationName">
+          <a-input placeholder="请输入corporationName" v-decorator="['corporationName', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="reviewStatus">
+          <a-input-number v-decorator="[ 'reviewStatus', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="frozenStatus">
+          <a-input-number v-decorator="[ 'frozenStatus', {}]" />
+        </a-form-item>
+        <a-form-item
+          :labelCol="labelCol"
+          :wrapperCol="wrapperCol"
+          label="transferAccountStatus">
+          <a-input placeholder="请输入transferAccountStatus" v-decorator="['transferAccountStatus', {}]" />
+        </a-form-item>
+		
+      </a-form>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+  import { httpAction } from '@/api/manage'
+  import pick from 'lodash.pick'
+  import moment from "moment"
+
+  export default {
+    name: "KuaishouAgentAccountModal",
+    data () {
+      return {
+        title:"操作",
+        visible: false,
+        model: {},
+        labelCol: {
+          xs: { span: 24 },
+          sm: { span: 5 },
+        },
+        wrapperCol: {
+          xs: { span: 24 },
+          sm: { span: 16 },
+        },
+
+        confirmLoading: false,
+        form: this.$form.createForm(this),
+        validatorRules:{
+        },
+        url: {
+          add: "/kuaishou/kuaishouAgentAccount/add",
+          edit: "/kuaishou/kuaishouAgentAccount/edit",
+        },
+      }
+    },
+    created () {
+    },
+    methods: {
+      add () {
+        this.edit({});
+      },
+      edit (record) {
+        this.form.resetFields();
+        this.model = Object.assign({}, record);
+        this.visible = true;
+        this.$nextTick(() => {
+          this.form.setFieldsValue(pick(this.model,'accountId','accountName','balance','creditBalance','extendedBalance','rebate','preRebate','contractRebate','directRebate','totalBalance','kuaibiBalance','pushBalance','recharged','corporationName','reviewStatus','frozenStatus','transferAccountStatus'))
+		  //时间格式化
+        });
+
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        const that = this;
+        // 触发表单验证
+        this.form.validateFields((err, values) => {
+          if (!err) {
+            that.confirmLoading = true;
+            let httpurl = '';
+            let method = '';
+            if(!this.model.id){
+              httpurl+=this.url.add;
+              method = 'post';
+            }else{
+              httpurl+=this.url.edit;
+               method = 'put';
+            }
+            let formData = Object.assign(this.model, values);
+            //时间格式化
+            
+            console.log(formData)
+            httpAction(httpurl,formData,method).then((res)=>{
+              if(res.success){
+                that.$message.success(res.message);
+                that.$emit('ok');
+              }else{
+                that.$message.warning(res.message);
+              }
+            }).finally(() => {
+              that.confirmLoading = false;
+              that.close();
+            })
+
+
+
+          }
+        })
+      },
+      handleCancel () {
+        this.close()
+      },
+
+
+    }
+  }
+</script>
+
+<style lang="less" scoped>
+
+</style>

+ 1 - 1
vue.config.js

@@ -71,7 +71,7 @@ module.exports = {
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目
         // target: 'http://192.168.2.115:8080', //请求本地 需要jeecg-boot后台项目  祚云
         // target: 'http://192.168.2.132:8080', //请求本地 需要jeecg-boot后台项目  孙震
-
+        target:'http://127.0.0.1:8080',
         ws: false,
         changeOrigin: true
       },