bugfix
This commit is contained in:
@@ -1,54 +1,53 @@
|
||||
import TableOperaionComponent from '@/components/noTemplateComponents/operationComponent'
|
||||
import { timeFilter } from '@/utils/filters'
|
||||
import TableOperaionComponent from "@/components/noTemplateComponents/operationComponent";
|
||||
import { timeFilter } from "@/utils/filters";
|
||||
|
||||
export default function () {
|
||||
|
||||
const tableProps = [
|
||||
{ type: 'index', label: '序号' },
|
||||
{ type: "index", label: "序号" },
|
||||
{ prop: "createTime", label: "添加时间", filter: timeFilter },
|
||||
{ prop: 'name', label: '工序名称' },
|
||||
{ prop: 'code', label: '工序编码' },
|
||||
{ prop: 'prdLine', label: '产线名称' },
|
||||
{ prop: 'description', label: '描述', },
|
||||
{ prop: 'remark', label: '备注' },
|
||||
{ prop: "name", label: "工序名称" },
|
||||
{ prop: "code", label: "工序编码" },
|
||||
{ prop: "prdLine", label: "产线名称" },
|
||||
{ prop: "description", label: "描述" },
|
||||
{ prop: "remark", label: "备注" },
|
||||
{
|
||||
prop: 'operations',
|
||||
name: '操作',
|
||||
fixed: 'right',
|
||||
prop: "operations",
|
||||
name: "操作",
|
||||
fixed: "right",
|
||||
width: 120,
|
||||
subcomponent: TableOperaionComponent,
|
||||
options: ['edit', { name: 'delete', permission: 'pms:workSequence:delete' }]
|
||||
}
|
||||
]
|
||||
|
||||
options: ["edit", { name: "delete", emitFull: true, permission: "pms:workSequence:delete" }],
|
||||
},
|
||||
];
|
||||
|
||||
const headFormFields = [
|
||||
{
|
||||
prop: 'key',
|
||||
label: '工序名称/编码',
|
||||
prop: "key",
|
||||
label: "工序名称/编码",
|
||||
input: true,
|
||||
default: { value: '' },
|
||||
bind: { // v-bind keyValues
|
||||
placeholder: '请输入工序名称或编码'
|
||||
}
|
||||
default: { value: "" },
|
||||
bind: {
|
||||
// v-bind keyValues
|
||||
placeholder: "请输入工序名称或编码",
|
||||
},
|
||||
},
|
||||
{
|
||||
button: {
|
||||
type: 'primary',
|
||||
name: '查询'
|
||||
}
|
||||
type: "primary",
|
||||
name: "查询",
|
||||
},
|
||||
},
|
||||
{
|
||||
button: {
|
||||
type: 'primary',
|
||||
name: '新增',
|
||||
permission: 'pms:workSequence:save'
|
||||
type: "primary",
|
||||
name: "新增",
|
||||
permission: "pms:workSequence:save",
|
||||
},
|
||||
bind: {
|
||||
plain: true,
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
/**
|
||||
* dialog config 有两个版本,一个适用于 DialogWithMenu 组件,另一个适用于 DialogJustForm 组件
|
||||
@@ -59,43 +58,57 @@ export default function () {
|
||||
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: "name",
|
||||
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||
elparams: { placeholder: "请输入工序名称" },
|
||||
},
|
||||
{
|
||||
input: true,
|
||||
label: "工序编码",
|
||||
prop: "code",
|
||||
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||
elparams: { placeholder: "请输入工序编码" },
|
||||
},
|
||||
],
|
||||
[
|
||||
{
|
||||
select: true,
|
||||
label: '产线',
|
||||
prop: 'prdLineId',
|
||||
label: "产线",
|
||||
prop: "prdLineId",
|
||||
rules: { required: true, message: "必填项不能为空", trigger: "blur" },
|
||||
options: [
|
||||
// { label: '1', value: 1 },
|
||||
// { label: '2', value: 2 },
|
||||
// { label: '3', value: 3 },
|
||||
],
|
||||
elparams: { placeholder: '请选择所属产线' },
|
||||
elparams: { placeholder: "请选择所属产线" },
|
||||
// fetchData api
|
||||
fetchData: () => {
|
||||
return this.$http('/pms/productionLine/page', { limit: 999, page: 1, key: '' })
|
||||
}
|
||||
return this.$http("/pms/productionLine/page", { limit: 999, page: 1, key: "" });
|
||||
},
|
||||
},
|
||||
{ input: true, label: '备注', prop: 'remark', elparams: { placeholder: '备注' } },
|
||||
// { input: true, label: '程序号', prop: '', rules: { required: true, message: 'not empty', trigger: 'blur' }, elparams: { placeholder: '请输入混料程序号' } },
|
||||
// { input: true, label: '备注', prop: 'remark', elparams: { placeholder: '备注' } },
|
||||
{ input: true, label: "描述", prop: "description", elparams: { placeholder: "描述" } },
|
||||
// { input: true, label: '程序号', prop: '', rules: { required: true, message: '必填项不能为空', trigger: 'blur' }, elparams: { placeholder: '请输入混料程序号' } },
|
||||
],
|
||||
// [{ switch: true, label: '状态', prop: 'enabled', default: 0 }],
|
||||
[
|
||||
{ textarea: true, label: '描述', prop: 'description', elparams: { placeholder: '描述' } },
|
||||
// { textarea: true, label: '描述', prop: 'description', elparams: { placeholder: '描述' } },
|
||||
{ input: true, label: "备注", prop: "remark", elparams: { placeholder: "备注" } },
|
||||
],
|
||||
],
|
||||
operations: [
|
||||
{ name: 'add', label: '保存', type: 'primary', permission: 'pms:workSequence:save', showOnEdit: false },
|
||||
{ name: 'update', label: '更新', type: 'primary', permission: 'pms:workSequence:update', showOnEdit: true },
|
||||
{ name: 'reset', label: '重置', type: 'warning', showAlways: true },
|
||||
{ name: "add", label: "保存", type: "primary", permission: "pms:workSequence:save", showOnEdit: false },
|
||||
{ name: "update", label: "更新", type: "primary", permission: "pms:workSequence:update", showOnEdit: true },
|
||||
{ name: "reset", label: "重置", type: "warning", showAlways: true },
|
||||
// { name: 'cancel', label: '取消', showAlways: true },
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
return {
|
||||
dialogConfigs: dialogJustFormConfigs,
|
||||
tableConfig: {
|
||||
@@ -104,14 +117,14 @@ export default function () {
|
||||
},
|
||||
headFormConfigs: {
|
||||
rules: null, // 名称是由 BaseSearchForm.vue 组件固定的
|
||||
fields: headFormFields // 名称是由 BaseSearchForm.vue 组件固定的
|
||||
fields: headFormFields, // 名称是由 BaseSearchForm.vue 组件固定的
|
||||
},
|
||||
urls: {
|
||||
base: '/pms/workSequence',
|
||||
page: '/pms/workSequence/page',
|
||||
base: "/pms/workSequence",
|
||||
page: "/pms/workSequence/page",
|
||||
// subase: '/pms/blenderStepParam',
|
||||
// subpage: '/pms/blenderStepParam/page',
|
||||
// more...
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user