update 产品池

This commit is contained in:
lb 2023-02-03 14:51:04 +08:00
부모 591b60de61
커밋 0c1252467e
4개의 변경된 파일59개의 추가작업 그리고 27개의 파일을 삭제

파일 보기

@ -24,11 +24,33 @@
@click="handleAddParam()"
>+ 添加</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 -->
<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 actualMenus" :key="index" :label="tab.name" :name="tab.name">
<div v-if="index === 0">
<el-tab-pane v-for="(tab, index) in actualMenus" :key="index" :name="tab.name">
<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 -->
<el-form ref="dataForm" :model="dataForm" v-loading="loadingStatus">
<el-row v-for="(row, rowIndex) in configs.form.rows" :key="'row_' + rowIndex" :gutter="20">
@ -60,10 +82,11 @@
</el-row>
</el-form>
</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" />
<!-- paginator -->
</div>
<div v-if="dataForm.id && tab.key === 'attachment'">附件</div>
</el-tab-pane>
</el-tabs>
</div>
@ -273,6 +296,10 @@ export default {
},
/** handlers */
triggerUpload() {
// upload
},
handleSelectChange(col, eventValue) {
console.log("[dialog] select change: ", col, eventValue);
},
@ -326,11 +353,11 @@ export default {
}
},
handleTabClick(payload) {
// console.log("tab click payload: ", this.activeMenu);
// if (this.activeMenu === this.configs.menu[1].name) {
// //
// this.getSubList();
// }
// console.log("tab click payload: ", this.activeMenu);
// if (this.activeMenu === this.configs.menu[1].name) {
// //
// this.getSubList();
// }
},
getSubList(page = 1, size = 20) {

파일 보기

@ -50,7 +50,7 @@ export default function () {
const dialogConfigs = {
clickModalToClose: true,
menu: [{ name: '设备信息' }, { name: '设备属性信息', onlyEditMode: true }],
menu: [{ name: '设备信息', key: 'info' }, { name: '设备属性信息', key: 'attr', onlyEditMode: true }],
form: {
rows: [
[

파일 보기

@ -59,7 +59,7 @@ export default function () {
* 此为后者的配置:
*/
const dialogConfigs = {
menu: [{ name: '混料程序' }, { name: '参数明细', onlyEditMode: true }],
menu: [{ name: '混料程序', key: 'info' }, { name: '参数明细', key: 'attr', onlyEditMode: true }],
form: {
url: '/pms/blenderStep',
rows: [

파일 보기

@ -12,7 +12,8 @@ export default function () {
{ prop: 'typeDictValue', label: '产品类型', filter: dictFilter('product_type') },
{ prop: 'specifications', label: '规格' },
{ 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: 'description', label: '附件信息', subcomponent: TableTextComponent, buttonContent: '查看附件' },
{
@ -52,12 +53,12 @@ export default function () {
const dictList = JSON.parse(localStorage.getItem('dictList') || {})
const dialogConfigs = {
menu: [{ name: '产品信息' }, { name: '产品属性信息', onlyEditMode: false }],
menu: [{ name: '产品信息', key: 'info' }, { name: '产品属性信息', key: 'attr', onlyEditMode: true }, { name: '附件', key: 'attachment', onlyEditMode: true}],
form: {
rows: [
[
{ 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: '请输入版本号' } },
{
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,
label: '单位',
prop: 'unitDictValue',
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: '备注' } }],
],
@ -91,10 +93,11 @@ export default function () {
// extraParams: ['stepId'],
extraParams: 'productId',
props: [
{ prop: 'createTime', label: '创建时间' },
{ prop: 'productId', label: '产品ID' },
{ prop: 'attrName', label: '属性名称', isEditField: true },
{ prop: 'attrValue', label: '属性值', isEditField: true },
{ prop: 'createTime', label: '创建时间', filter: timeFilter },
// { prop: 'productId', label: '产品ID' },
{ prop: 'name', label: '属性名称', isEditField: true },
{ prop: 'value', label: '属性值', isEditField: true },
{ prop: 'remark', label: '备注', isEditField: true },
{
prop: 'operations',
name: '操作',
@ -102,8 +105,8 @@ export default function () {
width: 120,
subcomponent: TableOperaionComponent,
options: [
{ name: 'edit', permission: 'pms:product:update' },
{ name: 'delete', permission: 'pms:product:delete' },
{ name: 'edit', permission: 'pms:productArrt:update' },
{ name: 'delete', permission: 'pms:productArrt:delete' },
]
}
],
@ -116,16 +119,16 @@ export default function () {
extraParam: 'productId',
rows: [
[
{ input: true, label: '属性名称', prop: 'attrName', elparams: { placeholder: '请输入属性名称' } },
{ input: true, label: '属性值', prop: 'attrValue', 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: 'value', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入属性值' } },
],
[
{ textarea: true, label: '备注', prop: 'remark', elparams: { placeholder: '添加备注' } },
]
],
operations: [
{ name: 'add', label: '保存', type: 'primary', permission: 'pms:product:save', showOnEdit: false },
{ name: 'update', label: '更新', type: 'primary', permission: 'pms:product:update', showOnEdit: true },
{ name: 'add', label: '保存', type: 'primary', permission: 'pms:productArrt:save', showOnEdit: false },
{ name: 'update', label: '更新', type: 'primary', permission: 'pms:productArrt:update', showOnEdit: true },
],
},
};
@ -143,7 +146,9 @@ export default function () {
},
urls: {
base: '/pms/product',
page: '/pms/product/page'
page: '/pms/product/page',
subase: '/pms/productArrt',
subpage: '/pms/productArrt/page',
}
}
}