完成了机台换刀申请的换刀申请按键弹窗数据同步回机台换刀申请界面以及转移按键界面、CAM工单程序用刀计划的申请装刀界面
This commit is contained in:
@@ -22,14 +22,102 @@ class ToolChangeRequirementInformation(models.TransientModel):
|
||||
reason_for_applying = fields.Char(string='申请原因')
|
||||
remark = fields.Char(string='备注说明')
|
||||
|
||||
# todo 未完成
|
||||
def tool_changing_apply(self):
|
||||
"""
|
||||
确认换刀申请(按键)
|
||||
确认换刀申请(按键)
|
||||
:return:
|
||||
"""
|
||||
# 封装数据
|
||||
desc = {
|
||||
'CNC_machine_table': self.CNC_machine_table,
|
||||
'machine_tool_code': self.machine_tool_code,
|
||||
'cutter_spacing_code': self.cutter_spacing_code,
|
||||
'replacement_tool_code': self.replacement_tool_code,
|
||||
'replacement_tool_name': self.replacement_tool_name,
|
||||
'replacement_tool_type': self.replacement_tool_type,
|
||||
'replacement_tool_coarse_middle_thin': self.replacement_tool_coarse_middle_thin,
|
||||
'new_former': self.new_former,
|
||||
'applicant': self.applicant,
|
||||
'used_tool_time': self.used_tool_time,
|
||||
'reason_for_applying': self.reason_for_applying,
|
||||
'remark': self.new_former
|
||||
}
|
||||
# 将数据更新到换刀申请
|
||||
self.tool_change_to_apply_id.write({'replacement_tool_name': self.replacement_tool_name})
|
||||
self.env.cr.commit()
|
||||
self.env['sf.machine.table.tool.changing.apply'].amendant_record(desc)
|
||||
|
||||
# todo 功能刀具组装创建新任务
|
||||
|
||||
# 关闭弹出窗口
|
||||
return {'type': 'ir.actions.act_window_close'}
|
||||
|
||||
|
||||
class ToolTransferRequestInformation(models.TransientModel):
|
||||
_name = 'sf.tool.transfer.request.information'
|
||||
_description = '刀具转移申请信息'
|
||||
|
||||
CNC_machine_table = fields.Char(string='CNC机床', readonly=True)
|
||||
machine_tool_code = fields.Char(string='机台号', readonly=True)
|
||||
cutter_spacing_code = fields.Char(string='刀位号', readonly=True)
|
||||
functional_tool_code = fields.Char(string='功能刀具编码', readonly=True)
|
||||
functional_tool_name = fields.Char(string='功能刀具名称', readonly=True)
|
||||
# todo 功能刀具类型为 Many2one
|
||||
functional_tool_type = fields.Char(string='功能刀具类型', readonly=True)
|
||||
transfer_target = fields.Selection([('机台', '机台'),
|
||||
('线边刀库', '线边刀库'),
|
||||
('刀具房', '刀具房')], string='转移到:', default='线边刀库')
|
||||
|
||||
new_cnc_machine_table = fields.Char(string='机床名称')
|
||||
new_machine_tool_code = fields.Char(string='机床号')
|
||||
new_cutter_spacing_code = fields.Char(string='刀位号')
|
||||
|
||||
magazine_tool_warehouse_district = fields.Char(string='库区')
|
||||
magazine_tool_warehouse_position = fields.Char(string='库位')
|
||||
|
||||
tool_room_warehouse_district = fields.Char(string='库区')
|
||||
tool_room_warehouse_position = fields.Char(string='库位')
|
||||
|
||||
def tool_transfer_apply(self):
|
||||
"""
|
||||
刀具转移申请信息确定按钮
|
||||
:return:
|
||||
"""
|
||||
|
||||
|
||||
class ApplyForTooling(models.TransientModel):
|
||||
_name = 'sf.apply.for.tooling'
|
||||
_description = '申请装刀'
|
||||
|
||||
ticket_task_code = fields.Char(string='工单任务编号', readonly=True)
|
||||
cam_procedure_code = fields.Char(string='CAM程序编号', readonly=True)
|
||||
machine_table_name = fields.Char(string='机床名称', readonly=True)
|
||||
cam_cutter_spacing_code = fields.Char(string='CAM刀位号', readonly=True)
|
||||
functional_tool_code = fields.Char(string='功能刀具编码', readonly=True)
|
||||
functional_tool_name = fields.Char(string='功能刀具名称', readonly=True)
|
||||
functional_tool_type = fields.Char(string='功能刀具类型', readonly=True)
|
||||
|
||||
diameter = fields.Char(string='直径(程式)', readonly=True)
|
||||
tool_loading_length = fields.Char(string='装刀长', readonly=True)
|
||||
clearance_length = fields.Char(string='避空长', readonly=True)
|
||||
tool_included_angle = fields.Char(string='刀尖角(R角)', readonly=True)
|
||||
L_D = fields.Char(string='L/D', readonly=True)
|
||||
coarse_middle_thin = fields.Selection([("1", "粗"), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=True)
|
||||
|
||||
whether_standard_tool = fields.Boolean(string='是否标准刀', readonly=True)
|
||||
need_knife_time = fields.Datetime(string='需要用刀时间', readonly=True)
|
||||
required_cutting_time = fields.Char(string='需要切割时间', readonly=True)
|
||||
reason_for_applying = fields.Char(string='申请原因', readonly=True)
|
||||
|
||||
def apply_for_tooling(self):
|
||||
"""
|
||||
|
||||
:return:
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user