增加了筛选功能

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
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, //
@ -121,24 +122,24 @@ export default {
title: '',
desc: '',
is_complete: '0',
is_send: '1',
department_id: '',
},
//
searchRules: [
{ key: "code", mode: "like" },
{ key: "mold_master_uid", mode: "=" },
{ key: "is_complete", mode: "=" },
{ key: "engineer_uid", mode: "=" }
{ key: "department_id", mode: "=" },
{ key: "production_id", mode: "=" },
{ key: "is_send", mode: "=" },
{ key: "is_complete", mode: "=" }
],
//
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,
field: 'mold_master_uid',
title: '部门', span: 5,
field: 'department_id',
dataRule: {
fromField: "id"
},
@ -148,37 +149,45 @@ export default {
dataType: "object",
valueField: "id",
textField: "name",
listdataFieldName: 'MesStaff',
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
listdataFieldName: 'BaseDepartment',
dataUrl: `${BASE_URL.BASE_URL}/BaseDepartment/v1/base/department/list`
}
}
}
},
{
title: '工程师傅', span: 3,
field: 'engineer_uid',
title: '布产单', span: 5,
field: 'production_id',
dataRule: {
fromField: "id"
fromField: "production_id"
},
itemRender: {
name: 'MkFormDataSelector', props: {
params: {
dataType: "object",
valueField: "id",
textField: "name",
listdataFieldName: 'MesStaff',
dataUrl: `${BASE_URL.BASE_URL}/MesStaff/v1/mes/staff/list`
textField: "code",
columns: [ //
{ 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 } } },
{
align: 'right', span: 4, itemRender: { //
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) {
e.MoldProductionOrderComponentProcesses.forEach(item => {
if (item.production_detail.code == "") {
// item
if (item.production_detail.code == "" || item.production_detail.code == " ") {
// item
e.MoldProductionOrderComponentProcesses.splice(e.MoldProductionOrderComponentProcesses.indexOf(item), 1);
return;
}
item.image = item.component_detail.image;
item.department_name = item.department_detail.name;
item.process_name = item.process_detail.name;
item.production_code = item.production_detail.code;
@ -267,7 +276,7 @@ export default {
this.$mk.msg("请选择行");
return;
}
this.$openPage('/Mold/MoldProductionOrderDetail/' + row.id)
this.$openPage('/Mold/MoldProductionOrderDetail/' + row.production_id)
},
pageEdit(row) {