Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MES_PAD
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
Administrator
MES_PAD
Commits
df017a24
Commit
df017a24
authored
Nov 27, 2018
by
上官
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文琼合并
parent
12b8c64c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
2487 additions
and
598 deletions
+2487
-598
Cutting.css
css/Cutting.css
+202
-0
Cutting.css
dest/css/Cutting.css
+214
-0
needlecarHandover.css
dest/css/needlecarHand/needlecarHandover.css
+92
-0
cutting.js
dest/js/mes/cutting.js
+1038
-0
Cutting.html
html/Cutting.html
+555
-418
NeedlecarHandover.html
html/NeedlecarHandover.html
+382
-177
application.html
html/application.html
+4
-3
No files found.
css/Cutting.css
0 → 100644
View file @
df017a24
*
{
list-style
:
none
;
padding
:
0
;
margin
:
0
;
border
:
0
;
}
html
,
body
{
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
}
[
v-cloak
]
{
display
:
none
!important
;
}
.redColor
{
color
:
red
;
display
:
inline-block
;
}
.blueColor
{
color
:
royalblue
;
display
:
inline-block
;
}
.altrowstable
{
border-width
:
1px
;
/*padding: 2px;*/
border-style
:
solid
;
border-color
:
#a9c6c9
;
background
:
white
;
height
:
200%
;
/*background-color: #F6F6F6;*/
}
.mui-backdrop
{
position
:
fixed
;
top
:
251px
;
right
:
10px
;
bottom
:
5px
;
left
:
698px
;
z-index
:
998
;
background-color
:
rgba
(
0
,
0
,
0
,
.3
);
}
#app
{
width
:
100%
;
height
:
100%
;
}
.mui-content
{
height
:
100%
;
width
:
100%
;
}
.left
{
float
:
left
;
width
:
30%
;
height
:
100%
;
display
:
block
;
}
.left-1
{
position
:
fixed
;
top
:
2px
;
width
:
30%
;
}
.left-1
a
{
width
:
30px
;
}
.left-1
label
{
text-align
:
center
;
display
:
block
;
line-height
:
30px
;
}
.left-2
{
padding-top
:
35px
;
}
.mui-search
input
[
type
=
search
]
{
border-radius
:
0
;
}
.Text
{
border
:
1px
solid
rgb
(
218
,
230
,
239
);
height
:
460px
;
background
:
#fff
;
position
:
relative
;
/* display: none; */
margin-top
:
-18px
;
overflow
:
hidden
;
}
.Text1
{
border
:
1px
solid
rgb
(
218
,
230
,
239
);
height
:
460px
;
background
:
#fff
;
position
:
relative
;
margin-top
:
-18px
;
overflow
:
hidden
;
}
.scroll1
{
/* top:35px */
}
.mui-scroll
{
overflow
:
scroll
;
}
.complet-detail
{
padding
:
5px
0
;
height
:
93px
;
border-bottom
:
1px
solid
#dadada
;
box-sizing
:
border-box
;
}
.complet-detail
li
{
float
:
left
;
width
:
50%
;
font-size
:
12px
;
line-height
:
20px
;
height
:
20px
;
text-align
:
left
;
}
.complet-detail
li
span
{
padding-left
:
3px
;
box-sizing
:
border-box
;
display
:
block
;
font-size
:
12px
;
float
:
left
;
}
.complet-detail
li
span
:nth-of-type
(
2
)
{
padding-left
:
1px
!important
;
}
.complet-detail
li
:nth-of-type
(
1
)
span
:nth-of-type
(
2
)
{
width
:
90px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.complet-detail
li
:nth-of-type
(
3
)
span
:nth-of-type
(
2
)
{
width
:
100px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.active
{
background
:
#efeff4
;
}
/**左侧底部按钮**/
.btn_bottom
{
position
:
absolute
;
bottom
:
1px
;
width
:
30%
;
background
:
#fff
;
z-index
:
10
;
}
/**右侧***/
.right
{
float
:
right
;
width
:
69.5%
;
height
:
100%
;
box-sizing
:
border-box
;
display
:
block
;
}
.detail-header
{
float
:
left
;
width
:
60%
;
position
:
relative
;
}
.mui-table
{
}
.mui-table
tr
th
{
height
:
50px
;
}
.item_table
{
border
:
#DAE6EF
solid
1px
;
display
:
inline-block
;
height
:
376px
;
background
:
white
;
top
:
60px
;
box-sizing
:
border-box
;
margin-top
:
-9px
;
}
.sDetail
td
{
height
:
62px
;
}
.Rbtn
button
{
width
:
120px
;
height
:
70px
;
display
:
inline-block
;
}
.Rcomputed
button
{
width
:
85px
;
height
:
70px
;
margin-bottom
:
-1px
;
font-size
:
25px
}
dest/css/Cutting.css
0 → 100644
View file @
df017a24
*
{
list-style
:
none
;
padding
:
0
;
margin
:
0
;
border
:
0
;
}
html
,
body
{
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
}
[
v-cloak
]
{
display
:
none
!important
;
}
.redColor
{
color
:
red
;
display
:
inline-block
;
}
.blueColor
{
color
:
royalblue
;
display
:
inline-block
;
}
.altrowstable
{
border-width
:
1px
;
/*padding: 2px;*/
border-style
:
solid
;
border-color
:
#a9c6c9
;
background
:
white
;
height
:
200%
;
/*background-color: #F6F6F6;*/
}
.mui-backdrop
{
position
:
fixed
;
top
:
251px
;
right
:
10px
;
bottom
:
5px
;
left
:
698px
;
z-index
:
998
;
background-color
:
rgba
(
0
,
0
,
0
,
.3
);
}
#app
{
width
:
100%
;
height
:
100%
;
}
.mui-content
{
height
:
100%
;
width
:
100%
;
}
.left
{
float
:
left
;
width
:
30%
;
height
:
100%
;
display
:
block
;
}
.left-1
{
position
:
fixed
;
top
:
2px
;
width
:
30%
;
}
.left-1
a
{
width
:
30px
;
}
.left-1
label
{
text-align
:
center
;
display
:
block
;
line-height
:
30px
;
}
.left-2
{
padding-top
:
35px
;
}
.mui-search
input
[
type
=
search
]
{
border-radius
:
0
;
}
.Text
{
border
:
1px
solid
rgb
(
218
,
230
,
239
);
height
:
460px
;
background
:
#fff
;
position
:
relative
;
/* display: none; */
margin-top
:
-18px
;
overflow-y
:
scroll
;
}
.Text1
{
border
:
1px
solid
rgb
(
218
,
230
,
239
);
height
:
460px
;
background
:
#fff
;
position
:
relative
;
margin-top
:
-18px
;
}
.maeginTop
{
margin-top
:
10px
;
height
:
481px
;
}
.mui-scroll
{
overflow-y
:
scroll
;
}
.complet-detail
{
padding
:
5px
0
;
height
:
93px
;
border-bottom
:
1px
solid
#dadada
;
box-sizing
:
border-box
;
}
.complet-detail
li
{
float
:
left
;
width
:
50%
;
font-size
:
12px
;
line-height
:
20px
;
height
:
20px
;
text-align
:
left
;
}
.complet-detail
li
span
{
padding-left
:
3px
;
box-sizing
:
border-box
;
display
:
block
;
font-size
:
12px
;
float
:
left
;
}
.complet-detail
li
span
:nth-of-type
(
2
)
{
padding-left
:
1px
!important
;
}
.complet-detail
li
:nth-of-type
(
1
)
span
:nth-of-type
(
2
)
{
width
:
90px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.complet-detail
li
:nth-of-type
(
3
)
span
:nth-of-type
(
2
)
{
width
:
100px
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
overflow
:
hidden
;
}
.active
{
background
:
#efeff4
;
}
/**左侧底部按钮**/
.btn_bottom
{
position
:
fixed
;
bottom
:
1px
;
width
:
30%
;
z-index
:
10
;
left
:
1px
;
height
:
40px
;
line-height
:
40px
;
}
.btn_bottom
#n1
,
.btn_bottom
#n2
{
display
:
block
;
float
:
left
;
text-align
:
center
;
width
:
50%
;
}
/**右侧***/
.right
{
float
:
right
;
width
:
70%
;
height
:
100%
;
box-sizing
:
border-box
;
display
:
block
;
}
.detail-header
{
float
:
left
;
width
:
60%
;
position
:
relative
;
}
.mui-table
tr
th
{
height
:
50px
;
}
.item_table
{
border
:
#DAE6EF
solid
1px
;
display
:
inline-block
;
height
:
376px
;
background
:
white
;
top
:
60px
;
box-sizing
:
border-box
;
margin-top
:
-9px
;
}
.sDetail
td
{
height
:
62px
;
}
.Rbtn
button
{
width
:
120px
;
height
:
70px
;
display
:
inline-block
;
}
.Rcomputed
button
{
width
:
85px
;
height
:
70px
;
margin-bottom
:
-1px
;
font-size
:
25px
}
/*********/
#pullrefresh
{
width
:
100%
;
}
dest/css/needlecarHand/needlecarHandover.css
0 → 100644
View file @
df017a24
*
{
list-style
:
none
;
padding
:
0
;
margin
:
0
;
border
:
0
;
}
html
,
body
,
#app
{
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
}
[
v-cloak
]
{
display
:
none
!important
;
}
.need-left
{
width
:
40%
;
float
:
left
;
height
:
100%
;
}
#left-1
{
background-color
:
#007AFF
;
height
:
30px
;
width
:
100%
;
margin-bottom
:
1px
;
line-height
:
30px
;
}
#left-2
{
position
:
relative
;
width
:
100%
;
height
:
482px
;
margin-top
:
-15px
;
}
.active
{
background
:
#efeff4
;
}
.marginTop
{
margin-top
:
0
!important
;
height
:
515px
!important
;
}
.mui-scroll
{
height
:
100%
;
padding-bottom
:
15px
;
box-sizing
:
border-box
;
}
.leftList
{
border
:
solid
#DAE6EF
1px
;
height
:
100%
;
background
:
white
;
width
:
100%
;
overflow-y
:
scroll
;
}
.mui-search
#search
{
border-radius
:
0
;
}
#item1
div
{
/* padding-bottom: 10px; */
}
#item2
{
/* top: 32px; */
}
#item2
ul
li
p
{
text-align
:
left
;
}
.leftState
{
position
:
fixed
;
bottom
:
1px
;
left
:
1px
;
z-index
:
10
;
width
:
40%
;
background
:
#fff
;
}
#pullrefresh
{
width
:
100%
;
height
:
100%
;
}
/************/
.need-right
{
width
:
60%
;
float
:
right
;
}
#right
{
width
:
100%
;
}
#right-2
{
position
:
fixed
;
bottom
:
1px
;
right
:
1px
;
}
#right-2
button
{
width
:
200px
;
height
:
70px
;
"
}
\ No newline at end of file
dest/js/mes/cutting.js
0 → 100644
View file @
df017a24
mui
.
plusReady
(
function
()
{
// plus.nativeUI.closeWaiting();
plus
.
nativeUI
.
showWaiting
()
// mui.currentWebview.show();
initPage
();
});
function
initPage
()
{
plus
.
screen
.
lockOrientation
(
"landscape-primary"
)
//横屏
app
.
init
();
}
var
app
=
new
Vue
({
el
:
'#app'
,
data
:
{
number
:
0
,
qty
:
0
,
size
:
0
,
dateTime
:
""
,
today
:
""
,
link
:
""
,
itemsDetail
:
[],
//订单明细
itemsDetail1
:
[],
itemsDetail2
:
[],
itemsHead
:
[],
itemsLeft
:
[],
itemsLeft2
:
[],
itemsSize
:
[],
SizeQty
:
[],
ReportType
:
0
,
IndexID
:
0
,
rightInfor
:
[],
//右侧详情
cur
:
0
,
completeState
:
true
,
searchText
:
''
,
searchDatail
:
[],
state
:
true
,
// disable_save_button: 'disabled',
disable_reportDelete
:
'disabled'
,
disable_qq
:
'disabled'
,
ReportID
:
0
,
Report_IndexID
:
0
,
Model
:
0
,
CompleteRatio
:
0
,
//完成进度
pagenum
:
1
,
displayModel
:
1
,
zhezhao
:
1
,
//
mask_
:
mui
.
createMask
(
function
(
e
)
{
return
false
;
}),
appdis
:
0
,
},
computed
:
{
disable_save_button_C
:
function
()
{
if
(
this
.
size
!=
0
&&
this
.
qty
!=
0
&&
this
.
IndexID
!=
0
&&
this
.
Model
==
0
)
{
return
null
;
}
else
{
return
'disabled'
;
}
},
disable_qq_
:
function
()
{
if
(
this
.
IndexID
!=
0
&&
this
.
Model
==
0
)
{
return
null
;
}
else
{
return
'disabled'
;
}
},
display_
:
function
()
{
if
(
this
.
displayModel
==
1
)
{
return
"display: none "
}
},
SOP__
:
function
()
{
if
(
this
.
IndexID
==
0
)
{
return
"disabled"
}
else
{
return
null
}
},
},
methods
:
{
init
:
function
()
{
//初始化
mui
.
init
({
pullRefresh
:
{
container
:
'#pullrefresh'
,
up
:
{
contentrefresh
:
'正在加载...'
,
callback
:
function
()
{
var
pangjia
=
document
.
getElementById
(
"theOne"
).
getAttribute
(
"state"
);
var
pangjia1
=
document
.
getElementById
(
"theTow"
).
getAttribute
(
"state"
);
console
.
log
(
"pangjia:"
+
pangjia
);
console
.
log
(
"pangjia1:"
+
pangjia1
);
if
(
pangjia
)
{
console
.
log
(
"pangjia:"
+
pangjia
);
pullupRefresh
();
console
.
log
(
11
)
}
else
if
(
pangjia1
)
{
console
.
log
(
"pangjsxzsdddddzia1:"
+
pangjia1
);
pullupRefresh1
();
}
else
{
pullupRefresh1
();
}
}
},
}
});
function
getMoreInfor
()
{
var
that
=
this
;
setTimeout
(
function
()
{
var
para
=
{
PageSize
:
10
,
PageIndex
:
this
.
pagenum
++
};
Api
.
post
(
'/api/vMES/CutOffProductionReport/ToDo'
,
para
,
function
(
e
)
{
var
data
=
e
.
items
;
console
.
log
(
"原来的"
+
app
.
itemsHead
);
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
//console.log("data[i]"+JSON.stringify(data[i])) ;
app
.
itemsHead
.
push
(
data
[
i
]);
}
console
.
log
(
"加载后"
+
app
.
itemsHead
);
})
mui
(
'#item1'
).
pullRefresh
().
endPullupToRefresh
((
para
.
PageIndex
>
10
));
},
1000
);
}
var
count
=
0
;
function
pullupRefresh
()
{
setTimeout
(
function
()
{
mui
(
'#pullrefresh'
).
pullRefresh
().
endPullupToRefresh
((
++
count
>
2
));
//参数为true代表没有更多数据了。
var
para
=
{
PageSize
:
10
,
PageIndex
:
this
.
pagenum
++
};
Api
.
post
(
'/api/vMES/CutOffProductionReport/ToDo'
,
para
,
function
(
e
)
{
var
data
=
e
.
items
;
console
.
log
(
"原来的"
+
app
.
itemsHead
);
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
//console.log("data[i]"+JSON.stringify(data[i])) ;
app
.
itemsHead
.
push
(
data
[
i
]);
}
});
console
.
log
(
"加载后"
+
app
.
itemsHead
);
},
1000
);
}
function
pullupRefresh1
()
{
console
.
log
(
12235
);
setTimeout
(
function
()
{
var
para
=
{
PageSize
:
10
,
PageIndex
:
app
.
pagenum
++
};
Api
.
post
(
'/api/vMES/CutOffProductionReport/Done'
,
para
,
function
(
e
)
{
//加判断 1.网络异常 提示 2.没数据 提示 但是可以一直发请求只不过传回来是空
var
data
=
e
.
items
;
console
.
log
(
"canshu:"
+
JSON
.
stringify
(
para
));
//console.log("已完成原来的"+app.itemsLeft2) ;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
app
.
itemsLeft2
.
push
(
data
[
i
]);
}
console
.
log
(
"已12515的"
+
app
.
itemsLeft2
);
})
mui
(
'#pullrefresh'
).
pullRefresh
().
endPullupToRefresh
((
para
.
PageIndex
>
10
));
},
1000
);
}
function
getMoreInfor1
()
{
//已完成
setTimeout
(
function
()
{
var
para
=
{
PageSize
:
10
,
PageIndex
:
this
.
pagenum
++
};
Api
.
post
(
'/api/vMES/CutOffProductionReport/Done'
,
para
,
function
(
e
)
{
var
data
=
e
.
items
;
console
.
log
(
"已完成原来的"
+
JSON
.
stringify
(
app
.
itemsLeft2
));
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
//console.log("data[i]"+JSON.stringify(data[i])) ;
app
.
itemsLeft2
.
push
(
data
[
i
]);
}
console
.
log
(
"已完成"
+
app
.
itemsLeft2
);
})
mui
(
'#item1'
).
pullRefresh
().
endPullupToRefresh
((
para
.
PageIndex
>
10
));
},
1000
);
}
window
.
addEventListener
(
'back'
,
function
(
e
)
{
var
that
=
this
;
app
.
getDataDetail1
();
});
setTimeout
(
function
()
{
plus
.
nativeUI
.
closeWaiting
();
var
ap
=
document
.
getElementById
(
"app"
);
ap
.
style
=
" display: inline-block"
;
},
200
)
mui
(
'.mui-scroll-wrapper'
).
scroll
({
bounce
:
false
,
indicators
:
true
,
//是否显示滚动条
});
this
.
dateTime
=
moment
().
format
().
substring
(
0
,
10
)
this
.
today
=
this
.
dateTime
;
this
.
getData
();
},
playVoice
:
function
(
filename
)
{
if
(
plus
.
audio
==
undefined
)
{
}
else
{
// 播放操作
var
p
=
plus
.
audio
.
createPlayer
(
"_www/dest/voice/"
+
filename
);
p
.
play
(
function
()
{
//alert( "Audio play success!" );
},
function
(
e
)
{
//alert( "Audio play failed: " + e.message );
});
}
},
getData
:
function
()
{
var
that
=
this
;
var
tempdate
=
this
.
dateTime
+
" 00:00:00"
;
this
.
createZhezhao
(
-
1
)
var
para
=
{
PageSize
:
10
,
PageIndex
:
that
.
pagenum
};
Api
.
post
(
'/api/vMES/CutOffProductionReport/ToDo'
,
para
,
function
(
e
)
{
//console.log("one :::;" +JSON.stringify(e.items))
that
.
itemsHead
=
e
.
items
;
that
.
rightInfor
=
e
.
items
[
0
];
//console.log("点击之前"+JSON.stringify(that.rightInfor))
if
(
e
.
items
.
length
>
0
)
{
that
.
itemsDetail
=
e
.
items
[
0
];
that
.
IndexID
=
e
.
items
[
0
].
IndexID
;
that
.
getDataDetail1
();
that
.
getDataDetail2
(
1
);
that
.
getTatolNum
();
that
.
qty
=
0
;
that
.
disable_reportDelete
=
'disabled'
;
}
else
{
that
.
itemsDetail
=
[];
that
.
IndexID
=
0
;
that
.
itemsDetail1
=
[];
that
.
itemsSize
=
[];
that
.
size
=
0
;
that
.
itemsLeft
=
[];
that
.
number
=
0
;
that
.
qty
=
0
;
that
.
disable_reportDelete
=
'disabled'
that
.
getDataDetail2
(
1
);
that
.
getTatolNum
();
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
getDetailInfor
:
function
(
idInfor
,
index
)
{
//获取实报详细 未完成,已完成的的尺码明细信息
var
that
=
this
;
that
.
cur
=
index
;
//console.log("指令号"+idInfor);
//console.log("指令号"+idInfor);
var
para
=
{
"IndexID"
:
idInfor
};
Api
.
post
(
'/api/vMES/CutOffProductionReport/Detail'
,
para
,
function
(
e
)
{
//console.log("详情" + JSON.stringify(e));
if
(
e
.
success
)
{
that
.
rightInfor
=
e
.
data
;
//console.log("点击之后"+JSON.stringify(that.rightInfor))
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
ChangeState
:
function
(
n
,
state
)
{
//改变状态,切换已完成和未完成
//n= 1 未完成 n=2 已完成
var
that
=
this
;
var
para
=
{
PageSize
:
10
,
PageIndex
:
1
};
// console.log(JSON.stringify(para))
if
(
n
==
1
)
{
Api
.
post
(
'/api/vMES/CutOffProductionReport/ToDo'
,
para
,
function
(
e
)
{
that
.
cur
=
0
;
//console.log("未完成1" + JSON.stringify(e.items))
that
.
itemsHead
=
e
.
items
;
that
.
rightInfor
=
e
.
items
[
0
];
//console.log("未完成2" + JSON.stringify(that.itemsLeft))
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
}
else
if
(
n
==
2
)
{
//console.log("getDataDetail2:::: " + n + this.IndexID)
Api
.
post
(
'/api/vMES/CutOffProductionReport/Done'
,
para
,
function
(
e
)
{
//console.log("right" + JSON.stringify(e.items))
var
data
=
JSON
.
stringify
(
e
.
items
).
length
;
if
(
data
>
0
)
{
that
.
itemsLeft2
=
e
.
items
;
that
.
rightInfor
=
e
.
items
[
0
];
that
.
cur
=
0
;
}
else
{
that
.
rightInfor
=
[];
that
.
itemsLeft2
=
[];
that
.
cur
=
0
;
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
}
},
goSearch
:
function
()
{
var
that
=
this
;
var
para
=
{
SearchText
:
that
.
searchText
,
PageSize
:
200
,
PageIndex
:
1
,
};
//document.getElementById("search").value("");
if
(
that
.
searchText
==
''
)
return
;
Api
.
post
(
'/api/vMES/CutOffProductionReport/Search'
,
para
,
function
(
e
)
{
//console.log("itemsHead被fore" + JSON.stringify(that.itemsHead))
console
.
log
(
"输入的内容+"
+
para
.
SearchText
)
console
.
log
(
"search"
+
JSON
.
stringify
(
e
.
items
))
//that.searchDatail = e.items;
that
.
itemsHead
=
e
.
items
;
//console.log("itemsHead被huhbe" + JSON.stringify(that.itemsHead))
that
.
rightInfor
=
e
.
items
[
0
];
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
//that.searchText='';
},
getDataDetail1
:
function
()
{
var
that
=
this
;
var
para
=
{
IndexID
:
this
.
IndexID
,
};
if
(
this
.
IndexID
==
0
)
{
return
;
}
Api
.
post
(
'/api/vMES/ProductionReport/ProductIndexNoDetail'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
itemsDetail
=
e
.
data
;
that
.
itemsDetail1
=
e
.
data
.
ReportDetail
;
that
.
itemsSize
=
e
.
data
.
SizeName
;
//console.log("右侧信息"+JSON.stringify(that.itemsDetail).length)
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
getDataDetail2
:
function
(
n
)
{
//n= 1 未完成 n=2 已完成
var
that
=
this
;
var
para
=
{
ReportType
:
this
.
ReportType
,
IndexID
:
n
==
1
?
0
:
this
.
IndexID
,
PageSize
:
200
,
PageIndex
:
1
,
};
// console.log(JSON.stringify(para))
if
(
n
==
1
)
{
Api
.
post
(
'/api/vMES/CutOffProductionReport/ToDo'
,
para
,
function
(
e
)
{
that
.
itemsLeft
=
e
.
items
;
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
}
else
if
(
n
==
2
)
{
console
.
log
(
"getDataDetail2:::: "
+
n
+
this
.
IndexID
)
Api
.
post
(
'/api/vMES/CutOffProductionReport/Done'
,
para
,
function
(
e
)
{
console
.
log
(
"itemsLeft2"
+
JSON
.
stringify
(
e
.
items
))
that
.
itemsLeft2
=
e
.
items
;
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
}
},
getTatolNum
:
function
()
{
var
that
=
this
;
var
para
=
{
ReportType
:
this
.
ReportType
,
Date
:
this
.
dateTime
+
" 00:00:00"
,
};
Api
.
post
(
'/api/vMES/ProductionReport/TotalQty'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
number
=
e
.
data
;
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
//完成进度
getCompleteRatio
:
function
(
n
)
{
var
that
=
this
;
var
para
=
{
IndexID
:
n
};
if
(
n
==
0
)
{
return
;
}
// console.log(JSON.stringify(para))
Api
.
post
(
'/api/vMES/ProductionReport/IndexNoCompleteRatio'
,
para
,
function
(
e
)
{
that
.
CompleteRatio
=
e
.
data
;
// console.log(JSON.stringify(e))
for
(
var
i
=
0
;
i
<
that
.
itemsHead
.
length
;
i
++
)
{
if
(
that
.
itemsHead
[
i
].
IndexID
==
n
)
{
that
.
itemsHead
[
i
].
CompleteRatio
=
that
.
CompleteRatio
;
// console.log(that.CompleteRatio);
}
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
reportDelete
:
function
()
{
var
that
=
this
;
var
para
=
{
ReportID
:
this
.
ReportID
,
};
Api
.
post
(
'/api/vMES/ProductionReport/Delete'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
createZhezhao
(
-
1
)
that
.
disable_reportDelete
=
'disabled'
that
.
size
=
0
;
that
.
qty
=
0
;
that
.
getCompleteRatio
(
that
.
Report_IndexID
);
//订单进度
that
.
selectSize
(
0
);
that
.
selectReport
(
0
);
that
.
selectReport2
(
0
);
that
.
getDataDetail1
();
//获取列表尺码对应数量
that
.
getTatolNum
();
//获取今日完成数量
that
.
getDataDetail2
(
1
);
//获取左边列表明细
that
.
getDataDetail2
(
2
);
that
.
Model
=
0
;
if
(
that
.
IndexID
!=
0
)
{
var
Index
=
document
.
getElementById
(
"Index_"
+
that
.
IndexID
)
Index
.
style
.
background
=
"#02C1ED"
;
}
mui
.
toast
(
"撤回成功"
)
}
else
{
mui
.
toast
(
"撤回失败"
+
e
.
message
)
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
getDataByReportID
:
function
()
{
var
that
=
this
;
var
para
=
{
ReportID
:
this
.
ReportID
,
};
Api
.
post
(
'/api/vMES/ProductionReport/ReportIndexNoDetail'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
itemsDetail
=
e
.
data
;
that
.
itemsSize
=
e
.
data
.
SizeName
;
that
.
itemsDetail1
=
e
.
data
.
ReportDetail
;
that
.
size
=
e
.
data
.
ReportSizeName
;
that
.
qty
=
e
.
data
.
ReportQty
;
that
.
selectSize
(
e
.
data
.
ReportSizeName
);
}
else
{
mui
.
toast
(
"获取明细失败:"
+
e
.
message
)
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
getLink
:
function
()
{
var
that
=
this
;
var
para
=
{
ReportType
:
this
.
ReportType
,
StyleCode
:
this
.
itemsDetail
.
StyleCode
}
// console.log( JSON.stringify(para))
Api
.
post
(
'/api/vMES/Sop/StyleSop'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
// console.log( JSON.stringify(e))
that
.
link
=
e
.
data
.
Url
;
var
url_
=
"sop.html"
;
var
id_
=
"sop.html"
;
mui
.
openWindow
({
url
:
url_
,
id
:
id_
,
extras
:
{
style
:
that
.
itemsDetail
.
StyleCode
,
ReportType
:
that
.
ReportType
,
link
:
that
.
link
,
parentPage
:
"Cutting.html"
},
});
}
else
{
mui
.
toast
(
"获取sop地址失败: "
+
e
.
message
)
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
SizeQtyA
:
function
()
{
for
(
var
i
=
0
;
i
<
this
.
itemsSize
.
length
;
i
++
)
{
var
tempa
=
{
size
:
this
.
itemsSize
[
i
],
qty
:
0
}
this
.
SizeQty
.
push
(
tempa
);
}
},
submit
:
function
()
{
if
(
!
this
.
checkValue
())
{
this
.
playVoice
(
"sb.mp3"
);
return
;
}
var
para
=
{
IndexID
:
this
.
IndexID
,
SizeName
:
this
.
size
,
Qty
:
this
.
qty
,
}
var
that
=
this
;
Api
.
post
(
'/api/vMES/ProductionReport/Save'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
// that.disable_save_button = 'disabled'
that
.
size
=
0
;
that
.
qty
=
0
;
that
.
selectSize
(
0
);
that
.
getDataDetail1
();
//获取列表尺码对应数量
that
.
getTatolNum
();
//获取今日完成数量
that
.
getDataDetail2
(
1
);
//获取左边列表明细 今日实报
that
.
getDataDetail2
(
2
);
//获取左边列表明细 单款实报
that
.
getCompleteRatio
(
that
.
IndexID
)
//订单进度
that
.
playVoice
(
"cg.mp3"
);
mui
.
toast
(
"提交成功"
);
}
else
{
mui
.
toast
(
"提交失败: "
+
e
.
message
);
}
},
function
(
b
,
bb
,
bbb
)
{
that
.
playVoice
(
"sb.mp3"
);
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
submitZD
:
function
()
{
var
btnArray
=
[
'否'
,
'是'
];
var
that
=
this
;
mui
.
confirm
(
'请确认是否整单完工?'
,
'提示'
,
btnArray
,
function
(
e
)
{
if
(
e
.
index
==
1
)
{
var
para
=
{
ReportType
:
this
.
ReportType
,
IndexID
:
that
.
IndexID
,
}
// console.log(JSON.stringify(para));
// console.log(JSON.stringify(para));
Api
.
post
(
'/api/vMES/ProductionReport/SingleComplete'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
// that.disable_save_button = 'disabled'
that
.
size
=
0
;
that
.
qty
=
0
;
that
.
selectSize
(
0
);
that
.
getDataDetail1
();
//获取列表尺码对应数量
that
.
getTatolNum
();
//获取今日完成数量
that
.
getDataDetail2
(
1
);
//获取左边列表明细
that
.
getCompleteRatio
(
that
.
IndexID
)
//订单进度
that
.
playVoice
(
"cg.mp3"
);
mui
.
toast
(
"提交成功"
);
}
else
{
mui
.
toast
(
"提交失败: "
+
e
.
message
);
}
},
function
(
b
,
bb
,
bbb
)
{
that
.
playVoice
(
"sb.mp3"
);
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
}
else
{
return
;
}
})
},
selectIndex
:
function
(
idx
)
{
this
.
createZhezhao
(
-
1
)
//关闭遮罩
var
indxx
=
document
.
getElementsByClassName
(
"Index"
);
var
indx
=
document
.
getElementById
(
"Index_"
+
idx
)
for
(
var
i
=
0
;
i
<
indxx
.
length
;
i
++
)
{
indxx
[
i
].
style
.
background
=
""
;
}
indx
.
style
.
background
=
"#02C1ED"
;
this
.
IndexID
=
idx
this
.
Model
=
0
if
(
this
.
IndexID
!=
0
)
{
this
.
getDataDetail1
();
this
.
getDataDetail2
(
1
);
this
.
getDataDetail2
(
2
);
this
.
getTatolNum
();
this
.
selectSize
(
0
);
this
.
selectReport
(
0
);
this
.
qty
=
0
;
this
.
size
=
0
;
this
.
disable_reportDelete
=
'disabled'
;
}
else
{
this
.
itemsDetail
=
[];
this
.
IndexID
=
0
;
this
.
itemsDetail1
=
[];
this
.
itemsSize
=
[];
this
.
size
=
0
;
this
.
itemsLeft
=
[];
this
.
number
=
0
;
this
.
qty
=
0
;
this
.
disable_reportDelete
=
'disabled'
}
mui
(
'.scroll1'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll2'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
// mui('.scroll3').scroll().scrollTo(0,0,100);
mui
(
'.scroll4'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
},
createZhezhao
:
function
(
n
)
{
// console.log(n)
if
(
n
==
-
1
)
{
// var mask = mui.createMask();//callback为用户点击蒙版时自动执行的回调;
// this.mask_.close();
this
.
mask_
.
_remove
()
this
.
zhezhao
=
1
;
}
else
{
if
(
this
.
zhezhao
==
1
)
{
// var mask = mui.createMask(function(e){
// return false;
//
// });//callback为用户点击蒙版时自动执行的回调;
this
.
mask_
.
show
();
//显示遮罩
this
.
zhezhao
=
2
// mask.close();//关闭遮罩
}
}
},
selectReport
:
function
(
obj
)
{
var
op
=
document
.
getElementById
(
"ReportID_"
+
obj
)
this
.
ReportID
=
obj
;
if
(
obj
==
0
)
{
this
.
Report_IndexID
=
0
}
else
{
this
.
createZhezhao
(
1
)
for
(
var
i
=
0
;
i
<
this
.
itemsLeft
.
length
;
i
++
)
{
if
(
this
.
itemsLeft
[
i
].
ReportID
==
obj
)
{
this
.
Report_IndexID
=
this
.
itemsLeft
[
i
].
IndexID
}
}
}
if
(
this
.
ReportID
!=
0
)
{
this
.
disable_reportDelete
=
null
;
}
var
reportele
=
document
.
getElementsByClassName
(
"Report"
);
for
(
var
i
=
0
;
i
<
reportele
.
length
;
i
++
)
{
reportele
[
i
].
style
.
background
=
""
}
if
(
obj
!=
0
)
{
if
(
this
.
IndexID
!=
0
)
{
var
Index
=
document
.
getElementById
(
"Index_"
+
this
.
IndexID
)
Index
.
style
.
background
=
""
;
}
op
.
style
.
background
=
"#02C1ED"
;
this
.
Model
=
1
;
this
.
getDataByReportID
();
}
},
selectReport2
:
function
(
obj
)
{
var
op
=
document
.
getElementById
(
"ReportID2_"
+
obj
)
this
.
ReportID
=
obj
;
if
(
obj
==
0
)
{
this
.
Report_IndexID
=
0
}
else
{
this
.
createZhezhao
(
1
)
for
(
var
i
=
0
;
i
<
this
.
itemsLeft2
.
length
;
i
++
)
{
if
(
this
.
itemsLeft2
[
i
].
ReportID
==
obj
)
{
this
.
Report_IndexID
=
this
.
itemsLeft2
[
i
].
IndexID
}
}
}
if
(
this
.
ReportID
!=
0
)
{
this
.
disable_reportDelete
=
null
;
}
var
reportele
=
document
.
getElementsByClassName
(
"Report"
);
for
(
var
i
=
0
;
i
<
reportele
.
length
;
i
++
)
{
reportele
[
i
].
style
.
background
=
""
}
if
(
obj
!=
0
)
{
if
(
this
.
IndexID
!=
0
)
{
var
Index
=
document
.
getElementById
(
"Index_"
+
this
.
IndexID
)
Index
.
style
.
background
=
""
;
}
op
.
style
.
background
=
"#02C1ED"
;
this
.
Model
=
1
;
this
.
getDataByReportID
();
}
},
selectDisplay
:
function
(
n
,
completeState
)
{
console
.
log
(
"selectDisplay:"
+
n
)
//var opt = document.getElementById("item1")
//var opt2 = document.getElementById("item2")
var
n1
=
document
.
getElementById
(
"n1"
)
var
n2
=
document
.
getElementById
(
"n2"
)
if
(
n
==
1
)
{
this
.
completeState
=
true
;
this
.
ChangeState
(
1
);
n1
.
style
.
background
=
"royalblue"
n1
.
style
.
color
=
"white"
n2
.
style
.
background
=
"white"
n2
.
style
.
color
=
"royalblue"
//opt.style.display = "inline-block";
// opt2.style.display = "none";
}
if
(
n
==
2
)
{
this
.
completeState
=
false
;
this
.
ChangeState
(
2
);
n1
.
style
.
background
=
"white"
n1
.
style
.
color
=
"royalblue"
n2
.
style
.
background
=
"royalblue"
n2
.
style
.
color
=
"white"
//opt.style.display = "none";
// opt2.style.display = "inline-block"
}
},
changeValue
:
function
()
{
if
(
isNaN
(
parseInt
(
this
.
qty
)))
{
this
.
qty
=
0
;
// this.disable_save_button = 'disabled';
}
if
(
parseInt
(
this
.
qty
)
>
0
)
{
this
.
qty
=
parseInt
(
this
.
qty
);
// this.disable_save_button = null;
}
},
checkValue
:
function
()
{
//数量不正确
if
(
isNaN
(
parseInt
(
this
.
qty
))
||
parseInt
(
this
.
qty
)
<=
0
)
{
mui
.
toast
(
"数量不正确"
)
return
false
;
}
//尺码不正确
else
if
(
this
.
size
==
0
)
{
mui
.
toast
(
"尺码不正确"
)
return
false
;
}
else
if
(
this
.
IndexID
==
0
)
{
mui
.
toast
(
"订单号不正确"
)
return
false
;
}
else
{
return
true
;
}
},
backNumber
:
function
()
{
if
(
this
.
Model
==
1
)
{
return
;
}
var
str
=
this
.
qty
.
toString
();
this
.
qty
=
str
.
substring
(
0
,
str
.
length
-
1
);
},
selectNumber
:
function
(
n
)
{
if
(
this
.
Model
==
1
)
{
return
;
}
this
.
qty
=
this
.
qty
.
toString
()
+
n
.
toString
();
// this.qty = isNaN(parseInt(this.qty)) ? 0 + parseInt(n) : parseInt(this.qty) + parseInt(n);
},
selectSize
:
function
(
n
)
{
var
bg
=
document
.
getElementsByClassName
(
"bg"
);
for
(
var
i
=
0
;
i
<
bg
.
length
;
i
++
)
{
bg
[
i
].
style
.
background
=
""
if
(
bg
[
i
].
innerHTML
==
n
)
{
bg
[
i
].
style
.
background
=
"#02C1ED"
}
}
if
(
n
!=
0
)
{
this
.
size
=
n
;
// bg[0].style.background = "#02C1ED"
}
},
nextday
:
function
(
n
)
{
this
.
createZhezhao
(
-
1
)
var
d
=
new
Date
(
this
.
dateTime
);
d
.
setTime
(
d
.
getTime
()
+
24
*
60
*
60
*
1000
*
n
);
if
(
d
.
getDate
().
toString
().
length
==
1
)
{
this
.
dateTime
=
d
.
getFullYear
()
+
"-"
+
(
d
.
getMonth
()
+
1
)
+
"-0"
+
d
.
getDate
();
}
else
{
this
.
dateTime
=
d
.
getFullYear
()
+
"-"
+
(
d
.
getMonth
()
+
1
)
+
"-"
+
d
.
getDate
();
}
this
.
getData
();
mui
(
'.scroll1'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll2'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll3'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll4'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
},
stylebg
:
function
(
n
)
{
if
(
n
==
0
)
{
return
{
"background"
:
"#02C1ED"
}
}
},
nextPage
:
function
(
n
,
k
)
{
var
url_
;
var
id_
;
url_
=
"CuttingQuality.html"
;
id_
=
"CuttingQuality.html"
;
mui
.
openWindow
({
url
:
url_
,
id
:
id_
,
extras
:
{
IndexID
:
this
.
IndexID
,
dateTime
:
this
.
dateTime
,
itemsDetail
:
this
.
itemsDetail
,
itemsSize
:
this
.
itemsSize
,
type
:
n
,
// n =2 点击不合格进去 ,
parentSize
:
k
,
sizeNum
:
this
.
itemsDetail1
//尺码和数量
},
});
},
sop
:
function
()
{
this
.
getLink
();
},
selecttime
:
function
()
{
var
that
=
this
;
var
_self
=
document
.
getElementById
(
"selectdate"
)
if
(
_self
.
picker
)
{
_self
.
picker
.
show
(
function
(
rs
)
{
_self
.
innerText
=
rs
.
text
_self
.
picker
.
dispose
();
_self
.
picker
=
null
;
});
}
else
{
var
optionsJson
=
_self
.
getAttribute
(
'data-options'
)
||
'{}'
;
var
options
=
JSON
.
parse
(
optionsJson
);
var
id
=
_self
.
getAttribute
(
'id'
);
/*
* 首次显示时实例化组件
* 示例为了简洁,将 options 放在了按钮的 dom 上
* 也可以直接通过代码声明 optinos 用于实例化 DtPicker
*/
_self
.
picker
=
new
mui
.
DtPicker
(
options
);
_self
.
picker
.
show
(
function
(
rs
)
{
/*
* rs.value 拼合后的 value
* rs.text 拼合后的 text
* rs.y 年,可以通过 rs.y.vaue 和 rs.y.text 获取值和文本
* rs.m 月,用法同年
* rs.d 日,用法同年
* rs.h 时,用法同年
* rs.i 分(minutes 的第二个字母),用法同年
*/
_self
.
innerText
=
rs
.
text
;
that
.
dateTime
=
rs
.
text
;
that
.
getData
();
/*
* 返回 false 可以阻止选择框的关闭
* return false;
*/
/*
* 释放组件资源,释放后将将不能再操作组件
* 通常情况下,不需要示放组件,new DtPicker(options) 后,可以一直使用。
* 当前示例,因为内容较多,如不进行资原释放,在某些设备上会较慢。
* 所以每次用完便立即调用 dispose 进行释放,下次用时再创建新实例。
*/
_self
.
picker
.
dispose
();
_self
.
picker
=
null
;
});
}
mui
(
'.scroll1'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll2'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll3'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll4'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
},
//selecttime
back
:
function
()
{
console
.
log
(
"back"
)
mui
.
back
()
// plus.screen.lockOrientation("portrait-primary") //横屏
}
}
})
\ No newline at end of file
html/Cutting.html
View file @
df017a24
...
...
@@ -7,173 +7,97 @@
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"
/>
<link
href=
"../dest/css/mui.min.css"
rel=
"stylesheet"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../dest/css/mui.picker.min.css"
/>
<style
type=
"text/css"
>
th
{
border-width
:
1px
;
border-style
:
solid
;
border-color
:
#a9c6c9
;
}
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../dest/css/Cutting.css"
/>
.altrowstable
{
border-width
:
1px
;
/*padding: 2px;*/
border-style
:
solid
;
border-color
:
#a9c6c9
;
background
:
white
;
height
:
200%
;
/*background-color: #F6F6F6;*/
}
.mui-backdrop
{
position
:
fixed
;
top
:
251px
;
right
:
10px
;
bottom
:
5px
;
left
:
698px
;
z-index
:
998
;
background-color
:
rgba
(
0
,
0
,
0
,
.3
);}
</style>
</head>
<body>
<div></div>
<div
id=
"app"
style=
" display:none"
>
<div
id=
"app"
style=
" display:block"
v-cloak
>
<div
class=
"mui-content"
>
<div
id=
"left"
style=
" display: inline-block; width: 30%;
"
>
<div
id=
"left"
class=
"left
"
>
<div
id=
"left-1"
style=
"position: absolute; top: 1px;
"
>
<a
class=
"mui-action-back mui-icon mui-icon-left-nav mui-pull-left"
style=
" width: 60px;"
@
click=
"back"
></a>
<label
style=
" text-align: center; position: relative; left: 20px;"
>
今日完成数
量:{{number}}
</label>
<div
id=
"left-1"
class=
"left-1
"
>
<a
class=
"mui-action-back mui-icon mui-icon-left-nav mui-pull-left"
@
click=
"back"
></a>
<label
>
今日产
量:{{number}}
</label>
</div>
<div
id=
"left-2"
>
<table
class=
"mui-table"
style=
" position: relative;top: -432px; "
>
<tbody
class=
"mui-table-view-cell"
>
<tr>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;width: 30%;"
>
时间
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;width: 50% "
>
指令号
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;width: 19%; "
>
数量
</th>
</tr>
</tbody>
</table>
<div
id=
"item1"
class=
"mui-scroll-wrapper scroll1"
style=
" border: solid #DAE6EF 1px ;height: 480px; background: white; display: inline-block; width: 30%; top: 49px;"
>
<div
class=
"mui-scroll"
>
<table
class=
"mui-table"
>
<tbody
class=
"mui-table-view-cell"
>
<tr
:id=
"'ReportID_'+item.ReportID"
class=
"Report"
v-for=
" item in itemsLeft"
@
click=
"selectReport(item.ReportID)"
>
<td
style=
"width: 30%;"
align=
"center"
>
{{item.Date}}
</td>
<td
style=
"width: 50% "
align=
"center"
>
{{item.IndexNo}}
</td>
<td
style=
"width: 19%;"
align=
"center"
>
{{item.Qty}}
</td>
</tbody>
</tr>
</table>
</div>
<div
id=
"left-2"
class=
"left-2"
>
<div
class=
"mui-input-row mui-search"
v-show=
"completeState"
>
<input
id=
"search"
class=
"mui-input-clear search"
placeholder=
"搜索:指令号,货号"
v-model=
"searchText"
type=
"search"
pattern=
"\d*"
@
keyup
.
enter=
"goSearch($event)"
:disabled=
"!completeState"
@
focus
.
prevent=
"changePosition()"
@
blur
.
prevent=
"changePosition1()"
>
</div>
<div
id=
"item2"
class=
"mui-scroll-wrapper scroll2"
:style=
"display_"
style=
" border: solid #DAE6EF 1px ;height: 480px; background: white; display: inline-block; width: 30%; top: 49px;"
>
<div
class=
"mui-scroll"
>
<table
class=
"mui-table"
>
<tbody
class=
"mui-table-view-cell"
>
<tr
:id=
"'ReportID2_'+item.ReportID"
class=
"Report"
v-for=
" item in itemsLeft2"
@
click=
"selectReport2(item.ReportID)"
>
<td
style=
"width: 30%;"
align=
"center"
>
{{item.Date}}
</td>
<td
style=
"width: 50%;"
align=
"center"
>
{{item.IndexNo}}
</td>
<td
style=
"width: 19%;"
align=
"center"
>
{{item.Qty}}
</td>
</tbody>
</tr>
</table>
</div>
</div>
<div
class=
"mui-segmented-control"
style=
"position: relative;top: 50px;"
>
<a
id=
"n1"
class=
"mui-control-item mui-active"
@
click=
"selectDisplay(1)"
>
今日实报
</a>
<a
id=
"n2"
class=
"mui-control-item "
@
click=
"selectDisplay(2)"
>
单款实报
</a>
</div>
</div>
</div>
<div
id=
"right"
style=
" display: inline-block; width: 69.5%; "
>
<div
id=
"right-1"
style=
""
>
<div
style=
"border: solid #DCDCE1 1px ; display: inline-block; width: 10%; position: relative;top: -20px; height: 38px;"
>
<button
style=
"text-align: center;border-style:none; width: 100%;height: 100%; background: white;"
>
指令号:
</button>
</div>
<div
class=
"mui-scroll-wrapper scroll3 mui-slider-indicator mui-segmented-control mui-segmented-control-inverted"
style=
" display: inline-block; width: 64.5%; position: relative;top: 1px;"
>
<div
class=
"mui-scroll"
>
<a
:id=
"'Index_' + itemh.IndexID"
class=
"mui-control-item Index mui-active"
style=
"background:#02C1ED ;"
v-for=
"itemh,i in itemsHead"
v-if=
"i == 0"
@
tap=
"selectIndex(itemh.IndexID)"
>
<img
src=
"../dest/img/00.png"
v-if=
"itemh.CompleteRatio ==0 "
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/12.5.png"
v-if=
" itemh.CompleteRatio>0 && itemh.CompleteRatio<= 12.5 "
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/25.png"
v-if=
" itemh.CompleteRatio>12.5 && itemh.CompleteRatio<= 25 "
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/37.5.png"
v-if=
" itemh.CompleteRatio>25 && itemh.CompleteRatio<= 37.5"
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/50.png"
v-if=
" itemh.CompleteRatio>37.5 && itemh.CompleteRatio<= 50"
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/62.5.png"
v-if=
" itemh.CompleteRatio>50 && itemh.CompleteRatio<= 62.5"
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/75.png"
v-if=
" itemh.CompleteRatio>62.5 && itemh.CompleteRatio<= 75"
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/87.5.png"
v-if=
" itemh.CompleteRatio>75 && itemh.CompleteRatio<100"
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/100.png"
v-if=
" itemh.CompleteRatio== 100"
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
{{itemh.IndexNo}}
</a>
<a
:id=
"'Index_' + itemh.IndexID"
class=
"mui-control-item Index"
style=
""
v-for=
"itemh,i in itemsHead"
v-if=
"i != 0"
@
tap=
"selectIndex(itemh.IndexID)"
>
<img
src=
"../dest/img/00.png"
v-if=
"itemh.CompleteRatio ==0 "
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/12.5.png"
v-if=
" itemh.CompleteRatio>0 && itemh.CompleteRatio<= 12.5 "
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/25.png"
v-if=
" itemh.CompleteRatio>12.5 && itemh.CompleteRatio<= 25 "
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/37.5.png"
v-if=
" itemh.CompleteRatio>25 && itemh.CompleteRatio<= 37.5"
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/50.png"
v-if=
" itemh.CompleteRatio>37.5 && itemh.CompleteRatio<= 50"
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/62.5.png"
v-if=
" itemh.CompleteRatio>50 && itemh.CompleteRatio<= 62.5"
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/75.png"
v-if=
" itemh.CompleteRatio>62.5 && itemh.CompleteRatio<= 75"
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/87.5.png"
v-if=
" itemh.CompleteRatio>75 && itemh.CompleteRatio< 100"
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<img
src=
"../dest/img/100.png"
v-if=
" itemh.CompleteRatio== 100"
style=
"width: 20px; height: 20px; position: relative; top: 5px;"
/>
<div
class=
"Text"
:class=
"{ maeginTop:!completeState}"
>
<div
class=
"left"
id=
"pullrefresh"
class=
"mui-content mui-scroll-wrapper"
>
<div
class=
"mui-scroll"
>
<div
id=
"theOne"
:state=
"completeState"
v-show=
"completeState"
>
<div
class=
"mui-table-view mui-table-view-chevron"
>
<ul
class=
"complet-detail"
:class=
"{active:cur==index}"
v-for=
"(list,index) in itemsHead"
:key=
"list.IndexID"
@
click=
"getDetailInfor(list.IndexID,index)"
>
<li><span>
指令号:
</span><span>
{{list.IndexNo}}
</span></li>
<li><span>
小组:
</span><span>
{{list.WorkTeam}}
</span></li>
<li><span>
货号:
</span><span
class=
"blueColor"
>
{{list.StyleCode}}
</span></li>
<li><span>
数量:
</span><span
class=
"redColor"
>
{{list.Qty}}
</span></li>
<li><span>
计划时间:
</span><span>
{{list.PlanDate}}
</span></li>
<li><span>
预计交期:
</span><span>
{{list.OrderDeliveryTime}}
</span></li>
<li><span>
计划人:
</span><span>
{{list.PlanMan}}
</span></li>
<!-- <li class="mui-progressbar mui-progressbar-in" data-progress="30"><span></span></li> -->
</ul>
</div>
</div>
<div
id=
"theTow"
:state=
"!completeState"
v-show=
"!completeState"
>
<div
class=
"mui-table-view1 mui-table-view-chevron"
>
<ul
class=
"complet-detail"
v-for=
"(list,index) in itemsLeft2"
:class=
"{active:cur==index}"
@
click=
"getDetailInfor(list.IndexID,index)"
>
<li><span>
指令号:
</span><span>
{{list.IndexNo}}
</span></li>
<li><span>
小组:
</span><span>
{{list.WorkTeam}}
</span></li>
<li><span>
货号:
</span><span
class=
"blueColor"
>
{{list.StyleCode}}
</span></li>
<li><span>
数量:
</span><span
class=
"redColor"
>
{{list.Qty}}
</span></li>
<li><span>
计划时间:
</span><span>
{{list.PlanDate}}
</span></li>
<li><span>
预计交期:
</span><span>
{{list.OrderDeliveryTime}}
</span></li>
<li><span>
计划人:
</span><span>
{{list.PlanMan}}
</span></li>
</ul>
</div>
</div>
{{itemh.IndexNo}}
</div>
</a>
</div>
</div>
<div
style=
" ; display: inline-block; width: 24% ;position: relative;top: -20px; height: 38px; "
>
<button
class=
"mui-icon mui-icon-arrowleft mui-btn-outlined ;"
style=
"border: 0px ; color:royalblue; width: 23%;height: 100%; text-align: left; padding-left:0px ;"
@
click=
"nextday(-1)"
>
</button>
<button
class=
"mui-btn-outlined"
style=
"padding-left: 6px; width: 54%;height: 100%; margin-left: -4px"
id=
"selectdate"
data-options=
'{"type":"date"}'
name=
"shipdate"
@
click=
"selecttime()"
>
{{dateTime}}
</button>
<button
class=
"mui-icon mui-icon-arrowright mui-btn-outlined"
style=
" border: 0px;color:royalblue;margin-left: -4px; width: 20%;height: 100%; padding:0px ;"
@
click=
"nextday(1)"
>
</div>
<!----时报按钮----->
<div
id=
"changePosition"
class=
"mui-segmented-control btn_bottom"
>
<a
id=
"n1"
class=
"mui-control-item mui-active"
@
click=
"selectDisplay(1)"
>
未完成
</a>
<a
id=
"n2"
class=
"mui-control-item "
@
click=
"selectDisplay(2)"
>
已完成
</a>
<!-- <a class=" mui-icon mui-icon-arrowleft mui-pull-left" style="border: blue solid 1px; margin-top: 5px" @click="nextday(-1)"></a> -->
<!-- <a class=" mui-icon mui-icon-arrowleft mui-pull-left" style="border: blue solid 1px; margin-left: -15px;margin-top: 5px" @click="nextday(-1)"></a> -->
</button>
</div>
</div>
<div
id=
"right-2"
style=
"margin-top: -20px;"
>
</div>
<div
id=
"right"
class=
"right"
>
<div
id=
"right-2"
>
<div
style=
"border: solid #DAE6EF 1px ; display: inline-block; width: 80%;"
>
<ul
class=
"mui-table-view"
>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
指令号:
</p>
<p
style=
"float: left;width: 40%; color: #060606;"
>
{{
itemsDetail
.IndexNo}}
</p>
<p
style=
"float: left;width: 40%; color: #060606;"
>
{{
rightInfor
.IndexNo}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;"
>
日期:
</p>
<p
style=
"float: left;width: 32%; color: #060606;"
>
{{
itemsDetail.Dat
e}}
</p>
<p
style=
"float: left;width: 32%; color: #060606;"
>
{{
rightInfor.OrderDeliveryTim
e}}
</p>
</li>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
货号:
</p>
<p
style=
"float: left;width: 40%;color: #1B83FE;"
>
{{
itemsDetail
.StyleCode}}
</p>
<p
style=
"float: left;width: 40%;color: #1B83FE;"
>
{{
rightInfor
.StyleCode}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;"
>
颜色:
</p>
<p
style=
"float: left;width: 32%; color: #060606;"
>
{{
itemsDetail
.ColorName}}
</p>
<p
style=
"float: left;width: 32%; color: #060606;"
>
{{
rightInfor
.ColorName}}
</p>
</li>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
数量
:
</p>
<p
style=
"float: left;width: 40%; color: red;"
>
{{
itemsDetail.
Qty}}
</p>
<p
style=
"float: left;width: 16%; color: #060606;"
>
完工数
:
</p>
<p
style=
"float: left;width: 40%; color: red;"
>
{{
rightInfor.Report
Qty}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;"
>
班组:
</p>
<p
style=
"float: left;width: 32%; color: #060606;"
>
{{
itemsDetail
.WorkTeam}}
</p>
<p
style=
"float: left;width: 32%; color: #060606;"
>
{{
rightInfor
.WorkTeam}}
</p>
</li>
</ul>
...
...
@@ -187,7 +111,7 @@
</div>
<div
id=
"right-4"
style=
" margin-top: -20px ;"
>
<div
style=
" display: inline-block; width: 60%; position: relative;top: -315px;
"
>
<div
class=
"detail-header
"
>
<table
class=
"mui-table "
>
<thead
class=
"mui-table-view"
>
...
...
@@ -200,15 +124,15 @@
</thead>
</table>
<div
class=
"mui-scroll-wrapper scroll4
"
style=
" border: #DAE6EF solid 1px; display: inline-block; height: 365px;background: white; top:22px;
"
>
<div
class=
"mui-scroll-wrapper scroll4
item_table
"
>
<div
class=
"mui-scroll"
>
<table
class=
"mui-table "
>
<tbody
class=
"mui-table-view-cell"
>
<tr
v-for=
"itemdetail,isize in
itemsDetail1
"
@
click=
"selectSize(itemdetail.SizeName)"
>
<td
class=
"altrowstable bg "
style=
"height: 50px"
align=
"center"
>
{{itemdetail.SizeName}}
</td>
<tbody
class=
"mui-table-view-cell
sDetail
"
>
<tr
v-for=
"itemdetail,isize in
rightInfor.ReportDetail
"
@
click=
"selectSize(itemdetail.SizeName)"
>
<td
class=
"altrowstable bg "
align=
"center"
>
{{itemdetail.SizeName}}
</td>
<td
class=
"altrowstable"
align=
"center"
>
{{itemdetail.Qty}}
</td>
<td
class=
"altrowstable"
align=
"center"
>
{{itemdetail.QualifiedQty}}
</td>
<td
class=
"altrowstable"
@
click
=
"nextPage(2,itemdetail.SizeName)"
align=
"center"
>
{{itemdetail.UnQualifiedQty}}
</td>
<td
class=
"altrowstable"
@
click=
"nextPage(2,itemdetail.SizeName)"
align=
"center"
>
{{itemdetail.UnQualifiedQty}}
</td>
</tr>
...
...
@@ -218,41 +142,40 @@
</div>
</div>
<div
style=
" display: inline-block; width: 38%;"
>
<div>
<button
type=
"button"
class=
"mui-btn mui-btn-blue mui-btn-block"
style=
"width: 120px; height: 60; display: inline-block;"
@
click=
"sop"
:disabled=
"SOP__"
>
SOP
</button>
<button
type=
"button"
class=
"mui-btn mui-btn-blue mui-btn-block"
style=
"width: 120px; height: 60; display: inline-block;"
:disabled=
"disable_qq_"
@
click=
"submitZD"
>
整单完工
</button>
<div
class=
"Rbtn"
>
<button
type=
"button"
class=
"mui-btn mui-btn-blue mui-btn-block"
@
click=
"sop"
:disabled=
"SOP__"
>
SOP
</button>
<button
type=
"button"
class=
"mui-btn mui-btn-blue mui-btn-block"
:disabled=
"disable_qq_"
@
click=
"submitZD"
>
整单完工
</button>
</div>
<div>
<input
readonly=
"readonly"
style=
"border: 1px solid #DDDDDD; width: 170px ;height:
65
px;margin-right: -6px;margin-bottom: -1px; text-align: center;color: red;background: #C8C7CC;font-size: 25px "
<div
class=
"Rcomputed"
>
<input
readonly=
"readonly"
style=
"border: 1px solid #DDDDDD; width: 170px ;height:
70
px;margin-right: -6px;margin-bottom: -1px; text-align: center;color: red;background: #C8C7CC;font-size: 25px "
onkeyup=
"this.value=this.value.replace(/[^0-9]/g,'')"
v-model=
"qty"
:value=
"qty"
:onchange=
"changeValue()"
/>
<button
style=
" width: 85px;height: 65px;margin-bottom: -1px;font-size: 25px"
@
click=
"backNumber(1)"
>
←
</button>
<button
@
click=
"backNumber(1)"
>
←
</button>
<button
style=
"
width: 85px;height: 65px; margin-right: -6px;margin-bottom: -1px;font-size: 25px
"
@
click=
"selectNumber(1)"
>
<button
style=
"
margin-right: -6px;margin-bottom: -1px;
"
@
click=
"selectNumber(1)"
>
1
</button>
<button
style=
"
width: 85px;height: 65px; margin-right: -5px;margin-bottom: -1px;font-size: 25px
"
@
click=
"selectNumber(2)"
>
<button
style=
"
margin-right: -5px;margin-bottom: -1px;
"
@
click=
"selectNumber(2)"
>
2
</button>
<button
style=
"
width: 85px;height: 65px;margin-bottom: -1px;margin-bottom: -1px;font-size: 25px
"
@
click=
"selectNumber(3)"
>
<button
style=
"
margin-bottom: -1px;
"
@
click=
"selectNumber(3)"
>
3
</button>
<button
style=
"
width: 85px; height: 65px;margin-right: -6px ;margin-bottom: -1px;font-size: 25px
"
@
click=
"selectNumber(4)"
>
<button
style=
"
margin-right: -6px ;margin-bottom: -1px;
"
@
click=
"selectNumber(4)"
>
4
</button>
<button
style=
"
width: 85px; height: 65px;margin-right: -5px;margin-bottom: -1px;font-size: 25px
"
@
click=
"selectNumber(5)"
>
<button
style=
"
margin-right: -5px;margin-bottom: -1px;
"
@
click=
"selectNumber(5)"
>
5
</button>
<button
style=
"
width: 85px;height: 65px;margin-bottom: -1px;font-size: 25px
"
@
click=
"selectNumber(6)"
>
6
</button>
<button
style=
"
width: 85px;height: 65px ;margin-bottom: -1px;; margin-right: -6px;font-size: 25px
"
@
click=
"selectNumber(7)"
>
<button
style=
"
margin-bottom: -1px;
"
@
click=
"selectNumber(6)"
>
6
</button>
<button
style=
"
margin-bottom: -1px; margin-right: -6px;
"
@
click=
"selectNumber(7)"
>
7
</button>
<button
style=
"
width: 85px;height: 65px;margin-bottom: -1px;; margin-right: -5px;font-size: 25px
"
@
click=
"selectNumber(8)"
>
<button
style=
"
margin-bottom: -1px;; margin-right: -5px;
"
@
click=
"selectNumber(8)"
>
8
</button>
<button
style=
"
width: 85px;height: 65px;margin-bottom: -1px;font-size: 25px
"
@
click=
"selectNumber(9)"
>
9
</button>
<button
style=
"
width: 85px;height: 65px; margin-right: -6px;font-size: 25px
"
@
click=
"selectNumber(0)"
>
0
</button>
<button
class=
"mui-btn-blue"
style=
" width: 170px;
height: 65px;
"
@
click=
"submit"
:disabled=
"disable_save_button_C"
>
<button
style=
"
margin-bottom: -1px;
"
@
click=
"selectNumber(9)"
>
9
</button>
<button
style=
"
margin-right: -6px;
"
@
click=
"selectNumber(0)"
>
0
</button>
<button
class=
"mui-btn-blue"
style=
" width: 170px;"
@
click=
"submit"
:disabled=
"disable_save_button_C"
>
提交
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
@@ -265,6 +188,8 @@
<script
src=
"../dest/js/public.min.js"
></script>
<script
src=
"../dest/js/vue.min.js"
>
</script>
<script
src=
"../dest/js/moment.js"
></script>
<script
src=
"../js/mui.pullToRefresh.js"
></script>
<!-- <script src="../dest/js/mes/cutting.js"></script> -->
<script
type=
"text/javascript"
>
mui
.
plusReady
(
function
()
{
// plus.nativeUI.closeWaiting();
...
...
@@ -272,43 +197,58 @@
// mui.currentWebview.show();
initPage
();
});
function
initPage
()
{
plus
.
screen
.
lockOrientation
(
"landscape-primary"
)
//横屏
app
.
init
();
}
var
app
=
new
Vue
({
el
:
'#app'
,
data
:
{
number
:
0
,
qty
:
0
,
size
:
0
,
dateTime
:
""
,
today
:
""
,
link
:
""
,
link
:
""
,
itemsDetail
:
[],
//订单明细
itemsDetail1
:
[],
itemsDetail2
:
[],
itemsHead
:
[],
itemsDetail1
:
[],
//
itemsDetail2
:
[],
//
paramUnDo
:
{
pageIndex
:
2
,
pageSize
:
10
},
paramDone
:
{
pageIndex
:
2
,
pageSize
:
10
},
itemsHead
:
[],
//未完成和搜索左侧数组
itemsLeft
:
[],
itemsLeft2
:
[],
itemsLeft2
:
[],
//已完成左侧数组
itemsSize
:
[],
SizeQty
:
[],
ReportType
:
0
,
ReportType
:
0
,
IndexID
:
0
,
// disable_save_button: 'disabled',
rightInfor
:
[],
//右侧详情
cur
:
0
,
//点击选中当前状态
completeState
:
true
,
//切换已完成和未完成状态
searchText
:
''
,
//搜索框输入的内容
datalen
:
20
,
//默认取数据数量
reDatalen
:
10
,
//每次加载的数据数量
disable_reportDelete
:
'disabled'
,
disable_qq
:
'disabled'
,
ReportID
:
0
,
Report_IndexID
:
0
,
Model
:
0
,
CompleteRatio
:
0
,
//完成进度
displayModel
:
1
,
zhezhao
:
1
,
//
mask_
:
mui
.
createMask
(
function
(
e
){
return
false
;}),
appdis
:
0
,
unPagenum
:
1
,
//未完成页数
pagenum
:
1
,
//已完成页数
displayModel
:
1
,
zhezhao
:
1
,
//
mask_
:
mui
.
createMask
(
function
(
e
)
{
return
false
;
}),
appdis
:
0
,
},
computed
:
{
disable_save_button_C
:
function
()
{
...
...
@@ -325,84 +265,180 @@
return
'disabled'
;
}
},
display_
:
function
()
{
if
(
this
.
displayModel
==
1
)
{
display_
:
function
()
{
if
(
this
.
displayModel
==
1
)
{
return
"display: none "
}
},
SOP__
:
function
(){
if
(
this
.
IndexID
==
0
){
SOP__
:
function
()
{
if
(
this
.
IndexID
==
0
)
{
return
"disabled"
}
else
{
}
else
{
return
null
}
},
},
methods
:
{
init
:
function
()
{
mui
.
init
();
init
:
function
()
{
//初始化
mui
.
init
({
pullRefresh
:
{
container
:
'#pullrefresh'
,
up
:
{
height
:
100
,
contentrefresh
:
'正在加载...'
,
contentnomore
:
'没有更多数据了'
,
callback
:
function
()
{
var
reUnfinished
=
document
.
getElementById
(
"theOne"
).
getAttribute
(
"state"
);
var
reFinished
=
document
.
getElementById
(
"theTow"
).
getAttribute
(
"state"
);
var
UnfinishedUrl
=
'/api/vMES/CutOffProductionReport/ToDo'
;
var
FinishedUrl
=
'/api/vMES/CutOffProductionReport/Done'
;
var
searchUrl
=
'/api/vMES/CutOffProductionReport/Search'
;
//console.log("未完成" + reUnfinished)
//console.log("已完成" + reFinished)
var
UnfinishedData
=
app
.
itemsHead
;
var
FinishedUrlData
=
app
.
itemsLeft2
;
//var rightInfor = app.rightInfor;
if
(
reUnfinished
)
{
if
(
app
.
searchText
!=
""
)
{
searchPull
(
searchUrl
,
UnfinishedData
,
app
.
paramUnDo
);
}
pullupRefresh
(
UnfinishedUrl
,
UnfinishedData
,
app
.
paramUnDo
);
}
else
if
(
reFinished
)
{
pullupRefresh
(
FinishedUrl
,
FinishedUrlData
,
app
.
paramDone
);
}
}
},
}
});
function
pullupRefresh
(
url
,
arr
,
params
)
{
//console.log("加载前1" + arr);
setTimeout
(
function
()
{
var
para
=
{
PageSize
:
params
.
pageSize
,
PageIndex
:
params
.
pageIndex
};
console
.
log
(
"canshu:"
+
JSON
.
stringify
(
para
));
//console.log("之前的数据:" + arr);
Api
.
post
(
url
,
para
,
function
(
e
)
{
//2.没数据 提示 但是可以一直发请求只不过传回来是空
if
(
e
.
success
)
{
console
.
log
(
"111:"
+
JSON
.
stringify
(
e
.
items
));
var
data
=
e
.
items
;
if
(
e
.
items
.
length
>
0
)
{
params
.
pageIndex
++
;
}
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
arr
.
push
(
data
[
i
]);
}
//console.log("data"+data);
//console.log("之后的arr"+arr);
//console.log("页数:"+params.pageIndex);
console
.
log
(
"canshuqq:"
+
JSON
.
stringify
(
para
));
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
mui
(
'#pullrefresh'
).
pullRefresh
().
endPullupToRefresh
();
//参数为true代表没有更多数据了。
mui
(
'#pullrefresh'
).
pullRefresh
().
refresh
(
true
);
//mui('#pullrefresh').pullRefresh().disablePullupToRefresh();
},
1000
);
}
function
searchPull
(
url
,
arr
,
params
)
{
setTimeout
(
function
()
{
var
para
=
{
searchText
:
app
.
searchText
,
PageSize
:
params
.
pageSize
,
PageIndex
:
params
.
pageIndex
};
//console.log("canshu:" + JSON.stringify(para));
Api
.
post
(
url
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
//console.log("111:" + JSON.stringify(e.items));
var
data
=
e
.
items
;
if
(
e
.
items
.
length
>
0
)
{
params
.
pageIndex
++
;
}
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
arr
.
push
(
data
[
i
]);
}
//console.log("canshuqq:" + JSON.stringify(para));
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
mui
(
'#pullrefresh'
).
pullRefresh
().
endPullupToRefresh
();
mui
(
'#pullrefresh'
).
pullRefresh
().
refresh
(
true
);
},
1000
);
}
window
.
addEventListener
(
'back'
,
function
(
e
)
{
var
that
=
this
;
app
.
getDataDetail1
();
});
setTimeout
(
function
(){
mui
(
".mui-icon-clear"
)[
0
].
addEventListener
(
'tap'
,
function
()
{
document
.
activeElement
.
blur
();
//收起虚拟键盘
app
.
searchText
=
''
;
app
.
getData
();
//console.log('1111');
});
setTimeout
(
function
()
{
plus
.
nativeUI
.
closeWaiting
();
var
ap
=
document
.
getElementById
(
"app"
);
ap
.
style
=
" display: inline-block"
;
},
200
)
ap
.
style
=
" display: inline-block"
;
},
200
)
mui
(
'.mui-scroll-wrapper'
).
scroll
({
bounce
:
false
,
indicators
:
true
,
//是否显示滚动条
});
this
.
dateTime
=
moment
().
format
().
substring
(
0
,
10
)
this
.
dateTime
=
moment
().
format
().
substring
(
0
,
10
)
this
.
today
=
this
.
dateTime
;
this
.
getData
();
this
.
getData
();
},
playVoice
:
function
(
filename
)
{
if
(
plus
.
audio
==
undefined
)
{
}
else
{
// 播放操作
var
p
=
plus
.
audio
.
createPlayer
(
"_www/dest/voice/"
+
filename
);
p
.
play
(
function
()
{
//alert( "Audio play success!" );
},
function
(
e
)
{
//alert( "Audio play failed: " + e.message );
});
}
},
playVoice
:
function
(
filename
){
if
(
plus
.
audio
==
undefined
)
{
}
else
{
// 播放操作
var
p
=
plus
.
audio
.
createPlayer
(
"_www/dest/voice/"
+
filename
);
p
.
play
(
function
()
{
//alert( "Audio play success!" );
},
function
(
e
)
{
//alert( "Audio play failed: " + e.message );
});
}
},
getData
:
function
()
{
var
that
=
this
;
var
tempdate
=
this
.
dateTime
+
" 00:00:00"
;
this
.
createZhezhao
(
-
1
)
var
para
=
{
ReportType
:
this
.
ReportType
,
Date
:
tempdate
PageSize
:
that
.
datalen
,
PageIndex
:
that
.
unPagenum
};
Api
.
post
(
'/api/vMES/
ProductionReport/ProductIndexN
o'
,
para
,
function
(
e
)
{
that
.
itemsHead
=
e
.
items
;
console
.
log
(
"lalla"
+
JSON
.
stringify
(
para
));
Api
.
post
(
'/api/vMES/
CutOffProductionReport/ToD
o'
,
para
,
function
(
e
)
{
//console.log("one :::;" +JSON.stringify(e.items.length))
//console.log("右侧详情" + JSON.stringify(e.items))
//console.log("点击之前"+JSON.stringify(that.rightInfor))
if
(
e
.
items
.
length
>
0
)
{
that
.
itemsDetail
=
e
.
items
[
0
];
that
.
itemsHead
=
e
.
items
;
that
.
rightInfor
=
e
.
items
[
0
];
//that.itemsDetail = e.items[0];
that
.
IndexID
=
e
.
items
[
0
].
IndexID
;
that
.
getDataDetail1
();
that
.
getDataDetail2
(
1
);
...
...
@@ -410,7 +446,9 @@
that
.
qty
=
0
;
that
.
disable_reportDelete
=
'disabled'
;
}
else
{
that
.
itemsDetail
=
[];
that
.
itemsHead
=
[];
that
.
rightInfor
=
[];
//that.itemsDetail = [];
that
.
IndexID
=
0
;
that
.
itemsDetail1
=
[];
that
.
itemsSize
=
[];
...
...
@@ -422,88 +460,174 @@
that
.
getDataDetail2
(
1
);
that
.
getTatolNum
();
}
},
function
(
b
,
bb
,
bbb
)
{
console
.
log
(
bbb
);
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
getDetailInfor
:
function
(
idInfor
,
index
)
{
//获取实报详细 未完成,已完成的的尺码明细信息
this
.
IndexID
=
idInfor
;
var
that
=
this
;
that
.
cur
=
index
;
that
.
searchText
=
''
;
var
para
=
{
"IndexID"
:
idInfor
};
Api
.
post
(
'/api/vMES/CutOffProductionReport/Detail'
,
para
,
function
(
e
)
{
//console.log("详情" + JSON.stringify(e));
if
(
e
.
success
)
{
that
.
rightInfor
=
e
.
data
;
//console.log("点击之后"+JSON.stringify(that.rightInfor))
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
ChangeState
:
function
(
n
)
{
//改变状态,切换已完成和未完成
//n= 1 未完成 n=2 已完成
var
that
=
this
;
// console.log(JSON.stringify(para))
if
(
n
==
1
)
{
var
para
=
{
PageSize
:
that
.
datalen
,
PageIndex
:
that
.
unPagenum
};
//console.log("do para " + JSON.stringify(para))
that
.
searchText
=
''
;
Api
.
post
(
'/api/vMES/CutOffProductionReport/ToDo'
,
para
,
function
(
e
)
{
that
.
cur
=
0
;
if
(
e
.
items
.
length
>
0
){
that
.
itemsHead
=
e
.
items
;
that
.
rightInfor
=
e
.
items
[
0
];
}
else
{
that
.
itemsHead
=
[];
that
.
rightInfor
=
[];
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
}
else
if
(
n
==
2
)
{
var
para
=
{
PageSize
:
that
.
datalen
,
PageIndex
:
that
.
pagenum
};
console
.
log
(
"do para "
+
JSON
.
stringify
(
para
))
Api
.
post
(
'/api/vMES/CutOffProductionReport/Done'
,
para
,
function
(
e
)
{
console
.
log
(
"已完成"
+
JSON
.
stringify
(
e
.
items
))
var
data
=
e
.
items
.
length
;
if
(
data
>
0
)
{
that
.
itemsLeft2
=
e
.
items
;
that
.
rightInfor
=
e
.
items
[
0
];
that
.
cur
=
0
;
}
else
{
that
.
rightInfor
=
[];
that
.
itemsLeft2
=
[];
that
.
cur
=
0
;
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
}
},
goSearch
:
function
(
event
)
{
var
that
=
this
;
var
para
=
{
SearchText
:
that
.
searchText
,
PageSize
:
200
,
PageIndex
:
that
.
pagenum
,
};
if
(
event
.
keyCode
==
"13"
)
{
document
.
activeElement
.
blur
();
//收起虚拟键盘
if
(
that
.
searchText
==
''
)
return
;
Api
.
post
(
'/api/vMES/CutOffProductionReport/Search'
,
para
,
function
(
e
)
{
var
data
=
e
.
items
.
length
;
if
(
data
>
0
)
{
that
.
itemsHead
=
e
.
items
;
that
.
rightInfor
=
e
.
items
[
0
];
that
.
cur
=
0
;
}
else
{
that
.
itemsHead
=
[];
that
.
rightInfor
=
[];
that
.
cur
=
0
;
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
event
.
preventDefault
();
// 阻止默认事件---阻止页面刷新
//that.searchText = '';
}
},
getDataDetail1
:
function
()
{
var
that
=
this
;
var
para
=
{
IndexID
:
this
.
IndexID
,
};
if
(
this
.
IndexID
==
0
)
{
if
(
this
.
IndexID
==
0
)
{
return
;
}
Api
.
post
(
'/api/vMES/ProductionReport/ProductIndexNoDetail'
,
para
,
function
(
e
)
{
if
(
e
.
success
){
if
(
e
.
success
)
{
that
.
itemsDetail
=
e
.
data
;
that
.
itemsDetail1
=
e
.
data
.
ReportDetail
;
that
.
itemsSize
=
e
.
data
.
SizeName
;
//console.log("右侧信息"+JSON.stringify(that.itemsDetail).length)
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
getDataDetail2
:
function
(
n
)
{
//n= 1 今日时报 n=2 单款时报
//n= 1 未完成 n=2 已完成
var
that
=
this
;
var
para
=
{
ReportType
:
this
.
ReportType
,
IndexID
:
n
==
1
?
0
:
this
.
IndexID
,
ReportType
:
this
.
ReportType
,
IndexID
:
n
==
1
?
0
:
this
.
IndexID
,
PageSize
:
200
,
PageIndex
:
1
,
};
// console.log(JSON.stringify(para))
if
(
n
==
1
)
{
Api
.
post
(
'/api/vMES/
ProductionReport/Report
'
,
para
,
function
(
e
)
{
if
(
n
==
1
)
{
Api
.
post
(
'/api/vMES/
CutOffProductionReport/ToDo
'
,
para
,
function
(
e
)
{
that
.
itemsLeft
=
e
.
items
;
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
}
else
if
(
n
==
2
){
if
(
this
.
IndexID
==
0
)
{
that
.
itemsLeft2
=
[];
}
else
{
Api
.
post
(
'/api/vMES/ProductionReport/Report'
,
para
,
function
(
e
)
{
that
.
itemsLeft2
=
e
.
items
;
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
}
else
if
(
n
==
2
)
{
console
.
log
(
"getDataDetail2:::: "
+
n
+
this
.
IndexID
)
Api
.
post
(
'/api/vMES/CutOffProductionReport/Done'
,
para
,
function
(
e
)
{
console
.
log
(
"itemsLeft2"
+
JSON
.
stringify
(
e
.
items
))
that
.
itemsLeft2
=
e
.
items
;
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
});
}
}
}
},
getTatolNum
:
function
()
{
getTatolNum
:
function
()
{
//今日产量
var
that
=
this
;
var
para
=
{
ReportType
:
this
.
ReportType
,
ReportType
:
this
.
ReportType
,
Date
:
this
.
dateTime
+
" 00:00:00"
,
};
Api
.
post
(
'/api/vMES/ProductionReport/TotalQty'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
number
=
e
.
data
;
if
(
e
.
success
)
{
that
.
number
=
e
.
data
;
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
...
...
@@ -512,16 +636,13 @@
//完成进度
getCompleteRatio
:
function
(
n
)
{
var
that
=
this
;
var
para
=
{
IndexID
:
n
};
if
(
n
==
0
)
{
if
(
n
==
0
)
{
return
;
}
// console.log(JSON.stringify(para))
Api
.
post
(
'/api/vMES/ProductionReport/IndexNoCompleteRatio'
,
para
,
function
(
e
)
{
that
.
CompleteRatio
=
e
.
data
;
// console.log(JSON.stringify(e))
...
...
@@ -558,9 +679,9 @@
that
.
getDataDetail2
(
1
);
//获取左边列表明细
that
.
getDataDetail2
(
2
);
that
.
Model
=
0
;
if
(
that
.
IndexID
!=
0
)
{
if
(
that
.
IndexID
!=
0
)
{
var
Index
=
document
.
getElementById
(
"Index_"
+
that
.
IndexID
)
Index
.
style
.
background
=
"#02C1ED"
;
Index
.
style
.
background
=
"#02C1ED"
;
}
mui
.
toast
(
"撤回成功"
)
...
...
@@ -578,21 +699,15 @@
var
para
=
{
ReportID
:
this
.
ReportID
,
};
Api
.
post
(
'/api/vMES/ProductionReport/ReportIndexNoDetail'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
itemsDetail
=
e
.
data
;
that
.
itemsSize
=
e
.
data
.
SizeName
;
that
.
itemsDetail1
=
e
.
data
.
ReportDetail
;
that
.
size
=
e
.
data
.
ReportSizeName
;
that
.
qty
=
e
.
data
.
ReportQty
;
that
.
selectSize
(
e
.
data
.
ReportSizeName
);
}
else
{
mui
.
toast
(
"获取明细失败:"
+
e
.
message
)
}
...
...
@@ -601,41 +716,40 @@
});
},
getLink
:
function
()
{
getLink
:
function
()
{
var
that
=
this
;
var
para
=
{
var
para
=
{
ReportType
:
this
.
ReportType
,
StyleCode
:
this
.
itemsDetail
.
StyleCode
}
// console.log( JSON.stringify(para))
Api
.
post
(
'/api/vMES/Sop/StyleSop'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
if
(
e
.
success
)
{
// console.log( JSON.stringify(e))
that
.
link
=
e
.
data
.
Url
;
that
.
link
=
e
.
data
.
Url
;
var
url_
=
"sop.html"
;
var
id_
=
"sop.html"
;
mui
.
openWindow
({
url
:
url_
,
id
:
id_
,
extras
:
{
style
:
that
.
itemsDetail
.
StyleCode
,
ReportType
:
that
.
ReportType
,
link
:
that
.
link
,
style
:
that
.
itemsDetail
.
StyleCode
,
ReportType
:
that
.
ReportType
,
link
:
that
.
link
,
parentPage
:
"Cutting.html"
},
});
}
else
{
}
else
{
mui
.
toast
(
"获取sop地址失败: "
+
e
.
message
)
}
},
function
(
b
,
bb
,
bbb
)
{
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
SizeQtyA
:
function
()
{
...
...
@@ -665,6 +779,7 @@
// that.disable_save_button = 'disabled'
that
.
size
=
0
;
that
.
qty
=
0
;
that
.
selectSize
(
0
);
that
.
getDataDetail1
();
//获取列表尺码对应数量
that
.
getTatolNum
();
//获取今日完成数量
...
...
@@ -672,6 +787,7 @@
that
.
getDataDetail2
(
2
);
//获取左边列表明细 单款实报
that
.
getCompleteRatio
(
that
.
IndexID
)
//订单进度
that
.
playVoice
(
"cg.mp3"
);
that
.
getDetailInfor
(
that
.
IndexID
,
that
.
cur
)
mui
.
toast
(
"提交成功"
);
}
else
{
...
...
@@ -690,11 +806,11 @@
mui
.
confirm
(
'请确认是否整单完工?'
,
'提示'
,
btnArray
,
function
(
e
)
{
if
(
e
.
index
==
1
)
{
var
para
=
{
ReportType
:
this
.
ReportType
,
ReportType
:
this
.
ReportType
,
IndexID
:
that
.
IndexID
,
}
// console.log(JSON.stringify(para));
// console.log(JSON.stringify(para));
...
...
@@ -711,7 +827,7 @@
that
.
getCompleteRatio
(
that
.
IndexID
)
//订单进度
that
.
playVoice
(
"cg.mp3"
);
mui
.
toast
(
"提交成功"
);
}
else
{
mui
.
toast
(
"提交失败: "
+
e
.
message
);
...
...
@@ -730,9 +846,9 @@
},
selectIndex
:
function
(
idx
)
{
this
.
createZhezhao
(
-
1
)
//关闭遮罩
this
.
createZhezhao
(
-
1
)
//关闭遮罩
var
indxx
=
document
.
getElementsByClassName
(
"Index"
);
var
indx
=
document
.
getElementById
(
"Index_"
+
idx
)
...
...
@@ -765,44 +881,39 @@
this
.
qty
=
0
;
this
.
disable_reportDelete
=
'disabled'
}
mui
(
'.scroll1'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll2'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll1'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll2'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
// mui('.scroll3').scroll().scrollTo(0,0,100);
mui
(
'.scroll4'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll4'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
},
createZhezhao
:
function
(
n
)
{
createZhezhao
:
function
(
n
)
{
// console.log(n)
if
(
n
==
-
1
){
// var mask = mui.createMask();//callback为用户点击蒙版时自动执行的回调;
// this.mask_.close();
this
.
mask_
.
_remove
()
this
.
zhezhao
=
1
;
}
else
{
if
(
this
.
zhezhao
==
1
){
// var mask = mui.createMask(function(e){
// return false;
//
// });//callback为用户点击蒙版时自动执行的回调;
this
.
mask_
.
show
();
//显示遮罩
this
.
zhezhao
=
2
// mask.close();//关闭遮罩
}
if
(
n
==
-
1
)
{
// var mask = mui.createMask();//callback为用户点击蒙版时自动执行的回调;
// this.mask_.close();
this
.
mask_
.
_remove
()
this
.
zhezhao
=
1
;
}
else
{
if
(
this
.
zhezhao
==
1
)
{
// var mask = mui.createMask(function(e){
// return false;
//
// });//callback为用户点击蒙版时自动执行的回调;
this
.
mask_
.
show
();
//显示遮罩
this
.
zhezhao
=
2
// mask.close();//关闭遮罩
}
}
},
selectReport
:
function
(
obj
)
{
var
op
=
document
.
getElementById
(
"ReportID_"
+
obj
)
this
.
ReportID
=
obj
;
...
...
@@ -817,7 +928,7 @@
}
}
}
if
(
this
.
ReportID
!=
0
)
{
this
.
disable_reportDelete
=
null
;
...
...
@@ -828,7 +939,7 @@
reportele
[
i
].
style
.
background
=
""
}
if
(
obj
!=
0
)
{
if
(
this
.
IndexID
!=
0
)
{
if
(
this
.
IndexID
!=
0
)
{
var
Index
=
document
.
getElementById
(
"Index_"
+
this
.
IndexID
)
Index
.
style
.
background
=
""
;
}
...
...
@@ -840,72 +951,69 @@
},
selectReport2
:
function
(
obj
)
{
var
op
=
document
.
getElementById
(
"ReportID2_"
+
obj
)
this
.
ReportID
=
obj
;
if
(
obj
==
0
)
{
this
.
Report_IndexID
=
0
}
else
{
this
.
createZhezhao
(
1
)
for
(
var
i
=
0
;
i
<
this
.
itemsLeft2
.
length
;
i
++
)
{
if
(
this
.
itemsLeft2
[
i
].
ReportID
==
obj
)
{
this
.
Report_IndexID
=
this
.
itemsLeft2
[
i
].
IndexID
}
}
}
if
(
this
.
ReportID
!=
0
)
{
this
.
disable_reportDelete
=
null
;
}
var
reportele
=
document
.
getElementsByClassName
(
"Report"
);
for
(
var
i
=
0
;
i
<
reportele
.
length
;
i
++
)
{
reportele
[
i
].
style
.
background
=
""
}
if
(
obj
!=
0
)
{
if
(
this
.
IndexID
!=
0
){
var
Index
=
document
.
getElementById
(
"Index_"
+
this
.
IndexID
)
Index
.
style
.
background
=
""
;
}
op
.
style
.
background
=
"#02C1ED"
;
this
.
Model
=
1
;
this
.
getDataByReportID
();
}
},
selectDisplay
:
function
(
n
){
var
opt
=
document
.
getElementById
(
"item1"
)
var
opt2
=
document
.
getElementById
(
"item2"
)
var
n1
=
document
.
getElementById
(
"n1"
)
var
n2
=
document
.
getElementById
(
"n2"
)
if
(
n
==
1
){
n1
.
style
.
background
=
"royalblue"
var
op
=
document
.
getElementById
(
"ReportID2_"
+
obj
)
this
.
ReportID
=
obj
;
if
(
obj
==
0
)
{
this
.
Report_IndexID
=
0
}
else
{
this
.
createZhezhao
(
1
)
for
(
var
i
=
0
;
i
<
this
.
itemsLeft2
.
length
;
i
++
)
{
if
(
this
.
itemsLeft2
[
i
].
ReportID
==
obj
)
{
this
.
Report_IndexID
=
this
.
itemsLeft2
[
i
].
IndexID
}
}
}
if
(
this
.
ReportID
!=
0
)
{
this
.
disable_reportDelete
=
null
;
}
var
reportele
=
document
.
getElementsByClassName
(
"Report"
);
for
(
var
i
=
0
;
i
<
reportele
.
length
;
i
++
)
{
reportele
[
i
].
style
.
background
=
""
}
if
(
obj
!=
0
)
{
if
(
this
.
IndexID
!=
0
)
{
var
Index
=
document
.
getElementById
(
"Index_"
+
this
.
IndexID
)
Index
.
style
.
background
=
""
;
}
op
.
style
.
background
=
"#02C1ED"
;
this
.
Model
=
1
;
this
.
getDataByReportID
();
}
},
selectDisplay
:
function
(
n
)
{
console
.
log
(
"selectDisplay:"
+
n
)
var
n1
=
document
.
getElementById
(
"n1"
)
var
n2
=
document
.
getElementById
(
"n2"
)
if
(
n
==
1
)
{
this
.
completeState
=
true
;
this
.
ChangeState
(
1
);
n1
.
style
.
background
=
"royalblue"
n1
.
style
.
color
=
"white"
n2
.
style
.
background
=
"white"
n2
.
style
.
background
=
"white"
n2
.
style
.
color
=
"royalblue"
opt
.
style
.
display
=
"inline-block"
;
opt2
.
style
.
display
=
"none"
}
if
(
n
==
2
){
this
.
getDataDetail2
(
2
)
n1
.
style
.
background
=
"white"
}
else
if
(
n
==
2
)
{
this
.
completeState
=
false
;
//this.searchState=false;
this
.
ChangeState
(
2
);
n1
.
style
.
background
=
"white"
n1
.
style
.
color
=
"royalblue"
n2
.
style
.
background
=
"royalblue"
n2
.
style
.
background
=
"royalblue"
n2
.
style
.
color
=
"white"
opt
.
style
.
display
=
"none"
;
opt2
.
style
.
display
=
"inline-block"
//opt.style.display =
"none";
//
opt2.style.display = "inline-block"
}
},
changeValue
:
function
()
{
if
(
isNaN
(
parseInt
(
this
.
qty
)))
{
...
...
@@ -970,12 +1078,12 @@
// bg[0].style.background = "#02C1ED"
}
},
nextday
:
function
(
n
)
{
this
.
createZhezhao
(
-
1
)
var
d
=
new
Date
(
this
.
dateTime
);
d
.
setTime
(
d
.
getTime
()
+
24
*
60
*
60
*
1000
*
n
);
if
(
d
.
getDate
().
toString
().
length
==
1
)
{
...
...
@@ -985,11 +1093,11 @@
}
this
.
getData
();
mui
(
'.scroll1'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll2'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll3'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll4'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll1'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll2'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll3'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll4'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
},
stylebg
:
function
(
n
)
{
...
...
@@ -1000,7 +1108,7 @@
}
}
},
nextPage
:
function
(
n
,
k
)
{
nextPage
:
function
(
n
,
k
)
{
var
url_
;
var
id_
;
url_
=
"CuttingQuality.html"
;
...
...
@@ -1013,22 +1121,17 @@
dateTime
:
this
.
dateTime
,
itemsDetail
:
this
.
itemsDetail
,
itemsSize
:
this
.
itemsSize
,
type
:
n
,
// n =2 点击不合格进去 ,
parentSize
:
k
,
sizeNum
:
this
.
itemsDetail1
//尺码和数量
type
:
n
,
// n =2 点击不合格进去 ,
parentSize
:
k
,
sizeNum
:
this
.
itemsDetail1
//尺码和数量
},
});
},
sop
:
function
()
{
this
.
getLink
();
},
selecttime
:
function
()
{
...
...
@@ -1062,7 +1165,7 @@
* rs.h 时,用法同年
* rs.i 分(minutes 的第二个字母),用法同年
*/
_self
.
innerText
=
rs
.
text
;
that
.
dateTime
=
rs
.
text
;
that
.
getData
();
...
...
@@ -1081,19 +1184,53 @@
_self
.
picker
=
null
;
});
}
mui
(
'.scroll1'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll2'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll3'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll4'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll1'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll2'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll3'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
mui
(
'.scroll4'
).
scroll
().
scrollTo
(
0
,
0
,
100
);
},
//selecttime
back
:
function
()
{
console
.
log
(
"back"
)
mui
.
back
()
// plus.screen.lockOrientation("portrait-primary") //横屏
},
changePosition
:
function
()
{
var
btn1
=
document
.
getElementById
(
"changePosition"
);
var
Height
=
document
.
documentElement
.
clientHeight
||
document
.
body
.
clientHeight
;
//console.log("得到焦点。。。。" + Height);
window
.
onresize
=
function
()
{
var
Height1
=
document
.
documentElement
.
clientHeight
||
document
.
body
.
clientHeight
;
//console.log("得到焦点。。。。" + Height1);
if
(
Height
>
Height1
)
{
btn1
.
style
.
display
=
"none"
;
}
else
{
btn1
.
style
.
display
=
"block"
;
}
}
},
changePosition1
:
function
()
{
var
btn1
=
document
.
getElementById
(
"changePosition"
);
var
Height
=
document
.
documentElement
.
clientHeight
||
document
.
body
.
clientHeight
;
window
.
onresize
=
function
()
{
var
Height1
=
document
.
documentElement
.
clientHeight
||
document
.
body
.
clientHeight
;
if
(
Height
<
Height1
)
{
btn1
.
style
.
display
=
"block"
;
}
else
{
btn1
.
style
.
display
=
"none"
;
}
}
}
}
})
</script>
</body>
...
...
html/NeedlecarHandover.html
View file @
df017a24
...
...
@@ -6,147 +6,160 @@
<title></title>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"
/>
<link
href=
"../dest/css/mui.min.css"
rel=
"stylesheet"
/>
<link
href=
"../dest/css/needlecarHand/needlecarHandover.css"
rel=
"stylesheet"
/>
</head>
<body>
<div
id=
"app"
>
<div
id=
"left-1"
style=
"background-color: #007AFF; width: 40%; height: 30px; margin-bottom: 1px;"
>
<a
class=
"mui-action-back mui-icon mui-icon-left-nav mui-pull-left"
style=
"color: white; width: 60px;"
@
click=
"back"
></a>
<label
style=
" text-align: center; margin-left: 70px; color: white;"
>
针车交接
</label>
</div>
<div
id=
"left-2"
style=
"width: 40%"
>
<div
class=
"mui-segmented-control"
style=
""
>
<div
id=
"app"
v-cloak
>
<div
class=
"need-left"
>
<div
id=
"left-1"
>
<a
class=
"mui-action-back mui-icon mui-icon-left-nav mui-pull-left"
style=
"color: white; width: 60px;"
@
click=
"back"
></a>
<label
style=
" text-align: center; margin-left: 70px; color: white;"
>
针车交接
</label>
</div>
<div
class=
"mui-input-row mui-search"
v-show=
"completeState"
>
<input
id=
"search"
class=
"mui-input-clear search"
placeholder=
"搜索:指令号,货号"
v-model=
"searchText"
type=
"search"
pattern=
"\d*"
@
keyup
.
enter=
"goSearch($event)"
:disabled=
"!completeState"
@
focus
.
prevent=
"changePosition()"
@
blur
.
prevent=
"changePosition1()"
>
</div>
<div
id=
"left-2"
:class=
"{ marginTop:!completeState}"
>
<div
id=
"pullrefresh"
>
<div
class=
"mui-scroll"
>
<div
id=
"item1"
:state=
"completeState"
class=
"scroll1 leftList maeginTop"
>
<div
class=
"mui-table-view mui-table-view-chevron"
>
<ul
:id=
"items.IndexID"
:class=
"{active:cur==n}"
class=
"mui-table-view bg"
v-for=
" items,n in itemsLeft"
@
click=
"selectLeft(items,n)"
>
<li
style=
" padding: 0px 15px 0px 15px; margin: 0"
>
<p
style=
"float: left;width: 16%; color: #060606;padding: 0; margin: 0;"
>
指令号:
</p>
<p
style=
"float: left;width: 39%; color: #060606;padding: 0; margin: 0;white-space:nowrap;text-overflow: ellipsis;overflow: hidden;"
>
{{items.IndexNo}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;padding: 0; margin: 0;"
>
班组:
</p>
<p
style=
"float: left;width: 32%; color: #060606;padding: 0; margin: 0;"
>
{{items.WorkTeam}}
</p>
</li>
<li
style=
" padding: 0px 15px 0px 15px; margin: 0;"
>
<p
style=
"float: left;width: 16%; color: #060606;padding: 0; margin: 0;"
>
货号:
</p>
<p
style=
"float: left;width: 39%;color: #1B83FE;padding: 0; margin: 0;white-space:nowrap;text-overflow: ellipsis;overflow: hidden;"
>
{{items.StyleCode}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;padding: 0; margin: 0;"
>
数量:
</p>
<p
style=
"float: left;width: 32%; color: red;padding: 0; margin: 0;"
>
{{items.Qty}}
</p>
</li>
<li
style=
" padding: 0px 15px 0px 15px; margin: 0"
>
<p
style=
"float: left;width: 20%; color: #060606; padding: 0; margin: 0;"
>
计划时间:
</p>
<p
style=
"float: left;width: 80%; color: #060606;padding: 0; margin: 0;"
>
{{items.PlanDate}}
</p>
</li>
<li
style=
" padding: 0px 11px 2px 11px;position: relative; overflow: hidden;"
>
<p
style=
"float: left;width: 20%; color: #060606;padding: 0; margin: 0;"
>
时报时间:
</p>
<p
style=
"float: left;width: 35%; color: #060606;padding: 0; margin: 0;"
>
{{items.ReportDate}}
</p>
<p
style=
"float: left;width: 16%; color: #060606;padding: 0; margin: 0;"
>
实报人:
</p>
<p
style=
"float: left;width: 28%; color: #060606;padding: 0; margin: 0;"
>
{{items.ReportUser}}
</p>
</li>
</ul>
</div>
</div>
<div
id=
"item2"
:state=
"!completeState"
class=
"scroll2 leftList"
:style=
"display_"
>
<div
class=
"mui-table-view mui-table-view-chevron"
>
<ul
:id=
"items.IndexID"
:class=
"{active:cur==n}"
class=
"mui-table-view bg"
v-for=
" items,n in itemsLeft2"
@
click=
"selectLeft(items,n )"
>
<li
style=
" padding: 2px 15px 0px 15px; margin: 0"
>
<p
style=
"float: left;width: 16%; color: #060606;padding: 0; margin: 0;white-space:nowrap;text-overflow: ellipsis;overflow: hidden;"
>
指令号:
</p>
<p
style=
"float: left;width: 40%; color: #060606;padding: 0; margin: 0;"
>
{{items.IndexNo}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;padding: 0; margin: 0;"
>
班组:
</p>
<p
style=
"float: left;width: 32%; color: #060606;padding: 0; margin: 0;"
>
{{items.WorkTeam}}
</p>
</li>
<li
style=
" padding: 0px 15px 0px 15px; margin: 0"
>
<p
style=
"float: left;width: 16%; color: #060606;padding: 0; margin: 0;white-space:nowrap;text-overflow: ellipsis;overflow: hidden;"
>
货号:
</p>
<p
style=
"float: left;width: 40%;color: #1B83FE;padding: 0; margin: 0;"
>
{{items.StyleCode}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;padding: 0; margin: 0;"
>
数量:
</p>
<p
style=
"float: left;width: 32%; color: red;padding: 0; margin: 0;"
>
{{items.Qty}}
</p>
</li>
<li
style=
" padding: 0px 15px 0px 15px; margin: 0"
>
<p
style=
"float: left;width: 20%; color: #060606;padding: 0; margin: 0;"
>
计划时间:
</p>
<p
style=
"float: left;width: 80%; color: #060606;padding: 0; margin: 0;"
>
{{items.PlanDate}}
</p>
</li>
<li
style=
" padding: 0px 11px 2px 11px;position: relative; overflow: hidden;"
>
<p
style=
"float: left;width: 20%; color: #060606;padding: 0; margin: 0;"
>
实报时间:
</p>
<p
style=
"float: left;width: 35%; color: #060606;padding: 0; margin: 0;"
>
{{items.ReportDate}}
</p>
<p
style=
"float: left;width: 16%; color: #060606;padding: 0; margin: 0;"
>
实报人:
</p>
<p
style=
"float: left;width: 28%; color: #060606;padding: 0; margin: 0;"
>
{{items.ReportUser}}
</p>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div
class=
"mui-segmented-control leftState"
id=
"changePosition"
>
<a
id=
"n1"
class=
"mui-control-item mui-active"
@
click=
"selectDisplay(1)"
>
未交接
</a>
<a
id=
"n2"
class=
"mui-control-item "
@
click=
"selectDisplay(2)"
>
已交接
</a>
</div>
<div
id=
"item1"
class=
"mui-scroll-wrapper scroll1"
style=
" border: solid #DAE6EF 1px ;height: 503px; background: white; display: inline-block; width: 40%; top: 72px;"
>
<div
class=
"mui-scroll
"
>
<ul
:id=
"items.IndexID"
class=
"mui-table-view bg"
v-for=
" items,n in itemsLeft"
@
click=
"selectLeft(items)
"
>
<li
style=
" padding: 0px 15px 0px 15px; margin: 0
"
>
<p
style=
"float: left;width: 16%; color: #060606;padding: 0; margin: 0;"
>
指令号:
</p
>
<p
style=
"float: left;width: 40%; color: #060606;padding: 0; margin: 0;"
>
{{items.IndexNo}}
</p
>
<p
style=
"float: left;width: 1
2%; color: #060606;padding: 0; margin: 0;"
>
班组
:
</p>
<p
style=
"float: left;width:
32%; color: #060606;padding: 0; margin: 0;"
>
{{items.WorkTeam}}
</p>
</div
>
<div
class=
"need-right
"
>
<div
id=
"right
"
>
<div
id=
"right-1
"
>
<ul
class=
"mui-table-view"
>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 1
6%; color: #060606;"
>
指令号
:
</p>
<p
style=
"float: left;width:
40%; color: #060606;white-space:nowrap;text-overflow: ellipsis;overflow: hidden;"
>
{{itemsDetail.IndexNo}}
</p>
</li>
<li
style=
" padding: 0px 15px 0px 15px; margin: 0;"
>
<p
style=
"float: left;width: 16%; color: #060606;padding: 0; margin: 0;"
>
货号:
</p>
<p
style=
"float: left;width: 40%;color: #1B83FE;padding: 0; margin: 0;"
>
{{items.StyleCode}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;padding: 0; margin: 0;"
>
数量:
</p>
<p
style=
"float: left;width: 32%; color: red;padding: 0; margin: 0;"
>
{{items.Qty}}
</p>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
货号:
</p>
<p
style=
"float: left;width: 40%;color: #1B83FE;white-space:nowrap;text-overflow: ellipsis;overflow: hidden;"
>
{{itemsDetail.StyleCode}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;"
>
颜色:
</p>
<p
style=
"float: left;width: 32%; color: #060606;"
>
{{itemsDetail.ColorName}}
</p>
</li>
<li
style=
" padding: 0px 15px 0px 15px; margin: 0
"
>
<p
style=
"float: left;width:
20%; color: #060606; padding: 0; margin: 0;"
>
计划时间
:
</p>
<p
style=
"float: left;width:
80%; color: #060606;padding: 0; margin: 0;"
>
{{items.PlanDate
}}
</p>
<li
class=
"mui-table-view-cell
"
>
<p
style=
"float: left;width:
16%; color: #060606;"
>
数量
:
</p>
<p
style=
"float: left;width:
40%; color: red;"
>
{{itemsDetail.FinishQty
}}
</p>
</li>
<li
style=
" padding: 0px 11px 2px 11px;position: relative; overflow: hidden;
"
>
<p
style=
"float: left;width:
20%; color: #060606;padding: 0; margin: 0;"
>
时报时间
:
</p>
<p
style=
"float: left;width:
35%; color: #060606;padding: 0; margin: 0;"
>
{{items.ReportDate
}}
</p>
<p
style=
"float: left;width: 1
6%; color: #060606;padding: 0; margin: 0;"
>
实报人
:
</p>
<p
style=
"float: left;width:
28%; color: #060606;padding: 0; margin: 0;"
>
{{items.ReportUser
}}
</p>
<li
class=
"mui-table-view-cell
"
>
<p
style=
"float: left;width:
16%; color: #060606;"
>
不合格数
:
</p>
<p
style=
"float: left;width:
40%; color: red;"
>
{{itemsDetail.UnQualifiedQty
}}
</p>
<p
style=
"float: left;width: 1
2%; color: #060606;"
>
报废数
:
</p>
<p
style=
"float: left;width:
32%; color: red;"
>
{{itemsDetail.ScrapQty
}}
</p>
</li>
</ul>
</div>
</div>
<div
id=
"item2"
class=
"mui-scroll-wrapper scroll2"
:style=
"display_"
style=
" border: solid #DAE6EF 1px ;height: 503px; background: white; display: inline-block; width: 40%; top: 72px;"
>
<div
class=
"mui-scroll"
>
<ul
:id=
"items.IndexID"
class=
"mui-table-view bg"
v-for=
" items,n in itemsLeft2"
@
click=
"selectLeft(items)"
>
<li
style=
" padding: 2px 15px 0px 15px; margin: 0"
>
<p
style=
"float: left;width: 16%; color: #060606;padding: 0; margin: 0;"
>
指令号:
</p>
<p
style=
"float: left;width: 40%; color: #060606;padding: 0; margin: 0;"
>
{{items.IndexNo}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;padding: 0; margin: 0;"
>
班组:
</p>
<p
style=
"float: left;width: 32%; color: #060606;padding: 0; margin: 0;"
>
{{items.WorkTeam}}
</p>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
发包:
</p>
<p
style=
"float: left;width: 40%; color: #060606;"
>
{{itemsDetail.WorkTeam}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;"
>
收包:
</p>
<p
style=
"float: left;width: 32%; color: #060606;"
>
{{itemsDetail.ToWorkTeam}}
</p>
</li>
<li
style=
" padding: 0px 15px 0px 15px; margin: 0"
>
<p
style=
"float: left;width: 16%; color: #060606;padding: 0; margin: 0;"
>
货号:
</p>
<p
style=
"float: left;width: 40%;color: #1B83FE;padding: 0; margin: 0;"
>
{{items.StyleCode}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;padding: 0; margin: 0;"
>
数量:
</p>
<p
style=
"float: left;width: 32%; color: red;padding: 0; margin: 0;"
>
{{items.Qty}}
</p>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
计划时间:
</p>
<p
style=
"float: left;width: 40%; color: #060606;"
>
{{itemsDetail.PlanDate}}
</p>
<p
style=
"float: left;width: 12%; color: 060606;"
>
实报时间:
</p>
<p
style=
"float: left;width: 32%; color: 060606;"
>
{{itemsDetail.ReportDate}}
</p>
</li>
<li
style=
" padding: 0px 15px 0px 15px; margin: 0
"
>
<p
style=
"float: left;width:
20%; color: #060606;padding: 0; margin: 0;"
>
计划时间
:
</p>
<p
style=
"float: left;width:
80%; color: #060606;padding: 0; margin: 0;"
>
{{items.PlanDate
}}
</p>
<li
class=
"mui-table-view-cell
"
>
<p
style=
"float: left;width:
16%; color: #060606;"
>
实报人
:
</p>
<p
style=
"float: left;width:
40%; color: #060606;"
>
{{itemsDetail.ReportUser
}}
</p>
</li>
<li
style=
" padding: 0px 11px 2px 11px;position: relative; overflow: hidden;"
>
<p
style=
"float: left;width: 20%; color: #060606;padding: 0; margin: 0;"
>
时报时间:
</p>
<p
style=
"float: left;width: 35%; color: #060606;padding: 0; margin: 0;"
>
{{items.ReportDate}}
</p>
<p
style=
"float: left;width: 16%; color: #060606;padding: 0; margin: 0;"
>
实报人:
</p>
<p
style=
"float: left;width: 28%; color: #060606;padding: 0; margin: 0;"
>
{{items.ReportUser}}
</p>
</li>
</ul>
</div>
</div>
</div>
<div
id=
"right "
class=
"mui-pull-right "
style=
" width: 60%; display: inline-block; position: relative; top: -70px ; "
>
<div
id=
"right-1"
>
<ul
class=
"mui-table-view"
>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
指令号:
</p>
<p
style=
"float: left;width: 40%; color: #060606;"
>
{{itemsDetail.IndexNo}}
</p>
</li>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
货号:
</p>
<p
style=
"float: left;width: 40%;color: #1B83FE;"
>
{{itemsDetail.StyleCode}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;"
>
颜色:
</p>
<p
style=
"float: left;width: 32%; color: #060606;"
>
{{itemsDetail.ColorName}}
</p>
</li>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
数量:
</p>
<p
style=
"float: left;width: 40%; color: red;"
>
{{itemsDetail.FinishQty}}
</p>
</li>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
不合格数:
</p>
<p
style=
"float: left;width: 40%; color: red;"
>
{{itemsDetail.UnQualifiedQty}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;"
>
报废数:
</p>
<p
style=
"float: left;width: 32%; color: red;"
>
{{itemsDetail.ScrapQty}}
</p>
</li>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
发包:
</p>
<p
style=
"float: left;width: 40%; color: #060606;"
>
{{itemsDetail.WorkTeam}}
</p>
<p
style=
"float: left;width: 12%; color: #060606;"
>
收包:
</p>
<p
style=
"float: left;width: 32%; color: #060606;"
>
{{itemsDetail.ToWorkTeam}}
</p>
</li>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
计划时间:
</p>
<p
style=
"float: left;width: 40%; color: #060606;"
>
{{itemsDetail.PlanDate}}
</p>
<p
style=
"float: left;width: 12%; color: 060606;"
>
实报时间:
</p>
<p
style=
"float: left;width: 32%; color: 060606;"
>
{{itemsDetail.ReportDate}}
</p>
</li>
<li
class=
"mui-table-view-cell"
>
<p
style=
"float: left;width: 16%; color: #060606;"
>
实报人:
</p>
<p
style=
"float: left;width: 40%; color: #060606;"
>
{{itemsDetail.ReportUser}}
</p>
</li>
</ul>
</div>
<div
id=
"right-2"
>
</div>
<button
type=
"button"
class=
"mui-btn mui-btn-blue "
:disabled=
"sty1"
@
click=
"selectPerson"
>
人员排班
</button>
<button
type=
"button"
class=
"mui-btn mui-btn-blue "
:disabled=
"sty1"
@
click=
"submit"
>
{{submitText}}
</button>
<div
id=
"right-2"
style=
"position: absolute; bottom: 1px ; right: 1px; "
>
<
button
type=
"button"
class=
"mui-btn mui-btn-blue "
:disabled=
"sty1"
style=
" width: 200px; height: 70px;"
@
click=
"selectPerson"
>
人员排班
</button
>
<button
type=
"button"
class=
"mui-btn mui-btn-blue "
:disabled=
"sty1"
style=
" width: 200px; height: 70px;"
@
click=
"submit"
>
{{submitText}}
</button
>
<
/div
>
</div
>
</div>
</div>
<script
src=
"../dest/js/mui.min.js"
></script>
<script
src=
"../dest/js/vue.min.js"
></script>
...
...
@@ -170,12 +183,26 @@
displayModel
:
1
,
IndexID
:
0
,
itemsLeft
:
[],
itemsLeft2
:
[],
itemsLeft2
:
[],
//已交接
itemsDetail
:
{},
submitModel
:
0
,
submitText
:
"确认接收"
,
nextDetail
:{},
nextDetail
:
{},
searchText
:
''
,
//搜索文本
completeState
:
true
,
////切换已交接和未交接状态
paramUnDo
:
{
//未交接
ReportType
:
1
,
//针车
pageIndex
:
2
,
State
:
0
,
//未交接
pageSize
:
10
},
paramDone
:
{
//已交接
ReportType
:
1
,
//针车
pageIndex
:
2
,
State
:
1
,
//已交接
pageSize
:
10
},
cur
:
'0'
},
computed
:
{
display_
:
function
()
{
...
...
@@ -194,86 +221,232 @@
},
methods
:
{
init
:
function
()
{
mui
.
init
();
mui
.
init
({
pullRefresh
:
{
container
:
'#pullrefresh'
,
up
:
{
height
:
100
,
contentrefresh
:
'正在加载...'
,
contentnomore
:
'没有更多数据了'
,
callback
:
function
()
{
var
reUnfinished
=
document
.
getElementById
(
"item1"
).
getAttribute
(
"state"
);
var
reFinished
=
document
.
getElementById
(
"item2"
).
getAttribute
(
"state"
);
console
.
log
(
"未交接"
+
reUnfinished
);
console
.
log
(
"已交接"
+
reFinished
);
var
needUrl
=
'/api/vMES/Handover/List'
;
var
searchUrl
=
'/api/vMES/Handover/Search'
;
var
UnneedData
=
app
.
itemsLeft
;
var
needData
=
app
.
itemsLeft2
;
if
(
reUnfinished
)
{
if
(
app
.
searchText
!=
""
)
{
searchPull
(
searchUrl
,
UnneedData
,
app
.
paramUnDo
);
}
pullupRefresh
(
needUrl
,
UnneedData
,
app
.
paramUnDo
);
}
else
if
(
reFinished
)
{
pullupRefresh
(
needUrl
,
needData
,
app
.
paramDone
);
}
}
},
}
});
function
pullupRefresh
(
url
,
arr
,
params
)
{
//console.log("加载前1" + arr);
setTimeout
(
function
()
{
var
para
=
{
PageSize
:
params
.
pageSize
,
PageIndex
:
params
.
pageIndex
,
ReportType
:
params
.
ReportType
,
State
:
params
.
State
};
//console.log("canshu:" + JSON.stringify(para));
//console.log("之前的数据:" + arr);
Api
.
post
(
url
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
//console.log("111:" + JSON.stringify(e.items));
var
data
=
e
.
items
;
if
(
e
.
items
.
length
>
0
)
{
params
.
pageIndex
++
;
}
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
arr
.
push
(
data
[
i
]);
}
console
.
log
(
"之后的arr"
+
arr
);
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
mui
(
'#pullrefresh'
).
pullRefresh
().
endPullupToRefresh
();
//参数为true代表没有更多数据了。
mui
(
'#pullrefresh'
).
pullRefresh
().
refresh
(
true
);
//mui('#pullrefresh').pullRefresh().disablePullupToRefresh();
},
1000
);
}
function
searchPull
(
url
,
arr
,
params
)
{
setTimeout
(
function
()
{
var
para
=
{
SearchText
:
app
.
searchText
,
PageSize
:
params
.
pageSize
,
PageIndex
:
params
.
pageIndex
,
ReportType
:
params
.
ReportType
};
Api
.
post
(
url
,
para
,
function
(
e
)
{
console
.
log
(
"canshu:"
+
JSON
.
stringify
(
para
));
if
(
e
.
success
)
{
console
.
log
(
"搜索到的111:"
+
JSON
.
stringify
(
e
));
var
data
=
e
.
items
;
if
(
e
.
items
.
length
>
0
)
{
params
.
pageIndex
++
;
}
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
arr
.
push
(
data
[
i
]);
}
//console.log("canshuqq:" + JSON.stringify(para));
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
mui
(
'#pullrefresh'
).
pullRefresh
().
endPullupToRefresh
();
mui
(
'#pullrefresh'
).
pullRefresh
().
refresh
(
true
);
},
1000
);
}
mui
(
'.mui-scroll-wrapper'
).
scroll
({
bounce
:
false
,
indicators
:
true
,
//是否显示滚动条
});
this
.
getData
(
0
)
this
.
getData
(
0
);
mui
(
".mui-icon-clear"
)[
0
].
addEventListener
(
'tap'
,
function
()
{
document
.
activeElement
.
blur
();
//收起虚拟键盘
app
.
searchText
=
''
;
app
.
getData
(
0
);
});
},
getData
:
function
(
n
)
{
var
that
=
this
;
var
para
=
{
ReportType
:
1
,
State
:
n
,
PageSize
:
20
,
PageIndex
:
1
}
console
.
log
(
JSON
.
stringify
(
para
))
//
console.log(JSON.stringify(para))
that
.
searchText
=
''
Api
.
post
(
'/api/vMES/Handover/List'
,
para
,
function
(
e
)
{
console
.
log
(
"List::"
+
JSON
.
stringify
(
e
))
//
console.log("List::" + JSON.stringify(e))
if
(
n
==
0
)
{
that
.
itemsLeft
=
e
.
items
if
(
e
.
items
.
length
>
0
){
that
.
itemsLeft
=
e
.
items
;
that
.
itemsDetail
=
e
.
items
[
0
];
}
else
{
that
.
itemsLeft
=
[]
that
.
itemsDetail
=
[];
}
that
.
cur
=
0
;
}
else
{
that
.
itemsLeft2
=
e
.
items
}
that
.
cur
=
0
;
if
(
e
.
items
.
length
>
0
){
that
.
itemsLeft2
=
e
.
items
;
that
.
itemsDetail
=
e
.
items
[
0
];
}
else
{
that
.
itemsLeft2
=
[];
that
.
itemsDetail
=
[];
}
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
})
},
selectPerson
:
function
()
{
selectPerson
:
function
()
{
var
that
=
this
;
mui
.
openWindow
({
url
:
'NeedlecarPBB.html'
,
id
:
'NeedlecarPBB.html'
,
extras
:
{
nextDetail
:
that
.
nextDetail
}
});
},
selectLeftBack
:
function
(
k
)
{
var
bgs
=
document
.
getElementsByClassName
(
"bg"
);
var
bf
=
document
.
getElementById
(
k
);
for
(
var
i
=
0
;
i
<
bgs
.
length
;
i
++
)
{
bgs
[
i
].
style
.
background
=
""
}
if
(
k
!=
0
){
bf
.
style
.
background
=
"#1DAAEC"
;
}
url
:
'NeedlecarPBB.html'
,
id
:
'NeedlecarPBB.html'
,
extras
:
{
nextDetail
:
that
.
nextDetail
}
});
},
selectLeft
:
function
(
obj
)
{
this
.
selectLeftBack
(
obj
.
IndexID
);
selectLeft
:
function
(
obj
,
n
)
{
//this.selectLeftBack(obj.IndexID);
this
.
IndexID
=
obj
.
IndexID
;
this
.
nextDetail
=
obj
;
this
.
cur
=
n
;
var
that
=
this
;
var
para
=
{
ReportType
:
1
,
IndexID
:
this
.
IndexID
,
}
Api
.
post
(
'/api/vMES/Handover/Index'
,
para
,
function
(
e
)
{
console
.
log
(
"Index
::"
+
JSON
.
stringify
(
e
))
//console.log("Indexddddd
::" + JSON.stringify(e))
if
(
e
.
success
)
{
that
.
itemsDetail
=
e
.
items
[
0
];
if
(
e
.
data
.
length
>
0
){
that
.
itemsDetail
=
e
.
data
;
}
else
{
that
.
itemsDetail
=
[];
}
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
})
},
goSearch
:
function
(
event
)
{
var
that
=
this
;
var
para
=
{
ReportType
:
1
,
SearchText
:
that
.
searchText
,
PageSize
:
10
,
PageIndex
:
1
};
console
.
log
(
"搜索文本:"
+
JSON
.
stringify
(
para
));
if
(
event
.
keyCode
==
"13"
)
{
document
.
activeElement
.
blur
();
//收起虚拟键盘
if
(
that
.
searchText
==
''
)
return
;
Api
.
post
(
'/api/vMES/Handover/Search'
,
para
,
function
(
e
)
{
//console.log("eee::" + JSON.stringify(e))
if
(
e
.
success
)
{
var
data
=
e
.
items
.
length
;
console
.
log
(
"搜索到的内容::"
+
e
.
items
)
if
(
data
>
0
)
{
that
.
itemsLeft
=
e
.
items
;
that
.
itemsDetail
=
e
.
items
[
0
];
that
.
cur
=
0
;
}
else
{
that
.
itemsLeft
=
[];
that
.
itemsDetail
=
[];
that
.
cur
=
0
;
}
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
event
.
preventDefault
();
// 阻止默认事件---阻止页面刷新
//that.searchText = '';
}
},
selectDisplay
:
function
(
n
)
{
var
opt
=
document
.
getElementById
(
"item1"
);
var
opt2
=
document
.
getElementById
(
"item2"
);
...
...
@@ -281,6 +454,7 @@
var
n2
=
document
.
getElementById
(
"n2"
);
if
(
n
==
1
)
{
this
.
completeState
=
true
;
n1
.
style
.
background
=
"royalblue"
n1
.
style
.
color
=
"white"
n2
.
style
.
background
=
"white"
...
...
@@ -292,6 +466,7 @@
this
.
getData
(
0
)
}
if
(
n
==
2
)
{
this
.
completeState
=
false
;
// this.getDataDetail2(2)
n1
.
style
.
background
=
"white"
n1
.
style
.
color
=
"royalblue"
...
...
@@ -305,12 +480,12 @@
}
},
submit
:
function
()
{
var
that
=
this
;
var
para
=
{
IndexID
:
this
.
IndexID
,
}
console
.
log
(
JSON
.
stringify
(
para
))
...
...
@@ -323,10 +498,10 @@
if
(
e
.
success
)
{
that
.
playVoice
(
"cg.mp3"
);
mui
.
toast
(
"操作成功"
);
that
.
selectLeftBack
(
0
);
//
that.selectLeftBack(0);
that
.
IndexID
=
0
;
that
.
nextDetail
=
{};
that
.
itemsDetail
=
[];
that
.
nextDetail
=
{};
that
.
itemsDetail
=
[];
that
.
getData
(
0
);
that
.
getData
(
1
);
...
...
@@ -340,28 +515,58 @@
mui
.
toast
(
"操作失败"
+
JSON
.
stringify
(
bbb
.
message
))
})
},
playVoice
:
function
(
filename
){
if
(
plus
.
audio
==
undefined
)
{
}
else
{
// 播放操作
var
p
=
plus
.
audio
.
createPlayer
(
"_www/dest/voice/"
+
filename
);
p
.
play
(
function
()
{
//alert( "Audio play success!" );
},
function
(
e
)
{
//alert( "Audio play failed: " + e.message );
});
}
},
playVoice
:
function
(
filename
)
{
if
(
plus
.
audio
==
undefined
)
{
}
else
{
// 播放操作
var
p
=
plus
.
audio
.
createPlayer
(
"_www/dest/voice/"
+
filename
);
p
.
play
(
function
()
{
//alert( "Audio play success!" );
},
function
(
e
)
{
//alert( "Audio play failed: " + e.message );
});
}
},
back
:
function
()
{
mui
.
back
();
},
changePosition
:
function
()
{
var
btn1
=
document
.
getElementById
(
"changePosition"
);
var
btn2
=
document
.
getElementById
(
"right-2"
);
var
Height
=
document
.
documentElement
.
clientHeight
||
document
.
body
.
clientHeight
;
//console.log("得到焦点。。。。" + Height);
window
.
onresize
=
function
()
{
var
Height1
=
document
.
documentElement
.
clientHeight
||
document
.
body
.
clientHeight
;
//console.log("得到焦点。。。。" + Height1);
if
(
Height
>
Height1
)
{
btn1
.
style
.
display
=
"none"
;
btn2
.
style
.
display
=
"none"
;
}
else
{
btn1
.
style
.
display
=
"block"
;
btn2
.
style
.
display
=
"block"
;
}
}
},
changePosition1
:
function
()
{
var
btn1
=
document
.
getElementById
(
"changePosition"
);
var
btn2
=
document
.
getElementById
(
"right-2"
);
var
Height
=
document
.
documentElement
.
clientHeight
||
document
.
body
.
clientHeight
;
window
.
onresize
=
function
()
{
var
Height1
=
document
.
documentElement
.
clientHeight
||
document
.
body
.
clientHeight
;
if
(
Height
<
Height1
)
{
btn1
.
style
.
display
=
"block"
;
btn2
.
style
.
display
=
"block"
;
}
else
{
btn1
.
style
.
display
=
"none"
;
btn2
.
style
.
display
=
"none"
;
}
}
}
},
})
</script>
...
...
html/application.html
View file @
df017a24
...
...
@@ -155,6 +155,7 @@
console
.
log
(
"GetModuleList::"
+
JSON
.
stringify
(
e
))
var
isSuccess
=
e
.
success
;
if
(
isSuccess
)
{
var
items
=
e
.
items
;
console
.
log
(
JSON
.
stringify
(
items
)
)
//手动在结尾添加了一个设置项目
...
...
@@ -188,7 +189,7 @@
}
function
onGetDataFailure
(
xhr
,
type
,
eOrRes
){
if
(
eOrRes
&&
eOrRes
.
hasOwnProperty
(
'code'
)){
var
code
=
eOrRes
.
code
;
switch
(
code
)
{
...
...
@@ -203,8 +204,8 @@
}
Api
.
post
(
'/api/User/GetModuleList'
,
null
,
onGetDataSuccess
,
onGetDataFailure
);
console
.
log
(
"GetModuleList::begin"
)
Api
.
post
(
'/api/User/GetModuleList'
,
{}
,
onGetDataSuccess
,
onGetDataFailure
);
mui
(
".application-box"
).
on
(
'tap'
,
'a'
,
function
()
{
...
...
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