update:
1. update category and pricelist
This commit is contained in:
@@ -53,18 +53,6 @@ export default {
|
|||||||
min: 1,
|
min: 1,
|
||||||
span: 24
|
span: 24
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: 'Shape',
|
|
||||||
prop: 'shape',
|
|
||||||
type: 'radio',
|
|
||||||
dicUrl: '/blade-system/dict-biz/dictionary?code=shape_type',
|
|
||||||
props: {
|
|
||||||
label: 'dictValue',
|
|
||||||
value: 'dictKey'
|
|
||||||
},
|
|
||||||
dataType: 'number',
|
|
||||||
span: 24
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: 'Image',
|
label: 'Image',
|
||||||
prop: 'imageUrl',
|
prop: 'imageUrl',
|
||||||
|
|||||||
@@ -6,10 +6,9 @@ export default {
|
|||||||
border: true,
|
border: true,
|
||||||
index: true,
|
index: true,
|
||||||
viewBtn: false,
|
viewBtn: false,
|
||||||
addBtn: false,
|
addBtn: true,
|
||||||
editBtn: true,
|
editBtn: true,
|
||||||
delBtn: false,
|
delBtn: true,
|
||||||
cellBtn: true,
|
|
||||||
selection: false,
|
selection: false,
|
||||||
dialogClickModal: false,
|
dialogClickModal: false,
|
||||||
// menuWidth: 150,
|
// menuWidth: 150,
|
||||||
@@ -46,6 +45,9 @@ export default {
|
|||||||
prop: 'categoryName',
|
prop: 'categoryName',
|
||||||
type: 'input',
|
type: 'input',
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
hide: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Type',
|
label: 'Type',
|
||||||
@@ -57,6 +59,9 @@ export default {
|
|||||||
value: 'dictKey'
|
value: 'dictKey'
|
||||||
},
|
},
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
hide: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Shape',
|
label: 'Shape',
|
||||||
@@ -69,7 +74,7 @@ export default {
|
|||||||
},
|
},
|
||||||
dataType: 'number',
|
dataType: 'number',
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
search: true,
|
search: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Material',
|
label: 'Material',
|
||||||
@@ -82,7 +87,7 @@ export default {
|
|||||||
},
|
},
|
||||||
dataType: 'number',
|
dataType: 'number',
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
search: true,
|
search: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Size',
|
label: 'Size',
|
||||||
@@ -95,7 +100,26 @@ export default {
|
|||||||
},
|
},
|
||||||
dataType: 'number',
|
dataType: 'number',
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
search: true,
|
search: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'SizeDesc',
|
||||||
|
prop: 'sizeDescription',
|
||||||
|
type: 'input',
|
||||||
|
overHidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Style',
|
||||||
|
prop: 'style',
|
||||||
|
type: 'radio',
|
||||||
|
dicUrl: '/blade-system/dict-biz/dictionary?code=style_type',
|
||||||
|
props: {
|
||||||
|
label: 'dictValue',
|
||||||
|
value: 'dictKey'
|
||||||
|
},
|
||||||
|
dataType: 'number',
|
||||||
|
overHidden: true,
|
||||||
|
search: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Currency',
|
label: 'Currency',
|
||||||
@@ -108,13 +132,116 @@ export default {
|
|||||||
},
|
},
|
||||||
dataType: 'number',
|
dataType: 'number',
|
||||||
overHidden: true,
|
overHidden: true,
|
||||||
hide: true,
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
|
hide: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Price',
|
label: 'OriginalPrice',
|
||||||
prop: 'price',
|
prop: 'originalPrice',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
cell: true,
|
precision: 2, // 小数位数
|
||||||
|
step: 0.01, // 步长
|
||||||
|
min: 0, // 最小值
|
||||||
|
max: 999999.99, // 最大值
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'ActualPrice',
|
||||||
|
prop: 'actualPrice',
|
||||||
|
type: 'number',
|
||||||
|
precision: 2, // 小数位数
|
||||||
|
step: 0.01, // 步长
|
||||||
|
min: 0, // 最小值
|
||||||
|
max: 999999.99, // 最大值
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'BackPrint',
|
||||||
|
prop: 'backPrint',
|
||||||
|
type: 'radio',
|
||||||
|
dicUrl: '/blade-system/dict-biz/dictionary?code=price_status',
|
||||||
|
props: {
|
||||||
|
label: 'dictValue',
|
||||||
|
value: 'dictKey'
|
||||||
|
},
|
||||||
|
dataType: 'number',
|
||||||
|
overHidden: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'BackPrintPrice',
|
||||||
|
prop: 'backPrintPrice',
|
||||||
|
type: 'number',
|
||||||
|
precision: 2, // 小数位数
|
||||||
|
step: 0.01, // 步长
|
||||||
|
min: 0, // 最小值
|
||||||
|
max: 999999.99, // 最大值
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'SizeUp',
|
||||||
|
prop: 'sizeUpgrade',
|
||||||
|
type: 'radio',
|
||||||
|
dicUrl: '/blade-system/dict-biz/dictionary?code=price_status',
|
||||||
|
props: {
|
||||||
|
label: 'dictValue',
|
||||||
|
value: 'dictKey'
|
||||||
|
},
|
||||||
|
dataType: 'number',
|
||||||
|
overHidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'SizeUpgradePrice',
|
||||||
|
prop: 'sizeUpgradePrice',
|
||||||
|
type: 'number',
|
||||||
|
precision: 2, // 小数位数
|
||||||
|
step: 0.01, // 步长
|
||||||
|
min: 0, // 最小值
|
||||||
|
max: 999999.99 // 最大值
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'MaterialUp',
|
||||||
|
prop: 'materialUpgrade',
|
||||||
|
type: 'radio',
|
||||||
|
dicUrl: '/blade-system/dict-biz/dictionary?code=price_status',
|
||||||
|
props: {
|
||||||
|
label: 'dictValue',
|
||||||
|
value: 'dictKey'
|
||||||
|
},
|
||||||
|
dataType: 'number',
|
||||||
|
overHidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'MaterialUpgradePrice',
|
||||||
|
prop: 'materialUpgradePrice',
|
||||||
|
type: 'number',
|
||||||
|
precision: 2, // 小数位数
|
||||||
|
step: 0.01, // 步长
|
||||||
|
min: 0, // 最小值
|
||||||
|
max: 999999.99 // 最大值
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Stand',
|
||||||
|
prop: 'stand',
|
||||||
|
type: 'radio',
|
||||||
|
dicUrl: '/blade-system/dict-biz/dictionary?code=price_status',
|
||||||
|
props: {
|
||||||
|
label: 'dictValue',
|
||||||
|
value: 'dictKey'
|
||||||
|
},
|
||||||
|
dataType: 'number',
|
||||||
|
overHidden: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'StandPrice',
|
||||||
|
prop: 'standPrice',
|
||||||
|
type: 'number',
|
||||||
|
precision: 2, // 小数位数
|
||||||
|
step: 0.01, // 步长
|
||||||
|
min: 0, // 最小值
|
||||||
|
max: 999999.99 // 最大值
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'DeptId',
|
label: 'DeptId',
|
||||||
@@ -173,14 +300,11 @@ export default {
|
|||||||
{
|
{
|
||||||
label: 'Status',
|
label: 'Status',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'select',
|
type: 'input',
|
||||||
dicUrl: '/blade-system/dict-biz/dictionary?code=price_status',
|
addDisplay: false,
|
||||||
props: {
|
editDisplay: false,
|
||||||
label: 'dictValue',
|
viewDisplay: false,
|
||||||
value: 'dictKey'
|
hide: true
|
||||||
},
|
|
||||||
dataType: 'number',
|
|
||||||
cell: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '是否已删除',
|
label: '是否已删除',
|
||||||
|
|||||||
@@ -27,7 +27,36 @@
|
|||||||
@click="handleDelete">Delete
|
@click="handleDelete">Delete
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
|
<template #menu="{row}">
|
||||||
|
<el-button type="text"
|
||||||
|
icon="el-icon-setting"
|
||||||
|
@click.stop="handleDataSub(row)">Setting
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
</avue-crud>
|
</avue-crud>
|
||||||
|
<el-drawer :title="`[${categoryName}] Setting`" v-model="subVisible" :direction="direction"
|
||||||
|
append-to-body
|
||||||
|
:before-close="handleSubClose" size="90%">
|
||||||
|
<basic-container>
|
||||||
|
<avue-crud :option="optionSub"
|
||||||
|
:data="dataSub"
|
||||||
|
v-model:page="pageSub"
|
||||||
|
v-model="formSub"
|
||||||
|
:table-loading="loadingSub"
|
||||||
|
ref="crudSub"
|
||||||
|
@row-update="rowUpdate"
|
||||||
|
@row-save="rowSave"
|
||||||
|
@row-del="rowDel"
|
||||||
|
:before-open="beforeOpenSub"
|
||||||
|
@search-change="searchChangeSub"
|
||||||
|
@search-reset="searchResetSub"
|
||||||
|
@selection-change="selectionChangeSub"
|
||||||
|
@current-change="currentChangeSub"
|
||||||
|
@size-change="sizeChangeSub"
|
||||||
|
@on-load="onLoadSub">
|
||||||
|
</avue-crud>
|
||||||
|
</basic-container>
|
||||||
|
</el-drawer>
|
||||||
</basic-container>
|
</basic-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -35,12 +64,9 @@
|
|||||||
import { getList, getDetail, add, update, remove } from '@/api/kiosk/category';
|
import { getList, getDetail, add, update, remove } from '@/api/kiosk/category';
|
||||||
import option from '@/option/kiosk/category';
|
import option from '@/option/kiosk/category';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { exportBlob } from '@/api/common';
|
|
||||||
import { getToken } from '@/utils/auth';
|
|
||||||
import { downloadXls } from '@/utils/util';
|
|
||||||
import { dateNow } from '@/utils/date';
|
|
||||||
import NProgress from 'nprogress';
|
|
||||||
import 'nprogress/nprogress.css';
|
import 'nprogress/nprogress.css';
|
||||||
|
import optionSub from '@/option/kiosk/priceList';
|
||||||
|
import { getSubList } from '@/api/kiosk/priceList';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -56,7 +82,24 @@ export default {
|
|||||||
},
|
},
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
option: option,
|
option: option,
|
||||||
data: []
|
data: [],
|
||||||
|
treeDeptId: -1,
|
||||||
|
treeParentId: 0,
|
||||||
|
subVisible: false,
|
||||||
|
direction: 'rtl',
|
||||||
|
categoryId: 0,
|
||||||
|
categoryName: '',
|
||||||
|
formSub: {},
|
||||||
|
querySub: {},
|
||||||
|
loadingSub: false,
|
||||||
|
dataSub: [],
|
||||||
|
selectionListSub: [],
|
||||||
|
pageSub: {
|
||||||
|
pageSize: 30,
|
||||||
|
currentPage: 1,
|
||||||
|
total: 0
|
||||||
|
},
|
||||||
|
optionSub: optionSub,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -206,7 +249,57 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.selectionClear();
|
this.selectionClear();
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
handleDataSub(row) {
|
||||||
|
this.subVisible = true;
|
||||||
|
this.categoryId = row.id;
|
||||||
|
this.categoryName = row.name;
|
||||||
|
this.onLoadSub(this.pageSub);
|
||||||
|
},
|
||||||
|
onLoadSub(page, params = {}) {
|
||||||
|
this.loadingSub = true;
|
||||||
|
|
||||||
|
let values = {
|
||||||
|
...params,
|
||||||
|
categoryId: this.categoryId,
|
||||||
|
deptId: this.treeDeptId,
|
||||||
|
};
|
||||||
|
getSubList(page.currentPage, page.pageSize, Object.assign(values, this.querySub)).then(res => {
|
||||||
|
this.dataSub = res.data.data;
|
||||||
|
this.selectionListSub = [];
|
||||||
|
this.loadingSub = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleSubClose(hide) {
|
||||||
|
this.querySub = {};
|
||||||
|
hide();
|
||||||
|
},
|
||||||
|
beforeOpenSub(done, type) {
|
||||||
|
if (['edit', 'view'].includes(type)) {
|
||||||
|
getDetail(this.formSub.id).then(res => {
|
||||||
|
this.formSub = res.data.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
searchChangeSub(params, done) {
|
||||||
|
this.querySub = params;
|
||||||
|
this.onLoadSub(this.pageSub, params);
|
||||||
|
done();
|
||||||
|
},
|
||||||
|
searchResetSub() {
|
||||||
|
this.querySub = {};
|
||||||
|
this.onLoadSub(this.pageSub);
|
||||||
|
},
|
||||||
|
selectionChangeSub(list) {
|
||||||
|
this.selectionListSub = list;
|
||||||
|
},
|
||||||
|
currentChangeSub(currentPage) {
|
||||||
|
this.pageSub.currentPage = currentPage;
|
||||||
|
},
|
||||||
|
sizeChangeSub(pageSize) {
|
||||||
|
this.pageSub.pageSize = pageSize;
|
||||||
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -55,8 +55,8 @@ export default ({
|
|||||||
proxy: {
|
proxy: {
|
||||||
'/api': {
|
'/api': {
|
||||||
// target: 'https://bmapi.tttzai.com/',
|
// target: 'https://bmapi.tttzai.com/',
|
||||||
// target: 'http://localhost',
|
target: 'http://localhost',
|
||||||
target: 'http://192.168.31.132:8080',
|
// target: 'http://192.168.31.132:8080',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: path => path.replace(/^\/api/, ''),
|
rewrite: path => path.replace(/^\/api/, ''),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user