feat:
add price list
This commit is contained in:
@@ -8,11 +8,12 @@ export default {
|
||||
index: true,
|
||||
viewBtn: false,
|
||||
addBtn: false,
|
||||
editBtn: false,
|
||||
editBtn: true,
|
||||
delBtn: false,
|
||||
cellBtn: true,
|
||||
selection: false,
|
||||
dialogClickModal: false,
|
||||
menuWidth: 150,
|
||||
// menuWidth: 150,
|
||||
column: [
|
||||
{
|
||||
label: '主键',
|
||||
@@ -43,38 +44,74 @@ export default {
|
||||
},
|
||||
{
|
||||
label: 'Category',
|
||||
prop: 'name',
|
||||
type: 'input'
|
||||
prop: 'categoryName',
|
||||
type: 'input',
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: 'Type',
|
||||
prop: 'categoryType',
|
||||
type: 'input'
|
||||
type: 'radio',
|
||||
dicUrl: '/blade-system/dict-biz/dictionary?code=category_type',
|
||||
props: {
|
||||
label: 'dictValue',
|
||||
value: 'dictKey'
|
||||
},
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: 'Shape',
|
||||
prop: 'shape',
|
||||
type: 'input'
|
||||
type: 'radio',
|
||||
dicUrl: '/blade-system/dict-biz/dictionary?code=shape_type',
|
||||
props: {
|
||||
label: 'dictValue',
|
||||
value: 'dictKey'
|
||||
},
|
||||
dataType: 'number',
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: 'Material',
|
||||
prop: 'material',
|
||||
type: 'input'
|
||||
type: 'radio',
|
||||
dicUrl: '/blade-system/dict-biz/dictionary?code=material_type',
|
||||
props: {
|
||||
label: 'dictValue',
|
||||
value: 'dictKey'
|
||||
},
|
||||
dataType: 'number',
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: 'Size',
|
||||
prop: 'size',
|
||||
type: 'input'
|
||||
type: 'radio',
|
||||
dicUrl: '/blade-system/dict-biz/dictionary?code=size_type',
|
||||
props: {
|
||||
label: 'dictValue',
|
||||
value: 'dictKey'
|
||||
},
|
||||
dataType: 'number',
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: 'Currency',
|
||||
prop: 'currency',
|
||||
type: 'input'
|
||||
type: 'select',
|
||||
dicUrl: '/blade-system/dict-biz/dictionary?code=currency_type',
|
||||
props: {
|
||||
label: 'dictValue',
|
||||
value: 'dictKey'
|
||||
},
|
||||
dataType: 'number',
|
||||
overHidden: true,
|
||||
},
|
||||
{
|
||||
label: 'Price',
|
||||
prop: 'price',
|
||||
type: 'input'
|
||||
type: 'number',
|
||||
cell: true,
|
||||
},
|
||||
{
|
||||
label: 'DeptId',
|
||||
|
||||
@@ -13,7 +13,7 @@ export const optionParent = {
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: '字典编号',
|
||||
label: 'Code',
|
||||
prop: 'code',
|
||||
search: true,
|
||||
slot: true,
|
||||
@@ -27,7 +27,7 @@ export const optionParent = {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '字典名称',
|
||||
label: 'Value',
|
||||
prop: 'dictValue',
|
||||
search: true,
|
||||
align: 'center',
|
||||
@@ -40,7 +40,7 @@ export const optionParent = {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '字典排序',
|
||||
label: 'Sort',
|
||||
prop: 'sort',
|
||||
type: 'number',
|
||||
align: 'right',
|
||||
@@ -55,18 +55,18 @@ export const optionParent = {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '封存',
|
||||
label: 'Sealed',
|
||||
prop: 'isSealed',
|
||||
type: 'switch',
|
||||
align: 'center',
|
||||
width: 100,
|
||||
dicData: [
|
||||
{
|
||||
label: '否',
|
||||
label: 'N',
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: '是',
|
||||
label: 'Y',
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
@@ -81,7 +81,7 @@ export const optionParent = {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '字典备注',
|
||||
label: 'Remark',
|
||||
prop: 'remark',
|
||||
hide: true,
|
||||
},
|
||||
@@ -104,7 +104,7 @@ export const optionChild = {
|
||||
dialogClickModal: false,
|
||||
column: [
|
||||
{
|
||||
label: '字典编号',
|
||||
label: 'Code',
|
||||
prop: 'code',
|
||||
addDisabled: true,
|
||||
editDisabled: true,
|
||||
@@ -119,7 +119,7 @@ export const optionChild = {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '字典名称',
|
||||
label: 'Value',
|
||||
prop: 'dictValue',
|
||||
search: true,
|
||||
align: 'center',
|
||||
@@ -132,7 +132,7 @@ export const optionChild = {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '上级字典',
|
||||
label: 'Parent',
|
||||
prop: 'parentId',
|
||||
type: 'tree',
|
||||
dicData: [],
|
||||
@@ -151,7 +151,7 @@ export const optionChild = {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '字典键值',
|
||||
label: 'Key',
|
||||
prop: 'dictKey',
|
||||
width: 85,
|
||||
rules: [
|
||||
@@ -163,7 +163,7 @@ export const optionChild = {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '字典排序',
|
||||
label: 'Sort',
|
||||
prop: 'sort',
|
||||
type: 'number',
|
||||
align: 'right',
|
||||
@@ -177,18 +177,18 @@ export const optionChild = {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '封存',
|
||||
label: 'Sealed',
|
||||
prop: 'isSealed',
|
||||
type: 'switch',
|
||||
align: 'center',
|
||||
width: 80,
|
||||
dicData: [
|
||||
{
|
||||
label: '否',
|
||||
label: 'N',
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
label: '是',
|
||||
label: 'Y',
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
@@ -203,7 +203,7 @@ export const optionChild = {
|
||||
],
|
||||
},
|
||||
{
|
||||
label: '字典备注',
|
||||
label: 'Remark',
|
||||
prop: 'remark',
|
||||
hide: true,
|
||||
},
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
</el-col>
|
||||
<el-col :span="19">
|
||||
<basic-container>
|
||||
<div style="margin-bottom: 20px;">
|
||||
<el-tag effect="dark">{{ deptName || 'Not selected' }}</el-tag>
|
||||
</div>
|
||||
<avue-crud
|
||||
:option="option"
|
||||
v-model:search="search"
|
||||
@@ -37,9 +40,9 @@
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-refresh"
|
||||
v-if="permission.priceList_refresh_price"
|
||||
@click="handleRefresh"
|
||||
>Refresh
|
||||
v-if="permission.priceList_sync"
|
||||
@click="handleSync"
|
||||
>Sync
|
||||
</el-button>
|
||||
</template>
|
||||
</avue-crud>
|
||||
@@ -64,7 +67,7 @@ export default {
|
||||
loading: true,
|
||||
initLoading: false,
|
||||
page: {
|
||||
pageSize: 10,
|
||||
pageSize: 50,
|
||||
currentPage: 1,
|
||||
total: 0
|
||||
},
|
||||
@@ -74,7 +77,8 @@ export default {
|
||||
treeDeptId: '0',
|
||||
treeParentId: '0',
|
||||
treeData: [],
|
||||
treeOption: treeOption
|
||||
treeOption: treeOption,
|
||||
deptName: '',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -99,6 +103,7 @@ export default {
|
||||
nodeClick(data) {
|
||||
this.treeDeptId = data.id;
|
||||
this.treeParentId = data.parentId;
|
||||
this.deptName = data.title;
|
||||
this.page.currentPage = 1;
|
||||
if (this.treeParentId !== '0') {
|
||||
this.onLoad(this.page);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
v-if="permission.dictbiz_delete"
|
||||
plain
|
||||
@click="handleDelete"
|
||||
>删 除
|
||||
>Delete
|
||||
</el-button>
|
||||
</template>
|
||||
<template #menu="scope">
|
||||
@@ -38,17 +38,17 @@
|
||||
icon="el-icon-setting"
|
||||
@click.stop="handleRowClick(scope.row)"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
>字典配置
|
||||
>Config
|
||||
</el-button>
|
||||
</template>
|
||||
<template #code="{ row }">
|
||||
<el-tag @click="handleRowClick(row)" style="cursor: pointer">{{ row.code }}</el-tag>
|
||||
</template>
|
||||
<template #isSealed="{ row }">
|
||||
<el-tag>{{ row.isSealed === 0 ? '否' : '是' }}</el-tag>
|
||||
<el-tag>{{ row.isSealed === 0 ? 'N' : 'Y' }}</el-tag>
|
||||
</template>
|
||||
</avue-crud>
|
||||
<el-dialog :title="`[${dictValue}]字典配置`" append-to-body v-model="box" width="1000px">
|
||||
<el-dialog :title="`[${dictValue}]Config`" append-to-body v-model="box" width="1000px">
|
||||
<avue-crud
|
||||
:option="optionChild"
|
||||
:table-loading="loadingChild"
|
||||
@@ -76,7 +76,7 @@
|
||||
v-if="permission.dict_delete"
|
||||
plain
|
||||
@click="handleDelete"
|
||||
>删 除
|
||||
>Delete
|
||||
</el-button>
|
||||
</template>
|
||||
<template #menu="scope">
|
||||
@@ -86,11 +86,11 @@
|
||||
icon="el-icon-circle-plus"
|
||||
@click.stop="handleAdd(scope.row, scope.index)"
|
||||
v-if="userInfo.authority.includes('admin')"
|
||||
>新增子项
|
||||
>Add Sub
|
||||
</el-button>
|
||||
</template>
|
||||
<template #isSealed="{ row }">
|
||||
<el-tag>{{ row.isSealed === 0 ? '否' : '是' }}</el-tag>
|
||||
<el-tag>{{ row.isSealed === 0 ? 'N' : 'Y' }}</el-tag>
|
||||
</template>
|
||||
</avue-crud>
|
||||
</el-dialog>
|
||||
@@ -113,7 +113,7 @@ import { mapGetters } from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dictValue: '暂无',
|
||||
dictValue: 'Empty',
|
||||
parentId: -1,
|
||||
formParent: {},
|
||||
formChild: {},
|
||||
|
||||
Reference in New Issue
Block a user