1. update category and pricelist
This commit is contained in:
2025-11-13 15:25:58 +08:00
parent b5249addfe
commit b87e50dff1
4 changed files with 244 additions and 39 deletions

View File

@@ -53,18 +53,6 @@ export default {
min: 1,
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',
prop: 'imageUrl',

View File

@@ -6,10 +6,9 @@ export default {
border: true,
index: true,
viewBtn: false,
addBtn: false,
addBtn: true,
editBtn: true,
delBtn: false,
cellBtn: true,
delBtn: true,
selection: false,
dialogClickModal: false,
// menuWidth: 150,
@@ -46,6 +45,9 @@ export default {
prop: 'categoryName',
type: 'input',
overHidden: true,
addDisplay: false,
editDisplay: false,
hide: true
},
{
label: 'Type',
@@ -57,6 +59,9 @@ export default {
value: 'dictKey'
},
overHidden: true,
addDisplay: false,
editDisplay: false,
hide: true
},
{
label: 'Shape',
@@ -69,7 +74,7 @@ export default {
},
dataType: 'number',
overHidden: true,
search: true,
search: true
},
{
label: 'Material',
@@ -82,7 +87,7 @@ export default {
},
dataType: 'number',
overHidden: true,
search: true,
search: true
},
{
label: 'Size',
@@ -95,7 +100,26 @@ export default {
},
dataType: 'number',
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',
@@ -108,13 +132,116 @@ export default {
},
dataType: 'number',
overHidden: true,
hide: true,
addDisplay: false,
editDisplay: false,
hide: true
},
{
label: 'Price',
prop: 'price',
label: 'OriginalPrice',
prop: 'originalPrice',
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',
@@ -173,14 +300,11 @@ export default {
{
label: 'Status',
prop: 'status',
type: 'select',
dicUrl: '/blade-system/dict-biz/dictionary?code=price_status',
props: {
label: 'dictValue',
value: 'dictKey'
},
dataType: 'number',
cell: true,
type: 'input',
addDisplay: false,
editDisplay: false,
viewDisplay: false,
hide: true
},
{
label: '是否已删除',

View File

@@ -27,7 +27,36 @@
@click="handleDelete">Delete
</el-button>
</template>
<template #menu="{row}">
<el-button type="text"
icon="el-icon-setting"
@click.stop="handleDataSub(row)">Setting
</el-button>
</template>
</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>
</template>
@@ -35,12 +64,9 @@
import { getList, getDetail, add, update, remove } from '@/api/kiosk/category';
import option from '@/option/kiosk/category';
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 optionSub from '@/option/kiosk/priceList';
import { getSubList } from '@/api/kiosk/priceList';
export default {
data() {
@@ -56,7 +82,24 @@ export default {
},
selectionList: [],
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: {
@@ -206,7 +249,57 @@ export default {
this.loading = false;
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>

View File

@@ -55,8 +55,8 @@ export default ({
proxy: {
'/api': {
// target: 'https://bmapi.tttzai.com/',
// target: 'http://localhost',
target: 'http://192.168.31.132:8080',
target: 'http://localhost',
// target: 'http://192.168.31.132:8080',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),
},