Accept Merge Request #390: (feature/制造-计划优化 -> develop)

Merge Request: 工作中心看板、图文展示样式修改

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/390?initial=true
This commit is contained in:
马广威
2023-09-15 11:00:33 +08:00
committed by Coding
5 changed files with 68 additions and 4 deletions

View File

@@ -159,6 +159,20 @@ td.o_required_modifier {
}
//-----------------------------------------------------------
//图文展示换行及对齐
.many2many_flex {
flex-wrap: wrap;
}
.many2many_flex > div {
width: 110px;
margin-right: 15px;
display: flex;
flex-direction: column;
align-items: flex-start;
}
div[class="o_content o_component_with_search_panel"] .oe_kanban_color_0 {
position: relative;
padding: 0 !important;
@@ -166,6 +180,7 @@ div[class="o_content o_component_with_search_panel"] .oe_kanban_color_0 {
div[class="o_content o_component_with_search_panel"] img[name="equipment_image"] {
width: 150px !important;
height: 150px !important;
}
div[class="o_content o_component_with_search_panel"] .o_kanban_card_content button {
@@ -217,3 +232,10 @@ div[class="o_content o_component_with_search_panel"] .show_state span {
margin-top: 10px;
font-size: 12px;
}
div[class="o_content o_component_with_search_panel"] .o_kanban_primary_right > .row {
position: absolute;
top: 55px;
right: 263px;
}

View File

@@ -177,7 +177,7 @@
</page>
<page string="图文展示">
<page string="加工能力">
<field name='image_id' widget="custom_many2many_checkboxes">
<tree editable="bottom">
<field name="name"/>

View File

@@ -24,6 +24,26 @@
</field>
</record>
<record id="mrp_workcenter_view_kanban_inherit_workorder" model="ir.ui.view">
<field name="name">mrp.workcenter.view.kanban.inherit.mrp.workorder</field>
<field name="model">mrp.workcenter</field>
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
<field name="arch" type="xml">
<!-- Desktop view -->
<xpath expr='(//field[@name="name"])[1]' position="after">
<field name="equipment_status" />
<field name="equipment_image" />
</xpath>
<xpath expr='(//field[@name="name"])[2]' position="after">
<field name="equipment_status" />
<field name="equipment_image" widget="image" />
</xpath>
<xpath expr='(//a[@name="unblock"])' position="after">
<div class="czyg">绿色:正常,红色:故障,黄色:下线/暂停</div>
</xpath>
</field>
</record>
<record id="mrp_workcenter_view_kanban_inherit_workorder" model="ir.ui.view">
<field name="name">mrp.workcenter.view.kanban.inherit.mrp.workorder</field>
<field name="model">mrp.workcenter</field>
@@ -65,6 +85,28 @@
</field>
</record>
<!-- 继承原有的看板视图 -->
<record id="mrp_workcenter_kanban_inherit1" model="ir.ui.view">
<field name="name">mrp.workcenter.kanban.inherit</field>
<field name="model">mrp.workcenter</field>
<field name="inherit_id" ref="mrp.mrp_workcenter_kanban"/>
<field name="arch" type="xml">
<xpath expr="//kanban//templates//t" position="inside">
<p class="show_state" t-attf-class="oe_kanban_global_click o_kanban_record_has_image_fill o_hr_kanban_record oe_kanban_card oe_kanban_global_click
">
<div t-attf-class="#{record.equipment_status.raw_value == '正常' ? 'color_1' : ''}"></div>
<div t-attf-class="#{record.equipment_status.raw_value == '故障' ? 'color_2' : ''}"></div>
<div t-attf-class="#{record.equipment_status.raw_value == '不可用' ? 'color_3' : ''}"></div>
<span t-attf-class="#{record.equipment_status.raw_value == '正常' ? 'font_color_1' : ''}
#{record.equipment_status.raw_value == '故障' ? 'font_color_2' : ''}
#{record.equipment_status.raw_value == '不可用' ? 'font_color_3' : ''}">
<field name="equipment_status"/>
</span>
</p>
</xpath>
</field>
</record>
<!-- override to change the no content image -->
<record id="mrp.action_work_orders" model="ir.actions.act_window">
<field name="help" type="html">

View File

@@ -35,7 +35,7 @@
<button string="取消排程" name="cancel_production_schedule" type="object" class="oe_highlight"/>
<!-- <button string="销售单" name="test_sale_order" type="object" class="oe_highlight"/> -->
<!-- <button string="测试流程" name="liucheng_cs" type="object" class="oe_highlight"/> -->
<!-- <field name="state" widget="statusbar" statusbar_visible="draft,produce"/> -->
<field name="state" widget="statusbar" statusbar_visible="draft,done,processing,finished"/>
</header>
<sheet>
<div class="oe_title">
@@ -128,7 +128,7 @@
decoration-success="state == 'done'"
progress_bar="name"
form_view_id="sf_production_plan_form"
default_scale="year"
default_scale="week"
scales="day,week,month,year"
precision="{'day': 'hour:quarter', 'week': 'day:half', 'month': 'day', 'year': 'month:quarter'}">
<field name="shift"/>

View File

@@ -635,7 +635,7 @@ export default AbstractRenderer.extend(WidgetAdapterMixin, {
const focusDate = this.state.focusDate;
switch (this.state.scale) {
case 'day':
return focusDate.format('dddd, MMMM DD, YYYY');
return focusDate.format('YYYY MMMM DD dddd');
case 'week':
// const dateStart = focusDate.clone().startOf('week').format('DD MMMM YYYY');
const dateStart = focusDate.clone().startOf('week').format('YYYY MMMM DD ');