feat: add order detail done function
This commit is contained in:
@@ -10,7 +10,7 @@ export default {
|
||||
addBtn: false,
|
||||
delBtn: false,
|
||||
editBtn: false,
|
||||
selection: true,
|
||||
selection: false,
|
||||
gridBtn: false,
|
||||
refreshBtn: false,
|
||||
columnBtn: false,
|
||||
@@ -58,7 +58,8 @@ export default {
|
||||
{
|
||||
label: 'Category',
|
||||
prop: 'categoryName',
|
||||
type: 'input'
|
||||
type: 'input',
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: 'Material',
|
||||
@@ -87,45 +88,15 @@ export default {
|
||||
res: 'data',
|
||||
url: 'link'
|
||||
},
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
label: 'Photos',
|
||||
prop: 'photos',
|
||||
type: 'upload',
|
||||
multiple: true,
|
||||
listType: 'picture-card',
|
||||
dataType: 'string',
|
||||
action: '/blade-resource/oss/endpoint/put-file',
|
||||
propsHttp: {
|
||||
res: 'data',
|
||||
url: 'link'
|
||||
},
|
||||
align: 'center',
|
||||
value: [],
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: 'Texts',
|
||||
prop: 'texts',
|
||||
type: 'input',
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: 'Stickers',
|
||||
prop: 'stickers',
|
||||
type: 'upload',
|
||||
multiple: true,
|
||||
listType: 'picture-card',
|
||||
dataType: 'string',
|
||||
action: '/blade-resource/oss/endpoint/put-file',
|
||||
propsHttp: {
|
||||
res: 'data',
|
||||
url: 'link'
|
||||
},
|
||||
overHidden: true,
|
||||
align: 'center',
|
||||
value: []
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
label: 'Amount',
|
||||
@@ -133,7 +104,7 @@ export default {
|
||||
type: 'number'
|
||||
},
|
||||
{
|
||||
label: '创建人',
|
||||
label: 'createUser',
|
||||
prop: 'createUser',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
@@ -142,7 +113,7 @@ export default {
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
label: '创建部门',
|
||||
label: 'createDept',
|
||||
prop: 'createDept',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
@@ -151,7 +122,7 @@ export default {
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
label: '创建时间',
|
||||
label: 'createTime',
|
||||
prop: 'createTime',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
@@ -160,7 +131,7 @@ export default {
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
label: '修改人',
|
||||
label: 'updateUser',
|
||||
prop: 'updateUser',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
@@ -169,7 +140,7 @@ export default {
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
label: '修改时间',
|
||||
label: 'updateTime',
|
||||
prop: 'updateTime',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
@@ -189,7 +160,7 @@ export default {
|
||||
dataType: 'number'
|
||||
},
|
||||
{
|
||||
label: '是否已删除',
|
||||
label: 'isDeleted',
|
||||
prop: 'isDeleted',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
|
||||
61
src/option/kiosk/photos.js
Normal file
61
src/option/kiosk/photos.js
Normal file
@@ -0,0 +1,61 @@
|
||||
export default {
|
||||
height: 'auto',
|
||||
calcHeight: 30,
|
||||
tip: false,
|
||||
border: true,
|
||||
viewBtn: false,
|
||||
addBtn: false,
|
||||
delBtn: false,
|
||||
editBtn: false,
|
||||
selection: false,
|
||||
gridBtn: false,
|
||||
refreshBtn: false,
|
||||
columnBtn: false,
|
||||
menu: false,
|
||||
column: [
|
||||
{
|
||||
label: 'OriginalPhoto',
|
||||
prop: 'photo',
|
||||
type: 'upload',
|
||||
listType: 'picture-img',
|
||||
dataType: 'string',
|
||||
action: '/blade-resource/oss/endpoint/put-file',
|
||||
propsHttp: {
|
||||
res: 'data',
|
||||
url: 'link'
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Snapshot',
|
||||
prop: 'snapshot',
|
||||
type: 'upload',
|
||||
listType: 'picture-img',
|
||||
dataType: 'string',
|
||||
action: '/blade-resource/oss/endpoint/put-file',
|
||||
propsHttp: {
|
||||
res: 'data',
|
||||
url: 'link'
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Stickers',
|
||||
prop: 'stickers',
|
||||
type: 'upload',
|
||||
multiple: true,
|
||||
listType: 'picture-card',
|
||||
dataType: 'string',
|
||||
action: '/blade-resource/oss/endpoint/put-file',
|
||||
propsHttp: {
|
||||
res: 'data',
|
||||
url: 'link'
|
||||
},
|
||||
value: [],
|
||||
overHidden: true
|
||||
},
|
||||
{
|
||||
label: 'Texts',
|
||||
prop: 'texts',
|
||||
slot: true,
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -40,32 +40,73 @@ export default {
|
||||
url: 'link'
|
||||
}
|
||||
},
|
||||
{
|
||||
label: "DomainUrl",
|
||||
prop: "domainUrl",
|
||||
type: "input",
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "Name",
|
||||
prop: "name",
|
||||
type: "input",
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true,
|
||||
},
|
||||
{
|
||||
label: "OriginalName",
|
||||
prop: "originalName",
|
||||
type: "input",
|
||||
label: 'CreateUser',
|
||||
prop: 'createUser',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true,
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
label: 'CreateDept',
|
||||
prop: 'createDept',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
label: 'CreateTime',
|
||||
prop: 'createTime',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
label: 'UpdateUser',
|
||||
prop: 'updateUser',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
label: 'UpdateTime',
|
||||
prop: 'updateTime',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
label: 'Status',
|
||||
prop: 'status',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
label: 'IsDeleted',
|
||||
prop: 'isDeleted',
|
||||
type: 'input',
|
||||
addDisplay: false,
|
||||
editDisplay: false,
|
||||
viewDisplay: false,
|
||||
hide: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</avue-crud>
|
||||
<el-drawer :title="`[${orderName}:${serialNumber}] Detail`" v-model="subVisible" :direction="direction"
|
||||
append-to-body
|
||||
:before-close="handleSubClose" size="80%">
|
||||
:before-close="handleSubClose" size="90%">
|
||||
<basic-container>
|
||||
<avue-crud :option="optionSub"
|
||||
:data="dataSub"
|
||||
@@ -60,6 +60,10 @@
|
||||
@size-change="sizeChangeSub"
|
||||
@on-load="onLoadSub">
|
||||
<template #menu="{ row }">
|
||||
<el-button type="text"
|
||||
icon="el-icon-folder"
|
||||
@click.stop="handleAssets(row)">Assets
|
||||
</el-button>
|
||||
<el-button type="text"
|
||||
icon="el-icon-download"
|
||||
v-if="row.status === 1"
|
||||
@@ -74,6 +78,23 @@
|
||||
</avue-crud>
|
||||
</basic-container>
|
||||
</el-drawer>
|
||||
<el-drawer :title="`[${category}] [${material}] [${size}] [${shape}]`" v-model="photosVisible" :direction="directionPhotos"
|
||||
append-to-body
|
||||
:before-close="handlePhotosClose" size="90%">
|
||||
<basic-container>
|
||||
<avue-crud :option="optionPhotos" :data="dataPhotos" >
|
||||
<template #texts="{ row }">
|
||||
<div v-if="row.texts?.length">
|
||||
<div v-for="(item, index) in row.texts" :key="index" style="display: flex; gap: 4px; flex-wrap: wrap;">
|
||||
<el-tag size="small">{{ item.font }}</el-tag>
|
||||
<el-tag size="small" type="warning">{{ item.content }}</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<span v-else></span>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</basic-container>
|
||||
</el-drawer>
|
||||
</basic-container>
|
||||
</template>
|
||||
|
||||
@@ -88,9 +109,11 @@ import {
|
||||
} from '@/api/kiosk/orderDetail';
|
||||
import option from '@/option/kiosk/order';
|
||||
import optionSub from '@/option/kiosk/orderDetail';
|
||||
import optionPhotos from '@/option/kiosk/photos';
|
||||
import { mapGetters } from 'vuex';
|
||||
import 'nprogress/nprogress.css';
|
||||
import { $Export } from '@smallwei/avue';
|
||||
import photos from '@/option/kiosk/photos';
|
||||
|
||||
|
||||
export default {
|
||||
@@ -109,10 +132,16 @@ export default {
|
||||
},
|
||||
option: option,
|
||||
subVisible: false,
|
||||
photosVisible: false,
|
||||
direction: 'ttb',
|
||||
directionPhotos: 'rtl',
|
||||
orderId: 0,
|
||||
serialNumber: '',
|
||||
orderName: 'Order',
|
||||
category: '',
|
||||
material: '',
|
||||
size: '',
|
||||
shape:'',
|
||||
formSub: {},
|
||||
querySub: {},
|
||||
loadingSub: true,
|
||||
@@ -123,10 +152,15 @@ export default {
|
||||
currentPage: 1,
|
||||
total: 0
|
||||
},
|
||||
optionSub: optionSub
|
||||
optionSub: optionSub,
|
||||
optionPhotos: optionPhotos,
|
||||
dataPhotos: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
photos() {
|
||||
return photos;
|
||||
},
|
||||
...mapGetters(['permission']),
|
||||
permissionList() {
|
||||
return {
|
||||
@@ -272,6 +306,9 @@ export default {
|
||||
handleSubClose(hide) {
|
||||
hide();
|
||||
},
|
||||
handlePhotosClose(hide){
|
||||
hide();
|
||||
},
|
||||
handleAccept(row) {
|
||||
this.$confirm('Confirmation for Payment?', {
|
||||
confirmButtonText: 'Confirm',
|
||||
@@ -306,23 +343,57 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
handleAssets(row) {
|
||||
this.photosVisible = true;
|
||||
this.dataPhotos = row.photos;
|
||||
this.category = row.categoryName;
|
||||
this.size = row.size;
|
||||
this.material = row.material;
|
||||
this.shape = row.shape;
|
||||
},
|
||||
handleDownload(row) {
|
||||
const urlData = (row.photos || []).map(url => ({ url }));
|
||||
const u = (row.stickers || []).map(url => ({ url }));
|
||||
const t = (row.texts || []).map(t => ({
|
||||
url: `[font:${t.font || 'normal'}] [size:${t.size || 12}] [content:${t.content || ''}]`
|
||||
}));
|
||||
// const urlData = (row.photos || []).map(url => ({ url }));
|
||||
// const u = (row.stickers || []).map(url => ({ url }));
|
||||
// const t = (row.texts || []).map(t => ({
|
||||
// url: `[font:${t.font || 'normal'}] [size:${t.size || 12}] [content:${t.content || ''}]`
|
||||
// }));
|
||||
//
|
||||
// const r = [
|
||||
// ...urlData,
|
||||
// { url: '======Stickers=====' },
|
||||
// ...u,
|
||||
// { url: '======Texts=======' },
|
||||
// ...t
|
||||
// ];
|
||||
// $Export.excel({
|
||||
// columns: [{ label: '======Photos======', prop: 'url' }],
|
||||
// data: r
|
||||
// });
|
||||
const data = (row.photos || []).map(photoObj => {
|
||||
// 提取 texts 内容(拼接为字符串)
|
||||
const textsStr = (photoObj.texts || [])
|
||||
.map(t => `[font:${t.font || 'normal'}] [content:${t.content || ''}]`)
|
||||
.join('; ');
|
||||
|
||||
// 提取 stickers(拼接为字符串)
|
||||
const stickersStr = (photoObj.stickers || []).join('; ');
|
||||
|
||||
return {
|
||||
photo: photoObj.photo || '',
|
||||
snapshot: photoObj.snapshot || '',
|
||||
texts: textsStr,
|
||||
stickers: stickersStr
|
||||
};
|
||||
});
|
||||
|
||||
const r = [
|
||||
...urlData,
|
||||
{ url: '======Stickers=====' },
|
||||
...u,
|
||||
{ url: '======Texts=======' },
|
||||
...t
|
||||
];
|
||||
$Export.excel({
|
||||
columns: [{ label: '======Photos======', prop: 'url' }],
|
||||
data: r
|
||||
columns: [
|
||||
{ label: 'Photo', prop: 'photo' },
|
||||
{ label: 'Snapshot', prop: 'snapshot' },
|
||||
{ label: 'Texts', prop: 'texts' },
|
||||
{ label: 'Stickers', prop: 'stickers' }
|
||||
],
|
||||
data: data
|
||||
});
|
||||
},
|
||||
rowSaveSub(row, loading, done) {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
v-if="permission.menu_delete"
|
||||
plain
|
||||
@click="handleDelete"
|
||||
>删 除
|
||||
>Delete
|
||||
</el-button>
|
||||
</template>
|
||||
<template #menu="scope">
|
||||
@@ -38,7 +38,7 @@
|
||||
icon="el-icon-circle-plus"
|
||||
@click.stop="handleAdd(scope.row, scope.index)"
|
||||
v-if="userInfo.authority.includes('admin') && scope.row.category === 1"
|
||||
>新增子项
|
||||
>Add Sub
|
||||
</el-button>
|
||||
</template>
|
||||
<template #name="{ row }">
|
||||
|
||||
Reference in New Issue
Block a user