|
@@ -4,6 +4,7 @@ import { Search } from '@element-plus/icons-vue'
|
|
import {apiOrderConfig} from '@/api/order'
|
|
import {apiOrderConfig} from '@/api/order'
|
|
import { apiMediaCommon } from '@/api/media'
|
|
import { apiMediaCommon } from '@/api/media'
|
|
import UserDialog from './components/UserDialog.vue'
|
|
import UserDialog from './components/UserDialog.vue'
|
|
|
|
+import { apiSystemCommon } from '@/api/system'
|
|
|
|
|
|
const tableColumns = [
|
|
const tableColumns = [
|
|
{
|
|
{
|
|
@@ -128,9 +129,10 @@ const tableQuery = reactive({
|
|
const tableData = ref([])
|
|
const tableData = ref([])
|
|
const show = ref(false)
|
|
const show = ref(false)
|
|
const showUserDialog = ref(false)
|
|
const showUserDialog = ref(false)
|
|
|
|
+const isRefund = ref(false)
|
|
function getTableData(){
|
|
function getTableData(){
|
|
apiOrderConfig.getProductOrderList({
|
|
apiOrderConfig.getProductOrderList({
|
|
- Keyword:tableQuery.keyWord,
|
|
|
|
|
|
+ KeyWord:tableQuery.keyWord,
|
|
CurrentIndex:tableQuery.currentPage,
|
|
CurrentIndex:tableQuery.currentPage,
|
|
PageSize:tableQuery.pageSize,
|
|
PageSize:tableQuery.pageSize,
|
|
SortType:tableQuery.sortType,
|
|
SortType:tableQuery.sortType,
|
|
@@ -150,12 +152,20 @@ function getTableData(){
|
|
getTableData()
|
|
getTableData()
|
|
getLableList()
|
|
getLableList()
|
|
const labelOptions = ref([])
|
|
const labelOptions = ref([])
|
|
-const userId = ref('')
|
|
|
|
-const value1 = ref(['',''])
|
|
|
|
|
|
+const refundRow = ref({})
|
|
function getLableList(){
|
|
function getLableList(){
|
|
- apiMediaCommon.getPermissionList().then(res=>{
|
|
|
|
|
|
+ apiSystemCommon.getSysConfig({
|
|
|
|
+ ConfigKey:'paymentWay'
|
|
|
|
+ }).then(res=>{
|
|
if(res.Ret!==200) return
|
|
if(res.Ret!==200) return
|
|
- labelOptions.value = res.Data.List||[]
|
|
|
|
|
|
+ labelOptions.value = res.Data.paymentWay.map(item => {
|
|
|
|
+ const key = Object.keys(item)[0]; // 获取支付方式的中文名称
|
|
|
|
+ const value = item[key]; // 获取支付方式的英文名称
|
|
|
|
+ return {
|
|
|
|
+ value: value, // 将英文名称设置为 value
|
|
|
|
+ label: key // 将中文名称设置为 label
|
|
|
|
+ };
|
|
|
|
+ })
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -175,24 +185,15 @@ function handleSortChange({order,prop}){
|
|
getTableData()
|
|
getTableData()
|
|
}
|
|
}
|
|
|
|
|
|
-// 查看用户详情
|
|
|
|
-function Details(row) {
|
|
|
|
- if (row.ReadCount <= 0) return;
|
|
|
|
- show.value = true;
|
|
|
|
- userId.value = row.TemplateUserId + '';
|
|
|
|
-}
|
|
|
|
function handleSelectChange() {
|
|
function handleSelectChange() {
|
|
getTableData();
|
|
getTableData();
|
|
}
|
|
}
|
|
-function userDetails(row) {
|
|
|
|
- showUserDialog.value = true;
|
|
|
|
-}
|
|
|
|
|
|
|
|
/* 下载数据 */
|
|
/* 下载数据 */
|
|
async function downloadExcel() {
|
|
async function downloadExcel() {
|
|
const res = await apiOrderConfig.getExportProductOrder(
|
|
const res = await apiOrderConfig.getExportProductOrder(
|
|
{
|
|
{
|
|
- Keyword:tableQuery.keyWord,
|
|
|
|
|
|
+ KeyWord:tableQuery.keyWord,
|
|
SortType:tableQuery.sortType,
|
|
SortType:tableQuery.sortType,
|
|
PaymentDate:tableQuery.paymentDate,
|
|
PaymentDate:tableQuery.paymentDate,
|
|
PaymentWay:tableQuery.paymentWay,
|
|
PaymentWay:tableQuery.paymentWay,
|
|
@@ -215,6 +216,24 @@ async function downloadExcel() {
|
|
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
|
URL.revokeObjectURL(elink.href); // 释放URL 对象
|
|
document.body.removeChild(elink); // 释放标
|
|
document.body.removeChild(elink); // 释放标
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+function operation (handle, row) {
|
|
|
|
+ refundRow.value = row
|
|
|
|
+ console.log(refundRow);
|
|
|
|
+
|
|
|
|
+ switch (handle) {
|
|
|
|
+ case 'details':
|
|
|
|
+ showUserDialog.value = true;
|
|
|
|
+ isRefund.value = false
|
|
|
|
+ break
|
|
|
|
+ case 'refund':
|
|
|
|
+ showUserDialog.value = true;
|
|
|
|
+ isRefund.value = true
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<template>
|
|
<template>
|
|
@@ -238,9 +257,13 @@ async function downloadExcel() {
|
|
:value="item.value">
|
|
:value="item.value">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
- <el-select v-model="tableQuery.FollowingGzh" clearable @change="handleSelectChange()" placeholder="支付渠道" style="width: 150px; margin-right: 20px;">
|
|
|
|
- <el-option label="是" :value="true"></el-option>
|
|
|
|
- <el-option label="否" :value="false"></el-option>
|
|
|
|
|
|
+ <el-select v-model="tableQuery.paymentWay" clearable @change="handleSelectChange()" placeholder="支付渠道" style="width: 150px; margin-right: 20px;">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in labelOptions"
|
|
|
|
+ :key="item.value"
|
|
|
|
+ :label="item.label"
|
|
|
|
+ :value="item.value">
|
|
|
|
+ </el-option>
|
|
</el-select>
|
|
</el-select>
|
|
<el-select v-model="tableQuery.refundStatus" clearable @change="handleSelectChange()" placeholder="售后状态" style="width: 150px; margin-right: 20px;">
|
|
<el-select v-model="tableQuery.refundStatus" clearable @change="handleSelectChange()" placeholder="售后状态" style="width: 150px; margin-right: 20px;">
|
|
<el-option
|
|
<el-option
|
|
@@ -289,9 +312,9 @@ async function downloadExcel() {
|
|
<el-tag :type="scope.row[column.key]=== 'Open' ?'success':'info'">{{scope.row[column.key]=== 'Open'?'已开户':'未开户' }}</el-tag>
|
|
<el-tag :type="scope.row[column.key]=== 'Open' ?'success':'info'">{{scope.row[column.key]=== 'Open'?'已开户':'未开户' }}</el-tag>
|
|
</template>
|
|
</template>
|
|
<template #default="scope" v-else-if="column.key === 'handle'">
|
|
<template #default="scope" v-else-if="column.key === 'handle'">
|
|
- <span v-if="scope.row.Status !== '已支付'" @click="operation('stock', scope.row)">-</span>
|
|
|
|
- <span class="edit" v-if="scope.row.Status === '已支付' && scope.row.RefundStatus === '退款成功'" @click="operation('delist', scope.row)" >退款详情</span>
|
|
|
|
- <span class="edit" v-if="scope.row.Status === '已支付'" @click="operation('edit', scope.row)">退款</span>
|
|
|
|
|
|
+ <span v-if="scope.row.Status !== '已支付' && scope.row.RefundStatus !== '退款成功'">-</span>
|
|
|
|
+ <span class="edit" v-if="scope.row.Status === '售后' && scope.row.RefundStatus === '退款成功'" @click="operation('details', scope.row)" >退款详情</span>
|
|
|
|
+ <span class="edit" v-if="scope.row.Status === '已支付'" @click="operation('refund', scope.row)">退款</span>
|
|
</template>
|
|
</template>
|
|
<template #default="scope" v-else>
|
|
<template #default="scope" v-else>
|
|
{{scope.row[column.key] || '-'}}
|
|
{{scope.row[column.key] || '-'}}
|
|
@@ -309,7 +332,7 @@ async function downloadExcel() {
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <UserDialog v-model:show="showUserDialog" :userId="userId"></UserDialog>
|
|
|
|
|
|
+ <UserDialog v-model:show="showUserDialog" :isRefund="isRefund" :row="refundRow"></UserDialog>
|
|
</el-card>
|
|
</el-card>
|
|
</template>
|
|
</template>
|
|
|
|
|