Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tianjin
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐来柯
tianjin
Commits
62b1ec91
Commit
62b1ec91
authored
Jan 12, 2021
by
徐来柯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
df32524e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
168 additions
and
92 deletions
+168
-92
MaterialDelivery.vue
src/views/education/MaterialDelivery.vue
+109
-34
MaterialWarehousingMoudle.vue
src/views/education/MaterialWarehousingMoudle.vue
+49
-55
Pagination.vue
src/views/education/component/Pagination.vue
+8
-1
StoreDialog.vue
src/views/education/component/StoreDialog.vue
+2
-2
No files found.
src/views/education/MaterialDelivery.vue
View file @
62b1ec91
<
template
>
<div
class=
"box-container"
>
<div
class=
"wrap"
>
<search-form
:formList=
"[1,2,3]"
:btnList=
"[1,2]"
@
openDialog=
"openDialog"
@
delData=
"delData"
/>
<search-form
:formList=
"[1,2,3]"
:btnList=
"[1,2]"
:formData=
"formData"
@
searchData=
"searchData"
@
openDialog=
"openDialog"
@
delData=
"delData"
/>
<el-table
border
height=
"675"
...
...
@@ -24,11 +24,11 @@
<el-table-column
label=
"出库编号"
:show-overflow-tooltip=
"true"
prop=
"
SID
"
prop=
"
MHSort
"
width=
"180"
>
</el-table-column>
<el-table-column
prop=
"
ProductName
"
prop=
"
xtid
"
label=
"线体编号"
:show-overflow-tooltip=
"true"
width=
"180"
>
...
...
@@ -36,64 +36,48 @@
<el-table-column
label=
"线体名称"
:show-overflow-tooltip=
"true"
prop=
"
ProductTyp
e"
prop=
"
linnam
e"
width=
"180"
>
</el-table-column>
<el-table-column
label=
"物料编号"
:show-overflow-tooltip=
"true"
prop=
"
PlanType
"
prop=
"
wlid
"
width=
"180"
>
</el-table-column>
<el-table-column
label=
"物料名称"
:show-overflow-tooltip=
"true"
prop=
"
PlanTyp
e"
prop=
"
wlnam
e"
width=
"180"
>
</el-table-column>
<el-table-column
label=
"物料描述"
:show-overflow-tooltip=
"true"
prop=
"
PlanType
"
prop=
"
wlDesc
"
width=
"210"
>
</el-table-column>
<el-table-column
label=
"单位"
:show-overflow-tooltip=
"true"
prop=
"
LineName
"
prop=
"
Company
"
width=
"140"
>
</el-table-column>
<el-table-column
label=
"出库数量"
:show-overflow-tooltip=
"true"
prop=
"
UserName
"
prop=
"
MHNuber
"
width=
"180"
>
</el-table-column>
<el-table-column
label=
"出库时间"
:show-overflow-tooltip=
"true"
prop=
"
StartDt
"
prop=
"
UpdateTime
"
>
</el-table-column>
</el-table>
<!--
<div
class=
"page_bottom"
>
<div
class=
"bottom_text"
>
<span>
共
{{
totalCount
}}
条记录 当前第
{{
pageIndex
}}
页 共
{{
totalPage
}}
页 每页
{{
pageSize
}}
条记录
</span>
</div>
<div
class=
"bottom_btns"
>
<div
class=
"bottom_firest"
@
click=
"first"
>
首页
</div>
<div
ref=
"last"
:class=
"num
<
=
1
?
'
bottom_disabled
'
:
'
bottom_next
'"
@
click=
"last"
>
上一页
</div>
<div
ref=
"next"
:class=
"num === totalPage || num
<
=
0
?
'
bottom_disabled
'
:
'
bottom_next
'"
@
click=
"next"
>
下一页
</div>
<div
class=
"bottom_end"
@
click=
"end"
>
末页
</div>
<span>
第
</span>
<input
v-model=
"num"
class=
"text"
@
input=
"handleBlur"
type=
"text"
/>
<span>
页
</span>
<div
@
click=
"jump"
class=
"bottom_jump"
>
跳转
</div>
</div>
</div>
-->
<Pagination
@
pageFun=
"pageFun"
/>
<Pagination
ref=
"page"
:totalCount=
"totalCount"
:totalPage=
"totalPage"
@
pageFun=
"pageFun"
/>
</div>
<store-dialog
:titleText=
"'物料出库单'"
:type=
"'out'"
v-if=
"popShow"
@
closeDialog=
"closeDialog"
@
conserve=
"conserve"
/>
...
...
@@ -113,29 +97,98 @@ export default {
return
{
tableData
:
[],
AllTableData
:
[],
cloneData
:
[],
popShow
:
false
,
checkList
:
[],
deletetext
:
''
,
deleteShow
:
false
,
formData
:
{
argKeyWord
:
''
,
argWhere
:
''
,
dateValue
:
[
this
.
$moment
().
format
(
'YYYY-MM-DD 00:00:00'
),
this
.
$moment
().
format
(
'YYYY-MM-DD 23:59:59'
)],
scanValue
:
''
,
},
typeV
:
''
,
// 分页数据
totalCount
:
0
,
// pageIndex: 1,
totalPage
:
1
}
},
created
()
{
this
.
searchData
()
// this.scanGunCode()
},
methods
:
{
searchData
()
{
var
$this
=
this
var
postData
=
this
.
resetData
()
this
.
$axios
({
method
:
"post"
,
url
:
`/api/MaterialDelivery/MaterialDelivery_Query?argKeyWord=
${
postData
.
argKeyWord
}
&argWhere=
${
postData
.
argWhere
}
&Stime=
${
postData
.
Stime
}
&Etime=
${
postData
.
Etime
}
`
,
}).
then
((
res
)
=>
{
if
(
res
.
data
.
data
.
length
!=
0
){
this
.
AllTableData
=
res
.
data
.
data
.
map
(
item
=>
({
...
item
,
UpdateTime
:
this
.
$moment
(
item
.
UpdateTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}))
this
.
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
AllTableData
))
if
(
this
.
AllTableData
.
length
>
this
.
$refs
.
page
.
pageSize
){
this
.
tableData
=
this
.
AllTableData
.
slice
(
0
,
this
.
$refs
.
page
.
pageSize
)
}
else
{
this
.
tableData
=
this
.
AllTableData
}
this
.
totalCount
=
this
.
AllTableData
.
length
// this.pageIndex = 1
this
.
totalPage
=
Math
.
ceil
(
this
.
AllTableData
.
length
/
this
.
$refs
.
page
.
pageSize
)
}
else
{
this
.
tableData
=
[]
this
.
totalCount
=
0
// this.pageIndex = 1
this
.
totalPage
=
1
}
this
.
pageFun
(
1
)
}).
catch
(
function
(
err
){
console
.
log
(
'err'
,
err
)
})
},
handleSelectionChange
(
val
)
{
this
.
checkList
=
val
},
// 分页方法
pageFun
(
num
){
if
(
num
==
1
){
this
.
tableData
=
this
.
AllTableData
.
slice
(
0
,
50
)
this
.
tableData
=
this
.
cloneData
.
slice
(
0
,
this
.
$refs
.
page
.
pageSize
)
}
else
{
this
.
tableData
=
this
.
AllTableData
.
slice
((
num
-
1
)
*
this
.
pageSize
+
1
,
this
.
pageSize
*
num
)
this
.
tableData
=
this
.
cloneData
.
slice
((
num
-
1
)
*
this
.
$refs
.
page
.
pageSize
,
this
.
$refs
.
page
.
pageSize
*
num
)
}
},
delData
()
{
if
(
this
.
checkList
.
length
===
0
)
{
this
.
deleteShow
=
true
this
.
typeV
=
2
var
$this
=
this
if
(
$this
.
checkList
.
length
===
0
)
{
$this
.
deleteShow
=
true
$this
.
typeV
=
2
}
else
{
var
list
=
[]
$this
.
checkList
.
forEach
((
item
)
=>
{
list
.
push
(
item
.
ID
)
})
$this
.
$axios
({
method
:
"post"
,
url
:
`/api/MaterialDelivery/MaterialDelivery_Delete`
,
data
:
list
}).
then
((
res
)
=>
{
let
postData
=
this
.
resetData
()
$this
.
searchData
(
postData
)
})
}
},
resetData
()
{
return
{
argKeyWord
:
this
.
formData
.
argKeyWord
,
argWhere
:
this
.
formData
.
argWhere
,
Stime
:
this
.
formData
.
dateValue
?
this
.
$moment
(
this
.
formData
.
dateValue
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
Etime
:
this
.
formData
.
dateValue
?
this
.
$moment
(
this
.
formData
.
dateValue
[
1
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
}
},
//关闭提示弹窗
...
...
@@ -149,8 +202,30 @@ export default {
this
.
popShow
=
false
},
conserve
(
data
)
{
console
.
log
(
data
)
this
.
popShow
=
false
var
$this
=
this
this
.
$axios
({
method
:
"post"
,
url
:
`/api/MaterialDelivery/MaterialDelivery_WindowAddSave`
,
data
:
data
}).
then
((
res
)
=>
{
if
(
res
.
data
.
code
!=
0
){
$this
.
typeV
=
'5'
$this
.
deleteShow
=
true
}
else
{
$this
.
typeV
=
'6'
$this
.
popShow
=
false
}
$this
.
deletetext
=
res
.
data
.
msg
var
postData
=
{
argKeyWord
:
this
.
formData
.
argKeyWord
,
argWhere
:
this
.
formData
.
argWhere
,
Stime
:
$this
.
$refs
.
dateValue
?
$this
.
$moment
(
this
.
dateValue
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
Etime
:
$this
.
$refs
.
dateValue
?
$this
.
$moment
(
this
.
dateValue
[
1
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
}
$this
.
searchData
(
postData
)
}).
catch
(
function
(
err
){
console
.
log
(
'err'
,
err
)
})
}
}
}
...
...
src/views/education/MaterialWarehousingMoudle.vue
View file @
62b1ec91
...
...
@@ -76,7 +76,7 @@
>
</el-table-column>
</el-table>
<Pagination
:totalCount=
"totalCount"
:pageIndex=
"pageIndex
"
:totalPage=
"totalPage"
@
pageFun=
"pageFun"
/>
<Pagination
ref=
"page"
:totalCount=
"totalCount
"
:totalPage=
"totalPage"
@
pageFun=
"pageFun"
/>
</div>
<store-dialog
:titleText=
"'物料入库单'"
v-if=
"popShow"
@
closeDialog=
"closeDialog"
@
conserve=
"conserve"
/>
<delete-pop
ref=
"delete"
:deletetext=
"deletetext"
:type=
"typeV"
v-if=
"deleteShow"
></delete-pop>
...
...
@@ -95,6 +95,7 @@ export default {
return
{
tableData
:
[],
AllTableData
:
[],
cloneData
:
[],
formData
:
{
argKeyWord
:
''
,
argWhere
:
''
,
...
...
@@ -108,8 +109,8 @@ export default {
typeV
:
''
,
// 分页数据
totalCount
:
0
,
pageIndex
:
1
,
totalPage
:
1
,
//
pageIndex: 1,
totalPage
:
1
}
},
created
()
{
...
...
@@ -119,12 +120,7 @@ export default {
methods
:
{
searchData
()
{
var
$this
=
this
var
postData
=
{
argKeyWord
:
this
.
formData
.
argKeyWord
,
argWhere
:
this
.
formData
.
argWhere
,
Stime
:
this
.
formData
.
dateValue
?
this
.
$moment
(
this
.
formData
.
dateValue
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
Etime
:
this
.
formData
.
dateValue
?
this
.
$moment
(
this
.
formData
.
dateValue
[
1
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
}
var
postData
=
this
.
resetData
()
this
.
$axios
({
method
:
"post"
,
url
:
`/api/MaterialWarehousing/MaterialWarehousing_Query?argKeyWord=
${
postData
.
argKeyWord
}
&argWhere=
${
postData
.
argWhere
}
&Stime=
${
postData
.
Stime
}
&Etime=
${
postData
.
Etime
}
`
,
...
...
@@ -134,20 +130,23 @@ export default {
...
item
,
UpdateTime
:
this
.
$moment
(
item
.
UpdateTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}))
if
(
this
.
AllTableData
.
length
>
50
){
this
.
tableData
=
this
.
AllTableData
.
slice
(
0
,
50
)
// 克隆一份tableData数据
this
.
cloneData
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
AllTableData
))
if
(
this
.
AllTableData
.
length
>
this
.
$refs
.
page
.
pageSize
){
this
.
tableData
=
this
.
AllTableData
.
slice
(
0
,
this
.
$refs
.
page
.
pageSize
)
}
else
{
this
.
tableData
=
this
.
AllTableData
}
this
.
totalCount
=
this
.
AllTableData
.
length
this
.
pageIndex
=
1
this
.
totalPage
=
Math
.
ceil
(
this
.
AllTableData
.
length
/
50
)
//
this.pageIndex = 1
this
.
totalPage
=
Math
.
ceil
(
this
.
AllTableData
.
length
/
this
.
$refs
.
page
.
pageSize
)
}
else
{
this
.
tableData
=
[]
this
.
totalCount
=
0
this
.
pageIndex
=
1
//
this.pageIndex = 1
this
.
totalPage
=
1
}
this
.
pageFun
(
1
)
}).
catch
(
function
(
err
){
console
.
log
(
'err'
,
err
)
})
...
...
@@ -158,9 +157,9 @@ export default {
// 分页方法
pageFun
(
num
){
if
(
num
==
1
){
this
.
tableData
=
this
.
AllTableData
.
slice
(
0
,
50
)
this
.
tableData
=
this
.
cloneData
.
slice
(
0
,
this
.
$refs
.
page
.
pageSize
)
}
else
{
this
.
tableData
=
this
.
AllTableData
.
slice
((
num
-
1
)
*
this
.
pageSize
+
1
,
this
.
pageSize
*
num
)
this
.
tableData
=
this
.
cloneData
.
slice
((
num
-
1
)
*
this
.
$refs
.
page
.
pageSize
,
this
.
$refs
.
page
.
pageSize
*
num
)
}
},
// 扫码枪扫码
...
...
@@ -186,48 +185,40 @@ export default {
console
.
log
(
'扫码结束'
)
// this.loading = true
const
cacheCode
=
barCode
this
.
$axios
({
method
:
"post"
,
url
:
`/api/MaterialWarehousing/MaterialDelivery_ScanCodeAdd`
,
data
:
{
ScanCode
:
cacheCode
}
}).
then
((
res
)
=>
{
var
postData
=
{
argKeyWord
:
this
.
formData
.
argKeyWord
,
argWhere
:
this
.
formData
.
argWhere
,
Stime
:
this
.
formData
.
dateValue
?
this
.
$moment
(
this
.
formData
.
dateValue
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
Etime
:
this
.
formData
.
dateValue
?
this
.
$moment
(
this
.
formData
.
dateValue
[
1
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
}
this
.
searchData
(
this
.
postData
)
})
// request({
// url: `/
returnOrder/scanCodeForReturnOrder/${this.$route.query.id}
`,
// url: `/
api/MaterialWarehousing/MaterialDelivery_ScanCodeAdd
`,
// method: 'put',
// data: {
//
barc
ode: cacheCode
//
ScanC
ode: cacheCode
// }
// })
// .then(res => {
// this.loading = false
// if (res.data.code === 200) {
// if (res.data.data.returnInfo.length === 1) {
// // 只有一个商品直接更新数量
// const data = res.data.data.returnInfo[0]
// request({
// url: `/returnOrder/returnOrderGoods/${data.id}`,
// method: 'put',
// data: {
// ...data,
// realNum: data.realNum + 1,
// code: cacheCode
// }
// }).then(res => {
// if (res.data.code === 200) {
// this.$message.success('扫描成功')
// this.print(data.id)
// this.getDetails(true)
// }
// })
// } else if (res.data.data.returnInfo.length >= 2) {
// // 多个商品弹窗
// this.editModal = {
// loading: false,
// type: 12,
// show: true,
// editData: res.data.data,
// code: cacheCode
// }
// }
// // this.loading = false
// var postData = {
// argKeyWord: this.formData.argKeyWord,
// argWhere: this.formData.argWhere,
// Stime: this.formData.dateValue ? this.$moment(this.formData.dateValue[0]).format('YYYY-MM-DD HH:mm:ss') : '',
// Etime: this.formData.dateValue ? this.$moment(this.formData.dateValue[1]).format('YYYY-MM-DD HH:mm:ss') : ''
// }
// $this.searchData(this.postData)
// })
// .catch(() => {
// this.loading = false
//
//
this.loading = false
// })
barCode
=
''
lastCode
=
''
...
...
@@ -253,6 +244,14 @@ export default {
console
.
log
(
lastCode
)
}
},
resetData
()
{
return
{
argKeyWord
:
this
.
formData
.
argKeyWord
,
argWhere
:
this
.
formData
.
argWhere
,
Stime
:
this
.
formData
.
dateValue
?
this
.
$moment
(
this
.
formData
.
dateValue
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
Etime
:
this
.
formData
.
dateValue
?
this
.
$moment
(
this
.
formData
.
dateValue
[
1
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
}
},
delData
()
{
var
$this
=
this
if
(
$this
.
checkList
.
length
===
0
)
{
...
...
@@ -268,12 +267,7 @@ export default {
url
:
`/api/MaterialDelivery/MaterialDelivery_Delete`
,
data
:
list
}).
then
((
res
)
=>
{
var
postData
=
{
argKeyWord
:
this
.
formData
.
argKeyWord
,
argWhere
:
this
.
formData
.
argWhere
,
Stime
:
$this
.
$refs
.
dateValue
?
$this
.
$moment
(
this
.
dateValue
[
0
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
,
Etime
:
$this
.
$refs
.
dateValue
?
$this
.
$moment
(
this
.
dateValue
[
1
]).
format
(
'YYYY-MM-DD HH:mm:ss'
)
:
''
}
var
postData
=
$this
.
resetData
()
$this
.
searchData
(
postData
)
})
}
...
...
src/views/education/component/Pagination.vue
View file @
62b1ec91
...
...
@@ -31,7 +31,11 @@ export default {
totalPage
:
{
type
:
Number
,
default
:
1
,
}
},
// allTableData: {
// type: Number,
// default: 0,
// },
},
data
()
{
return
{
...
...
@@ -42,6 +46,9 @@ export default {
// totalPage: 1,
pageSize
:
50
,
}
},
created
()
{
},
methods
:
{
// 分页方法
...
...
src/views/education/component/StoreDialog.vue
View file @
62b1ec91
...
...
@@ -10,7 +10,7 @@
<div
class=
"centen_row"
>
<span
class=
"centen_row_text"
>
线体编号:
</span>
<div
class=
"centen_row_select"
>
<el-select
v-model=
"
M
ID"
placeholder=
"请选择"
>
<el-select
v-model=
"
L
ID"
placeholder=
"请选择"
>
<el-option
v-for=
"item in lineList"
:key=
"item.Name"
...
...
@@ -23,7 +23,7 @@
<div
class=
"centen_row"
style=
"margin-top:10px"
>
<span
class=
"centen_row_text"
>
物料编号:
</span>
<div
class=
"centen_row_select"
>
<el-select
v-model=
"
L
ID"
placeholder=
"请选择"
>
<el-select
v-model=
"
M
ID"
placeholder=
"请选择"
>
<el-option
v-for=
"item in materList"
:key=
"item.Name"
...
...
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