Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
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
黄媛媛
ElectricitySheep
Commits
8e35ce4f
Commit
8e35ce4f
authored
Apr 02, 2021
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
c3a19d58
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
211 additions
and
55 deletions
+211
-55
printManage.vue
src/components/empower/printManage.vue
+71
-47
putinStorage.vue
src/components/empower/putinStorage.vue
+140
-8
No files found.
src/components/empower/printManage.vue
View file @
8e35ce4f
...
...
@@ -31,17 +31,34 @@
.printManage
.el-button--small
{
padding
:
9px
25px
;
}
.printManage
.print_item_d
{
border
:
5px
solid
#000
;
padding
:
10px
;
cursor
:
pointer
;
margin-bottom
:
20px
;
}
.printManage
.print_item2_d
{
border
:
5px
solid
#F56C6C
;
padding
:
10px
;
cursor
:
pointer
;
margin-bottom
:
20px
;
}
.printManage
.print_item
{
border
:
5px
solid
#000
;
padding
:
10px
;
cursor
:
pointer
;
margin-bottom
:
20px
;
width
:
210px
;
}
.printManage
.print_item2
{
border
:
5px
solid
#F56C6C
;
padding
:
10px
;
cursor
:
pointer
;
margin-bottom
:
20px
;
width
:
210px
;
}
.printManage
.print_item_c_r_s
{
display
:
inline-block
;
...
...
@@ -52,7 +69,7 @@
height
:
360px
;
border
:
1px
solid
#000
;
padding
:
10px
;
}
</
style
>
<
template
>
...
...
@@ -66,6 +83,7 @@
</div>
<div
class=
"mimitBody"
v-loading=
"loading"
element-loading-text=
"拼命打印中..."
>
<div
style=
"width: 100%;text-align: center"
>
首次加载耗时较长、请耐心等待....
</div>
<div>
<el-checkbox
v-model=
"allchecked"
@
change=
"allcheckbtn"
>
全选
</el-checkbox>
<span
style=
'margin-left:10px'
>
入库批次
</span>
...
...
@@ -77,17 +95,17 @@
<el-radio
v-model=
"radio"
label=
"2"
@
change=
"btnradio"
>
小图
</el-radio>
<el-radio
v-model=
"radio"
label=
"1"
@
change=
"btnradio"
>
大图
</el-radio>
</div>
</div>
<div
v-if=
"dataList.length==0"
style=
"width:100%;text-align: center;margin:30px 0"
>
暂无打印标签
</div>
<div
style=
"margin-top:10px"
v-for=
"(i,j) in dataList"
:key=
"j"
v-if=
"dataList.length>0 && radio==1"
v-loading=
"fullscreenLoading"
>
<div
style=
"margin:20px 0;font-size:16px;color:rgb(64, 158, 255)"
>
<span
>
商品名称:
{{
i
.
GoodsName
}}
</span>
</div>
<el-row
:gutter=
"30"
>
<el-col
:span=
"6"
v-for=
"(item,index) in i.list"
:key=
"index"
>
<div
:class=
"item.Ischeck ==true? 'print_item2
':'print_item
'"
@
click=
"gocheke(j,index)"
>
<div
:class=
"item.Ischeck ==true? 'print_item2
_d':'print_item_d
'"
@
click=
"gocheke(j,index)"
>
<div>
{{
item
.
GoodsName
}}
</div>
<div>
<el-row
:gutter=
"10"
>
...
...
@@ -96,9 +114,12 @@
</el-col>
<el-col
:span=
"12"
style=
'font-size:12px;'
>
<div
style=
'margin-top:20px'
>
<span
class=
"print_item_c_r_s"
>
序号
:
</span>
<span
class=
"print_item_c_r_s"
>
序号
:
</span>
<span>
{{
item
.
xuhao
}}
</span>
</div>
<div
style=
'margin-top:0px'
>
<span>
{{
item
.
ExpirationDate
}}
</span>
</div>
<div
style=
'margin-top:5px'
>
<span
class=
"print_item_c_r_s"
>
仓库名称:
</span>
<span>
{{
item
.
WareHouseName
}}
</span>
...
...
@@ -116,19 +137,19 @@
<div
style=
" text-align: center;"
>
<span>
{{
item
.
TQRCode
}}
</span>
</div>
</div>
</el-col>
</el-row>
</div>
<div
style=
"margin-top:10px"
v-for=
"(i,j) in dataList"
:key=
"j"
v-if=
"dataList.length>0 && radio==2"
v-loading=
"fullscreenLoading"
>
<div
style=
"margin:20px 0;font-size:16px;color:rgb(64, 158, 255)"
>
<span
>
商品名称:
{{
i
.
GoodsName
}}
</span>
</div>
<el-row
:gutter=
"30"
>
<el-col
:span=
"
3
"
v-for=
"(item,index) in i.list"
:key=
"index"
>
<el-col
:span=
"
4
"
v-for=
"(item,index) in i.list"
:key=
"index"
>
<div
:class=
"item.Ischeck ==true? 'print_item2':'print_item'"
@
click=
"gocheke(j,index)"
>
<!--
<div
style=
" width:100%; height:20px;text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;"
>
{{
item
.
GoodsName
}}
</div>
<div>
...
...
@@ -138,20 +159,23 @@
<el-col
:span=
"12"
>
<img
:src=
"domainManager().DomainUrl+item.QRImage"
alt=
""
style=
"width:100%"
>
</el-col>
<el-col
:span=
"12"
style=
'font-size:1
2
px;'
>
<el-col
:span=
"12"
style=
'font-size:1
1
px;'
>
<div
style=
'margin-top:5px'
>
<span>
序号
:
</span>
<span>
序号
:
</span>
<span>
{{
item
.
xuhao
}}
</span>
</div>
<div
style=
'margin-top:0px'
>
<span>
{{
item
.
ExpirationDate
}}
</span>
</div>
<div
style=
'margin-top:5px; width:100%; height:32px;text-overflow: ellipsis; display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;overflow: hidden;'
>
<span>
{{
item
.
GoodsName
}}
</span>
</div>
</el-col>
</el-row>
</div>
</el-col>
</el-row>
</div>
<div
class=
"xuanzhong"
id =
'xuanzhong'
style=
"display:none"
>
...
...
@@ -176,7 +200,7 @@
<span
style=
" display: inline-block; width: 62px;"
>
商品规格:
</span>
<span
v-for=
"(x,y) in item.SpecificationList"
:key=
"y"
>
{{
x
}}
<span
v-if=
"item.SpecificationList.length !== y+1"
>
,
</span></span>
</div>
</div>
</div>
...
...
@@ -186,11 +210,11 @@
</div>
<div
style=
" text-align: center;margin-top:3px"
>
<span>
{{
item
.
TQRCode
}}
</span>
</div>
</div>
</div>
</div>
</div>
<div
class=
"xuanzhong"
id =
'xuanzhong'
style=
"display:none"
>
...
...
@@ -211,20 +235,20 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getLodop
}
from
'../../assets/js/LodopFuncs'
//导入模块
export
default
{
data
()
{
return
{
loading
:
false
,
...
...
@@ -258,7 +282,7 @@ export default {
fieldList
=
fieldList
.
filter
((
e
,
i
,
self
)
=>
{
return
self
.
indexOf
(
e
)
==
i
})
for
(
var
j
=
0
;
j
<
fieldList
.
length
;
j
++
){
//过滤出匹配到的数据
var
arr
=
list
.
filter
((
e
)
=>
{
...
...
@@ -279,7 +303,7 @@ export default {
this
.
Error
(
res
.
data
.
message
);
}
})
},
getList
(){
//获取采购单 入库商品标签
this
.
fullscreenLoading
=
true
...
...
@@ -314,10 +338,10 @@ export default {
data
.
push
(
obj
)
}
})
})
this
.
checkList
=
data
this
.
checkList
.
forEach
((
x
,
i
)
=>
{
x
.
page
=
'page'
+
(
i
+
1
)
...
...
@@ -327,7 +351,7 @@ export default {
this
.
$forceUpdate
()
},
allcheckbtn
(){
if
(
this
.
allchecked
==
true
){
let
data
=
[];
this
.
dataList
.
forEach
((
x
,
i
)
=>
{
...
...
@@ -343,13 +367,13 @@ export default {
x
.
page
=
'page'
+
(
i
+
1
)
x
.
xpage
=
'xpage'
+
(
i
+
1
)
})
}
else
{
this
.
dataList
.
forEach
(
x
=>
{
x
.
list
.
forEach
((
j
)
=>
{
j
.
Ischeck
=
false
;
})
})
this
.
checkList
=
[]
}
...
...
@@ -370,15 +394,15 @@ export default {
let
that
=
this
if
(
conunt
>
0
){
// http://www.c-lodop.com/LodopDemo.html 官网地址
let
page
if
(
this
.
radio
==
1
){
page
=
'page'
+
n
}
else
if
(
this
.
radio
==
2
){
page
=
'xpage'
+
n
}
let
LODOP
=
getLodop
()
//调用getLodop获取LODOP对象
LODOP
.
PRINT_INIT
(
page
)
...
...
@@ -390,7 +414,7 @@ export default {
}
else
if
(
this
.
radio
==
2
){
LODOP
.
ADD_PRINT_HTM
(
0
,
0
,
125
,
110
,
strFormHtml
);
}
// LODOP.PREVIEW()//预览打印
// LODOP.PRINT_DESIGN()//进入打印设计
// LODOP.PRINT()//直接打印打印
...
...
@@ -406,7 +430,7 @@ export default {
setTimeout
(()
=>
{
that
.
batchprint
(
num
)
},
200
)
}
else
{
that
.
loading
=
false
;
that
.
checkList
=
[];
...
...
@@ -414,10 +438,10 @@ export default {
x
.
list
.
forEach
((
j
)
=>
{
j
.
Ischeck
=
false
;
})
})
return
}
}
else
{
...
...
@@ -427,37 +451,37 @@ export default {
// LODOP.PREVIEW()//预览打印
}
// else{
// if(LODOP.PRINT()){
// num++;//循环打印
// if(conunt>=num){
// setTimeout(()=>{
// that.batchprint(num)
// },200)
// }else{
// return
// }
// }else{
// }
// }
}
else
{
this
.
Error
(
'请选择要打印的标签'
);
}
}
}
},
mounted
()
{
this
.
msg
.
ProcurementId
=
this
.
$route
.
query
.
ID
;
this
.
getProcurementInfo
(
this
.
$route
.
query
)
this
.
getList
()
}
};
</
script
>
src/components/empower/putinStorage.vue
View file @
8e35ce4f
...
...
@@ -78,13 +78,69 @@
<el-input
v-model=
"scope.row.InStockNum"
type=
"number"
:min=
'0'
:max=
"scope.row.Number -(scope.row.StockInNum!=null?scope.row.StockInNum:0)"
:disabled=
"(scope.row.Number -(scope.row.StockInNum!=null?scope.row.StockInNum:0))==0? true:false"
@
input=
'validation(scope.row.Number -(scope.row.StockInNum!=null?scope.row.StockInNum:0),scope.row,$event)'
@
input=
'validation(scope.row.Number -(scope.row.StockInNum!=null?scope.row.StockInNum:0),scope.row,$event
,scope.$index
)'
placeholder=
"请输入"
></el-input>
</
template
>
</el-table-column>
</el-table>
<div
style=
"margin-top: 10px"
>
入库商品
<span
style=
"color: #666666"
>
(如果入库数量改变下列的有效日期会全清空)
</span>
</div>
<div
v-for=
"(x,y) in Warehousinglist"
:key=
"y"
>
<div
style=
"display: flex;align-items: flex-start;justify-content: space-between;margin-top: 15px;"
>
<div
style=
"width: 50%;"
>
{{x.name}}
</div>
<div
style=
"display: flex;align-items: flex-start;"
>
<el-date-picker
v-model=
"x.time"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择日期"
>
</el-date-picker>
<el-button
@
click=
"setupTime(y)"
type=
"primary"
size=
"small"
style=
"margin-left: 15px"
>
设置日期
</el-button>
</div>
</div>
<el-table
:data=
"x.list"
border
style=
"width: 100%;margin-Top:20px"
@
selection-change=
"handleSelectionChange($event,y)"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
label=
"序号"
width=
"60"
>
<
template
slot-scope=
"scope"
>
{{
y
+
1
}}
-
{{
scope
.
$index
+
1
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"ImageList"
label=
"封面图"
width=
"80"
align=
'center'
>
<
template
slot-scope=
"scope"
>
<img
:src=
"scope.row.MaterialModel.ImageList[0]"
alt=
""
style=
"width: 50px; height: 50px;"
>
</
template
>
</el-table-column>
<el-table-column
prop=
"Name"
label=
"商品名称"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
MaterialModel
.
Name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"GoodsSpecificationList"
label=
"规格"
>
<
template
slot-scope=
"scope"
>
<span
v-for=
"(x,y) in scope.row.MaterialModel.GoodsSpecificationList"
:key=
"y"
>
{{
x
}}
<span
v-if=
"scope.row.MaterialModel.GoodsSpecificationList.length !== y+1"
>
,
</span></span>
</
template
>
</el-table-column>
<el-table-column
prop=
""
label=
"有效时间"
width=
"200"
>
<
template
slot-scope=
"scope"
>
<el-date-picker
v-model=
"scope.row.time"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择日期"
>
</el-date-picker>
</
template
>
</el-table-column>
</el-table>
</div>
</div>
<el-button
size=
"small"
type=
"primary"
@
click=
"submitForm()"
:disabled =
'ISoperation'
:loading=
"rukuloading"
>
入库
</el-button
>
</div>
...
...
@@ -97,6 +153,7 @@ export default {
WareHouseId
:
0
,
ISoperation
:
false
,
rukuloading
:
false
,
Warehousinglist
:[],
};
},
created
()
{},
...
...
@@ -107,8 +164,16 @@ export default {
this
.
assetsApipost
(
"/api/property/GetProcurementInfo"
,
{
ProcurementId
:
data
.
ID
},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
let
data
=
res
.
data
.
data
data
.
DetailList
.
forEach
(
x
=>
{
x
.
InStockNum
=
0
data
.
DetailList
.
forEach
((
x
,
y
)
=>
{
x
.
InStockNum
=
0
;
let
obj
=
{
Id
:
y
+
1
,
name
:
x
.
MaterialModel
.
Name
,
list
:[],
time
:
''
,
multipleSelection
:[]
}
this
.
Warehousinglist
.
push
(
obj
)
});
this
.
Detaildata
=
data
}
else
{
...
...
@@ -141,8 +206,32 @@ export default {
};
msg
.
Id
=
this
.
Detaildata
.
Id
;
msg
.
WareHouseId
=
this
.
Detaildata
.
WareHouseId
;
let
showtis
=
false
this
.
Detaildata
.
DetailList
.
forEach
(
x
=>
{
let
showtime
=
false
;
let
zonglist
=
[];
this
.
Warehousinglist
.
map
((
x
,
xi
)
=>
{
if
(
x
.
list
.
length
>
0
){
let
list
=
[];
x
.
list
.
map
((
j
,
ji
)
=>
{
if
(
j
.
time
==
''
){
showtime
=
true
}
else
{
let
obj
=
{
ExpirationDate
:
j
.
time
}
list
.
push
(
obj
)
}
})
let
objlist
=
{
ValidityList
:
list
}
zonglist
.
push
(
objlist
)
if
(
showtime
==
true
){
this
.
Error
(
x
.
name
+
'的有效日期没选择,请选择'
);
return
}
}
})
if
(
showtime
==
true
){
return
}
let
showtis
=
false
;
this
.
Detaildata
.
DetailList
.
forEach
((
x
,
y
)
=>
{
if
(
x
.
InStockNum
.
length
==
0
){
showtis
=
true
}
...
...
@@ -150,14 +239,16 @@ export default {
obj
.
GoodsId
=
x
.
MaterialModel
.
GoodsId
;
obj
.
SpecificationKey
=
x
.
MaterialModel
.
SpecificationKey
;
obj
.
InStockNum
=
x
.
InStockNum
;
//2021-4-1加的日期列表
obj
.
ValidityList
=
zonglist
[
y
].
ValidityList
msg
.
DetailList
.
push
(
obj
)
})
if
(
showtis
==
true
){
this
.
Error
(
'请输入入库数量'
);
return
}
this
.
rukuloading
=
true
this
.
assetsApipost
(
"/api/property/SetProcurementStockIn"
,
msg
,
res
=>
{
this
.
rukuloading
=
true
this
.
assetsApipost
(
"/api/property/SetProcurementStockIn"
,
msg
,
res
=>
{
this
.
rukuloading
=
false
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
res
.
data
.
message
);
...
...
@@ -169,7 +260,7 @@ export default {
})
},
validation
(
v
,
row
,
value
){
validation
(
v
,
row
,
value
,
index
){
let
that
=
this
if
(
value
>
v
){
...
...
@@ -179,7 +270,48 @@ export default {
x
.
InStockNum
=
0
}
})
}
else
{
this
.
Warehousinglist
[
index
].
list
=
[]
for
(
let
i
=
0
;
i
<
value
;
i
++
){
let
obj
=
{
CostMoney
:
row
.
CostMoney
,
Id
:
row
.
Id
,
InStockNum
:
row
.
InStockNum
,
MaterialId
:
row
.
MaterialId
,
MaterialModel
:
row
.
MaterialModel
,
Number
:
row
.
Number
,
StockInNum
:
row
.
StockInNum
,
time
:
''
,
xuhao
:
i
+
1
,
}
this
.
Warehousinglist
[
index
].
list
.
push
(
obj
)
}
}
},
handleSelectionChange
(
val
,
y
){
this
.
Warehousinglist
[
y
].
multipleSelection
=
val
},
setupTime
(
y
){
//全体设置
if
(
this
.
Warehousinglist
[
y
].
multipleSelection
.
length
==
0
){
this
.
Error
(
'请选择要设置的对象'
);
return
}
if
(
this
.
Warehousinglist
[
y
].
time
==
''
){
this
.
Error
(
'请选择有效日期'
);
return
}
this
.
Warehousinglist
[
y
].
multipleSelection
.
map
(
x
=>
{
this
.
Warehousinglist
[
y
].
list
.
map
((
j
,
yi
)
=>
{
if
(
x
.
xuhao
==
j
.
xuhao
){
this
.
Warehousinglist
[
y
].
list
[
yi
].
time
=
this
.
Warehousinglist
[
y
].
time
;
return
}
})
})
}
...
...
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