1. update category and pricelist
This commit is contained in:
2025-11-14 15:34:16 +08:00
parent 56bed875d6
commit cd5a9fe85b
3 changed files with 40 additions and 13 deletions

View File

@@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
export const getSubList = (current, size, params) => { export const getSubList = (current, size, params) => {
return request({ return request({
url: '/kiosk/price-list/detail-list', url: '/kiosk/price-list/page',
method: 'get', method: 'get',
params: { params: {
...params, ...params,

View File

@@ -66,7 +66,7 @@ export default {
{ {
label: 'Shape', label: 'Shape',
prop: 'shape', prop: 'shape',
type: 'radio', type: 'select',
dicUrl: '/blade-system/dict-biz/dictionary?code=shape_type', dicUrl: '/blade-system/dict-biz/dictionary?code=shape_type',
props: { props: {
label: 'dictValue', label: 'dictValue',
@@ -79,7 +79,7 @@ export default {
{ {
label: 'Material', label: 'Material',
prop: 'material', prop: 'material',
type: 'radio', type: 'select',
dicUrl: '/blade-system/dict-biz/dictionary?code=material_type', dicUrl: '/blade-system/dict-biz/dictionary?code=material_type',
props: { props: {
label: 'dictValue', label: 'dictValue',
@@ -92,7 +92,7 @@ export default {
{ {
label: 'Size', label: 'Size',
prop: 'csize', prop: 'csize',
type: 'radio', type: 'select',
dicUrl: '/blade-system/dict-biz/dictionary?code=size_type', dicUrl: '/blade-system/dict-biz/dictionary?code=size_type',
props: { props: {
label: 'dictValue', label: 'dictValue',
@@ -111,7 +111,7 @@ export default {
{ {
label: 'Style', label: 'Style',
prop: 'style', prop: 'style',
type: 'radio', type: 'select',
dicUrl: '/blade-system/dict-biz/dictionary?code=style_type', dicUrl: '/blade-system/dict-biz/dictionary?code=style_type',
props: { props: {
label: 'dictValue', label: 'dictValue',
@@ -137,7 +137,7 @@ export default {
hide: true hide: true
}, },
{ {
label: 'OriginalPrice', label: 'Original',
prop: 'originalPrice', prop: 'originalPrice',
type: 'number', type: 'number',
precision: 2, // 小数位数 precision: 2, // 小数位数
@@ -147,7 +147,7 @@ export default {
span: 24 span: 24
}, },
{ {
label: 'ActualPrice', label: 'Actual',
prop: 'actualPrice', prop: 'actualPrice',
type: 'number', type: 'number',
precision: 2, // 小数位数 precision: 2, // 小数位数
@@ -189,6 +189,18 @@ export default {
dataType: 'number', dataType: 'number',
overHidden: true overHidden: true
}, },
{
label: 'SizeUpTo',
prop: 'sizeUpgradeTo',
type: 'select',
dicUrl: '/blade-system/dict-biz/dictionary?code=size_type',
props: {
label: 'dictValue',
value: 'dictKey'
},
dataType: 'number',
overHidden: true
},
{ {
label: 'SizeUpgradePrice', label: 'SizeUpgradePrice',
prop: 'sizeUpgradePrice', prop: 'sizeUpgradePrice',
@@ -211,6 +223,18 @@ export default {
dataType: 'number', dataType: 'number',
overHidden: true overHidden: true
}, },
{
label: 'MaterialUpTo',
prop: 'materialUpgradeTo',
type: 'select',
dicUrl: '/blade-system/dict-biz/dictionary?code=material_type',
props: {
label: 'dictValue',
value: 'dictKey'
},
dataType: 'number',
overHidden: true
},
{ {
label: 'MaterialUpgradePrice', label: 'MaterialUpgradePrice',
prop: 'materialUpgradePrice', prop: 'materialUpgradePrice',

View File

@@ -36,7 +36,7 @@
</avue-crud> </avue-crud>
<el-drawer :title="`[${categoryName}] Setting`" v-model="subVisible" :direction="direction" <el-drawer :title="`[${categoryName}] Setting`" v-model="subVisible" :direction="direction"
append-to-body append-to-body
:before-close="handleSubClose" size="90%"> :before-close="handleSubClose" size="100%">
<basic-container> <basic-container>
<avue-crud :option="optionSub" <avue-crud :option="optionSub"
:data="dataSub" :data="dataSub"
@@ -67,7 +67,7 @@ import option from '@/option/kiosk/category';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import 'nprogress/nprogress.css'; import 'nprogress/nprogress.css';
import optionSub from '@/option/kiosk/priceList'; import optionSub from '@/option/kiosk/priceList';
import { getSubList, add as addSub, update as updateSub, remove as removeSub } from '@/api/kiosk/priceList'; import { getSubList, getDetail as getDetailSub, add as addSub, update as updateSub, remove as removeSub } from '@/api/kiosk/priceList';
export default { export default {
data() { data() {
@@ -85,7 +85,7 @@ export default {
option: option, option: option,
data: [], data: [],
subVisible: false, subVisible: false,
direction: 'rtl', direction: 'ttb',
categoryId: 0, categoryId: 0,
categoryName: '', categoryName: '',
formSub: {}, formSub: {},
@@ -311,9 +311,12 @@ export default {
categoryId: this.categoryId categoryId: this.categoryId
}; };
getSubList(page.currentPage, page.pageSize, Object.assign(values, this.querySub)).then(res => { getSubList(page.currentPage, page.pageSize, Object.assign(values, this.querySub)).then(res => {
this.dataSub = res.data.data; const data = res.data.data;
this.selectionListSub = []; this.pageSub.total = data.total;
this.dataSub = data.records;
this.loadingSub = false; this.loadingSub = false;
this.selectionListSub = [];
this.$refs.crudSub.toggleSelection();
}); });
}, },
handleSubClose(hide) { handleSubClose(hide) {
@@ -322,7 +325,7 @@ export default {
}, },
beforeOpenSub(done, type) { beforeOpenSub(done, type) {
if (['edit', 'view'].includes(type)) { if (['edit', 'view'].includes(type)) {
getDetail(this.formSub.id).then(res => { getDetailSub(this.formSub.id).then(res => {
this.formSub = res.data.data; this.formSub = res.data.data;
}); });
} }