From 0c788df2f225943a5bb0416b6452b1738adefa90 Mon Sep 17 00:00:00 2001 From: "qihao.gong@jikimo.com" Date: Wed, 1 Nov 2023 17:33:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BB=B4=E4=BF=9D=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=A4=9A=E5=9B=BE=E7=89=87=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/src/scss/custom_style.scss | 1 + .../sf_equipment_maintenance_standards.py | 5 +- sf_maintenance/models/sf_maintenance.py | 20 ++-- .../models/sf_maintenance_requests.py | 2 +- .../views/maintenance_request_views.xml | 106 +++++++++++------- 5 files changed, 79 insertions(+), 55 deletions(-) diff --git a/jikimo_frontend/static/src/scss/custom_style.scss b/jikimo_frontend/static/src/scss/custom_style.scss index 00db5f3b..c9b53c68 100644 --- a/jikimo_frontend/static/src/scss/custom_style.scss +++ b/jikimo_frontend/static/src/scss/custom_style.scss @@ -17,6 +17,7 @@ div:has(.o_required_modifier) > label::before { } .my-image div { + width: 110px !important; height: 110px !important; } diff --git a/sf_maintenance/models/sf_equipment_maintenance_standards.py b/sf_maintenance/models/sf_equipment_maintenance_standards.py index 55fea8b0..80ec2ba3 100644 --- a/sf_maintenance/models/sf_equipment_maintenance_standards.py +++ b/sf_maintenance/models/sf_equipment_maintenance_standards.py @@ -48,8 +48,8 @@ class SfEquipmentSaintenanceStandards(models.Model): string='适用设备', domain="[('category_id', '=', maintenance_equipment_category_id)]" ) - - maintenance_standards_ids = fields.One2many('maintenance.standards', 'equipment_maintenance_standards_id', string='维保项目') + maintenance_standards_ids = fields.One2many('maintenance.standards', 'equipment_maintenance_standards_id', + string='维保项目', widget='one2many_list') eq_maintenance_ids = fields.One2many('maintenance.equipment', 'eq_maintenance_id', string='保养设备') overhaul_ids = fields.One2many('maintenance.equipment', 'overhaul_id', string='检修设备') @@ -81,6 +81,7 @@ class SfSaintenanceStandards(models.Model): [('电气类', '电气类'), ('机械类', '机械类'), ('程序类', '程序类'), ('系统类', '系统类')], string='类别') equipment_maintenance_standards_id = fields.Many2one('equipment.maintenance.standards', string='设备维保标准') images = fields.One2many('maintenance.standard.image', 'standard_id', string='反馈图片') + maintenance_request_ids = fields.Many2many('maintenance.request', string='维保计划') Period = fields.Integer('周期/频次(天)') remark = fields.Char('备注说明') diff --git a/sf_maintenance/models/sf_maintenance.py b/sf_maintenance/models/sf_maintenance.py index 5c916387..91688c35 100644 --- a/sf_maintenance/models/sf_maintenance.py +++ b/sf_maintenance/models/sf_maintenance.py @@ -237,9 +237,9 @@ class SfMaintenanceEquipment(models.Model): item.brand_id = item.type_id.brand_id.id # AGV小车设备参数 - AGV_L = fields.Char('设备尺寸(长)') - AGV_W = fields.Char('设备尺寸(宽)') - AGV_H = fields.Char('设备尺寸(高)') + AGV_L = fields.Char('AGV尺寸(长)') + AGV_W = fields.Char('AGV尺寸(宽)') + AGV_H = fields.Char('AGV尺寸(高)') AGV_goods_L = fields.Char('载货尺寸(长)') AGV_goods_W = fields.Char('载货尺寸(宽)') AGV_goods_H = fields.Char('载货尺寸(高)') @@ -276,9 +276,9 @@ class SfMaintenanceEquipment(models.Model): detect_L = fields.Char('设备尺寸(长)') detect_W = fields.Char('设备尺寸(宽)') detect_H = fields.Char('设备尺寸(高)') - detect_x_axis = fields.Char('X轴') - detect_y_axis = fields.Char('Y轴') - detect_z_axis = fields.Char('Z轴') + detect_x_axis = fields.Char('检测X轴') + detect_y_axis = fields.Char('检测Y轴') + detect_z_axis = fields.Char('检测Z轴') detect_precision = fields.Char('测量精度') detect_measurement_mode = fields.Selection([('光栅尺', '光栅尺'), ('容栅', '容栅'), ('磁栅', '磁栅'), ('激光干涉仪', '激光干涉仪')], string='测量方式') detect_resolution = fields.Char('分辨率') @@ -295,8 +295,8 @@ class SfMaintenanceEquipment(models.Model): detect_object_field_of_view_max = fields.Char('物方视场(最大)') detect_object_field_of_view_min = fields.Char('物方视场(最小)') detect_power_requirements = fields.Char('电源要求') - detect_operating_temperature = fields.Char('环境温度') - detect_operating_humidity = fields.Char('环境湿度') + detect_operating_temperature = fields.Char('检测设备环境温度') + detect_operating_humidity = fields.Char('检测设备环境湿度') # 机器人设备参数 robot_gripping_of_workpieces_L = fields.Char('可抓取工件(长)') @@ -313,8 +313,8 @@ class SfMaintenanceEquipment(models.Model): robot_track_dimensions_H = fields.Char('轨道尺寸(高)') robot_drive_mode = fields.Char('驱动方式') robot_installation_method = fields.Selection([('置地式', '置地式'), ('壁挂式', '壁挂式'), ('倒挂式', '倒挂式')], string='安装方式') - robot_operating_temperature = fields.Char('环境温度') - robot_operating_humidity = fields.Char('环境湿度') + robot_operating_temperature = fields.Char('机器人环境温度') + robot_operating_humidity = fields.Char('机器人环境湿度') # 其他参数(所有设备) date_of_purchase = fields.Date('采购日期') diff --git a/sf_maintenance/models/sf_maintenance_requests.py b/sf_maintenance/models/sf_maintenance_requests.py index fad9e55f..330c1ece 100644 --- a/sf_maintenance/models/sf_maintenance_requests.py +++ b/sf_maintenance/models/sf_maintenance_requests.py @@ -25,7 +25,7 @@ class SfMaintenanceEquipmentCategory(models.Model): if not record.equipment_maintenance_id: record.equipment_maintenance_id = False - maintenance_standards = fields.Many2many('maintenance.standards', string='维保标准') + maintenance_standards = fields.Many2many('maintenance.standards', string='维保项目') @api.constrains('equipment_maintenance_id') def _check_equipment_maintenance_id(self): diff --git a/sf_maintenance/views/maintenance_request_views.xml b/sf_maintenance/views/maintenance_request_views.xml index 83bd6e44..1ad030b8 100644 --- a/sf_maintenance/views/maintenance_request_views.xml +++ b/sf_maintenance/views/maintenance_request_views.xml @@ -1,5 +1,63 @@ + + + + + maintenance.standards.form + maintenance.standards + +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + +
+
+
+
+ + + + + + +
+
+ +
+
+ +
+
+ + + Maintenance Standards + maintenance.standards + tree,form + + @@ -21,17 +79,16 @@ - - - - - + + + + - + + - @@ -71,40 +128,5 @@ - - - - maintenance.standards.form - maintenance.standards - -
- - - - - - - - - - - - - - - - - - - - - - - - -
-
-
-
\ No newline at end of file