update:
1. update category and pricelist
This commit is contained in:
@@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
|
||||
|
||||
export const getSubList = (current, size, params) => {
|
||||
return request({
|
||||
url: '/kiosk/price-list/detail-list',
|
||||
url: '/kiosk/price-list/page',
|
||||
method: 'get',
|
||||
params: {
|
||||
...params,
|
||||
|
||||
@@ -66,7 +66,7 @@ export default {
|
||||
{
|
||||
label: 'Shape',
|
||||
prop: 'shape',
|
||||
type: 'radio',
|
||||
type: 'select',
|
||||
dicUrl: '/blade-system/dict-biz/dictionary?code=shape_type',
|
||||
props: {
|
||||
label: 'dictValue',
|
||||
@@ -79,7 +79,7 @@ export default {
|
||||
{
|
||||
label: 'Material',
|
||||
prop: 'material',
|
||||
type: 'radio',
|
||||
type: 'select',
|
||||
dicUrl: '/blade-system/dict-biz/dictionary?code=material_type',
|
||||
props: {
|
||||
label: 'dictValue',
|
||||
@@ -92,7 +92,7 @@ export default {
|
||||
{
|
||||
label: 'Size',
|
||||
prop: 'csize',
|
||||
type: 'radio',
|
||||
type: 'select',
|
||||
dicUrl: '/blade-system/dict-biz/dictionary?code=size_type',
|
||||
props: {
|
||||
label: 'dictValue',
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
{
|
||||
label: 'Style',
|
||||
prop: 'style',
|
||||
type: 'radio',
|
||||
type: 'select',
|
||||
dicUrl: '/blade-system/dict-biz/dictionary?code=style_type',
|
||||
props: {
|
||||
label: 'dictValue',
|
||||
@@ -137,7 +137,7 @@ export default {
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
label: 'OriginalPrice',
|
||||
label: 'Original',
|
||||
prop: 'originalPrice',
|
||||
type: 'number',
|
||||
precision: 2, // 小数位数
|
||||
@@ -147,7 +147,7 @@ export default {
|
||||
span: 24
|
||||
},
|
||||
{
|
||||
label: 'ActualPrice',
|
||||
label: 'Actual',
|
||||
prop: 'actualPrice',
|
||||
type: 'number',
|
||||
precision: 2, // 小数位数
|
||||
@@ -189,6 +189,18 @@ export default {
|
||||
dataType: 'number',
|
||||
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',
|
||||
prop: 'sizeUpgradePrice',
|
||||
@@ -211,6 +223,18 @@ export default {
|
||||
dataType: 'number',
|
||||
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',
|
||||
prop: 'materialUpgradePrice',
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</avue-crud>
|
||||
<el-drawer :title="`[${categoryName}] Setting`" v-model="subVisible" :direction="direction"
|
||||
append-to-body
|
||||
:before-close="handleSubClose" size="90%">
|
||||
:before-close="handleSubClose" size="100%">
|
||||
<basic-container>
|
||||
<avue-crud :option="optionSub"
|
||||
:data="dataSub"
|
||||
@@ -67,7 +67,7 @@ import option from '@/option/kiosk/category';
|
||||
import { mapGetters } from 'vuex';
|
||||
import 'nprogress/nprogress.css';
|
||||
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 {
|
||||
data() {
|
||||
@@ -85,7 +85,7 @@ export default {
|
||||
option: option,
|
||||
data: [],
|
||||
subVisible: false,
|
||||
direction: 'rtl',
|
||||
direction: 'ttb',
|
||||
categoryId: 0,
|
||||
categoryName: '',
|
||||
formSub: {},
|
||||
@@ -311,9 +311,12 @@ export default {
|
||||
categoryId: this.categoryId
|
||||
};
|
||||
getSubList(page.currentPage, page.pageSize, Object.assign(values, this.querySub)).then(res => {
|
||||
this.dataSub = res.data.data;
|
||||
this.selectionListSub = [];
|
||||
const data = res.data.data;
|
||||
this.pageSub.total = data.total;
|
||||
this.dataSub = data.records;
|
||||
this.loadingSub = false;
|
||||
this.selectionListSub = [];
|
||||
this.$refs.crudSub.toggleSelection();
|
||||
});
|
||||
},
|
||||
handleSubClose(hide) {
|
||||
@@ -322,7 +325,7 @@ export default {
|
||||
},
|
||||
beforeOpenSub(done, type) {
|
||||
if (['edit', 'view'].includes(type)) {
|
||||
getDetail(this.formSub.id).then(res => {
|
||||
getDetailSub(this.formSub.id).then(res => {
|
||||
this.formSub = res.data.data;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user