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
9bb68c5a
Commit
9bb68c5a
authored
Nov 01, 2018
by
上官
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整 同步
parent
f0efef33
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
3583 additions
and
137 deletions
+3583
-137
moment.js
dest/js/moment.js
+3195
-0
Cutting.html
html/Cutting.html
+13
-5
CuttingQuality.html
html/CuttingQuality.html
+121
-46
Forming.html
html/Forming.html
+13
-5
FormingQuality.html
html/FormingQuality.html
+99
-22
Needlecarquality.html
html/Needlecarquality.html
+2
-4
Needlecarquality_new.html
html/Needlecarquality_new.html
+125
-50
Needlecarreport_new.html
html/Needlecarreport_new.html
+15
-5
No files found.
dest/js/moment.js
0 → 100644
View file @
9bb68c5a
This source diff could not be displayed because it is too large. You can
view the blob
instead.
html/Cutting.html
View file @
9bb68c5a
...
...
@@ -220,7 +220,7 @@
<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"
>
SOP
</button>
@
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>
...
...
@@ -266,6 +266,7 @@
<script
src=
"../dest/js/createView.min.js"
></script>
<script
src=
"../dest/js/public.min.js"
></script>
<script
src=
"../dest/js/vue.min.js"
>
</script>
<script
src=
"../dest/js/moment.js"
></script>
<script
type=
"text/javascript"
>
mui
.
plusReady
(
function
()
{
...
...
@@ -328,6 +329,15 @@
return
"display: none "
}
},
SOP__
:
function
(){
if
(
this
.
IndexID
==
0
){
return
"disabled"
}
else
{
return
null
}
}
},
...
...
@@ -347,10 +357,7 @@
bounce
:
false
,
indicators
:
true
,
//是否显示滚动条
});
this
.
dateTime
=
new
Date
().
toLocaleDateString
();
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
moment
().
format
().
substring
(
0
,
10
)
this
.
today
=
this
.
dateTime
;
this
.
getData
();
},
...
...
@@ -977,6 +984,7 @@
itemsSize
:
this
.
itemsSize
,
type
:
n
,
// n =2 点击不合格进去 ,
parentSize
:
k
,
sizeNum
:
this
.
itemsDetail1
//尺码和数量
},
});
...
...
html/CuttingQuality.html
View file @
9bb68c5a
...
...
@@ -49,12 +49,12 @@
</div>
<div
id=
"left-2"
>
<table
class=
"mui-table"
style=
"position: relative;top: -455px;"
>
<t
head
class=
"mui-table-view"
>
<t
body
class=
"mui-table-view-cell"
>
<tr>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;"
>
时间
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;"
>
指令号
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;"
>
数量
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;"
>
类型
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;
width: 20%
"
>
时间
</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: 15%
"
>
数量
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;
width: 15%
"
>
类型
</th>
</tr>
</thead>
</table>
...
...
@@ -63,10 +63,10 @@
<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
align=
"center"
>
{{item.Date}}
</td>
<td
align=
"center"
>
{{item.IndexNo}}
</td>
<td
align=
"center"
>
{{item.Qty}}
</td>
<td
align=
"center"
>
{{item.ProcessingType==1?"返修" :"报废"}}
</td>
<td
align=
"center"
style=
"width: 20% "
>
{{item.Date}}
</td>
<td
align=
"center"
style=
"width: 50% "
>
{{item.IndexNo}}
</td>
<td
align=
"center"
style=
"width: 15% "
>
{{item.Qty}}
</td>
<td
align=
"center"
style=
"width: 15% "
>
{{item.ProcessingType==1?"返修" :"报废"}}
</td>
</tbody>
</tr>
</table>
...
...
@@ -210,6 +210,7 @@
<script
src=
"../dest/js/createView.min.js"
></script>
<script
src=
"../dest/js/public.min.js"
></script>
<script
src=
"../dest/js/vue.min.js"
>
</script>
<script
src=
"../dest/js/moment.js"
></script>
<script
type=
"text/javascript"
>
mui
.
plusReady
(
function
()
{
...
...
@@ -255,6 +256,7 @@
return
false
;
}),
ReportType
:
0
,
sizeNum
:[],
},
computed
:
{
...
...
@@ -276,7 +278,7 @@
init
:
function
()
{
mui
.
init
({
beforeback
:
function
()
{
var
temp
=
'
Needlecarreport_new
.html'
;
var
temp
=
'
Cutting
.html'
;
var
list
=
plus
.
webview
.
getWebviewById
(
temp
);
mui
.
fire
(
list
,
'back'
);
return
true
;
...
...
@@ -288,19 +290,18 @@
indicators
:
true
,
//是否显示滚动条
});
this
.
dateTime
=
new
Date
().
toLocaleDateString
();
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
moment
().
format
().
substring
(
0
,
10
)
this
.
IndexID
=
mui
.
currentWebview
.
IndexID
;
this
.
itemsDetail
=
mui
.
currentWebview
.
itemsDetail
;
this
.
itemsSize
=
mui
.
currentWebview
.
itemsSize
;
this
.
type
=
mui
.
currentWebview
.
type
;
this
.
parentSize
=
mui
.
currentWebview
.
parentSize
;
// this.sizeNum = mui.currentWebview.sizeNum;
this
.
getDataInit
();
},
getDataInit
:
function
()
{
this
.
getsizeNum
()
this
.
getDataDetail1
();
this
.
getDataDetail2
(
1
);
this
.
getTatolNum
();
...
...
@@ -317,7 +318,7 @@
that
.
itemsHead
=
e
.
items
;
if
(
e
.
items
.
length
>
0
)
{
that
.
getsizeNum
()
that
.
itemsDetail
=
e
.
items
[
0
];
that
.
IndexID
=
e
.
items
[
0
].
IndexID
;
...
...
@@ -382,11 +383,35 @@
});
}
},
getsizeNum
:
function
()
{
var
that
=
this
;
var
para
=
{
IndexID
:
this
.
IndexID
,
};
console
.
log
(
"bbb:::"
+
JSON
.
stringify
(
para
))
if
(
this
.
IndexID
==
0
){
return
;
}
Api
.
post
(
'/api/vMES/ProductionReport/ProductIndexNoDetail'
,
para
,
function
(
e
)
{
if
(
e
.
success
){
that
.
sizeNum
=
e
.
data
.
ReportDetail
;
console
.
log
(
"aaa:::"
+
JSON
.
stringify
(
that
.
sizeNum
))
}
else
{
that
.
sizeNum
=
[]
}
},
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"
,
Date
:
this
.
dateTime
+
" 00:00:00"
,
};
Api
.
post
(
'/api/vMES/InspectionReport/TotalQty'
,
para
,
function
(
e
)
{
...
...
@@ -431,6 +456,7 @@
Api
.
post
(
'/api/vMES/InspectionReport/Delete'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
getsizeNum
()
that
.
createZhezhao
(
-
1
)
that
.
disable_reportDelete
=
'disabled'
that
.
size
=
0
;
...
...
@@ -464,40 +490,75 @@
this
.
SizeQty
.
push
(
tempa
);
}
},
sumUnQualifiedQty
:
function
(){
for
(
var
i
=
0
;
i
<
this
.
sizeNum
.
length
;
i
++
)
{
if
(
this
.
sizeNum
[
i
].
SizeName
==
this
.
size
){
this
.
sizeNum
[
i
].
UnQualifiedQty
=
this
.
sizeNum
[
i
].
UnQualifiedQty
+
this
.
qty
;
}
}
},
submit_
:
function
()
{
var
that
=
this
;
var
para
=
{
IndexID
:
this
.
IndexID
,
SizeName
:
this
.
size
,
Qty
:
this
.
qty
,
ProcessingType
:
this
.
ProcessingType
,
QIDetailID
:
this
.
qualityID
,
}
Api
.
post
(
'/api/vMES/InspectionReport/Save'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
sumUnQualifiedQty
()
that
.
disable_save_button
=
'disabled'
that
.
size
=
0
;
that
.
qty
=
0
;
that
.
ProcessingType
=
1
;
that
.
qualityID
=
0
;
that
.
selectQQ
(
0
);
that
.
selectProcessingType
(
1
);
that
.
selectSize
(
0
);
that
.
selectReport
(
0
);
//that.getDataDetail1(); //获取列表尺码对应数量
that
.
getTatolNum
();
//获取今日完成数量
that
.
getDataDetail2
(
1
);
//获取左边列表明细
that
.
getDataDetail2
(
2
);
//获取左边列表明细
mui
.
toast
(
"提交成功"
);
}
else
{
mui
.
toast
(
"提交失败: "
+
e
.
success
.
message
);
}
});
},
submit
:
function
()
{
var
that
=
this
;
if
(
!
this
.
checkValue
())
{
return
;
}
var
para
=
{
IndexID
:
this
.
IndexID
,
SizeName
:
this
.
size
,
Qty
:
this
.
qty
,
ProcessingType
:
this
.
ProcessingType
,
QIDetailID
:
this
.
qualityID
,
}
var
that
=
this
;
Api
.
post
(
'/api/vMES/InspectionReport/Save'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
disable_save_button
=
'disabled'
that
.
size
=
0
;
that
.
qty
=
0
;
that
.
ProcessingType
=
1
;
that
.
qualityID
=
0
;
that
.
selectQQ
(
0
);
that
.
selectProcessingType
(
1
);
that
.
selectSize
(
0
);
that
.
selectReport
(
0
);
//that.getDataDetail1(); //获取列表尺码对应数量
that
.
getTatolNum
();
//获取今日完成数量
that
.
getDataDetail2
(
1
);
//获取左边列表明细
that
.
getDataDetail2
(
2
);
//获取左边列表明细
mui
.
toast
(
"提交成功"
);
}
else
{
mui
.
toast
(
"提交失败: "
+
e
.
success
.
message
);
}
});
for
(
var
i
=
0
;
i
<
this
.
sizeNum
.
length
;
i
++
)
{
if
(
this
.
sizeNum
[
i
].
SizeName
==
this
.
size
)
{
if
(
parseInt
(
this
.
qty
)
>
10
&&
parseInt
(
this
.
qty
)
/
this
.
sizeNum
[
i
].
Qty
>
0.1
)
{
var
btnArray
=
[
'否'
,
'是'
];
mui
.
confirm
(
'次品提交数量占总数量的10%以上,是否继续保存?'
,
'提示'
,
btnArray
,
function
(
e
)
{
if
(
e
.
index
==
1
)
{
that
.
submit_
();
}
else
{
return
}
})
}
else
{
this
.
submit_
();
}
}
}
},
displayReport
:
function
()
{
this
.
getReportDetail
();
...
...
@@ -675,6 +736,20 @@
mui
.
toast
(
"请选择处理类型"
)
return
false
;
}
else
{
for
(
var
i
=
0
;
i
<
this
.
sizeNum
.
length
;
i
++
)
{
if
(
this
.
sizeNum
[
i
].
SizeName
==
this
.
size
){
if
(
this
.
qty
>
this
.
sizeNum
[
i
].
Qty
){
this
.
qty
=
0
;
mui
.
toast
(
"不合格数量不能大于总数,请重新输入"
)
return
false
;
}
else
if
(
this
.
qty
>
this
.
sizeNum
[
i
].
Qty
-
this
.
sizeNum
[
i
].
UnQualifiedQty
){
this
.
qty
=
0
;
mui
.
toast
(
"不合格数量不能大于总数,请重新输入"
)
return
false
;
}
}
}
return
true
;
}
},
...
...
html/Forming.html
View file @
9bb68c5a
...
...
@@ -220,7 +220,7 @@
<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"
>
SOP
</button>
@
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>
...
...
@@ -266,6 +266,7 @@
<script
src=
"../dest/js/createView.min.js"
></script>
<script
src=
"../dest/js/public.min.js"
></script>
<script
src=
"../dest/js/vue.min.js"
>
</script>
<script
src=
"../dest/js/moment.js"
></script>
<script
type=
"text/javascript"
>
mui
.
plusReady
(
function
()
{
...
...
@@ -328,6 +329,15 @@
return
"display: none "
}
},
SOP__
:
function
(){
if
(
this
.
IndexID
==
0
){
return
"disabled"
}
else
{
return
null
}
}
},
...
...
@@ -347,10 +357,7 @@
bounce
:
false
,
indicators
:
true
,
//是否显示滚动条
});
this
.
dateTime
=
new
Date
().
toLocaleDateString
();
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
moment
().
format
().
substring
(
0
,
10
)
this
.
today
=
this
.
dateTime
;
this
.
getData
();
},
...
...
@@ -985,6 +992,7 @@
itemsSize
:
this
.
itemsSize
,
type
:
n
,
// n =2 点击不合格进去 ,
parentSize
:
k
,
sizeNum
:
this
.
itemsDetail1
//尺码和数量
},
});
...
...
html/FormingQuality.html
View file @
9bb68c5a
...
...
@@ -49,12 +49,12 @@
</div>
<div
id=
"left-2"
>
<table
class=
"mui-table"
style=
"position: relative;top: -455px;"
>
<t
head
class=
"mui-table-view"
>
<t
body
class=
"mui-table-view-cell"
>
<tr>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;"
>
时间
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;"
>
指令号
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;"
>
数量
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;"
>
类型
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;
width: 20%
"
>
时间
</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: 15%
"
>
数量
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;
width: 15%
"
>
类型
</th>
</tr>
</thead>
</table>
...
...
@@ -63,10 +63,10 @@
<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
align=
"center"
>
{{item.Date}}
</td>
<td
align=
"center"
>
{{item.IndexNo}}
</td>
<td
align=
"center"
>
{{item.Qty}}
</td>
<td
align=
"center"
>
{{item.ProcessingType==1?"返修" :"报废"}}
</td>
<td
align=
"center"
style=
"width: 20% "
>
{{item.Date}}
</td>
<td
align=
"center"
style=
"width: 50% "
>
{{item.IndexNo}}
</td>
<td
align=
"center"
style=
"width: 15% "
>
{{item.Qty}}
</td>
<td
align=
"center"
style=
"width: 15% "
>
{{item.ProcessingType==1?"返修" :"报废"}}
</td>
</tbody>
</tr>
</table>
...
...
@@ -210,6 +210,7 @@
<script
src=
"../dest/js/createView.min.js"
></script>
<script
src=
"../dest/js/public.min.js"
></script>
<script
src=
"../dest/js/vue.min.js"
>
</script>
<script
src=
"../dest/js/moment.js"
></script>
<script
type=
"text/javascript"
>
mui
.
plusReady
(
function
()
{
...
...
@@ -254,7 +255,8 @@
mask_
:
mui
.
createMask
(
function
(
e
)
{
return
false
;
}),
ReportType
:
2
,
ReportType
:
2
,
sizeNum
:
[],
//尺码与数量
},
computed
:
{
...
...
@@ -276,7 +278,7 @@
init
:
function
()
{
mui
.
init
({
beforeback
:
function
()
{
var
temp
=
'
Needlecarreport_new
.html'
;
var
temp
=
'
Forming
.html'
;
var
list
=
plus
.
webview
.
getWebviewById
(
temp
);
mui
.
fire
(
list
,
'back'
);
return
true
;
...
...
@@ -288,19 +290,19 @@
indicators
:
true
,
//是否显示滚动条
});
this
.
dateTime
=
new
Date
().
toLocaleDateString
();
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
moment
().
format
().
substring
(
0
,
10
)
this
.
IndexID
=
mui
.
currentWebview
.
IndexID
;
this
.
itemsDetail
=
mui
.
currentWebview
.
itemsDetail
;
this
.
itemsSize
=
mui
.
currentWebview
.
itemsSize
;
this
.
type
=
mui
.
currentWebview
.
type
;
this
.
parentSize
=
mui
.
currentWebview
.
parentSize
;
// this.sizeNum = mui.currentWebview.sizeNum;
this
.
getDataInit
();
},
getDataInit
:
function
()
{
this
.
getsizeNum
()
this
.
getDataDetail1
();
this
.
getDataDetail2
(
1
);
this
.
getTatolNum
();
...
...
@@ -317,7 +319,7 @@
that
.
itemsHead
=
e
.
items
;
if
(
e
.
items
.
length
>
0
)
{
that
.
getsizeNum
()
that
.
itemsDetail
=
e
.
items
[
0
];
that
.
IndexID
=
e
.
items
[
0
].
IndexID
;
...
...
@@ -370,11 +372,12 @@
PageSize
:
200
,
PageIndex
:
1
,
};
console
.
log
(
JSON
.
stringify
(
para
))
if
(
n
==
1
)
{
Api
.
post
(
'/api/vMES/InspectionReport/Report'
,
para
,
function
(
e
)
{
console
.
log
(
"itemsLeft::"
+
JSON
.
stringify
(
e
))
that
.
itemsLeft
=
e
.
items
;
console
.
log
(
JSON
.
stringify
(
that
.
itemsLeft
));
});
}
else
if
(
n
==
2
)
{
Api
.
post
(
'/api/vMES/InspectionReport/Report'
,
para
,
function
(
e
)
{
...
...
@@ -383,6 +386,30 @@
});
}
},
getsizeNum
:
function
()
{
var
that
=
this
;
var
para
=
{
IndexID
:
this
.
IndexID
,
};
console
.
log
(
"bbb:::"
+
JSON
.
stringify
(
para
))
if
(
this
.
IndexID
==
0
){
return
;
}
Api
.
post
(
'/api/vMES/ProductionReport/ProductIndexNoDetail'
,
para
,
function
(
e
)
{
if
(
e
.
success
){
that
.
sizeNum
=
e
.
data
.
ReportDetail
;
console
.
log
(
"aaa:::"
+
JSON
.
stringify
(
that
.
sizeNum
))
}
else
{
that
.
sizeNum
=
[]
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
getTatolNum
:
function
()
{
var
that
=
this
;
var
para
=
{
...
...
@@ -432,6 +459,7 @@
Api
.
post
(
'/api/vMES/InspectionReport/Delete'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
getsizeNum
()
that
.
createZhezhao
(
-
1
)
that
.
disable_reportDelete
=
'disabled'
that
.
size
=
0
;
...
...
@@ -465,10 +493,15 @@
this
.
SizeQty
.
push
(
tempa
);
}
},
submit
:
function
()
{
if
(
!
this
.
checkValue
())
{
return
;
sumUnQualifiedQty
:
function
(){
for
(
var
i
=
0
;
i
<
this
.
sizeNum
.
length
;
i
++
)
{
if
(
this
.
sizeNum
[
i
].
SizeName
==
this
.
size
){
this
.
sizeNum
[
i
].
UnQualifiedQty
=
this
.
sizeNum
[
i
].
UnQualifiedQty
+
this
.
qty
;
}
}
},
submit_
:
function
()
{
var
that
=
this
;
var
para
=
{
IndexID
:
this
.
IndexID
,
SizeName
:
this
.
size
,
...
...
@@ -477,10 +510,11 @@
QIDetailID
:
this
.
qualityID
,
}
var
that
=
this
;
Api
.
post
(
'/api/vMES/InspectionReport/Save'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
sumUnQualifiedQty
()
that
.
disable_save_button
=
'disabled'
that
.
size
=
0
;
that
.
qty
=
0
;
...
...
@@ -499,6 +533,34 @@
mui
.
toast
(
"提交失败: "
+
e
.
success
.
message
);
}
});
},
submit
:
function
()
{
var
that
=
this
;
if
(
!
this
.
checkValue
())
{
return
;
}
for
(
var
i
=
0
;
i
<
this
.
sizeNum
.
length
;
i
++
)
{
if
(
this
.
sizeNum
[
i
].
SizeName
==
this
.
size
)
{
if
(
parseInt
(
this
.
qty
)
>
10
&&
parseInt
(
this
.
qty
)
/
this
.
sizeNum
[
i
].
Qty
>
0.1
)
{
var
btnArray
=
[
'否'
,
'是'
];
mui
.
confirm
(
'次品提交数量占总数量的10%以上,是否继续保存?'
,
'提示'
,
btnArray
,
function
(
e
)
{
if
(
e
.
index
==
1
)
{
that
.
submit_
();
}
else
{
return
}
})
}
else
{
this
.
submit_
();
}
}
}
},
displayReport
:
function
()
{
this
.
getReportDetail
();
...
...
@@ -577,7 +639,7 @@
}
if
(
obj
!=
0
)
{
this
.
createZhezhao
(
1
)
op
.
style
.
background
=
"#02C1ED"
;
this
.
displayReport
();
}
...
...
@@ -662,6 +724,7 @@
mui
.
toast
(
"数量不正确"
)
return
false
;
}
//尺码不正确
else
if
(
this
.
size
==
0
)
{
mui
.
toast
(
"尺码不正确"
)
...
...
@@ -676,6 +739,20 @@
mui
.
toast
(
"请选择处理类型"
)
return
false
;
}
else
{
for
(
var
i
=
0
;
i
<
this
.
sizeNum
.
length
;
i
++
)
{
if
(
this
.
sizeNum
[
i
].
SizeName
==
this
.
size
){
if
(
this
.
qty
>
this
.
sizeNum
[
i
].
Qty
){
this
.
qty
=
0
;
mui
.
toast
(
"不合格数量不能大于总数,请重新输入"
)
return
false
;
}
else
if
(
this
.
qty
>
this
.
sizeNum
[
i
].
Qty
-
this
.
sizeNum
[
i
].
UnQualifiedQty
){
this
.
qty
=
0
;
mui
.
toast
(
"不合格数量不能大于总数,请重新输入"
)
return
false
;
}
}
}
return
true
;
}
},
...
...
html/Needlecarquality.html
View file @
9bb68c5a
...
...
@@ -171,6 +171,7 @@
<script
src=
"../dest/js/createView.min.js"
></script>
<script
src=
"../dest/js/public.min.js"
></script>
<script
src=
"../dest/js/vue.min.js"
>
</script>
<script
src=
"../dest/js/moment.js"
></script>
<script
type=
"text/javascript"
>
mui
.
plusReady
(
function
()
{
...
...
@@ -229,10 +230,7 @@
indicators
:
true
,
//是否显示滚动条
});
this
.
dateTime
=
new
Date
().
toLocaleDateString
();
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
moment
().
format
().
substring
(
0
,
10
)
this
.
IndexID
=
mui
.
currentWebview
.
IndexID
;
...
...
html/Needlecarquality_new.html
View file @
9bb68c5a
...
...
@@ -48,25 +48,25 @@
<label
style=
" text-align: center; position: relative; left: 50px;"
>
今日次品数量:{{number}}
</label>
</div>
<div
id=
"left-2"
>
<table
class=
"mui-table"
style=
"position: relative;top: -455px;"
>
<t
head
class=
"mui-table-view"
>
<table
class=
"mui-table"
style=
"position: relative;top: -455px;"
>
<t
body
class=
"mui-table-view-cell"
>
<tr>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;"
>
时间
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;"
>
指令号
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;"
>
数量
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;"
>
类型
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;
width: 20%
"
>
时间
</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: 15%
"
>
数量
</th>
<th
style=
"font-size: 16px;font-weight: normal;background-color: #E2E2E9;
width: 15%
"
>
类型
</th>
</tr>
</t
head
>
</t
body
>
</table>
<div
id=
"item1"
class=
"mui-scroll-wrapper "
style=
"border: solid #DAE6EF 1px ;background: white; display: inline-block;height: 480px; width: 30%; top: 45px;"
>
<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
align=
"center"
>
{{item.Date}}
</td>
<td
align=
"center"
>
{{item.IndexNo}}
</td>
<td
align=
"center"
>
{{item.Qty}}
</td>
<td
align=
"center"
>
{{item.ProcessingType==1?"返修" :"报废"}}
</td>
<td
align=
"center"
style=
"width: 20% "
>
{{item.Date}}
</td>
<td
align=
"center"
style=
"width: 50% "
>
{{item.IndexNo}}
</td>
<td
align=
"center"
style=
"width: 15% "
>
{{item.Qty}}
</td>
<td
align=
"center"
style=
"width: 15% "
>
{{item.ProcessingType==1?"返修" :"报废"}}
</td>
</tbody>
</tr>
</table>
...
...
@@ -210,6 +210,7 @@
<script
src=
"../dest/js/createView.min.js"
></script>
<script
src=
"../dest/js/public.min.js"
></script>
<script
src=
"../dest/js/vue.min.js"
>
</script>
<script
src=
"../dest/js/moment.js"
></script>
<script
type=
"text/javascript"
>
mui
.
plusReady
(
function
()
{
...
...
@@ -255,6 +256,7 @@
return
false
;
}),
ReportType
:
1
,
sizeNum
:[]
},
computed
:
{
...
...
@@ -288,19 +290,18 @@
indicators
:
true
,
//是否显示滚动条
});
this
.
dateTime
=
new
Date
().
toLocaleDateString
();
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
moment
().
format
().
substring
(
0
,
10
)
this
.
IndexID
=
mui
.
currentWebview
.
IndexID
;
this
.
itemsDetail
=
mui
.
currentWebview
.
itemsDetail
;
this
.
itemsSize
=
mui
.
currentWebview
.
itemsSize
;
this
.
type
=
mui
.
currentWebview
.
type
;
this
.
parentSize
=
mui
.
currentWebview
.
parentSize
;
// this.sizeNum = mui.currentWebview.sizeNum;
this
.
getDataInit
();
},
getDataInit
:
function
()
{
this
.
getsizeNum
()
this
.
getDataDetail1
();
this
.
getDataDetail2
(
1
);
this
.
getTatolNum
();
...
...
@@ -317,7 +318,7 @@
that
.
itemsHead
=
e
.
items
;
if
(
e
.
items
.
length
>
0
)
{
that
.
getsizeNum
()
that
.
itemsDetail
=
e
.
items
[
0
];
that
.
IndexID
=
e
.
items
[
0
].
IndexID
;
...
...
@@ -373,7 +374,7 @@
if
(
n
==
1
)
{
Api
.
post
(
'/api/vMES/InspectionReport/Report'
,
para
,
function
(
e
)
{
that
.
itemsLeft
=
e
.
items
;
console
.
log
(
JSON
.
stringify
(
that
.
itemsLeft
));
});
}
else
if
(
n
==
2
)
{
Api
.
post
(
'/api/vMES/InspectionReport/Report'
,
para
,
function
(
e
)
{
...
...
@@ -382,6 +383,30 @@
});
}
},
getsizeNum
:
function
()
{
var
that
=
this
;
var
para
=
{
IndexID
:
this
.
IndexID
,
};
console
.
log
(
"bbb:::"
+
JSON
.
stringify
(
para
))
if
(
this
.
IndexID
==
0
){
return
;
}
Api
.
post
(
'/api/vMES/ProductionReport/ProductIndexNoDetail'
,
para
,
function
(
e
)
{
if
(
e
.
success
){
that
.
sizeNum
=
e
.
data
.
ReportDetail
;
console
.
log
(
"aaa:::"
+
JSON
.
stringify
(
that
.
sizeNum
))
}
else
{
that
.
sizeNum
=
[]
}
},
function
(
b
,
bb
,
bbb
)
{
mui
.
toast
(
JSON
.
stringify
(
bbb
.
message
))
});
},
getTatolNum
:
function
()
{
var
that
=
this
;
var
para
=
{
...
...
@@ -431,6 +456,7 @@
Api
.
post
(
'/api/vMES/InspectionReport/Delete'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
getsizeNum
()
that
.
createZhezhao
(
-
1
)
that
.
disable_reportDelete
=
'disabled'
that
.
size
=
0
;
...
...
@@ -464,41 +490,75 @@
this
.
SizeQty
.
push
(
tempa
);
}
},
submit
:
function
()
{
if
(
!
this
.
checkValue
())
{
return
;
}
var
para
=
{
IndexID
:
this
.
IndexID
,
SizeName
:
this
.
size
,
Qty
:
this
.
qty
,
ProcessingType
:
this
.
ProcessingType
,
QIDetailID
:
this
.
qualityID
,
}
var
that
=
this
;
Api
.
post
(
'/api/vMES/InspectionReport/Save'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
disable_save_button
=
'disabled'
that
.
size
=
0
;
that
.
qty
=
0
;
that
.
ProcessingType
=
1
;
that
.
qualityID
=
0
;
that
.
selectQQ
(
0
);
that
.
selectProcessingType
(
1
);
that
.
selectSize
(
0
);
that
.
selectReport
(
0
);
//that.getDataDetail1(); //获取列表尺码对应数量
that
.
getTatolNum
();
//获取今日完成数量
that
.
getDataDetail2
(
1
);
//获取左边列表明细
that
.
getDataDetail2
(
2
);
//获取左边列表明细
mui
.
toast
(
"提交成功"
);
}
else
{
mui
.
toast
(
"提交失败: "
+
e
.
success
.
message
);
sumUnQualifiedQty
:
function
(){
for
(
var
i
=
0
;
i
<
this
.
sizeNum
.
length
;
i
++
)
{
if
(
this
.
sizeNum
[
i
].
SizeName
==
this
.
size
){
this
.
sizeNum
[
i
].
UnQualifiedQty
=
this
.
sizeNum
[
i
].
UnQualifiedQty
+
this
.
qty
;
}
}
);
}
},
submit_
:
function
()
{
var
that
=
this
;
var
para
=
{
IndexID
:
this
.
IndexID
,
SizeName
:
this
.
size
,
Qty
:
this
.
qty
,
ProcessingType
:
this
.
ProcessingType
,
QIDetailID
:
this
.
qualityID
,
}
Api
.
post
(
'/api/vMES/InspectionReport/Save'
,
para
,
function
(
e
)
{
if
(
e
.
success
)
{
that
.
sumUnQualifiedQty
()
that
.
disable_save_button
=
'disabled'
that
.
size
=
0
;
that
.
qty
=
0
;
that
.
ProcessingType
=
1
;
that
.
qualityID
=
0
;
that
.
selectQQ
(
0
);
that
.
selectProcessingType
(
1
);
that
.
selectSize
(
0
);
that
.
selectReport
(
0
);
//that.getDataDetail1(); //获取列表尺码对应数量
that
.
getTatolNum
();
//获取今日完成数量
that
.
getDataDetail2
(
1
);
//获取左边列表明细
that
.
getDataDetail2
(
2
);
//获取左边列表明细
mui
.
toast
(
"提交成功"
);
}
else
{
mui
.
toast
(
"提交失败: "
+
e
.
success
.
message
);
}
});
},
submit
:
function
()
{
var
that
=
this
;
if
(
!
this
.
checkValue
())
{
return
;
}
for
(
var
i
=
0
;
i
<
this
.
sizeNum
.
length
;
i
++
)
{
if
(
this
.
sizeNum
[
i
].
SizeName
==
this
.
size
)
{
if
(
parseInt
(
this
.
qty
)
>
10
&&
parseInt
(
this
.
qty
)
/
this
.
sizeNum
[
i
].
Qty
>
0.1
)
{
var
btnArray
=
[
'否'
,
'是'
];
mui
.
confirm
(
'次品提交数量占总数量的10%以上,是否继续保存?'
,
'提示'
,
btnArray
,
function
(
e
)
{
if
(
e
.
index
==
1
)
{
that
.
submit_
();
}
else
{
return
}
})
}
else
{
this
.
submit_
();
}
}
}
},
displayReport
:
function
()
{
this
.
getReportDetail
();
},
...
...
@@ -675,6 +735,21 @@
mui
.
toast
(
"请选择处理类型"
)
return
false
;
}
else
{
for
(
var
i
=
0
;
i
<
this
.
sizeNum
.
length
;
i
++
)
{
if
(
this
.
sizeNum
[
i
].
SizeName
==
this
.
size
){
if
(
this
.
qty
>
this
.
sizeNum
[
i
].
Qty
){
this
.
qty
=
0
;
mui
.
toast
(
"不合格数量不能大于总数,请重新输入"
)
return
false
;
}
else
if
(
this
.
qty
>
this
.
sizeNum
[
i
].
Qty
-
this
.
sizeNum
[
i
].
UnQualifiedQty
){
this
.
qty
=
0
;
mui
.
toast
(
"不合格数量不能大于总数,请重新输入"
)
return
false
;
}
}
}
return
true
;
}
},
...
...
html/Needlecarreport_new.html
View file @
9bb68c5a
...
...
@@ -220,7 +220,7 @@
<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"
>
SOP
</button>
@
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>
...
...
@@ -266,6 +266,7 @@
<script
src=
"../dest/js/createView.min.js"
></script>
<script
src=
"../dest/js/public.min.js"
></script>
<script
src=
"../dest/js/vue.min.js"
>
</script>
<script
src=
"../dest/js/moment.js"
></script>
<script
type=
"text/javascript"
>
mui
.
plusReady
(
function
()
{
...
...
@@ -329,6 +330,15 @@
return
"display: none "
}
},
SOP__
:
function
(){
if
(
this
.
IndexID
==
0
){
return
"disabled"
}
else
{
return
null
}
}
},
...
...
@@ -348,10 +358,8 @@
bounce
:
false
,
indicators
:
true
,
//是否显示滚动条
});
this
.
dateTime
=
new
Date
().
toLocaleDateString
();
this
.
dateTime
=
moment
().
format
().
substring
(
0
,
10
)
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
dateTime
=
this
.
dateTime
.
replace
(
"/"
,
"-"
)
this
.
today
=
this
.
dateTime
;
this
.
getData
();
},
...
...
@@ -409,6 +417,7 @@
}
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
;
...
...
@@ -576,7 +585,7 @@
StyleCode
:
this
.
itemsDetail
.
StyleCode
}
//
console.log( JSON.stringify(para))
console
.
log
(
JSON
.
stringify
(
para
))
Api
.
post
(
'/api/vMES/Sop/StyleSop'
,
para
,
function
(
e
)
{
if
(
e
.
success
){
// console.log( JSON.stringify(e))
...
...
@@ -976,6 +985,7 @@
itemsSize
:
this
.
itemsSize
,
type
:
n
,
// n =2 点击不合格进去 ,
parentSize
:
k
,
sizeNum
:
this
.
itemsDetail1
//尺码和数量
},
});
...
...
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