ymy 1 год назад
Родитель
Сommit
cce5cc7dab

+ 33 - 0
src/api/cargoOwner.ts

@@ -0,0 +1,33 @@
+import request from '@/benyun/utils/request'
+
+//注册货主
+export function registerMember(data : any) {
+	return request({
+		url: '/omsOrder/omsPartner/registerMember',
+		method: 'POST',
+		data: data
+	})
+}
+//修改货主
+export function updateMember(data : any) {
+	return request({
+		url: '/omsOrder/omsPartner/updateMember',
+		method: 'POST',
+		data: data
+	})
+}
+//查询全部
+export function queryAll() {
+	return request({
+		url: '/omsOrder/omsPartner/queryAll',
+		method: 'GET'
+	})
+}
+//根据ID查询记录
+export function queryById(data : any) {
+	return request({
+		url: '/omsOrder/omsPartner/queryById',
+		method: 'GET',
+    params: data
+	})
+}

+ 3 - 0
src/views/audit/synchronous/index.vue

@@ -17,6 +17,9 @@ export default class SynchronousProduct extends Vue {
   count=0;
   time:any=null;
   config:any={
+    attr:{
+      calculateH:true
+    },
     search:{
       attr:{
         size:'mini',

+ 305 - 0
src/views/oms/cargoOwner/index.vue

@@ -0,0 +1,305 @@
+<template>
+  <div class="cargoOwner">
+    <module-view :propConfig="config" ref="view" v-loading="load" @pagination="pagination" @modalHandle="modalHandle" @onRefresh="getList" 
+    @resert="queryList" @search="queryList" @clickHandle="clickHandle" @detail="detail" />
+  </div>
+</template>
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import {registerMember, updateMember, queryAll, queryById} from '@/api/cargoOwner'
+@Component({components:{}})
+export default class CargoOwner extends Vue {
+  load=false;
+  time:any;
+  timeNum = 0;
+  isSearch=false;
+  config:any={
+    attr:{
+      calculateH:true
+    },
+    search:{
+      attr:{
+        size:'small'
+      },
+      columns:[
+        [{
+          label:'货主名称',
+          prop:'wmsMemberName',
+          component:'by-input',
+          compConfig:{}
+        },{
+          label:'联系人',
+          prop:'wmsContact',
+          component:'by-input',
+          compConfig:{}
+        },
+        // {
+        //   label:'WMS系统',
+        //   prop:'wmsSys',
+        //   component:'by-select',
+        //   compConfig:{
+        //     attr:{
+        //       clearable:true,
+        //       data:[{
+        //         value:'Authorized',
+        //         label:'已授权'
+        //       },{
+        //         value:'Unauthorized',
+        //         label:'未授权'
+        //       },{
+        //         value:'Expired',
+        //         label:'已过期'
+        //       }]
+        //     }
+        //   }
+        // }
+        ]
+      ]
+    },
+    tool:{
+      tools:{
+        add:true,
+        // delete:true,
+        search:true,
+        refresh:true
+      }
+    },
+    table:{
+      attr:{
+        size:'mini',
+        seq:true,
+        align:'center',
+        // checkbox:true
+      },
+      columns:[{
+        title:'货主名称',
+        field:'wmsMemberName',
+        isDetail:true,
+        // width:150
+      },{
+        title:'WMS系统',
+        field:'wmsSys',
+        width:150
+      },{
+        title:'货主等级',
+        field:'wmsLevel',
+        width:150
+      },{
+        title:'日单量',
+        field:'wmsDayAmount',
+        width:150
+      },{
+        title:'联系人',
+        field:'wmsContact',
+        width:150
+      },{
+        title:'联系电话',
+        field:'wmsPhone',
+        width:150
+      },{
+        title:'联系人性别',
+        field:'wmsSex',
+        width:150
+      },{
+        title:'邮箱',
+        field:'wmsEmail',
+        width:150
+      },{
+        title:'地址',
+        field:'wmsAddress',
+        width:150
+      },
+      {
+        title:'操作',
+        action:true,
+        width:100,
+        // plugins:[{
+        //   name:'删除',
+        //   event:{
+        //     click:(item:any) => {
+        //       this.del(item);
+        //     }
+        //   }
+        // }]
+      }]
+    },
+    modal:{
+      tool:{
+        tools:{
+          return:true,
+          add:true
+        }
+      },
+      form:{
+        attr:{
+          size:'small',
+          labelWidth:'130px',
+          rules:{
+            shopId:[
+              { required: true, message: '请输入店铺编号', trigger: 'blur' }
+            ]
+          }
+        },
+        columns:[
+          [{
+            label:'货主名称',
+            prop:'wmsMemberName',
+            component:'by-input'
+          },{
+            label:'WMS系统',
+            prop:'wmsSys',
+            component:'by-select',
+            compConfig:{
+              attr:{
+                defaultIndex: 0,
+                data:[{
+                  value:'GEEKPLUS',
+                  label:'极智嘉'
+                }]
+              }
+            }
+          },{
+            label:'货主等级',
+            prop:'wmsLevel',
+            component:'by-input'
+          }],
+          [{
+            label:'联系人',
+            prop:'wmsContact',
+            component:'by-input'
+          },{
+            label:'联系电话',
+            prop:'wmsPhone',
+            component:'by-input'
+          },{
+            label:'联系人性别',
+            prop:'wmsSex',
+            component:'by-input'
+          }],
+          [{
+            label:'日单量',
+            prop:'wmsDayAmount',
+            component:'by-input'
+          },{
+            label:'邮箱',
+            prop:'wmsEmail',
+            component:'by-input'
+          },{
+            label:'地址',
+            prop:'wmsAddress',
+            component:'by-input'
+          }]
+        ]
+      }
+    }
+  }
+  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;
+    this.requestList();
+  }
+  //列表请求(包含分页和搜素条件)
+  queryList(){
+    this.isSearch = true;
+    let data = (this.$refs.view as any).getQuery();
+    this.requestList();
+  }
+  requestList(){
+    this.load = true;
+    queryAll().then((res:any) => {
+      this.load = false;
+      (this.$refs.view as any).setTableValue(res.data.records);
+
+    }).catch(()=>{
+      this.load = false;
+    })
+  }
+  //修改店铺数据
+  onSave(){
+    let data = (this.$refs.view as any).getFormValue();
+    this.load = true;
+    updateMember(data).then((res:any) => {
+      this.$message({
+        message:res.msg,
+        type:'success'
+      });
+      this.load = false;
+      (this.$refs.view as any).closeModal();
+      this.pagination();
+    }).catch(()=>{
+      this.load = false;
+    })
+  }
+  //表单工具栏按钮事件
+  modalHandle(n:string){
+    if(n == 'onAdd'){
+      (this.$refs.view as any).getFormValidate(this.addShop)
+    }
+
+    if(n == 'onSave'){
+      (this.$refs.view as any).getFormValidate(this.onSave)
+    }
+  }
+  //表格工具栏按钮事件
+  clickHandle(n:string){ 
+    if(n == 'onAdd'){
+      this.config.modal.tool.tools.add = true;
+      delete this.config.modal.tool.tools.save;
+      (this.$refs.view as any).initFormTool();
+    }
+  }
+  //添加店铺
+  addShop(){
+    let value = (this.$refs.view as any).getFormValue();
+    if(value){
+      this.load = true;
+      registerMember(value).then((res:any)=>{
+        this.load = false;
+        this.$message({
+          message:res.msg,
+          type:'success'
+        });
+        (this.$refs.view as any).closeModal();
+        this.getList();
+      }).catch(()=>{
+        this.load = false;
+      })
+    }
+  }
+  //点击详情
+  detail(){
+    this.config.modal.tool.tools.save = true;
+    delete this.config.modal.tool.tools.add;
+    (this.$refs.view as any).initFormTool();
+  }
+}
+</script>
+<style lang="scss" scoped>
+.cargoOwner{
+  width: 100%;
+  height: 100%;
+}
+</style>

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

@@ -84,7 +84,7 @@
     <vxe-column field="receiverAddress" title="收货地址" show-overflow width="160"></vxe-column>
     <vxe-column field="receiverName" title="收件人" show-overflow width="120"></vxe-column>
     <vxe-column field="receiverMobile" title="手机" show-overflow width="120"></vxe-column>
-    <vxe-column field="buyerMessage" title="买家留言" width="120"></vxe-column>
+    <vxe-column field="buyerMessage" title="买家留言" show-overflow width="120"></vxe-column>
     <vxe-column field="wmsCoId" title="发货仓编号" width="120"></vxe-column>
     <vxe-column field="payDate" title="支付时间" width="140"></vxe-column>
     <vxe-column field="freeAmount" title="抵扣金额" align="right" width="120"></vxe-column>

+ 7 - 7
src/views/oms/orderHistory/components/orderTable.vue

@@ -73,11 +73,11 @@
     <vxe-column field="sendDate" title="发货日期" width="120"></vxe-column>
     <vxe-column field="signTime" title="预计送达时间" width="120"></vxe-column>
     <vxe-column field="endTime" title="确认收货时间" width="120"></vxe-column>
-    <vxe-column field="receiverAddress" title="收货地址" width="120"></vxe-column>
-    <vxe-column field="receiverName" title="收件人" width="120"></vxe-column>
-    <vxe-column field="receiverMobile" title="手机" width="120"></vxe-column>
-    <vxe-column field="buyerMessage" title="买家留言" width="120"></vxe-column>
-    <vxe-column field="wmsCoId" title="发货仓编号" width="120"></vxe-column>
+    <vxe-column field="receiverAddress" title="收货地址" show-overflow width="120"></vxe-column>
+    <vxe-column field="receiverName" title="收件人" show-overflow width="120"></vxe-column>
+    <vxe-column field="receiverMobile" title="手机" show-overflow width="120"></vxe-column>
+    <vxe-column field="buyerMessage" title="买家留言" show-overflow width="120"></vxe-column>
+    <vxe-column field="wmsCoId" title="发货仓编号" show-overflow width="120"></vxe-column>
     <vxe-column field="payDate" title="支付时间" width="140"></vxe-column>
     <vxe-column field="freeAmount" title="抵扣金额" width="120"></vxe-column>
     <vxe-column field="payAmount" title="应付+运费" width="120">
@@ -87,8 +87,8 @@
       </template>
     </vxe-column>
     <vxe-column field="paidAmount" title="实付金额" width="120"></vxe-column>
-    <vxe-column field="shopBuyerId" title="买家昵称" width="120"></vxe-column>
-    <vxe-column field="openId" title="平台买家唯一值" width="120"></vxe-column>
+    <vxe-column field="shopBuyerId" title="买家昵称" show-overflow width="120"></vxe-column>
+    <vxe-column field="openId" title="平台买家唯一值" show-overflow width="120"></vxe-column>
     <vxe-column field="buyerPaidAmount" title="总买家实付" width="120"></vxe-column>
     <vxe-column field="sellerIncomeAmount" title="总卖家实收" width="120"></vxe-column>
     <vxe-column field="questionType" title="问题类型" width="120"></vxe-column>

+ 8 - 4
src/views/oms/orderHistory/index.vue

@@ -185,13 +185,13 @@ export default class OrderHistory extends Vue {
   getProvince(){
     this.provinceOptions = [];
     getProvince({
-      parentCode:'86'
+      pid:'0'
     }).then((res:any) => {
       if(res.data){
         for(const item of res.data){
           this.provinceOptions.push({
-            label:item.name,
-            value:item.code
+            label:item.extName,
+            value:item.id
           })
         }
       }
@@ -201,7 +201,11 @@ export default class OrderHistory extends Vue {
   parameChange(parames:any){
     for(const key in parames){
       if(this.value[key]){
-        this.value[key] = parames[key]
+        if(this.value[key]){
+          this.value[key] = parames[key].split(',')
+        }else{
+          Vue.set(this.value, key, parames[key].split(','));
+        }
       }else{
         Vue.set(this.value, key, parames[key]);
       }