Commit ac64f852 by 夏超

[add] 新增工艺设计前端页面,修改返修单数量问题

parent 97a7f48e
......@@ -28,7 +28,7 @@ class RokeWorkstationWorkOrderModel(http.Controller):
"routing_id": routing_id,
"user_id": user_id
}
template = env.get_template('/src/html/index.html')
template = env.get_template('/src/html/view/craft_design.html')
html = template.render(values)
return html
......
......@@ -9,6 +9,7 @@ class InheritWorkOrder(models.Model):
repair_task_id = fields.Many2one('roke.production.task', string="上级任务")
def write(self, vals):
old_finish_qty = self.finish_qty
id_dict = {}
for v in self:
id_dict[str(v.id)] = v.state
......@@ -22,13 +23,19 @@ class InheritWorkOrder(models.Model):
repair_order_id = self.env["roke.repair.order.line"].sudo().search([
("repair_work_order_id", "=", self.id)], limit=1)
if repair_order_id:
repair_order_id.write({"state": "返修完成"})
repair_order_id.write({
"state": "返修完成",
"execute_qty": repair_order_id.execute_qty + self.finish_qty
})
repair_order_id.order_id.write({"state": "返修完成"})
if state == "未完工" and old_state in ["暂停", "强制完工", "已完工"]:
repair_order_id = self.env["roke.repair.order.line"].sudo().search([
("repair_work_order_id", "=", self.id)], limit=1)
if repair_order_id:
repair_order_id.write({"state": "返修中"})
repair_order_id.write({
"state": "返修中",
"execute_qty": repair_order_id.execute_qty + self.finish_qty - old_finish_qty
})
repair_order_id.order_id.write({"state": "返修中"})
return res
......
@font-face {
font-family: "iconfont"; /* Project id 4723859 */
src: url('iconfont.woff2?t=1731743989340') format('woff2'),
url('iconfont.woff?t=1731743989340') format('woff'),
url('iconfont.ttf?t=1731743989340') format('truetype');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-BOM1:before {
content: "\e707";
}
.icon-BOM:before {
content: "\e622";
}
.icon-tuozhuai1:before {
content: "\e611";
}
.icon-chanpin2:before {
content: "\e61b";
}
.icon-chanpin1:before {
content: "\e623";
}
.icon-zhankai:before {
content: "\e60a";
}
.icon-zhedie:before {
content: "\e62f";
}
.icon-wenjianjiazhankai:before {
content: "\e602";
}
.icon-wenjianjiaguanbi:before {
content: "\e74a";
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
[[ product_id ]] [[ routing_id ]]
</body>
</html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment