Commit 787de668 by 夏超

[fix] 修改问题

parent 0c8f2476
......@@ -53,8 +53,7 @@ class InheritProductionTask(models.Model):
def _onchange_routing_id(self):
return super(InheritProductionTask, self)._onchange_routing_id()
def change_routing_id_work_order(self):
routing = self.routing_id
def change_routing_id_work_order(self, routing):
product = self.product_id
plan_qty = self.plan_qty
task_type = self.type
......@@ -147,7 +146,7 @@ class InheritProductionTask(models.Model):
"routing_id": routing_id.id,
})
self.write({
"work_order_ids": self.change_routing_id_work_order()
"work_order_ids": self.change_routing_id_work_order(routing_id)
})
elif not self.routing_id.routing_task_id or self.routing_id.routing_task_id.id != self.id:
routing_id = self.routing_id.copy()
......@@ -157,7 +156,7 @@ class InheritProductionTask(models.Model):
})
self.write({"routing_id": routing_id.id})
self.write({
"work_order_ids": self.change_routing_id_work_order()
"work_order_ids": self.change_routing_id_work_order(routing_id)
})
else:
routing_id = self.routing_id
......
......@@ -69,6 +69,6 @@ class InheritRokeRoutingLineModel(models.Model):
for v in self:
if v.routing_id.routing_task_id:
v.routing_id.routing_task_id.write({
"work_order_ids": v.routing_id.routing_task_id.change_routing_id_work_order()
"work_order_ids": v.routing_id.routing_task_id.change_routing_id_work_order(v.routing_id)
})
return res
......@@ -141,31 +141,33 @@
<el-table-column type="index" label="序号" align="center" width="50"></el-table-column>
<el-table-column label="工艺文件名称" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<div style="display: flex; align-items: center; ">
<div style="width: 100%;">
<div>
<el-image style="width: 1rem; height: 1rem;margin-right: 5px;"
:src="baseURL+scope.row.thumbnail" fit="contain">
</el-image>
[[scope.row.name]]
</div>
</div>
</template>
</el-table-column>
<el-table-column label="上传人" align="center" width="80">
<el-table-column label="上传人" align="center" width="120">
<template slot-scope="scope">
<div style="display: flex; align-items: center; ">
<div >
[[scope.row.create_user]]
</div>
</template>
</el-table-column>
<el-table-column label="上传时间" align="center" width="160">
<el-table-column label="上传时间" align="center" width="180">
<template slot-scope="scope">
<div style="display: flex; align-items: center; ">
<div >
[[dateTimeHandle(scope.row.create_date)]]
</div>
</template>
</el-table-column>
<el-table-column label="文件类型" align="center" width="100">
<template slot-scope="scope">
<div style="display: flex; align-items: center; ">
<div >
[[
getFileTypeHandle(scope.row.mimetype)!='其它文件'?getFileTypeHandle(scope.row.mimetype):
getFileSuffixHandle(scope.row.name) ]]
......
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