update 产品池
This commit is contained in:
parent
591b60de61
commit
0c1252467e
@ -24,11 +24,33 @@
|
|||||||
@click="handleAddParam()"
|
@click="handleAddParam()"
|
||||||
>+ 添加</el-button
|
>+ 添加</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
v-if="dataForm.id && !detailMode && /附件/.test(activeMenu)"
|
||||||
|
plain
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
class="at-right-top"
|
||||||
|
style="margin-bottom: 16px"
|
||||||
|
@click="triggerUpload()"
|
||||||
|
>
|
||||||
|
<i class="el-icon-upload"></i> 上传</el-button
|
||||||
|
>
|
||||||
<!-- menu -->
|
<!-- menu -->
|
||||||
<el-tabs v-model="activeMenu" type="card" @tab-click="handleTabClick">
|
<el-tabs v-model="activeMenu" type="card" @tab-click="handleTabClick">
|
||||||
<!-- <el-tab-pane v-for="(tab, index) in configs.menu" :key="index" :label="tab.name" :name="tab.name"> -->
|
<!-- <el-tab-pane v-for="(tab, index) in configs.menu" :key="index" :label="tab.name" :name="tab.name"> -->
|
||||||
<el-tab-pane v-for="(tab, index) in actualMenus" :key="index" :label="tab.name" :name="tab.name">
|
<el-tab-pane v-for="(tab, index) in actualMenus" :key="index" :name="tab.name">
|
||||||
<div v-if="index === 0">
|
<span class="slot" slot="label">
|
||||||
|
<i
|
||||||
|
:class="{
|
||||||
|
'el-icon-edit': tab.key === 'info',
|
||||||
|
'el-icon-s-data': tab.key === 'attr',
|
||||||
|
'el-icon-folder-opened': tab.key === 'attachment',
|
||||||
|
}"
|
||||||
|
></i
|
||||||
|
> {{ tab.name }}
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<div v-if="tab.key === 'info'">
|
||||||
<!-- form -->
|
<!-- form -->
|
||||||
<el-form ref="dataForm" :model="dataForm" v-loading="loadingStatus">
|
<el-form ref="dataForm" :model="dataForm" v-loading="loadingStatus">
|
||||||
<el-row v-for="(row, rowIndex) in configs.form.rows" :key="'row_' + rowIndex" :gutter="20">
|
<el-row v-for="(row, rowIndex) in configs.form.rows" :key="'row_' + rowIndex" :gutter="20">
|
||||||
@ -60,10 +82,11 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="dataForm.id && index === 1">
|
<div v-if="dataForm.id && tab.key === 'attr'">
|
||||||
<BaseListTable :table-config="null" :column-config="filteredTableProps" :table-data="subList" @operate-event="handleTableRowOperate" />
|
<BaseListTable :table-config="null" :column-config="filteredTableProps" :table-data="subList" @operate-event="handleTableRowOperate" />
|
||||||
<!-- paginator -->
|
<!-- paginator -->
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="dataForm.id && tab.key === 'attachment'">附件</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@ -273,6 +296,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/** handlers */
|
/** handlers */
|
||||||
|
triggerUpload() {
|
||||||
|
// 出发 upload 界面
|
||||||
|
},
|
||||||
|
|
||||||
handleSelectChange(col, eventValue) {
|
handleSelectChange(col, eventValue) {
|
||||||
console.log("[dialog] select change: ", col, eventValue);
|
console.log("[dialog] select change: ", col, eventValue);
|
||||||
},
|
},
|
||||||
@ -326,11 +353,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleTabClick(payload) {
|
handleTabClick(payload) {
|
||||||
// console.log("tab click payload: ", this.activeMenu);
|
// console.log("tab click payload: ", this.activeMenu);
|
||||||
// if (this.activeMenu === this.configs.menu[1].name) {
|
// if (this.activeMenu === this.configs.menu[1].name) {
|
||||||
// // 获取数据
|
// // 获取数据
|
||||||
// this.getSubList();
|
// this.getSubList();
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
|
|
||||||
getSubList(page = 1, size = 20) {
|
getSubList(page = 1, size = 20) {
|
||||||
|
@ -50,7 +50,7 @@ export default function () {
|
|||||||
|
|
||||||
const dialogConfigs = {
|
const dialogConfigs = {
|
||||||
clickModalToClose: true,
|
clickModalToClose: true,
|
||||||
menu: [{ name: '设备信息' }, { name: '设备属性信息', onlyEditMode: true }],
|
menu: [{ name: '设备信息', key: 'info' }, { name: '设备属性信息', key: 'attr', onlyEditMode: true }],
|
||||||
form: {
|
form: {
|
||||||
rows: [
|
rows: [
|
||||||
[
|
[
|
||||||
|
@ -59,7 +59,7 @@ export default function () {
|
|||||||
* 此为后者的配置:
|
* 此为后者的配置:
|
||||||
*/
|
*/
|
||||||
const dialogConfigs = {
|
const dialogConfigs = {
|
||||||
menu: [{ name: '混料程序' }, { name: '参数明细', onlyEditMode: true }],
|
menu: [{ name: '混料程序', key: 'info' }, { name: '参数明细', key: 'attr', onlyEditMode: true }],
|
||||||
form: {
|
form: {
|
||||||
url: '/pms/blenderStep',
|
url: '/pms/blenderStep',
|
||||||
rows: [
|
rows: [
|
||||||
|
@ -12,7 +12,8 @@ export default function () {
|
|||||||
{ prop: 'typeDictValue', label: '产品类型', filter: dictFilter('product_type') },
|
{ prop: 'typeDictValue', label: '产品类型', filter: dictFilter('product_type') },
|
||||||
{ prop: 'specifications', label: '规格' },
|
{ prop: 'specifications', label: '规格' },
|
||||||
{ prop: 'unitDictValue', label: '单位', filter: dictFilter('unit') },
|
{ prop: 'unitDictValue', label: '单位', filter: dictFilter('unit') },
|
||||||
{ prop: 'weight', label: '重量(kg)' },
|
{ prop: 'weight', label: '重量', filter: val => val ? val + ' kg' : '-' },
|
||||||
|
{ prop: 'processTime', label: '产线完成单位产品用时', width: 200, filter: val => val + ' s' },
|
||||||
{ prop: 'remark', label: '备注' },
|
{ prop: 'remark', label: '备注' },
|
||||||
{ prop: 'description', label: '附件信息', subcomponent: TableTextComponent, buttonContent: '查看附件' },
|
{ prop: 'description', label: '附件信息', subcomponent: TableTextComponent, buttonContent: '查看附件' },
|
||||||
{
|
{
|
||||||
@ -52,12 +53,12 @@ export default function () {
|
|||||||
|
|
||||||
const dictList = JSON.parse(localStorage.getItem('dictList') || {})
|
const dictList = JSON.parse(localStorage.getItem('dictList') || {})
|
||||||
const dialogConfigs = {
|
const dialogConfigs = {
|
||||||
menu: [{ name: '产品信息' }, { name: '产品属性信息', onlyEditMode: false }],
|
menu: [{ name: '产品信息', key: 'info' }, { name: '产品属性信息', key: 'attr', onlyEditMode: true }, { name: '附件', key: 'attachment', onlyEditMode: true}],
|
||||||
form: {
|
form: {
|
||||||
rows: [
|
rows: [
|
||||||
[
|
[
|
||||||
{ input: true, label: '产品名称/砖型名称', prop: 'name', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称' } },
|
{ input: true, label: '产品名称/砖型名称', prop: 'name', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称' } },
|
||||||
{ input: true, label: '产品编码/砖型编码', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } },
|
{ input: true, label: '产品编码/砖型编码', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备编码' } },
|
||||||
// { input: true, label: '版本号', prop: 'version', elparams: { placeholder: '请输入版本号' } },
|
// { input: true, label: '版本号', prop: 'version', elparams: { placeholder: '请输入版本号' } },
|
||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
@ -68,15 +69,16 @@ export default function () {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{ input: true, label: '规格', prop: 'specifications', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } },
|
// { input: true, label: '单位平方数', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } },
|
||||||
{ input: true, label: '单位平方数', prop: 'code', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入设备名称编码' } },
|
|
||||||
{
|
{
|
||||||
select: true,
|
select: true,
|
||||||
label: '单位',
|
label: '单位',
|
||||||
prop: 'unitDictValue',
|
prop: 'unitDictValue',
|
||||||
options: 'unit' in dictList ? dictList['unit'].map(item => ({ value: item.dictValue, label: item.dictLabel })) : [],
|
options: 'unit' in dictList ? dictList['unit'].map(item => ({ value: item.dictValue, label: item.dictLabel })) : [],
|
||||||
elparams: { placeholder: '选择一个产品类型' }
|
elparams: { placeholder: '选择单位' }
|
||||||
},
|
},
|
||||||
|
{ input: true, label: '规格', prop: 'specifications', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入规格' } },
|
||||||
|
{ input: true, label: '产线完成单位产品用时(s)', prop: 'processTime', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入规格' } },
|
||||||
],
|
],
|
||||||
[{ textarea: true, label: '备注', prop: 'remark', elparams: { placeholder: '备注' } }],
|
[{ textarea: true, label: '备注', prop: 'remark', elparams: { placeholder: '备注' } }],
|
||||||
],
|
],
|
||||||
@ -91,10 +93,11 @@ export default function () {
|
|||||||
// extraParams: ['stepId'],
|
// extraParams: ['stepId'],
|
||||||
extraParams: 'productId',
|
extraParams: 'productId',
|
||||||
props: [
|
props: [
|
||||||
{ prop: 'createTime', label: '创建时间' },
|
{ prop: 'createTime', label: '创建时间', filter: timeFilter },
|
||||||
{ prop: 'productId', label: '产品ID' },
|
// { prop: 'productId', label: '产品ID' },
|
||||||
{ prop: 'attrName', label: '属性名称', isEditField: true },
|
{ prop: 'name', label: '属性名称', isEditField: true },
|
||||||
{ prop: 'attrValue', label: '属性值', isEditField: true },
|
{ prop: 'value', label: '属性值', isEditField: true },
|
||||||
|
{ prop: 'remark', label: '备注', isEditField: true },
|
||||||
{
|
{
|
||||||
prop: 'operations',
|
prop: 'operations',
|
||||||
name: '操作',
|
name: '操作',
|
||||||
@ -102,8 +105,8 @@ export default function () {
|
|||||||
width: 120,
|
width: 120,
|
||||||
subcomponent: TableOperaionComponent,
|
subcomponent: TableOperaionComponent,
|
||||||
options: [
|
options: [
|
||||||
{ name: 'edit', permission: 'pms:product:update' },
|
{ name: 'edit', permission: 'pms:productArrt:update' },
|
||||||
{ name: 'delete', permission: 'pms:product:delete' },
|
{ name: 'delete', permission: 'pms:productArrt:delete' },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@ -116,16 +119,16 @@ export default function () {
|
|||||||
extraParam: 'productId',
|
extraParam: 'productId',
|
||||||
rows: [
|
rows: [
|
||||||
[
|
[
|
||||||
{ input: true, label: '属性名称', prop: 'attrName', elparams: { placeholder: '请输入属性名称' } },
|
{ input: true, label: '属性名称', prop: 'name', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入属性名称' } },
|
||||||
{ input: true, label: '属性值', prop: 'attrValue', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入属性值' } },
|
{ input: true, label: '属性值', prop: 'value', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入属性值' } },
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{ textarea: true, label: '备注', prop: 'remark', elparams: { placeholder: '添加备注' } },
|
{ textarea: true, label: '备注', prop: 'remark', elparams: { placeholder: '添加备注' } },
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
operations: [
|
operations: [
|
||||||
{ name: 'add', label: '保存', type: 'primary', permission: 'pms:product:save', showOnEdit: false },
|
{ name: 'add', label: '保存', type: 'primary', permission: 'pms:productArrt:save', showOnEdit: false },
|
||||||
{ name: 'update', label: '更新', type: 'primary', permission: 'pms:product:update', showOnEdit: true },
|
{ name: 'update', label: '更新', type: 'primary', permission: 'pms:productArrt:update', showOnEdit: true },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -143,7 +146,9 @@ export default function () {
|
|||||||
},
|
},
|
||||||
urls: {
|
urls: {
|
||||||
base: '/pms/product',
|
base: '/pms/product',
|
||||||
page: '/pms/product/page'
|
page: '/pms/product/page',
|
||||||
|
subase: '/pms/productArrt',
|
||||||
|
subpage: '/pms/productArrt/page',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user