|
@@ -1,30 +1,40 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- <el-card class="box-card">
|
|
|
- <byTable
|
|
|
- :source="sourceList.data"
|
|
|
- :pagination="sourceList.pagination"
|
|
|
- :config="config"
|
|
|
- :loading="loading"
|
|
|
- :searchConfig="searchConfig"
|
|
|
- highlight-current-row
|
|
|
- @get-list="getList"
|
|
|
- @clickReset="clickReset">
|
|
|
- <template #code="{ item }">
|
|
|
- <div>
|
|
|
- <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="clickCode(item)">{{ item.code }}</a>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template #address="{ item }">
|
|
|
- <div>{{ item.province }}, {{ item.city }}, {{ item.county }}, {{ item.detailedAddress }}</div>
|
|
|
- </template>
|
|
|
- </byTable>
|
|
|
- </el-card>
|
|
|
- </div>
|
|
|
+ <el-card class="box-card">
|
|
|
+ <byTable
|
|
|
+ :source="sourceList.data"
|
|
|
+ :pagination="sourceList.pagination"
|
|
|
+ :config="config"
|
|
|
+ :loading="loading"
|
|
|
+ :searchConfig="searchConfig"
|
|
|
+ highlight-current-row
|
|
|
+ @get-list="getList"
|
|
|
+ @clickReset="clickReset">
|
|
|
+ <template #code="{ item }">
|
|
|
+ <div>
|
|
|
+ <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="clickCode(item)">{{ item.code }}</a>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #address="{ item }">
|
|
|
+ <div>{{ item.province }}, {{ item.city }}, {{ item.county }}, {{ item.detailedAddress }}</div>
|
|
|
+ </template>
|
|
|
+ </byTable>
|
|
|
+
|
|
|
+ <el-dialog title="售后类型" v-if="openAfterSale" v-model="openAfterSale" width="300px" style="margin-top: 20vh !important">
|
|
|
+ <template #footer>
|
|
|
+ <el-button type="primary" @click="applyForAfterSale(1)" size="large" v-preReClick>退 货</el-button>
|
|
|
+ <el-button @click="applyForAfterSale(2)" size="large" v-preReClick>换 货</el-button>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="送货单" v-if="openDeliveryNote" v-model="openDeliveryNote" width="1000px">
|
|
|
+ <DeliveryNote :rowData="rowData" @clickCancel="clickCancel"></DeliveryNote>
|
|
|
+ </el-dialog>
|
|
|
+ </el-card>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import byTable from "/src/components/byTable/index";
|
|
|
+import DeliveryNote from "/src/components/order/deliveryNote/index";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const departmentList = ref([{ dictKey: "0", dictValue: "胜德体育" }]);
|
|
@@ -146,6 +156,70 @@ const config = computed(() => {
|
|
|
"min-width": 220,
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "操作",
|
|
|
+ width: 180,
|
|
|
+ align: "center",
|
|
|
+ fixed: "right",
|
|
|
+ },
|
|
|
+ renderHTML(row) {
|
|
|
+ return [
|
|
|
+ [40, 50].includes(row.status)
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ label: "售后",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ clickAfterSale(row);
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {},
|
|
|
+ row.type === 1 && row.status == 40
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ label: "送货单",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ clickDeliveryNote(row);
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {},
|
|
|
+ row.status == 20
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ label: "挂起",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ clickHangUp(row);
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {},
|
|
|
+ row.status == 60
|
|
|
+ ? {
|
|
|
+ attrs: {
|
|
|
+ label: "取消挂起",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ clickCancelHangUp(row);
|
|
|
+ },
|
|
|
+ }
|
|
|
+ : {},
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ },
|
|
|
];
|
|
|
});
|
|
|
const getDemandData = () => {
|
|
@@ -197,6 +271,62 @@ const clickCode = (row) => {
|
|
|
},
|
|
|
});
|
|
|
};
|
|
|
+const openAfterSale = ref(false);
|
|
|
+const rowData = ref({});
|
|
|
+const clickAfterSale = (row) => {
|
|
|
+ rowData.value = row;
|
|
|
+ openAfterSale.value = true;
|
|
|
+};
|
|
|
+const applyForAfterSale = (type) => {
|
|
|
+ openAfterSale.value = false;
|
|
|
+ proxy.$router.replace({
|
|
|
+ path: "/order/after-sale/initiate",
|
|
|
+ query: {
|
|
|
+ orderInfoId: rowData.value.id,
|
|
|
+ type: type,
|
|
|
+ random: proxy.random(),
|
|
|
+ },
|
|
|
+ });
|
|
|
+};
|
|
|
+const openDeliveryNote = ref(false);
|
|
|
+const clickDeliveryNote = (row) => {
|
|
|
+ rowData.value = row;
|
|
|
+ openDeliveryNote.value = true;
|
|
|
+};
|
|
|
+const clickCancel = (status) => {
|
|
|
+ openDeliveryNote.value = false;
|
|
|
+ if (status) {
|
|
|
+ getList();
|
|
|
+ }
|
|
|
+};
|
|
|
+const clickHangUp = (row) => {
|
|
|
+ ElMessageBox.confirm("你是否确认此操作", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ proxy.post("/orderInfo/suspendOrder", { id: row.id }).then(() => {
|
|
|
+ ElMessage({ message: "操作成功", type: "success" });
|
|
|
+ getList();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+};
|
|
|
+const clickCancelHangUp = (row) => {
|
|
|
+ ElMessageBox.confirm("你是否确认此操作", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ proxy.post("/orderInfo/cancelSuspendOrder", { id: row.id }).then(() => {
|
|
|
+ ElMessage({ message: "操作成功", type: "success" });
|
|
|
+ getList();
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|