增加了筛选功能

This commit is contained in:
zxx 2023-11-02 14:36:10 +08:00
parent 94283b69dd
commit 591c91363a
1 changed files with 31 additions and 22 deletions

View File

@ -104,7 +104,8 @@ export default {
// //
actions: { // Api actions: { // Api
getList: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/list`, getList: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/component/processes/list`,
delete: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/batchDelete` delete: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/batchDelete`,
departmentList: `${BASE_URL.BASE_URL}//BaseDepartment/Get/v1/base/department/list`
}, },
start_time: 0, // start_time: 0, //
@ -121,24 +122,24 @@ export default {
title: '', title: '',
desc: '', desc: '',
is_complete: '0', is_complete: '0',
is_send: '1',
department_id: '',
}, },
// //
searchRules: [ searchRules: [
{ key: "code", mode: "like" }, { key: "department_id", mode: "=" },
{ key: "mold_master_uid", mode: "=" }, { key: "production_id", mode: "=" },
{ key: "is_complete", mode: "=" }, { key: "is_send", mode: "=" },
{ key: "engineer_uid", mode: "=" } { key: "is_complete", mode: "=" }
], ],
// //
searchFormItems: [ // searchFormItems: [ //
{ field: 'code', title: '编码', span: 3, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
{ field: 'customer_name', title: '客户名称', span: 4, itemRender: { name: '$input', props: { placeholder: '请输入客户名称' } } },
{ {
title: '模具师傅', span: 4, title: '部门', span: 5,
field: 'mold_master_uid', field: 'department_id',
dataRule: { dataRule: {
fromField: "id" fromField: "id"
}, },
@ -148,37 +149,45 @@ export default {
dataType: "object", dataType: "object",
valueField: "id", valueField: "id",
textField: "name", textField: "name",
listdataFieldName: 'MesStaff', listdataFieldName: 'BaseDepartment',
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list` dataUrl: `${BASE_URL.BASE_URL}/BaseDepartment/v1/base/department/list`
} }
} }
} }
}, },
{ {
title: '工程师傅', span: 3, title: '布产单', span: 5,
field: 'engineer_uid', field: 'production_id',
dataRule: { dataRule: {
fromField: "id" fromField: "production_id"
}, },
itemRender: { itemRender: {
name: 'MkFormDataSelector', props: { name: 'MkFormDataSelector', props: {
params: { params: {
dataType: "object", dataType: "object",
valueField: "id", valueField: "id",
textField: "name", textField: "code",
listdataFieldName: 'MesStaff', columns: [ //
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list` { field: 'code', title: '编码' } //
],
listdataFieldName: 'MoldProductionOrder',
dataUrl: `${BASE_URL.BASE_URL}/MoldProductionOrder/v1/mold/production/order/list`
} }
} }
} }
}, },
{ field: 'is_send', title: '发料状态', span: 3, itemRender: { name: '$select', props: { options: settings.options_is_send } } },
{ field: 'is_complete', title: '状态', span: 3, itemRender: { name: '$select', props: { options: settings.options_is_complete } } }, { field: 'is_complete', title: '状态', span: 3, itemRender: { name: '$select', props: { options: settings.options_is_complete } } },
{ {
align: 'right', span: 4, itemRender: { // align: 'right', span: 4, itemRender: { //
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, //
{ props: { type: 'reset', content: '重置' } }] // { props: { type: 'reset', content: '' } }
]
} }
} }
], ],
@ -248,12 +257,12 @@ export default {
loadData(e) { loadData(e) {
e.MoldProductionOrderComponentProcesses.forEach(item => { e.MoldProductionOrderComponentProcesses.forEach(item => {
if (item.production_detail.code == "") { if (item.production_detail.code == "" || item.production_detail.code == " ") {
// item // item
e.MoldProductionOrderComponentProcesses.splice(e.MoldProductionOrderComponentProcesses.indexOf(item), 1); e.MoldProductionOrderComponentProcesses.splice(e.MoldProductionOrderComponentProcesses.indexOf(item), 1);
return; return;
} }
item.image = item.component_detail.image;
item.department_name = item.department_detail.name; item.department_name = item.department_detail.name;
item.process_name = item.process_detail.name; item.process_name = item.process_detail.name;
item.production_code = item.production_detail.code; item.production_code = item.production_detail.code;
@ -267,7 +276,7 @@ export default {
this.$mk.msg("请选择行"); this.$mk.msg("请选择行");
return; return;
} }
this.$openPage('/Mold/MoldProductionOrderDetail/' + row.id) this.$openPage('/Mold/MoldProductionOrderDetail/' + row.production_id)
}, },
pageEdit(row) { pageEdit(row) {