ymy hace 1 año
padre
commit
20875c5f21

+ 43 - 1
src/api/distribution.ts

@@ -8,7 +8,22 @@ export function saleRankList(data?:any){
 		params: data
 	})
 }
-
+//新增分销等级
+export function saleRankAdd(data?:any){
+	return request({
+		url: '/omsOrder/saleRank/save',
+		method: 'POST',
+		data: data
+	})
+}
+//修改分销等级
+export function saleRankUpdate(data?:any){
+	return request({
+		url: '/omsOrder/saleRank/update',
+		method: 'POST',
+		data: data
+	})
+}
 //分销用户
 export function userRankList(data?:any){
 	return request({
@@ -34,4 +49,31 @@ export function influenceList(data?:any){
 		method: 'GET',
 		params: data
 	})
+}
+
+//sku列表
+export function skuList(data?:any){
+	return request({
+		url: '/maindata/maindataMaterialSku/page',
+		method: 'GET',
+		params: data
+	})
+}
+
+//佣金设置
+export function productCommissionSave(data?:any){
+	return request({
+		url: '/omsOrder/productCommission/save',
+		method: 'POST',
+		data: data
+	})
+}
+
+//佣金查询
+export function productCommissionQueryByProductId(data?:any){
+	return request({
+		url: '/omsOrder/productCommission/queryByProductId',
+		method: 'GET',
+		params: data
+	})
 }

+ 4 - 1
src/benyun/components/byInput/byInput.vue

@@ -45,7 +45,7 @@ import VueViews from '@/benyun/compVue/VueViews'
 @Component
 export default class ByInput extends VueViews {
   value:any=null;
-
+  typeArr:Array<any>=['number','integer','float','positiveNumber','positiveInteger']
   @Watch('propValue')
   propValueChange(v:any){
     this.setValue(v);
@@ -115,6 +115,9 @@ export default class ByInput extends VueViews {
   }
 
   onChange(){
+    if(this.typeArr.indexOf(this.attrs.type) >= 0 && this.value){
+      this.value = Number(this.value)
+    }
     this.$emit('onChange',this.value);
     
   }

+ 3 - 3
src/benyun/utils/benyuntech.ts

@@ -73,7 +73,7 @@ export function selectDictLabel(datas:any, value:any) {
   if (value === undefined) {
     return "";
   }
-  var actions = [];
+  var actions:Array<any> = [];
   Object.keys(datas).some((key) => {
     if (datas[key].value == ('' + value)) {
       actions.push(datas[key].label);
@@ -238,8 +238,8 @@ export async function blobValidate(data:any) {
 
 //获取url参数
 export function getQueryString(name:string) {
-  let key = null
-  let value = null
+  let key:any = null
+  let value:any = null
   let obj:any = {}
   let str = location.href // 取得整个地址栏
   let num = str.indexOf('?')

+ 1 - 1
src/benyun/utils/index.ts

@@ -98,7 +98,7 @@ export function byteLength(str:string) {
  * @returns {Array}
  */
 export function cleanArray(actual:Array<any>) {
-  const newArray = []
+  const newArray:Array<any> = []
   for (let i = 0; i < actual.length; i++) {
     if (actual[i]) {
       newArray.push(actual[i])

+ 1 - 1
src/views/audit/orderTask/index.vue

@@ -900,7 +900,7 @@
 					for (let v of query.suborderList) {
 						if (!v.number || v.number <= 0) return this.$message.warning('请输入正确物料数量');
 						if (!v.unitPrice || v.unitPrice <= 0) return this.$message.warning('请输入正确物料单价');
-						if (!v.prePrice || v.prePrice < 0) return this.$message.warning('请输入正确优惠金额');
+						if (v.prePrice < 0) return this.$message.warning('请输入正确优惠金额');
 						v.taskOrderId = query.id;
 					}
 				};

+ 1 - 1
src/views/audit/store/components/batchbyOneModal.vue

@@ -357,7 +357,7 @@ export default class BatchbyOneModal extends Vue {
       // }
       
       this.load=false;
-      let current=null;
+      let current:any=null;
       for(let item of res.data[0].data){
         let d = new Date().getTime() + item.duration*60*60*1000;
         item.endTime=Format(new Date(d),'MM月dd日 HH:mm');

+ 2 - 2
src/views/components/bar01.vue

@@ -32,8 +32,8 @@ export default class Bar02 extends Vue {
     let chartDom:any = document.getElementById(this.id);
     let myChart = echarts.init(chartDom);
     let option: EChartsOption;
-    let dataX=[]
-    let dataY=[]
+    let dataX:Array<any>=[]
+    let dataY:Array<any>=[]
     for(const item of data) {
       dataX.push(item.month)
       dataY.push(item.total)

+ 1 - 1
src/views/components/pie01.vue

@@ -44,7 +44,7 @@ export default class Pie01 extends Vue {
     let chartDom:any = document.getElementById(this.id);
     let myChart = echarts.init(chartDom);
     let option: EChartsOption;
-    let _data=[]
+    let _data:Array<any>=[]
     for(const item of data) {
       _data.push({
         name: item.area,

+ 1 - 1
src/views/components/pie02.vue

@@ -60,7 +60,7 @@ export default class Pie02 extends Vue {
     let chartDom:any = document.getElementById(this.id);
     let myChart = echarts.init(chartDom);
     let option: EChartsOption;
-    let _data=[]
+    let _data:Array<any>=[]
     for(const item of data) {
       _data.push({
         name: item.up_source_name,

+ 1 - 2
src/views/components/rose.vue

@@ -45,13 +45,12 @@ export default class Rose extends Vue {
     let chartDom:any = document.getElementById(this.id);
     let myChart = echarts.init(chartDom);
     let option: EChartsOption;
-    let _data=[]
+    let _data:any=[]
     let obj:any={
       send:'已发货',
       other:'其他'
     }
     for(const item of data) {
-
       _data.push({
         name: obj[item.status]?obj[item.status]:item.status,
         value:item.total

+ 1 - 1
src/views/oms/B2BOrder/components/batchbyOneModal.vue

@@ -493,7 +493,7 @@ export default class BatchbyOneModal extends Vue {
     this.load = true;
     queryPricePackage(params).then((res:any) => {
       this.load=false;
-      let current=null;
+      let current:any=null;
       for(let item of res.data[0].data){
         let d = new Date().getTime() + item.duration*60*60*1000;
         item.endTime=Format(new Date(d),'MM月dd日 HH:mm');

+ 1 - 1
src/views/oms/B2BOrder/components/carpoolModal.vue

@@ -168,7 +168,7 @@ export default class CarpoolModal extends Vue {
     this.load = true;
     getMultipleToOnePrice(params).then((res:any) => {
       this.load=false;
-      let current=null;
+      let current:any=null;
       for(let item of res.data[0].data){
         let d = new Date().getTime() + item.duration*60*60*1000;
         item.endTime=Format(new Date(d),'MM月dd日 HH:mm');

+ 1 - 1
src/views/oms/B2COrder/components/batchbyOneModal.vue

@@ -409,7 +409,7 @@ export default class BatchbyOneModal extends Vue {
     this.load = true;
     queryPricePackage(params).then((res:any) => {
       this.load=false;
-      let current=null;
+      let current:any=null;
       for(let item of res.data[0].data){
         let d = new Date().getTime() + item.duration*60*60*1000;
         item.endTime=Format(new Date(d),'MM月dd日 HH:mm');

+ 1 - 1
src/views/oms/B2COrder/components/carpoolModal.vue

@@ -131,7 +131,7 @@ export default class CarpoolModal extends Vue {
     this.load = true;
     getMultipleToOnePrice(params).then((res:any) => {
       this.load=false;
-      let current=null;
+      let current:any=null;
       for(let item of res.data[0].data){
         let d = new Date().getTime() + item.duration*60*60*1000;
         item.endTime=Format(new Date(d),'MM月dd日 HH:mm');

+ 121 - 0
src/views/oms/distributionAd/components/commissionModal.vue

@@ -0,0 +1,121 @@
+<template>
+  <vxe-modal v-model="value" id="commissionModal" width="500" v-loading="load" @show="show" @hide="hide" height="260" show-footer :title="data.skuTitle + '-佣金明细'">
+    <div class="split-num">
+      <div class="max-label">一级佣金(%):</div>
+      <vxe-input v-model="val1" size="small" style="width:200px" placeholder="请输入" type="number" @input="minValChange"></vxe-input>
+      <span class="msg" v-if="commissionVal">注:{{ commissionVal.minRate }}% ~ {{ commissionVal.maxRate }}%</span>
+    </div>
+    <div class="split-num">
+      <div class="max-label">二级佣金(%):</div>
+      <vxe-input  v-model="val2" size="small" style="width:200px" placeholder="请输入" type="number" @input="maxValChange"></vxe-input>
+      <span class="msg" v-if="commissionVal">注:{{ commissionVal.minRate }}% ~ {{ commissionVal.maxRate }}%</span>
+    </div>
+    <template #footer>
+      <div class="btn">
+        <el-button plain size="small" @click="value = false">取消</el-button>
+        <el-button type="primary" size="small" @click="btn">确定</el-button>
+      </div>
+    </template>
+  </vxe-modal>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import { productCommissionSave,productCommissionQueryByProductId } from '@/api/distribution'
+import { saleRankList } from '@/api/distribution'
+@Component({components:{}})
+export default class CommissionModal extends Vue {
+  value=false;
+  load=false;
+  val1:any=0;
+  val2:any=0;
+  data:any=[];
+  commissionVal:any=null
+  state=1
+  setShow(v:boolean){
+    this.value = v;
+  }
+  mounted(){
+    this.getCommissionValue()
+  }
+  minValChange(){
+    if(!this.commissionVal){
+      this.val1 = 0
+      return
+    }
+    if(this.val1 < this.commissionVal.minRate){
+      this.val1 = this.commissionVal.minRate
+    }
+    if(this.val1 > this.commissionVal.maxRate){
+      this.val1 = this.commissionVal.maxRate
+    }
+  }
+  maxValChange(){
+    if(!this.commissionVal){
+      this.val2 = 0
+      return
+    }
+    if(this.val2 < this.commissionVal.minRate){
+      this.val2 = this.commissionVal.minRate
+    }
+    if(this.val2 > this.commissionVal.maxRate){
+      this.val2 = this.commissionVal.maxRate
+    }
+  }
+  setData(data:Array<any>){
+    this.data = data;
+    this.queryProductCommission()
+  }
+  show(){}
+  hide(){
+    this.val1 = null
+    this.val2 = null
+  }
+  queryProductCommission(){
+    productCommissionQueryByProductId({productId:this.data.id}).then((res:any) => {
+      this.val1 = res.data.commission1;
+      this.val2 = res.data.commission2;
+    }).catch(() =>{})
+  }
+  btn(){
+    productCommissionSave({
+      productId:this.data.id,
+      commission1:this.val1,
+      commission2:this.val2
+    }).then(() => {
+      this.$message({
+        message:'商品“' + this.data.skuTitle + '”佣金设置成功!',
+        type:'success'
+      });
+      this.value = false
+    }).catch(() => {})
+  }
+  getCommissionValue(){
+    saleRankList({
+      pageNo:1,
+      pageSize:20
+    }).then((res:any) => {
+      this.commissionVal = res.data.records[0]
+    }).catch(()=>{})
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.split-num{
+  width: 100%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding-top: 16px;
+  .max-label{
+    font-size: 14px;
+    padding-right: 8px;
+  }
+}
+.msg{
+  color: rgb(240, 175, 95);
+  font-size: 12px;
+  padding-left: 8px;
+}
+</style>

+ 135 - 21
src/views/oms/distributionAd/components/distributionDevel.vue

@@ -1,14 +1,74 @@
 <template>
   <div class="distribution">
-    <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @onRefresh="getList" @resert="queryList" @search="queryList" />
+    
+    <by-form :propConfig="formConfig" ref="form" />
+    <div class="top-btn">
+      <el-button type="primary" size="small" @click="saveHandle">保存</el-button>
+      <div class="msg">注:根据国家规定,1级佣金+2级佣金不能超过30%</div>
+    </div>
+    <!-- <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'
+import { saleRankList,saleRankAdd,saleRankUpdate } from '@/api/distribution'
+import editor from './editor.vue'
 @Component({components:{}})
 export default class DistributionDevel extends Vue {
+  formConfig:any={
+    attr:{
+      width:'900px',
+      rules:{
+        minRate:[
+          {required: true, message: '最小费率不能为空!', trigger: 'blur'},
+          { type: 'number', message: '最小费率必须为数字值'}
+        ],
+        maxRate:[
+          {required: true, message: '最大费率不能为空!', trigger: 'blur'},
+          { type: 'number', message: '最大费率必须为数字值'}
+        ],
+        tip:[
+          {required: true, message: '提示文字不能为空!', trigger: 'blur'}
+        ],
+        plan:[
+          {required: true, message: '招募计划不能为空!', trigger: 'blur'}
+        ]
+      }
+    },
+    columns:[
+      [{
+        label:'最小费率(%)',
+        prop:'minRate',
+        component:'by-input',
+        compConfig:{
+          attr:{
+            type:'number'
+          }
+        }
+      }],
+      [{
+        label:'最大费率(%)',
+        prop:'maxRate',
+        component:'by-input',
+        compConfig:{
+          attr:{
+            type:'number'
+          }
+        }
+      }],
+      [{
+        label:'提示文字',
+        prop:'tip',
+        component:'by-input'
+      }],
+      [{
+        label:'招募计划',
+        prop:'plan',
+        component:editor
+      }]
+    ]
+  }
   config:any={
     attr:{
       calculateH:true
@@ -142,11 +202,41 @@ export default class DistributionDevel extends Vue {
   load=false
   isSearch=false
   timeNum = 0;
+  value:any=null
   mounted(){
     this.$nextTick(()=>{
       this.getList()
     })
   }
+  saveHandle(){
+    (this.$refs.form as any).validate().then(()=>{
+      let data = (this.$refs.form as any).getValue();
+      if(data.minRate > data.maxRate){
+        this.$message({
+          message:'最小费率值不能大于最大费率值!',
+          type:'success'
+        })
+        return
+      }
+      if(data.id){
+        saleRankUpdate(data).then(() => {
+          this.$message({
+            message:'保存成功!',
+            type:'success'
+          })
+        }).catch(()=>{})
+      }else{
+        saleRankAdd(data).then(() => {
+          this.$message({
+            message:'保存成功!',
+            type:'success'
+          })
+        }).catch(()=>{})
+      }
+      
+    }).catch(()=>{})
+    
+  }
   //分页
   pagination(){
     if(this.isSearch){
@@ -157,18 +247,22 @@ export default class DistributionDevel extends Vue {
   }
   //列表请求(只有分页,不包含搜素条件)
   getList(){
-    if(!this.$refs.view){
-      if(this.timeNum > 5){
-        return
-      }
-      setTimeout(()=>{
-        this.getList()
-      },500) 
-      this.timeNum ++;
-      return
-    }
+    // 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();
+    // let data = (this.$refs.view as any).getPage();
+    let data = {
+      pageNo:1,
+      pageSize:20
+    }
     this.requestList(data);
   }
   //列表请求(包含分页和搜素条件)
@@ -180,14 +274,20 @@ export default class DistributionDevel extends Vue {
   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)
+      this.value = res.data.records[0]
+      if(this.value){
+        this.$nextTick(() =>{
+          (this.$refs.form as any).setValue(this.value);
+        })
+      }
+      // 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;
@@ -200,5 +300,19 @@ export default class DistributionDevel extends Vue {
 .distribution{
   width: 100%;
   height: 100%;
+  .top-btn{
+    display: flex;
+    flex-direction: column;
+    justify-content: flex-end;
+    width: 600px;
+    margin: 0 auto;
+    padding-top: 100px;
+    .msg{
+      font-size: 12px;
+      color: burlywood;
+      padding-top: 4px;
+      text-align: center;
+    }
+  }
 }
 </style>

+ 122 - 0
src/views/oms/distributionAd/components/editor.vue

@@ -0,0 +1,122 @@
+<template>
+  <quill-editor 
+    class="ql-editor"
+    v-model="content"
+    ref="myQuillEditor"
+    :options="editorOption"
+    @blur="onEditorBlur($event)"
+    @focus="onEditorFocus($event)"
+    @change="onEditorChange($event)">
+  </quill-editor>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+// 引入样式
+import 'quill/dist/quill.core.css'
+import 'quill/dist/quill.snow.css'
+import 'quill/dist/quill.bubble.css'
+ 
+import { quillEditor } from 'vue-quill-editor'
+import VueViews from '@/benyun/compVue/VueViews'
+@Component({components:{quillEditor}})
+export default class DistributionDevel extends VueViews {
+  content:any= `` //双向数据绑定数据
+  // 富文本编辑器配置
+  editorOption:any= {  // 设置所有的选项
+    theme: "snow", // or 'bubble'
+    placeholder: "您想说点什么?",
+    modules: {
+      toolbar: {
+        container: [
+          ["bold", "italic", "underline", "strike"], // 加粗 斜体 下划线 删除线
+          ["blockquote", "code-block"], // 引用  代码块
+          [{ header: 1 }, { header: 2 }], // 1、2 级标题
+          [{ list: "ordered" }, { list: "bullet" }], // 有序、无序列表
+          [{ script: "sub" }, { script: "super" }], // 上标/下标
+          [{ indent: "-1" }, { indent: "+1" }], // 缩进
+          // [{'direction': 'rtl'}],                         // 文本方向
+          [{ size: ["small", false, "large", "huge"] }], // 字体大小
+          [{ header: [1, 2, 3, 4, 5, 6, false] }], // 标题
+          [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色
+          [{ font: [] }], // 字体种类
+          [{ align: [] }], // 对齐方式
+          ["clean"], // 清除文本格式
+          ["link"] // 链接、图片、视频  
+        ]
+      }
+    }
+  }
+  // editorOption:any= {
+  //   modules: {
+  //     toolbar: {
+  //       container: [
+  //         ['bold', 'italic', 'underline', 'strike'], //加粗,斜体,下划线,删除线
+  //         ['blockquote', 'code-block'], //引用,代码块
+  //         [{ 'header': 1 }, { 'header': 2 }], // 标题,键值对的形式;1、2表示字体大小
+  //         [{ 'list': 'ordered' }, { 'list': 'bullet' }], //列表
+  //         [{ 'script': 'sub' }, { 'script': 'super' }], // 上下标
+  //         [{ 'indent': '-1' }, { 'indent': '+1' }], // 缩进
+  //         [{ 'direction': 'rtl' }], // 文本方向
+  //         [{ 'size': ['small', false, 'large', 'huge'] }], // 字体大小
+  //         [{ 'header': [1, 2, 3, 4, 5, 6, false] }], //几级标题
+  //         [{ 'color': [] }, { 'background': [] }], // 字体颜色,字体背景颜色
+  //         [{ 'font': [] }], //字体
+  //         [{ 'align': [] }], //对齐方式
+  //         ['clean'], //清除字体样式
+  //       ], // 工具栏
+  //     },
+  //   }, //编辑器配置项
+  // }
+  // 失去焦点事件
+  onEditorBlur(quill:any) {
+    // console.log('editor blur!', quill)
+  }
+  // 获得焦点事件
+  onEditorFocus(quill:any) {
+    // console.log('editor focus!', quill)
+  }
+  // 准备富文本编辑器
+  onEditorReady(quill:any) {
+    // console.log('editor ready!', quill)
+  }
+  // 内容改变事件
+  onEditorChange({ quill, html, text }:any) {
+    this.content = html;
+    this.$emit('onChange',this.content);
+  }
+  setValue(n:any){
+    this.content = n
+  }
+}
+</script>
+
+<style lang="scss">
+.ql-editor{
+  padding: 0 !important;
+  min-height: 220px;
+  min-height: 230px;
+  .ql-toolbar.ql-snow{
+    padding-top: 0 !important;
+  }
+}
+// 给文本内容加高度,滚动条
+.quill-editor .ql-container {
+    min-height: 220px;
+  }
+  .ql-container {
+    min-height: 230px;
+  }
+  /*加上height和滚动属性就可以,滚动条样式是系统默认样式,可能不同*/
+  .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
+    border-color: #ccc;
+    height: 125px;
+    overflow: auto;
+  }
+  /*加上height和滚动属性就可以,滚动条样式是系统默认样式,可能不同*/
+  .ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {
+    border-color: #ccc;
+    height: 125px;
+    overflow: auto;
+  }
+</style>

+ 158 - 0
src/views/oms/distributionAd/components/orderList.vue

@@ -0,0 +1,158 @@
+<template>
+  <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @onRefresh="getList" @resert="queryList" @search="queryList" />
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import { query } from '@/api/omsOrder'
+@Component({components:{}})
+export default class ProductList extends Vue {
+  config:any={
+    attr:{
+      calculateH:true
+    },
+    tool:{
+      tools:{
+        refresh:true
+      }
+    },
+    table:{
+      attr:{
+        size:'mini',
+        seq:true,
+      },
+      columns: [
+        {
+          width: 110,
+          title: '内部订单号',
+          field: 'id',
+        },
+        {
+          title: '线上订单号',
+          field: 'rawSourceId',
+        },
+        {
+          width: 140,
+          title: '审核状态',
+          field: 'isSubmitted',
+          component:'textChange',
+          compConfig:{
+            attr:{
+              data:[{
+                label:'已审核',
+                value:1
+              },{
+                label:'未审核',
+                value:0
+              }]
+            }
+          }
+        },
+        {
+          width: 140,
+          title: '订单状态',
+          field: 'status',
+          component:'textChange',
+          compConfig:{
+            attr:{
+              data:[{
+                label:'待付款',
+                value:'WaitPay'
+              },{
+                label:'发货中',
+                value:'Delivering'
+              },{
+                label:'被合并',
+                value:'Merged'
+              },{
+                label:'异常',
+                value:'Question'
+              },{
+                label:'被拆分',
+                value:'Split'
+              },{
+                label:'等供销商|外仓发货',
+                value:'WaitOuterSent'
+              },{
+                label:'已付款待审核',
+                value:'WaitConfirm'
+              },{
+                label:'已客审待财审',
+                value:'WaitFConfirm'
+              },{
+                label:'已发货',
+                value:'Sent'
+              },{
+                label:'取消',
+                value:'Cancelled'
+              }]
+            }
+          }
+        },
+        {
+          width: 110,
+          title: '来源渠道',
+          field: 'upSourceName',
+        }
+      ]
+    }
+  }
+  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;
+    query(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>
+
+</style>

+ 144 - 0
src/views/oms/distributionAd/components/productList.vue

@@ -0,0 +1,144 @@
+<template>
+  <div class="box">
+    <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @onRefresh="getList" @resert="queryList" @search="queryList" />
+    <CommissionModal ref="commissionModal" />
+  </div>
+  
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import { skuList } from '@/api/distribution'
+import CommissionModal from "./commissionModal.vue";
+@Component({components:{CommissionModal}})
+export default class ProductList extends Vue {
+  config:any={
+    attr:{
+      calculateH:true
+    },
+    tool:{
+      tools:{
+        refresh:true
+      }
+    },
+    table:{
+      attr:{
+        size:'mini',
+        seq:true,
+      },
+      columns: [
+        {
+          width: '200px',
+          title: '标题',
+          field: 'skuTitle',
+        },
+        {
+          width: '140px',
+          title: '物料编码',
+          field: 'skuCode',
+        },
+        {
+          width: '140px',
+          title: '69码-商品条码',
+          field: 'barCode',
+        },
+        {
+          width: '140px',
+          title: '财务编号',
+          field: 'financialCode',
+        },
+        {
+          width: '200px',
+          title: '商品名称',
+          field: 'extData',
+        },
+        {
+          width: '80px',
+          title: '价格',
+          field: 'price',
+        },
+        {
+          width: '80px',
+          title: '重量/g',
+          field: 'weight',
+        },
+        {
+          width: 100,
+          title: '操作',
+          action: true,
+          plugins: [{
+            name: '佣金明细',
+            audit: '',
+            event: {
+              click: (item:any) => {
+                (this.$refs.commissionModal as any).setData(item);
+                (this.$refs.commissionModal as any).setShow(true);
+              }
+            }
+          }]
+        },
+      ]
+    }
+  }
+  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;
+    skuList(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>
+.box{
+  height: 100%;
+  width: 100%;
+}
+</style>

+ 18 - 10
src/views/oms/distributionAd/index.vue

@@ -1,17 +1,23 @@
 <template>
   <div class="distributionAd">
     <el-tabs v-model="activeName">
-      <el-tab-pane label="分销等级" name="first">
-        <DistributionDevel v-if="activeName == 'first'" />
+      <el-tab-pane label="分销用户" name="1">
+        <userRank v-if="activeName == '1'"  />
       </el-tab-pane>
-      <el-tab-pane label="分销用户" name="second">
-        <userRank v-if="activeName == 'second'"  />
+      <el-tab-pane label="分销员余额" name="2">
+        <userBalanceList v-if="activeName == '2'"  />
       </el-tab-pane>
-      <el-tab-pane label="分销员" name="third">
-        <userBalanceList v-if="activeName == 'third'"  />
+      <el-tab-pane label="带货" name="3">
+        <InfluenceList v-if="activeName == '3'"  />
       </el-tab-pane>
-      <el-tab-pane label="带货" name="thord">
-        <InfluenceList v-if="activeName == 'thord'"  />
+      <el-tab-pane label="商品" name="4">
+        <ProductList v-if="activeName == '4'"  />
+      </el-tab-pane>
+      <el-tab-pane label="订单" name="5">
+        <orderList v-if="activeName == '5'"  />
+      </el-tab-pane>
+      <el-tab-pane label="分销设置" name="6">
+        <DistributionDevel v-if="activeName == '6'" />
       </el-tab-pane>
     </el-tabs>
   </div>
@@ -23,9 +29,11 @@ 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}})
+import orderList from './components/orderList.vue'
+import ProductList from "./components/productList.vue";
+@Component({components:{DistributionDevel,userRank,userBalanceList,InfluenceList,orderList,ProductList}})
 export default class DistributionAd extends Vue {
-  activeName:string='first'
+  activeName:string='1'
 }
 </script>
 

+ 1 - 1
src/views/oms/order/components/batchbyOneModal.vue

@@ -409,7 +409,7 @@ export default class BatchbyOneModal extends Vue {
     this.load = true;
     queryPricePackage(params).then((res:any) => {
       this.load=false;
-      let current=null;
+      let current:any=null;
       for(let item of res.data[0].data){
         let d = new Date().getTime() + item.duration*60*60*1000;
         item.endTime=Format(new Date(d),'MM月dd日 HH:mm');

+ 1 - 1
src/views/oms/order/components/carpoolModal.vue

@@ -131,7 +131,7 @@ export default class CarpoolModal extends Vue {
     this.load = true;
     getMultipleToOnePrice(params).then((res:any) => {
       this.load=false;
-      let current=null;
+      let current:any=null;
       for(let item of res.data[0].data){
         let d = new Date().getTime() + item.duration*60*60*1000;
         item.endTime=Format(new Date(d),'MM月dd日 HH:mm');