ymy hai 1 ano
pai
achega
5b02f73723

+ 37 - 0
src/api/distribution.ts

@@ -0,0 +1,37 @@
+import request from '@/benyun/utils/request'
+
+//分销等级
+export function saleRankList(data?:any){
+	return request({
+		url: '/omsOrder/saleRank/page',
+		method: 'GET',
+		params: data
+	})
+}
+
+//分销用户
+export function userRankList(data?:any){
+	return request({
+		url: '/omsOrder/userRank/page',
+		method: 'GET',
+		params: data
+	})
+}
+
+//分销员
+export function userBalanceList(data?:any){
+	return request({
+		url: '/omsOrder/userBalance/page',
+		method: 'GET',
+		params: data
+	})
+}
+
+//带货
+export function influenceList(data?:any){
+	return request({
+		url: '/omsOrder/influence/page',
+		method: 'GET',
+		params: data
+	})
+}

+ 204 - 0
src/views/oms/distributionAd/components/distributionDevel.vue

@@ -0,0 +1,204 @@
+<template>
+  <div class="distribution">
+    <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @onRefresh="getList" @resert="queryList" @search="queryList" />
+  </div>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import { saleRankList } from '@/api/distribution'
+@Component({components:{}})
+export default class DistributionDevel extends Vue {
+  config:any={
+    attr:{
+      calculateH:true
+    },
+    // search:{
+    //   attr:{
+    //     size:'small'
+    //   },
+    //   columns:[
+    //     [{
+    //       label:'内部订单号',
+    //       prop:'orderId',
+    //       component:'by-input'
+    //     },{
+    //       label:'买家ID',
+    //       prop:'buyerId',
+    //       component:'by-input'
+    //     },{
+    //       label:'买家帐号',
+    //       prop:'buyerAccount',
+    //       component:'by-input'
+    //     },{
+    //       label:'审核状态',
+    //       prop:'status',
+    //       component:'by-select',
+    //       compConfig:{
+    //         attr:{
+    //           clearable:true,
+    //           data:[{
+    //             label:'待审核',
+    //             value:'WaitConfirm'
+    //           },{
+    //             label:'已审核',
+    //             value:'Confirmed'
+    //           },{
+    //             label:'已失效',
+    //             value:'Invalid'
+    //           }]
+    //         }
+    //       }
+    //     }],
+    //     [{
+    //       span:6,
+    //       label:'支付渠道',
+    //       prop:'payment',
+    //       component:'by-input'
+    //     },{
+    //       span:6,
+    //       label:'卖家ID',
+    //       prop:'sellerId',
+    //       component:'by-input'
+    //     },{
+    //       span:6,
+    //       label:'卖家账号',
+    //       prop:'sellerAccount',
+    //       component:'by-input'
+    //     }
+    //     // ,{
+    //     //   label:'支付时间',
+    //     //   prop:'payDate',
+    //     //   component:'by-date-picker',
+    //     //   compConfig:{
+    //     //     attr:{
+    //     //       editable:false,
+    //     //       type:'datetimerange',
+    //     //       format:'yyyy-MM-dd HH:mm:ss'
+    //     //     }
+    //     //   }
+    //     // }
+    //     ]
+    //   ]
+    // },
+    tool:{
+      tools:{
+        // search:true,
+        refresh:true
+      }
+    },
+    table:{
+      attr:{
+        size:'mini',
+        seq:true,
+        // align:'center',
+      },
+      columns:[{
+        title:'一级费率',
+        field:'rate1',
+        width:120
+      },{
+        title:'二级费率',
+        field:'rate2',
+        width:120,
+      },{
+        title:'三级费率',
+        field:'rate3',
+        width:120
+      },{
+        title:'提示文字',
+        field:'tip'
+      },{
+        title:'招募计划',
+        field:'plan',
+        width:120
+      },{
+        title:'背景',
+        field:'background',
+        width:120
+      },{
+        title:'最大费率',
+        field:'maxRate',
+        width:120
+      },{
+        title:'最小费率',
+        field:'minRate',
+        width:120
+      },{
+        title:'应用ID',
+        field:'appId',
+        width:120
+      },{
+        title:'流程ID',
+        field:'processId',
+        width:120
+      },{
+        title:'状态',
+        field:'status',
+        width:140
+      }]
+    }
+  }
+  load=false
+  isSearch=false
+  timeNum = 0;
+  mounted(){
+    this.$nextTick(()=>{
+      this.getList()
+    })
+  }
+  //分页
+  pagination(){
+    if(this.isSearch){
+      this.queryList();
+    }else{
+      this.getList()
+    }
+  }
+  //列表请求(只有分页,不包含搜素条件)
+  getList(){
+    if(!this.$refs.view){
+      if(this.timeNum > 5){
+        return
+      }
+      setTimeout(()=>{
+        this.getList()
+      },500) 
+      this.timeNum ++;
+      return
+    }
+    this.isSearch = false;
+    let data = (this.$refs.view as any).getPage();
+    this.requestList(data);
+  }
+  //列表请求(包含分页和搜素条件)
+  queryList(){
+    this.isSearch = true;
+    let data = (this.$refs.view as any).getQuery();
+    this.requestList(data);
+  }
+  requestList(data:any){
+    this.load = true;
+    saleRankList(data).then((res:any) => {
+      this.load = false;
+      (this.$refs.view as any).setTableValue(res.data.records);
+      let page = {
+        pageNo: res.data.current, //当前页
+        pageSize: res.data.size, //每页条数
+        total: res.data.total //总条数
+      };
+      (this.$refs.view as any).setPage(page)
+
+    }).catch(()=>{
+      this.load = false;
+    })
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.distribution{
+  width: 100%;
+  height: 100%;
+}
+</style>

+ 108 - 0
src/views/oms/distributionAd/components/influenceList.vue

@@ -0,0 +1,108 @@
+<template>
+  <div class="distribution">
+    <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @onRefresh="getList" @resert="queryList" @search="queryList" />
+  </div>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import { influenceList } from '@/api/distribution'
+@Component({components:{}})
+export default class InfluenceList extends Vue {
+  config:any={
+    attr:{
+      calculateH:true
+    },
+    tool:{
+      tools:{
+        // search:true,
+        refresh:true
+      }
+    },
+    table:{
+      attr:{
+        size:'mini',
+        seq:true,
+        // align:'center',
+      },
+      columns:[{
+        title:'商品ID',
+        field:'productId',
+      },{
+        title:'应用ID',
+        field:'appId',
+      },{
+        title:'用户ID',
+        field:'userId',
+      },{
+        title:'分享时间',
+        field:'shareTime',
+      },{
+        title:'流程ID',
+        field:'processId',
+      }]
+    }
+  }
+  load=false
+  isSearch=false
+  timeNum = 0;
+  mounted(){
+    this.$nextTick(()=>{
+      this.getList()
+    })
+  }
+  //分页
+  pagination(){
+    if(this.isSearch){
+      this.queryList();
+    }else{
+      this.getList()
+    }
+  }
+  //列表请求(只有分页,不包含搜素条件)
+  getList(){
+    if(!this.$refs.view){
+      if(this.timeNum > 5){
+        return
+      }
+      setTimeout(()=>{
+        this.getList()
+      },500) 
+      this.timeNum ++;
+      return
+    }
+    this.isSearch = false;
+    let data = (this.$refs.view as any).getPage();
+    this.requestList(data);
+  }
+  //列表请求(包含分页和搜素条件)
+  queryList(){
+    this.isSearch = true;
+    let data = (this.$refs.view as any).getQuery();
+    this.requestList(data);
+  }
+  requestList(data:any){
+    this.load = true;
+    influenceList(data).then((res:any) => {
+      this.load = false;
+      (this.$refs.view as any).setTableValue(res.data.records);
+      let page = {
+        pageNo: res.data.current, //当前页
+        pageSize: res.data.size, //每页条数
+        total: res.data.total //总条数
+      };
+      (this.$refs.view as any).setPage(page)
+
+    }).catch(()=>{
+      this.load = false;
+    })
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.distribution{
+  width: 100%;
+  height: 100%;
+}
+</style>

+ 217 - 0
src/views/oms/distributionAd/components/userBalanceList.vue

@@ -0,0 +1,217 @@
+<template>
+  <div class="distribution">
+    <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @onRefresh="getList" @resert="queryList" @search="queryList" />
+  </div>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import { userBalanceList } from '@/api/distribution'
+@Component({components:{}})
+export default class DistributionDevel extends Vue {
+  config:any={
+    attr:{
+      calculateH:true
+    },
+    // search:{
+    //   attr:{
+    //     size:'small'
+    //   },
+    //   columns:[
+    //     [{
+    //       label:'内部订单号',
+    //       prop:'orderId',
+    //       component:'by-input'
+    //     },{
+    //       label:'买家ID',
+    //       prop:'buyerId',
+    //       component:'by-input'
+    //     },{
+    //       label:'买家帐号',
+    //       prop:'buyerAccount',
+    //       component:'by-input'
+    //     },{
+    //       label:'审核状态',
+    //       prop:'status',
+    //       component:'by-select',
+    //       compConfig:{
+    //         attr:{
+    //           clearable:true,
+    //           data:[{
+    //             label:'待审核',
+    //             value:'WaitConfirm'
+    //           },{
+    //             label:'已审核',
+    //             value:'Confirmed'
+    //           },{
+    //             label:'已失效',
+    //             value:'Invalid'
+    //           }]
+    //         }
+    //       }
+    //     }],
+    //     [{
+    //       span:6,
+    //       label:'支付渠道',
+    //       prop:'payment',
+    //       component:'by-input'
+    //     },{
+    //       span:6,
+    //       label:'卖家ID',
+    //       prop:'sellerId',
+    //       component:'by-input'
+    //     },{
+    //       span:6,
+    //       label:'卖家账号',
+    //       prop:'sellerAccount',
+    //       component:'by-input'
+    //     }
+    //     // ,{
+    //     //   label:'支付时间',
+    //     //   prop:'payDate',
+    //     //   component:'by-date-picker',
+    //     //   compConfig:{
+    //     //     attr:{
+    //     //       editable:false,
+    //     //       type:'datetimerange',
+    //     //       format:'yyyy-MM-dd HH:mm:ss'
+    //     //     }
+    //     //   }
+    //     // }
+    //     ]
+    //   ]
+    // },
+    tool:{
+      tools:{
+        // search:true,
+        refresh:true
+      }
+    },
+    table:{
+      attr:{
+        size:'mini',
+        seq:true,
+        // align:'center',
+      },
+      columns:[{
+        title:'分销订单数',
+        field:'orderQuantity',
+        width:120
+      },{
+        title:'余额',
+        field:'balance',
+        width:120,
+      },{
+        title:'已结算金额',
+        field:'overBalance',
+        width:120
+      },{
+        title:'待结算余额',
+        field:'waitBalance',
+        width:120
+      },{
+        title:'不予结算余额',
+        field:'unableBalance',
+        width:120
+      },{
+        title:'用户名',
+        field:'username',
+        width:120
+      },{
+        title:'下级数量',
+        field:'childQuantity',
+        width:120
+      },{
+        title:'收款资料',
+        field:'collectionInfo',
+        width:120
+      },{
+        title:'一级分佣金额',
+        field:'oneAmount',
+        width:120
+      },{
+        title:'二级分佣金额',
+        field:'twoAmount',
+        width:120
+      },{
+        title:'三级分佣金额',
+        field:'threeAmount',
+        width:120
+      },{
+        title:'应用ID',
+        field:'appId',
+        width:120
+      },{
+        title:'流程ID',
+        field:'processId',
+        width:120
+      },{
+        title:'状态',
+        field:'status',
+        width:140
+      }]
+    }
+  }
+  load=false
+  isSearch=false
+  timeNum = 0;
+  mounted(){
+    this.$nextTick(()=>{
+      this.getList()
+    })
+  }
+  //分页
+  pagination(){
+    if(this.isSearch){
+      this.queryList();
+    }else{
+      this.getList()
+    }
+  }
+  //列表请求(只有分页,不包含搜素条件)
+  getList(){
+    if(!this.$refs.view){
+      if(this.timeNum > 5){
+        return
+      }
+      setTimeout(()=>{
+        this.getList()
+      },500) 
+      this.timeNum ++;
+      return
+    }
+    this.isSearch = false;
+    let data = (this.$refs.view as any).getPage();
+    this.requestList(data);
+  }
+  //列表请求(包含分页和搜素条件)
+  queryList(){
+    this.isSearch = true;
+    let data = (this.$refs.view as any).getQuery();
+    this.requestList(data);
+  }
+  requestList(data:any){
+    this.load = true;
+    userBalanceList(data).then((res:any) => {
+      this.load = false;
+      (this.$refs.view as any).setTableValue(res.data.records);
+      let page = {
+        pageNo: res.data.current, //当前页
+        pageSize: res.data.size, //每页条数
+        total: res.data.total //总条数
+      };
+      (this.$refs.view as any).setPage(page)
+
+    }).catch(()=>{
+      this.load = false;
+    })
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.distribution{
+  width: 100%;
+  height: 100%;
+}
+</style>

+ 108 - 0
src/views/oms/distributionAd/components/userRank.vue

@@ -0,0 +1,108 @@
+<template>
+  <div class="distribution">
+    <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @onRefresh="getList" @resert="queryList" @search="queryList" />
+  </div>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import { userRankList } from '@/api/distribution'
+@Component({components:{}})
+export default class DistributionUser extends Vue {
+  config:any={
+    attr:{
+      calculateH:true
+    },
+    tool:{
+      tools:{
+        // search:true,
+        refresh:true
+      }
+    },
+    table:{
+      attr:{
+        size:'mini',
+        seq:true,
+        // align:'center',
+      },
+      columns:[{
+        title:'级别',
+        field:'grade',
+      },{
+        title:'应用ID',
+        field:'appId',
+      },{
+        title:'用户ID',
+        field:'userId',
+      },{
+        title:'父ID',
+        field:'parentId',
+      },{
+        title:'流程ID',
+        field:'processId',
+      }]
+    }
+  }
+  load=false
+  isSearch=false
+  timeNum = 0;
+  mounted(){
+    this.$nextTick(()=>{
+      this.getList()
+    })
+  }
+  //分页
+  pagination(){
+    if(this.isSearch){
+      this.queryList();
+    }else{
+      this.getList()
+    }
+  }
+  //列表请求(只有分页,不包含搜素条件)
+  getList(){
+    if(!this.$refs.view){
+      if(this.timeNum > 5){
+        return
+      }
+      setTimeout(()=>{
+        this.getList()
+      },500) 
+      this.timeNum ++;
+      return
+    }
+    this.isSearch = false;
+    let data = (this.$refs.view as any).getPage();
+    this.requestList(data);
+  }
+  //列表请求(包含分页和搜素条件)
+  queryList(){
+    this.isSearch = true;
+    let data = (this.$refs.view as any).getQuery();
+    this.requestList(data);
+  }
+  requestList(data:any){
+    this.load = true;
+    userRankList(data).then((res:any) => {
+      this.load = false;
+      (this.$refs.view as any).setTableValue(res.data.records);
+      let page = {
+        pageNo: res.data.current, //当前页
+        pageSize: res.data.size, //每页条数
+        total: res.data.total //总条数
+      };
+      (this.$refs.view as any).setPage(page)
+
+    }).catch(()=>{
+      this.load = false;
+    })
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.distribution{
+  width: 100%;
+  height: 100%;
+}
+</style>

+ 56 - 0
src/views/oms/distributionAd/index.vue

@@ -0,0 +1,56 @@
+<template>
+  <div class="distributionAd">
+    <el-tabs v-model="activeName">
+      <el-tab-pane label="分销等级" name="first">
+        <DistributionDevel v-if="activeName == 'first'" />
+      </el-tab-pane>
+      <el-tab-pane label="分销用户" name="second">
+        <userRank v-if="activeName == 'second'"  />
+      </el-tab-pane>
+      <el-tab-pane label="分销员" name="third">
+        <userBalanceList v-if="activeName == 'third'"  />
+      </el-tab-pane>
+      <el-tab-pane label="带货" name="thord">
+        <InfluenceList v-if="activeName == 'thord'"  />
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import DistributionDevel from "./components/distributionDevel.vue";
+import userRank from "./components/userRank.vue"
+import userBalanceList from './components/userBalanceList.vue'
+import InfluenceList from './components/influenceList.vue'
+@Component({components:{DistributionDevel,userRank,userBalanceList,InfluenceList}})
+export default class DistributionAd extends Vue {
+  activeName:string='first'
+}
+</script>
+
+<style lang="scss">
+.distributionAd{
+  width: 100%;
+  height: 100%;
+  box-sizing: border-box;
+  padding: 0 16px;
+  .el-tabs{
+    width: 100%;
+    height: 100%;
+  }
+  .el-tabs__header{
+    margin: 0 !important;
+  }
+  .el-tabs__content{
+    height: calc(100% - 40px);
+    padding-top: 8px;
+    box-sizing: border-box;
+    overflow: hidden;
+    .el-tab-pane{
+      width: 100%;
+      height: 100%;
+    }
+  }
+}
+</style>

+ 1 - 1
src/views/oms/jushuitanOrder/compoments/sendGoods.vue

@@ -29,7 +29,7 @@
       <vxe-column field="senderInfo" title="发件信息" show-overflow show-footer-overflow width="200"> </vxe-column>
       <vxe-column field="createTime" title="创建时间" width="140"> </vxe-column>
       <vxe-column title="操作" width="120" fixed="right" align="center">
-      <template #default="{ row,rowIndex }">
+      <template #default="{ row }">
         <el-button type="text" size="mini" @click="detailProduct(row)">查看商品</el-button>
         <el-button type="text" size="mini" @click="printClick(row)">打印</el-button>
       </template>