fixed 修改优惠券加上店铺选择,订单页小改

This commit is contained in:
AERWEN\26795 2023-10-18 03:18:43 +08:00
parent a704310ace
commit 962e4d20d7
13 changed files with 268 additions and 877 deletions

View File

@ -27,10 +27,20 @@ export function getOrderRefundDetails(query) {
}) })
} }
// 售后单记录表新增或修改 // 审核售后
export function addOrUpdateOrderRefund(data) { export function auditOrderRefund(data) {
return request({ return request({
url: '/business/OrderRefund/addOrUpdateOrderRefund', url: '/business/OrderRefund/auditOrderRefund',
method: 'post',
data: data,
})
}
// 商家确认收货
export function confirmsReceipt(data) {
return request({
url: '/business/OrderRefund/confirmsReceipt',
method: 'post', method: 'post',
data: data, data: data,
}) })

View File

@ -5,7 +5,6 @@
{{ item.dictLabel }} <i v-if="showValue">#{{ item.dictValue }}</i> {{ item.dictLabel }} <i v-if="showValue">#{{ item.dictValue }}</i>
</span> </span>
<el-tag <el-tag
size="small"
v-else v-else
:disable-transitions="true" :disable-transitions="true"
:index="index" :index="index"

View File

@ -9,6 +9,19 @@
<template> <template>
<el-dialog v-model="props.modelValue" title="添加优惠券信息" width="900px" @closed="closeDialog" @open="openDialog"> <el-dialog v-model="props.modelValue" title="添加优惠券信息" width="900px" @closed="closeDialog" @open="openDialog">
<el-form ref="formRef" :model="formData" :rules="rules"> <el-form ref="formRef" :model="formData" :rules="rules">
<el-row :gutter="20">
<el-col v-if="userid == 1" :lg="12">
<el-form-item :label-width="labelWidth" label="店铺" prop="shopGuid">
<el-input v-model='formData.shopName' disabled type="text" placeholder='点击选择店铺'>
<template #append>
<div @click="handleChooseShop">选择</div>
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20"> <el-row :gutter="20">
@ -151,6 +164,9 @@
<!-- 选择商品 --> <!-- 选择商品 -->
<ChooseMultipleGoodsDialog v-model="ChooseGoodsDialogVisible" :data="ChooseGoodsDialogRow"> <ChooseMultipleGoodsDialog v-model="ChooseGoodsDialogVisible" :data="ChooseGoodsDialogRow">
</ChooseMultipleGoodsDialog> </ChooseMultipleGoodsDialog>
<!-- 选择店铺 -->
<ChooseShopDialog v-model="ChooseShopDialogVisible" :data="ChooseShopDialogRow" >
</ChooseShopDialog>
</template> </template>
@ -158,8 +174,10 @@
import { reactive, ref, watch } from "vue"; import { reactive, ref, watch } from "vue";
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import modal from '@/plugins/modal.js' import modal from '@/plugins/modal.js'
import useUserStore from '@/store/modules/user'
import { addOrUpdateCoupon } from '@/api/business/Marketing/CouponManage/Coupons/coupon.js'; import { addOrUpdateCoupon } from '@/api/business/Marketing/CouponManage/Coupons/coupon.js';
import ChooseMultipleGoodsDialog from '@/views/business/components/ChooseMultipleGoodsDialog.vue'; import ChooseMultipleGoodsDialog from '@/views/business/components/ChooseMultipleGoodsDialog.vue';
import ChooseShopDialog from '@/views/business/components/ChooseShopDialog.vue';
// //
@ -173,6 +191,7 @@ const openDialog = async () => {
} }
// - // -
const userid = useUserStore().userId
// //
const coupon_type = ref([]); const coupon_type = ref([]);
// //
@ -181,6 +200,9 @@ const coupon_expire_type = ref([]);
const applicable_scope = ref([]); const applicable_scope = ref([]);
// //
const display_status = ref([]); const display_status = ref([]);
//
const ChooseShopDialogVisible = ref(false);
const ChooseShopDialogRow = ref({});
// //
const ChooseGoodsDialogVisible = ref(false); const ChooseGoodsDialogVisible = ref(false);
const ChooseGoodsDialogRow = ref({}); const ChooseGoodsDialogRow = ref({});
@ -212,6 +234,12 @@ async function getdisplay_status() {
}) })
} }
//
const handleChooseShop = () => {
ChooseShopDialogVisible.value = true
ChooseShopDialogRow.value = formData
}
// //
const handleChooseGoods = () => { const handleChooseGoods = () => {
ChooseGoodsDialogVisible.value = true ChooseGoodsDialogVisible.value = true
@ -232,7 +260,8 @@ const formData = reactive({
couponSort: 100, couponSort: 100,
couponSendNumber: -1, couponSendNumber: -1,
couponApplicableScopeConfig: [], couponApplicableScopeConfig: [],
couponGoodsIds: [], couponGoodsIdsArr: [],
couponGoodsIds: "",
couponFixedTime: [] couponFixedTime: []
}); });
const props = defineProps({ const props = defineProps({
@ -267,8 +296,8 @@ const handleAddClick = async (formEl) => {
} }
loadingStatus.value = true loadingStatus.value = true
if (formData.couponGoodsIds.length != 0) { if (formData.couponGoodsIdsArr.length != 0) {
formData.couponGoodsIds = formData.couponGoodsIds.join(',') formData.couponGoodsIds = formData.couponGoodsIdsArr.join(',')
} }
if (formData.couponApplicableScopeConfig) { if (formData.couponApplicableScopeConfig) {
formData.couponApplicableScopeConfig = JSON.stringify(formData.couponApplicableScopeConfig) formData.couponApplicableScopeConfig = JSON.stringify(formData.couponApplicableScopeConfig)

View File

@ -65,6 +65,7 @@
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" align="center" /> <el-table-column type="selection" width="50" align="center" />
<el-table-column prop="shopName" width="250" label="店铺名称" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="couponName" width="350" label="优惠劵名称" align="center" :show-overflow-tooltip="true" /> <el-table-column prop="couponName" width="350" label="优惠劵名称" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="couponType" label="优惠劵类型" align="center"> <el-table-column prop="couponType" label="优惠劵类型" align="center">
<template #default="scope"> <template #default="scope">

View File

@ -1,255 +0,0 @@
<!--
* @Descripttion: (售后单记录表/tb_order_refund 添加弹窗)
* @version: (1.0)
* @Author: (lwh)
* @Date: (2023-08-29)
* @LastEditors: (lwh)
* @LastEditTime: (2023-08-29)
-->
<template>
<el-dialog v-model="props.modelValue" title="添加售后单记录表信息" width="900px" @closed="closeDialog" @open="openDialog">
<el-form ref="formRef" :model="formData" :rules="rules">
<el-row :gutter="20">
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="订单guid" prop="orderGuid">
<el-input v-model="formData.orderGuid" placeholder="请输入订单guid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户guid" prop="customerGuid">
<el-input v-model="formData.customerGuid" placeholder="请输入客户guid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="售后类型(1退货退款 2退货(无需退款) 3换货)" prop="refundType">
<el-select v-model="formData.refundType" placeholder="请选择售后类型(1退货退款 2退货(无需退款) 3换货)">
<el-option v-for="item in refund_type " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户退货原因" prop="refundReason">
<el-select v-model="formData.refundReason" placeholder="请选择客户退货原因">
<el-option v-for="item in refund_reason " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户退款说明" prop="customerRefundDesc">
<el-input v-model="formData.customerRefundDesc" placeholder="请输入客户退款说明" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户退款凭证" prop="customerRefundImg">
<UploadImage ref="uploadRef" v-model="formData.customerRefundImg" :data=imgData :limit="1" :fileSize="5"
:drag="true" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="商品收货状态(1未收到货 2已收到货)" prop="goodsReceiveStatus">
<el-select v-model="formData.goodsReceiveStatus" placeholder="请选择商品收货状态(1未收到货 2已收到货)">
<el-option v-for="item in goods_receive_status " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="商家审核状态(1待审核 2已同意 3已拒绝)" prop="merchantAuditStatus">
<el-select v-model="formData.merchantAuditStatus" placeholder="请选择商家审核状态(1待审核 2已同意 3已拒绝)">
<el-option v-for="item in merchant_audit_status " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="商家拒绝原因(说明)" prop="merchantRefuseDesc">
<el-input v-model="formData.merchantRefuseDesc" placeholder="请输入商家拒绝原因(说明)" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="实际退款金额" prop="refundMoney">
<el-input v-model="formData.refundMoney" placeholder="请输入实际退款金额" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="商家退货地址guid" prop="shopRefundAddressGuid">
<el-input v-model="formData.shopRefundAddressGuid" placeholder="请输入商家退货地址guid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="用户是否发货(1未发货 2已发货)" prop="isCustomerSend">
<el-select v-model="formData.isCustomerSend" placeholder="请选择用户是否发货(1未发货 2已发货)">
<el-option v-for="item in is_customer_send " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户发货时间" prop="customerSendTime">
<el-date-picker v-model="formData.customerSendTime" type="datetime" :teleported="false" placeholder="选择日期时间"></el-date-picker>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户发货物流公司guid" prop="logisticsCompanyGuid">
<el-input v-model="formData.logisticsCompanyGuid" placeholder="请输入客户发货物流公司guid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户发货物流单号" prop="expressNo">
<el-input v-model="formData.expressNo" placeholder="请输入客户发货物流单号" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="售后单状态(1进行中 2已拒绝 3已完成 4已取消)" prop="orderRefundStatus">
<el-select v-model="formData.orderRefundStatus" placeholder="请选择售后单状态(1进行中 2已拒绝 3已完成 4已取消)">
<el-option v-for="item in order_refund_status " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div key="dialog-footer">
<el-button type="primary" @click="handleAddClick(formRef)" :loading="loadingStatus">添加</el-button>
<el-button @click="handleResetClick(formRef)">重置</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { reactive, ref, watch } from "vue";
import { ElMessage } from 'element-plus'
import modal from '@/plugins/modal.js'
import { addOrUpdateOrderRefund } from '@/api/business/OrderManage/OrderRefunds/orderRefund.js';
//
const openDialog = async () => {
await getrefund_type()
await getrefund_reason()
await getgoods_receive_status()
await getmerchant_audit_status()
await getis_customer_send()
await getorder_refund_status()
}
// -
// (1退退 2退(退) 3)
const refund_type = ref([]);
// 退
const refund_reason = ref([]);
// (1 2)
const goods_receive_status = ref([]);
// (1 2 3)
const merchant_audit_status = ref([]);
// (1 2)
const is_customer_send = ref([]);
// (1 2 3 4)
const order_refund_status = ref([]);
// -
//
async function getrefund_type() {
await proxy.getDicts('refund_type').then((res) => {
refund_type.value = res.data
})
}
//
async function getrefund_reason() {
await proxy.getDicts('refund_reason').then((res) => {
refund_reason.value = res.data
})
}
//
async function getgoods_receive_status() {
await proxy.getDicts('goods_receive_status').then((res) => {
goods_receive_status.value = res.data
})
}
//
async function getmerchant_audit_status() {
await proxy.getDicts('merchant_audit_status').then((res) => {
merchant_audit_status.value = res.data
})
}
//
async function getis_customer_send() {
await proxy.getDicts('is_customer_send').then((res) => {
is_customer_send.value = res.data
})
}
//
async function getorder_refund_status() {
await proxy.getDicts('order_refund_status').then((res) => {
order_refund_status.value = res.data
})
}
// -
const loadingStatus = ref(false)
const labelWidth = 100;
const formRef = ref();
const { proxy } = getCurrentInstance()
const emits = defineEmits(["update:modelValue"]);
const formData = reactive({
});
const props = defineProps({
modelValue: Boolean,
done: Function,
});
const imgData = ref({
fileDir: "OrderRefund"
})
//
const rules = reactive({
orderRefundGuid: [{ required: true, message: "不能为空", trigger: "blur", type: "number" }],
orderGuid: [{ required: true, message: "订单guid不能为空", trigger: "blur", type: "number" }],
customerGuid: [{ required: true, message: "客户guid不能为空", trigger: "blur", type: "number" }],
refundType: [{ required: true, message: "售后类型(1退货退款 2退货(无需退款) 3换货)不能为空", trigger: "change", type: "number" }],
refundReason: [{ required: true, message: "客户退货原因不能为空", trigger: "change", type: "number" }],
goodsReceiveStatus: [{ required: true, message: "商品收货状态(1未收到货 2已收到货)不能为空", trigger: "change", type: "number" }],
merchantAuditStatus: [{ required: true, message: "商家审核状态(1待审核 2已同意 3已拒绝)不能为空", trigger: "change", type: "number" }],
refundMoney: [{ required: true, message: "实际退款金额不能为空", trigger: "blur" }],
isCustomerSend: [{ required: true, message: "用户是否发货(1未发货 2已发货)不能为空", trigger: "change", type: "number" }],
orderRefundStatus: [{ required: true, message: "售后单状态(1进行中 2已拒绝 3已完成 4已取消)不能为空", trigger: "change", type: "number" }],
});
// -
//
const handleAddClick = async (formEl) => {
if (!formEl) return;
formEl.validate(async (valid) => {
if (!valid) {
return;
}
loadingStatus.value = true
const { code } = await addOrUpdateOrderRefund(formData);
if (code == 200) {
modal.msgSuccess('添加成功')
closeDialog();
loadingStatus.value = false
}
});
};
const closeDialog = () => {
handleResetClick(formRef.value);
props.done();
emits("update:modelValue", false);
};
const handleResetClick = async (formEl) => {
if (!formEl) return;
formEl.resetFields();
};
</script>

View File

@ -1,18 +1,18 @@
<!-- <!--
* @Descripttion: (订单/tb_order 审核取消订单弹窗) * @Descripttion: (审核售后订单)
* @version: (1.0) * @version: (1.0)
* @Author: (lwh) * @Author: (lwh)
* @Date: (2023-09-04) * @Date: (2023-10-17)
* @LastEditors: (lwh) * @LastEditors: (lwh)
* @LastEditTime: (2023-09-04) * @LastEditTime: (2023-10-17)
--> -->
<template> <template>
<el-dialog v-model="props.modelValue" title="审核取消订单" width="600px" @closed="closeDialog" @open="openDialog"> <el-dialog v-model="props.modelValue" title="审核售后订单" width="600px" @closed="closeDialog" @open="openDialog">
<el-form ref="formRef" :model="formData" :rules="rules"> <el-form ref="formRef" :model="formData" :rules="rules">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :lg="24"> <el-col :lg="24">
<el-form-item :label-width="labelWidth" label="订单金额" prop=""> <el-form-item :label-width="labelWidth" label="退款金额" prop="">
{{ formData.orderAmount }} {{ formData.refundMoney }}
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -21,14 +21,32 @@
<el-col :lg="24"> <el-col :lg="24">
<el-form-item :label-width="labelWidth" label="审核状态" prop="isAgree"> <el-form-item :label-width="labelWidth" label="审核状态" prop="isAgree">
<div class="radio-box"> <div class="radio-box">
<el-radio-group style="display: flex;" v-model="formData.isAgree"> <el-radio-group style="display: flex;" v-model="formData.isAgree" @change="handleSelect()">
<el-radio :label=true>同意</el-radio> <el-radio :label=true>同意</el-radio>
<el-radio :label=false>拒绝</el-radio> <el-radio :label=false>拒绝</el-radio>
</el-radio-group> </el-radio-group>
<div class="input-intro">同意后将退回付款金额并关闭订单</div> <!-- <div class="input-intro">同意后将退回付款金额并关闭订单</div> -->
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 同意审核商家选择退款地址 -->
<el-col :lg="24" v-if="formData.isAgree">
<el-form-item :label-width="labelWidth" label="退货地址" prop="">
<el-select v-model="formData.shopAddressGuid" placeholder="请选择商家退货地址" clearable>
<el-option v-for="item in dataList " :key="item.shopAddressGuid" :label="item.addressName + '--' + item.shopAddressDetailedAddress"
:value="item.shopAddressGuid"></el-option>
</el-select>
</el-form-item>
</el-col>
<!-- 同意拒绝商家说明原因 -->
<el-col :lg="24" v-if="formData.isAgree == false">
<el-form-item :label-width="labelWidth" label="拒绝说明" prop="">
<el-input :rows="5" type="textarea" v-model="formData.merchantRefuseDesc" placeholder="请输入拒绝说明" />
</el-form-item>
</el-col>
</el-row> </el-row>
@ -47,12 +65,12 @@
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import modal from '@/plugins/modal.js' import modal from '@/plugins/modal.js'
import { reactive, ref, watch } from "vue"; import { reactive, ref, watch } from "vue";
import { cancelOrder } from "@/api/business/OrderManage/Orders/order.js"; import { auditOrderRefund } from '@/api/business/OrderManage/OrderRefunds/orderRefund.js'
import { shopAddressList } from '@/api/business/ShopManager/ShopAddresss/shopAddress.js'
// //
const openDialog = async () => { const openDialog = async () => {
} }
const formData = ref({ const formData = ref({
@ -64,11 +82,31 @@ watch(props, async (v) => {
}); });
// //
const dataList = ref([])
const params = ref({
pageSize: 10000,
shopGuid: formData.value.shopGuid,
shopAddressType: 2
})
console.log(params.value,'参数');
// - // -
function getList() {
shopAddressList(params.value).then((res) => {
if (res.code == 200) {
dataList.value = res.data.result;
console.log(dataList.value, '地址列表');
}
});
}
function handleSelect() {
if(formData.value.isAgree){
params.value.shopGuid = formData.value.shopGuid
getList()
console.log(formData.value.shopAddressGuid);
}
}
// - // -
@ -100,9 +138,10 @@ const handleEditClick = async (formEl) => {
if (!valid) { if (!valid) {
return; return;
} }
loadingStatus.value = true loadingStatus.value = true
const { code,data } = await cancelOrder(formData.value); const { code, data } = await auditOrderRefund(formData.value);
if (code == 200) { if (code == 200) {
modal.msgSuccess(data) modal.msgSuccess(data)
props.done(); props.done();

View File

@ -1,232 +0,0 @@
<!--
* @Descripttion: (售后单记录表/tb_order_refund 详情弹窗)
* @version: (1.0)
* @Author: (lwh)
* @Date: (2023-08-29)
* @LastEditors: (lwh)
* @LastEditTime: (2023-08-29)
-->
<template>
<el-dialog v-model="props.modelValue" title="售后单记录表信息详情" width="900px" @closed="closeDialog" @open="openDialog">
<el-form ref="formRef" :model="formData" :disabled="true">
<el-row :gutter="20">
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="订单guid" >
<el-input v-model="formData.orderGuid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户guid" >
<el-input v-model="formData.customerGuid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="售后类型(1退货退款 2退货(无需退款) 3换货)" >
<el-select v-model="formData.refundType" >
<el-option v-for="item in refund_type " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户退货原因" >
<el-select v-model="formData.refundReason" >
<el-option v-for="item in refund_reason " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户退款说明" >
<el-input v-model="formData.customerRefundDesc" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户退款凭证" >
<UploadImage ref="uploadRef" v-model="formData.customerRefundImg" :limit="1" :fileSize="5"
:drag="true" :isShowTip="false" :isDisabled="true"/>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="商品收货状态(1未收到货 2已收到货)" >
<el-select v-model="formData.goodsReceiveStatus" >
<el-option v-for="item in goods_receive_status " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="商家审核状态(1待审核 2已同意 3已拒绝)" >
<el-select v-model="formData.merchantAuditStatus" >
<el-option v-for="item in merchant_audit_status " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="商家拒绝原因(说明)" >
<el-input v-model="formData.merchantRefuseDesc" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="实际退款金额" >
<el-input v-model="formData.refundMoney" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="商家退货地址guid" >
<el-input v-model="formData.shopRefundAddressGuid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="用户是否发货(1未发货 2已发货)" >
<el-select v-model="formData.isCustomerSend" >
<el-option v-for="item in is_customer_send " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户发货时间" >
<el-date-picker v-model="formData.customerSendTime" type="datetime" :teleported="false" isabledStr}></el-date-picker>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户发货物流公司guid" >
<el-input v-model="formData.logisticsCompanyGuid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户发货物流单号" >
<el-input v-model="formData.expressNo" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="售后单状态(1进行中 2已拒绝 3已完成 4已取消)" >
<el-select v-model="formData.orderRefundStatus" >
<el-option v-for="item in order_refund_status " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</template>
<script setup>
import { ElMessage } from 'element-plus'
import { reactive, ref, watch } from "vue";
//
const openDialog = async () => {
await getrefund_type()
await getrefund_reason()
await getgoods_receive_status()
await getmerchant_audit_status()
await getis_customer_send()
await getorder_refund_status()
}
const formData = ref({
...props.data,
});
watch(props, async (v) => {
formData.value = v.data;
});
// -
// (1退退 2退(退) 3)
const refund_type = ref([]);
// 退
const refund_reason = ref([]);
// (1 2)
const goods_receive_status = ref([]);
// (1 2 3)
const merchant_audit_status = ref([]);
// (1 2)
const is_customer_send = ref([]);
// (1 2 3 4)
const order_refund_status = ref([]);
// -
//
async function getrefund_type() {
await proxy.getDicts('refund_type').then((res) => {
refund_type.value = res.data
})
}
//
async function getrefund_reason() {
await proxy.getDicts('refund_reason').then((res) => {
refund_reason.value = res.data
})
}
//
async function getgoods_receive_status() {
await proxy.getDicts('goods_receive_status').then((res) => {
goods_receive_status.value = res.data
})
}
//
async function getmerchant_audit_status() {
await proxy.getDicts('merchant_audit_status').then((res) => {
merchant_audit_status.value = res.data
})
}
//
async function getis_customer_send() {
await proxy.getDicts('is_customer_send').then((res) => {
is_customer_send.value = res.data
})
}
//
async function getorder_refund_status() {
await proxy.getDicts('order_refund_status').then((res) => {
order_refund_status.value = res.data
})
}
//
const formRef = ref();
const labelWidth = 100;
const { proxy } = getCurrentInstance()
const props = defineProps({
modelValue: Boolean,
data: Object,
done: Function,
});
const emits = defineEmits(["update:modelValue"]);
// -
const closeDialog = () => {
emits("update:modelValue", false);
};
</script>

View File

@ -1,283 +0,0 @@
<!--
* @Descripttion: (售后单记录表/tb_order_refund 编辑弹窗)
* @version: (1.0)
* @Author: (lwh)
* @Date: (2023-08-29)
* @LastEditors: (lwh)
* @LastEditTime: (2023-08-29)
-->
<template>
<el-dialog v-model="props.modelValue" title="修改售后单记录表信息" width="900px" @closed="closeDialog" @open="openDialog">
<el-form ref="formRef" :model="formData" :rules="rules">
<el-row :gutter="20">
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="订单guid" prop="orderGuid">
<el-input v-model="formData.orderGuid" placeholder="请输入订单guid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户guid" prop="customerGuid">
<el-input v-model="formData.customerGuid" placeholder="请输入客户guid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="售后类型(1退货退款 2退货(无需退款) 3换货)" prop="refundType">
<el-select v-model="formData.refundType" placeholder="请选择售后类型(1退货退款 2退货(无需退款) 3换货)">
<el-option v-for="item in refund_type " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户退货原因" prop="refundReason">
<el-select v-model="formData.refundReason" placeholder="请选择客户退货原因">
<el-option v-for="item in refund_reason " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户退款说明" prop="customerRefundDesc">
<el-input v-model="formData.customerRefundDesc" placeholder="请输入客户退款说明" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户退款凭证" prop="customerRefundImg">
<UploadImage ref="uploadRef" v-model="formData.customerRefundImg" :data=imgData :limit="1" :fileSize="5"
:drag="true" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="商品收货状态(1未收到货 2已收到货)" prop="goodsReceiveStatus">
<el-select v-model="formData.goodsReceiveStatus" placeholder="请选择商品收货状态(1未收到货 2已收到货)">
<el-option v-for="item in goods_receive_status " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="商家审核状态(1待审核 2已同意 3已拒绝)" prop="merchantAuditStatus">
<el-select v-model="formData.merchantAuditStatus" placeholder="请选择商家审核状态(1待审核 2已同意 3已拒绝)">
<el-option v-for="item in merchant_audit_status " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="商家拒绝原因(说明)" prop="merchantRefuseDesc">
<el-input v-model="formData.merchantRefuseDesc" placeholder="请输入商家拒绝原因(说明)" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="实际退款金额" prop="refundMoney">
<el-input v-model="formData.refundMoney" placeholder="请输入实际退款金额" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="商家退货地址guid" prop="shopRefundAddressGuid">
<el-input v-model="formData.shopRefundAddressGuid" placeholder="请输入商家退货地址guid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="用户是否发货(1未发货 2已发货)" prop="isCustomerSend">
<el-select v-model="formData.isCustomerSend" placeholder="请选择用户是否发货(1未发货 2已发货)">
<el-option v-for="item in is_customer_send " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户发货时间" prop="customerSendTime">
<el-date-picker v-model="formData.customerSendTime" type="datetime" :teleported="false" placeholder="选择日期时间"></el-date-picker>
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户发货物流公司guid" prop="logisticsCompanyGuid">
<el-input v-model="formData.logisticsCompanyGuid" placeholder="请输入客户发货物流公司guid" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="客户发货物流单号" prop="expressNo">
<el-input v-model="formData.expressNo" placeholder="请输入客户发货物流单号" />
</el-form-item>
</el-col>
<el-col :lg="12">
<el-form-item :label-width="labelWidth" label="售后单状态(1进行中 2已拒绝 3已完成 4已取消)" prop="orderRefundStatus">
<el-select v-model="formData.orderRefundStatus" placeholder="请选择售后单状态(1进行中 2已拒绝 3已完成 4已取消)">
<el-option v-for="item in order_refund_status " :key="item.dictValue" :label="item.dictLabel" :value="parseInt(item.dictValue)"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="handleEditClick(formRef)" :loading="loadingStatus">编辑</el-button>
<el-button @click="handleResetClick(formRef)">重置</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import { ElMessage } from 'element-plus'
import modal from '@/plugins/modal.js'
import { reactive, ref, watch } from "vue";
import { addOrUpdateOrderRefund } from "@/api/business/OrderManage/OrderRefunds/orderRefund.js";
//
const openDialog = async () => {
await getrefund_type()
await getrefund_reason()
await getgoods_receive_status()
await getmerchant_audit_status()
await getis_customer_send()
await getorder_refund_status()
}
const formData = ref({
...props.data,
});
watch(props, async (v) => {
formData.value = v.data;
});
//
// (1退退 2退(退) 3)
const refund_type = ref([]);
// 退
const refund_reason = ref([]);
// (1 2)
const goods_receive_status = ref([]);
// (1 2 3)
const merchant_audit_status = ref([]);
// (1 2)
const is_customer_send = ref([]);
// (1 2 3 4)
const order_refund_status = ref([]);
// -
//
async function getrefund_type() {
await proxy.getDicts('refund_type').then((res) => {
refund_type.value = res.data
})
}
//
async function getrefund_reason() {
await proxy.getDicts('refund_reason').then((res) => {
refund_reason.value = res.data
})
}
//
async function getgoods_receive_status() {
await proxy.getDicts('goods_receive_status').then((res) => {
goods_receive_status.value = res.data
})
}
//
async function getmerchant_audit_status() {
await proxy.getDicts('merchant_audit_status').then((res) => {
merchant_audit_status.value = res.data
})
}
//
async function getis_customer_send() {
await proxy.getDicts('is_customer_send').then((res) => {
is_customer_send.value = res.data
})
}
//
async function getorder_refund_status() {
await proxy.getDicts('order_refund_status').then((res) => {
order_refund_status.value = res.data
})
}
// -
const props = defineProps({
modelValue: Boolean,
data: Object,
done: Function,
});
const loadingStatus = ref(false)
const labelWidth = 100;
const formRef = ref();
const { proxy } = getCurrentInstance()
const emits = defineEmits(["update:modelValue"]);
const imgData = ref({
fileDir: "OrderRefund"
})
//
const rules = reactive({
orderRefundGuid: [{ required: true, message: "不能为空", trigger: "blur", type: "number" }],
orderGuid: [{ required: true, message: "订单guid不能为空", trigger: "blur", type: "number" }],
customerGuid: [{ required: true, message: "客户guid不能为空", trigger: "blur", type: "number" }],
refundType: [{ required: true, message: "售后类型(1退货退款 2退货(无需退款) 3换货)不能为空", trigger: "change", type: "number" }],
refundReason: [{ required: true, message: "客户退货原因不能为空", trigger: "change", type: "number" }],
goodsReceiveStatus: [{ required: true, message: "商品收货状态(1未收到货 2已收到货)不能为空", trigger: "change", type: "number" }],
merchantAuditStatus: [{ required: true, message: "商家审核状态(1待审核 2已同意 3已拒绝)不能为空", trigger: "change", type: "number" }],
refundMoney: [{ required: true, message: "实际退款金额不能为空", trigger: "blur" }],
isCustomerSend: [{ required: true, message: "用户是否发货(1未发货 2已发货)不能为空", trigger: "change", type: "number" }],
orderRefundStatus: [{ required: true, message: "售后单状态(1进行中 2已拒绝 3已完成 4已取消)不能为空", trigger: "change", type: "number" }],
});
// -
//
const handleEditClick = async (formEl) => {
if (!formEl) return;
formEl.validate(async (valid) => {
if (!valid) {
return;
}
loadingStatus.value = true
const { code } = await addOrUpdateOrderRefund(formData.value);
if (code == 200) {
modal.msgSuccess('修改成功')
closeDialog();
loadingStatus.value = false
}
});
}
const handleResetClick = async (formEl) => {
if (!formEl) return;
formEl.resetFields();
}
const closeDialog = () => {
props.done();
emits("update:modelValue", false);
};
</script>

View File

@ -17,22 +17,26 @@
</el-form-item> </el-form-item>
<el-form-item label="售后类型" prop="refundType"> <el-form-item label="售后类型" prop="refundType">
<el-select v-model="queryParams.refundType" placeholder="请选择售后类型" clearable @change="handleQuery"> <el-select v-model="queryParams.refundType" placeholder="请选择售后类型" clearable @change="handleQuery">
<el-option v-for="item in refund_type " :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option> <el-option v-for="item in refund_type " :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="商家审核状态" prop="merchantAuditStatus"> <el-form-item label="商家审核状态" prop="merchantAuditStatus">
<el-select v-model="queryParams.merchantAuditStatus" placeholder="请选择商家审核状态" clearable @change="handleQuery"> <el-select v-model="queryParams.merchantAuditStatus" placeholder="请选择商家审核状态" clearable @change="handleQuery">
<el-option v-for="item in merchant_audit_status " :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option> <el-option v-for="item in merchant_audit_status " :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="售后单状态" prop="orderRefundStatus"> <el-form-item label="售后单状态" prop="orderRefundStatus">
<el-select v-model="queryParams.orderRefundStatus" placeholder="请选择售后单状态" clearable @change="handleQuery"> <el-select v-model="queryParams.orderRefundStatus" placeholder="请选择售后单状态" clearable @change="handleQuery">
<el-option v-for="item in order_refund_status " :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue"></el-option> <el-option v-for="item in order_refund_status " :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="申请时间"> <el-form-item label="申请时间">
<el-date-picker v-model="dateRange" style="width: 240px" type="daterange" range-separator="-" <el-date-picker v-model="dateRange" style="width: 240px" type="daterange" range-separator="-"
start-placeholder="开始日期" end-placeholder="结束日期" :default-time="defaultTime2" @change="handleQuery"></el-date-picker> start-placeholder="开始日期" end-placeholder="结束日期" :default-time="defaultTime2"
@change="handleQuery"></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -56,11 +60,11 @@
{{ $t('btn.delete') }} {{ $t('btn.delete') }}
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button type="warning" plain icon="download" @click="handleExport" v-hasPermi="['business:order:export']"> <el-button type="warning" plain icon="download" @click="handleExport" v-hasPermi="['business:order:export']">
{{ $t('btn.export') }} {{ $t('btn.export') }}
</el-button> </el-button>
</el-col> </el-col> -->
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
@ -88,7 +92,7 @@
{{ item.goodsName }} {{ item.goodsName }}
</div> </div>
<div> <div>
<el-tag type="info" v-if="item.goodsSpecName" >{{ item.goodsSpecName }}</el-tag> <el-tag type="info" v-if="item.goodsSpecName">{{ item.goodsSpecName }}</el-tag>
</div> </div>
</div> </div>
@ -142,25 +146,36 @@
</el-table-column> </el-table-column>
<el-table-column prop="deliveryStatus" label="处理进度" width="200"> <el-table-column prop="deliveryStatus" label="处理进度" width="200">
<template #default="scope"> <template #default="scope">
<div class="status-box">商家审核: &nbsp;<dict-tag :options="merchant_audit_status" :value="scope.row.merchantAuditStatus" /></div> <div v-if="scope.row.orderRefundStatus == 1 || scope.row.orderRefundStatus == 3">
<div class="status-box">商家审核: &nbsp;<dict-tag :options="merchant_audit_status"
:value="scope.row.merchantAuditStatus" /></div>
<div class="status-box">用户发货: &nbsp;<dict-tag :options="is_customer_send" :value="scope.row.isCustomerSend" /> <div class="status-box">用户发货: &nbsp;<dict-tag :options="is_customer_send" :value="scope.row.isCustomerSend" />
</div> </div>
<div class="status-box">商家收货: &nbsp;<dict-tag :options="is_merchant_receive" :value="scope.row.isMerchantReceive" /> <div class="status-box">商家收货: &nbsp;<dict-tag :options="is_merchant_receive"
:value="scope.row.isMerchantReceive" />
</div> </div>
</div>
<div v-if="scope.row.orderRefundStatus == 2">-- 商家已拒绝 --</div>
<div v-if="scope.row.orderRefundStatus == 4">-- 售后单已取消 --</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="申请时间" :show-overflow-tooltip="true" width="200" /> <el-table-column prop="createTime" label="申请时间" :show-overflow-tooltip="true" width="200" />
<el-table-column label="操作" width="250" fixed="right"> <el-table-column label="操作" width="300" fixed="right">
<template #default="scope"> <template #default="scope">
<!-- <el-button type="primary" size="small" icon="edit" @click="handleUpdate(scope.row)" <!-- <el-button type="primary" size="small" icon="edit" @click="handleUpdate(scope.row)"
v-hasPermi="['business:order:addOrUpdate']">编辑</el-button> --> v-hasPermi="['business:order:addOrUpdate']">编辑</el-button> -->
<el-button type="primary" size="small" icon="view" @click="handleDetail(scope.row)">详情</el-button> <el-button type="primary" size="small" icon="view" @click="handleDetail(scope.row)">详情</el-button>
<!-- 审核取消订单 --> <!-- 审核售后订单 -->
<el-button type="warning" size="small" v-if="scope.row.orderStatus == 3" <el-button type="warning" size="small"
@click="handleCancelOrder(scope.row)" icon="check">审核取消订单</el-button> v-if="scope.row.merchantAuditStatus == 1 && scope.row.orderRefundStatus == 1"
@click="handleAuditOrderRefund(scope.row)" icon="check">审核</el-button>
<!-- 确认收货 -->
<el-button type="warning" size="small"
v-if="scope.row.isCustomerSend == 2 && scope.row.orderRefundStatus == 1"
@click="handleConfirmsReceipt(scope.row)" icon="check">确认收货</el-button>
<el-button type="danger" size="small" icon="delete" @click="handleDelete(scope.row)" <el-button type="danger" size="small" icon="delete" @click="handleDelete(scope.row)"
v-hasPermi="['business:order:delete']">删除</el-button> v-hasPermi="['business:order:delete']">删除</el-button>
</template> </template>
@ -171,35 +186,20 @@
@pagination="getList" /> @pagination="getList" />
</div> </div>
<!-- 添加 --> <!-- 审核售后订单 -->
<AddDialog v-model="AddDialogVisible" :done="() => resetQuery()"></AddDialog> <AuditOrderRefundDialog v-model="AuditOrderRefundDialogVisible" :data="AuditOrderRefundDialogRow"
<!-- 编辑 --> :done="() => resetQuery()">
<EditDialog v-model="EditDialogVisible" :data="EditDialogRow" :done="() => resetQuery()"></EditDialog> </AuditOrderRefundDialog>
<!-- 详情 -->
<DetailDialog v-model="DetailDialogVisible" :data="DetailDialogRow" :done="() => resetQuery()"></DetailDialog>
<!-- 审核取消订单 -->
<!-- <CancelOrderDialog v-model="CancelOrderDialogVisible" :data="CancelOrderDialogRow" :done="() => resetQuery()">
</CancelOrderDialog> -->
</template> </template>
<script setup name="order"> <script setup name="order">
import { ElMessageBox } from 'element-plus' import { ElMessageBox } from 'element-plus'
import modal from '@/plugins/modal.js' import modal from '@/plugins/modal.js'
import { exportOrderRefund, orderRefundList , delOrderRefund } from '@/api/business/OrderManage/OrderRefunds/orderRefund.js' import { exportOrderRefund, orderRefundList, confirmsReceipt, delOrderRefund } from '@/api/business/OrderManage/OrderRefunds/orderRefund.js'
import AddDialog from "./components/AddDialog.vue"; import AuditOrderRefundDialog from "./components/AuditOrderRefundDialog.vue";
import EditDialog from "./components/EditDialog.vue";
import DetailDialog from "./components/DetailDialog.vue";
// import CancelOrderDialog from "./components/CancelOrderDialog.vue";
import useClipboard from 'vue-clipboard3' import useClipboard from 'vue-clipboard3'
const AddDialogVisible = ref(false); const AuditOrderRefundDialogVisible = ref(false);
const EditDialogVisible = ref(false); const AuditOrderRefundDialogRow = ref({});
const EditDialogRow = ref({});
const DetailDialogVisible = ref(false);
const DetailDialogRow = ref({});
const CancelOrderDialogVisible = ref(false);
const CancelOrderDialogRow = ref({});
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
@ -250,19 +250,37 @@ const copyText = async (val) => {
} }
// //
function handleCancelOrder(row) { function handleAuditOrderRefund(row) {
CancelOrderDialogVisible.value = true AuditOrderRefundDialogVisible.value = true
CancelOrderDialogRow.value = row AuditOrderRefundDialogRow.value = row
} }
function resetStatusQuery(){ function resetStatusQuery() {
queryParams.value.deliveryStatus = null; queryParams.value.deliveryStatus = null;
queryParams.value.receiptStatus = null; queryParams.value.receiptStatus = null;
queryParams.value.payStatus = null; queryParams.value.payStatus = null;
queryParams.value.orderStatus = null; queryParams.value.orderStatus = null;
} }
/** 确认收货按钮操作 */
function handleConfirmsReceipt(row) {
const Ids = row.orderRefundGuid
ElMessageBox.confirm("是否确认确认收货?", "系统提示", {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning",
})
.then(function () {
return confirmsReceipt({ orderRefundGuid: Ids })
})
.then(() => {
handleQuery()
modal.msgSuccess("确认收货成功")
})
.catch(() => { })
}
@ -360,7 +378,7 @@ function handleQuery() {
} }
/** 删除按钮操作 */ /** 删除按钮操作 */
function handleDelete(row) { function handleDelete(row) {
const Ids = row.orderId || ids.value const Ids = row.orderRefundId || ids.value
ElMessageBox.confirm("是否确认删除?", "系统提示", { ElMessageBox.confirm("是否确认删除?", "系统提示", {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -379,7 +397,7 @@ function handleDelete(row) {
/** 导出按钮操作 */ /** 导出按钮操作 */
function handleExport(row) { function handleExport(row) {
const Ids = row.orderId || ids.value const Ids = row.orderRefundId || ids.value
const name = ref("所有") const name = ref("所有")
if (Ids.length != 0) { if (Ids.length != 0) {
@ -406,11 +424,6 @@ function handleExport(row) {
} }
//
function handleUpdate(row) {
EditDialogVisible.value = true
EditDialogRow.value = row
}
// //
function handleDetail(row) { function handleDetail(row) {
@ -466,5 +479,4 @@ handleQuery()
position: absolute; position: absolute;
right: 0%; right: 0%;
} }
} }</style>
</style>

View File

@ -2,17 +2,26 @@
<!-- 订单信息 --> <!-- 订单信息 -->
<el-card class="box-card"> <el-card class="box-card">
<template v-if="detail.merchantAuditStatus == 1"> <template v-if="detail.orderRefundStatus == 1">
<!-- 售后单操作 --> <!-- 售后单操作 -->
<div class="order-operation"> <div class="order-operation">
<div class="card-title">售后单操作</div> <div class="card-title">售后单操作</div>
<div class="btn-box"> <div class="btn-box" v-if="detail.merchantAuditStatus == 1">
<!-- 审核取消订单 --> <!-- 审核售后订单 -->
<div style="width: 100%;"> <div style="width: 100%;">
<el-alert title="当前买家已发起售后申请,请及时审核处理。" type="warning" show-icon :closable=false /> <el-alert title="当前买家已发起售后申请,请及时审核处理。" type="warning" show-icon :closable=false />
<div> <div>
<el-button type="primary" @click="handleCancelOrder(detail)">商家审核</el-button> <el-button type="primary" @click="handleAuditOrderRefund(detail)">商家审核</el-button>
</div>
</div>
</div>
<div class="btn-box" v-if="detail.isCustomerSend == 2">
<!-- 确认收货 -->
<div style="width: 100%;">
<el-alert title="当前买家已发货,请确认包裹后点击收货,确认收货后将退款给买家。" type="warning" show-icon :closable=false />
<div>
<el-button type="primary" @click="handleConfirmsReceipt(detail)">确认收货</el-button>
</div> </div>
</div> </div>
</div> </div>
@ -47,6 +56,9 @@
<el-col :span="8">收货状态(商家) <dict-tag :options="is_merchant_receive" <el-col :span="8">收货状态(商家) <dict-tag :options="is_merchant_receive"
:value="detail.isMerchantReceive" /></el-col> :value="detail.isMerchantReceive" /></el-col>
</el-row> </el-row>
<el-row class="order-info-box">
<el-col :span="8">商家拒绝说明{{ detail.merchantRefuseDesc }}</el-col>
</el-row>
</div> </div>
</el-card> </el-card>
@ -132,8 +144,7 @@
<!-- 收货信息 / 发货信息 --> <!-- 收货信息 / 发货信息 -->
<!-- 订单信息 --> <el-card class="box-card" v-if="detail.shopRefundAddressGuid">
<el-card class="box-card">
<div class="card-title">商家收货信息</div> <div class="card-title">商家收货信息</div>
<el-row class="order-info-box"> <el-row class="order-info-box">
@ -143,6 +154,8 @@
</el-row> </el-row>
<el-row class="order-info-box"> <el-row class="order-info-box">
<el-col :span="8">详细地址 {{ detail.orderReceive?.detail }}</el-col> <el-col :span="8">详细地址 {{ detail.orderReceive?.detail }}</el-col>
<el-col :span="8">收货状态 <dict-tag :options="is_merchant_receive" :value="detail.isMerchantReceive" /></el-col>
<el-col :span="8">收货时间 {{ detail.merchantReceiveTime }}</el-col>
</el-row> </el-row>
<div v-if="detail.isCustomerSend == 2"> <div v-if="detail.isCustomerSend == 2">
@ -150,25 +163,28 @@
<div class="card-title">买家发货信息</div> <div class="card-title">买家发货信息</div>
<el-row class="order-info-box"> <el-row class="order-info-box">
<el-col :span="8">物流公司 {{ detail.logisticsCompany }}</el-col> <el-col :span="8">物流公司 {{ detail.logisticsCompany }}</el-col>
<el-col :span="8">物流单号 {{ detail.logisticsTrackingNumber }}</el-col> <el-col :span="8">物流单号 {{ detail.expressNo }}</el-col>
<el-col :span="8">发货状态 <dict-tag :options="delivery_status" :value="detail.deliveryStatus" /></el-col> <el-col :span="8">发货状态 <dict-tag :options="is_customer_send" :value="detail.isCustomerSend" /></el-col>
</el-row> </el-row>
<el-row class="order-info-box"> <el-row class="order-info-box">
<el-col :span="8">发货时间 {{ detail.deliveryTime }}</el-col> <el-col :span="8">发货时间 {{ detail.customerSendTime }}</el-col>
<el-col :span="8">备注 {{ detail.customerWaybillRemark }}</el-col>
</el-row> </el-row>
</div> </div>
</el-card> </el-card>
<!-- 审核取消订单 --> <!-- 审核售后订单 -->
<CancelOrderDialog v-model="CancelOrderDialogVisible" :data="CancelOrderDialogRow" :done="() => getDetail()"> <AuditOrderRefundDialog v-model="AuditOrderRefundDialogVisible" :data="AuditOrderRefundDialogRow"
</CancelOrderDialog> :done="() => getDetail()">
</AuditOrderRefundDialog>
</template> </template>
<script setup> <script setup>
import modal from '@/plugins/modal.js' import modal from '@/plugins/modal.js'
import { getOrderRefundDetails } from '@/api/business/OrderManage/OrderRefunds/orderRefund.js' import { ElMessageBox } from 'element-plus'
import CancelOrderDialog from "./components/CancelOrderDialog.vue"; import { getOrderRefundDetails, confirmsReceipt } from '@/api/business/OrderManage/OrderRefunds/orderRefund.js'
import AuditOrderRefundDialog from "./components/AuditOrderRefundDialog.vue";
const route = useRoute() const route = useRoute()
@ -178,8 +194,8 @@ const parm = reactive({
orderRefundId: route.query.orderRefundId orderRefundId: route.query.orderRefundId
}) })
const CancelOrderDialogVisible = ref(false); const AuditOrderRefundDialogVisible = ref(false);
const CancelOrderDialogRow = ref({}); const AuditOrderRefundDialogRow = ref({});
const loading = ref(true) const loading = ref(true)
@ -202,9 +218,29 @@ getDetail()
// //
function handleCancelOrder(row) { function handleAuditOrderRefund(row) {
CancelOrderDialogVisible.value = true AuditOrderRefundDialogVisible.value = true
CancelOrderDialogRow.value = row AuditOrderRefundDialogRow.value = row
}
/** 确认收货按钮操作 */
function handleConfirmsReceipt(row) {
const Ids = row.orderRefundGuid
ElMessageBox.confirm("是否确认确认收货?", "系统提示", {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning",
})
.then(function () {
return confirmsReceipt({ orderRefundGuid: Ids })
})
.then(() => {
getDetail()
modal.msgSuccess("确认收货成功")
})
.catch(() => { })
} }

View File

@ -72,11 +72,11 @@
{{ $t('btn.delete') }} {{ $t('btn.delete') }}
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button type="warning" plain icon="download" @click="handleExport" v-hasPermi="['business:order:export']"> <el-button type="warning" plain icon="download" @click="handleExport" v-hasPermi="['business:order:export']">
{{ $t('btn.export') }} {{ $t('btn.export') }}
</el-button> </el-button>
</el-col> </el-col> -->
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>

View File

@ -11,6 +11,19 @@
<el-form ref="formRef" :model="formData" :rules="rules"> <el-form ref="formRef" :model="formData" :rules="rules">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col v-if="userid == 1" :lg="12">
<el-form-item :label-width="labelWidth" label="店铺" prop="shopGuid">
<el-input v-model='formData.shopName' disabled type="text" placeholder='点击选择店铺'>
<template #append>
<div @click="handleChooseShop">选择</div>
</template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :lg="24"> <el-col :lg="24">
<el-form-item :label-width="labelWidth" label="地址类型" prop="shopAddressType"> <el-form-item :label-width="labelWidth" label="地址类型" prop="shopAddressType">
<el-radio-group v-model="formData.shopAddressType"> <el-radio-group v-model="formData.shopAddressType">
@ -68,6 +81,10 @@
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
<!-- 选择店铺 -->
<ChooseShopDialog v-model="ChooseShopDialogVisible" :data="ChooseShopDialogRow" >
</ChooseShopDialog>
</template> </template>
@ -77,6 +94,8 @@ import { ElMessage } from 'element-plus'
import modal from '@/plugins/modal.js' import modal from '@/plugins/modal.js'
import { addOrUpdateShopAddress } from '@/api/business/ShopManager/ShopAddresss/shopAddress.js'; import { addOrUpdateShopAddress } from '@/api/business/ShopManager/ShopAddresss/shopAddress.js';
import { regionTreeList } from '@/api/business/Custom/Regions/region.js'; import { regionTreeList } from '@/api/business/Custom/Regions/region.js';
import useUserStore from '@/store/modules/user'
import ChooseShopDialog from '@/views/business/components/ChooseShopDialog.vue';
// //
const openDialog = async () => { const openDialog = async () => {
@ -86,12 +105,17 @@ const openDialog = async () => {
} }
// - // -
const dataList = ref([]) const dataList = ref([])
const userid = useUserStore().userId
// //
const shop_address_type = ref([]); const shop_address_type = ref([]);
//
const ChooseShopDialogVisible = ref(false);
const ChooseShopDialogRow = ref({});
// - // -
// //
@ -118,6 +142,14 @@ function handleCascaderChange(selectedValues) {
} }
//
const handleChooseShop = () => {
ChooseShopDialogVisible.value = true
ChooseShopDialogRow.value = formData
}
// - // -
const labelWidth = 100; const labelWidth = 100;
const formRef = ref(); const formRef = ref();
@ -134,6 +166,7 @@ const imgData = ref({
fileDir: "ShopAddress" fileDir: "ShopAddress"
}) })
// //
const rules = reactive({ const rules = reactive({
shopAddressType: [{ required: true, message: "地址类型不能为空", trigger: "blur", type: "number" }], shopAddressType: [{ required: true, message: "地址类型不能为空", trigger: "blur", type: "number" }],

View File

@ -109,7 +109,9 @@ const handleEditClick = async () => {
formData.value.shopName = shopName.value formData.value.shopName = shopName.value
formData.value.shopGuid = shopGuid.value formData.value.shopGuid = shopGuid.value
if (formData.value.shopName != null) { if (formData.value.shopName != null) {
if(props.done){
props.done(); props.done();
}
closeDialog(); closeDialog();
} }
} else { } else {