完善店铺订单
This commit is contained in:
parent
71a47383da
commit
03db63f470
|
|
@ -1,27 +1,26 @@
|
|||
<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="平台商品ID" prop="productId">
|
||||
<el-input
|
||||
v-model="queryParams.productId"
|
||||
placeholder="请输入平台商品ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="平台SKU ID" prop="skuId">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px">
|
||||
<el-form-item label="平台SkuId" prop="skuId">
|
||||
<el-input
|
||||
v-model="queryParams.skuId"
|
||||
placeholder="请输入平台SKU ID"
|
||||
placeholder="请输入平台SkuId"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商家SKU编码" prop="code">
|
||||
<el-form-item label="商家sku编码" prop="outerId">
|
||||
<el-input
|
||||
v-model="queryParams.code"
|
||||
placeholder="请输入商家SKU编码"
|
||||
v-model="queryParams.outerId"
|
||||
placeholder="请输入商家sku编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="ERP skuId" prop="erpSkuId">
|
||||
<el-input
|
||||
v-model="queryParams.erpSkuId"
|
||||
placeholder="请输入ERP skuId"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
@ -36,12 +35,6 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否关联" prop="hasLink">
|
||||
<el-select v-model="queryParams.hasLink" placeholder="是否关联" clearable @change="handleQuery">
|
||||
<el-option label="未关联" value="0"></el-option>
|
||||
<el-option label="已关联" value="1"></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>
|
||||
|
|
@ -56,56 +49,47 @@
|
|||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePull(1)"
|
||||
>API更新商品数据</el-button>
|
||||
@click="handlePull"
|
||||
>API拉取商品数据</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePull(0)"
|
||||
>API全量拉取商品数据</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="goodsList" >
|
||||
<el-table v-loading="loading" :data="goodsList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<!-- <el-table-column label="ID" align="center" prop="id" />-->
|
||||
<el-table-column label="平台商品ID" align="center" prop="productId" />
|
||||
<el-table-column label="平台SKU ID" align="center" prop="id" />
|
||||
|
||||
|
||||
<el-table-column label="code" align="center" prop="code" />
|
||||
<el-table-column label="标题" align="center" prop="name" />
|
||||
<el-table-column label="图片" align="center" prop="img" width="100">
|
||||
<el-table-column label="商品ID" align="center" prop="productId" />
|
||||
<el-table-column label="规格Id" align="center" prop="specId" />
|
||||
<el-table-column label="商品名称" align="center" prop="name" />
|
||||
<el-table-column label="图片" align="center" prop="logo" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.img" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="店铺" align="center" prop="categoryId" >-->
|
||||
<el-table-column label="规格" align="center" prop="specDetailName1" >
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.specDetailName1}}
|
||||
{{scope.row.specDetailName2}}
|
||||
{{scope.row.specDetailName3}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="店铺" align="center" prop="categoryId" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag size="small">{{categoryList.find(x=>x.id === scope.row.categoryId).name}}</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="SKU属性" align="center" prop="specDetailName1" >
|
||||
<el-table-column label="SKU编码" align="center" prop="code" />
|
||||
<el-table-column label="价格" align="center" prop="price" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" v-if="scope.row.specDetailName1">{{scope.row.specDetailName1}}</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.specDetailName2">{{scope.row.specDetailName2}}</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.specDetailName3">{{scope.row.specDetailName3}}</el-tag>
|
||||
{{amountFormatter(null,null,scope.row.price/100,0)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="京东价" align="center" prop="jdPrice" :formatter="amountFormatter"/>-->
|
||||
<el-table-column label="外部ERP商品SKU ID" align="center" prop="outerErpSkuId" />
|
||||
<!-- <el-table-column label="状态" align="center" prop="status" >-->
|
||||
<el-table-column label="ERP SKU ID" align="center" prop="erpGoodsSkuId" />
|
||||
<!-- <el-table-column label="状态" align="center" prop="skuStatus" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag size="small" v-if="scope.row.status === 1">销售中</el-tag>-->
|
||||
<!-- <el-tag size="small" v-if="scope.row.status === 2">已下架</el-tag>-->
|
||||
<!-- <el-tag size="small" v-if="scope.row.skuStatus === false">已下架</el-tag>-->
|
||||
<!-- <el-tag size="small" v-if="scope.row.skuStatus === true">销售中</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
|
|
@ -133,8 +117,8 @@
|
|||
<!-- 添加或修改商品管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="商品库SkuId" prop="erpGoodsSkuId">
|
||||
<el-input v-model="form.erpGoodsSkuId" placeholder="请输入商品库SkuId" />
|
||||
<el-form-item label="ERP商品SkuId" prop="erpGoodsSkuId">
|
||||
<el-input v-model.number="form.erpGoodsSkuId" placeholder="请输入ERP商品SkuId" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
|
@ -147,24 +131,19 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import {getToken} from "@/utils/auth";
|
||||
import {listGoodsSku,getGoodsSku,linkErpGoodsSkuId,pullGoodsList} from "@/api/dou/goods";
|
||||
|
||||
import {listShop} from "@/api/shop/shop";
|
||||
import {pullGoodsList, listGoodsSku, getGoodsSku, linkErpGoodsSkuId} from "@/api/dou/goods";
|
||||
import {MessageBox} from "element-ui";
|
||||
import {isRelogin} from "@/utils/request";
|
||||
|
||||
export default {
|
||||
name: "GoodsDou",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
importOpen:false,
|
||||
headers: { 'Authorization': 'Bearer ' + getToken() },
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
pullLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
|
|
@ -173,6 +152,7 @@ export default {
|
|||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
pullLoading: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 商品管理表格数据
|
||||
|
|
@ -186,8 +166,7 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
shopId:null
|
||||
name: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -206,14 +185,15 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
listShop({type:400}).then(response => {
|
||||
listShop({platform:6}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if(this.shopList && this.shopList.length>0){
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
|
||||
// this.getList();
|
||||
this.loading = false;
|
||||
},
|
||||
methods: {
|
||||
amountFormatter(row, column, cellValue, index) {
|
||||
|
|
@ -221,14 +201,6 @@ export default {
|
|||
},
|
||||
/** 查询商品管理列表 */
|
||||
getList() {
|
||||
if(this.queryParams.productId && isNaN(this.queryParams.productId)){
|
||||
this.$modal.msgError("平台商品ID必须是数字")
|
||||
return
|
||||
}
|
||||
if(this.queryParams.skuId && isNaN(this.queryParams.skuId)){
|
||||
this.$modal.msgError("平台SKU ID必须是数字")
|
||||
return
|
||||
}
|
||||
this.loading = true;
|
||||
listGoodsSku(this.queryParams).then(response => {
|
||||
this.goodsList = response.rows;
|
||||
|
|
@ -280,15 +252,15 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
handlePull(pull_type) {
|
||||
handlePull() {
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullGoodsList({shopId:this.queryParams.shopId,pullType:pull_type}).then(response => {
|
||||
console.log('拉取JD商品接口返回=====',response)
|
||||
pullGoodsList({shopId:this.queryParams.shopId}).then(response => {
|
||||
console.log('拉取PDD商品接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权!请前往店铺列表重新获取授权!', '系统提示', { confirmButtonText: '前往授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
this.$router.push({path:"/shop/shop_list",query:{type:3}})
|
||||
// isRelogin.show = false;
|
||||
this.$router.push({path:"/shop/shop_list",query:{platform:6}})
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
// location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// })
|
||||
|
|
@ -298,6 +270,7 @@ export default {
|
|||
|
||||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
}else{
|
||||
this.pullLoading = false
|
||||
this.getList()
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
}
|
||||
|
|
@ -309,7 +282,7 @@ export default {
|
|||
}
|
||||
|
||||
// this.$modal.msgSuccess("请先配置API");
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,372 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px">
|
||||
<el-form-item label="订单号" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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="orderTime">
|
||||
<el-date-picker clearable
|
||||
v-model="orderTime" value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderState">
|
||||
<el-select v-model="queryParams.orderState" placeholder="请选择状态" clearable @change="handleQuery">
|
||||
<el-option label="等待出库" value="WAIT_SELLER_STOCK_OUT" ></el-option>
|
||||
<el-option label="等待确认收货" value="WAIT_GOODS_RECEIVE_CONFIRM"></el-option>
|
||||
<el-option label="等待发货" value="WAIT_SELLER_DELIVERY"> </el-option>
|
||||
<el-option label="POP暂停" value="POP_ORDER_PAUSE"></el-option>
|
||||
<el-option label="完成" value="FINISHED_L"></el-option>
|
||||
<el-option label="取消" value="TRADE_CANCELED"></el-option>
|
||||
<el-option label="父单取消" value="PARENT_TRADE_CANCELED"></el-option>
|
||||
<el-option label="已锁定" value="LOCKED"></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">
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handlePull"
|
||||
>API拉取订单</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handlePushOms"
|
||||
>重新推送选中订单到订单库</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="订单ID" align="center" prop="orderId" />-->
|
||||
<!-- <el-table-column label="店铺" align="center" prop="shopId" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag size="small">{{shopList.find(x=>x.id === scope.row.shopId)?shopList.find(x=>x.id === scope.row.shopId).name:''}}</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="商品" width="350">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-row v-for="item in scope.row.items" :key="item.id" :gutter="20">-->
|
||||
|
||||
<!-- <div style="float: left;display: flex;align-items: center;" >-->
|
||||
<!--<!– <el-image style="width: 70px; height: 70px;" :src="item.picPath"></el-image>–>-->
|
||||
<!-- <div style="margin-left:10px">-->
|
||||
<!-- <p>{{item.skuName}}</p>-->
|
||||
<!-- <p>SKU编码:{{item.outerSkuId}} -->
|
||||
<!-- </p>-->
|
||||
<!-- <p>-->
|
||||
<!-- 数量: <el-tag size="small">x {{item.itemTotal}}</el-tag>-->
|
||||
<!-- </p>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="订单号" align="left" prop="orderId" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleDetail(scope.row)"
|
||||
> {{scope.row.orderId}}</el-button>
|
||||
<i class="el-icon-copy-document tag-copy" :data-clipboard-text="scope.row.orderId" @click="copyActiveCode($event,scope.row.orderId)" ></i>
|
||||
<br/>
|
||||
<el-tag type="info">{{ shopList.find(x=>x.id === scope.row.shopId) ? shopList.find(x=>x.id === scope.row.shopId).name : '' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品明细" align="center" width="700px" >
|
||||
<template slot="header">
|
||||
<table>
|
||||
<th>
|
||||
<!-- <td width="50px">图片</td>-->
|
||||
<td width="250px" align="left">商品名</td>
|
||||
<!-- <td width="150" align="left">SKU名</td>-->
|
||||
<td width="200" align="left">Sku编码</td>
|
||||
<td width="150" align="left">平台SkuId</td>
|
||||
<td width="50" align="left">数量</td>
|
||||
</th>
|
||||
</table>
|
||||
</template>
|
||||
<template slot-scope="scope" >
|
||||
<el-table :data="scope.row.items" :show-header="false" :cell-style="{border:0 + 'px' }" :row-style="{border:0 + 'px' }" >
|
||||
<!-- <el-table-column label="商品图片" width="50px">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <image-preview :src="scope.row.picPath" :width="40" :height="40"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="商品名" align="left" width="250px" prop="skuName" />
|
||||
<!-- <el-table-column label="SKU名" align="left" prop="goodsSpec" width="150" :show-overflow-tooltip="true"/>-->
|
||||
<el-table-column label="Sku编码" align="left" prop="outerSkuId" width="200"/>
|
||||
<el-table-column label="平台SkuId" align="left" prop="skuId" width="150"/>
|
||||
<el-table-column label="商品数量" align="center" prop="itemTotal" width="50px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" type="danger">{{scope.row.itemTotal}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单金额" align="left" prop="orderSellerPrice" :formatter="amountFormatter" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<div>
|
||||
<span style="font-size: 10px">货款金额:</span>
|
||||
<span>{{amountFormatter(null,null,scope.row.orderSellerPrice)}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<span style="font-size: 10px">应付金额:</span>
|
||||
<span>{{amountFormatter(null,null,scope.row.orderPayment)}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="收件人" prop="receiverName" width="200px">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.fullname}}
|
||||
{{scope.row.mobile}} <br />
|
||||
{{scope.row.province}} {{scope.row.city}} {{scope.row.town}} <br />
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="应付金额" align="center" prop="orderPayment" :formatter="amountFormatter"/>-->
|
||||
<!-- <el-table-column label="收件人" align="center" prop="fullname" />-->
|
||||
<!-- <el-table-column label="手机号" align="center" prop="mobile" />-->
|
||||
<el-table-column label="商家备注" align="center" prop="venderRemark" />
|
||||
<el-table-column label="状态" align="center" prop="orderStateRemark" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" >{{scope.row.orderStateRemark}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单时间" align="center" prop="orderStartTime" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
:loading="pullLoading"
|
||||
icon="el-icon-refresh"
|
||||
@click="handlePullUpdate(scope.row)"
|
||||
>更新订单</el-button>
|
||||
</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 {listOrder, pullOrder, getOrder, pushOms, pullOrderDetail} from "@/api/jd/order";
|
||||
import { listShop } from "@/api/shop/shop";
|
||||
import {MessageBox} from "element-ui";
|
||||
import {isRelogin} from "@/utils/request";
|
||||
import Clipboard from "clipboard";
|
||||
export default {
|
||||
name: "OrderJd",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
pullLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 商品管理表格数据
|
||||
lists: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
orderTime:null,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
image: null,
|
||||
orderState:'WAIT_SELLER_STOCK_OUT'
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
shopList: [],
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listShop({type:200}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if(this.shopList && this.shopList.length>0){
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
copyActiveCode(event,queryParams) {
|
||||
console.log(queryParams)
|
||||
const clipboard = new Clipboard(".tag-copy")
|
||||
clipboard.on('success', e => {
|
||||
this.$message({ type: 'success', message: '复制成功' })
|
||||
// 释放内存
|
||||
clipboard.destroy()
|
||||
})
|
||||
clipboard.on('error', e => {
|
||||
// 不支持复制
|
||||
this.$message({ type: 'waning', message: '该浏览器不支持自动复制' })
|
||||
// 释放内存
|
||||
clipboard.destroy()
|
||||
})
|
||||
},
|
||||
amountFormatter(row, column, cellValue, index) {
|
||||
return '¥' + parseFloat(cellValue).toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
|
||||
},
|
||||
/** 查询商品管理列表 */
|
||||
getList() {
|
||||
if(this.orderTime){
|
||||
this.queryParams.startTime = this.orderTime[0]
|
||||
this.queryParams.endTime = this.orderTime[1]
|
||||
}else {
|
||||
this.queryParams.startTime = null
|
||||
this.queryParams.endTime = null
|
||||
}
|
||||
this.loading = true;
|
||||
listOrder(this.queryParams).then(response => {
|
||||
this.lists = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
image: null,
|
||||
number: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.orderTime=null
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.orderId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handlePushOms(row) {
|
||||
const ids = row.orderId || this.ids;
|
||||
this.$modal.confirm('是否手动推送到OMS?').then(function() {
|
||||
return pushOms({ids:ids});
|
||||
}).then(() => {
|
||||
// this.getList();
|
||||
this.$modal.msgSuccess("推送成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
handlePull(){
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullOrder({shopId:this.queryParams.shopId,updType:0}).then(response => {
|
||||
console.log('拉取JD订单接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权!请前往店铺列表重新获取授权!', '系统提示', { confirmButtonText: '前往授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
this.$router.push({path:"/shop/shop_list",query:{type:2}})
|
||||
// isRelogin.show = false;
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
// location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// })
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
});
|
||||
|
||||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
}else if(response.code === 1402){
|
||||
this.$modal.msgError(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
}else {
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
this.getList()
|
||||
}
|
||||
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先选择店铺");
|
||||
}
|
||||
},
|
||||
handlePullUpdate(row) {
|
||||
// 接口拉取订单并更新
|
||||
this.pullLoading = true
|
||||
pullOrderDetail({shopId:row.shopId,orderId:row.orderId}).then(response => {
|
||||
console.log('拉取JD订单接口返回=====',response)
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -3,12 +3,12 @@
|
|||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<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 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>
|
||||
<!-- <order-offline v-if="item.id === 999"></order-offline>-->
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="天猫" name="taoOrder">-->
|
||||
<!-- <order-tao></order-tao>-->
|
||||
|
|
@ -32,17 +32,17 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
// import OrderTao from "@/views/tao/order/index";
|
||||
// import OrderJd from "@/views/jd/order/index";
|
||||
import OrderTao from "@/views/tao/order/index";
|
||||
import OrderJd from "@/views/jd/order/index";
|
||||
// import OrderJdVc from "@/views/jd/order/index-vc.vue";
|
||||
import OrderDou from "@/views/dou/order/index";
|
||||
import OrderPdd from "@/views/pdd/order/index";
|
||||
import OrderWei from "@/views/wei/order/index";
|
||||
import OrderOffline from "@/views/order/private/index";
|
||||
// import OrderOffline from "@/views/order/private/index";
|
||||
import {listPlatform} from "@/api/shop/shop";
|
||||
export default {
|
||||
name: "Order",
|
||||
components:{OrderDou,OrderPdd,OrderWei,OrderOffline},
|
||||
components:{OrderDou,OrderPdd,OrderWei,OrderTao,OrderJd},
|
||||
data() {
|
||||
return {
|
||||
activeName: '',
|
||||
|
|
|
|||
|
|
@ -1,28 +1,26 @@
|
|||
<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="平台SKU ID" prop="skuId">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px">
|
||||
<el-form-item label="平台SkuId" prop="skuId">
|
||||
<el-input
|
||||
v-model="queryParams.skuId"
|
||||
placeholder="请输入平台SKU ID"
|
||||
placeholder="请输入平台SkuId"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商家SKU编码" prop="outerId">
|
||||
<el-form-item label="商家sku编码" prop="outerId">
|
||||
<el-input
|
||||
v-model="queryParams.outerId"
|
||||
placeholder="请输入商家SKU编码"
|
||||
placeholder="请输入商家sku编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="平台商品ID" prop="goodsId">
|
||||
<el-form-item label="ERP skuId" prop="erpSkuId">
|
||||
<el-input
|
||||
v-model="queryParams.goodsId"
|
||||
placeholder="请输入平台商品ID"
|
||||
v-model="queryParams.erpSkuId"
|
||||
placeholder="请输入ERP skuId"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
|
|
@ -37,12 +35,6 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否关联" prop="hasLink">
|
||||
<el-select v-model="queryParams.hasLink" placeholder="是否关联" clearable @change="handleQuery">
|
||||
<el-option label="未关联" value="0"></el-option>
|
||||
<el-option label="已关联" value="1"></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>
|
||||
|
|
@ -57,38 +49,32 @@
|
|||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePull(1)"
|
||||
>API更新商品数据</el-button>
|
||||
@click="handlePull"
|
||||
>API拉取商品数据</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="goodsList">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<!-- <el-table-column label="ID" align="center" prop="id" />-->
|
||||
<!-- <el-table-column label="平台商品ID" align="center" prop="goodsId" />-->
|
||||
<el-table-column label="平台SKU ID" align="left" prop="skuId" >
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.skuId}} <br/>
|
||||
<el-tag>{{ shopList.find(x=>x.id === scope.row.shopId) ? shopList.find(x=>x.id === scope.row.shopId).name : '' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商家编码" align="center" prop="outerId" />
|
||||
<el-table-column label="标题" align="center" prop="goodsName" />
|
||||
<el-table-column label="图片" align="center" prop="thumbUrl" width="100">
|
||||
<el-table-column label="商品ID" align="center" prop="goodsId" />
|
||||
<el-table-column label="Sku Id" align="center" prop="skuId" />
|
||||
<el-table-column label="商品名" align="center" prop="goodsName" />
|
||||
<el-table-column label="规格" align="center" prop="spec" />
|
||||
<el-table-column label="图片" align="center" prop="logo" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.thumbUrl" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="店铺" align="center" prop="categoryId" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag size="small">{{categoryList.find(x=>x.id === scope.row.categoryId).name}}</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="SKU属性" align="center" prop="spec" ></el-table-column>
|
||||
<el-table-column label="商品库SkuId" align="center" prop="ogoodsSkuId" />
|
||||
<el-table-column label="店铺" align="center" prop="shopId" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small">{{shopList.find(x=>x.id === scope.row.shopId).name}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商家编码" align="center" prop="outerId" />
|
||||
<el-table-column label="ERP SKU ID" align="center" prop="erpGoodsSkuId" />
|
||||
<el-table-column label="状态" align="center" prop="isSkuOnsale" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" v-if="scope.row.isSkuOnsale === 1">上架中</el-tag>
|
||||
|
|
@ -120,8 +106,8 @@
|
|||
<!-- 添加或修改商品管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="商品库SkuId" prop="erpGoodsSkuId">
|
||||
<el-input v-model="form.erpGoodsSkuId" placeholder="请输入商品库SkuId" />
|
||||
<el-form-item label="ERP商品SkuId" prop="erpGoodsSkuId">
|
||||
<el-input v-model.number="form.erpGoodsSkuId" placeholder="请输入ERP商品SkuId" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
|
@ -134,24 +120,20 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import {getToken} from "@/utils/auth";
|
||||
import {listGoodsSku,getGoodsSku,linkErpGoodsSkuId,pullGoodsList} from "@/api/pdd/goods";
|
||||
|
||||
import {listShop} from "@/api/shop/shop";
|
||||
import {listGoodsSku,pullGoodsList,getGoodsSku,linkErpGoodsSkuId} from "@/api/pdd/goods";
|
||||
|
||||
import {MessageBox} from "element-ui";
|
||||
import {isRelogin} from "@/utils/request";
|
||||
|
||||
export default {
|
||||
name: "GoodsPdd",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
importOpen:false,
|
||||
headers: { 'Authorization': 'Bearer ' + getToken() },
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
pullLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
|
|
@ -160,6 +142,7 @@ export default {
|
|||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
pullLoading: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 商品管理表格数据
|
||||
|
|
@ -173,8 +156,7 @@ export default {
|
|||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
shopId:null
|
||||
name: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -186,36 +168,26 @@ export default {
|
|||
id: [
|
||||
{ required: true, message: "不能为空", trigger: "change" }
|
||||
],
|
||||
erpSkuId: [
|
||||
erpGoodsSkuId: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listShop({type:300}).then(response => {
|
||||
listShop({platform:5}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if(this.shopList && this.shopList.length>0){
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
|
||||
// this.getList();
|
||||
this.loading = false;
|
||||
},
|
||||
methods: {
|
||||
amountFormatter(row, column, cellValue, index) {
|
||||
return '¥' + cellValue.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
|
||||
},
|
||||
/** 查询商品管理列表 */
|
||||
getList() {
|
||||
if(this.queryParams.goodsId && isNaN(this.queryParams.goodsId)){
|
||||
this.$modal.msgError("平台商品ID必须是数字")
|
||||
return
|
||||
}
|
||||
if(this.queryParams.skuId && isNaN(this.queryParams.skuId)){
|
||||
this.$modal.msgError("平台SKU ID必须是数字")
|
||||
return
|
||||
}
|
||||
this.loading = true;
|
||||
listGoodsSku(this.queryParams).then(response => {
|
||||
this.goodsList = response.rows;
|
||||
|
|
@ -267,14 +239,14 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
handlePull(pull_type) {
|
||||
handlePull() {
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullGoodsList({shopId:this.queryParams.shopId,pullType:pull_type}).then(response => {
|
||||
console.log('拉取JD商品接口返回=====',response)
|
||||
pullGoodsList({shopId:this.queryParams.shopId}).then(response => {
|
||||
console.log('拉取PDD商品接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权!请前往店铺列表重新获取授权!', '系统提示', { confirmButtonText: '前往授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
this.$router.push({path:"/shop/shop_list",query:{type:4}})
|
||||
this.$router.push({path:"/shop/shop_list",query:{platform:5}})
|
||||
// isRelogin.show = false;
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
// location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
|
|
@ -296,7 +268,7 @@ export default {
|
|||
}
|
||||
|
||||
// this.$modal.msgSuccess("请先配置API");
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@
|
|||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="danger"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
|
|
@ -63,7 +63,7 @@
|
|||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handlePushOms"
|
||||
>手动将选中退款推送到售后中心</el-button>
|
||||
>手动推送售后</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
|
@ -157,6 +157,7 @@ export default {
|
|||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
pullLoading: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 淘宝退款订单表格数据
|
||||
|
|
@ -171,10 +172,7 @@ export default {
|
|||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
refundId: null,
|
||||
afterSalesType: null,
|
||||
tid: null,
|
||||
oid: null,
|
||||
|
||||
afterSalesType: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
|
|
@ -196,7 +194,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
listShop({type: 300}).then(response => {
|
||||
listShop({platform: 5}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
|
|
|
|||
|
|
@ -1,48 +0,0 @@
|
|||
<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>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
import TaoRefund from "@/views/shop/tao/refund/index";
|
||||
import JdRefund from "@/views/shop/jd/refund/index";
|
||||
import DouRefund from "@/views/shop/dou/refund/index.vue";
|
||||
import PddRefund from "@/views/shop/pdd/refund/index.vue";
|
||||
|
||||
export default {
|
||||
name: "refund",
|
||||
components:{PddRefund, DouRefund, TaoRefund,JdRefund},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'taoOrder'
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -19,10 +19,10 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import TaoRefund from "@/views/shop/tao/refund/index";
|
||||
import JdRefund from "@/views/shop/jd/refund/index";
|
||||
import DouRefund from "@/views/shop/dou/refund/index.vue";
|
||||
import PddRefund from "@/views/shop/pdd/refund/index.vue";
|
||||
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";
|
||||
|
||||
export default {
|
||||
name: "refund",
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="天猫" name="taoOrder">
|
||||
<order-tao></order-tao>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="京东" name="jdOrder" lazy>
|
||||
<order-jd></order-jd>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="抖店" name="douOrder" lazy>
|
||||
<order-dou></order-dou>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="拼多多" name="pddOrder" lazy>
|
||||
<order-pdd></order-pdd>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OrderTao from "@/views/shop/tao/order/index";
|
||||
import OrderJd from "@/views/shop/jd/order/index";
|
||||
import OrderDou from "@/views/shop/dou/order/index";
|
||||
import OrderPdd from "@/views/shop/pdd/order/index";
|
||||
export default {
|
||||
name: "Order",
|
||||
components:{OrderTao,OrderJd,OrderDou,OrderPdd},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'taoOrder'
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,143 +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" />
|
||||
<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>
|
||||
</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" />
|
||||
|
||||
</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>
|
||||
|
|
@ -23,11 +23,11 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import printWei from "@/views/shop/wei/ewaybill/index.vue";
|
||||
import printTao from "@/views/shop/tao/ewaybill/index.vue";
|
||||
import printPdd from "@/views/shop/pdd/ewaybill/index.vue";
|
||||
import printDou from "@/views/shop/dou/ewaybill/index.vue";
|
||||
import PrintJd from "@/views/shop/jd/ewaybill/index.vue";
|
||||
import printWei from "@/views/wei/ewaybill/index.vue";
|
||||
import printTao from "@/views/tao/ewaybill/index.vue";
|
||||
import printPdd from "@/views/pdd/ewaybill/index.vue";
|
||||
import printDou from "@/views/dou/ewaybill/index.vue";
|
||||
import PrintJd from "@/views/jd/ewaybill/index.vue";
|
||||
|
||||
|
||||
export default {
|
||||
|
|
|
|||
|
|
@ -1,288 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px">
|
||||
<el-form-item label="平台SkuId" prop="skuId">
|
||||
<el-input
|
||||
v-model="queryParams.skuId"
|
||||
placeholder="请输入平台SkuId"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商家sku编码" prop="outerId">
|
||||
<el-input
|
||||
v-model="queryParams.outerId"
|
||||
placeholder="请输入商家sku编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="ERP skuId" prop="erpSkuId">
|
||||
<el-input
|
||||
v-model="queryParams.erpSkuId"
|
||||
placeholder="请输入ERP skuId"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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>
|
||||
<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">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePull"
|
||||
>API拉取商品数据</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="goodsList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<!-- <el-table-column label="ID" align="center" prop="id" />-->
|
||||
<el-table-column label="商品ID" align="center" prop="productId" />
|
||||
<el-table-column label="规格Id" align="center" prop="specId" />
|
||||
<el-table-column label="商品名称" align="center" prop="name" />
|
||||
<el-table-column label="图片" align="center" prop="logo" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.img" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="规格" align="center" prop="specDetailName1" >
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.specDetailName1}}
|
||||
{{scope.row.specDetailName2}}
|
||||
{{scope.row.specDetailName3}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="店铺" align="center" prop="categoryId" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag size="small">{{categoryList.find(x=>x.id === scope.row.categoryId).name}}</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="SKU编码" align="center" prop="code" />
|
||||
<el-table-column label="价格" align="center" prop="price" >
|
||||
<template slot-scope="scope">
|
||||
{{amountFormatter(null,null,scope.row.price/100,0)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="ERP SKU ID" align="center" prop="erpGoodsSkuId" />
|
||||
<!-- <el-table-column label="状态" align="center" prop="skuStatus" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag size="small" v-if="scope.row.skuStatus === false">已下架</el-tag>-->
|
||||
<!-- <el-tag size="small" v-if="scope.row.skuStatus === true">销售中</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleLink(scope.row)"
|
||||
>关联ERP</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
<!-- 添加或修改商品管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="ERP商品SkuId" prop="erpGoodsSkuId">
|
||||
<el-input v-model.number="form.erpGoodsSkuId" placeholder="请输入ERP商品SkuId" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
|
||||
import {listShop} from "@/api/shop/shop";
|
||||
import {pullGoodsList, listGoodsSku, getGoodsSku, linkErpGoodsSkuId} from "@/api/dou/goods";
|
||||
import {MessageBox} from "element-ui";
|
||||
import {isRelogin} from "@/utils/request";
|
||||
|
||||
export default {
|
||||
name: "GoodsDou",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
pullLoading: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 商品管理表格数据
|
||||
goodsList: [],
|
||||
shopList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
supplierList: [],
|
||||
categoryList: [],
|
||||
categoryTree: [],
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "不能为空", trigger: "change" }
|
||||
],
|
||||
erpSkuId: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listShop({platform:6}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
// this.getList();
|
||||
this.loading = false;
|
||||
},
|
||||
methods: {
|
||||
amountFormatter(row, column, cellValue, index) {
|
||||
return '¥' + cellValue.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
|
||||
},
|
||||
/** 查询商品管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listGoodsSku(this.queryParams).then(response => {
|
||||
this.goodsList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
erpSkuId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
handleLink(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getGoodsSku(id).then(response => {
|
||||
console.log('=====00000000============',response)
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
linkErpGoodsSkuId(this.form).then(response => {
|
||||
this.$modal.msgSuccess("关联成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handlePull() {
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullGoodsList({shopId:this.queryParams.shopId}).then(response => {
|
||||
console.log('拉取PDD商品接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权!请前往店铺列表重新获取授权!', '系统提示', { confirmButtonText: '前往授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
// isRelogin.show = false;
|
||||
this.$router.push({path:"/shop/shop_list",query:{platform:6}})
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
// location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// })
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
});
|
||||
|
||||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
}else{
|
||||
this.pullLoading = false
|
||||
this.getList()
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
}
|
||||
this.pullLoading = false
|
||||
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先选择店铺");
|
||||
}
|
||||
|
||||
// this.$modal.msgSuccess("请先配置API");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,336 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="订单号" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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="orderTime">
|
||||
<el-date-picker clearable
|
||||
v-model="orderTime" value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择状态" clearable @change="handleQuery">
|
||||
|
||||
<el-option label="待支付" value="1" ></el-option>
|
||||
<el-option label="已支付" value="105"></el-option>
|
||||
<el-option label="备货中" value="2"> </el-option>
|
||||
<el-option label="部分发货" value="101"> </el-option>
|
||||
<el-option label="已发货" value="3"> </el-option>
|
||||
<el-option label="已取消" value="4"> </el-option>
|
||||
<el-option label="已完成" value="5"> </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">
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePull"
|
||||
>API拉取订单</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handlePushOms"
|
||||
>手动推送订单</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="订单号" align="center" prop="orderId" />
|
||||
<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="商品" width="350">
|
||||
<template slot-scope="scope">
|
||||
<el-row v-for="item in scope.row.items" :key="item.id" :gutter="20">
|
||||
|
||||
<div style="float: left;display: flex;align-items: center;" >
|
||||
<el-image style="width: 70px; height: 70px;" :src="item.productPic"></el-image>
|
||||
<div style="margin-left:10px">
|
||||
<p>{{item.productName}}
|
||||
</p>
|
||||
<p>SKU编码:{{item.code}}</p>
|
||||
<p>数量:<el-tag size="small">x {{item.itemNum}}</el-tag></p>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实付总金额" align="center" prop="payAmount" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ amountFormatter(null,null,scope.row.payAmount/100,0) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="买家留言" align="center" prop="buyerWords" />
|
||||
<el-table-column label="卖家备注" align="center" prop="sellerWords" />
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 1"> 待支付</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 105"> 已支付</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 2"> 备货中</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 101"> 部分发货</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 3"> 已发货</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 4"> 已取消</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 5"> 已完成</el-tag>
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
size="mini"
|
||||
icon="el-icon-refresh"
|
||||
@click="handlePullUpdate(scope.row)"
|
||||
>更新订单</el-button>
|
||||
</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 {listOrder, pullOrder, getOrder, pushOms, pullOrderDetail} from "@/api/dou/order";
|
||||
import { listShop } from "@/api/shop/shop";
|
||||
|
||||
export default {
|
||||
name: "OrderDou",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
pullLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
detailOpen: false,
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 淘宝订单表格数据
|
||||
orderList: [],
|
||||
shopList:[],
|
||||
orderTime:null,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
shopId: null,
|
||||
tid: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
status: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listShop({platform:6}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
amountFormatter(row, column, cellValue, index) {
|
||||
return '¥' + cellValue.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
|
||||
},
|
||||
/** 查询淘宝订单列表 */
|
||||
getList() {
|
||||
if(this.orderTime){
|
||||
this.queryParams.startTime = this.orderTime[0]
|
||||
this.queryParams.endTime = this.orderTime[1]
|
||||
}else {
|
||||
this.queryParams.startTime = null
|
||||
this.queryParams.endTime = null
|
||||
}
|
||||
this.loading = true;
|
||||
listOrder(this.queryParams).then(response => {
|
||||
this.orderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.detailOpen = false;
|
||||
this.saleAfterOpen = false
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
shopId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.orderTime=null
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.orderId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handlePullDetailByTid(){
|
||||
if(this.queryParams.shopId && this.queryParams.orderId) {
|
||||
this.pullLoading = true
|
||||
pullOrderDetail({shopId:this.queryParams.shopId,orderId:this.queryParams.orderId}).then(response => {
|
||||
console.log('拉取淘宝订单接口返回=====',response)
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先输入订单号并且选择店铺");
|
||||
}
|
||||
},
|
||||
handlePull() {
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullOrder({shopId:this.queryParams.shopId,updType:0}).then(response => {
|
||||
console.log('拉取dou订单接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权!请前往店铺列表重新获取授权!', '系统提示', { confirmButtonText: '前往授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
this.$router.push({path:"/shop/shop_list",query:{type:3}})
|
||||
// isRelogin.show = false;
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
// location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// })
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
});
|
||||
|
||||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
}else{
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.getList()
|
||||
}
|
||||
this.pullLoading = false
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先选择店铺");
|
||||
}
|
||||
|
||||
// this.$modal.msgSuccess("请先配置API");
|
||||
},
|
||||
handlePullUpdate(row) {
|
||||
// 接口拉取订单并更新
|
||||
this.pullLoading = true
|
||||
pullOrderDetail({shopId:row.shopId,orderId:row.orderId}).then(response => {
|
||||
console.log('拉取dou订单接口返回=====',response)
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
})
|
||||
},
|
||||
handleDetail(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getOrder(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.goodsList = response.data.taoOrderItemList;
|
||||
this.detailOpen = true;
|
||||
this.detailTitle = "订单详情";
|
||||
});
|
||||
this.isAudit = false
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
handlePushOms(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否手动推送到系统?').then(function() {
|
||||
return pushOms({ids:ids});
|
||||
}).then(() => {
|
||||
// this.getList();
|
||||
this.$modal.msgSuccess("推送成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -28,11 +28,11 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import GoodsTao from "@/views/shop/tao/goods/index";
|
||||
import GoodsJd from "@/views/shop/jd/goods/index";
|
||||
import GoodsDou from "@/views/shop/dou/goods/index";
|
||||
import GoodsPdd from "@/views/shop/pdd/goods/index";
|
||||
import GoodsWei from "@/views/shop/wei/goods/index";
|
||||
import GoodsTao from "@/views/tao/goods/index";
|
||||
import GoodsJd from "@/views/jd/goods/index";
|
||||
import GoodsDou from "@/views/dou/goods/index";
|
||||
import GoodsPdd from "@/views/pdd/goods/index";
|
||||
import GoodsWei from "@/views/wei/goods/index";
|
||||
export default {
|
||||
name: "ShopGoods",
|
||||
components:{GoodsTao,GoodsJd,GoodsDou,GoodsPdd,GoodsWei},
|
||||
|
|
|
|||
|
|
@ -1,259 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px">
|
||||
<el-form-item label="订单号" prop="id">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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="orderState">
|
||||
<el-select v-model="queryParams.orderState" placeholder="请选择状态" clearable @change="handleQuery">
|
||||
<el-option label="等待出库" value="WAIT_SELLER_STOCK_OUT" ></el-option>
|
||||
<el-option label="等待确认收货" value="WAIT_GOODS_RECEIVE_CONFIRM"></el-option>
|
||||
<el-option label="等待发货" value="WAIT_SELLER_DELIVERY"> </el-option>
|
||||
<el-option label="POP暂停" value="POP_ORDER_PAUSE"></el-option>
|
||||
<el-option label="完成" value="FINISHED_L"></el-option>
|
||||
<el-option label="取消" value="TRADE_CANCELED"></el-option>
|
||||
<el-option label="已锁定" value="LOCKED"></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">
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
@click="handlePull"
|
||||
>API拉取订单</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handlePushOms"
|
||||
>手动推送订单</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="lists" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="订单ID" align="center" prop="orderId" />-->
|
||||
<el-table-column label="订单号" align="center" prop="orderId" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{scope.row.orderId}}</p>
|
||||
<el-tag size="small">{{shopList.find(x=>x.id === scope.row.shopId).name}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品" width="350">
|
||||
<template slot-scope="scope">
|
||||
<el-row v-for="item in scope.row.itemList" :key="item.id" :gutter="20">
|
||||
|
||||
<div style="float: left;display: flex;align-items: center;" >
|
||||
<!-- <el-image style="width: 70px; height: 70px;" :src="item.picPath"></el-image>-->
|
||||
<div style="margin-left:10px">
|
||||
<p>{{item.skuName}}</p>
|
||||
<p>{{item.outerSkuId}}
|
||||
<el-tag size="small">x {{item.itemTotal}}</el-tag>
|
||||
</p>
|
||||
<p v-if="scope.row.refundStatus === 0">
|
||||
<el-button type="text" size="mini" round @click="handleRefund(scope.row,item)">售后</el-button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单总金额" align="center" prop="orderTotalPrice" />
|
||||
<el-table-column label="收件人" align="center" prop="fullname" />
|
||||
<el-table-column label="手机号" align="center" prop="mobile" />
|
||||
<el-table-column label="商家备注" align="center" prop="venderRemark" />
|
||||
<el-table-column label="状态" align="center" prop="orderStateRemark" />
|
||||
<el-table-column label="下单时间" align="center" prop="orderStartTime" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
:loading="pullLoading"
|
||||
icon="el-icon-refresh"
|
||||
@click="handlePullUpdate(scope.row)"
|
||||
>更新订单</el-button>
|
||||
</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 {listOrder, pullOrder, getOrder, pushOms, pullOrderDetail} from "@/api/jd/order";
|
||||
import { listShop } from "@/api/shop/shop";
|
||||
import {MessageBox} from "element-ui";
|
||||
import {isRelogin} from "@/utils/request";
|
||||
export default {
|
||||
name: "OrderJd",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
pullLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 商品管理表格数据
|
||||
lists: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
image: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
shopList: [],
|
||||
// 表单校验
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listShop({platform:3}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询商品管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listOrder(this.queryParams).then(response => {
|
||||
this.lists = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
image: null,
|
||||
number: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.orderId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handlePushOms(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否手动推送到OMS?').then(function() {
|
||||
return pushOms({ids:ids});
|
||||
}).then(() => {
|
||||
// this.getList();
|
||||
this.$modal.msgSuccess("推送成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
handlePull(){
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullOrder({shopId:this.queryParams.shopId,updType:0}).then(response => {
|
||||
console.log('拉取JD订单接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权', '系统提示', { confirmButtonText: '重新授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
isRelogin.show = false;
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// })
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
});
|
||||
|
||||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
}else{
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
}
|
||||
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先选择店铺");
|
||||
}
|
||||
},
|
||||
handlePullUpdate(row) {
|
||||
// 接口拉取订单并更新
|
||||
this.pullLoading = true
|
||||
pullOrderDetail({shopId:row.shopId,orderId:row.orderId}).then(response => {
|
||||
console.log('拉取JD订单接口返回=====',response)
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="淘宝天猫" name="taoOrder">
|
||||
<order-tao></order-tao>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="京东POP" name="jdOrder" lazy>
|
||||
<order-jd></order-jd>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="拼多多" name="pddOrder" lazy>
|
||||
<order-pdd></order-pdd>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="抖店" name="douOrder" lazy>
|
||||
<order-dou></order-dou>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="视频号" name="weiOrder" lazy>
|
||||
<order-wei></order-wei>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import OrderTao from "@/views/shop/tao/order/index";
|
||||
import OrderJd from "@/views/shop/jd/order/index";
|
||||
import OrderDou from "@/views/shop/dou/order/index";
|
||||
import OrderPdd from "@/views/shop/pdd/order/index";
|
||||
import OrderWei from "@/views/shop/wei/order/index";
|
||||
export default {
|
||||
name: "Order",
|
||||
components:{OrderTao,OrderJd,OrderDou,OrderPdd,OrderWei},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'taoOrder'
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,274 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px">
|
||||
<el-form-item label="平台SkuId" prop="skuId">
|
||||
<el-input
|
||||
v-model="queryParams.skuId"
|
||||
placeholder="请输入平台SkuId"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商家sku编码" prop="outerId">
|
||||
<el-input
|
||||
v-model="queryParams.outerId"
|
||||
placeholder="请输入商家sku编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="ERP skuId" prop="erpSkuId">
|
||||
<el-input
|
||||
v-model="queryParams.erpSkuId"
|
||||
placeholder="请输入ERP skuId"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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>
|
||||
<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">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePull"
|
||||
>API拉取商品数据</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="goodsList">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<!-- <el-table-column label="ID" align="center" prop="id" />-->
|
||||
<el-table-column label="商品ID" align="center" prop="goodsId" />
|
||||
<el-table-column label="Sku Id" align="center" prop="skuId" />
|
||||
<el-table-column label="商品名" align="center" prop="goodsName" />
|
||||
<el-table-column label="规格" align="center" prop="spec" />
|
||||
<el-table-column label="图片" align="center" prop="logo" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.thumbUrl" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="店铺" align="center" prop="shopId" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small">{{shopList.find(x=>x.id === scope.row.shopId).name}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商家编码" align="center" prop="outerId" />
|
||||
<el-table-column label="ERP SKU ID" align="center" prop="erpGoodsSkuId" />
|
||||
<el-table-column label="状态" align="center" prop="isSkuOnsale" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" v-if="scope.row.isSkuOnsale === 1">上架中</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.isSkuOnsale === 0">已下架</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleLink(scope.row)"
|
||||
>关联ERP</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
<!-- 添加或修改商品管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="ERP商品SkuId" prop="erpGoodsSkuId">
|
||||
<el-input v-model.number="form.erpGoodsSkuId" placeholder="请输入ERP商品SkuId" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
|
||||
import {listShop} from "@/api/shop/shop";
|
||||
import {listGoodsSku,pullGoodsList,getGoodsSku,linkErpGoodsSkuId} from "@/api/pdd/goods";
|
||||
|
||||
import {MessageBox} from "element-ui";
|
||||
import {isRelogin} from "@/utils/request";
|
||||
|
||||
export default {
|
||||
name: "GoodsPdd",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
pullLoading: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 商品管理表格数据
|
||||
goodsList: [],
|
||||
shopList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
supplierList: [],
|
||||
categoryList: [],
|
||||
categoryTree: [],
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "不能为空", trigger: "change" }
|
||||
],
|
||||
erpGoodsSkuId: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listShop({platform:5}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
// this.getList();
|
||||
this.loading = false;
|
||||
},
|
||||
methods: {
|
||||
/** 查询商品管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listGoodsSku(this.queryParams).then(response => {
|
||||
this.goodsList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
erpSkuId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
handleLink(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getGoodsSku(id).then(response => {
|
||||
console.log('=====00000000============',response)
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
linkErpGoodsSkuId(this.form).then(response => {
|
||||
this.$modal.msgSuccess("关联成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handlePull() {
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullGoodsList({shopId:this.queryParams.shopId}).then(response => {
|
||||
console.log('拉取PDD商品接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权!请前往店铺列表重新获取授权!', '系统提示', { confirmButtonText: '前往授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
this.$router.push({path:"/shop/shop_list",query:{platform:5}})
|
||||
// isRelogin.show = false;
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
// location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// })
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
});
|
||||
|
||||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
}else{
|
||||
this.getList()
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
}
|
||||
this.pullLoading = false
|
||||
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先选择店铺");
|
||||
}
|
||||
|
||||
// this.$modal.msgSuccess("请先配置API");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,335 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="订单号" prop="orderSn">
|
||||
<el-input
|
||||
v-model="queryParams.orderSn"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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="orderTime">
|
||||
<el-date-picker clearable
|
||||
v-model="orderTime" value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择状态" clearable @change="handleQuery">
|
||||
<el-option label="待发货" value="1" ></el-option>
|
||||
<el-option label="已发货待签收" value="2"></el-option>
|
||||
<el-option label="已签收" value="3"> </el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="售后状态" prop="refundStatus">
|
||||
<el-select v-model="queryParams.refundStatus" placeholder="请选择状态" clearable @change="handleQuery">
|
||||
<el-option label="无售后或售后关闭" value="1" ></el-option>
|
||||
<el-option label="售后处理中" value="2"></el-option>
|
||||
<el-option label="退款中" value="3"> </el-option>
|
||||
<el-option label="退款成功" value="4"> </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">
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePull"
|
||||
>API拉取订单</el-button>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handlePushOms"
|
||||
>手动推送订单</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="订单号" align="center" prop="orderSn" />
|
||||
<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="商品" width="350">
|
||||
<template slot-scope="scope">
|
||||
<el-row v-for="item in scope.row.itemList" :key="item.id" :gutter="20">
|
||||
|
||||
<div style="float: left;display: flex;align-items: center;" >
|
||||
<el-image style="width: 70px; height: 70px;" :src="item.goodsImg"></el-image>
|
||||
<div style="margin-left:10px">
|
||||
<p>{{item.goodsName}}【{{item.goodsSpec}}】
|
||||
</p>
|
||||
<p>SKU编码:{{item.outerSkuId}}</p>
|
||||
<p>数量:<el-tag size="small">x {{item.goodsCount}}</el-tag></p>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="实付总金额" align="center" prop="payAmount" :formatter="amountFormatter" />
|
||||
<el-table-column label="订单创建时间" align="center" prop="createdTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createdTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="买家留言" align="center" prop="buyerMemo" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 1"> 待发货</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 2"> 已发货待签收</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.orderStatus === 3"> 已签收</el-tag>
|
||||
<br />
|
||||
<el-tag size="small" v-if="scope.row.refundStatus === 1"> 无售后或售后关闭</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.refundStatus === 2"> 售后处理中</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.refundStatus === 3"> 退款中</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.refundStatus === 4"> 退款成功</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
size="mini"
|
||||
icon="el-icon-refresh"
|
||||
@click="handlePullUpdate(scope.row)"
|
||||
>更新订单</el-button>
|
||||
</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 {listOrder, pullOrder, getOrder, pushOms} from "@/api/pdd/order";
|
||||
import { listShop } from "@/api/shop/shop";
|
||||
import {MessageBox} from "element-ui";
|
||||
|
||||
|
||||
export default {
|
||||
name: "OrderPdd",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
pullLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
detailOpen: false,
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 淘宝订单表格数据
|
||||
orderList: [],
|
||||
shopList:[],
|
||||
orderTime:null,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
shopId: null,
|
||||
tid: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
status: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
},
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listShop({platform: 5}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
amountFormatter(row, column, cellValue, index) {
|
||||
return '¥' + cellValue.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
|
||||
},
|
||||
/** 查询淘宝订单列表 */
|
||||
getList() {
|
||||
if(this.orderTime){
|
||||
this.queryParams.startTime = this.orderTime[0]
|
||||
this.queryParams.endTime = this.orderTime[1]
|
||||
}else {
|
||||
this.queryParams.startTime = null
|
||||
this.queryParams.endTime = null
|
||||
}
|
||||
this.loading = true;
|
||||
listOrder(this.queryParams).then(response => {
|
||||
this.orderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.detailOpen = false;
|
||||
this.saleAfterOpen = false
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
shopId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.orderTime=null
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.orderSn)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handlePullDetailByTid(){
|
||||
if(this.queryParams.shopId && this.queryParams.orderSn) {
|
||||
this.pullLoading = true
|
||||
pullOrderDetail({shopId:this.queryParams.shopId,orderId:this.queryParams.tid}).then(response => {
|
||||
console.log('拉取淘宝订单接口返回=====',response)
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先输入订单号并且选择店铺");
|
||||
}
|
||||
},
|
||||
handlePull() {
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullOrder({shopId:this.queryParams.shopId,updType:0}).then(response => {
|
||||
console.log('拉取PDD订单接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权!请前往店铺列表重新获取授权!', '系统提示', { confirmButtonText: '前往授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
this.$router.push({path:"/shop/shop_list",query:{type:1}})
|
||||
// isRelogin.show = false;
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
// location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// })
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
});
|
||||
|
||||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
}else{
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
}
|
||||
this.pullLoading = false
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先选择店铺");
|
||||
}
|
||||
|
||||
// this.$modal.msgSuccess("请先配置API");
|
||||
},
|
||||
handlePullUpdate(row) {
|
||||
// 接口拉取订单并更新
|
||||
this.pullLoading = true
|
||||
pullOrderDetail({shopId:row.shopId,orderId:row.orderSn}).then(response => {
|
||||
console.log('拉取pdd订单详情接口返回=====',response)
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
})
|
||||
},
|
||||
handleDetail(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getOrder(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.goodsList = response.data.taoOrderItemList;
|
||||
this.detailOpen = true;
|
||||
this.detailTitle = "订单详情";
|
||||
});
|
||||
this.isAudit = false
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
handlePushOms(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否手动推送到系统?').then(function() {
|
||||
return pushOms({ids:ids});
|
||||
}).then(() => {
|
||||
// this.getList();
|
||||
this.$modal.msgSuccess("推送成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,289 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<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="退款ID" prop="refundId">
|
||||
<el-input
|
||||
v-model="queryParams.refundId"
|
||||
placeholder="请输入退款ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="orderSn">
|
||||
<el-input
|
||||
v-model="queryParams.orderSn"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="afterSalesType">
|
||||
<el-select v-model="queryParams.afterSalesType" placeholder="请选择类型" clearable @change="handleQuery">
|
||||
|
||||
<el-option label="仅退款" value="2" ></el-option>
|
||||
<el-option label="退货退款" value="3"></el-option>
|
||||
<el-option label="换货" value="4"> </el-option>
|
||||
<el-option label="维修" value="6"> </el-option>
|
||||
<el-option label="缺货补寄" value="5"> </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">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePull"
|
||||
>API拉取新退款</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handlePushOms"
|
||||
>手动推送售后</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="taoRefundList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="${comment}" align="center" prop="id" /> -->
|
||||
<el-table-column label="退款ID" align="center" prop="id" />
|
||||
<el-table-column label="类型" align="center" prop="afterSalesType" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" v-if="scope.row.afterSalesType === 2"> 仅退款</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.afterSalesType === 3"> 退货退款</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.afterSalesType === 4"> 换货</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.afterSalesType === 6"> 维修</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.afterSalesType === 5"> 缺货补寄</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="店铺" align="center" prop="shopId" >
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-tag size="small"></el-tag>-->
|
||||
{{shopList.find(x=>x.id === scope.row.shopId).name}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单号" align="center" prop="orderSn" />
|
||||
<el-table-column label="商品" prop="wareName" ></el-table-column>
|
||||
<el-table-column label="退款金额" prop="refundAmount" ></el-table-column>
|
||||
<el-table-column label="订单金额" prop="orderAmount" ></el-table-column>
|
||||
|
||||
<el-table-column label="售后原因" prop="afterSaleReason" ></el-table-column>
|
||||
|
||||
|
||||
<el-table-column label="状态" align="center" prop="afterSalesStatus" >
|
||||
<template slot-scope="scope">
|
||||
<!-- 2:买家申请退款,待商家处理 3:退货退款,待商家处理 4:商家同意退款,退款中 5:平台同意退款,退款中 6:驳回退款,待买家处理 7:已同意退货退款,待用户发货 8:平台处理中 9:平台拒绝退款,退款关闭 10:退款成功 11:买家撤销 12:买家逾期未处理,退款失败 13:买家逾期,超过有效期 14:换货补寄待商家处理 15:换货补寄待用户处理 16:换货补寄成功 17:换货补寄失败 18:换货补寄待用户确认完成 21:待商家同意维修 22:待用户确认发货 24:维修关闭 25:维修成功 27:待用户确认收货 31:已同意拒收退款,待用户拒收 32:补寄待商家发货 33:待商家召回-->
|
||||
<el-tag size="small" > {{ scope.row.afterSalesStatus }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" prop="createdTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createdTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- v-if="scope.row.auditStatus === 0 && scope.row.afterSalesType === 1 "-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- @click="handleConfirm(scope.row)"-->
|
||||
<!-- v-hasPermi="['tao:taoRefund:edit']"-->
|
||||
<!-- >退货确认</el-button>-->
|
||||
<!-- <!– <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- v-hasPermi="['tao:taoRefund:remove']"-->
|
||||
<!-- >删除</el-button> –>-->
|
||||
<!-- </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 { listRefund,pullRefund,pushOms } from "@/api/pdd/refund";
|
||||
import { listShop } from "@/api/shop/shop";
|
||||
import {MessageBox} from "element-ui";
|
||||
import {isRelogin} from "@/utils/request";
|
||||
export default {
|
||||
name: "RefundPdd",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
pullLoading: false,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 淘宝退款订单表格数据
|
||||
taoRefundList: [],
|
||||
shopList:[],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
refundId: null,
|
||||
afterSalesType: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
num: [
|
||||
{ required: true, message: "退货数量不能为空", trigger: "blur" }
|
||||
],
|
||||
logisticsCompany: [
|
||||
{ required: true, message: "不能为空", trigger: "change" }
|
||||
],
|
||||
logisticsCode: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
sendTime: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listShop({platform: 5}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询退款列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRefund(this.queryParams).then(response => {
|
||||
this.taoRefundList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
refundId: null,
|
||||
afterSalesType: null,
|
||||
tid: null,
|
||||
oid: null,
|
||||
refundPhase: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handlePushOms(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否手动推送到OMS?').then(function() {
|
||||
return pushOms({ids:ids});
|
||||
}).then(() => {
|
||||
// this.getList();
|
||||
this.$modal.msgSuccess("推送成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
handlePull() {
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullRefund({shopId:this.queryParams.shopId,updType:0}).then(response => {
|
||||
console.log('拉取淘宝订单接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权!请前往店铺列表重新获取授权!', '系统提示', { confirmButtonText: '前往授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
this.$router.push({path:"/shop/shop_list",query:{type:4}})
|
||||
// isRelogin.show = false;
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
// location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// })
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
});
|
||||
|
||||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
}else{
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.getList()
|
||||
}
|
||||
this.pullLoading = false
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先选择店铺");
|
||||
}
|
||||
|
||||
// this.$modal.msgSuccess("请先配置API");
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="淘宝天猫" name="taoRefund">
|
||||
<tao-refund></tao-refund>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="京东POP" name="jdRefund" lazy>
|
||||
<refund-jd></refund-jd>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="拼多多" name="pddOrder" lazy>
|
||||
<pdd-refund></pdd-refund>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="抖店" name="douOrder" lazy>
|
||||
<dou-refund></dou-refund>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="视频号小店" name="weiRefund" lazy>
|
||||
<refund-wei></refund-wei>
|
||||
</el-tab-pane>
|
||||
|
||||
|
||||
</el-tabs>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import TaoRefund from "@/views/shop/tao/refund/index";
|
||||
import RefundJd from "@/views/shop/jd/refund/index";
|
||||
import RefundWei from "@/views/shop/wei/refund/index";
|
||||
import DouRefund from "@/views/shop/dou/refund/index.vue";
|
||||
import PddRefund from "@/views/shop/pdd/refund/index.vue";
|
||||
|
||||
export default {
|
||||
name: "refund",
|
||||
components:{PddRefund, DouRefund, TaoRefund,RefundJd,RefundWei},
|
||||
data() {
|
||||
return {
|
||||
activeName: 'taoRefund'
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleClick(tab, event) {
|
||||
console.log(tab, event);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,273 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="108px">
|
||||
<el-form-item label="平台SkuId" prop="skuId">
|
||||
<el-input
|
||||
v-model="queryParams.skuId"
|
||||
placeholder="请输入平台SkuId"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商家sku编码" prop="outerId">
|
||||
<el-input
|
||||
v-model="queryParams.outerId"
|
||||
placeholder="请输入商家sku编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="ERP skuId" prop="erpSkuId">
|
||||
<el-input
|
||||
v-model="queryParams.erpSkuId"
|
||||
placeholder="请输入ERP skuId"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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>
|
||||
<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">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePull"
|
||||
>API拉取商品数据</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="goodsList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
<!-- <el-table-column label="ID" align="center" prop="id" />-->
|
||||
<el-table-column label="商品ID" align="center" prop="productId" />
|
||||
<el-table-column label="Sku Id" align="center" prop="skuId" />
|
||||
<el-table-column label="标题" align="center" prop="title" />
|
||||
<el-table-column label="sku属性" align="center" prop="skuAttr" />
|
||||
<el-table-column label="图片" align="center" prop="thumbImg" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.thumbImg" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="店铺" align="center" prop="categoryId" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-tag size="small">{{categoryList.find(x=>x.id === scope.row.categoryId).name}}</el-tag>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="商家编码" align="center" prop="skuCode" />
|
||||
<el-table-column label="销售价" align="center" prop="salePrice" >
|
||||
<template slot-scope="scope">{{scope.row.salePrice / 100}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="ERP SKU ID" align="center" prop="erpGoodsSkuId" />
|
||||
<el-table-column label="状态" align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" v-if="scope.row.status === 5">销售中</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 2">已下架</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleLink(scope.row)"
|
||||
>关联ERP</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
<!-- 添加或修改商品管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="ERP商品SkuId" prop="erpGoodsSkuId">
|
||||
<el-input v-model.number="form.erpGoodsSkuId" placeholder="请输入ERP商品SkuId" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
|
||||
import {listShop} from "@/api/shop/shop";
|
||||
import {pullGoodsList,listGoodsSku,getGoodsSku,linkErpGoodsSkuId} from "@/api/wei/goods";
|
||||
import {MessageBox} from "element-ui";
|
||||
|
||||
export default {
|
||||
name: "GoodsWei",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 商品管理表格数据
|
||||
goodsList: [],
|
||||
shopList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
supplierList: [],
|
||||
categoryList: [],
|
||||
categoryTree: [],
|
||||
// 表单校验
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: "不能为空", trigger: "change" }
|
||||
],
|
||||
erpGoodsSkuId: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listShop({platform: 2}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
// this.getList();
|
||||
this.loading = false;
|
||||
},
|
||||
methods: {
|
||||
/** 查询商品管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listGoodsSku(this.queryParams).then(response => {
|
||||
this.goodsList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
erpSkuId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
handleLink(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getGoodsSku(id).then(response => {
|
||||
console.log('=====00000000============',response)
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
linkErpGoodsSkuId(this.form).then(response => {
|
||||
this.$modal.msgSuccess("关联成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
handlePull() {
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullGoodsList({shopId:this.queryParams.shopId}).then(response => {
|
||||
console.log('拉取视频号小店商品接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权', '系统提示', { confirmButtonText: '重新授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
isRelogin.show = false;
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// })
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
});
|
||||
|
||||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
}else{
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.getList()
|
||||
}
|
||||
|
||||
|
||||
this.pullLoading = false
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先选择店铺");
|
||||
}
|
||||
|
||||
// this.$modal.msgSuccess("请先配置API");
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,447 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="订单号" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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="orderCreateTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.orderCreateTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择订单创建时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="statusStr">
|
||||
<el-input
|
||||
v-model="queryParams.statusStr"
|
||||
placeholder="请输入订单状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</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">
|
||||
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePull"
|
||||
>API拉取订单</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handlePushOms"
|
||||
>手动推送订单</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange" >
|
||||
<el-table-column type="selection" width="55" align="center" :selectable="isRowSelectable" />
|
||||
<el-table-column label="订单号" align="center" prop="orderId" />
|
||||
<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="商品" width="350">
|
||||
<template slot-scope="scope">
|
||||
<el-row v-for="item in scope.row.items" :key="item.id" :gutter="20">
|
||||
|
||||
<div style="float: left;display: flex;align-items: center;" >
|
||||
<el-image style="width: 70px; height: 70px;" :src="item.thumbImg"></el-image>
|
||||
<div style="margin-left:10px">
|
||||
<p>{{item.title}}</p>
|
||||
<p>{{item.skuAttrs}} </p>
|
||||
<p>
|
||||
<el-tag size="small">数量: {{item.skuCnt}}</el-tag>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单金额" align="center" prop="orderPrice" :formatter="amountFormatter">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ amountFormatter(null,null,scope.row.orderPrice/100,null) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="收件人信息" align="center" prop="userName" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.userName}}</span><br />
|
||||
<span> {{scope.row.provinceName}} {{scope.row.cityName}} {{scope.row.countyName}}
|
||||
</span>
|
||||
<p>
|
||||
{{scope.row.detailInfo}}
|
||||
</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="订单状态" align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status === 10 " size="small">待付款</el-tag>
|
||||
<el-tag v-if="scope.row.status === 20 " size="small">待发货</el-tag>
|
||||
<el-tag v-if="scope.row.status === 30 " size="small">待收货</el-tag>
|
||||
<el-tag v-if="scope.row.status === 100 " size="small">完成</el-tag>
|
||||
<br/>
|
||||
<el-tag style="margin-top: 5px" type="warning" v-if="!scope.row.confirmStatus || scope.row.confirmStatus === 0 " size="small">待确认</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="快递单号" align="center" prop="logisticsCode" />-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-success"
|
||||
:loading="pullLoading"
|
||||
@click="handlePullUpdate(scope.row)"
|
||||
>更新订单</el-button>
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleDetail(scope.row)"
|
||||
v-hasPermi="['xhs:order:remove']"
|
||||
>详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 确认订单、订单详情对话框 -->
|
||||
<el-dialog :title="detailTitle" :visible.sync="detailOpen" width="1100px" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px" inline>
|
||||
<el-descriptions title="订单信息">
|
||||
<el-descriptions-item label="ID">{{form.id}}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单号">{{form.orderId}}</el-descriptions-item>
|
||||
<el-descriptions-item label="店铺">
|
||||
<el-tag > {{ shopList.find(x=>x.id === form.shopId)?shopList.find(x=>x.id === form.shopId).name:'' }}</el-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">
|
||||
{{ parseTime(form.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item label="订单状态">
|
||||
<el-tag v-if="form.status === 10 " size="small">待付款</el-tag>
|
||||
<el-tag v-if="form.status === 20 " size="small">待发货</el-tag>
|
||||
<el-tag v-if="form.status === 30 " size="small">待收货</el-tag>
|
||||
<el-tag v-if="form.status === 100 " size="small">完成</el-tag>
|
||||
<el-tag v-if="form.status === 250 " size="small">订单自动取消</el-tag>
|
||||
</el-descriptions-item>
|
||||
|
||||
|
||||
</el-descriptions>
|
||||
<el-descriptions title="付款信息">
|
||||
|
||||
<el-descriptions-item label="商品总价">{{amountFormatter(null,null,form.productPrice /100,null)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="优惠金额">{{amountFormatter(null,null,form.discountedPrice /100,null)}}</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="运费">{{amountFormatter(null,null,form.freight / 100,null)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单金额">{{amountFormatter(null,null,form.orderPrice / 100,null)}}</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
|
||||
|
||||
<el-descriptions title="收货信息">
|
||||
<el-descriptions-item label="收件人姓名">{{form.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="收件人手机号">{{form.telNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="省市区">{{form.provinceName}}{{form.cityName}}{{form.countyName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="详细地址">{{form.detailInfo}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="发货信息">
|
||||
<!-- <el-descriptions-item label="发货方式">
|
||||
<el-tag v-if="form.shipType === 1" type="danger">供应商代发</el-tag>
|
||||
<el-tag v-if="form.shipType === 0" type="danger">仓库发货</el-tag>
|
||||
</el-descriptions-item> -->
|
||||
<el-descriptions-item label="物流公司">{{form.expressCompanyCode}}</el-descriptions-item>
|
||||
<el-descriptions-item label="物流单号">{{form.expressTrackingNo}}</el-descriptions-item>
|
||||
<el-descriptions-item label="发货时间"></el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider content-position="center">订单商品</el-divider>
|
||||
<el-table :data="goodsList" style="margin-bottom: 10px;">
|
||||
<el-table-column label="序号" align="center" type="index" width="50"/>
|
||||
|
||||
<el-table-column label="商品图片" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-image style="width: 70px; height: 70px" :src="scope.row.thumbImg"></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品标题" prop="title" ></el-table-column>
|
||||
<el-table-column label="SKU属性" prop="skuAttrs" ></el-table-column>
|
||||
<el-table-column label="sku编码" prop="skuCode"></el-table-column>
|
||||
<el-table-column label="单价" prop="salePrice"></el-table-column>
|
||||
<el-table-column label="数量" prop="skuCnt"></el-table-column>
|
||||
<el-table-column label="子订单金额" prop="realPrice"></el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
|
||||
<el-divider content-position="center">订单商品</el-divider>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddXhsOrderItem">添加赠品</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteXhsOrderItem">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="xhsOrderItemList" :row-class-name="rowXhsOrderItemIndex" @selection-change="handleXhsOrderItemSelectionChange" ref="xhsOrderItem" style="margin-bottom: 10px;">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||
<el-table-column label="商品" prop="erpGoodsId" width="350" >
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.erpGoodsSpecId" filterable remote reserve-keyword placeholder="搜索商品" style="width: 330px;"
|
||||
:remote-method="searchSku" :loading="skuListLoading" @change="skuChanage(scope.row)">
|
||||
<el-option v-for="item in skuList" :key="item.id"
|
||||
:label="item.name + ' - ' + item.colorValue + ' ' + item.sizeValue + ' ' + item.styleValue"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品图片" prop="itemImage" >
|
||||
<template slot-scope="scope">
|
||||
<el-image style="width: 70px; height: 70px" :src="scope.row.itemImage"></el-image>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="SKU编码" prop="itemSpecCode" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.itemSpecCode" placeholder="请输入规格" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单价" prop="price">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.price" placeholder="请输入单价" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="数量" prop="quantity" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.quantity" placeholder="请输入数量" @input="qtyChange(scope.row)" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" prop="itemAmount">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.itemAmount" placeholder="请输入总金额" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-form-item label="收件人姓名" prop="userName" v-if="isAudit">
|
||||
<el-input v-model="form.userName" placeholder="请输入收件人姓名" style="width:250px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收件人电话" prop="telNumber" v-if="isAudit">
|
||||
<el-input v-model="form.telNumber" placeholder="请输入收件人电话" style="width:250px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="详细地址" prop="detailInfo" v-if="isAudit">
|
||||
<el-input v-model="form.detailInfo" placeholder="请输入收件地址" style="width:250px" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { listShop } from "@/api/shop/shop";
|
||||
import {listOrder,getOrder,pushOms,pullOrder,pullOrderDetail} from "@/api/wei/order";
|
||||
import {pcaTextArr} from "element-china-area-data";
|
||||
|
||||
export default {
|
||||
name: "OrderWei",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
pullLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 淘宝订单表格数据
|
||||
orderList: [],
|
||||
shopList:[],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
shopId: null,
|
||||
tid: null,
|
||||
status: null
|
||||
},
|
||||
isAudit:false,
|
||||
detailOpen:false,
|
||||
detailTitle:'',
|
||||
goodsList:[],
|
||||
pcaTextArr,
|
||||
// 表单参数
|
||||
form: {
|
||||
},
|
||||
rules: {
|
||||
userName: [{ required: true, message: "收件人姓名不能为空", trigger: "blur" }],
|
||||
telNumber: [{ required: true, message: "收件人电话不能为空", trigger: "blur" }],
|
||||
detailInfo: [{ required: true, message: "收件人详情不能为空", trigger: "blur" }],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listShop({platform: 2}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
amountFormatter(row, column, cellValue, index) {
|
||||
return '¥' + parseFloat(cellValue).toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
|
||||
},
|
||||
/** 查询淘宝订单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listOrder(this.queryParams).then(response => {
|
||||
this.orderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.detailOpen = false;
|
||||
this.saleAfterOpen = false
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
shopId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
isRowSelectable(row, index) {
|
||||
return !row.confirmStatus || row.confirmStatus === 0 ;
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.orderId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handlePull() {
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullOrder({shopId:this.queryParams.shopId}).then(response => {
|
||||
console.log('拉取订单接口返回=====',response)
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
this.getList()
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先选择店铺");
|
||||
}
|
||||
|
||||
// this.$modal.msgSuccess("请先配置API");
|
||||
},
|
||||
handlePullUpdate(row) {
|
||||
// 接口拉取订单并更新
|
||||
this.pullLoading = true
|
||||
pullOrderDetail({shopId:row.shopId,orderId:row.orderId}).then(response => {
|
||||
console.log('拉取订单详情返回接口返回=====',response)
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
})
|
||||
},
|
||||
handleDetail(row) {
|
||||
this.reset();
|
||||
const id = row.id
|
||||
getOrder(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.goodsList = response.data.items;
|
||||
this.detailOpen = true;
|
||||
this.detailTitle = "订单详情";
|
||||
this.isAudit = false
|
||||
});
|
||||
},
|
||||
handlePushOms(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否批量重新推送订单?').then(function() {
|
||||
return pushOms({ids:ids});
|
||||
}).then(() => {
|
||||
// this.getList();
|
||||
this.$modal.msgSuccess("推送成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -1,143 +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" />
|
||||
<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>
|
||||
</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" />
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listShop} 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>
|
||||
|
|
@ -1,391 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<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="refundId">
|
||||
<el-input
|
||||
v-model="queryParams.refundId"
|
||||
placeholder="请输入退款单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="tid">
|
||||
<el-input
|
||||
v-model="queryParams.tid"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="申请时间" prop="created">-->
|
||||
<!-- <el-date-picker clearable-->
|
||||
<!-- v-model="queryParams.created"-->
|
||||
<!-- type="date"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- placeholder="请选择退款申请时间">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<!-- <el-form-item label="物流单号" prop="logisticsCode">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.logisticsCode"-->
|
||||
<!-- placeholder="请输入物流单号"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </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">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePull"
|
||||
>API拉取新退款</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handlePushOms"
|
||||
>手动推送售后</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="taoRefundList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="${comment}" align="center" prop="id" /> -->
|
||||
<el-table-column label="退款单号" align="center" prop="afterSaleOrderId" />
|
||||
<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="type" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" v-if="scope.row.type === 'REFUND'"> 退款</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.type === 'RETURN'"> 退货退款</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单号" align="center" prop="orderId" />
|
||||
<el-table-column label="退货数量" align="center" prop="count" />
|
||||
<el-table-column label="商品skuId" align="center" prop="skuId" />
|
||||
|
||||
<el-table-column label="退款金额" align="center" prop="refundAmount" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.refundAmount/100 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款原因" align="center" prop="reasonText" />
|
||||
<!-- <el-table-column label="说明" align="center" prop="details" />-->
|
||||
<el-table-column label="退货物流" align="center" prop="returnWaybillId" />
|
||||
<el-table-column label="状态" align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" v-if="scope.row.status === 'MERCHANT_RETURN_SUCCESS'"> 退货退款完成</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'MERCHANT_REFUND_SUCCESS'"> 退款完成</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'USER_CANCELD'"> 用户取消申请</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'MERCHANT_PROCESSING'"> 商家受理中</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'MERCHANT_REJECT_REFUND'">商家拒绝退款</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'MERCHANT_REJECT_RETURN'">商家拒绝退货退款</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'USER_WAIT_RETURN'">待买家退货</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'RETURN_CLOSED'">退货退款关闭</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'MERCHANT_WAIT_RECEIPT'">待商家收货</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'MERCHANT_OVERDUE_REFUND'">商家逾期未退款</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'PLATFORM_REFUNDING'">平台退款中</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'PLATFORM_REFUND_FAIL'">平台退款失败</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'USER_WAIT_CONFIRM'">待用户确认</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'MERCHANT_REFUND_RETRY_FAIL'">商家打款失败,客服关闭售后</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'MERCHANT_FAIL'">售后关闭</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'USER_WAIT_CONFIRM_UPDATE'">待用户处理商家协商</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'USER_WAIT_HANDLE_MERCHANT_AFTER_SALE'">待用户处理商家代发起的售后申请</el-tag>
|
||||
<br/>
|
||||
<el-tag size="small" style="margin-top: 5px" v-if="scope.row.type === 'RETURN' && scope.row.confirmStatus === 9">已签收</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-button
|
||||
v-if="scope.row.type === 'RETURN' && !scope.row.confirmStatus"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-document-checked"
|
||||
@click="handleReturnedConfirm(scope.row) "
|
||||
>退货签收</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.type === 'REFUND' && !scope.row.confirmStatus"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-connection"
|
||||
@click="handleOrderIntercept(scope.row) "
|
||||
>订单拦截</el-button>
|
||||
|
||||
<el-row>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-refresh"
|
||||
@click="handleConfirm(scope.row)"
|
||||
v-hasPermi="['tao:taoRefund:edit']"
|
||||
>更新</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleDelete(scope.row)"
|
||||
>详情</el-button>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改淘宝退款订单对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="退款ID" prop="refundId">
|
||||
<el-input v-model="form.refundId" placeholder="请输入退款id" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单单号" prop="tid">
|
||||
<el-input v-model="form.tid" placeholder="请输入淘宝交易单号" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退还金额" prop="refundFee">
|
||||
<el-input v-model="form.refundFee" placeholder="请输入退还金额(退还给买家的金额)。精确到2位小数;单位:元。如:200.07,表示:200元7分" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="sku编号" prop="specNumber">
|
||||
<el-input v-model="form.specNumber" placeholder="请输入sku编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="退货数量" prop="num">
|
||||
<el-input v-model="form.num" placeholder="请输入退货数量" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物流公司" prop="logisticsCompany">
|
||||
<el-input v-model="form.logisticsCompany" placeholder="请输入物流公司" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流单号" prop="logisticsCode">
|
||||
<el-input v-model="form.logisticsCode" placeholder="请输入物流单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发货时间" prop="sendTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.sendTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择发货时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listShop } from "@/api/shop/shop";
|
||||
import {MessageBox} from "element-ui";
|
||||
import {isRelogin} from "@/utils/request";
|
||||
import {listShopRefund, orderIntercept, pullRefund, returnedConfirm} from "@/api/wei/refund";
|
||||
import {pushOms} from "@/api/tao/taoRefund";
|
||||
export default {
|
||||
name: "RefundWei",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
pullLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 淘宝退款订单表格数据
|
||||
taoRefundList: [],
|
||||
shopList:[],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
refundId: null,
|
||||
afterSalesType: null,
|
||||
tid: null,
|
||||
oid: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
num: [
|
||||
{ required: true, message: "退货数量不能为空", trigger: "blur" }
|
||||
],
|
||||
logisticsCompany: [
|
||||
{ required: true, message: "不能为空", trigger: "change" }
|
||||
],
|
||||
logisticsCode: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
sendTime: [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
listShop({platform: 2}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询淘宝退款订单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listShopRefund(this.queryParams).then(response => {
|
||||
this.taoRefundList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
refundId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.afterSaleOrderId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
handlePushOms(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否手动推送到OMS?').then(function() {
|
||||
return pushOms({ids:ids});
|
||||
}).then(() => {
|
||||
// this.getList();
|
||||
this.$modal.msgSuccess("推送成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
handlePull() {
|
||||
if(this.queryParams.shopId){
|
||||
this.pullLoading = true
|
||||
pullRefund({shopId:this.queryParams.shopId,updType:0}).then(response => {
|
||||
console.log('拉取退款接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权', '系统提示', { confirmButtonText: '重新授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
isRelogin.show = false;
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// })
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
});
|
||||
|
||||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
}else{
|
||||
this.getList()
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
}
|
||||
|
||||
})
|
||||
}else{
|
||||
this.$modal.msgSuccess("请先选择店铺");
|
||||
}
|
||||
|
||||
// this.$modal.msgSuccess("请先配置API");
|
||||
},
|
||||
handleReturnedConfirm(row){
|
||||
returnedConfirm(row.id).then(response => {
|
||||
this.$modal.msgSuccess("签收完成");
|
||||
this.getList()
|
||||
});
|
||||
},
|
||||
handleOrderIntercept(row){
|
||||
orderIntercept(row.id).then(response => {
|
||||
this.$modal.msgSuccess("拦截成功");
|
||||
this.getList()
|
||||
});
|
||||
},
|
||||
submitForm(){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
</script>
|
||||
|
|
@ -19,7 +19,15 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="下单时间" prop="orderTime">
|
||||
<el-date-picker clearable
|
||||
v-model="orderTime" value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="下单日期" prop="orderCreateTime">-->
|
||||
<!-- <el-date-picker clearable-->
|
||||
<!-- v-model="queryParams.orderCreateTime"-->
|
||||
|
|
@ -55,94 +63,139 @@
|
|||
@click="handlePull"
|
||||
>API拉取订单</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- :loading="pullLoading"-->
|
||||
<!-- type="primary"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-download"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- @click="handlePullDetailByTid"-->
|
||||
<!-- >API拉取单个订单</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handlePullDetailByTid"
|
||||
>API拉取单个订单</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
icon="el-icon-top-right"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handlePushOms"
|
||||
>手动推送订单</el-button>
|
||||
>重新推送选中订单到订单库</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handlePullUpdate"
|
||||
>手动更新订单</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="订单号" align="center" prop="tid" />
|
||||
<el-table-column label="店铺" align="center" prop="shopId" >
|
||||
<!-- <el-table-column label="订单号" align="center" prop="tid" />-->
|
||||
<el-table-column label="订单号" align="left" prop="tid" width="200px">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ shopList.find(x=>x.id === scope.row.shopId).name }}</span>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleDetail(scope.row)"
|
||||
>{{scope.row.tid}} </el-button>
|
||||
<i class="el-icon-copy-document tag-copy" :data-clipboard-text="scope.row.tid" @click="copyActiveCode($event,scope.row.tid)" ></i>
|
||||
<br/>
|
||||
<el-tag type="info">{{ shopList.find(x=>x.id === scope.row.shopId) ? shopList.find(x=>x.id === scope.row.shopId).name : '' }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品" width="350">
|
||||
<!-- <el-table-column label="店铺" align="center" prop="shopId" >-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ shopList.find(x=>x.id === scope.row.shopId)?shopList.find(x=>x.id === scope.row.shopId).name:'' }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="商品明细" align="center" width="900px" >
|
||||
<template slot="header">
|
||||
<table>
|
||||
<th>
|
||||
<td width="50px">图片</td>
|
||||
<td width="250px" align="left">标题</td>
|
||||
<td width="150" align="left">SKU名</td>
|
||||
<td width="200" align="left">Sku编码</td>
|
||||
<td width="150" align="left">平台SkuId</td>
|
||||
<td width="50" align="left">数量</td>
|
||||
</th>
|
||||
</table>
|
||||
</template>
|
||||
<template slot-scope="scope" >
|
||||
<el-table :data="scope.row.items" :show-header="false" :cell-style="{border:0 + 'px' }" :row-style="{border:0 + 'px' }" >
|
||||
<el-table-column label="商品图片" width="50px">
|
||||
<template slot-scope="scope">
|
||||
<el-row v-for="item in scope.row.items" :key="item.id" :gutter="20">
|
||||
<!-- <el-image style="width: 40px; height: 40px;" :src="scope.row.goodsImg" :preview-src-list="[scope.row.goodsImg]"></el-image>-->
|
||||
<image-preview :src="scope.row.picPath" :width="40" :height="40"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品名" align="left" width="250px" prop="title" />
|
||||
<el-table-column label="SKU名" align="left" prop="skuPropertiesName" width="150" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="Sku编码" align="left" prop="outerSkuId" width="200"/>
|
||||
<el-table-column label="平台SkuId" align="left" prop="skuId" width="150"/>
|
||||
<el-table-column label="商品数量" align="center" prop="quantity" width="50px">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" type="danger">{{scope.row.num}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="商品" width="350">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-row v-for="item in scope.row.items" :key="item.id" :gutter="20">-->
|
||||
|
||||
<div style="float: left;display: flex;align-items: center;" >
|
||||
<el-image style="width: 70px; height: 70px;" :src="item.picPath"></el-image>
|
||||
<div style="margin-left:10px">
|
||||
<p>{{item.title}}</p>
|
||||
<p>{{item.skuPropertiesName}}
|
||||
<el-tag size="small">x {{item.num}}</el-tag>
|
||||
</p>
|
||||
<p v-if="scope.row.refundStatus === 0">
|
||||
<el-button type="text" size="mini" round @click="handleRefund(scope.row,item)">售后</el-button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="center" prop="payment" :formatter="amountFormatter" />
|
||||
<el-table-column label="下单时间" align="center" prop="orderCreateTime" width="180">
|
||||
<!-- <div style="float: left;display: flex;align-items: center;" >-->
|
||||
<!-- <el-image style="width: 70px; height: 70px;" :src="item.picPath"></el-image>-->
|
||||
<!-- <div style="margin-left:10px">-->
|
||||
<!-- <p>{{item.title}}【{{item.skuPropertiesName}}】-->
|
||||
<!-- </p>-->
|
||||
<!-- <p>SKU编码:{{item.outerSkuId}}</p>-->
|
||||
<!-- <p>数量:<el-tag size="small">x {{item.num}}</el-tag></p>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-row>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="实付总金额" align="center" prop="payment" :formatter="amountFormatter" />
|
||||
<el-table-column label="订单创建时间" align="center" prop="orderCreateTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.created) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="买家留言" align="center" prop="buyerMessage" />
|
||||
<el-table-column label="卖家备注" align="center" prop="sellerMemo" />
|
||||
<!-- <el-table-column label="卖家备注" align="center" prop="sellerMemo" />-->
|
||||
<el-table-column label="订单状态" align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" v-if="scope.row.status === 'WAIT_BUYER_PAY'"> 等待买家付款</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'SELLER_CONSIGNED_PART'"> 卖家部分发货</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'WAIT_SELLER_SEND_GOODS'"> 等待卖家发货</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'WAIT_BUYER_CONFIRM_GOODS'"> 等待买家确认收货</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'TRADE_FINISHED'"> 交易成功</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'TRADE_CLOSED'"> 交易自动关闭</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'TRADE_CLOSED_BY_TAOBAO'"> 卖家或买家主动关闭交易</el-tag>
|
||||
<el-tag size="small" v-if="scope.row.status === 'PAID_FORBID_CONSIGN'"> 禁止发货</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-row>
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="text"
|
||||
@click="handlePullUpdate(scope.row)"
|
||||
>详情</el-button>
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="text"
|
||||
icon="el-icon-refresh"
|
||||
@click="handlePullUpdate(scope.row)"
|
||||
>更新</el-button>
|
||||
</el-row>
|
||||
<el-tag v-if="scope.row.status === 'WAIT_BUYER_PAY'">等待买家付款</el-tag>
|
||||
<el-tag v-if="scope.row.status === 'SELLER_CONSIGNED_PART'">卖家部分发货</el-tag>
|
||||
<el-tag v-if="scope.row.status === 'WAIT_SELLER_SEND_GOODS'">待发货</el-tag>
|
||||
<el-tag v-if="scope.row.status === 'WAIT_BUYER_CONFIRM_GOODS'">待买家收货</el-tag>
|
||||
<el-tag v-if="scope.row.status === 'TRADE_FINISHED'">交易成功</el-tag>
|
||||
<el-tag v-if="scope.row.status === 'TRADE_CLOSED'">交易自动关闭</el-tag>
|
||||
<el-tag v-if="scope.row.status === 'TRADE_CLOSED_BY_TAOBAO'">关闭交易</el-tag>
|
||||
<el-tag v-if="scope.row.status === 'PAID_FORBID_CONSIGN'">禁止发货</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-button-->
|
||||
<!-- :loading="pullLoading"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- icon="el-icon-refresh"-->
|
||||
<!-- @click="handlePullUpdate(scope.row)"-->
|
||||
<!-- >更新订单</el-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
|
@ -162,7 +215,8 @@ import {listOrder, pullOrder, getOrder, pushOms, pullOrderDetail} from "@/api/ta
|
|||
import { listShop } from "@/api/shop/shop";
|
||||
import { searchSku } from "@/api/goods/goods";
|
||||
import {MessageBox} from "element-ui";
|
||||
import {isRelogin} from "../../../../utils/request";
|
||||
import {isRelogin} from "../../../utils/request";
|
||||
import Clipboard from "clipboard";
|
||||
|
||||
export default {
|
||||
name: "OrderTao",
|
||||
|
|
@ -184,12 +238,15 @@ export default {
|
|||
// 淘宝订单表格数据
|
||||
orderList: [],
|
||||
shopList:[],
|
||||
orderTime:null,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
shopId: null,
|
||||
tid: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
status: null
|
||||
},
|
||||
// 表单参数
|
||||
|
|
@ -200,7 +257,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
listShop({platform: 4}).then(response => {
|
||||
listShop({type: 100}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
|
|
@ -210,11 +267,33 @@ export default {
|
|||
// this.getList();
|
||||
},
|
||||
methods: {
|
||||
copyActiveCode(event,queryParams) {
|
||||
console.log(queryParams)
|
||||
const clipboard = new Clipboard(".tag-copy")
|
||||
clipboard.on('success', e => {
|
||||
this.$message({ type: 'success', message: '复制成功' })
|
||||
// 释放内存
|
||||
clipboard.destroy()
|
||||
})
|
||||
clipboard.on('error', e => {
|
||||
// 不支持复制
|
||||
this.$message({ type: 'waning', message: '该浏览器不支持自动复制' })
|
||||
// 释放内存
|
||||
clipboard.destroy()
|
||||
})
|
||||
},
|
||||
amountFormatter(row, column, cellValue, index) {
|
||||
return '¥' + cellValue.toFixed(2).replace(/\d(?=(\d{3})+\.)/g, '$&,');
|
||||
},
|
||||
/** 查询淘宝订单列表 */
|
||||
getList() {
|
||||
if(this.orderTime){
|
||||
this.queryParams.startTime = this.orderTime[0]
|
||||
this.queryParams.endTime = this.orderTime[1]
|
||||
}else {
|
||||
this.queryParams.startTime = null
|
||||
this.queryParams.endTime = null
|
||||
}
|
||||
this.loading = true;
|
||||
listOrder(this.queryParams).then(response => {
|
||||
this.orderList = response.rows;
|
||||
|
|
@ -245,6 +324,7 @@ export default {
|
|||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.orderTime=null
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
|
|
@ -271,10 +351,11 @@ export default {
|
|||
pullOrder({shopId:this.queryParams.shopId,updType:0}).then(response => {
|
||||
console.log('拉取淘宝订单接口返回=====',response)
|
||||
if(response.code === 1401) {
|
||||
MessageBox.confirm('Token已过期,需要重新授权', '系统提示', { confirmButtonText: '重新授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
isRelogin.show = false;
|
||||
MessageBox.confirm('Token已过期,需要重新授权!请前往店铺列表重新获取授权!', '系统提示', { confirmButtonText: '前往授权', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
this.$router.push({path:"/shop/shop_list",query:{type:1}})
|
||||
// isRelogin.show = false;
|
||||
// store.dispatch('LogOut').then(() => {
|
||||
location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// location.href = response.data.tokenRequestUrl+'?shopId='+this.queryParams.shopId
|
||||
// })
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
|
|
@ -283,7 +364,6 @@ export default {
|
|||
// return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||
}else{
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.getList()
|
||||
}
|
||||
this.pullLoading = false
|
||||
})
|
||||
|
|
@ -294,9 +374,15 @@ export default {
|
|||
// this.$modal.msgSuccess("请先配置API");
|
||||
},
|
||||
handlePullUpdate(row) {
|
||||
const id = row.tid || this.ids[0]
|
||||
if(!this.queryParams.shopId){
|
||||
this.$modal.msgError("请选择店铺");
|
||||
return
|
||||
}
|
||||
console.log("======更新订单==",id)
|
||||
// 接口拉取订单并更新
|
||||
this.pullLoading = true
|
||||
pullOrderDetail({shopId:row.shopId,orderId:row.tid}).then(response => {
|
||||
pullOrderDetail({shopId:this.queryParams.shopId,orderId:id}).then(response => {
|
||||
console.log('拉取淘宝订单接口返回=====',response)
|
||||
this.$modal.msgSuccess(JSON.stringify(response));
|
||||
this.pullLoading = false
|
||||
|
|
@ -323,7 +409,7 @@ export default {
|
|||
},
|
||||
handlePushOms(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否批量重新推送订单?').then(function() {
|
||||
this.$modal.confirm('是否手动推送到系统?').then(function() {
|
||||
return pushOms({ids:ids});
|
||||
}).then(() => {
|
||||
// this.getList();
|
||||
|
|
@ -44,7 +44,6 @@
|
|||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
:loading="pullLoading"
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
|
|
@ -109,8 +108,8 @@
|
|||
<!-- 添加或修改商品管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="商品库SkuId" prop="erpGoodsSkuId">
|
||||
<el-input v-model.number="form.erpGoodsSkuId" placeholder="请输入商品库SkuId" />
|
||||
<el-form-item label="ERP商品SkuId" prop="erpGoodsSkuId">
|
||||
<el-input v-model.number="form.erpGoodsSkuId" placeholder="请输入ERP商品SkuId" />
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
|
@ -145,7 +144,6 @@ export default {
|
|||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
pullLoading: false,
|
||||
// 商品管理表格数据
|
||||
goodsList: [],
|
||||
shopList: [],
|
||||
|
|
@ -176,7 +174,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
listShop({type: 500}).then(response => {
|
||||
listShop({platform: 2}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
listShop({type: 500}).then(response => {
|
||||
listShop({}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
});
|
||||
this.getList();
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ export default {
|
|||
};
|
||||
},
|
||||
created() {
|
||||
listShop({type: 500}).then(response => {
|
||||
listShop({platform: 2}).then(response => {
|
||||
this.shopList = response.rows;
|
||||
if (this.shopList && this.shopList.length > 0) {
|
||||
this.queryParams.shopId = this.shopList[0].id
|
||||
|
|
|
|||
Loading…
Reference in New Issue