调整代码结构
This commit is contained in:
@@ -264,11 +264,12 @@ div[class="o_content o_component_with_search_panel"] .o_kanban_primary_right > .
|
||||
}
|
||||
|
||||
div[class="o_content o_component_with_search_panel"] .o_kanban_card_content button {
|
||||
|
||||
left: -95px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//.o_kanban_renderer .o_kanban_record .o_kanban_record_bottom {
|
||||
// display: flex !important;
|
||||
// flex-direction: column;
|
||||
@@ -283,6 +284,7 @@ div[class="o_content o_component_with_search_panel"] .o_kanban_primary_right > .
|
||||
.o_kanban_renderer .o_kanban_record .o_kanban_record_bottom > div:nth-child(1) {
|
||||
margin-top: -5px;
|
||||
margin-bottom: 5px;
|
||||
|
||||
}
|
||||
|
||||
.text-bg-warning {
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
],
|
||||
'assets': {
|
||||
'web.assets_backend': [
|
||||
'sf_machine_connect/static/src/xml/barcode_button.xml',
|
||||
'sf_machine_connect/static/src/js/barcode_button.js',
|
||||
'sf_machine_connect/static/src/css/barcode_button.css',
|
||||
# 'sf_machine_connect/static/src/xml/barcode_button.xml',
|
||||
# 'sf_machine_connect/static/src/js/barcode_button.js',
|
||||
# 'sf_machine_connect/static/src/css/barcode_button.css',
|
||||
],
|
||||
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -29,6 +29,69 @@
|
||||
<field name="active" eval="False"/>
|
||||
</record>
|
||||
|
||||
<!-- 隐藏讨论 -->
|
||||
<record id="mail.menu_root_discuss" model="ir.ui.menu">
|
||||
<field name="active" eval="False"/>
|
||||
</record>
|
||||
|
||||
<!-- 调整采购菜单顺序 -->
|
||||
<record id="purchase.menu_purchase_root" model="ir.ui.menu">
|
||||
<field name="sequence" eval="33"/>
|
||||
</record>
|
||||
|
||||
<!-- 调整计划菜单顺序 -->
|
||||
<record id="sf_plan.sf_production_plan_menu" model="ir.ui.menu">
|
||||
<field name="sequence" eval="36"/>
|
||||
</record>
|
||||
|
||||
<!-- 调整制造菜单顺序 -->
|
||||
<record id="mrp.menu_mrp_root" model="ir.ui.menu">
|
||||
<field name="sequence" eval="39"/>
|
||||
</record>
|
||||
|
||||
<!-- 调整质量菜单顺序 -->
|
||||
<record id="quality_control.menu_quality_root" model="ir.ui.menu">
|
||||
<field name="sequence" eval="42"/>
|
||||
</record>
|
||||
|
||||
<!-- 调整设备菜单顺序 -->
|
||||
<record id="maintenance.menu_maintenance_title" model="ir.ui.menu">
|
||||
<field name="sequence" eval="45"/>
|
||||
</record>
|
||||
|
||||
<!-- 调整条码菜单顺序 -->
|
||||
<record id="stock_barcode.stock_barcode_menu" model="ir.ui.menu">
|
||||
<field name="sequence" eval="48"/>
|
||||
</record>
|
||||
|
||||
<!-- 调整库存菜单顺序 -->
|
||||
<record id="stock.menu_stock_root" model="ir.ui.menu">
|
||||
<field name="sequence" eval="51"/>
|
||||
</record>
|
||||
|
||||
<!-- 调整仪表板菜单顺序 -->
|
||||
<record id="spreadsheet_dashboard.spreadsheet_dashboard_menu_root" model="ir.ui.menu">
|
||||
<field name="sequence" eval="54"/>
|
||||
</record>
|
||||
|
||||
<!-- 调整开票菜单名字及顺序 -->
|
||||
<record id="account.menu_finance" model="ir.ui.menu">
|
||||
<field name="name">应收应付</field>
|
||||
<field name="sequence" eval="57"/>
|
||||
</record>
|
||||
<!-- 隐藏跟踪链 -->
|
||||
<record id="utm.menu_link_tracker_root" model="ir.ui.menu">
|
||||
<field name="active" eval="False"/>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<!-- <record id="mrp_workorder.menu_mrp_workorder_workcenter" model="ir.ui.menu"> -->
|
||||
<!-- <field name="name">工单计划</field> -->
|
||||
<!-- <field name="sequence" eval="300"/> -->
|
||||
<!-- <field name="parent_id" ref="sf_plan.sf_production_plan_menu"/> -->
|
||||
<!-- </record> -->
|
||||
|
||||
|
||||
</data>
|
||||
</odoo>
|
||||
BIN
web_enterprise/static/img/jikimo_backgroud.png
Normal file
BIN
web_enterprise/static/img/jikimo_backgroud.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
@@ -684,10 +684,19 @@ export default AbstractRenderer.extend(WidgetAdapterMixin, {
|
||||
const stopDate = this.state.stopDate;
|
||||
let day = this.state.startDate;
|
||||
const dates = [];
|
||||
const shift_time = 8;
|
||||
if (this.state.scale == "day") {
|
||||
while (day <= stopDate) {
|
||||
dates.push(day);
|
||||
day = day.clone().add(shift_time, token);
|
||||
}
|
||||
} else {
|
||||
while (day <= stopDate) {
|
||||
dates.push(day);
|
||||
day = day.clone().add(1, token);
|
||||
}
|
||||
}
|
||||
console.log(dates)
|
||||
return dates;
|
||||
},
|
||||
/**
|
||||
@@ -806,6 +815,7 @@ export default AbstractRenderer.extend(WidgetAdapterMixin, {
|
||||
* @override
|
||||
*/
|
||||
async _renderView() {
|
||||
console.log('this.state', this.state)
|
||||
const oldRowWidgets = Object.keys(this.rowWidgets).map((rowId) => {
|
||||
return this.rowWidgets[rowId];
|
||||
});
|
||||
|
||||
@@ -457,16 +457,50 @@ var GanttRow = Widget.extend({
|
||||
this.pills.forEach(function (pill) {
|
||||
let widthPill;
|
||||
let margin;
|
||||
const shift_time = 8;
|
||||
switch (self.state.scale) {
|
||||
case 'day':
|
||||
left = pill.startDate.diff(pill.startDate.clone().startOf('hour'), 'minutes');
|
||||
pill.leftMargin = (left / 60) * 100;
|
||||
// left = pill.startDate.diff(pill.startDate.clone().startOf('hour'), 'minutes');
|
||||
left = pill.startDate.diff(pill.startDate.clone().startOf('day'), 'minutes') % (shift_time * 60);
|
||||
|
||||
console.log('left', left)
|
||||
pill.leftMargin = (left / (shift_time * 60)) * 100;
|
||||
console.log('pill.leftMargin', pill.leftMargin)
|
||||
diff = pill.stopDate.diff(pill.startDate, 'minutes');
|
||||
var gapSize = pill.stopDate.diff(pill.startDate, 'hours') - 1; // Eventually compensate border(s) width
|
||||
widthPill = (diff / 60) * 100;
|
||||
console.log('diff', diff)
|
||||
var gapSize = pill.stopDate.diff(pill.startDate, 'hours') - shift_time; // Eventually compensate border(s) width
|
||||
console.log('gapSize', gapSize)
|
||||
widthPill = (diff / (shift_time * 60)) * 100;
|
||||
console.log('widthPill', widthPill)
|
||||
margin = pill.aggregatedPills ? 0 : 4;
|
||||
console.log('margin', margin)
|
||||
pill.width = gapSize > 0 ? `calc(${widthPill}% + ${gapSize}px - ${margin}px)` : `calc(${widthPill}% - ${margin}px)`;
|
||||
console.log('pill.width', pill.width)
|
||||
break;
|
||||
|
||||
// left = pill.startDate.diff(pill.startDate.clone().startOf('hour'), 'minutes');
|
||||
// console.log('left', left)
|
||||
// left = (left / (8 * 60)) * 100; // 修改这里,以8小时为单位
|
||||
// console.log('adjusted left', left)
|
||||
// pill.leftMargin = left;
|
||||
//
|
||||
// diff = pill.stopDate.diff(pill.startDate, 'minutes');
|
||||
// console.log('diff', diff)
|
||||
// diff = (diff / (8 * 60)) * 100; // 修改这里,以8小时为单位
|
||||
// console.log('adjusted diff', diff)
|
||||
//
|
||||
// var gapSize = pill.stopDate.diff(pill.startDate, 'hours') / 8 - 1; // 修改这里,以8小时为单位
|
||||
// console.log('gapSize', gapSize)
|
||||
//
|
||||
// widthPill = diff;
|
||||
// console.log('widthPill', widthPill)
|
||||
//
|
||||
// margin = pill.aggregatedPills ? 0 : 4;
|
||||
// console.log('margin', margin)
|
||||
//
|
||||
// pill.width = gapSize > 0 ? `calc(${widthPill}% + ${gapSize}px - ${margin}px)` : `calc(${widthPill}% - ${margin}px)`;
|
||||
// console.log('pill.width', pill.width)
|
||||
// break;
|
||||
case 'week':
|
||||
case 'month':
|
||||
left = pill.startDate.diff(pill.startDate.clone().startOf('day'), 'hours');
|
||||
@@ -666,21 +700,28 @@ var GanttRow = Widget.extend({
|
||||
* @private
|
||||
*/
|
||||
_insertIntoSlot: function () {
|
||||
console.log('this.slots', this.slots);
|
||||
var slotsToFill = this.slots;
|
||||
this.pills.forEach(function (currentPill) {
|
||||
var skippedSlots = [];
|
||||
slotsToFill.some(function (currentSlot) {
|
||||
console.log('currentPill.startDate1111111111', currentPill)
|
||||
// console.log('currentSlot.stop2222222222222', currentSlot.stop)
|
||||
var fitsInThisSlot = currentPill.startDate < currentSlot.stop;
|
||||
console.log('fitsInThisSlot', fitsInThisSlot)
|
||||
if (fitsInThisSlot) {
|
||||
currentSlot.pills.push(currentPill);
|
||||
console.log('currentSlot.pills', currentSlot.pills)
|
||||
} else {
|
||||
skippedSlots.push(currentSlot);
|
||||
console.log('skippedSlots', skippedSlots)
|
||||
}
|
||||
return fitsInThisSlot;
|
||||
});
|
||||
// Pills are sorted by start date, so any slot that was skipped
|
||||
// for this pill will not be suitable for any of the next pills
|
||||
slotsToFill = _.difference(slotsToFill, skippedSlots);
|
||||
console.log('slotsToFill', slotsToFill)
|
||||
});
|
||||
},
|
||||
/**
|
||||
@@ -727,7 +768,7 @@ var GanttRow = Widget.extend({
|
||||
let index = 0;
|
||||
for (const date of this.viewInfo.slots) {
|
||||
const slotStart = date;
|
||||
const slotStop = date.clone().add(1, interval);
|
||||
const slotStop = date.clone().add(8, interval);
|
||||
const isToday = date.isSame(new Date(), 'day') && this.state.scale !== 'day';
|
||||
|
||||
let slotStyle = '';
|
||||
@@ -759,6 +800,7 @@ var GanttRow = Widget.extend({
|
||||
stop: slotStop,
|
||||
pills: [],
|
||||
});
|
||||
console.log('啊啊啊啊this啊啊啊啊.啊啊啊啊slots啊啊啊啊', this.slots)
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -76,8 +76,17 @@
|
||||
<div t-attf-class="col position-relative o_gantt_header_cell text-center p-2 #{isToday? 'o_gantt_today' : ''} ">
|
||||
<t t-if="widget.state.scale in formats" t-esc="slot.format(formats[widget.state.scale])"/>
|
||||
<small t-else="">
|
||||
<b t-esc="slot.format('k')"/>
|
||||
<span class="d-block d-xl-inline-block" t-esc="slot.format('a')"/>
|
||||
<t t-if="slot.format('k') == 24">
|
||||
<div>夜班</div>
|
||||
</t>
|
||||
<t t-if="slot.format('k') == 8">
|
||||
<div>早班</div>
|
||||
</t>
|
||||
<t t-if="slot.format('k') == 16">
|
||||
<div>晚班</div>
|
||||
</t>
|
||||
<!-- <b t-esc="slot.format('k')"/> -->
|
||||
<!-- <span class="d-block d-xl-inline-block" t-esc="slot.format('a')"/> -->
|
||||
</small>
|
||||
</div>
|
||||
</t>
|
||||
|
||||
Reference in New Issue
Block a user