Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dwsproject
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dws
dwsproject
Commits
a360f704
Commit
a360f704
authored
Nov 23, 2024
by
夏超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 修改问题
parent
f18812ae
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
40 deletions
+84
-40
jzjx_project/controllers/inherit_production.py
+14
-0
jzjx_project/controllers/roke_work_order.py
+16
-0
jzjx_project/models/inherit_roke_routing.py
+0
-5
jzjx_project/static/src/html/view/craft_design.html
+54
-35
No files found.
jzjx_project/controllers/inherit_production.py
View file @
a360f704
...
@@ -21,8 +21,22 @@ class JzjxInheritProduction(InheritProduction):
...
@@ -21,8 +21,22 @@ class JzjxInheritProduction(InheritProduction):
"""
"""
res
=
super
(
JzjxInheritProduction
,
self
)
.
_get_work_record_values
(
wo
,
values
)
res
=
super
(
JzjxInheritProduction
,
self
)
.
_get_work_record_values
(
wo
,
values
)
repair_process_id
=
values
.
get
(
'process_id'
,
False
)
# 工序
repair_process_id
=
values
.
get
(
'process_id'
,
False
)
# 工序
scrap_list
,
_
=
values
.
get
(
"scrap_list"
,
[]),
values
.
get
(
"repair_list"
,
[])
if
repair_process_id
:
if
repair_process_id
:
res
.
update
({
"repair_process_id"
:
repair_process_id
})
res
.
update
({
"repair_process_id"
:
repair_process_id
})
no_scrap_detail_ids
=
[]
for
scrap
in
scrap_list
:
scrap_qty
=
float
(
scrap
.
get
(
"qty"
,
0
))
if
scrap_qty
:
continue
no_scrap_detail_ids
.
append
((
0
,
0
,
{
'reason_id'
:
int
(
scrap
.
get
(
"reason_id"
)),
'qty'
:
scrap_qty
,
'note'
:
scrap
.
get
(
"note"
)
}))
res
.
update
({
"scrap_detail_ids"
:
res
.
get
(
"scrap_detail_ids"
,
[])
+
no_scrap_detail_ids
,
})
return
res
return
res
def
check_join_in_data
(
self
,
values
):
def
check_join_in_data
(
self
,
values
):
...
...
jzjx_project/controllers/roke_work_order.py
View file @
a360f704
...
@@ -267,3 +267,19 @@ class RokeWorkstationWorkOrderModel(http.Controller):
...
@@ -267,3 +267,19 @@ class RokeWorkstationWorkOrderModel(http.Controller):
break
break
work_record
.
scrap_line_ids
.
order_id
.
write
({
"is_rfe"
:
True
})
work_record
.
scrap_line_ids
.
order_id
.
write
({
"is_rfe"
:
True
})
return
{
"code"
:
0
,
"message"
:
f
"补件工单创建成功!"
}
return
{
"code"
:
0
,
"message"
:
f
"补件工单创建成功!"
}
@http.route
(
'/roke/workstation/craft_design/workstation_work_process_check_work_order'
,
type
=
'json'
,
auth
=
'user'
,
csrf
=
False
,
cors
=
"*"
)
def
workstation_work_process_check_work_order
(
self
):
"""
根据工艺路线重新生成工单
"""
_self
=
http
.
request
routing_id
=
_self
.
jsonrequest
.
get
(
"routing_id"
,
0
)
routing
=
_self
.
env
[
"roke.routing"
]
.
search
([(
"id"
,
"="
,
routing_id
)])
if
not
routing
.
routing_task_id
:
return
{
"code"
:
0
,
"message"
:
f
"工艺没有相应的任务!"
}
routing
.
routing_task_id
.
write
({
"work_order_ids"
:
routing
.
routing_task_id
.
change_routing_id_work_order
(
routing
)
})
return
{
"code"
:
0
,
"message"
:
f
"工艺路线生成工单成功!"
}
jzjx_project/models/inherit_roke_routing.py
View file @
a360f704
...
@@ -66,9 +66,4 @@ class InheritRokeRoutingLineModel(models.Model):
...
@@ -66,9 +66,4 @@ class InheritRokeRoutingLineModel(models.Model):
def
write
(
self
,
vals
):
def
write
(
self
,
vals
):
res
=
super
(
InheritRokeRoutingLineModel
,
self
)
.
write
(
vals
)
res
=
super
(
InheritRokeRoutingLineModel
,
self
)
.
write
(
vals
)
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
(
v
.
routing_id
)
})
return
res
return
res
jzjx_project/static/src/html/view/craft_design.html
View file @
a360f704
...
@@ -144,30 +144,30 @@
...
@@ -144,30 +144,30 @@
<div
style=
"width: 100%;"
>
<div
style=
"width: 100%;"
>
<div>
<div>
<el-image
style=
"width: 1rem; height: 1rem;margin-right: 5px;"
<el-image
style=
"width: 1rem; height: 1rem;margin-right: 5px;"
:src=
"baseURL+scope.row.thumbnail"
fit=
"contain"
>
:src=
"baseURL+scope.row.thumbnail"
fit=
"contain"
>
</el-image>
</el-image>
[[scope.row.name]]
[[scope.row.name]]
</div>
</div>
</div>
</div>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
label=
"上传人"
align=
"center"
width=
"120"
>
<el-table-column
label=
"上传人"
align=
"center"
width=
"120"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<div
>
<div>
[[scope.row.create_user]]
[[scope.row.create_user]]
</div>
</div>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
label=
"上传时间"
align=
"center"
width=
"180"
>
<el-table-column
label=
"上传时间"
align=
"center"
width=
"180"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<div
>
<div>
[[dateTimeHandle(scope.row.create_date)]]
[[dateTimeHandle(scope.row.create_date)]]
</div>
</div>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column
label=
"文件类型"
align=
"center"
width=
"100"
>
<el-table-column
label=
"文件类型"
align=
"center"
width=
"100"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<div
>
<div>
[[
[[
getFileTypeHandle(scope.row.mimetype)!='其它文件'?getFileTypeHandle(scope.row.mimetype):
getFileTypeHandle(scope.row.mimetype)!='其它文件'?getFileTypeHandle(scope.row.mimetype):
getFileSuffixHandle(scope.row.name) ]]
getFileSuffixHandle(scope.row.name) ]]
...
@@ -288,8 +288,9 @@
...
@@ -288,8 +288,9 @@
</div>
</div>
<!-- 关键物料 -->
<!-- 关键物料 -->
<div
v-if=
"activeIndex=='关键物料'"
style=
"width: 100%; padding: 0 15px;"
>
<div
v-if=
"activeIndex=='关键物料'"
style=
"width: 100%; padding: 0 15px;"
>
<el-table
ref=
"keyMaterials"
:data=
"isEdit?key_materials_listTow:key_materials_list"
:height=
"windowHeight"
<el-table
ref=
"keyMaterials"
:data=
"isEdit?key_materials_listTow:key_materials_list"
:header-cell-style=
"{backgroundColor:'#f5f7fa'}"
style=
"width: 100%"
>
:height=
"windowHeight"
:header-cell-style=
"{backgroundColor:'#f5f7fa'}"
style=
"width: 100%"
>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"50"
></el-table-column>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"50"
></el-table-column>
<el-table-column
label=
"物料名称"
align=
"center"
>
<el-table-column
label=
"物料名称"
align=
"center"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
...
@@ -329,7 +330,8 @@
...
@@ -329,7 +330,8 @@
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<div
style=
"padding: 10px;"
>
<div
style=
"padding: 10px;"
>
<el-button
type=
"primary"
size=
"small"
:disabled=
"!selProductProcessData||isEdit"
@
click=
"addInfoHandle('关键物料')"
>
<el-button
type=
"primary"
size=
"small"
:disabled=
"!selProductProcessData||isEdit"
@
click=
"addInfoHandle('关键物料')"
>
添加
添加
</el-button>
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"editInfoHandle('关键物料')"
<el-button
type=
"primary"
size=
"small"
@
click=
"editInfoHandle('关键物料')"
...
@@ -663,7 +665,7 @@
...
@@ -663,7 +665,7 @@
qty
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'请输入数量'
}],
qty
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'请输入数量'
}],
must
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'请选择是否必投'
}],
must
:
[{
required
:
true
,
trigger
:
'blur'
,
message
:
'请选择是否必投'
}],
},
},
selProcessHandleItem
:
null
selProcessHandleItem
:
null
}
}
},
},
computed
:
{
computed
:
{
...
@@ -771,6 +773,21 @@
...
@@ -771,6 +773,21 @@
},
},
methods
:
{
methods
:
{
// 更新
workstation_work_process_check_work_order
()
{
axios
({
method
:
"POST"
,
url
:
this
.
baseURL
+
"/roke/workstation/craft_design/workstation_work_process_check_work_order"
,
data
:
{
routing_id
:
this
.
routingData
.
routing_id
},
headers
:
{
'Content-Type'
:
'application/json'
,
},
}).
then
((
result
)
=>
{
})
},
// 接口请求方法封装
// 接口请求方法封装
requestApi
(
url
,
config
,
errorMessage
=
"操作失败,请稍后重试"
,
contentType
=
'application/json'
)
{
requestApi
(
url
,
config
,
errorMessage
=
"操作失败,请稍后重试"
,
contentType
=
'application/json'
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
@@ -1804,6 +1821,7 @@
...
@@ -1804,6 +1821,7 @@
let
processConfig
=
{
let
processConfig
=
{
routing_id
:
this
.
routingData
.
routing_id
routing_id
:
this
.
routingData
.
routing_id
}
}
this
.
workstation_work_process_check_work_order
()
this
.
getProductProcessListApi
(
processConfig
).
then
(
result
=>
{
this
.
getProductProcessListApi
(
processConfig
).
then
(
result
=>
{
this
.
loading
=
false
this
.
loading
=
false
result
.
result
.
data
.
forEach
(
item
=>
{
result
.
result
.
data
.
forEach
(
item
=>
{
...
@@ -2037,6 +2055,7 @@
...
@@ -2037,6 +2055,7 @@
this
.
$message
.
success
(
result
.
result
.
message
)
this
.
$message
.
success
(
result
.
result
.
message
)
this
.
loading
=
false
this
.
loading
=
false
this
.
dialogCloseHandle
(
'添加产品工序'
)
this
.
dialogCloseHandle
(
'添加产品工序'
)
this
.
workstation_work_process_check_work_order
()
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
this
.
errorHandle
(
'添加成功,但数据刷新失败,请手动刷新当前页面!'
,
true
)
this
.
errorHandle
(
'添加成功,但数据刷新失败,请手动刷新当前页面!'
,
true
)
})
})
...
@@ -2206,18 +2225,18 @@
...
@@ -2206,18 +2225,18 @@
}
}
this
.
loading
=
true
this
.
loading
=
true
this
.
requestApi
(
'/roke/workstation/craft_design/workstation_bom/create'
,
config
).
then
(
data
=>
{
this
.
requestApi
(
'/roke/workstation/craft_design/workstation_bom/create'
,
config
).
then
(
data
=>
{
if
(
data
.
result
.
code
==
0
)
{
if
(
data
.
result
.
code
==
0
)
{
let
config
=
{
let
config
=
{
routing_line_id
:
this
.
selProcessHandleItem
.
line_id
routing_line_id
:
this
.
selProcessHandleItem
.
line_id
}
}
this
.
getworkstation_bom
(
config
).
then
(
result
=>
{
this
.
getworkstation_bom
(
config
).
then
(
result
=>
{
result
.
result
.
data
.
forEach
(
item
=>
{
result
.
result
.
data
.
forEach
(
item
=>
{
item
[
'show'
]
=
false
item
[
'show'
]
=
false
})
})
this
.
key_materials_list
=
result
.
result
.
data
this
.
key_materials_list
=
result
.
result
.
data
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
this
.
errorHandle
(
error
,
true
)
this
.
errorHandle
(
error
,
true
)
})
})
}
}
this
.
loading
=
false
this
.
loading
=
false
this
.
$message
.
success
(
data
.
result
.
message
)
this
.
$message
.
success
(
data
.
result
.
message
)
...
@@ -2464,7 +2483,7 @@
...
@@ -2464,7 +2483,7 @@
menuSelectHandle
(
index
)
{
menuSelectHandle
(
index
)
{
this
.
activeIndex
=
index
this
.
activeIndex
=
index
this
.
isEdit
=
false
this
.
isEdit
=
false
if
(
index
===
'关键物料'
)
{
if
(
index
===
'关键物料'
)
{
this
.
searchProductValue
=
''
this
.
searchProductValue
=
''
this
.
getProductListApi
().
then
(
result
=>
{
this
.
getProductListApi
().
then
(
result
=>
{
this
.
loading
=
false
this
.
loading
=
false
...
@@ -2642,19 +2661,19 @@
...
@@ -2642,19 +2661,19 @@
})
})
this
.
loading
=
true
this
.
loading
=
true
this
.
requestApi
(
'/roke/workstation/craft_design/workstation_bom/update'
,
{
bom_info
:
standard_info
}).
then
(
result
=>
{
this
.
requestApi
(
'/roke/workstation/craft_design/workstation_bom/update'
,
{
bom_info
:
standard_info
}).
then
(
result
=>
{
if
(
result
.
result
.
code
==
0
)
{
if
(
result
.
result
.
code
==
0
)
{
let
config
=
{
let
config
=
{
routing_line_id
:
this
.
selProcessHandleItem
.
line_id
routing_line_id
:
this
.
selProcessHandleItem
.
line_id
}
}
this
.
getworkstation_bom
(
config
).
then
(
result
=>
{
this
.
getworkstation_bom
(
config
).
then
(
result
=>
{
result
.
result
.
data
.
forEach
(
item
=>
{
result
.
result
.
data
.
forEach
(
item
=>
{
item
[
'show'
]
=
false
item
[
'show'
]
=
false
})
})
this
.
key_materials_list
=
result
.
result
.
data
this
.
key_materials_list
=
result
.
result
.
data
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
this
.
errorHandle
(
error
,
true
)
this
.
errorHandle
(
error
,
true
)
})
})
}
}
this
.
loading
=
false
this
.
loading
=
false
this
.
$message
.
success
(
result
.
result
.
message
)
this
.
$message
.
success
(
result
.
result
.
message
)
this
.
isEdit
=
false
this
.
isEdit
=
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment