优化图文展示样式
This commit is contained in:
@@ -149,3 +149,15 @@ 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;
|
||||||
|
}
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
|
|
||||||
</page>
|
</page>
|
||||||
|
|
||||||
<page string="图文展示">
|
<page string="加工能力">
|
||||||
<field name='image_id' widget="custom_many2many_checkboxes">
|
<field name='image_id' widget="custom_many2many_checkboxes">
|
||||||
<tree editable="bottom">
|
<tree editable="bottom">
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
|
|||||||
@@ -31,24 +31,32 @@
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<!-- Desktop view -->
|
<!-- Desktop view -->
|
||||||
<xpath expr='(//field[@name="name"])[1]' position="after">
|
<xpath expr='(//field[@name="name"])[1]' position="after">
|
||||||
|
|
||||||
<field name="equipment_status" />
|
<field name="equipment_status" />
|
||||||
<field name="equipment_image" />
|
<field name="equipment_image" />
|
||||||
|
|
||||||
|
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr='(//field[@name="name"])[2]' position="after">
|
<xpath expr='(//field[@name="name"])[2]' position="after">
|
||||||
|
|
||||||
<field name="equipment_status" />
|
<field name="equipment_status" />
|
||||||
<field name="equipment_image" widget="image" />
|
<field name="equipment_image" widget="image" />
|
||||||
|
|
||||||
|
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr='(//a[@name="unblock"])' position="after">
|
<xpath expr='(//a[@name="unblock"])' position="after">
|
||||||
|
|
||||||
<div class="czyg">绿色:正常,红色:故障,黄色:下线/暂停</div>
|
<div class="czyg">绿色:正常,红色:故障,黄色:下线/暂停</div>
|
||||||
|
</xpath>
|
||||||
|
</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">
|
||||||
|
<div 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>
|
||||||
|
</div>
|
||||||
</xpath>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<button string="取消排程" name="cancel_production_schedule" type="object" class="oe_highlight"/>
|
<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="test_sale_order" type="object" class="oe_highlight"/> -->
|
||||||
<!-- <button string="测试流程" name="liucheng_cs" 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>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_title">
|
<div class="oe_title">
|
||||||
@@ -128,7 +128,7 @@
|
|||||||
decoration-success="state == 'done'"
|
decoration-success="state == 'done'"
|
||||||
progress_bar="name"
|
progress_bar="name"
|
||||||
form_view_id="sf_production_plan_form"
|
form_view_id="sf_production_plan_form"
|
||||||
default_scale="year"
|
default_scale="week"
|
||||||
scales="day,week,month,year"
|
scales="day,week,month,year"
|
||||||
precision="{'day': 'hour:quarter', 'week': 'day:half', 'month': 'day', 'year': 'month:quarter'}">
|
precision="{'day': 'hour:quarter', 'week': 'day:half', 'month': 'day', 'year': 'month:quarter'}">
|
||||||
<field name="shift"/>
|
<field name="shift"/>
|
||||||
|
|||||||
@@ -635,7 +635,7 @@ export default AbstractRenderer.extend(WidgetAdapterMixin, {
|
|||||||
const focusDate = this.state.focusDate;
|
const focusDate = this.state.focusDate;
|
||||||
switch (this.state.scale) {
|
switch (this.state.scale) {
|
||||||
case 'day':
|
case 'day':
|
||||||
return focusDate.format('dddd, MMMM DD, YYYY');
|
return focusDate.format('YYYY MMMM DD dddd');
|
||||||
case 'week':
|
case 'week':
|
||||||
// const dateStart = focusDate.clone().startOf('week').format('DD MMMM YYYY');
|
// const dateStart = focusDate.clone().startOf('week').format('DD MMMM YYYY');
|
||||||
const dateStart = focusDate.clone().startOf('week').format('YYYY MMMM DD ');
|
const dateStart = focusDate.clone().startOf('week').format('YYYY MMMM DD ');
|
||||||
|
|||||||
Reference in New Issue
Block a user