浏览代码

退货入库单

ymy 1 年之前
父节点
当前提交
89ebe14bfb

+ 10 - 0
src/api/cancelGoods.ts

@@ -0,0 +1,10 @@
+import request from '@/benyun/utils/request'
+
+//退货列表
+export function returnOrder(data?:any){
+	return request({
+		url: '/omsOrder/omsReturnOrder/page',
+		method: 'GET',
+		params: data
+	})
+}

+ 9 - 0
src/api/distribution.ts

@@ -84,4 +84,13 @@ export function productCommissionQueryByProductId(data?:any){
 		method: 'GET',
 		params: data
 	})
+}
+
+//分销订单
+export function distributionOrder(data:any){
+	return request({
+		url: '/omsOrder/omsOrder/querySaleTrade',
+		method: 'POST',
+		params: data
+	})
 }

+ 26 - 3
src/views/oms/B2BOrder/components/addOrder.vue

@@ -51,7 +51,7 @@
         <el-collapse-item title="发票信息" name="5" class="add-order-item" v-if="orderValue.id">
           <by-form :propConfig="newInvoicesConfig" ref="invoicesform"></by-form>
         </el-collapse-item>
-        <div class="btn-save" v-if="orderValue.id && orderValue.isSubmitted != 1">
+        <div class="btn-save" v-if="orderValue.id && orderValue.isSubmitted != 1 && orderValue.upSourceName !== 'DS_JUSHUITAN'">
           <el-button type="primary" size="small" @click="saveBase">保存基本信息及收获地址</el-button>
         </div>
         <el-collapse-item title="订单支付情况" name="4" class="add-order-item" v-if="orderValue.id">
@@ -417,6 +417,9 @@ export default class AddOrder extends Vue {
             }, {
               value: '5',
               label: '线下'
+            }, {
+              value: '6',
+              label: '分销'
             }]
           }
         }
@@ -626,7 +629,7 @@ export default class AddOrder extends Vue {
         audit:'',
         event:{
           show:(row:any) => {
-            if(row.status == 'Merged' || row.status == 'Cancelled'){
+            if(row.status == 'Merged' || row.status == 'Cancelled' || this.orderValue.upSourceName !== 'DS_JUSHUITAN'){
               return false
             }else{
               return true
@@ -652,7 +655,6 @@ export default class AddOrder extends Vue {
         name: '添加赠品', icon: 'el-icon-plus', event:{
           click:()=>{
             this.toolAddGift();
-            
           }
         }
       }
@@ -1157,6 +1159,13 @@ export default class AddOrder extends Vue {
   }
   //添加商品
   toolAddProduct(){
+    if(this.orderValue.upSourceName !== 'DS_JUSHUITAN'){
+      this.$message({
+        message:'点三不能进行修改!',
+        type:'warning'
+      })
+      return
+    }
     if (this.orderValue.status == 'Delivering' || this.orderValue.status == 'Sent') {
       this.$message({
         message:'该订单已发货不能进行修改!',
@@ -1175,6 +1184,13 @@ export default class AddOrder extends Vue {
   }
   //添加赠品
   toolAddGift(){
+    if(this.orderValue.upSourceName !== 'DS_JUSHUITAN'){
+      this.$message({
+        message:'点三不能进行修改!',
+        type:'warning'
+      })
+      return
+    }
     if (this.orderValue.status == 'Delivering' || this.orderValue.status == 'Sent') {
       this.$message({
         message:'该订单已发货不能进行修改!',
@@ -1210,6 +1226,13 @@ export default class AddOrder extends Vue {
   }
   //商品编辑
   editProduct(){
+    if(this.orderValue.upSourceName !== 'DS_JUSHUITAN'){
+      this.$message({
+        message:'点三订单不能进行修改!',
+        type:'warning'
+      })
+      return
+    }
     if (this.orderValue.status == 'Delivering' || this.orderValue.status == 'Sent') {
       this.$message({
         message:'该订单已发货不能进行修改!',

+ 6 - 0
src/views/oms/B2BOrder/components/orderTable.vue

@@ -6,6 +6,7 @@
     ref="table"
     :height="height"
     :row-config="{isCurrent: true,isHover: true}"
+    :checkbox-config="{checkMethod: checCheckboxkMethod}"
     :data="data">
     <vxe-column type="checkbox" width="50" fixed="left"></vxe-column>
     <!-- <vxe-column type="seq" width="60" title="序号" fixed="left"></vxe-column> -->
@@ -161,6 +162,11 @@ export default class OrderTable extends Vue {
     'TOUTIAOFXG':'头条放心购',
     'JUSHUITAN':'聚水潭'
   }
+  //禁止点三订单勾选
+  checCheckboxkMethod({row}){
+    return row.upSourceName !== 'DS_JUSHUITAN'
+    // return row.upSourceName !== 'OPENB2B_U8'
+  }
   //转换售卖类型
   getSellType(n:any) {
     let name = ''

+ 5 - 0
src/views/oms/B2COrder/components/orderTable.vue

@@ -6,6 +6,7 @@
     ref="table"
     :height="height"
     :row-config="{isCurrent: true,isHover: true}"
+    :checkbox-config="{checkMethod: checCheckboxkMethod}"
     :data="data">
     <vxe-column type="checkbox" width="50" fixed="left"></vxe-column>
     <!-- <vxe-column type="seq" width="60" title="序号" fixed="left"></vxe-column> -->
@@ -175,6 +176,10 @@ export default class OrderTable extends Vue {
     }
     return t;
   }
+  //禁止点三订单勾选
+  checCheckboxkMethod({row}){
+    return row.upSourceName !== 'DS_JUSHUITAN'
+  }
   //是否显示发货
   showSend(item:any){
     let noStatus = ['WaitPay','Delivering','Merged','Split','Question','Sent','Cancelled'];

+ 61 - 0
src/views/oms/cancelGoods/components/items.vue

@@ -0,0 +1,61 @@
+<template>
+  <div class="items">
+    <el-badge :value="item.qty" class="item-pro" type="primary" :max="99" v-for="(item,index) of value" :key="index">
+      <div class="image-slot" >
+        {{ item.title }}
+        <!-- <i class="el-icon-goods"></i> -->
+      </div>
+    </el-badge>
+  </div>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+import VueViews from '@/benyun/compVue/VueViews'
+@Component
+export default class Items extends VueViews {
+  value:Array<any>=[]
+
+  @Watch('propValue')
+  propValueChange(v:any){
+    this.setValue(v);
+  }
+  
+  mounted(){
+    if(this.propValue){
+      this.setValue(this.propValue)
+    }
+  }
+  setValue(data:any){
+    if(data){
+      try{
+        this.value = JSON.parse(data);
+      }catch(e){}
+    }else{
+      this.value=[]
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.items{
+  width: 100%;
+  // display: flex;
+  // align-items: center;
+  // justify-content: center;
+  flex-direction: column;
+  .image-slot{
+    .el-icon-goods{
+      font-size: 28px;
+      color: #999;
+    }
+  }
+  .item-pro{
+    padding-left: 12px;
+  }
+  .item-pro:first-child{
+    padding: 0;
+  }
+}
+</style>

+ 218 - 0
src/views/oms/cancelGoods/index.vue

@@ -0,0 +1,218 @@
+<template>
+  <div class="page">
+    <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 { returnOrder } from '@/api/cancelGoods'
+import Items from "./components/items.vue";
+@Component({components:{}})
+export default class CancelGoods extends Vue {
+  load=false;
+  time:any;
+  timeNum = 0;
+  isSearch=false;
+  config:any={
+    attr:{
+      calculateH:true
+    },
+    search:{
+      attr:{
+        size:'small',
+        labelWidth:'120px'
+      },
+      columns:[
+        [{
+          label:'物流编码',
+          prop:'logisticsCode',
+          component:'by-input',
+          compConfig:{}
+        },{
+          label:'物流单号',
+          prop:'expressCode',
+          component:'by-input',
+          compConfig:{}
+        },
+        // {
+        //   label:'WMS同步单号',
+        //   prop:'syncId',
+        //   component:'by-input',
+        //   compConfig:{}
+        // },
+        {
+          label:'发货单ID',
+          prop:'deliveryOrderId',
+          component:'by-input',
+          compConfig:{}
+        }]
+      ]
+    },
+    tool:{
+      tools:{
+        // add:true,
+        // delete:true,
+        search:true,
+        refresh:true
+      }
+    },
+    table:{
+      attr:{
+        size:'mini',
+        seq:true,
+        align:'center',
+        // checkbox:true
+      },
+      columns:[{
+        title:'发货单ID',
+        field:'deliveryOrderId',
+        width:120
+      },{
+        title:'入库类型',
+        field:'sendType',
+        width:120
+      },{
+        title:'入库确认回调地址',
+        field:'callbackUrl',
+        width:150
+      },{
+        title:'物流编码',
+        field:'logisticsCode',
+        width:120
+      },{
+        title:'物流名称',
+        field:'logisticsName',
+        width:120
+      },{
+        title:'物流单号',
+        field:'expressCode',
+        width:120
+      },{
+        title:'商品',
+        field:'items',
+        component:Items,
+        width:150
+      },{
+        title:'退货原因',
+        field:'reason',
+        width:150
+      },{
+        title:'备注',
+        field:'remark',
+        width:140
+      },{
+        title:'状态',
+        field:'status',
+        component:'textChange',
+        compConfig:{
+          attr:{
+            data:[{
+              label:'创建成功,等待入库确认',
+              value:'WAIT_CONFIRM'
+            },{
+              label:'订单失败',
+              value:'FAILURE'
+            },{
+              label:'订单完成',
+              value:'FINISH'
+            },{
+              label:'订单取消',
+              value:'CANCEL'
+            }]
+          }
+        },
+        width:120
+      },{
+        title:'WMS同步单号',
+        field:'syncId',
+        width:120
+      },{
+        title:'是否全部入库',
+        field:'isAllIn',
+        component:'textChange',
+        compConfig:{
+          attr:{
+            data:[{
+              label:'部分入库',
+              value:0
+            },{
+              label:'全部入库',
+              value:1
+            }]
+          }
+        },
+        width:120
+      },{
+        title:'订单完成时间',
+        field:'orderConfirmTime',
+        width:140
+      },{
+        title:'创建时间',
+        field:'createTime',
+        width:140
+      }]
+    },
+  }
+
+  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;
+    returnOrder(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>
+.page{
+  height: 100%;
+  width: 100%;
+}
+</style>

+ 3 - 2
src/views/oms/distributionAd/components/orderList.vue

@@ -4,7 +4,7 @@
 
 <script lang="ts">
 import { Component, Prop, Vue, Watch } from "vue-property-decorator";
-import { query } from '@/api/omsOrder'
+import { distributionOrder } from '@/api/distribution'
 @Component({components:{}})
 export default class ProductList extends Vue {
   config:any={
@@ -162,7 +162,8 @@ export default class ProductList extends Vue {
   }
   requestList(data:any){
     this.load = true;
-    query(data,{}).then((res:any) => {
+    data.sellType = '6';
+    distributionOrder(data).then((res:any) => {
       this.load = false;
       (this.$refs.view as any).setTableValue(res.data.records);
       let page = {

+ 48 - 0
src/views/oms/shop/components/time.vue

@@ -0,0 +1,48 @@
+<template>
+  <span :class="{'red':isExpire}">{{ value }}</span>
+</template>
+
+<script lang="ts">
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+@Component
+export default class TimeComp extends Vue {
+  value:any=null;
+  isExpire:boolean=false
+  @Prop()
+  propConfig: any
+
+  @Prop()
+  propValue?:any
+
+  @Prop()
+  parentValue:any
+
+  @Watch('propValue')
+  propValueChange(v:any){
+    this.setValue(v);
+  }
+
+  mounted(){
+    if(this.propValue){
+      this.setValue(this.propValue)
+    }
+  }
+
+  setValue(v:any){
+    this.value = v;
+    if(this.value){
+      if(new Date() > new Date(this.value)){
+        this.isExpire = true
+      }else{
+        this.isExpire = false
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.red{
+  color: red;
+}
+</style>

+ 7 - 4
src/views/oms/shop/index.vue

@@ -12,6 +12,7 @@ import { query,save,update,del,dian3ShopQuery,shopAuth,shopSign } from '@/api/sh
 import autoShopModal from './components/autoShopModal.vue'
 import axios from 'axios'
 import shopTag from './components/tag.vue'
+import time from './components/time.vue'
 @Component({components:{autoShopModal}})
 export default class Shop extends Vue {
   load=false;
@@ -149,10 +150,12 @@ export default class Shop extends Vue {
       },{
         title:'授权过期时间',
         field:'expireDate',
-      },{
-        title:'刷新授权过期',
-        field:'refreshExpiresTime',
+        component:time
       }
+      // ,{
+      //   title:'刷新授权过期',
+      //   field:'refreshExpiresTime',
+      // }
       // {
       //   title:'操作',
       //   action:true,
@@ -169,7 +172,7 @@ export default class Shop extends Vue {
       //     }
       //   }]
       // }
-    ]
+      ]
     },
     // modal:{
     //   tool:{

+ 3 - 2
src/views/oms/shop/shopAuto.vue

@@ -38,11 +38,12 @@ export default class ShopAuto extends Vue {
       this.value = parames;
       if(parames.id){
         shopAdd({
+          tenantId:(this as any).$store.getters.userInfo.tenantId,
           shopId:parames.id,
           platformType:parames.platformType,
-          nickname:parames.refUserNick,
+          userNick:parames.refUserNick,
           userId:parames.refUserId,
-          expiresTime:parames.expiresTime,
+          expireDate:parames.expiresTime,
           refreshExpiresTime:parames.reExpiresTime
         }).then(()=>{
           this.autoState = true