feat: add order detail done function
This commit is contained in:
@@ -10,7 +10,7 @@ export default {
|
|||||||
addBtn: false,
|
addBtn: false,
|
||||||
delBtn: false,
|
delBtn: false,
|
||||||
editBtn: false,
|
editBtn: false,
|
||||||
selection: true,
|
selection: false,
|
||||||
gridBtn: false,
|
gridBtn: false,
|
||||||
refreshBtn: false,
|
refreshBtn: false,
|
||||||
columnBtn: false,
|
columnBtn: false,
|
||||||
@@ -58,7 +58,8 @@ export default {
|
|||||||
{
|
{
|
||||||
label: 'Category',
|
label: 'Category',
|
||||||
prop: 'categoryName',
|
prop: 'categoryName',
|
||||||
type: 'input'
|
type: 'input',
|
||||||
|
overHidden: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Material',
|
label: 'Material',
|
||||||
@@ -87,45 +88,15 @@ export default {
|
|||||||
res: 'data',
|
res: 'data',
|
||||||
url: 'link'
|
url: 'link'
|
||||||
},
|
},
|
||||||
align: 'center',
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Photos',
|
label: 'Photos',
|
||||||
prop: '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',
|
type: 'input',
|
||||||
hide: true,
|
addDisplay: false,
|
||||||
},
|
editDisplay: false,
|
||||||
{
|
viewDisplay: false,
|
||||||
label: 'Stickers',
|
hide: true
|
||||||
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: []
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Amount',
|
label: 'Amount',
|
||||||
@@ -133,7 +104,7 @@ export default {
|
|||||||
type: 'number'
|
type: 'number'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '创建人',
|
label: 'createUser',
|
||||||
prop: 'createUser',
|
prop: 'createUser',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
@@ -142,7 +113,7 @@ export default {
|
|||||||
hide: true
|
hide: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '创建部门',
|
label: 'createDept',
|
||||||
prop: 'createDept',
|
prop: 'createDept',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
@@ -151,7 +122,7 @@ export default {
|
|||||||
hide: true
|
hide: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '创建时间',
|
label: 'createTime',
|
||||||
prop: 'createTime',
|
prop: 'createTime',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
@@ -160,7 +131,7 @@ export default {
|
|||||||
hide: true
|
hide: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '修改人',
|
label: 'updateUser',
|
||||||
prop: 'updateUser',
|
prop: 'updateUser',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
@@ -169,7 +140,7 @@ export default {
|
|||||||
hide: true
|
hide: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '修改时间',
|
label: 'updateTime',
|
||||||
prop: 'updateTime',
|
prop: 'updateTime',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
@@ -189,7 +160,7 @@ export default {
|
|||||||
dataType: 'number'
|
dataType: 'number'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '是否已删除',
|
label: 'isDeleted',
|
||||||
prop: 'isDeleted',
|
prop: 'isDeleted',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
addDisplay: false,
|
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'
|
url: 'link'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "DomainUrl",
|
|
||||||
prop: "domainUrl",
|
|
||||||
type: "input",
|
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
hide: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: "Name",
|
label: "Name",
|
||||||
prop: "name",
|
prop: "name",
|
||||||
type: "input",
|
type: "input",
|
||||||
addDisplay: false,
|
|
||||||
editDisplay: false,
|
|
||||||
viewDisplay: false,
|
|
||||||
hide: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "OriginalName",
|
label: 'CreateUser',
|
||||||
prop: "originalName",
|
prop: 'createUser',
|
||||||
type: "input",
|
type: 'input',
|
||||||
addDisplay: false,
|
addDisplay: false,
|
||||||
editDisplay: false,
|
editDisplay: false,
|
||||||
viewDisplay: 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>
|
</avue-crud>
|
||||||
<el-drawer :title="`[${orderName}:${serialNumber}] Detail`" v-model="subVisible" :direction="direction"
|
<el-drawer :title="`[${orderName}:${serialNumber}] Detail`" v-model="subVisible" :direction="direction"
|
||||||
append-to-body
|
append-to-body
|
||||||
:before-close="handleSubClose" size="80%">
|
:before-close="handleSubClose" size="90%">
|
||||||
<basic-container>
|
<basic-container>
|
||||||
<avue-crud :option="optionSub"
|
<avue-crud :option="optionSub"
|
||||||
:data="dataSub"
|
:data="dataSub"
|
||||||
@@ -60,6 +60,10 @@
|
|||||||
@size-change="sizeChangeSub"
|
@size-change="sizeChangeSub"
|
||||||
@on-load="onLoadSub">
|
@on-load="onLoadSub">
|
||||||
<template #menu="{ row }">
|
<template #menu="{ row }">
|
||||||
|
<el-button type="text"
|
||||||
|
icon="el-icon-folder"
|
||||||
|
@click.stop="handleAssets(row)">Assets
|
||||||
|
</el-button>
|
||||||
<el-button type="text"
|
<el-button type="text"
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
v-if="row.status === 1"
|
v-if="row.status === 1"
|
||||||
@@ -74,6 +78,23 @@
|
|||||||
</avue-crud>
|
</avue-crud>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</el-drawer>
|
</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>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -88,9 +109,11 @@ import {
|
|||||||
} from '@/api/kiosk/orderDetail';
|
} from '@/api/kiosk/orderDetail';
|
||||||
import option from '@/option/kiosk/order';
|
import option from '@/option/kiosk/order';
|
||||||
import optionSub from '@/option/kiosk/orderDetail';
|
import optionSub from '@/option/kiosk/orderDetail';
|
||||||
|
import optionPhotos from '@/option/kiosk/photos';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
import { $Export } from '@smallwei/avue';
|
import { $Export } from '@smallwei/avue';
|
||||||
|
import photos from '@/option/kiosk/photos';
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -109,10 +132,16 @@ export default {
|
|||||||
},
|
},
|
||||||
option: option,
|
option: option,
|
||||||
subVisible: false,
|
subVisible: false,
|
||||||
|
photosVisible: false,
|
||||||
direction: 'ttb',
|
direction: 'ttb',
|
||||||
|
directionPhotos: 'rtl',
|
||||||
orderId: 0,
|
orderId: 0,
|
||||||
serialNumber: '',
|
serialNumber: '',
|
||||||
orderName: 'Order',
|
orderName: 'Order',
|
||||||
|
category: '',
|
||||||
|
material: '',
|
||||||
|
size: '',
|
||||||
|
shape:'',
|
||||||
formSub: {},
|
formSub: {},
|
||||||
querySub: {},
|
querySub: {},
|
||||||
loadingSub: true,
|
loadingSub: true,
|
||||||
@@ -123,10 +152,15 @@ export default {
|
|||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
total: 0
|
total: 0
|
||||||
},
|
},
|
||||||
optionSub: optionSub
|
optionSub: optionSub,
|
||||||
|
optionPhotos: optionPhotos,
|
||||||
|
dataPhotos: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
photos() {
|
||||||
|
return photos;
|
||||||
|
},
|
||||||
...mapGetters(['permission']),
|
...mapGetters(['permission']),
|
||||||
permissionList() {
|
permissionList() {
|
||||||
return {
|
return {
|
||||||
@@ -272,6 +306,9 @@ export default {
|
|||||||
handleSubClose(hide) {
|
handleSubClose(hide) {
|
||||||
hide();
|
hide();
|
||||||
},
|
},
|
||||||
|
handlePhotosClose(hide){
|
||||||
|
hide();
|
||||||
|
},
|
||||||
handleAccept(row) {
|
handleAccept(row) {
|
||||||
this.$confirm('Confirmation for Payment?', {
|
this.$confirm('Confirmation for Payment?', {
|
||||||
confirmButtonText: 'Confirm',
|
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) {
|
handleDownload(row) {
|
||||||
const urlData = (row.photos || []).map(url => ({ url }));
|
// const urlData = (row.photos || []).map(url => ({ url }));
|
||||||
const u = (row.stickers || []).map(url => ({ url }));
|
// const u = (row.stickers || []).map(url => ({ url }));
|
||||||
const t = (row.texts || []).map(t => ({
|
// const t = (row.texts || []).map(t => ({
|
||||||
url: `[font:${t.font || 'normal'}] [size:${t.size || 12}] [content:${t.content || ''}]`
|
// 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({
|
$Export.excel({
|
||||||
columns: [{ label: '======Photos======', prop: 'url' }],
|
columns: [
|
||||||
data: r
|
{ label: 'Photo', prop: 'photo' },
|
||||||
|
{ label: 'Snapshot', prop: 'snapshot' },
|
||||||
|
{ label: 'Texts', prop: 'texts' },
|
||||||
|
{ label: 'Stickers', prop: 'stickers' }
|
||||||
|
],
|
||||||
|
data: data
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
rowSaveSub(row, loading, done) {
|
rowSaveSub(row, loading, done) {
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
v-if="permission.menu_delete"
|
v-if="permission.menu_delete"
|
||||||
plain
|
plain
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
>删 除
|
>Delete
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #menu="scope">
|
<template #menu="scope">
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
icon="el-icon-circle-plus"
|
icon="el-icon-circle-plus"
|
||||||
@click.stop="handleAdd(scope.row, scope.index)"
|
@click.stop="handleAdd(scope.row, scope.index)"
|
||||||
v-if="userInfo.authority.includes('admin') && scope.row.category === 1"
|
v-if="userInfo.authority.includes('admin') && scope.row.category === 1"
|
||||||
>新增子项
|
>Add Sub
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #name="{ row }">
|
<template #name="{ row }">
|
||||||
|
|||||||
Reference in New Issue
Block a user