修复:智能判断订单商品orderGoods和订单信息orderInfo的显示问题
This commit is contained in:
@@ -53,8 +53,8 @@ export async function addCmsDomain(data: CmsDomain) {
|
|||||||
* 修改网站域名记录表
|
* 修改网站域名记录表
|
||||||
*/
|
*/
|
||||||
export async function updateCmsDomain(data: CmsDomain) {
|
export async function updateCmsDomain(data: CmsDomain) {
|
||||||
const res = await request.put<ApiResult<unknown>>(
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
SERVER_API_URL + '/cms/cms-domain',
|
SERVER_API_URL + '/cms/cms-domain/domain',
|
||||||
data
|
data
|
||||||
);
|
);
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import type { PageParam } from '@/api';
|
import type { PageParam } from '@/api';
|
||||||
|
import { ShopOrderGoods } from '@/api/shop/shopOrderGoods/model';
|
||||||
|
import { OrderInfo } from '@/api/shop/orderInfo/model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -23,6 +25,10 @@ export interface Order {
|
|||||||
// 商户编号
|
// 商户编号
|
||||||
merchantCode?: string;
|
merchantCode?: string;
|
||||||
couponId?: number;
|
couponId?: number;
|
||||||
|
cardId?: number;
|
||||||
|
confirmId?: number;
|
||||||
|
icCard?: string;
|
||||||
|
userId?: number;
|
||||||
// 用户id
|
// 用户id
|
||||||
uid?: number;
|
uid?: number;
|
||||||
// 使用的优惠券id
|
// 使用的优惠券id
|
||||||
@@ -37,6 +43,7 @@ export interface Order {
|
|||||||
code?: string;
|
code?: string;
|
||||||
// 真实姓名
|
// 真实姓名
|
||||||
name?: string;
|
name?: string;
|
||||||
|
realName?: string;
|
||||||
// 手机号码
|
// 手机号码
|
||||||
phone?: string;
|
phone?: string;
|
||||||
// 订单总额
|
// 订单总额
|
||||||
@@ -89,6 +96,8 @@ export interface Order {
|
|||||||
expirationTime?: string;
|
expirationTime?: string;
|
||||||
// 对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单
|
// 对账情况:1=已对账;2=未对账;3=已对账,金额对不上;4=未查询到该订单
|
||||||
checkBill?: number;
|
checkBill?: number;
|
||||||
|
isSettled?: boolean;
|
||||||
|
version?: string;
|
||||||
// 备注
|
// 备注
|
||||||
comments?: string;
|
comments?: string;
|
||||||
// 排序号
|
// 排序号
|
||||||
@@ -97,6 +106,8 @@ export interface Order {
|
|||||||
deleted?: number;
|
deleted?: number;
|
||||||
// 租户id
|
// 租户id
|
||||||
tenantId?: number;
|
tenantId?: number;
|
||||||
|
orderInfo?: OrderInfo[];
|
||||||
|
orderGoods?: ShopOrderGoods[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
106
src/api/shop/orderGoods/index.ts
Normal file
106
src/api/shop/orderGoods/index.ts
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import type { ApiResult, PageResult } from '@/api';
|
||||||
|
import type { OrderGoods, OrderGoodsParam } from './model';
|
||||||
|
import { MODULES_API_URL } from '@/config/setting';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
export async function pageOrderGoods(params: OrderGoodsParam) {
|
||||||
|
const res = await request.get<ApiResult<PageResult<OrderGoods>>>(
|
||||||
|
MODULES_API_URL + '/shop/order-goods/page',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
export async function listOrderGoods(params?: OrderGoodsParam) {
|
||||||
|
const res = await request.get<ApiResult<OrderGoods[]>>(
|
||||||
|
MODULES_API_URL + '/shop/order-goods',
|
||||||
|
{
|
||||||
|
params
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*/
|
||||||
|
export async function addOrderGoods(data: OrderGoods) {
|
||||||
|
const res = await request.post<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/order-goods',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
export async function updateOrderGoods(data: OrderGoods) {
|
||||||
|
const res = await request.put<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/order-goods',
|
||||||
|
data
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
export async function removeOrderGoods(id?: number) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/order-goods/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*/
|
||||||
|
export async function removeBatchOrderGoods(data: (number | undefined)[]) {
|
||||||
|
const res = await request.delete<ApiResult<unknown>>(
|
||||||
|
MODULES_API_URL + '/shop/order-goods/batch',
|
||||||
|
{
|
||||||
|
data
|
||||||
|
}
|
||||||
|
);
|
||||||
|
if (res.data.code === 0) {
|
||||||
|
return res.data.message;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
*/
|
||||||
|
export async function getOrderGoods(id: number) {
|
||||||
|
const res = await request.get<ApiResult<OrderGoods>>(
|
||||||
|
MODULES_API_URL + '/shop/order-goods/' + id
|
||||||
|
);
|
||||||
|
if (res.data.code === 0 && res.data.data) {
|
||||||
|
return res.data.data;
|
||||||
|
}
|
||||||
|
return Promise.reject(new Error(res.data.message));
|
||||||
|
}
|
||||||
58
src/api/shop/orderGoods/model/index.ts
Normal file
58
src/api/shop/orderGoods/model/index.ts
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
import type { PageParam } from '@/api';
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export interface OrderGoods {
|
||||||
|
//
|
||||||
|
id?: number;
|
||||||
|
// 关联订单表id
|
||||||
|
oid?: number;
|
||||||
|
// 关联场馆id
|
||||||
|
sid?: number;
|
||||||
|
// 关联场地id
|
||||||
|
fid?: number;
|
||||||
|
// 场馆
|
||||||
|
siteName?: string;
|
||||||
|
// 场地
|
||||||
|
fieldName?: string;
|
||||||
|
// 预约时间段
|
||||||
|
dateTime?: string;
|
||||||
|
// 单价
|
||||||
|
price?: string;
|
||||||
|
// 儿童价
|
||||||
|
childrenPrice?: string;
|
||||||
|
// 成人人数
|
||||||
|
adultNum?: string;
|
||||||
|
// 儿童人数
|
||||||
|
childrenNum?: string;
|
||||||
|
// 1已付款,2未付款,3无需付款或占用状态
|
||||||
|
payStatus?: string;
|
||||||
|
// 是否免费:1免费、2收费
|
||||||
|
isFree?: string;
|
||||||
|
// 是否支持儿童票:1支持,2不支持
|
||||||
|
isChildren?: string;
|
||||||
|
// 预订类型:1全场,2半场
|
||||||
|
type?: string;
|
||||||
|
// 组合数据:日期+时间段+场馆id+场地id
|
||||||
|
mergeData?: string;
|
||||||
|
// 开场时间
|
||||||
|
startTime?: number;
|
||||||
|
// 下单时间
|
||||||
|
orderTime?: number;
|
||||||
|
// 毫秒时间戳
|
||||||
|
timeFlag?: string;
|
||||||
|
// 租户id
|
||||||
|
tenantId?: number;
|
||||||
|
// 创建时间
|
||||||
|
createTime?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索条件
|
||||||
|
*/
|
||||||
|
export interface OrderGoodsParam extends PageParam {
|
||||||
|
id?: number;
|
||||||
|
orderId?: number;
|
||||||
|
keywords?: string;
|
||||||
|
}
|
||||||
@@ -2,13 +2,7 @@
|
|||||||
<a-image-preview-group>
|
<a-image-preview-group>
|
||||||
<a-space>
|
<a-space>
|
||||||
<template v-for="(item, index) in data" :key="index">
|
<template v-for="(item, index) in data" :key="index">
|
||||||
<div class="image-upload-item" v-if="type == 'video'">
|
<div class="image-upload-item" v-if="isImage(item.url)">
|
||||||
{{ item.url }}
|
|
||||||
<a class="image-upload-close" @click="onDeleteItem(index)">
|
|
||||||
<CloseOutlined />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div class="image-upload-item" v-else>
|
|
||||||
<a-image
|
<a-image
|
||||||
:style="{
|
:style="{
|
||||||
border: '1px dashed var(--grey-7)',
|
border: '1px dashed var(--grey-7)',
|
||||||
@@ -21,6 +15,12 @@
|
|||||||
<CloseOutlined />
|
<CloseOutlined />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else class="image-upload-item">
|
||||||
|
<YoutubeOutlined />
|
||||||
|
<a class="image-upload-close" @click="onDeleteItem(index)">
|
||||||
|
<CloseOutlined />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<a-button
|
<a-button
|
||||||
@click="openEdit"
|
@click="openEdit"
|
||||||
@@ -44,10 +44,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { PlusOutlined, CloseOutlined } from '@ant-design/icons-vue';
|
import { PlusOutlined, CloseOutlined, YoutubeOutlined } from '@ant-design/icons-vue';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import SelectData from './components/select-data.vue';
|
import SelectData from './components/select-data.vue';
|
||||||
import { FileRecord } from '@/api/system/file/model';
|
import { FileRecord } from '@/api/system/file/model';
|
||||||
|
import { isImage } from "@/utils/common";
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|||||||
@@ -97,7 +97,6 @@ export function openSpmUrl(path: string, d?: any, id = 0): void {
|
|||||||
|
|
||||||
// 跳转页面
|
// 跳转页面
|
||||||
url.value = `${domain}${path}${spm.value}${token.value}`;
|
url.value = `${domain}${path}${spm.value}${token.value}`;
|
||||||
console.log(url.value, 'domain>>>>');
|
|
||||||
window.open(`${url.value}`);
|
window.open(`${url.value}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
import { ref, reactive, watch } from 'vue';
|
import { ref, reactive, watch } from 'vue';
|
||||||
import { Form, message } from 'ant-design-vue';
|
import { Form, message } from 'ant-design-vue';
|
||||||
import { assignObject, htmlToText, uuid } from 'ele-admin-pro';
|
import { assignObject, htmlToText, uuid } from 'ele-admin-pro';
|
||||||
import { addArticle, updateArticle } from "@/api/cms/article";
|
import { addArticle, getArticle, updateArticle } from "@/api/cms/article";
|
||||||
import { Article } from '@/api/cms/article/model';
|
import { Article } from '@/api/cms/article/model';
|
||||||
import { useThemeStore } from '@/store/modules/theme';
|
import { useThemeStore } from '@/store/modules/theme';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
@@ -137,6 +137,8 @@
|
|||||||
import { listArticleCategory } from "@/api/cms/category";
|
import { listArticleCategory } from "@/api/cms/category";
|
||||||
import { Navigation } from "@/api/cms/navigation/model";
|
import { Navigation } from "@/api/cms/navigation/model";
|
||||||
import SourceSelect from "@/views/cms/article/dictionary/source-select.vue";
|
import SourceSelect from "@/views/cms/article/dictionary/source-select.vue";
|
||||||
|
import { getCmsArticleContent } from "@/api/cms/cmsArticleContent";
|
||||||
|
import { isImage } from "@/utils/common";
|
||||||
|
|
||||||
// 是否是修改
|
// 是否是修改
|
||||||
const isUpdate = ref(false);
|
const isUpdate = ref(false);
|
||||||
@@ -175,7 +177,6 @@
|
|||||||
const active = ref('base');
|
const active = ref('base');
|
||||||
|
|
||||||
const spec = ref<SpecValue[]>([]);
|
const spec = ref<SpecValue[]>([]);
|
||||||
const showSpecForm = ref(false);
|
|
||||||
const files = ref<ItemType[]>([]);
|
const files = ref<ItemType[]>([]);
|
||||||
const category = ref<string[]>([]);
|
const category = ref<string[]>([]);
|
||||||
const takeaway = ref<ArticleCategory[]>([]);
|
const takeaway = ref<ArticleCategory[]>([]);
|
||||||
@@ -453,24 +454,45 @@
|
|||||||
category.value = [];
|
category.value = [];
|
||||||
files.value = [];
|
files.value = [];
|
||||||
if (props.data) {
|
if (props.data) {
|
||||||
assignObject(form, props.data);
|
// 文章详情
|
||||||
if (props.data.image) {
|
getArticle(Number(props.data?.articleId)).then(data => {
|
||||||
images.value.push({
|
|
||||||
uid: uuid(),
|
assignObject(form, data);
|
||||||
url: props.data.image,
|
|
||||||
status: 'done'
|
if (data.content){
|
||||||
});
|
content.value = data.content;
|
||||||
}
|
}
|
||||||
if(props.data.files){
|
|
||||||
const arr = JSON.parse(props.data.files)
|
if (data.image) {
|
||||||
arr.map((url:string) => {
|
images.value.push({
|
||||||
files.value.push({
|
|
||||||
uid: uuid(),
|
uid: uuid(),
|
||||||
url: url,
|
url: data.image,
|
||||||
status: 'done'
|
status: 'done'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if(data.files){
|
||||||
|
const arr = JSON.parse(data.files)
|
||||||
|
arr.map((url:string) => {
|
||||||
|
files.value.push({
|
||||||
|
uid: uuid(),
|
||||||
|
url: url,
|
||||||
|
status: 'done'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
}
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 外卖文章分类
|
||||||
|
listArticleCategory({merchantId: props.merchantId}).then(list => {
|
||||||
|
takeaway.value = list
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// assignObject(form, props.data);
|
||||||
|
|
||||||
|
|
||||||
// 文章分类
|
// 文章分类
|
||||||
// if(props.data.categoryParent){
|
// if(props.data.categoryParent){
|
||||||
@@ -479,13 +501,6 @@
|
|||||||
// if(props.data.categoryChildren){
|
// if(props.data.categoryChildren){
|
||||||
// category.value.push(props.data.categoryChildren);
|
// category.value.push(props.data.categoryChildren);
|
||||||
// }
|
// }
|
||||||
if (props.data.content){
|
|
||||||
content.value = props.data.content;
|
|
||||||
}
|
|
||||||
// 外卖文章分类
|
|
||||||
listArticleCategory({merchantId: props.merchantId}).then(list => {
|
|
||||||
takeaway.value = list
|
|
||||||
})
|
|
||||||
|
|
||||||
isUpdate.value = true;
|
isUpdate.value = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
record.articleId
|
record.articleId
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>{{ record.title }}</span
|
>{{ record.title }}</span
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'categoryName'">
|
<template v-if="column.key === 'categoryName'">
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
record.categoryId
|
record.categoryId
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>{{ record.categoryName }}</span
|
>{{ record.categoryName }}</span
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'type'">
|
<template v-if="column.key === 'type'">
|
||||||
@@ -57,7 +57,8 @@
|
|||||||
<a-tag v-if="record.type === 1">实物文章</a-tag>
|
<a-tag v-if="record.type === 1">实物文章</a-tag>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'image'">
|
<template v-if="column.key === 'image'">
|
||||||
<a-image :src="record.image" :width="80" />
|
<a-image v-if="isImage(record.image)" :src="record.image" :width="80" />
|
||||||
|
<span v-else class="text-gray-400">[文件]</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'salePrice'">
|
<template v-if="column.key === 'salePrice'">
|
||||||
¥{{ formatNumber(record.salePrice) }}
|
¥{{ formatNumber(record.salePrice) }}
|
||||||
@@ -67,7 +68,8 @@
|
|||||||
:color="record.status == 0 ? 'green' : 'red'"
|
:color="record.status == 0 ? 'green' : 'red'"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
@click="onUpdate(record)"
|
@click="onUpdate(record)"
|
||||||
>{{ record.statusText }}</a-tag
|
>{{ record.statusText }}
|
||||||
|
</a-tag
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'action'">
|
<template v-if="column.key === 'action'">
|
||||||
@@ -99,272 +101,272 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { createVNode, ref, watch } from 'vue';
|
import { createVNode, ref, watch } from "vue";
|
||||||
import { message, Modal } from 'ant-design-vue';
|
import { message, Modal } from "ant-design-vue";
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||||
import type { EleProTable } from 'ele-admin-pro';
|
import type { EleProTable } from "ele-admin-pro";
|
||||||
import type {
|
import type {
|
||||||
DatasourceFunction,
|
DatasourceFunction,
|
||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from "ele-admin-pro/es/ele-pro-table/types";
|
||||||
import Search from './components/search.vue';
|
import Search from "./components/search.vue";
|
||||||
import ArticleEdit from './components/articleEdit.vue';
|
import ArticleEdit from "./components/articleEdit.vue";
|
||||||
import {
|
import {
|
||||||
pageArticle,
|
pageArticle,
|
||||||
removeArticle,
|
removeArticle,
|
||||||
removeBatchArticle
|
removeBatchArticle
|
||||||
} from '@/api/cms/article';
|
} from "@/api/cms/article";
|
||||||
import type { Article, ArticleParam } from '@/api/cms/article/model';
|
import type { Article, ArticleParam } from "@/api/cms/article/model";
|
||||||
import { formatNumber } from 'ele-admin-pro/es';
|
import { formatNumber } from "ele-admin-pro/es";
|
||||||
import router from '@/router';
|
import router from "@/router";
|
||||||
import { toTreeData } from 'ele-admin-pro';
|
import { toTreeData } from "ele-admin-pro";
|
||||||
import { openSpmUrl } from '@/utils/common';
|
import { isImage, openSpmUrl } from "@/utils/common";
|
||||||
import { listNavigation } from '@/api/cms/navigation';
|
import { listNavigation } from "@/api/cms/navigation";
|
||||||
import { Navigation } from '@/api/cms/navigation/model';
|
import { Navigation } from "@/api/cms/navigation/model";
|
||||||
|
|
||||||
// 表格实例
|
// 表格实例
|
||||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||||
|
|
||||||
// 表格选中数据
|
// 表格选中数据
|
||||||
const selection = ref<Article[]>([]);
|
const selection = ref<Article[]>([]);
|
||||||
// 当前编辑数据
|
// 当前编辑数据
|
||||||
const current = ref<Article | null>(null);
|
const current = ref<Article | null>(null);
|
||||||
// 是否显示编辑弹窗
|
// 是否显示编辑弹窗
|
||||||
const showEdit = ref(false);
|
const showEdit = ref(false);
|
||||||
// 是否显示批量移动弹窗
|
// 是否显示批量移动弹窗
|
||||||
const showMove = ref(false);
|
const showMove = ref(false);
|
||||||
// 店铺ID
|
// 店铺ID
|
||||||
const merchantId = ref<number>();
|
const merchantId = ref<number>();
|
||||||
// 栏目ID
|
// 栏目ID
|
||||||
const categoryId = ref<number>();
|
const categoryId = ref<number>();
|
||||||
// 当前模型
|
// 当前模型
|
||||||
const model = ref<number>();
|
const model = ref<number>();
|
||||||
// 栏目数据
|
// 栏目数据
|
||||||
const navigationList = ref<Navigation[]>();
|
const navigationList = ref<Navigation[]>();
|
||||||
|
|
||||||
// 表格数据源
|
// 表格数据源
|
||||||
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
|
const datasource: DatasourceFunction = ({ page, limit, where, orders }) => {
|
||||||
if (categoryId.value) {
|
if (categoryId.value) {
|
||||||
where.categoryId = categoryId.value;
|
where.categoryId = categoryId.value;
|
||||||
}
|
|
||||||
return pageArticle({
|
|
||||||
...where,
|
|
||||||
...orders,
|
|
||||||
page,
|
|
||||||
limit
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// 表格列配置
|
|
||||||
const columns = ref<ColumnItem[]>([
|
|
||||||
{
|
|
||||||
title: 'ID',
|
|
||||||
dataIndex: 'articleId',
|
|
||||||
key: 'articleId',
|
|
||||||
align: 'center',
|
|
||||||
width: 90
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '封面图',
|
|
||||||
dataIndex: 'image',
|
|
||||||
key: 'image',
|
|
||||||
width: 120,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '文章标题',
|
|
||||||
dataIndex: 'title',
|
|
||||||
key: 'title'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '栏目名称',
|
|
||||||
dataIndex: 'categoryName',
|
|
||||||
key: 'categoryName',
|
|
||||||
width: 120,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '所属栏目',
|
|
||||||
dataIndex: 'categoryId',
|
|
||||||
key: 'categoryId',
|
|
||||||
align: 'center',
|
|
||||||
hideInTable: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '实际阅读量',
|
|
||||||
dataIndex: 'actualViews',
|
|
||||||
key: 'actualViews',
|
|
||||||
sorter: true,
|
|
||||||
width: 120,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '虚拟阅读量',
|
|
||||||
dataIndex: 'virtualViews',
|
|
||||||
key: 'virtualViews',
|
|
||||||
width: 120,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '推荐',
|
|
||||||
dataIndex: 'recommend',
|
|
||||||
key: 'recommend',
|
|
||||||
sorter: true,
|
|
||||||
align: 'center',
|
|
||||||
hideInTable: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '状态',
|
|
||||||
dataIndex: 'status',
|
|
||||||
key: 'status',
|
|
||||||
sorter: true,
|
|
||||||
width: 120,
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '排序号',
|
|
||||||
dataIndex: 'sortNumber',
|
|
||||||
key: 'sortNumber',
|
|
||||||
sorter: true,
|
|
||||||
align: 'center',
|
|
||||||
hideInTable: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '创建时间',
|
|
||||||
dataIndex: 'createTime',
|
|
||||||
key: 'createTime',
|
|
||||||
align: 'center',
|
|
||||||
width: 180,
|
|
||||||
sorter: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
key: 'action',
|
|
||||||
width: 180,
|
|
||||||
fixed: 'right',
|
|
||||||
align: 'center',
|
|
||||||
hideInSetting: true
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
|
|
||||||
/* 搜索 */
|
|
||||||
const reload = (where?: ArticleParam) => {
|
|
||||||
if (where?.categoryId) {
|
|
||||||
categoryId.value = where.categoryId;
|
|
||||||
}
|
|
||||||
selection.value = [];
|
|
||||||
tableRef?.value?.reload({ where: where });
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 打开编辑弹窗 */
|
|
||||||
const openEdit = (row?: Article) => {
|
|
||||||
current.value = row ?? null;
|
|
||||||
showEdit.value = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 打开批量移动弹窗 */
|
|
||||||
const openMove = () => {
|
|
||||||
showMove.value = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
const onUpdate = (row?: Article) => {
|
|
||||||
// const isShow = row?.isShow == 0 ? 1 : 0;
|
|
||||||
// updateArticle({ ...row, isShow }).then((msg) => {
|
|
||||||
// message.success(msg);
|
|
||||||
// reload();
|
|
||||||
// });
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 删除单个 */
|
|
||||||
const remove = (row: Article) => {
|
|
||||||
const hide = message.loading('请求中..', 0);
|
|
||||||
removeArticle(row.articleId)
|
|
||||||
.then((msg) => {
|
|
||||||
hide();
|
|
||||||
message.success(msg);
|
|
||||||
reload();
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
hide();
|
|
||||||
message.error(e.message);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 批量删除 */
|
|
||||||
const removeBatch = () => {
|
|
||||||
if (!selection.value.length) {
|
|
||||||
message.error('请至少选择一条数据');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Modal.confirm({
|
|
||||||
title: '提示',
|
|
||||||
content: '确定要删除选中的记录吗?',
|
|
||||||
icon: createVNode(ExclamationCircleOutlined),
|
|
||||||
maskClosable: true,
|
|
||||||
onOk: () => {
|
|
||||||
const hide = message.loading('请求中..', 0);
|
|
||||||
removeBatchArticle(selection.value.map((d) => d.articleId))
|
|
||||||
.then((msg) => {
|
|
||||||
hide();
|
|
||||||
message.success(msg);
|
|
||||||
reload();
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
hide();
|
|
||||||
message.error(e.message);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 自定义行属性 */
|
|
||||||
const customRow = (record: Article) => {
|
|
||||||
return {
|
|
||||||
// 行点击事件
|
|
||||||
onClick: () => {
|
|
||||||
// console.log(record);
|
|
||||||
},
|
|
||||||
// 行双击事件
|
|
||||||
onDblclick: () => {
|
|
||||||
openEdit(record);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
// 加载栏目数据
|
|
||||||
if (!navigationList.value) {
|
|
||||||
listNavigation({}).then((res) => {
|
|
||||||
navigationList.value = toTreeData({
|
|
||||||
data: res?.map((d) => {
|
|
||||||
d.value = d.navigationId;
|
|
||||||
d.label = d.title;
|
|
||||||
if (d.model != 'article') {
|
|
||||||
d.disabled = true;
|
|
||||||
}
|
|
||||||
return d;
|
|
||||||
}),
|
|
||||||
idField: 'navigationId',
|
|
||||||
parentIdField: 'parentId'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
return pageArticle({
|
||||||
|
...where,
|
||||||
|
...orders,
|
||||||
|
page,
|
||||||
|
limit
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
watch(
|
// 表格列配置
|
||||||
() => router.currentRoute.value.query,
|
const columns = ref<ColumnItem[]>([
|
||||||
(query) => {
|
{
|
||||||
console.log(query);
|
title: "ID",
|
||||||
if (query) {
|
dataIndex: "articleId",
|
||||||
categoryId.value = Number(query.id);
|
key: "articleId",
|
||||||
model.value = Number(query.type);
|
align: "center",
|
||||||
reload();
|
width: 90
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
title: "封面图",
|
||||||
|
dataIndex: "image",
|
||||||
|
key: "image",
|
||||||
|
width: 120,
|
||||||
|
align: "center"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "文章标题",
|
||||||
|
dataIndex: "title",
|
||||||
|
key: "title"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "栏目名称",
|
||||||
|
dataIndex: "categoryName",
|
||||||
|
key: "categoryName",
|
||||||
|
width: 120,
|
||||||
|
align: "center"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "所属栏目",
|
||||||
|
dataIndex: "categoryId",
|
||||||
|
key: "categoryId",
|
||||||
|
align: "center",
|
||||||
|
hideInTable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "实际阅读量",
|
||||||
|
dataIndex: "actualViews",
|
||||||
|
key: "actualViews",
|
||||||
|
sorter: true,
|
||||||
|
width: 120,
|
||||||
|
align: "center"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "虚拟阅读量",
|
||||||
|
dataIndex: "virtualViews",
|
||||||
|
key: "virtualViews",
|
||||||
|
width: 120,
|
||||||
|
align: "center"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "推荐",
|
||||||
|
dataIndex: "recommend",
|
||||||
|
key: "recommend",
|
||||||
|
sorter: true,
|
||||||
|
align: "center",
|
||||||
|
hideInTable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "状态",
|
||||||
|
dataIndex: "status",
|
||||||
|
key: "status",
|
||||||
|
sorter: true,
|
||||||
|
width: 120,
|
||||||
|
align: "center"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "排序号",
|
||||||
|
dataIndex: "sortNumber",
|
||||||
|
key: "sortNumber",
|
||||||
|
sorter: true,
|
||||||
|
align: "center",
|
||||||
|
hideInTable: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "创建时间",
|
||||||
|
dataIndex: "createTime",
|
||||||
|
key: "createTime",
|
||||||
|
align: "center",
|
||||||
|
width: 180,
|
||||||
|
sorter: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
key: "action",
|
||||||
|
width: 180,
|
||||||
|
fixed: "right",
|
||||||
|
align: "center",
|
||||||
|
hideInSetting: true
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
/* 搜索 */
|
||||||
|
const reload = (where?: ArticleParam) => {
|
||||||
|
if (where?.categoryId) {
|
||||||
|
categoryId.value = where.categoryId;
|
||||||
|
}
|
||||||
|
selection.value = [];
|
||||||
|
tableRef?.value?.reload({ where: where });
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 打开编辑弹窗 */
|
||||||
|
const openEdit = (row?: Article) => {
|
||||||
|
current.value = row ?? null;
|
||||||
|
showEdit.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 打开批量移动弹窗 */
|
||||||
|
const openMove = () => {
|
||||||
|
showMove.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const onUpdate = (row?: Article) => {
|
||||||
|
// const isShow = row?.isShow == 0 ? 1 : 0;
|
||||||
|
// updateArticle({ ...row, isShow }).then((msg) => {
|
||||||
|
// message.success(msg);
|
||||||
|
// reload();
|
||||||
|
// });
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 删除单个 */
|
||||||
|
const remove = (row: Article) => {
|
||||||
|
const hide = message.loading("请求中..", 0);
|
||||||
|
removeArticle(row.articleId)
|
||||||
|
.then((msg) => {
|
||||||
|
hide();
|
||||||
|
message.success(msg);
|
||||||
|
reload();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
hide();
|
||||||
|
message.error(e.message);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 批量删除 */
|
||||||
|
const removeBatch = () => {
|
||||||
|
if (!selection.value.length) {
|
||||||
|
message.error("请至少选择一条数据");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Modal.confirm({
|
||||||
|
title: "提示",
|
||||||
|
content: "确定要删除选中的记录吗?",
|
||||||
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
|
maskClosable: true,
|
||||||
|
onOk: () => {
|
||||||
|
const hide = message.loading("请求中..", 0);
|
||||||
|
removeBatchArticle(selection.value.map((d) => d.articleId))
|
||||||
|
.then((msg) => {
|
||||||
|
hide();
|
||||||
|
message.success(msg);
|
||||||
|
reload();
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
hide();
|
||||||
|
message.error(e.message);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/* 自定义行属性 */
|
||||||
|
const customRow = (record: Article) => {
|
||||||
|
return {
|
||||||
|
// 行点击事件
|
||||||
|
onClick: () => {
|
||||||
|
// console.log(record);
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
// 行双击事件
|
||||||
);
|
onDblclick: () => {
|
||||||
|
openEdit(record);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// 加载栏目数据
|
||||||
|
if (!navigationList.value) {
|
||||||
|
listNavigation({}).then((res) => {
|
||||||
|
navigationList.value = toTreeData({
|
||||||
|
data: res?.map((d) => {
|
||||||
|
d.value = d.navigationId;
|
||||||
|
d.label = d.title;
|
||||||
|
if (d.model != "article") {
|
||||||
|
d.disabled = true;
|
||||||
|
}
|
||||||
|
return d;
|
||||||
|
}),
|
||||||
|
idField: "navigationId",
|
||||||
|
parentIdField: "parentId"
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => router.currentRoute.value.query,
|
||||||
|
(query) => {
|
||||||
|
console.log(query);
|
||||||
|
if (query) {
|
||||||
|
categoryId.value = Number(query.id);
|
||||||
|
model.value = Number(query.type);
|
||||||
|
reload();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export default {
|
export default {
|
||||||
name: 'ArticleV2'
|
name: "ArticleV2"
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -53,15 +53,10 @@
|
|||||||
<span class="cursor-pointer" v-if="isDirectory(record)"></span>
|
<span class="cursor-pointer" v-if="isDirectory(record)"></span>
|
||||||
<span
|
<span
|
||||||
v-else
|
v-else
|
||||||
@click="openSpmUrl(record.path, record, record.navigationId)"
|
@click="openSpmUrl(`https://${record.tenantId}.wsdns.cn${record.path}`, record, record.navigationId)"
|
||||||
class="ele-text-placeholder cursor-pointer"
|
class="ele-text-placeholder cursor-pointer"
|
||||||
>{{ record.path }}</span
|
>{{ record.path }}</span
|
||||||
>
|
>
|
||||||
<!-- <span-->
|
|
||||||
<!-- class="ele-text-placeholder cursor-pointer"-->
|
|
||||||
<!-- @click="openSpmUrl(record.path, record, record.navigationId)"-->
|
|
||||||
<!-- >{{ record.path }}</span-->
|
|
||||||
<!-- >-->
|
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'component'">
|
<template v-if="column.key === 'component'">
|
||||||
<template v-if="!isDirectory(record)">
|
<template v-if="!isDirectory(record)">
|
||||||
|
|||||||
@@ -147,6 +147,8 @@
|
|||||||
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
|
import { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
|
||||||
import { FileRecord } from '@/api/system/file/model';
|
import { FileRecord } from '@/api/system/file/model';
|
||||||
import { checkExistence } from '@/api/cms/domain';
|
import { checkExistence } from '@/api/cms/domain';
|
||||||
|
import { updateCmsWebsite } from '@/api/cms/cmsWebsite';
|
||||||
|
import { updateCmsDomain } from '@/api/cms/cmsDomain';
|
||||||
|
|
||||||
// 是否是修改
|
// 是否是修改
|
||||||
const isUpdate = ref(false);
|
const isUpdate = ref(false);
|
||||||
@@ -318,12 +320,8 @@
|
|||||||
.validate()
|
.validate()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const formData = {
|
|
||||||
...form,
|
|
||||||
tenantId: localStorage.getItem('TenantId')
|
|
||||||
};
|
|
||||||
const saveOrUpdate = isUpdate.value ? updateWebsite : addWebsite;
|
const saveOrUpdate = isUpdate.value ? updateWebsite : addWebsite;
|
||||||
saveOrUpdate(formData)
|
saveOrUpdate(form)
|
||||||
.then((msg) => {
|
.then((msg) => {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
message.success(msg);
|
message.success(msg);
|
||||||
@@ -333,6 +331,10 @@
|
|||||||
} else {
|
} else {
|
||||||
localStorage.setItem('Domain', `${form.websiteCode}.wsdns.cn`);
|
localStorage.setItem('Domain', `${form.websiteCode}.wsdns.cn`);
|
||||||
}
|
}
|
||||||
|
updateCmsDomain({
|
||||||
|
websiteId: form.websiteId,
|
||||||
|
domain: `${form.websiteCode}.wsdns.cn`
|
||||||
|
});
|
||||||
emit('done');
|
emit('done');
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
:footer="null"
|
:footer="null"
|
||||||
@ok="save"
|
@ok="save"
|
||||||
>
|
>
|
||||||
<a-card class="order-card" :bordered="false">
|
<a-card class="order-card" :bordered="false" v-if="form">
|
||||||
<a-descriptions title="基本信息" :column="3">
|
<a-descriptions title="基本信息" :column="3">
|
||||||
<a-descriptions-item
|
<a-descriptions-item
|
||||||
label="订单号"
|
label="订单号"
|
||||||
@@ -139,10 +139,24 @@
|
|||||||
<a-card class="order-card" :bordered="false">
|
<a-card class="order-card" :bordered="false">
|
||||||
<a-spin :spinning="loading">
|
<a-spin :spinning="loading">
|
||||||
<a-table
|
<a-table
|
||||||
:data-source="form.orderInfoList"
|
v-if="form.orderInfo && form.orderInfo.length > 0"
|
||||||
|
:data-source="form.orderInfo"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
/>
|
/>
|
||||||
|
<a-table
|
||||||
|
v-if="form.orderGoods && form.orderGoods.length > 0"
|
||||||
|
:data-source="form.orderGoods"
|
||||||
|
:columns="columnsGoods"
|
||||||
|
:pagination="false"
|
||||||
|
>
|
||||||
|
<template #bodyCell="{ column, record }">
|
||||||
|
<template v-if="column.key === 'goodsName'">
|
||||||
|
<a-avatar :src="record.image" :size="40" />
|
||||||
|
<span style="margin-left: 8px">{{ record.goodsName }}</span>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</a-card>
|
</a-card>
|
||||||
</ele-modal>
|
</ele-modal>
|
||||||
@@ -150,7 +164,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, watch } from 'vue';
|
import { ref, reactive, watch } from 'vue';
|
||||||
import { Form, message } from "ant-design-vue";
|
import { Form } from 'ant-design-vue';
|
||||||
import { assignObject } from 'ele-admin-pro';
|
import { assignObject } from 'ele-admin-pro';
|
||||||
import { Order } from '@/api/shop/order/model';
|
import { Order } from '@/api/shop/order/model';
|
||||||
import { ColumnItem } from 'ele-admin-pro/es/ele-pro-table/types';
|
import { ColumnItem } from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
@@ -160,6 +174,8 @@
|
|||||||
CoffeeOutlined
|
CoffeeOutlined
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import { pageOrderInfo } from '@/api/shop/orderInfo';
|
import { pageOrderInfo } from '@/api/shop/orderInfo';
|
||||||
|
import { pageOrderGoods } from '@/api/shop/orderGoods';
|
||||||
|
import record from "@/views/cms/design/record/index.vue";
|
||||||
|
|
||||||
const useForm = Form.useForm;
|
const useForm = Form.useForm;
|
||||||
|
|
||||||
@@ -230,12 +246,12 @@
|
|||||||
payPrice: undefined,
|
payPrice: undefined,
|
||||||
price: undefined,
|
price: undefined,
|
||||||
money: undefined,
|
money: undefined,
|
||||||
|
payType: undefined,
|
||||||
refundMoney: undefined,
|
refundMoney: undefined,
|
||||||
coachPrice: undefined,
|
coachPrice: undefined,
|
||||||
coachId: undefined,
|
coachId: undefined,
|
||||||
payType: undefined,
|
|
||||||
payStatus: undefined,
|
|
||||||
orderStatus: undefined,
|
orderStatus: undefined,
|
||||||
|
payStatus: undefined,
|
||||||
couponType: undefined,
|
couponType: undefined,
|
||||||
couponDesc: undefined,
|
couponDesc: undefined,
|
||||||
qrcode: undefined,
|
qrcode: undefined,
|
||||||
@@ -250,14 +266,11 @@
|
|||||||
isSettled: undefined,
|
isSettled: undefined,
|
||||||
version: undefined,
|
version: undefined,
|
||||||
userId: undefined,
|
userId: undefined,
|
||||||
deleted: undefined,
|
|
||||||
tenantId: undefined,
|
|
||||||
updateTime: undefined,
|
updateTime: undefined,
|
||||||
createTime: undefined,
|
|
||||||
status: 0,
|
|
||||||
comments: '',
|
comments: '',
|
||||||
sortNumber: 100,
|
sortNumber: 100,
|
||||||
orderInfoList: []
|
orderGoods: [],
|
||||||
|
orderInfo: []
|
||||||
});
|
});
|
||||||
|
|
||||||
// 请求状态
|
// 请求状态
|
||||||
@@ -292,6 +305,28 @@
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const columnsGoods = ref<ColumnItem[]>([
|
||||||
|
{
|
||||||
|
title: '商品名称',
|
||||||
|
dataIndex: 'goodsName',
|
||||||
|
key: 'goodsName'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '商品规格',
|
||||||
|
dataIndex: 'spec'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '购买数量',
|
||||||
|
dataIndex: 'totalNum',
|
||||||
|
key: 'totalNum'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '金额',
|
||||||
|
dataIndex: 'price',
|
||||||
|
customRender: ({ text }) => '¥' + text
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
/* 制作步骤条 */
|
/* 制作步骤条 */
|
||||||
const loadSteps = (order) => {
|
const loadSteps = (order) => {
|
||||||
steps.value = [];
|
steps.value = [];
|
||||||
@@ -368,8 +403,12 @@
|
|||||||
if (props.data) {
|
if (props.data) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
assignObject(form, props.data);
|
assignObject(form, props.data);
|
||||||
|
pageOrderGoods({ orderId: form.orderId }).then((res) => {
|
||||||
|
form.orderGoods = res?.list;
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
pageOrderInfo({ oid: form.orderId }).then((res) => {
|
pageOrderInfo({ oid: form.orderId }).then((res) => {
|
||||||
form.orderInfoList = res?.list;
|
form.orderInfo = res?.list;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
loadSteps(props.data);
|
loadSteps(props.data);
|
||||||
|
|||||||
Reference in New Issue
Block a user