完善售后

This commit is contained in:
Richie 2025-03-24 12:27:12 +08:00
parent 03db63f470
commit d7cc6f2724
5 changed files with 126 additions and 171 deletions

View File

@ -0,0 +1,101 @@
package cn.qihangerp.oms.controller;
import cn.qihangerp.common.PageQuery;
import cn.qihangerp.common.PageResult;
import cn.qihangerp.common.TableDataInfo;
import cn.qihangerp.module.order.domain.OAfterSale;
import cn.qihangerp.module.order.service.OAfterSaleService;
import cn.qihangerp.security.common.BaseController;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@AllArgsConstructor
@RestController
@RequestMapping("/afterSale")
public class AfterSaleProcessingController extends BaseController {
private final OAfterSaleService afterSaleService;
/**
* 查询列表
*/
@GetMapping("/list")
public TableDataInfo ship_again_list(OAfterSale bo, PageQuery pageQuery)
{
//private final OAfterSaleMapper mapper;
// @Override
// public PageResult<OAfterSale> queryPageList(OAfterSale bo, PageQuery pageQuery) {
// LambdaQueryWrapper<OAfterSale> queryWrapper = new LambdaQueryWrapper<OAfterSale>().
// eq( OAfterSale::getType, bo.getType())
// .eq(bo.getShopId() != null, OAfterSale::getShopId, bo.getShopId());
//
// Page<OAfterSale> pages = mapper.selectPage(pageQuery.build(), queryWrapper);
// return PageResult.build(pages);
// }
// bo.setType(80);
PageResult<OAfterSale> result = afterSaleService.queryPageList(bo, pageQuery);
return getDataTable(result);
}
// @PostMapping("/shipAgain")
// public AjaxResult shipAgainAdd(@RequestBody ErpAfterSale addBo)
// {
// addBo.setType(80);
// addBo.setCreateTime(new Date());
// addBo.setCreateBy("手动添加");
// addBo.setStatus(1);
// var result = afterSaleService.save(addBo);
// return toAjax(result);
// }
//
// @PutMapping("/shipAgain/complete/{id}")
// public AjaxResult completeShipAgain(@PathVariable Long id)
// {
// ErpAfterSale complete = new ErpAfterSale();
// complete.setId(id.toString());
// complete.setStatus(2);
// complete.setUpdateTime(new Date());
// complete.setUpdateBy("手动完成");
// afterSaleService.updateById(complete);
// return toAjax(1);
// }
//
//
// @GetMapping("/returned_list")
// public TableDataInfo returned_list(ErpAfterSale bo, PageQuery pageQuery)
// {
// bo.setType(10);
// PageResult<ErpAfterSale> result = afterSaleService.queryPageList(bo, pageQuery);
// return getDataTable(result);
// }
//
// @GetMapping("/exchange_list")
// public TableDataInfo exchange_list(ErpAfterSale bo, PageQuery pageQuery)
// {
// bo.setType(20);
// PageResult<ErpAfterSale> result = afterSaleService.queryPageList(bo, pageQuery);
// return getDataTable(result);
// }
//
// @PostMapping("/exchange")
// public AjaxResult exchangeAdd(@RequestBody ErpAfterSale addBo)
// {
// addBo.setType(20);
// addBo.setCreateTime(new Date());
// addBo.setCreateBy("手动添加");
// addBo.setStatus(1);
// var result = afterSaleService.save(addBo);
// return toAjax(result);
// }
//
// @GetMapping("/intercept_list")
// public TableDataInfo intercept_list(ErpAfterSale bo, PageQuery pageQuery)
// {
// bo.setType(99);
// PageResult<ErpAfterSale> result = afterSaleService.queryPageList(bo, pageQuery);
// return getDataTable(result);
// }
}

View File

@ -22,7 +22,7 @@ import org.springframework.web.bind.annotation.*;
*/
@AllArgsConstructor
@RestController
@RequestMapping("/api/oms-api/refund")
@RequestMapping("/refund")
public class RefundController extends BaseController
{

View File

@ -81,5 +81,5 @@ spring:
mybatis-plus:
mapper-locations: classpath*:mapper/**/*Mapper.xml
type-aliases-package: cn.qihangerp.open.domain;cn.qihangerp.security.entity;
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 开启sql日志
# configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 开启sql日志

View File

@ -1,19 +1,16 @@
<template>
<div class="app-container">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="天猫" name="taoOrder">
<tao-refund></tao-refund>
<el-tab-pane v-for="item in typeList" :label="item.name" :name="item.code" lazy>
<order-tao v-if="item.id === 100"></order-tao>
<order-jd v-if="item.id === 200"></order-jd>
<!-- <order-jd-vc v-if="item.id === 280"></order-jd-vc>-->
<order-pdd v-if="item.id === 300"></order-pdd>
<order-dou v-if="item.id === 400"></order-dou>
<order-wei v-if="item.id === 500"></order-wei>
<!-- <order-offline v-if="item.id === 999"></order-offline>-->
</el-tab-pane>
</el-tab-pane>
<el-tab-pane label="京东" name="jdOrder" lazy>
<jd-refund></jd-refund>
</el-tab-pane>
<el-tab-pane label="抖店" name="douOrder" lazy>
<dou-refund></dou-refund>
</el-tab-pane>
<el-tab-pane label="拼多多" name="pddOrder" lazy>
<pdd-refund></pdd-refund>
</el-tab-pane>
</el-tabs>
</div>
</template>
@ -23,20 +20,30 @@ import TaoRefund from "@/views/tao/refund/index";
import JdRefund from "@/views/jd/refund/index";
import DouRefund from "@/views/dou/refund/index.vue";
import PddRefund from "@/views/pdd/refund/index.vue";
import OrderTao from "@/views/tao/order/index.vue";
import OrderPdd from "@/views/pdd/order/index.vue";
import OrderDou from "@/views/dou/order/index.vue";
import OrderWei from "@/views/wei/order/index.vue";
import OrderJd from "@/views/jd/order/index.vue";
import {listPlatform} from "@/api/shop/shop";
export default {
name: "refund",
components:{PddRefund, DouRefund, TaoRefund,JdRefund},
components:{OrderJd, OrderWei, OrderDou, OrderPdd, OrderTao, PddRefund, DouRefund, TaoRefund,JdRefund},
data() {
return {
activeName: 'taoOrder'
activeName: 'taoOrder',
typeList: [],
};
},
created() {
},
mounted() {
listPlatform({status:0}).then(res => {
this.typeList = res.rows;
this.activeName = this.typeList[0].code
})
},
methods: {
handleClick(tab, event) {

View File

@ -1,153 +0,0 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="店铺" prop="shopId">
<el-select v-model="queryParams.shopId" placeholder="请选择店铺" clearable @change="handleQuery">
<el-option
v-for="item in shopList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="类型" prop="pullType">
<el-select v-model="queryParams.pullType" placeholder="请选择类型" clearable @change="handleQuery">
<el-option label="拉取订单" value="ORDER"></el-option>
<el-option label="拉取退款" value="REFUND"></el-option>
<el-option label="拉取商品" value="GOODS"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="lists" >
<!-- <el-table-column type="selection" width="55" align="center" />-->
<!-- <el-table-column label="ID" align="center" prop="id" />-->
<el-table-column label="店铺" align="center" prop="shopId" >
<template slot-scope="scope">
<span>{{ shopList.find(x=>x.id === scope.row.shopId).name }}</span>
</template>
</el-table-column>
<el-table-column label="平台" align="center" prop="shopType" >
<template slot-scope="scope">
<el-tag size="small" v-if="scope.row.shopType === 1">天猫</el-tag>
<el-tag size="small" v-if="scope.row.shopType === 2">京东</el-tag>
<el-tag size="small" v-if="scope.row.shopType === 3">抖店</el-tag>
<el-tag size="small" v-if="scope.row.shopType === 4">拼多多</el-tag>
</template>
</el-table-column>
<el-table-column label="类型" align="center" prop="pullType" >
<template slot-scope="scope">
<el-tag size="small" v-if="scope.row.pullType === 'GOODS'">拉取商品</el-tag>
<el-tag size="small" v-if="scope.row.pullType === 'ORDER'">拉取订单</el-tag>
<el-tag size="small" v-if="scope.row.pullType === 'REFUND'">拉取退款</el-tag>
</template>
</el-table-column>
<el-table-column label="方式" align="center" prop="pullWay" />
<el-table-column label="参数" align="center" prop="pullParams" />
<el-table-column label="结果" align="center" prop="pullResult" />
<el-table-column label="耗时ms" align="center" prop="duration" />
<el-table-column label="时间" align="center" prop="pullTime" >
<template slot-scope="scope">
{{ parseTime(scope.row.pullTime, '{y}-{m}-{d} {h}:{m}:{s}') }}
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {listShop, listShopPullLogs} from "@/api/shop/shop";
export default {
name: "Order",
data() {
return {
//
showSearch: true,
//
total: 0,
//
loading: true,
lists:[],
shopList:[],
skuList:[],
//
detailOpen:false,
skuListLoading:false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
pullType: 'ORDER'
},
//
form: {
erpGoodsSkuId:null,
id:null
},
rules: {
id: [
{ required: true, message: "不能为空", trigger: "blur" }
],
erpGoodsSkuId: [
{ required: true, message: "不能为空", trigger: "blur" }
],
}
};
},
created() {
listShop({}).then(response => {
this.shopList = response.rows;
});
this.getList();
},
mounted() {
if(this.$route.query.shopId){
this.queryParams.shopId = this.$route.query.shopId
}
},
methods: {
/** 查询淘宝订单列表 */
getList() {
this.loading = true;
listShopPullLogs(this.queryParams).then(response => {
this.lists = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
}
}
};
</script>