yun_product/yuthon_will_task/views/task_template.xml
2026-07-25 14:23:19 +08:00

70 lines
3.1 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="task_detail_template" name="任务详情模板">
<t t-call="web.layout">
<t t-set="head">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<link rel="stylesheet" type="text/css"
href="/yuthon_will_task/static/src/css/task_detail.css" />
</t>
<div class="task-detail-container">
<h1 class="main-title">
<t t-esc="name" />
</h1>
<div class="time-info">
<t t-set="weekday_map"
t-value="{'0':'一','1':'二','2':'三','3':'四','4':'五','5':'六','6':'日'}" />
<t t-if="start_date and start_date != 'False'">
<span t-esc="start_date" />
<t t-set="date_obj"
t-value="datetime.datetime.strptime(start_date, '%Y-%m-%d')" />
<span>(星期<t t-esc="weekday_map[str(date_obj.weekday())]" /></span>
<t t-if="request_hour_from and request_hour_to">
<t t-set="from_time"
t-value="request_hour_from.replace('.5', ':30').replace('.0', ':00') if '.' in request_hour_from else request_hour_from + ':00'" />
<t t-set="to_time"
t-value="request_hour_to.replace('.5', ':30').replace('.0', ':00') if '.' in request_hour_to else request_hour_to + ':00'" />
<span> 时间:<t t-esc="from_time" /> - <t t-esc="to_time" /></span>
</t>
</t>
</div>
<div class="address-info"> 地址: <t t-esc="address" />
</div>
<div class="info-list">
<div class="info-item">
<div class="info-label">组织人</div>
<div class="info-value right-align-value">
<t t-esc="user_id" />
</div>
</div>
<div class="info-item">
<div class="info-label">参与人</div>
<div class="info-value right-align-value ">
<t t-esc="employee_ids" />
</div>
</div>
<div class="info-item description-item">
<div class="info-label">描述</div>
<div class="info-value ">
<t t-esc="description" />
</div>
</div>
<div class="info-item">
<div class="info-label">任务编号</div>
<div class="info-value right-align-value">
<t t-esc="code" />
</div>
</div>
</div>
</div>
</t>
</template>
</odoo>