Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡宝山
template_vue
Commits
e8d4f9fc
Commit
e8d4f9fc
authored
Sep 14, 2023
by
shifangwuji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
九月十四
parent
80d0daee
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1195 additions
and
97 deletions
+1195
-97
application.js
src/api/production/application.js
+28
-0
barcodegeneration.js
src/api/production/barcodegeneration.js
+57
-0
gxlog.js
src/api/production/gxlog.js
+38
-0
index.vue
src/views/production/barcodegeneration/index.vue
+258
-0
index.vue
src/views/production/craftsmanship/index.vue
+195
-97
index.vue
src/views/production/gxlog/index.vue
+619
-0
No files found.
src/api/production/application.js
0 → 100644
View file @
e8d4f9fc
import
request
from
'@/utils/request'
// 根据key值查询数据字典数据
export
function
getBindData
(
params
)
{
return
request
({
url
:
'/wbjl/queryWbjls'
,
method
:
'get'
,
params
})
}
// 新增设备新增
export
function
bindApplication
(
data
)
{
return
request
({
url
:
'/wbjl/add'
,
method
:
'post'
,
data
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
}
})
}
// 分页查询要处理的设备
export
function
getEquipment
(
params
)
{
return
request
({
url
:
'/wbwarehouse/canceListByPagination'
,
method
:
'get'
,
params
})
}
src/api/production/barcodegeneration.js
0 → 100644
View file @
e8d4f9fc
import
request
from
'@/utils/request'
// 查询列表
export
function
queryList
(
params
)
{
return
request
({
url
:
'/ysjbcode/queryysjbcodeByPagination'
,
method
:
'get'
,
params
})
}
// 添加基础信息接口
export
function
add
(
data
)
{
return
request
({
url
:
'/ysjbcode/add'
,
method
:
'post'
,
data
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
}
})
}
// 根据id查询基础信息接口
export
function
getDetailById
(
id
)
{
return
request
({
url
:
'/ysjbcode/detail/'
+
id
,
method
:
'get'
})
}
// 编辑基础信息接口
export
function
updataInfo
(
data
)
{
return
request
({
url
:
'/ysjbcode/update'
,
method
:
'put'
,
data
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
}
})
}
// 逻辑删除基础信息接口
export
function
deleteLogical
(
id
)
{
return
request
({
url
:
'/ysjbcode/deleteLogical/'
+
id
,
method
:
'delete'
})
}
// 导出信息接口
export
function
exporTable
(
params
)
{
return
request
({
url
:
'/ysjbcode/export'
,
method
:
'get'
,
params
,
responseType
:
'blob'
})
}
src/api/production/gxlog.js
0 → 100644
View file @
e8d4f9fc
import
request
from
'@/utils/request'
// TODO: 用来进行工序库的出入库记录的 分页+时间+普通字段的查询
export
function
listLog
(
queryParams
,
queryMaps
)
{
console
.
log
(
"queryParams"
,
queryParams
);
console
.
log
(
"queryMaps"
,)
return
request
({
url
:
'/ysgxlog/queryYsGxLogByPagination'
,
method
:
'get'
,
params
:
queryParams
,
data
:
queryMaps
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
}
})
}
/* TODO: 用来查询单项出入库记录的废弃详情信息 */
export
function
findSingleLogDetail
(
singleLogIdAndPn
)
{
return
request
({
url
:
'/wbchemistrylog/detail'
,
method
:
'post'
,
data
:
singleLogIdAndPn
,
headers
:
{
'Content-Type'
:
'application/json;charset=UTF-8'
}
})
}
/* TODO: 用来导出表单信息 */
export
function
exportInventoryRecord
(
params
)
{
return
request
({
url
:
'/wbchemistrylog/export'
,
method
:
'get'
,
params
,
responseType
:
'blob'
})
}
src/views/production/barcodegeneration/index.vue
0 → 100644
View file @
e8d4f9fc
<
template
>
<div
class=
"barcodegeneration-module app-container"
>
<!-- 搜索区 -->
<el-form
ref=
"queryForm"
style=
"padding: 0 0 0 10px"
:model=
"queryParams"
:inline=
"true"
>
<div
style=
"float: right"
>
<el-form-item>
<el-button
style=
"padding: 8px 7px;"
type=
"primary"
size=
"small"
icon=
"el-icon-plus"
@
click=
"handleAdd"
>
新增
</el-button>
<el-button
style=
"padding: 8px 7px;"
type=
"success"
size=
"small"
icon=
"el-icon-download"
@
click=
"handleExport"
>
导出
</el-button>
</el-form-item>
</div>
</el-form>
<!-- 分割线 -->
<div
class=
"placeholder"
/>
<!-- 表单区 -->
<div
style=
"padding:5px 10px"
>
<div
class=
"mb12 font-small-bold"
>
基础信息
</div>
<el-table
v-loading=
"loading"
border
:data=
"barcodegenerationList"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"50"
/>
<el-table-column
label=
"jbcode"
prop=
"jbcode"
:show-overflow-tooltip=
"true"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
jbcode
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"jblot"
prop=
"jblot"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
jblot
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"jbrank"
prop=
"jbrank"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
jbrank
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"备注"
prop=
"remarks"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
remarks
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"创建时间"
prop=
"updateDate"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
parseTime
(
scope
.
row
.
updateDate
,
'{y
}
-{m
}
-{d
}
{h
}
:{i
}
'
)
||
'-'
}}
<
/template
>
<
/el-table-column
>
<
/el-table
>
<
/div
>
<!--
分页区
-->
<
pagination
v
-
show
=
"total>0"
:
total
=
"total"
:
page
.
sync
=
"queryParams.page"
:
limit
.
sync
=
"queryParams.rows"
@
pagination
=
"getList"
/>
<!--
新增修改弹出
-->
<
el
-
dialog
title
=
"生产管理条码信息"
:
visible
.
sync
=
"open"
width
=
"500px"
append
-
to
-
body
:
close
-
on
-
click
-
modal
=
"false"
@
close
=
"cancel"
>
<
el
-
form
ref
=
"form"
:
model
=
"form"
:
rules
=
"rules"
size
=
"small"
label
-
width
=
"80px"
>
<
el
-
form
-
item
label
=
"jbcode"
prop
=
"jbcode"
>
<
el
-
input
ref
=
"input1"
v
-
model
.
trim
=
"form.jbcode"
:
maxlength
=
"30"
placeholder
=
"请输入jbcode"
@
keyup
.
enter
.
native
=
"handelTab(1,$event)"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"jblot"
prop
=
"jblot"
>
<
el
-
input
ref
=
"input2"
v
-
model
.
trim
=
"form.jblot"
:
maxlength
=
"30"
placeholder
=
"请输入jblot"
@
keyup
.
enter
.
native
=
"handelTab(2,$event)"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"jbrank"
prop
=
"jbrank"
>
<
el
-
input
ref
=
"input3"
v
-
model
.
trim
=
"form.jbrank"
:
maxlength
=
"30"
placeholder
=
"请输入jbrank"
@
keyup
.
enter
.
native
=
"handelTab(3,$event)"
/>
<
/el-form-item
>
<
el
-
form
-
item
label
=
"备注"
prop
=
"remarks"
>
<
el
-
input
ref
=
"input4"
v
-
model
.
trim
=
"form.remarks"
:
maxlength
=
"30"
placeholder
=
"请输入备注"
@
keyup
.
enter
.
native
=
"handelTab(4,$event)"
/>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"footer"
class
=
"dialog-footer"
>
<
el
-
button
@
click
=
"cancel"
>
取
消
<
/el-button
>
<
el
-
button
type
=
"primary"
@
click
=
"submitForm"
>
确
定
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/template
>
<
script
>
import
{
queryList
,
add
,
getDetailById
,
updataInfo
,
deleteLogical
,
exporTable
}
from
'@/api/production/barcodegeneration'
import
{
parseTime
}
from
'@/utils'
export
default
{
name
:
'Index'
,
data
()
{
return
{
title
:
''
,
open
:
false
,
form
:
{
}
,
rules
:
{
jbcode
:
[{
required
:
true
,
message
:
'请输入jbcode'
,
trigger
:
'blur'
}
],
jblot
:
[{
required
:
true
,
message
:
'请输入jblot'
,
trigger
:
'blur'
}
],
jbrank
:
[{
required
:
true
,
message
:
'请输入jbrank'
,
trigger
:
'blur'
}
],
remarks
:
[{
required
:
false
,
message
:
'请输入备注'
,
trigger
:
'blur'
}
],
}
,
total
:
0
,
loading
:
false
,
queryParams
:
{
page
:
1
,
rows
:
10
,
remarks
:
''
}
,
statusOptions
:
{
}
,
barcodegenerationList
:
[]
}
}
,
created
()
{
this
.
getList
()
}
,
methods
:
{
// 提交
submitForm
()
{
this
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
valid
)
{
// 校验通过,提交表单或进行其他操作
if
(
this
.
form
.
businessId
!==
undefined
)
{
updataInfo
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
open
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
this
.
reFrom
()
this
.
queryParams
.
page
=
1
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
}
}
)
}
else
{
add
(
this
.
form
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
open
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
this
.
reFrom
()
this
.
queryParams
.
page
=
1
}
else
if
(
res
.
code
===
null
)
{
this
.
$message
.
error
(
res
.
message
)
}
}
)
}
}
else
{
// 校验失败,显示错误信息或进行其他操作
}
}
)
}
,
cancel
()
{
this
.
open
=
false
this
.
reFrom
()
}
,
handleDelete
(
row
)
{
const
id
=
row
.
businessId
this
.
$confirm
(
'是否确认操作?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(
res
=>
{
deleteLogical
(
id
).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'操作成功'
)
this
.
getList
()
}
}
)
}
)
}
,
// 编辑
handleUpdate
(
row
)
{
this
.
title
=
'编辑条码生成表单'
const
id
=
row
.
businessId
getDetailById
(
id
).
then
(
res
=>
{
this
.
form
=
res
.
data
this
.
open
=
true
}
)
}
,
// 初始化获取数据
getList
()
{
this
.
loading
=
true
queryList
(
this
.
queryParams
).
then
(
res
=>
{
console
.
info
(
res
.
rows
);
res
.
rows
.
update_date
=
parseTime
(
res
.
rows
.
updateDate
,
'{y
}
-{m
}
-{d
}
'
)
this
.
total
=
res
.
total
this
.
barcodegenerationList
=
res
.
rows
this
.
loading
=
false
}
)
}
,
handleAdd
()
{
this
.
open
=
true
this
.
title
=
'添加条码生成表单'
}
,
handleExport
()
{
// 构建查询参数,通常包括了筛选条件等
const
queryParams
=
{
pn
:
this
.
queryParams
.
pn
,
name
:
this
.
queryParams
.
name
}
;
// 获取最近的一条数据
queryList
(
queryParams
).
then
(
res
=>
{
// 判断是否有数据
if
(
res
.
rows
.
length
>
0
)
{
const
latestData
=
res
.
rows
[
0
];
// 获取最近的一条数据
// 创建导出数据对象
const
exportData
=
{
businessId
:
latestData
.
businessId
,
jbcode
:
latestData
.
jbcode
,
jblot
:
latestData
.
jblot
,
jbrank
:
latestData
.
jbrank
,
remarks
:
latestData
.
remarks
,
update_date
:
latestData
.
update_date
,
}
;
// 执行导出操作,将最近的一条数据导出
exporTable
(
exportData
).
then
(
response
=>
{
const
blob
=
new
Blob
([
response
]);
const
downloadElement
=
document
.
createElement
(
'a'
);
const
href
=
window
.
URL
.
createObjectURL
(
blob
);
downloadElement
.
href
=
href
;
downloadElement
.
download
=
'最近一条数据'
+
'.xls'
;
// 设置导出文件名
document
.
body
.
appendChild
(
downloadElement
);
downloadElement
.
click
();
document
.
body
.
removeChild
(
downloadElement
);
window
.
URL
.
revokeObjectURL
(
href
);
}
);
}
else
{
// 数据为空,给出提示
this
.
$message
.
warning
(
'没有最近的数据可导出!'
);
}
}
);
}
}
}
<
/script
>
<
style
lang
=
"scss"
scoped
>
.
barcodegeneration
-
module
{
font
-
size
:
18
px
;
padding
:
0
;
.
placeholder
{
height
:
1.3
vh
;
background
-
color
:
#
F4F4F4
;
margin
-
bottom
:
10
px
}
}
<
/style
>
\ No newline at end of file
src/views/production/craftsmanship/index.vue
View file @
e8d4f9fc
This diff is collapsed.
Click to expand it.
src/views/production/gxlog/index.vue
0 → 100644
View file @
e8d4f9fc
This diff is collapsed.
Click to expand it.
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