PageBlueprint 加 RECIPE_MASTER_DETAIL 常量与可空 child 组件(14-arg, 保留 13-arg 兼容构造);新增 PageBlueprintChild record。 PageBlueprintCompiler.masterDetail 复用 maintenance 列表骨架, 新增/编辑表单内联 house-style input-table 子表(name=listColumn, quickEdit 控件),编辑表单 initApi 走 _LOAD 回显主+子行。 validate 接受 master-detail 并要求 child 非空/childTable/listColumn 非空/fields 非空。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
478 lines
14 KiB
JSON
478 lines
14 KiB
JSON
{
|
|
"type" : "page",
|
|
"title" : "周转(自购)材料盘点管理",
|
|
"body" : {
|
|
"type" : "crud",
|
|
"api" : "/api/flow/PM_TURNOVERMATERIALBUYINVENTORY_SEARCH",
|
|
"syncLocation" : false,
|
|
"selectable" : true,
|
|
"checkOnItemClick" : true,
|
|
"filter" : {
|
|
"title" : "查询",
|
|
"body" : [ {
|
|
"name" : "FORMNO",
|
|
"label" : "盘点单号",
|
|
"type" : "input-text"
|
|
}, {
|
|
"name" : "STOREHOUSEINFOID",
|
|
"label" : "盘店仓库",
|
|
"type" : "picker",
|
|
"clearable" : true,
|
|
"source" : "/api/picker/4e901c80-8a74-42b8-80ef-2e496e536fc3/list",
|
|
"labelField" : "_label",
|
|
"valueField" : "_id",
|
|
"modalMode" : "dialog",
|
|
"modalSize" : "lg",
|
|
"pickerSchema" : {
|
|
"mode" : "table",
|
|
"headerToolbar" : [ {
|
|
"type" : "search-box",
|
|
"name" : "q",
|
|
"placeholder" : "输入关键字搜索"
|
|
} ],
|
|
"footerToolbar" : [ "pagination" ]
|
|
}
|
|
}, {
|
|
"name" : "PAPERDATE",
|
|
"label" : "账面日期",
|
|
"type" : "input-date-range"
|
|
}, {
|
|
"name" : "INVENTORYSTARTDATE",
|
|
"label" : "盘点开始日期",
|
|
"type" : "input-date-range"
|
|
}, {
|
|
"name" : "INVENTORYENDDATE",
|
|
"label" : "盘点结束日期",
|
|
"type" : "input-date-range"
|
|
}, {
|
|
"name" : "INVENTORYSTATUS",
|
|
"label" : "盘点状态",
|
|
"type" : "select",
|
|
"clearable" : true,
|
|
"source" : "/api/poc/dict/MATERIAL_INVENTORYSTATUS"
|
|
} ]
|
|
},
|
|
"columns" : [ {
|
|
"name" : "PM_TURNOVERMATERIALBUYINVENTORY_ID",
|
|
"label" : "主键",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
}, {
|
|
"name" : "STOREHOUSEINFOID_DISPLAY__",
|
|
"label" : "盘点仓库",
|
|
"width" : 100
|
|
}, {
|
|
"name" : "FORMNO",
|
|
"label" : "盘点单号",
|
|
"width" : 160
|
|
}, {
|
|
"name" : "PAPERDATE",
|
|
"label" : "账面日期",
|
|
"width" : 80,
|
|
"type" : "date",
|
|
"format" : "YYYY-MM-DD",
|
|
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
|
|
}, {
|
|
"name" : "INVENTORYSTARTDATE",
|
|
"label" : "盘点开始日期",
|
|
"width" : 100,
|
|
"type" : "date",
|
|
"format" : "YYYY-MM-DD",
|
|
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
|
|
}, {
|
|
"name" : "INVENTORYENDDATE",
|
|
"label" : "盘点结束日期",
|
|
"width" : 100,
|
|
"type" : "date",
|
|
"format" : "YYYY-MM-DD",
|
|
"inputFormat" : "YYYY-MM-DDTHH:mm:ss.SSSZ"
|
|
}, {
|
|
"name" : "ATTNNAME_DISPLAY__",
|
|
"label" : "经办人",
|
|
"width" : 80
|
|
}, {
|
|
"name" : "DEPARTID_DISPLAY__",
|
|
"label" : "部门",
|
|
"width" : 150
|
|
}, {
|
|
"name" : "INVENTORYSTATUS",
|
|
"label" : "盘点状态",
|
|
"width" : 100,
|
|
"type" : "mapping",
|
|
"map" : {
|
|
"1" : "盘点准备",
|
|
"2" : "盘点中",
|
|
"3" : "盘点结束"
|
|
}
|
|
}, {
|
|
"name" : "REMARK",
|
|
"label" : "备注",
|
|
"width" : 200,
|
|
"toggled" : false
|
|
} ],
|
|
"headerToolbar" : [ {
|
|
"type" : "button",
|
|
"id" : "添加",
|
|
"label" : "添加",
|
|
"level" : "primary",
|
|
"actionType" : "dialog",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "添加",
|
|
"size" : "lg",
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/3911c367-13ef-4c63-8a5b-2df76a5465fc?format=amis",
|
|
"api" : {
|
|
"method" : "get",
|
|
"url" : "/api/form/PM_TURNOVERMATERIALBUYINVENTORY/defaults?templateId=3911c367-13ef-4c63-8a5b-2df76a5465fc"
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/PM_TURNOVERMATERIALBUYINVENTORY_ADD?__egtpl=3911c367-13ef-4c63-8a5b-2df76a5465fc",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "修改",
|
|
"label" : "修改",
|
|
"actionType" : "dialog",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "修改",
|
|
"size" : "lg",
|
|
"data" : {
|
|
"&" : "${selectedItems[0]}"
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/3911c367-13ef-4c63-8a5b-2df76a5465fc?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/PM_TURNOVERMATERIALBUYINVENTORY_LOAD?__egtpl=3911c367-13ef-4c63-8a5b-2df76a5465fc",
|
|
"data" : {
|
|
"PM_TURNOVERMATERIALBUYINVENTORY_ID" : "${PM_TURNOVERMATERIALBUYINVENTORY_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
},
|
|
"onEvent" : {
|
|
"inited" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 4,
|
|
"item" : "${&}",
|
|
"templateId" : "a0307625-8abc-46b6-b835-93719a881e47"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult4"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult4.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/PM_TURNOVERMATERIALBUYINVENTORY_UPDATE?__egtpl=3911c367-13ef-4c63-8a5b-2df76a5465fc",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "删除",
|
|
"label" : "删除",
|
|
"level" : "danger",
|
|
"actionType" : "ajax",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"confirmText" : "确认要删除此记录吗?",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/PM_TURNOVERMATERIALBUYINVENTORY_DELETE",
|
|
"data" : {
|
|
"ids" : "${selectedItems|pick:PM_TURNOVERMATERIALBUYINVENTORY_ID|join:','}"
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "实盘数录入",
|
|
"label" : "实盘数录入",
|
|
"actionType" : "dialog",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "实盘数录入",
|
|
"size" : "lg",
|
|
"data" : {
|
|
"&" : "${selectedItems[0]}"
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/c32c7f0b-35f9-4d89-acc0-08af3bf3c9e3?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/PM_TURNOVERMATERIALBUYINVENTORY_LOAD?__egtpl=c32c7f0b-35f9-4d89-acc0-08af3bf3c9e3",
|
|
"data" : {
|
|
"PM_TURNOVERMATERIALBUYINVENTORY_ID" : "${PM_TURNOVERMATERIALBUYINVENTORY_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
},
|
|
"onEvent" : {
|
|
"inited" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 3,
|
|
"item" : "${&}",
|
|
"templateId" : "a0307625-8abc-46b6-b835-93719a881e47"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult3"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult3.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/PM_TURNOVERMATERIALBUYINVENTORY_UPDATE_STATUSTWO?__egtpl=c32c7f0b-35f9-4d89-acc0-08af3bf3c9e3",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "盘点结束",
|
|
"label" : "盘点结束",
|
|
"actionType" : "dialog",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "盘点结束",
|
|
"size" : "lg",
|
|
"data" : {
|
|
"&" : "${selectedItems[0]}"
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/912f70ed-380f-449c-99bc-88226442f3fd?format=amis",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/PM_TURNOVERMATERIALBUYINVENTORY_LOAD?__egtpl=912f70ed-380f-449c-99bc-88226442f3fd",
|
|
"data" : {
|
|
"PM_TURNOVERMATERIALBUYINVENTORY_ID" : "${PM_TURNOVERMATERIALBUYINVENTORY_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "保存",
|
|
"level" : "primary",
|
|
"actionType" : "submit",
|
|
"api" : "POST:/api/flow/PM_TURNOVERMATERIALBUYINVENTORY_UPDATE_STATUSTHREE?__egtpl=912f70ed-380f-449c-99bc-88226442f3fd",
|
|
"close" : true
|
|
}, {
|
|
"type" : "button",
|
|
"label" : "取消",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "查看",
|
|
"label" : "查看",
|
|
"actionType" : "dialog",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "查看",
|
|
"size" : "lg",
|
|
"data" : {
|
|
"&" : "${selectedItems[0]}",
|
|
"__readonly" : true
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/912f70ed-380f-449c-99bc-88226442f3fd?format=amis",
|
|
"static" : true,
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/flow/PM_TURNOVERMATERIALBUYINVENTORY_LOAD?__egtpl=912f70ed-380f-449c-99bc-88226442f3fd",
|
|
"data" : {
|
|
"PM_TURNOVERMATERIALBUYINVENTORY_ID" : "${PM_TURNOVERMATERIALBUYINVENTORY_ID}"
|
|
},
|
|
"responseData" : {
|
|
"&" : "${result}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "打印盘点单",
|
|
"label" : "打印盘点单",
|
|
"actionType" : "dialog",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "打印库存材料盘点单",
|
|
"size" : "lg",
|
|
"data" : {
|
|
"PM_TURNOVERMATERIALBUYINVENTORY_ID" : "${selectedItems[0].PM_TURNOVERMATERIALBUYINVENTORY_ID}"
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/260256a6-1c2a-4fed-bd92-22e2b6800b53?format=amis"
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "关闭",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, {
|
|
"type" : "button",
|
|
"id" : "打印库存材料盘点表",
|
|
"label" : "打印库存材料盘点表",
|
|
"actionType" : "dialog",
|
|
"disabledOn" : "${!selectedItems || selectedItems.length === 0}",
|
|
"dialog" : {
|
|
"type" : "dialog",
|
|
"title" : "打印库存材料盘点表",
|
|
"size" : "lg",
|
|
"data" : {
|
|
"PM_TURNOVERMATERIALBUYINVENTORY_ID" : "${selectedItems[0].PM_TURNOVERMATERIALBUYINVENTORY_ID}"
|
|
},
|
|
"body" : {
|
|
"type" : "service",
|
|
"schemaApi" : "get:/api/page/schema/71a67b4f-2e42-4b42-87be-0a9013d21b95?format=amis"
|
|
},
|
|
"actions" : [ {
|
|
"type" : "button",
|
|
"label" : "关闭",
|
|
"actionType" : "close"
|
|
} ]
|
|
}
|
|
}, "pagination" ],
|
|
"primaryField" : "PM_TURNOVERMATERIALBUYINVENTORY_ID",
|
|
"onEvent" : {
|
|
"selectedChange" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 2,
|
|
"item" : "${event.data.selectedItems[0]}",
|
|
"templateId" : "a0307625-8abc-46b6-b835-93719a881e47"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult2"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult2.commands}"
|
|
}
|
|
} ]
|
|
},
|
|
"inited" : {
|
|
"actions" : [ {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 4,
|
|
"item" : "${&}",
|
|
"templateId" : "a0307625-8abc-46b6-b835-93719a881e47"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult4"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult4.commands}"
|
|
}
|
|
}, {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 3,
|
|
"item" : "${&}",
|
|
"templateId" : "a0307625-8abc-46b6-b835-93719a881e47"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult3"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult3.commands}"
|
|
}
|
|
}, {
|
|
"actionType" : "ajax",
|
|
"api" : {
|
|
"method" : "post",
|
|
"url" : "/api/script/execute-template",
|
|
"data" : {
|
|
"seq" : 1,
|
|
"item" : "${&}",
|
|
"templateId" : "a0307625-8abc-46b6-b835-93719a881e47"
|
|
}
|
|
},
|
|
"outputVar" : "scriptResult1"
|
|
}, {
|
|
"actionType" : "replayScriptCommands",
|
|
"args" : {
|
|
"commands" : "${event.data.scriptResult1.commands}"
|
|
}
|
|
} ]
|
|
}
|
|
}
|
|
}
|
|
} |