Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
kwell-mes
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
gavelinfo
kwell-mes
Commits
ffcb10ee
Commit
ffcb10ee
authored
Feb 16, 2022
by
zhoumaotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码调整
parent
070ba420
Changes
46
Show whitespace changes
Inline
Side-by-side
Showing
46 changed files
with
337 additions
and
6528 deletions
+337
-6528
GpfkController.java
.../main/java/com/gavel/kwell/controller/GpfkController.java
+0
-14
GphyController.java
.../main/java/com/gavel/kwell/controller/GphyController.java
+39
-0
GpwxController.java
.../main/java/com/gavel/kwell/controller/GpwxController.java
+0
-10
KmesBoardController.java
.../java/com/gavel/kwell/controller/KmesBoardController.java
+18
-0
module.xml
gavel/src/main/resources/module.xml
+6
-16
index.html
...l/src/main/resources/templates/views/kmes/bzsn/index.html
+0
-71
edit.html
...rc/main/resources/templates/views/kmes/coderule/edit.html
+0
-170
index.html
...c/main/resources/templates/views/kmes/coderule/index.html
+0
-73
index.html
.../main/resources/templates/views/kmes/dashboard/index.html
+274
-0
index.html
...rc/main/resources/templates/views/kmes/gpbhgcx/index.html
+0
-181
index.html
...rc/main/resources/templates/views/kmes/gyssnsz/index.html
+0
-107
snsz.html
...src/main/resources/templates/views/kmes/gyssnsz/snsz.html
+0
-59
index.html
...rc/main/resources/templates/views/kmes/snreset/index.html
+0
-200
resetsn.html
.../main/resources/templates/views/kmes/snreset/resetsn.html
+0
-76
sninfo.html
...c/main/resources/templates/views/kmes/snreset/sninfo.html
+0
-62
importpage.html
...n/resources/templates/views/kmes/snwollcx/importpage.html
+0
-111
index.html
...c/main/resources/templates/views/kmes/snwollcx/index.html
+0
-96
index.html
...rc/main/resources/templates/views/kmes/tgpfkcx/index.html
+0
-216
edit.html
.../src/main/resources/templates/views/kmes/wollck/edit.html
+0
-469
index.html
...src/main/resources/templates/views/kmes/wollck/index.html
+0
-115
show.html
.../src/main/resources/templates/views/kmes/wollck/show.html
+0
-901
edit.html
.../src/main/resources/templates/views/kmes/wozpjh/edit.html
+0
-98
index.html
...src/main/resources/templates/views/kmes/wozpjh/index.html
+0
-402
wlsearch.html
.../main/resources/templates/views/kmes/wozpjh/wlsearch.html
+0
-110
wobom.html
...src/main/resources/templates/views/kmes/wozpjh/wobom.html
+0
-137
wobomEdit.html
...main/resources/templates/views/kmes/wozpjh/wobomEdit.html
+0
-129
edit.html
...rc/main/resources/templates/views/kmes/wozpjhbg/edit.html
+0
-109
index.html
...c/main/resources/templates/views/kmes/wozpjhbg/index.html
+0
-174
wozpjhsearch.html
...resources/templates/views/kmes/wozpjhbg/wozpjhsearch.html
+0
-126
bhgXq.html
...l/src/main/resources/templates/views/kmes/ysfk/bhgXq.html
+0
-26
index.html
...l/src/main/resources/templates/views/kmes/ysfk/index.html
+0
-174
ysNginfo.html
...rc/main/resources/templates/views/kmes/ysfk/ysNginfo.html
+0
-50
edit.html
gavel/src/main/resources/templates/views/kmes/zbgz/edit.html
+0
-128
index.html
...l/src/main/resources/templates/views/kmes/zbgz/index.html
+0
-78
index.html
...src/main/resources/templates/views/kmes/zbgzsz/index.html
+0
-81
zbsnsz.html
...rc/main/resources/templates/views/kmes/zbgzsz/zbsnsz.html
+0
-58
edit.html
...rc/main/resources/templates/views/kmes/zbsnrule/edit.html
+0
-70
index.html
...c/main/resources/templates/views/kmes/zbsnrule/index.html
+0
-87
addgjwl.html
...src/main/resources/templates/views/kmes/zpdm/addgjwl.html
+0
-156
autoadd.html
...src/main/resources/templates/views/kmes/zpdm/autoadd.html
+0
-158
edit.html
gavel/src/main/resources/templates/views/kmes/zpdm/edit.html
+0
-94
index.html
...l/src/main/resources/templates/views/kmes/zpdm/index.html
+0
-287
wlsn.html
gavel/src/main/resources/templates/views/kmes/zpdm/wlsn.html
+0
-100
index.html
...src/main/resources/templates/views/kmes/zpfkfc/index.html
+0
-98
index.html
...src/main/resources/templates/views/kmes/zpmxcx/index.html
+0
-345
index.html
...src/main/resources/templates/views/kmes/zpxxcx/index.html
+0
-306
No files found.
gavel/src/main/java/com/gavel/kwell/controller/GpfkController.java
View file @
ffcb10ee
...
@@ -52,20 +52,6 @@ public class GpfkController extends BaseController {
...
@@ -52,20 +52,6 @@ public class GpfkController extends BaseController {
return
"kmes/gpfk/edit"
;
return
"kmes/gpfk/edit"
;
}
}
@RequestMapping
(
"/gx"
)
public
String
gx
()
{
return
"kmes/gpfk/gx"
;
}
@RequestMapping
(
"/bhgXq"
)
public
String
bhgXq
()
{
return
"kmes/gpfk/bhgXq"
;
}
@RequestMapping
(
"/sample"
)
public
String
test
()
{
return
"kmes/gpfk/smaple"
;
}
@RequestMapping
(
value
=
BaseURL
.
GET
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
BaseURL
.
GET
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
...
...
gavel/src/main/java/com/gavel/kwell/controller/GphyController.java
0 → 100644
View file @
ffcb10ee
package
com
.
gavel
.
kwell
.
controller
;
import
com.gavel.common.SystemOperation
;
import
com.gavel.common.annotation.ResourcePermissions
;
import
com.gavel.common.base.controller.BaseController
;
import
com.gavel.kwell.service.GpfkService
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@Controller
@RequestMapping
(
"kmes/gphy"
)
public
class
GphyController
extends
BaseController
{
@Autowired
private
GpfkService
gpfkService
;
@ResourcePermissions
()
@RequestMapping
(
"/index"
)
public
String
index
()
{
return
"kmes/gphy/index"
;
}
@ResourcePermissions
({
SystemOperation
.
BottonResource
.
ADD
})
@RequestMapping
(
"/add"
)
public
String
add
()
{
return
"kmes/gphy/edit"
;
}
@ResourcePermissions
({
SystemOperation
.
BottonResource
.
EDIT
})
@RequestMapping
(
"/edit"
)
public
String
edit
()
{
return
"kmes/gphy/edit"
;
}
}
gavel/src/main/java/com/gavel/kwell/controller/GpwxController.java
View file @
ffcb10ee
...
@@ -48,16 +48,6 @@ public class GpwxController extends BaseController {
...
@@ -48,16 +48,6 @@ public class GpwxController extends BaseController {
return
"kmes/gpwx/edit"
;
return
"kmes/gpwx/edit"
;
}
}
@RequestMapping
(
"/gx"
)
public
String
gx
()
{
return
"kmes/gpwx/gx"
;
}
@RequestMapping
(
"/split"
)
public
String
split
()
{
return
"kmes/gpwx/split"
;
}
@RequestMapping
(
value
=
BaseURL
.
QUERY
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
BaseURL
.
QUERY
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
...
...
gavel/src/main/java/com/gavel/kwell/controller/KmesBoardController.java
0 → 100644
View file @
ffcb10ee
package
com
.
gavel
.
kwell
.
controller
;
import
com.gavel.common.base.controller.BaseController
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
@Controller
@RequestMapping
(
"kmes/dashboard"
)
public
class
KmesBoardController
extends
BaseController
{
@RequestMapping
(
"/index"
)
public
String
index
()
{
return
"hzmes/dashboard/index"
;
}
}
gavel/src/main/resources/module.xml
View file @
ffcb10ee
...
@@ -9,11 +9,11 @@
...
@@ -9,11 +9,11 @@
<menu
mkid=
"901000200"
mkmc=
"装配反馈"
url=
"kmes/gphy/index"
>
<menu
mkid=
"901000200"
mkmc=
"装配反馈"
url=
"kmes/gphy/index"
>
<mkcz
czid =
"21"
czmc =
"取消装配"
value=
"Y"
/>
<mkcz
czid =
"21"
czmc =
"取消装配"
value=
"Y"
/>
</menu>
</menu>
<menu
mkid=
"901000
3
00"
mkmc=
"检验反馈"
url=
"kmes/gpjy/index"
>
<menu
mkid=
"901000
4
00"
mkmc=
"检验反馈"
url=
"kmes/gpjy/index"
>
<mkcz
czid =
"21"
czmc =
"取消检验"
value=
"Y"
/>
<mkcz
czid =
"21"
czmc =
"取消检验"
value=
"Y"
/>
</menu>
</menu>
<menu
mkid=
"901000
5
00"
mkmc=
"维修反馈"
url=
"kmes/gpwx/index"
>
<menu
mkid=
"901000
6
00"
mkmc=
"维修反馈"
url=
"kmes/gpwx/index"
>
<mkcz
czid =
"21"
czmc =
"取消维修"
value=
"Y"
/>
<mkcz
czid =
"21"
czmc =
"取消维修"
value=
"Y"
/>
</menu>
</menu>
...
@@ -21,23 +21,13 @@
...
@@ -21,23 +21,13 @@
<print
entity=
"com.gavel.hzgd.vo.HzWoVO"
/>
<print
entity=
"com.gavel.hzgd.vo.HzWoVO"
/>
</menu>
</menu>
<menu
mkid=
"901007000"
mkmc=
"供应商条码设置"
url=
"kmes/gyssnsz/index"
>
<print
entity=
"com.gavel.hzgd.vo.HzWlxxVO"
/>
</menu>
<menu
mkid=
"901009800"
mkmc=
"产品码重置"
url=
"kmes/snreset/index"
>
<mkcz
czid =
"21"
czmc =
"重置"
value=
"Y"
/>
</menu>
<menu
mkid=
"901012000"
mkmc=
"产品条码规则"
url=
"kmes/coderule/index"
>
<print
entity=
"com.gavel.hzgd.vo.U_coderuleVO"
type=
"M"
/>
<print
entity=
"com.gavel.hzgd.vo.U_coderulemxVO"
type=
"D"
/>
</menu>
<menu
mkid=
"901019600"
mkmc=
"工票记录查询"
url=
"kmes/gpfkcx/index"
>
<menu
mkid=
"901019600"
mkmc=
"工票记录查询"
url=
"kmes/gpfkcx/index"
>
<print
entity=
"com.gavel.hzgd.vo.GpfkcxVO"
/>
<print
entity=
"com.gavel.hzgd.vo.GpfkcxVO"
/>
</menu>
</menu>
<menu
mkid=
"901011100"
mkmc=
"车间看板"
url=
"kmes/dashboard/index"
>
</menu>
</menu>
</menu>
<disableMenus>
<disableMenus>
...
...
gavel/src/main/resources/templates/views/kmes/bzsn/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"kmesBzjh"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'kmesBzjhTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"kmesBzjhTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'kmesBzjhTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-review toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-add toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-copy toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-edit toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-delete toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#kmesBzjh'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
function
paramInit
(
ops
){
}
function
pageInit
()
{
var
options
=
{
url
:
'kmes/bzjh'
,
noRequest
:
true
,
columns
:
[[
{
title
:
"单据编码"
,
field
:
"djid"
,
fieldType
:
"ftString"
,
width
:
120
},
{
title
:
"计划日期"
,
field
:
"jhrq"
,
fieldType
:
"ftDateTime"
},
{
title
:
"完工部门"
,
field
:
"bmid"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"计划数量"
,
field
:
"jhsl"
,
fieldType
:
"float"
},
{
title
:
"工作中心"
,
field
:
"gzzxid"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"班型"
,
field
:
"bxid"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"物料编码"
,
field
:
"wlid"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"状态"
,
field
:
"zt"
,
fieldType
:
"ftString"
,
width
:
6
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
300
},
{
title
:
"维护人"
,
field
:
"whr"
,
fieldType
:
"ftString"
},
{
title
:
"维护时间"
,
field
:
"whsj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"创建人"
,
field
:
"cjr"
,
fieldType
:
"ftString"
},
{
title
:
"创建时间"
,
field
:
"cjsj"
,
fieldType
:
"ftDateTime"
},
]],
dialog
:
{
footerIn
:
true
,
href
:
'kmes/bzjh/edit'
}
};
$div
.
Holder
(
options
);
}
/*数据初始化*/
function
dataInit
(
ops
){
}
/*用户操作*/
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/bzjh/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
))
}
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/coderule/edit.html
deleted
100644 → 0
View file @
070ba420
<div
id=
'hzgdU_coderuleEdit'
class=
"e-dialog-container"
data-options=
"width: 1120,height: 630"
>
<div
class=
"e-dialog-body"
>
<div
class=
"e-dialog-box"
>
<h4>
产品条码规则
</h4>
<div
class=
"gui-fluid editTable"
>
<input
type=
"hidden"
name=
"flag"
>
<input
type=
"hidden"
name=
"id"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
规则编码:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"code"
data-toggle=
"gui-textbox"
data-options=
""
style=
"width: 100%"
required
>
</div>
</div>
<div
class=
"gui-col-sm8"
>
<label
class=
"gui-form-label"
>
名称:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"name"
data-toggle=
"gui-textbox"
data-options=
""
style=
"width: 100%"
required
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
备注:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bz"
data-toggle=
"gui-textbox"
data-options=
""
style=
"width: 100%"
>
</div>
</div>
</div>
</div>
<div
class=
"mx-dataTable"
style=
"margin-top: 150px;bottom: 40px"
>
<div
id=
"bzEditCrmx-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'edatagrid',id:'bzEditCrmx'}"
>
<a
class=
"toolbar"
data-event=
"add"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar"
data-event=
"copy"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar"
data-event=
"delete"
href=
"javascript:void(0)"
></a>
</div>
<table
id=
"bzEditCrmx"
data-options=
"dgid:'U_CODERULEMX'"
style=
"height: 100%;width: 100%"
></table>
</div>
<div
class=
"gui-row e-dialog-box-footer"
>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-col-sm8"
style=
"float: right"
>
<label
class=
"gui-form-label"
>
维护人:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"whr"
data-toggle=
"gui-textbox"
readonly
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-col-sm8"
>
<label
class=
"gui-form-label"
>
维护时间:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"whsj"
data-toggle=
"gui-datetimebox"
readonly
style=
"width: 100%"
>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-continue"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#hzgdU_coderuleEdit'
);
var
$datWhsj
=
$div
.
find
(
'input[name="whsj"]'
);
var
$datagrid
=
$
(
'#bzEditCrmx'
);
var
zlx
=
[],
zlwx
=
{};
var
zlxObject
=
{};
function
paramInit
(
ops
){
gas
.
post
(
"kmes/coderule/init/zlx"
,{},
function
(
res
)
{
if
(
res
.
success
){
zlx
=
res
.
data
.
records
||
[];
$
.
each
(
zlx
,
function
(
i
,
item
)
{
zlxObject
[
item
.
id
]
=
item
.
detail
||
[];
zlwx
[
item
.
id
]
=
item
.
name
;
})
}
},
ops
)
}
function
pageInit
(
ops
){
var
columns
=
[
{
title
:
"序号"
,
field
:
"xh"
,
width
:
60
,
align
:
"center"
,
allowEdit
:
true
},
{
title
:
"值类型"
,
field
:
"zlx"
,
fieldType
:
"ftString"
,
width
:
120
,
editor
:{
type
:
"combobox"
,
options
:{
data
:
zlx
,
valueField
:
"id"
,
textField
:
"name"
,
editable
:
false
}
},
formatter
:
function
(
value
)
{
if
(
zlwx
[
value
]){
return
zlwx
[
value
]
}
else
{
return
value
}
}},
{
title
:
"缺省值"
,
field
:
"qsz"
,
fieldType
:
"ftString"
,
width
:
140
,
editor
:{
type
:
"textbox"
}},
{
title
:
"规则"
,
field
:
"gz"
,
fieldType
:
"ftString"
,
width
:
260
,
editor
:{
type
:
"combobox"
,
options
:{
data
:[],
valueField
:
"id"
,
textField
:
"name"
,
editable
:
false
}},
formatter
:
function
(
value
,
row
,
index
)
{
var
a
=
{};
if
(
zlxObject
[
row
.
zlx
]){
$
.
each
(
zlxObject
[
row
.
zlx
],
function
(
i
,
item
)
{
a
[
item
.
id
]
=
item
.
name
})
}
if
(
a
[
value
]){
return
a
[
value
]
}
else
{
return
value
}
}},
{
title
:
"长度"
,
field
:
"len"
,
fieldType
:
"int"
,
allowEdit
:
true
},
{
title
:
"影响流水号"
,
field
:
"lshbz"
,
width
:
120
,
fieldType
:{
type
:
"checkbox"
,
align
:
'center'
,
options
:{
"Y"
:
"Y"
,
"N"
:
"N"
}}},
{
title
:
"描述"
,
field
:
"bz"
,
width
:
200
,
allowEdit
:
true
}
];
$datagrid
.
DataTableEditing
({
columns
:[
new
$
.
common
.
formatterCol
(
columns
)],
pagination
:
false
,
allowAdd
:
false
,
onBeginEdit
:
function
(
rowIndex
,
rowData
)
{
var
editors
=
$datagrid
.
datagrid
(
'getEditors'
,
rowIndex
);
$
.
each
(
editors
,
function
(
i
,
editor
)
{
if
(
editor
.
field
==
"gz"
){
if
(
zlxObject
[
rowData
.
zlx
]){
editor
.
target
[
editor
.
type
]({
data
:
zlxObject
[
rowData
.
zlx
]
||
[]})
}
if
(
rowData
.
zlx
==
'I'
||
rowData
.
zlx
==
'F'
){
editors
[
2
].
target
[
"textbox"
]({
disabled
:
false
})
}
else
{
editors
[
2
].
target
[
"textbox"
](
"setValue"
,
""
);
editors
[
2
].
target
[
"textbox"
]({
disabled
:
true
})
}
}
else
if
(
editor
.
field
==
"zlx"
){
editor
.
target
[
editor
.
type
]({
value
:
editor
.
target
[
editor
.
type
](
"getValue"
),
onSelect
:
function
(
a
,
b
)
{
editors
[
3
].
target
[
editor
.
type
]({
data
:
zlxObject
[
a
.
id
]});
if
(
a
.
id
==
'I'
||
a
.
id
==
'F'
){
editors
[
2
].
target
[
"textbox"
]({
disabled
:
false
})
}
else
{
editors
[
2
].
target
[
"textbox"
](
"setValue"
,
""
);
editors
[
2
].
target
[
"textbox"
]({
disabled
:
true
})
}
}})
}
});
}
});
}
function
dataInit
(
ops
){
if
(
$div
.
closest
(
"form"
).
attr
(
"tag"
)
==
"add"
){
gas
.
post
(
"common/datetime"
,{},
function
(
result
)
{
if
(
result
[
'success'
]
&&
result
[
'data'
][
'data'
]){
var
date
=
new
Date
(
result
[
'data'
][
'data'
]);
$datWhsj
.
iDatetimebox
({
value
:
DateUtils
.
formatTime
(
date
)});
}
},
ops
);
$edtWhr
.
textbox
({
value
:
window
.
sessionStorage
.
getItem
(
'userName'
)});
}
}
function
run
(){
loadListDatagrid
(
$datagrid
,{
url
:
"kmes/coderule/query/detail"
,
params
:{
mid
:
$div
.
find
(
'input[name="id"]'
).
val
()}},
$div
.
closest
(
"form"
));
}
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/coderule/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzgdU_coderule"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'hzgdU_coderuleTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"hzgdU_coderuleTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'hzgdU_coderuleTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-review toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-add toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-copy toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-edit toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-delete toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
规则信息:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"ruleinfo"
class=
"gui-textbox"
style=
"width: 200px"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#hzgdU_coderule'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
function
paramInit
(
ops
){
}
function
pageInit
()
{
var
options
=
{
url
:
'kmes/coderule'
,
noRequest
:
true
,
columns
:
[[
{
title
:
"编码"
,
field
:
"code"
,
fieldType
:
"ftString"
,
width
:
120
},
{
title
:
"名称"
,
field
:
"name"
,
fieldType
:
"ftString"
,
width
:
280
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
200
},
{
title
:
"维护人"
,
field
:
"whr"
,
fieldType
:
"ftString"
},
{
title
:
"维护时间"
,
field
:
"whsj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"创建人"
,
field
:
"cjr"
,
fieldType
:
"ftString"
},
{
title
:
"创建时间"
,
field
:
"cjsj"
,
fieldType
:
"ftDateTime"
}
]],
dialog
:
{
footerIn
:
true
,
href
:
'kmes/coderule/edit'
}
};
$div
.
Holder
(
options
);
}
/*数据初始化*/
function
dataInit
(
ops
){
}
/*用户操作*/
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/coderule/query"
;
$datagrid
.
datagrid
(
"reload"
,
DataBind
.
collectData
(
$div
))
}
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/dashboard/index.html
0 → 100644
View file @
ffcb10ee
<div
id=
"kmesGpfk"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id:'kmesGpfkTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"kmesGpfkTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'kmesGpfkTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
data-options=
"condition:getPrintDataGpfk"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-add toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-cancelfk toolbar"
href=
"javascript:void(0)"
></a>
<!--<a class="toolbar-test toolbar" href="javascript:void(0)"></a>-->
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
加工日期:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"start"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"end"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
生产工单:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wodjid"
style=
"width: 100%"
></div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
产品条码:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wosnid"
style=
"width: 100%"
></div>
</div>
<input
type=
"hidden"
name=
"bxid"
/>
<input
type=
"hidden"
name=
"fkrid"
/>
<input
type=
"hidden"
name=
"gxid"
/>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search1"
href=
"javascript:void(0)"
style=
"color: white"
></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#kmesGpfk'
);
var
jzcs
=
0
;
var
gxName
=
''
;
var
gzzxid
=
""
;
var
gzzxname
=
""
;
var
fkrName
=
""
;
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
var
$datStart
=
$div
.
find
(
"input[name='start']"
);
var
$datEnd
=
$div
.
find
(
"input[name='end']"
);
var
$txtScgd
=
$div
.
find
(
'input[name="wodjid"]'
);
var
$txtWosnid
=
$div
.
find
(
'input[name="wosnid"]'
);
function
paramsInit
()
{
gpfk_wgsl
=
0
;
gpfk_bhgsl
=
0
;
}
function
pageInit
()
{
$datStart
.
iDatebox
();
$datEnd
.
iDatebox
();
$txtScgd
.
iTextbox
();
$txtWosnid
.
iTextbox
();
var
options
=
{
url
:
'kmes/gpfk'
,
noRequest
:
true
,
columns
:
[[
{
title
:
"条码"
,
field
:
"wosnid"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"生产工单"
,
field
:
"woDjid"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"工序编码"
,
field
:
"bzgxCode"
,
fieldType
:
"ftString"
,
width
:
120
},
{
title
:
"标准工序"
,
field
:
"bzgxName"
,
fieldType
:
"ftString"
,
width
:
120
},
{
title
:
"反馈工序"
,
field
:
"fkgx"
,
fieldType
:
"ftString"
,
width
:
100
,
hidden
:
true
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
fieldType
:
"ftString"
,
width
:
120
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"规格"
,
field
:
"wlxxGg"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"合格"
,
field
:
"hgbz"
,
align
:
"center"
,
fieldType
:
"ftString"
,
width
:
100
,
formatter
:
function
(
value
,
index
,
row
){
var
map
=
{
Y
:
"合格"
,
N
:
"不合格"
};
if
(
value
==
"Y"
){
return
"<span style='color: #216d4c'>"
+
map
[
value
]
+
"</span>"
;
}
else
if
(
value
==
"N"
){
return
"<span style='color: indianred'>"
+
map
[
value
]
+
"</span>"
;
}
else
{
return
''
}
}},
{
title
:
"合格数量"
,
field
:
"hgsl"
,
fieldType
:
"int"
,
width
:
100
},
{
title
:
"不合格数量"
,
field
:
"bhgsl"
,
fieldType
:
"int"
,
width
:
100
},
{
title
:
"反馈数量"
,
field
:
"fksl"
,
fieldType
:
"int"
},
{
title
:
"反馈人"
,
field
:
"fkr"
,
fieldType
:
"ftString"
},
{
title
:
"反馈时间"
,
field
:
"fksj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"不合格详情"
,
field
:
"bhgxq"
,
width
:
'100'
,
align
:
"center"
,
formatter
:
function
(
value
,
row
,
index
)
{
return
'<a style="color:dodgerblue" href="javascript:void(0)" onclick="showdetialBhgXq(
\'
'
+
row
.
id
+
'
\'
)">详情</a>'
}},
]],
dialog
:
{
footerIn
:
true
,
maximized
:
true
,
draggable
:
false
,
modal
:
true
,
width
:
$
(
window
).
width
()
-
200
,
height
:
$
(
window
).
height
()
-
200
,
href
:
'kmes/gpfk/edit'
,
onSaveCallback
:
function
()
{
},
onBeforeLoad
:
function
()
{
var
mkid
=
''
;
if
(
$
(
'#tabs'
).
iTabs
(
'getSelected'
).
panel
(
'options'
)[
'data'
]
&&
$
(
'#tabs'
).
iTabs
(
'getSelected'
).
panel
(
'options'
)[
'data'
][
"data"
]){
mkid
=
$
(
'#tabs'
).
iTabs
(
'getSelected'
).
panel
(
'options'
)[
'data'
][
"data"
][
"mkid"
]
}
else
{
mkid
=
"901000100"
}
$
(
this
).
dialog
(
"options"
).
queryParams
=
$
.
extend
({},
DataBind
.
collectData
(
$div
),{
mkid
:
mkid
,
gxName
:
gxName
,
gzzxid
:
gzzxid
,
gzzxname
:
gzzxname
,
fkrName
:
fkrName
,
})
},
messager
:
function
()
{
var
flag
=
true
;
if
(
$div
.
find
(
"input[name='gxid']"
).
val
()
==
""
){
gas
.
confirm
(
"您尚未选择工序,无法进行反馈操作。是否重新选择工序?"
,
function
()
{
run
();
flag
=
false
;
},
function
()
{
flag
=
true
});
}
else
{
flag
=
false
}
return
flag
},
onDestroy
:
function
()
{
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
},
onLoadSuccess
:
function
()
{
if
(
jzcs
==
0
){
$div
.
find
(
".toolbar-add"
).
click
()
}
jzcs
++
},
};
$div
.
Holder
(
options
);
/*取消反馈*/
$
(
"#kmesGpfkTable-toolbar"
).
find
(
".toolbar-cancelfk"
).
iMenubutton
({
event
:
'doAjax'
,
text
:
'取消反馈'
,
onClick
:
function
()
{
var
selectedRow
=
$div
.
find
(
'.toolbar-table'
).
datagrid
(
'getSelected'
);
if
(
selectedRow
==
null
){
$
.
messager
.
alert
(
'提示'
,
'请选中一条数据进行操作'
);
return
false
;
}
gas
.
confirm
(
"是否执行该操作"
,
function
()
{
HTTP
.
post
(
'kmes/gpfk/delGpfk'
,{
gpfkid
:
selectedRow
.
id
},
function
(
result
)
{
if
(
result
[
'success'
]){
var
index
=
$div
.
find
(
'.toolbar-table'
).
datagrid
(
"getRowIndex"
,
selectedRow
);
$div
.
find
(
'.toolbar-table'
).
datagrid
(
"deleteRow"
,
index
);
gas
.
showTips
(
"取消反馈成功!"
)
}
else
{
$
.
messager
.
alert
(
'提示'
,
result
[
'message'
]
||
'取消老化失败,请重新操作!'
);
}
})
})
}
});
$
(
"#kmesGpfkTable-toolbar"
).
find
(
".toolbar-search1"
).
iMenubutton
({
text
:
'搜索'
,
iconCls
:
"fa fa-search"
,
btnCls
:
""
,
onClick
:
function
()
{
if
(
$div
.
find
(
"input[name='gxid']"
).
val
()
==
""
){
gas
.
confirm
(
"您尚未选择工序,无法进行反馈操作。是否重新选择工序?"
,
function
()
{
run
();
});
}
else
{
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
}
});
// $("#kmesGpfkTable-toolbar").find(".toolbar-test").iMenubutton({
// text:'测试',
// iconCls:"fa fa-search",
// btnCls:"",
// onClick:function () {
// gas.Dialog({
// title:"测试",
// width:960,
// height:480,
// href:"kmes/gpfk/sample",
// onBeforeLoad:function () {
// $(this).dialog("options").queryParams=$.extend({},DataBind.collectData($div),{
// gxName:gxName,
// gzzxid:gzzxid,
// gzzxname:gzzxname,
// fkrName:fkrName,
// })
// },
// })
// }
// });
}
/*数据初始化*/
function
dataInit
(
ops
){
gas
.
post
(
"common/datetime"
,{},
function
(
res
)
{
var
date
=
DateUtils
.
getDate
(
res
.
data
.
data
);
$datStart
.
iDatebox
(
"setValue"
,
DateUtils
.
add
(
date
,
-
2
).
Format
(
"yyyy-MM-dd"
));
},
ops
);
}
/*用户操作*/
function
run
(
res
){
gas
.
Dialog
({
title
:
"选择工序"
,
width
:
480
,
minimizable
:
false
,
maximizable
:
false
,
height
:
280
,
href
:
"kmes/gpfk/gx"
,
onInit
:
function
(
element
)
{
},
regResultHandler
:
function
(
element
)
{
if
(
!
element
.
form
(
"validate"
)){
return
false
}
var
data
=
DataBind
.
collectData
(
element
);
$div
.
find
(
"input[name='bxid']"
).
val
(
data
.
bxid
||
""
);
$div
.
find
(
"input[name='gxid']"
).
val
(
data
.
gxid
||
""
);
$div
.
find
(
"input[name='fkrid']"
).
val
(
window
.
sessionStorage
.
getItem
(
'userId'
));
fkrName
=
window
.
sessionStorage
.
getItem
(
'userName'
);
gxName
=
data
.
gxName
||
""
;
gzzxid
=
data
.
gzzxid
||
''
;
gzzxname
=
data
.
gzzxname
||
""
;
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/gpfk/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
},
})
}
gas
.
load
(
paramsInit
,
pageInit
,
dataInit
,
run
);
})
function
showdetialBhgXq
(
id
){
gas
.
Dialog
({
title
:
"不合格详情"
,
width
:
640
,
height
:
360
,
href
:
"kmes/gpfk/bhgXq"
,
onBeforeLoad
:
function
()
{
$
(
this
).
dialog
(
"options"
).
queryParams
=
{
id
:
id
}
},
})
}
function
getPrintDataGpfk
()
{
return
{
wosnid
:
$
(
'#kmesGpfk'
).
find
(
".toolbar-table"
).
datagrid
(
"getSelected"
).
wosnid
}
}
</script>
gavel/src/main/resources/templates/views/kmes/gpbhgcx/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"cjzyGpbhgcx"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'cjzyGpbhgcxTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"cjzyGpbhgcxTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'cjzyGpbhgcxTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
加工时间:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"start"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"end"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
序列号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wosnid"
id=
"wosngn_wosonid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
工作中心:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gzzxid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
标准工序:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bzgxid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
反馈人:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"fkr"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
班型:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bxid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
现象:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"xxName"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
分类:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"flid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#cjzyGpbhgcx'
);
var
$datBegin
=
$div
.
find
(
'input[name="start"]'
);
var
$datEnd
=
$div
.
find
(
'input[name="end"]'
);
var
$cbxFLid
=
$div
.
find
(
'input[name="flid"]'
);
var
$cbxGzzxid
=
$div
.
find
(
'input[name="gzzxid"]'
);
var
$cbxBxid
=
$div
.
find
(
'input[name="bxid"]'
);
var
$cbxBzgxid
=
$div
.
find
(
'input[name="bzgxid"]'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
var
$flidMap
=
{};
function
paramInit
(
ops
){
gas
.
post
(
"kmes/bhgxx/init/bhgfl"
,
{},
function
(
res
){
if
(
res
.
success
&&
res
.
data
.
records
){
var
records
=
res
[
'data'
][
'records'
];
$
.
each
(
records
,
function
(
i
,
data
){
$flidMap
[
data
.
id
]
=
data
.
name
;
});
}
},
ops
);
}
function
pageInit
()
{
$cbxGzzxid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
,
multiple
:
true
,
allowEdit
:
false
});
$cbxBxid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
,
multiple
:
false
,
allowEdit
:
false
});
$cbxFLid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
,
multiple
:
false
,
allowEdit
:
false
});
$datBegin
.
iDatetimespinner
();
$datEnd
.
iDatetimespinner
();
$cbxBzgxid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
,
multiple
:
true
,
allowEdit
:
false
,
url
:
'gygl/bzgx/queryNotTybzBzgx'
,
loadFilter
:
function
(
a
)
{
var
datas
=
a
[
"data"
][
"records"
];
$
.
each
(
datas
,
function
(
i
,
item
)
{
item
[
"name"
]
=
item
[
"gzzxname"
]
+
"-"
+
item
[
"name"
]
});
return
datas
}}
);
var
options
=
{
url
:
'kmes/gpbhgcx'
,
noRequest
:
true
,
columns
:
[[
{
title
:
"产品序列号"
,
field
:
"wosnCode"
,
fieldType
:
"ftString"
,
width
:
200
},
{
title
:
"反馈时间"
,
field
:
"fksj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"工作中心"
,
field
:
"gzzxName"
,
width
:
100
,
align
:
'center'
},
{
title
:
"工序名称"
,
field
:
"bzgxName"
,
width
:
220
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
140
},
{
title
:
"机种"
,
field
:
"jzname"
,
width
:
140
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
160
},
{
title
:
"不合格现象编码"
,
field
:
"bhgxxCode"
,
fieldType
:
"ftString"
,
hidden
:
true
},
{
title
:
"不合格现象名称"
,
field
:
"bhgxxName"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"不合格原因编码"
,
field
:
"bhgyyCode"
,
fieldType
:
"ftString"
,
hidden
:
true
},
{
title
:
"不合格分类"
,
field
:
"flid"
,
width
:
120
,
formatter
:
function
(
value
,
index
,
row
)
{
return
$flidMap
[
value
]
||
value
;
}
},
{
title
:
"反馈人"
,
field
:
"fkr"
,
fieldType
:
"ftString"
,
width
:
100
,
align
:
'center'
},
{
title
:
"班型"
,
field
:
"bxName"
,
width
:
100
},
{
title
:
"不合格原因名称"
,
field
:
"bhgyyName"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"维修说明"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
160
},
]],
dialog
:
{
footerIn
:
true
}
};
$div
.
Holder
(
options
);
}
/*数据初始化*/
function
dataInit
(
ops
){
gas
.
postHTTP
(
"gygl/gzzx/query"
,{},
function
(
res
)
{
$cbxGzzxid
.
iCombobox
(
"loadData"
,
res
.
data
.
records
)
},
ops
);
gas
.
postHTTP
(
"kmes/bhgxx/init/bhgfl"
,{},
function
(
res
)
{
$cbxFLid
.
iCombobox
(
"loadData"
,
res
.
data
.
records
)
},
ops
);
gas
.
postHTTP
(
"kmes/bx/query"
,{},
function
(
res
)
{
$cbxBxid
.
iCombobox
(
"loadData"
,
res
.
data
.
records
)
},
ops
);
gas
.
postHTTP
(
"common/datetime"
,{},
function
(
response1
)
{
var
date
=
response1
.
data
.
data
;
$datBegin
.
iDatetimespinner
(
"setValue"
,
new
Date
(
date
).
Format
(
"yyyy-MM-dd"
)
+
' 00:00'
);
$datEnd
.
iDatetimespinner
(
"setValue"
,
new
Date
(
date
).
Format
(
"yyyy-MM-dd"
)
+
' 23:59'
);
},
ops
);
}
/*用户操作*/
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/gpbhgcx/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
))
}
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/gyssnsz/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"gyssnszWlxx"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'gyssnszWlxxTable',herf:'kzzx/gridset/query'"
>
</table>
<div
id=
"gyssnszWlxxTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'gyssnszWlxxTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-snsz toolbar"
href=
"javascript:void(0)"
>
物料规则设置
</a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
物料信息:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"condition"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
序列号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"snrulename"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#gyssnszWlxx'
);
var
gzflData
=
{};
var
p1
=
new
Promise
(
function
(
reslove
,
reject
)
{
HTTP
.
post
(
'jcsj/snrule/init/gzfl'
,{},
function
(
result
)
{
if
(
result
[
"success"
]){
var
data
=
result
[
"data"
][
"records"
]
||
[];
for
(
var
i
in
data
){
gzflData
[
data
[
i
].
id
]
=
data
[
i
].
name
}
reslove
(
gzflData
)
}
});
});
var
sngzData
=
{};
var
p2
=
new
Promise
(
function
(
reslove
,
reject
)
{
HTTP
.
post
(
'jcsj/snrule/init/sngz'
,{},
function
(
result
)
{
if
(
result
[
"success"
]){
var
data
=
result
[
"data"
][
"records"
]
||
[];
for
(
var
i
in
data
){
sngzData
[
data
[
i
].
id
]
=
data
[
i
].
name
}
reslove
(
sngzData
)
}
});
});
Promise
.
all
([
p1
,
p2
]).
then
(
function
(
result
){
var
options
=
{
url
:
'kmes/gyssnsz'
,
queryParams
:{
condition
:
$div
.
find
(
'form input[name="condition"]'
).
val
(),
snrulename
:
$div
.
find
(
'form input[name="snrulename"]'
).
val
()
},
columns
:[[
{
title
:
"物料编码"
,
field
:
"code"
,
width
:
160
},
{
title
:
"物料名称"
,
field
:
"name"
,
width
:
160
},
{
title
:
"序列号编码"
,
field
:
"snrulecode"
,
fieldType
:
"ftString"
,
width
:
100
},
{
title
:
"序列号名称"
,
field
:
"snrulename"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"规则分类"
,
field
:
"snrulegzfl"
,
fieldType
:
"ftString"
,
width
:
160
,
formatter
:
function
(
value
,
index
,
row
)
{
var
text
=
gzflData
[
value
];
return
text
||
""
;
}
},
{
title
:
"编码规则"
,
field
:
"snrulegz"
,
fieldType
:
"ftString"
,
width
:
160
,
formatter
:
function
(
value
,
index
,
row
)
{
var
text
=
sngzData
[
value
];
return
text
||
""
;
}
},
{
title
:
"前缀"
,
field
:
"snruleqz"
,
fieldType
:
"ftString"
,
width
:
220
},
{
title
:
"长度"
,
field
:
"cd"
,
fieldType
:
"int"
},
{
title
:
"后缀"
,
field
:
"snrulehz"
,
fieldType
:
"ftString"
,
width
:
160
}
]]
};
$div
.
Holder
(
options
);
$
(
'.toolbar-snsz'
).
iMenubutton
({
event
:
'openDialog'
,
iconCls
:
'fa fa-plus'
,
dialog
:{
title
:
'物料规则设置'
,
href
:
'kmes/gyssnsz/snsz'
,
footerIn
:
true
,
tag
:
'add'
,
onSaveCallback
:
function
(
opt
,
data
)
{
$div
.
find
(
'.toolbar-search'
).
click
();
}
}
});
});
});
</script>
gavel/src/main/resources/templates/views/kmes/gyssnsz/snsz.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"snszWlxxEdit"
class=
"e-dialog-container"
data-options=
"width:520,height:220"
>
<div
class=
"e-dialog-body"
>
<input
type=
"hidden"
name=
"flag"
>
<input
type=
"hidden"
name=
"id"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
物料编码:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
data-options=
"required:true"
data-toggle=
"gui-textbox"
data-title=
"name"
style=
"width: 100%"
>
<input
type=
"hidden"
name=
"name"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
序列号规则:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"snruleid"
data-toggle=
"gui-textbox"
data-options=
"required:true"
>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#snszWlxxEdit'
);
Auxiliary
.
box
(
$div
.
find
(
'input[name="wlid"]'
),
"WLID"
);
$div
.
find
(
'input[name="snruleid"]'
).
iCombobox
({
url
:
'jcsj/snrule/gysSnrule'
,
valueField
:
'id'
,
textField
:
'name'
,
allowNull
:
true
,
loadFilter
:
function
(
a
)
{
return
a
[
"data"
][
"records"
]
}
});
$div
.
find
(
".e-dialog-ok"
).
iMenubutton
({
text
:
"确定"
,
iconCls
:
"fa fa-save"
,
btnCls
:
"gui-btn-save"
,
onClick
:
function
(){
HTTP
.
post
(
"kmes/gyssnsz/snsz"
,{
wlid
:
$div
.
find
(
'input[name="wlid"]'
).
val
(),
snruleid
:
$div
.
find
(
'input[name="snruleid"]'
).
val
()},
function
(
res
)
{
if
(
res
.
success
){
$div
.
closest
(
"form"
).
iDialog
(
"setStatus"
,{
"state"
:
"ok"
,
data
:
res
.
data
});
}
else
{
$
.
messager
.
alert
(
"提示"
,
res
.
message
);
}
})
}
});
});
</script>
gavel/src/main/resources/templates/views/kmes/snreset/index.html
deleted
100644 → 0
View file @
070ba420
<style>
#hzSnresetList
{
top
:
0
}
</style>
<div
id=
"hzSnreset"
class=
"gui-layout gui-div"
style=
"height: 100%;width:100%;position: relative;overflow: hidden"
>
<div
data-options=
"region:'north'"
style=
"height:86px;width:100%;"
>
<div
class=
"gui-toolbar"
style=
"display: block"
data-options=
"grid:{type:'datagrid',id:'hzSnresetTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-resetsn toolbar"
href=
"javascript:void(0)"
>
重置产品码
</a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
规则类别:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"rulefl"
class=
"gui-textbox"
data-options=
"required:true"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
规则信息:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"ruleinfo"
class=
"gui-textbox"
data-options=
"required:false"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search"
href=
"javascript:void(0)"
style=
"color: white"
></a></span>
</form>
</div>
</div>
</div>
<div
data-options=
"region:'center'"
>
<div
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'hzSnresetTable',herf:'kzzx/gridset/query',type:'datagrid'"
></table>
</div>
</div>
<div
data-options=
"region:'west',split:true"
style=
"width:70%;height:100%;position: relative"
>
<div
id=
"hzSnresetList"
class=
"gui-div"
>
<div
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'hzSnresetListTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
style=
"display: none"
></a>
</div>
</div>
<table
class=
"toolbar-table"
data-options=
"id: 'hzSnresetListTable',herf:'kzzx/gridset/query'"
></table>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#hzSnreset'
);
var
$snList
=
$
(
"#hzSnresetList"
);
var
$cbxFlid
=
$div
.
find
(
'input[name="rulefl"]'
);
var
$datagrid
=
$div
.
find
(
'.toolbar-table:first'
);
var
$datagridSn
=
$snList
.
find
(
'.toolbar-table:first'
);
var
$searchBtn
=
$div
.
find
(
".toolbar-search"
);
function
paramInit
(
ops
){
}
function
pageInit
(
ops
)
{
var
options
=
{
url
:
"kmes/snreset"
,
fontPage
:
true
,
noRequest
:
true
,
columns
:[[
{
title
:
"id"
,
field
:
"flid"
,
width
:
100
,
hidden
:
true
},
{
title
:
"前缀"
,
field
:
"prefix"
,
width
:
100
},
{
title
:
"最大流水码"
,
field
:
"value"
,
fieldType
:
"int"
,
width
:
100
},
{
title
:
"操作"
,
field
:
"cz"
,
fieldType
:
"ftString"
,
width
:
140
,
align
:
"center"
,
formatter
:
function
(
value
,
row
,
index
)
{
var
rulefl
=
$div
.
find
(
'input[name="rulefl"]'
).
val
();
return
'<a style="margin-right: 10px;color: dodgerblue" onclick="onViewInfo(
\'
'
+
row
.
flid
+
"','"
+
row
.
prefix
+
"','"
+
rulefl
+
'
\'
)">详情</a>'
;
}
}
]],
dialog
:{
footerIn
:
true
,
onBeforeLoad
:
function
()
{
var
selectedRow
=
$datagridSn
.
getSelectedRow
();
if
(
!
selectedRow
){
gas
.
showTipsWarning
(
"请选择一条产品序列号!"
);
return
;
}
}
}
};
$div
.
Holder
(
options
);
$snList
.
Container
({
columns
:
[[
{
title
:
"编码"
,
field
:
"code"
,
fieldType
:
"ftString"
,
width
:
80
},
{
title
:
"名称"
,
field
:
"name"
,
fieldType
:
"ftString"
,
width
:
320
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
220
},
{
title
:
"维护人"
,
field
:
"whr"
,
fieldType
:
"ftString"
},
{
title
:
"维护时间"
,
field
:
"whsj"
,
fieldType
:
"ftDateTime"
}
]],
onLoadSuccess
:
function
()
{
$datagrid
.
datagrid
(
'clientPaging'
,
{
data
:[]});
},
datagrid
:{
onSelect
:
function
(
rowIndex
,
rowData
)
{
if
(
rowData
){
var
rulefl
=
$div
.
find
(
'input[name="rulefl"]'
).
val
();
loadList
(
rowData
.
id
,
rulefl
)
}
}
}
});
$cbxFlid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
false
,
allowEdit
:
false
});
$searchBtn
.
iMenubutton
({
iconCls
:
'fa fa-search'
,
text
:
'搜索'
,
onClick
:
function
()
{
run
()
}
});
}
/*数据初始化*/
function
dataInit
(
ops
){
gas
.
post
(
"kmes/snreset/init/zlx"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
$cbxFlid
.
iCombobox
(
"loadData"
,
result
.
data
.
records
)
}
},
ops
);
}
/*用户操作*/
function
run
(
ops
){
$datagridSn
.
datagrid
(
"options"
).
url
=
"kmes/snreset/querySn"
;
$datagridSn
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
function
loadList
(
id
,
rulefl
)
{
$datagrid
.
datagrid
(
"loading"
);
HTTP
.
post
(
"kmes/snreset/query"
,{
id
:
id
,
rulefl
:
rulefl
},
function
(
res
)
{
if
(
res
.
success
){
$datagrid
.
datagrid
(
"loaded"
);
$datagrid
.
datagrid
(
'clientPaging'
,
{
data
:
res
.
data
.
records
||
[]});
}
})
}
$div
.
find
(
".toolbar-resetsn"
).
iMenubutton
({
iconCls
:
'fa fa-check-square-o'
,
title
:
"重置产品码"
,
btnCls
:
'gui-btn-warm'
,
dialog
:{
title
:
"重置产品码"
,
href
:
'kmes/snreset/resetsn'
,
footerIn
:
true
,
url
:
true
,
cancelNoMessage
:
true
,
onSaveCallback
:
function
()
{
run
()
},
onBeforeLoad
:
function
()
{
var
selectedRow
=
$datagridSn
.
getSelectedRow
();
if
(
!
selectedRow
){
gas
.
showTipsWarning
(
"请选择一条产品序列号!"
);
return
;
}
var
selectedRowright
=
$datagrid
.
getSelectedRow
();
if
(
!
selectedRowright
){
gas
.
showTipsWarning
(
"请选择一条记录!"
);
return
;
}
$
(
this
).
dialog
(
"options"
).
snvalue
=
selectedRowright
.
value
;
$
(
this
).
dialog
(
"options"
).
flid
=
selectedRow
.
flid
;
$
(
this
).
dialog
(
"options"
).
prefix
=
selectedRow
.
prefix
;
}
}
});
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
});
function
onViewInfo
(
flid
,
perfix
,
rulefl
)
{
gas
.
Dialog
({
title
:
"详情"
,
width
:
860
,
height
:
480
,
href
:
"kmes/snreset/sninfo"
,
footerIn
:
true
,
onBeforeLoad
:
function
()
{
$
(
this
).
dialog
(
"options"
).
queryParams
=
{
flid
:
flid
,
perfix
:
perfix
,
rulefl
:
rulefl
}
}
})
}
</script>
gavel/src/main/resources/templates/views/kmes/snreset/resetsn.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzsnReset"
class=
"e-dialog-container"
data-options=
"width:460,height:240"
>
<div
class=
"editTable"
>
<input
type=
"hidden"
name=
"flag"
>
<input
type=
"hidden"
name=
"flid"
>
<input
type=
"hidden"
name=
"prefix"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
当前产品码:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"snvalue"
data-toggle=
"gui-numberbox"
data-options=
"required:true"
>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$dialog
=
$
(
'#hzsnReset'
);
function
paramsInit
(
ops
){
$dialog
.
find
(
'input[name="snvalue"]'
).
val
(
$dialog
.
parent
().
dialog
(
"options"
).
snvalue
);
$dialog
.
find
(
'input[name="flid"]'
).
val
(
$dialog
.
parent
().
dialog
(
"options"
).
flid
);
$dialog
.
find
(
'input[name="prefix"]'
).
val
(
$dialog
.
parent
().
dialog
(
"options"
).
prefix
);
}
function
dataInit
(
ops
){
//获取本次打印数量
}
function
pageInit
(
ops
){
}
function
run
(){
}
$dialog
.
find
(
".e-dialog-ok"
).
iMenubutton
({
text
:
"确定"
,
iconCls
:
"fa fa-save"
,
btnCls
:
"gui-btn-save"
,
onClick
:
function
(){
$
.
messager
.
confirm
(
"确认"
,
"是否重置序列号?"
,
function
(
r
)
{
if
(
r
)
{
var
data
=
DataBind
.
collectData
(
$dialog
);
var
params
=
{
"flid"
:
data
.
flid
,
"prefix"
:
data
.
prefix
,
"snvalue"
:
data
.
snvalue
};
HTTP
.
post
(
"kmes/snreset/resetSn"
,
params
,
function
(
res
)
{
if
(
res
.
success
)
{
gas
.
showTips
(
"操作成功"
);
$dialog
.
closest
(
"form"
).
iDialog
(
"setStatus"
,
{
"state"
:
"ok"
,
data
:
[]});
}
else
{
gas
.
showTipsError
(
res
.
message
||
"操作失败"
);
}
})
}
})
}
});
gas
.
load
(
paramsInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/snreset/sninfo.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"sninfoContainer"
class=
"e-dialog-container"
>
<div
class=
"e-dialog-body"
>
<div
class=
"mx-dataTable"
style=
"margin-top:4px;bottom: 0"
>
<table
id=
"bzEditSninfo"
data-options=
"dgid:'SNINFO'"
style=
"height: 100%;width: 100%"
></table>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$Container
=
$
(
"#sninfoContainer"
);
var
$fieldView
=
$
(
"#bzEditSninfo"
);
var
params
=
$Container
.
parent
().
dialog
(
"options"
).
queryParams
;
var
paramsn
=
{};
function
paramInit
(
ops
){
paramsn
=
params
}
function
pageInit
(){
viewSn
(
paramsn
)
}
function
dataInit
(){
}
function
run
(){
}
function
viewSn
(
paramsn
)
{
var
$righColumns
=
[
{
title
:
"序列号"
,
field
:
"code"
,
width
:
220
},
{
title
:
"操作人"
,
field
:
"cjr"
,
width
:
120
},
{
title
:
"操作时间"
,
field
:
"cjsj"
,
fieldType
:
"ftDateTime"
}
];
$fieldView
.
datagrid
({
fitColumns
:
true
,
columns
:[
new
$
.
common
.
formatterCol
(
$righColumns
)],
rownumbers
:
true
,
pagination
:
true
,
});
$fieldView
.
datagrid
(
"options"
).
url
=
"kmes/snreset/querySninfo"
;
$fieldView
.
datagrid
(
"load"
,
paramsn
);
/* HTTP.post("kmes/snreset/querySninfo",paramsn,function (res) {
if(res.success){
$fieldView.datagrid("loadData",res.data.records||[])
}
})*/
}
$Container
.
find
(
".e-dialog-cancel"
).
iMenubutton
({
text
:
"取消"
,
iconCls
:
"fa fa-close"
,
btnCls
:
"gui-btn-danger"
,
onClick
:
function
()
{
$Container
.
parent
(
""
).
dialog
(
"destroy"
);
}
});
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/snwollcx/importpage.html
deleted
100644 → 0
View file @
070ba420
<div
class=
"layui-row"
>
<div
class=
"layui-col-xs6 layui-col-sm6 layui-col-md4"
>
<div
class=
"grid-demo grid-demo-bg1"
>
</div>
</div>
<div
class=
"layui-col-xs6 layui-col-sm6 layui-col-md4"
>
<div
class=
"grid-demo grid-demo-bg1"
>
<div
class=
"layui-upload-drag"
id=
"test101"
style=
"margin: 20px 10px"
>
<i
class=
"layui-icon"
>
</i>
<p
id=
"upload-text-1"
>
点击上传,或将文件拖拽到此处
</p>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-input-block"
>
<a
class=
"layui-btn"
id=
"test19"
>
开始上传
</a>
</div>
</div>
</div>
</div>
<div
class=
"layui-col-xs4 layui-col-sm12 layui-col-md4"
>
<div
class=
"grid-demo layui-bg-blue"
></div>
</div>
</div>
<script>
var
$dialog
=
$
(
'#patentbjdAdd'
);
layui
.
use
(
'upload'
,
function
(){
var
upload
=
layui
.
upload
;
$
(
"#test19"
).
click
(
function
(
e
)
{
uploadInst
.
upload
();
e
.
stopPropagation
();
});
//拖拽上传
var
uploadInst
=
upload
.
render
({
elem
:
'#test101'
,
url
:
'kmes/snwollcx/excel/import'
//上传接口
,
accept
:
'file'
,
auto
:
false
,
data
:
{
}
,
choose
:
function
(
obj
){
var
files
=
obj
.
pushFile
();
var
lastId
=
null
;
$
.
each
(
files
,
function
(
i
,
file
)
{
lastId
=
i
;
});
$
.
each
(
files
,
function
(
i
,
file
)
{
if
(
lastId
&&
i
!=
lastId
){
delete
files
[
i
];
}
});
obj
.
preview
(
function
(
index
,
file
,
result
){
console
.
log
(
index
);
//得到文件索引
console
.
log
(
file
);
//得到文件对象
$
(
"#upload-text-1"
).
html
(
file
.
name
);
});
}
,
before
:
function
(
obj
){
//obj参数包含的信息,跟 choose回调完全一致,可参见上文。
load
();
}
,
done
:
function
(
res
,
index
,
upload
){
disLoad
();
if
(
res
[
"success"
]){
/* $.messager.show({
title:"提示",
msg:res.message||"数据导入成功"
});*/
$
(
'#patentbjdAdd'
).
iDialog
(
"setStatus"
,{
"state"
:
"ok"
,
data
:
res
.
data
});
$
(
'#patentbjdAdd'
).
iDialog
(
"destroy"
);
}
else
{
$
.
messager
.
alert
(
"提示"
,
res
.
message
||
"数据导入失败"
);
}
}
,
error
:
function
(
index
,
upload
){
disLoad
()
}
});
});
/* layui.use('laydate', function(){
var laydate = layui.laydate;
//执行一个laydate实例
laydate.render({
elem: '#test15' //指定元素
,type: 'date'
});
});*/
function
load
()
{
$
(
"<div class=
\"
datagrid-mask
\"
></div>"
).
css
({
display
:
"block"
,
width
:
"100%"
,
height
:
$
(
'#patentbjdAddImport'
).
height
()
+
40
}).
appendTo
(
"#patentbjdAddImport"
);
$
(
"<div class=
\"
datagrid-mask-msg
\"
style='color:black'></div>"
).
html
(
"数据导入中,请稍候..."
).
appendTo
(
"#patentbjdAddImport"
).
css
({
display
:
"block"
,
left
:
(
$
(
"#patentbjdAddImport"
).
outerWidth
(
true
)
-
100
)
/
2
,
top
:
(
$
(
"#patentbjdAddImport"
).
height
())
/
2
,
height
:
40
,
width
:
200
});
}
//取消加载层
function
disLoad
()
{
$
(
".datagrid-mask"
).
remove
();
$
(
".datagrid-mask-msg"
).
remove
();
}
</script>
\ No newline at end of file
gavel/src/main/resources/templates/views/kmes/snwollcx/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"snWollcx"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'snWollcxTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"snWollcxTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'snWollcxTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-import toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-exportTag toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
序列号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wosnids"
data-options=
"required:true,prompt:'形式:序列号,序列号,序列号'"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#snWollcx'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
var
$textwosnids
=
$div
.
find
(
"input[name='wosnids']"
);
function
paramInit
(
ops
){
}
function
pageInit
()
{
var
options
=
{
noRequest
:
true
,
columns
:
[[
{
title
:
"产品序列号"
,
field
:
"wosnid"
,
fieldType
:
"ftString"
,
width
:
200
},
{
title
:
"反馈时间"
,
field
:
"fksj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"反馈人"
,
field
:
"fkr"
,
fieldType
:
"ftString"
,
width
:
200
,
align
:
'center'
},
{
title
:
"工作中心"
,
field
:
"gzzxName"
,
width
:
200
,
align
:
'center'
},
{
title
:
"工序名称"
,
field
:
"bzgxName"
,
width
:
200
}
]],
delimitingRun
:
run
,
dialog
:
{
footerIn
:
true
}
};
$div
.
Holder
(
options
);
$div
.
find
(
".toolbar-import"
).
iMenubutton
({
event
:
'openDialog'
,
iconCls
:
'fa fa-upload'
,
text
:
'导入条码'
,
dialog
:{
title
:
'导入条码'
,
id
:
'patentbjdAdd'
,
width
:
720
,
height
:
360
,
href
:
'kmes/snwollcx/importpage'
,
tag
:
'add'
,
onSaveCallback
:
function
(
ele
,
data
)
{
$textwosnids
.
textbox
(
"setValue"
,
data
.
wosnids
);
run
()
}
}
});
$div
.
find
(
".toolbar-exportTag"
).
iMenubutton
({
iconCls
:
'fa fa-upload'
,
text
:
'导出条码模板'
,
onClick
:
function
()
{
HTTP
.
download
(
"kmes/snwollcx/excel/model/export"
,{})
}
});
}
/*数据初始化*/
function
dataInit
(
ops
){
}
/*用户操作*/
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/snwollcx/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
gas
.
load
(
paramInit
,
pageInit
,
dataInit
);
})
</script>
gavel/src/main/resources/templates/views/kmes/tgpfkcx/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"cjzytGpfkcx"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'cjzytGpfkcxTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"cjzytGpfkcxTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'cjzytGpfkcxTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
工票号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wosnid"
id=
"wosngn_wosonid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
加工时间:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"start"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"end"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
工作中心:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gzzxid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
标准工序:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bzgxid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
物料:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
机种:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"jzname"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
反馈人:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"fkr"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
计划单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"jhdjid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
计划日期:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"jhksrq"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"jhjsrq"
style=
"width: 100%"
>
</div>
</div>
</div>
</li>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
生产单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wodjid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
班型:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bxid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#cjzytGpfkcx'
);
var
$datBegin
=
$div
.
find
(
'input[name="start"]'
);
var
$datEnd
=
$div
.
find
(
'input[name="end"]'
);
var
$datJhksrq
=
$div
.
find
(
'input[name="jhksrq"]'
);
var
$datJhjsrq
=
$div
.
find
(
'input[name="jhjsrq"]'
);
var
$cbxGzzxid
=
$div
.
find
(
'input[name="gzzxid"]'
);
var
$cbxBzgxid
=
$div
.
find
(
'input[name="bzgxid"]'
);
var
$cbxBxid
=
$div
.
find
(
'input[name="bxid"]'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
function
paramInit
(
ops
){
}
function
pageInit
()
{
$cbxGzzxid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
,
multiple
:
true
,
allowEdit
:
false
});
$cbxBxid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
,
multiple
:
false
,
allowEdit
:
false
});
$datBegin
.
iDatetimespinner
();
$datEnd
.
iDatetimespinner
();
$datJhksrq
.
iDatebox
();
$datJhjsrq
.
iDatebox
();
$cbxBzgxid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
,
multiple
:
true
,
allowEdit
:
false
,
url
:
'kmes/gpfkcx/queryBzgx'
,
loadFilter
:
function
(
a
)
{
var
datas
=
a
[
"data"
][
"records"
];
$
.
each
(
datas
,
function
(
i
,
item
)
{
item
[
"name"
]
=
item
[
"gzzxname"
]
+
"-"
+
item
[
"name"
]
});
return
datas
}}
);
var
options
=
{
url
:
'kmes/tgpfkcx'
,
noRequest
:
true
,
columns
:
[[
{
title
:
"工票号"
,
field
:
"wosnid"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"反馈时间"
,
field
:
"fksj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"反馈人"
,
field
:
"fkr"
,
fieldType
:
"ftString"
,
width
:
100
,
align
:
'center'
},
{
title
:
"工作中心"
,
field
:
"gzzxName"
,
width
:
100
,
align
:
'center'
},
{
title
:
"工序名称"
,
field
:
"bzgxName"
,
width
:
140
},
{
title
:
"班型"
,
field
:
"bxName"
,
width
:
80
},
{
title
:
"合格"
,
field
:
"hgbz"
,
width
:
80
,
fieldType
:
"checkbox"
},
{
title
:
"反馈数量"
,
field
:
"fksl"
,
fieldType
:
"int"
},
{
title
:
"合格数量"
,
field
:
"hgsl"
,
fieldType
:
"int"
},
{
title
:
"返修数量"
,
field
:
"fxsl"
,
fieldType
:
"int"
},
{
title
:
"工废数量"
,
field
:
"gfsl"
,
fieldType
:
"int"
},
{
title
:
"料废数量"
,
field
:
"lfsl"
,
fieldType
:
"int"
},
{
title
:
"返工数量"
,
field
:
"fgsl"
,
fieldType
:
"int"
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
140
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
},
{
title
:
"规格"
,
field
:
"wlxxGg"
,
width
:
140
},
{
title
:
"批号"
,
field
:
"fkph"
,
width
:
140
},
{
title
:
"机种"
,
field
:
"jzname"
,
width
:
140
},
{
title
:
"时间段选择"
,
field
:
"fksjd"
,
width
:
120
},
{
title
:
"生产时间"
,
field
:
"schs"
,
fieldType
:
"float"
},
{
title
:
"调模时间"
,
field
:
"tmhs"
,
fieldType
:
"float"
},
{
title
:
"修机时间"
,
field
:
"xjhs"
,
fieldType
:
"float"
},
{
title
:
"其他时间"
,
field
:
"qths"
,
fieldType
:
"float"
},
{
title
:
"生产效率(%)"
,
field
:
"scxy"
,
fieldType
:
"money"
},
{
title
:
"作业计划号"
,
field
:
"zyjhDjid"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"作业计划序号"
,
field
:
"wogylxXh"
,
fieldType
:
"int"
},
{
title
:
"排产数量"
,
field
:
"jhsl"
,
fieldType
:
"int"
},
{
title
:
"计划日期"
,
field
:
"zyjhmxJhrq"
,
fieldType
:
"ftDate"
},
{
title
:
"生产单号"
,
field
:
"woDjid"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"订单数量"
,
field
:
"xqsl"
,
fieldType
:
"int"
}
]],
delimitingRun
:
run
,
dialog
:
{
footerIn
:
true
}
};
$div
.
Holder
(
options
);
}
/*数据初始化*/
function
dataInit
(
ops
){
gas
.
postHTTP
(
"gygl/gzzx/query"
,{},
function
(
res
)
{
$cbxGzzxid
.
iCombobox
(
"loadData"
,
res
.
data
.
records
)
},
ops
);
gas
.
postHTTP
(
"kmes/bx/query"
,{},
function
(
res
)
{
$cbxBxid
.
iCombobox
(
"loadData"
,
res
.
data
.
records
)
},
ops
);
gas
.
postHTTP
(
"common/datetime"
,{},
function
(
response1
)
{
var
date
=
response1
.
data
.
data
;
$datBegin
.
iDatetimespinner
(
"setValue"
,
new
Date
(
date
).
Format
(
"yyyy-MM-dd"
)
+
' 00:00'
);
$datEnd
.
iDatetimespinner
(
"setValue"
,
new
Date
(
date
).
Format
(
"yyyy-MM-dd"
)
+
' 23:59'
);
},
ops
);
gas
.
postHTTP
(
"common/datetime"
,{},
function
(
response1
)
{
var
date
=
new
Date
(
response1
.
data
.
data
);
$datJhksrq
.
iDatebox
(
"setValue"
,
DateUtils
.
beginOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
$datJhjsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
endOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
},
ops
);
}
/*用户操作*/
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/tgpfkcx/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/wollck/edit.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzgdylrkEdit"
class=
"e-dialog-container"
>
<div
class=
"e-dialog-body"
>
<div
class=
"gui-layout"
style=
"width: 100%;height: 100%"
>
<div
data-options=
"region:'west',split:true"
style=
"width: 70%;"
>
<div>
<input
type=
"hidden"
name=
"xh"
value=
"1"
>
<input
type=
"hidden"
name=
"wlid"
>
<div
class=
"editTable gui-fluid"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
物料:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlcode"
data-toggle=
"gui-textbox"
style=
"width: 100%"
/>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
机种:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"jzname"
data-toggle=
"gui-textbox"
style=
"width: 100%"
readonly
/>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
规格:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gg"
data-toggle=
"gui-textbox"
style=
"width: 100%"
readonly
/>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
名称:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlmc"
data-toggle=
"gui-textbox"
style=
"width: 100%"
readonly
/>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
仓库:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"ckid"
data-options=
"required:true"
data-toggle=
"gui-combobox"
style=
"width: 100%"
/>
</div>
</div>
</div>
</div>
</div>
<div
class=
"mx-dataTable"
style=
"margin-top:160px;bottom:0;right: 2px;left: 2px"
>
<div
style=
"float: left;width: 50%;height: 100%"
>
<table
id=
"bzEditwollck"
style=
"height: 100%;width: 100%"
></table>
</div>
<div
style=
"float: left;width: 10%;height: 100%;position: relative"
>
<button
type=
"button"
id=
"tockListBtn"
class=
"btn db-btn move btn-default"
title=
"Move selected"
style=
"position: absolute;left: 50%;top: 40%;transform: translate(-50%, -50%);margin: 2px;color: #709ed2;"
>
<i
class=
"glyphicon glyphicon-arrow-right"
></i>
</button>
<button
type=
"button"
id=
"formListBtn"
class=
"btn db-btn remove btn-default"
title=
"Remove selected"
style=
"position: absolute;left: 50%;top: 60%;transform: translate(-50%, -50%);margin: 2px;color: #709ed2;"
>
<i
class=
"glyphicon glyphicon-arrow-left"
></i>
</button>
</div>
<div
style=
"float: left;width: 40%;height: 100%"
>
<table
id=
"bzEditwollckRight"
data-options=
"dgid:'WOLLMX',sort:true"
style=
"height: 100%;width: 100%"
></table>
</div>
</div>
</div>
<div
data-options=
"region:'center'"
style=
""
>
<div
class=
"editTable gui-fluid"
>
<input
type=
"hidden"
name=
"id"
>
<input
type=
"hidden"
name=
"lydjid"
>
<input
type=
"hidden"
name=
"flag"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
入库单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"djid"
data-options=
"required:false"
data-toggle=
"gui-textbox"
style=
"width: 100%"
/>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
入库日期:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"ywrq"
data-options=
"required:true"
data-toggle=
"gui-datebox"
style=
"width: 100%"
/>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
事务类型:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"swlxid"
data-options=
"required:true"
data-toggle=
"gui-combobox"
style=
"width: 100%"
/>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
部门:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bmid"
data-options=
"required:false"
data-toggle=
"gui-combobox"
style=
"width: 100%"
/>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
经手人:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"jsr"
data-options=
"required:true"
data-toggle=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
保管员:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bgy"
data-options=
"required:false"
data-toggle=
"gui-textbox"
style=
"width: 100%"
/>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
备注:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bz"
data-options=
"multiline:true"
data-toggle=
"gui-textarea"
style=
"width: 100%;height:32px"
/>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
维护人:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"whr"
data-toggle=
"gui-textbox"
readonly
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
维护时间:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"whsj"
data-toggle=
"gui-datetimebox"
readonly
style=
"width: 100%"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"ajax-mantle"
></div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
id=
"wollck-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#hzgdylrkEdit'
);
var
$fieldView
=
$
(
'#bzEditwollck'
);
var
$fieldViewRight
=
$
(
'#bzEditwollckRight'
);
var
$btn
=
$
(
"#tockListBtn"
);
var
$rightBtn
=
$
(
"#formListBtn"
)
var
$shadow
=
$div
.
find
(
".ajax-mantle"
);
var
$edtWlid
=
$div
.
find
(
'input[name="wlid"]'
);
var
$edtWlcode
=
$div
.
find
(
'input[name="wlcode"]'
);
var
$edtWlmc
=
$div
.
find
(
'input[name="wlmc"]'
);
var
$edtJz
=
$div
.
find
(
'input[name="jzname"]'
);
var
$edtgg
=
$div
.
find
(
'input[name="gg"]'
);
var
$ckidCo
=
$div
.
find
(
'input[name="ckid"]'
);
var
$bmCo
=
$div
.
find
(
'input[name="bmid"]'
);
var
$swlxCo
=
$div
.
find
(
'input[name="swlxid"]'
);
var
ajaxFlag
=
true
;
var
snids
=
[];
$shadow
.
hide
();
function
parmasInit
(){
}
function
pageInit
(){
$ckidCo
.
iCombobox
({
url
:
'jcsj/common/ck/queryCkid'
,
valueField
:
'id'
,
textField
:
'name'
,
loadFilter
:
function
(
a
)
{
return
a
[
"data"
][
"records"
]
},
onSelect
:
function
(
res
)
{
if
(
res
&&
res
[
"bgy"
]){
$div
.
find
(
'input[textboxname="bgy"]'
).
textbox
(
"setValue"
,
res
[
"bgy"
]);
}
$fieldView
.
datagrid
(
"loadData"
,[]);
if
(
$edtWlid
.
val
()
!=
""
&&
res
[
"id"
]
!=
""
){
$fieldView
.
datagrid
(
"loading"
);
HTTP
.
post
(
"kmes/hzwollck/queryKfpsl"
,{
wlid
:
$edtWlid
.
val
(),
ckid
:
res
[
"id"
],
},
function
(
ress
)
{
$fieldView
.
datagrid
(
"loaded"
);
if
(
ress
.
success
){
$fieldView
.
datagrid
(
"loadData"
,
ress
.
data
.
records
||
[])
}
else
{
$
.
messager
.
alert
(
"提示"
,
res
.
message
||
"加载待分配列表"
)
}
})
}
$fieldViewRight
.
datagrid
(
"loadData"
,[]);
}
});
$bmCo
.
iCombobox
({
url
:
'jcsj/common/bm/queryZzbm'
,
valueField
:
'id'
,
textField
:
'bmmc'
,
allowNull
:
false
,
loadFilter
:
function
(
a
)
{
return
a
[
"data"
][
"records"
]
}
});
$swlxCo
.
iCombobox
({
url
:
'wo/woll/init/swlx'
,
valueField
:
'id'
,
textField
:
'name'
,
loadFilter
:
function
(
a
)
{
return
a
[
"data"
][
"records"
]
}
});
Auxiliary
.
box
(
$edtWlcode
,
"WLID"
,
function
(
list
,
obj
)
{
$edtWlcode
.
textbox
(
"setValue"
,
list
[
'code'
]);
$edtWlmc
.
textbox
(
"setValue"
,
list
[
'name'
]);
$edtgg
.
textbox
(
"setValue"
,
list
[
'gg'
]);
$edtJz
.
textbox
(
"setValue"
,
list
[
'jzname'
]);
$edtWlid
.
val
(
list
[
'id'
]);
$fieldViewRight
.
datagrid
(
"loadData"
,[]);
$fieldView
.
datagrid
(
"loadData"
,[])
if
(
list
[
"id"
]
!=
""
&&
$ckidCo
.
combobox
(
"getValue"
)
!=
""
){
$fieldView
.
datagrid
(
"loading"
)
HTTP
.
post
(
"kmes/hzwollck/queryKfpsl"
,{
wlid
:
list
[
"id"
],
ckid
:
$ckidCo
.
combobox
(
"getValue"
)
},
function
(
res
)
{
$fieldView
.
datagrid
(
"loaded"
)
if
(
res
.
success
){
$fieldView
.
datagrid
(
"loadData"
,
res
.
data
.
records
||
[])
}
else
{
$
.
messager
.
alert
(
"提示"
,
res
.
message
||
"加载待分配列表"
)
}
})
}
});
$btn
.
unbind
().
bind
(
"click"
,
function
()
{
var
leftRow
=
$fieldView
.
datagrid
(
"getSelected"
);
var
rows
=
$fieldViewRight
.
datagrid
(
"getRows"
);
var
wlphs
=
[];
$
.
each
(
rows
,
function
(
i
,
item
)
{
wlphs
.
push
(
item
.
wlph
);
});
var
rowRight
=
null
;
var
index
=
null
;
if
(
wlphs
.
indexOf
(
leftRow
[
"wlph"
])
>-
1
){
index
=
wlphs
.
indexOf
(
leftRow
[
"wlph"
]);
rowRight
=
$fieldViewRight
.
datagrid
(
"getRows"
)[
index
];
}
var
cksl
=
0
;
gas
.
Dialog
({
title
:
"设置出库数量"
,
width
:
640
,
height
:
180
,
onInit
:
function
(
element
)
{
var
form
=
$
(
'<div class="gui-row editTable">'
+
'<label class="gui-form-label">出库数量:</label>'
+
'<div class="gui-input-block"><input type="text" name="cksl" style="width: 100%"></div>'
+
'</div>'
).
appendTo
(
element
);
if
(
rowRight
){
form
.
find
(
"input[name='cksl']"
).
iNumberbox
({
value
:
rowRight
[
"cksl"
]
||
0
,
max
:
leftRow
[
"kcsl"
],
min
:
0
})
}
else
{
form
.
find
(
"input[name='cksl']"
).
iNumberbox
({
value
:
leftRow
[
"kcsl"
]
||
0
,
max
:
leftRow
[
"kcsl"
],
min
:
0
})
}
},
regResultHandler
:
function
(
element
)
{
var
data
=
DataBind
.
collectData
(
element
);
cksl
=
data
.
cksl
;
if
(
rowRight
&&
index
!=
null
){
$fieldViewRight
.
datagrid
(
"updateRow"
,{
index
:
index
,
row
:{
cksl
:
parseFloat
(
data
.
cksl
)
+
parseFloat
(
rowRight
[
"cksl"
])
}
})
}
else
{
$fieldViewRight
.
datagrid
(
"appendRow"
,{
wlid
:
leftRow
[
"wlid"
],
wlph
:
leftRow
[
"wlph"
],
cksl
:
data
[
"cksl"
],
xh
:
rows
.
length
+
1
})
}
var
leftRowIndex
=
$fieldView
.
datagrid
(
"getRowIndex"
,
leftRow
);
$fieldView
.
datagrid
(
"updateRow"
,{
index
:
leftRowIndex
,
row
:{
kcsl
:
parseFloat
(
leftRow
[
"kcsl"
])
-
parseFloat
(
data
[
"cksl"
])
}
})
}
})
});
$rightBtn
.
unbind
().
bind
(
"click"
,
function
()
{
var
b
=
$fieldViewRight
;
var
a
=
$fieldView
;
var
leftRow
=
b
.
datagrid
(
"getSelected"
);
if
(
!
leftRow
){
return
false
}
var
rows
=
a
.
datagrid
(
"getRows"
);
var
wlphs
=
[];
$
.
each
(
rows
,
function
(
i
,
item
)
{
wlphs
.
push
(
item
.
wlph
);
});
var
rowRight
=
null
;
var
index
=
null
;
if
(
wlphs
.
indexOf
(
leftRow
[
"wlph"
])
>-
1
){
index
=
wlphs
.
indexOf
(
leftRow
[
"wlph"
]);
rowRight
=
a
.
datagrid
(
"getRows"
)[
index
];
}
var
cksl
=
0
;
gas
.
Dialog
({
title
:
"设置出库数量"
,
width
:
640
,
height
:
180
,
onInit
:
function
(
element
)
{
var
form
=
$
(
'<div class="gui-row editTable">'
+
'<label class="gui-form-label">出库数量:</label>'
+
'<div class="gui-input-block"><input type="text" name="cksl" style="width: 100%"></div>'
+
'</div>'
).
appendTo
(
element
);
if
(
rowRight
){
form
.
find
(
"input[name='cksl']"
).
iNumberbox
({
value
:
leftRow
[
"cksl"
]
||
0
,
max
:
leftRow
[
"cksl"
],
min
:
0
})
}
},
regResultHandler
:
function
(
element
)
{
var
data
=
DataBind
.
collectData
(
element
);
if
(
parseFloat
(
leftRow
[
"cksl"
])
<
parseFloat
(
data
[
"cksl"
])){
return
false
}
cksl
=
data
.
cksl
;
if
(
rowRight
&&
index
!=
null
){
$fieldView
.
datagrid
(
"updateRow"
,{
index
:
index
,
row
:{
kcsl
:
parseFloat
(
data
.
cksl
)
+
parseFloat
(
rowRight
[
"kcsl"
])
}
})
}
var
leftRowIndex
=
b
.
datagrid
(
"getRowIndex"
,
leftRow
);
if
(
parseFloat
(
leftRow
[
"cksl"
])
-
parseFloat
(
data
[
"cksl"
])
==
0
){
$fieldViewRight
.
datagrid
(
"deleteRow"
,
leftRowIndex
)
}
else
{
$fieldViewRight
.
datagrid
(
"updateRow"
,{
index
:
leftRowIndex
,
row
:{
cksl
:
parseFloat
(
leftRow
[
"cksl"
])
-
parseFloat
(
data
[
"cksl"
])
}
})
}
}
})
});
$
(
"#wollck-dialog-ok"
).
iMenubutton
({
text
:
"确定"
,
iconCls
:
"fa fa-save"
,
btnCls
:
"gui-btn-save"
,
onClick
:
function
(){
var
_details
=
[];
var
records
=
$fieldViewRight
.
datagrid
(
"getRows"
);
records
[
"flag"
]
=
"I"
;
var
master
=
DataBind
.
collectData
(
$div
);
_details
.
push
({
id
:
"KCSW"
,
records
:
records
||
[]
});
HTTP
.
post
(
"kmes/hzwollck/add"
,{
master
:
master
,
details
:
_details
},
function
(
res
)
{
if
(
res
.
success
){
$div
.
closest
(
"form"
).
iDialog
(
"setStatus"
,{
"state"
:
"ok"
,
data
:
res
.
data
});
}
else
{
$
.
messager
.
alert
(
"提示"
,
res
.
message
);
}
})
}
});
}
function
dataInit
(){
}
function
run
(){
}
gas
.
load
(
parmasInit
,
pageInit
,
dataInit
,
run
);
HTTP
.
post
(
"common/datetime"
,{},
function
(
result
)
{
if
(
result
[
'success'
]
&&
result
[
'data'
][
'data'
]){
var
date
=
new
Date
(
result
[
'data'
][
'data'
]);
$div
.
find
(
'input[name="ywrq"]'
).
iDatebox
({
value
:
date
.
Format
(
"yyyy-MM-dd"
)});
}
},
null
,
false
);
if
(
$div
.
closest
(
"form"
).
attr
(
"tag"
)
==
"add"
){
$div
.
find
(
'input[name="jsr"]'
).
val
(
window
.
sessionStorage
.
getItem
(
"userName"
));
$div
.
find
(
"input[name='whr']"
).
textbox
({
value
:
window
.
sessionStorage
.
getItem
(
'userName'
)});
$div
.
find
(
'input[name="whsj"]'
).
iDatetimebox
({
value
:
new
Date
().
Format
(
"yyyy-MM-dd hh:mm:ss"
)})
}
var
columns
=
[
{
title
:
"批号"
,
field
:
"wlph"
,
width
:
120
},
{
title
:
"数量"
,
field
:
"kcsl"
,
width
:
140
},
{
title
:
"入库日期"
,
field
:
"rkrq"
,
fieldType
:
"ftDate"
,
width
:
120
},
];
var
columnsRight
=
[
{
title
:
"序号"
,
field
:
"xh"
,
width
:
120
,
hidden
:
true
},
{
title
:
"物料"
,
field
:
"wlid"
,
width
:
120
,
hidden
:
true
},
{
title
:
"批号"
,
field
:
"wlph"
,
width
:
120
},
{
title
:
"出库数量"
,
field
:
"cksl"
,
width
:
140
},
];
$fieldView
.
datagrid
({
title
:
"待分配列表"
,
columns
:[
new
$
.
common
.
formatterCol
(
columns
)],
pagination
:
false
,
allowAdd
:
false
,
singleSelect
:
true
,
rownumbers
:
true
,
});
$fieldViewRight
.
datagrid
({
title
:
"出库列表"
,
columns
:[
new
$
.
common
.
formatterCol
(
columnsRight
)],
pagination
:
false
,
allowAdd
:
false
,
singleSelect
:
true
,
fitColumns
:
true
,
rownumbers
:
true
,
});
/* var parameter = $('#hzgdylrkTable').datagrid('getSelected');
if($div.closest("form").attr("tag")!="add"&¶meter){
HTTP.post("kmes/hzylrkdj/query/detail",{mid:parameter['id']},function (res) {
if(res["success"]){$fieldView.datagrid("loadData",res['data']["records"]);}
})
}
$("#rkdj_contine").iMenubutton({
text:"保存并继续",
iconCls:"fa fa-check",
btnCls:"gui-btn-continue",
onClick:function () {
holderAdd($div.parent().dialog("options"),$div.parent(),"add","next",function () {
$fieldView.datagrid("loadData",[]);
snids=[];
})
}
});*/
});
</script>
gavel/src/main/resources/templates/views/kmes/wollck/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzWolldj"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'hzWolldjTable',herf:'kzzx/gridset/query'"
>
</table>
<div
id=
"hzWolldjTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'hzWolldjTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
style=
"display: none"
></a>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-review toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar"
id=
"addWollckBtn"
href=
"javascript:void(0)"
></a>
<!-- <a class="toolbar-edit toolbar" href="javascript:void(0)"></a>-->
<a
class=
"toolbar-delete toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
日期:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"ywrqb"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"ywrqe"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
仓库:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"ckid"
style=
"width: 100%"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#hzWolldj'
);
var
$datStart
=
$div
.
find
(
'input[name="ywrqb"]'
);
var
$datEnd
=
$div
.
find
(
'input[name="ywrqe"]'
);
var
$cbxCkid
=
$div
.
find
(
'input[name="ckid"]'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
function
pageInit
(){
var
options
=
{
url
:
'kmes/hzwollck'
,
noRequest
:
true
,
columns
:
[[
{
"title"
:
"领料单号"
,
"field"
:
"djid"
,
"width"
:
120
},
{
"title"
:
"领料日期"
,
"field"
:
"ywrq"
,
fieldType
:
'ftDate'
},
{
"title"
:
"仓库"
,
"field"
:
"ckmc"
,
"width"
:
140
},
{
"title"
:
"事务类型"
,
"field"
:
"swlxmc"
,
"width"
:
100
},
{
"title"
:
"领料部门"
,
"field"
:
"bmmc"
,
"width"
:
140
},
{
"title"
:
"经手人"
,
"field"
:
"jsr"
,
"width"
:
140
},
{
"title"
:
"保管员"
,
"field"
:
"bgy"
,
"width"
:
140
},
{
"title"
:
"备注"
,
"field"
:
"bz"
,
"width"
:
220
},
{
"title"
:
"维护人"
,
"field"
:
"whr"
},
{
"title"
:
"维护时间"
,
"field"
:
"whsj"
,
fieldType
:
'ftDateTime'
}
]],
dialog
:
{
width
:
1180
,
height
:
630
,
href
:
'kmes/hzwollck/show'
,
footerIn
:
true
}
};
$div
.
Holder
(
options
);
$cbxCkid
.
iCombobox
({
valueField
:
'id'
,
textField
:
'name'
,
allowNull
:
true
});
//日期框初始化
$datStart
.
iDatebox
();
$datEnd
.
iDatebox
();
$
(
"#addWollckBtn"
).
iMenubutton
({
text
:
'新增'
,
dialog
:{
width
:
1180
,
height
:
630
,
href
:
'kmes/hzwollck/edit'
,
footerIn
:
true
,
tag
:
"add"
,
onSaveCallback
:
function
(
opt
,
data
)
{
appendRowHolder
(
$div
.
find
(
".toolbar-table"
),{
url
:
"kmes/hzwollck/query"
,
data
:
data
});
}
}
})
}
/*数据初始化*/
function
dataInit
(
ops
){
gas
.
postHTTP
(
'jcsj/common/ck/queryCkid'
,{},
function
(
res
)
{
$cbxCkid
.
iCombobox
(
"loadData"
,
res
.
data
.
records
)
},
ops
);
gas
.
postHTTP
(
"common/datetime"
,{},
function
(
response1
)
{
var
date
=
DateUtils
.
getDate
(
response1
.
data
.
data
);
$datStart
.
iDatebox
({
value
:
DateUtils
.
beginOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
)});
$datEnd
.
iDatebox
({
value
:
DateUtils
.
endOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
)});
},
ops
);
}
function
run
(
res
){
$datagrid
.
datagrid
(
"options"
).
url
=
"wo/wolldj/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
gas
.
load
(
pageInit
,
dataInit
,
run
);
});
</script>
gavel/src/main/resources/templates/views/kmes/wollck/show.html
deleted
100644 → 0
View file @
070ba420
<div
class=
"e-dialog-container"
id=
"hzWolldjShow"
data-options=
"width:1120,height: 630"
>
<div
class=
"e-dialog-body"
>
<div
class=
"e-dialog-box"
>
<h4>
原料领用登记
</h4>
<div
class=
"gui-fluid editTable"
>
<input
type=
"hidden"
name=
"id"
>
<input
type=
"hidden"
name=
"lydjid"
>
<input
type=
"hidden"
name=
"flag"
>
<input
type=
"hidden"
name=
"sysversion"
>
<input
type=
"hidden"
name=
"djly"
value=
"M"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
出库单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"djid"
data-options=
"required:false"
data-toggle=
"gui-textbox"
style=
"width: 100%"
/>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
领料日期:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"ywrq"
data-options=
"required:true"
data-toggle=
"gui-datebox"
style=
"width: 100%"
/>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
仓库:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"ckid"
data-options=
"required:true"
data-toggle=
"gui-combobox"
style=
"width: 100%"
/>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
事务类型:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"swlxid"
data-options=
"required:true"
data-toggle=
"gui-combobox"
style=
"width: 100%"
/>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
领料部门:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bmid"
data-options=
"required:false"
data-toggle=
"gui-combobox"
style=
"width: 100%"
/>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
经手人:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"jsr"
data-options=
"required:true"
data-toggle=
"gui-textbox"
style=
"width: 100%"
/>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
保管员:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bgy"
data-options=
"required:false"
data-toggle=
"gui-textbox"
style=
"width: 100%"
/>
</div>
</div>
<div
class=
"gui-col-sm8"
>
<label
class=
"gui-form-label"
>
备注:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bz"
data-options=
"multiline:true"
data-toggle=
"gui-textarea"
style=
"width: 100%;height:32px"
/>
</div>
</div>
</div>
</div>
<div
class=
"mx-dataTable"
style=
"margin-top: 190px;bottom: 40px"
>
<div
id=
"bzEditWolldj-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'edatagrid',id:'bzEditWolldj'}"
>
<a
class=
"toolbar choosewoll"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar deletewoll"
href=
"javascript:void(0)"
></a>
</div>
<table
id=
"bzEditWolldj"
style=
"width: 100%;height:100%"
data-options=
"dgid:'KCSW'"
></table>
</div>
<div
class=
"gui-row e-dialog-box-footer"
>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-col-sm8"
style=
"float: right"
>
<label
class=
"gui-form-label"
>
维护人:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"whr"
data-toggle=
"gui-textbox"
readonly
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-col-sm8"
>
<label
class=
"gui-form-label"
>
维护时间:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"whsj"
data-toggle=
"gui-datetimebox"
readonly
style=
"width: 100%"
>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#hzWolldjShow'
);
var
$datagrid
=
$
(
'#bzEditWolldj'
);
var
$cbxCkid
=
$div
.
find
(
'input[name="ckid"]'
);
var
$cbxBmid
=
$div
.
find
(
'input[name="bmid"]'
);
var
$cbxSwlxid
=
$div
.
find
(
'input[name="swlxid"]'
);
var
$datYwrq
=
$div
.
find
(
'input[name="ywrq"]'
);
var
$datWhsj
=
$div
.
find
(
'input[name="whsj"]'
);
var
$edtWhr
=
$div
.
find
(
'input[name="whr"]'
);
var
$edtJsr
=
$div
.
find
(
'input[name="jsr"]'
);
var
$edtBgy
=
$div
.
find
(
'input[name="bgy"]'
);
var
$edtId
=
$div
.
find
(
'input[name="id"]'
);
var
$ckkwgl
=
'N'
;
var
$bInit
=
true
;
var
$wlsxColumns
=
[],
$isKwgl
=
false
,
$isPhgl
=
false
,
$isFjldw
=
false
;
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
function
paramInit
(
ops
){
//初始化库位管理
gas
.
post
(
'jcsj/common/isKwgl'
,
{},
function
(
res
){
if
(
res
.
success
){
$isKwgl
=
res
.
data
.
isKwgl
;
}
},
ops
);
//初始化批号管理
gas
.
post
(
'jcsj/common/isPhgl'
,
{},
function
(
res
){
if
(
res
.
success
){
$isPhgl
=
res
.
data
.
isPhgl
;
}
},
ops
);
//初始化批号管理
gas
.
post
(
'jcsj/common/isFjldw'
,
{},
function
(
res
){
if
(
res
.
success
){
$isFjldw
=
res
.
data
.
isFjldw
;
}
},
ops
);
initWlsxColumns
(
$wlsxColumns
,
ops
);
}
function
pageInit
(
ops
)
{
var
columns
=
[
{
title
:
"序号"
,
field
:
"xh"
,
width
:
50
,
allowEdit
:
false
},
{
title
:
"物料ID"
,
field
:
"wlid"
,
hidden
:
true
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
120
,
allowEdit
:
false
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
,
allowEdit
:
false
},
{
title
:
"规格"
,
field
:
"wlxxGg"
,
width
:
120
,
allowEdit
:
false
},
{
title
:
"出库数量"
,
field
:
"cksl"
,
fieldType
:
'float'
},
{
title
:
"计量单位ID"
,
field
:
"jldw"
,
"hidden"
:
true
},
{
title
:
"计量单位"
,
field
:
"jldwname"
,
width
:
80
,
allowEdit
:
false
},
{
title
:
"辅出库数量"
,
field
:
"fcksl"
,
fieldType
:
'float'
,
hidden
:
!
$isFjldw
},
{
title
:
"辅计量单位ID"
,
field
:
"fjldw"
,
"hidden"
:
true
},
{
title
:
"辅计量单位"
,
field
:
"fjldwname"
,
width
:
80
,
allowEdit
:
false
,
hidden
:
!
$isFjldw
},
{
title
:
"库位"
,
field
:
"kwid"
,
"hidden"
:
true
},
{
title
:
"库位"
,
field
:
"kwmc"
,
width
:
140
,
allowEdit
:
false
,
hidden
:
!
$isKwgl
,
formatter
:
function
(
value
,
row
,
index
)
{
if
(
!
value
)
value
=
''
;
if
(
$ckkwgl
==
"Y"
){
return
"<span class='kwid'>"
+
value
+
"</span><a class='choose-locator' href='javascript:void(0)' onclick='chooseLocator(this,"
+
index
+
")'>...</a>"
;
}
else
{
return
value
}
}},
{
title
:
"物料批号"
,
field
:
"wlph"
,
width
:
140
,
hidden
:
!
$isPhgl
},
{
title
:
"备注"
,
field
:
"bz"
,
width
:
224
}
].
concat
(
$wlsxColumns
);
$datagrid
.
DataTableEditing
({
columns
:
[
new
$
.
common
.
formatterCol
(
columns
)],
pagination
:
false
,
allowAdd
:
false
,
allowEdit
:
true
,
onBeginEdit
:
doBeginEdit
});
$cbxCkid
.
iCombobox
({
valueField
:
'id'
,
textField
:
'name'
,
onSelect
:
ckOnSelect
});
$cbxSwlxid
.
iCombobox
({
valueField
:
'id'
,
textField
:
'name'
});
$cbxBmid
.
iCombobox
({
valueField
:
'id'
,
textField
:
'bmmc'
});
}
function
dataInit
(
ops
){
gas
.
post
(
'jcsj/common/ck/queryCkid'
,
{},
function
(
res
){
if
(
res
.
success
&&
res
.
data
.
records
){
$cbxCkid
.
iCombobox
(
'loadData'
,
res
.
data
.
records
);
}
},
ops
);
gas
.
post
(
'jcsj/common/bm/queryZzbm'
,
{},
function
(
res
){
if
(
res
.
success
&&
res
.
data
.
records
){
$cbxBmid
.
iCombobox
(
'loadData'
,
res
.
data
.
records
);
}
},
ops
);
gas
.
post
(
'wo/woll/init/swlx'
,
{},
function
(
res
){
if
(
res
.
success
&&
res
.
data
.
records
){
$cbxSwlxid
.
iCombobox
(
'loadData'
,
res
.
data
.
records
);
}
},
ops
);
if
(
$div
.
closest
(
"form"
).
attr
(
"tag"
)
==
"add"
){
gas
.
post
(
"common/datetime"
,{},
function
(
result
)
{
if
(
result
[
'success'
]
&&
result
[
'data'
][
'data'
]){
var
date
=
new
Date
(
result
[
'data'
][
'data'
]);
$datYwrq
.
iDatebox
({
value
:
DateUtils
.
format
(
date
)});
$datWhsj
.
iDatetimebox
({
value
:
DateUtils
.
formatTime
(
date
)});
}
},
ops
);
$edtWhr
.
textbox
(
"setValue"
,
window
.
sessionStorage
.
getItem
(
'userName'
));
$edtJsr
.
textbox
(
'setValue'
,
window
.
sessionStorage
.
getItem
(
"userName"
));
$bInit
=
false
;
//新增初始化参数
}
}
function
run
(){
loadListDatagrid
(
$datagrid
,{
url
:
"wo/wolldj/query/detail"
,
params
:{
mid
:
$edtId
.
val
()}},
$div
);
$bInit
=
false
;
}
$
(
"#bzEditWolldj-toolbar"
).
find
(
".deletewoll"
).
iMenubutton
({
text
:
"删除"
,
iconCls
:
"fa fa-trash"
,
onClick
:
function
()
{
var
index
=
$datagrid
.
datagrid
(
"getRowIndex"
,
$datagrid
.
datagrid
(
"getSelected"
));
$datagrid
.
datagrid
(
"deleteRow"
,
index
);
$
.
each
(
$datagrid
.
datagrid
(
"getRows"
),
function
(
i
,
item
)
{
$datagrid
.
datagrid
(
"updateRow"
,{
index
:
i
,
row
:{
xh
:
i
+
1
}
})
})
}
});
$
(
"#bzEditWolldj-toolbar"
).
find
(
".choosewoll"
).
iMenubutton
({
text
:
"选择生产领料单"
,
iconCls
:
"fa fa-plus"
,
onClick
:
function
(){
woll
(
$datagrid
);
}
});
function
doBeginEdit
(
rowIndex
,
rowData
)
{
var
editors
=
$datagrid
.
datagrid
(
'getEditors'
,
rowIndex
);
var
lendEditor
=
[];
var
loadEditor
=
[];
$
.
each
(
editors
,
function
(
i
,
editor
)
{
if
(
editor
.
field
&&
editor
.
field
==
"cksl"
)
lendEditor
=
editor
;
if
(
editor
.
field
&&
editor
.
field
==
"fcksl"
)
loadEditor
=
editor
;
});
if
(
!
rowData
[
"fjldw"
]
||
rowData
[
"fjldw"
]
==
""
){
$
(
loadEditor
.
target
).
next
().
find
(
"input"
).
attr
(
"disabled"
,
true
);
$
(
$
(
loadEditor
.
target
).
next
().
find
(
"input"
)[
0
]).
val
(
""
)
}
else
{
lendEditor
.
target
[
lendEditor
.
type
]({
inputEvents
:
$
.
extend
({},
$
.
fn
.
textbox
.
defaults
.
inputEvents
,
{
keyup
:
function
(
event
)
{
rowData
[
"sl"
]
=
$
(
this
).
val
();
var
param
=
$
.
extend
({},
rowData
,
{
id
:
rowData
[
"wlid"
]});
if
(
$
(
this
).
val
()
==
''
)
{
rowData
[
"sl"
]
=
0
}
HTTP
.
post
(
"jcsj/wlxx/changeJldw"
,
param
,
function
(
res
)
{
if
(
res
[
"success"
])
{
loadEditor
.
target
.
numberbox
(
"setValue"
,
res
[
"data"
][
"records"
][
"hssl"
])
}
else
{
//$.messager.alert("提示",res["message"]||"计算错误")
}
});
}
})
});
loadEditor
.
target
.
numberbox
({
inputEvents
:
$
.
extend
({},
$
.
fn
.
textbox
.
defaults
.
inputEvents
,
{
keyup
:
function
(
event
)
{
rowData
[
"hssl"
]
=
$
(
this
).
val
();
var
param
=
$
.
extend
({},
rowData
,
{
id
:
rowData
[
"wlid"
]});
if
(
$
(
this
).
val
()
==
''
)
{
rowData
[
"hssl"
]
=
0
}
HTTP
.
post
(
"jcsj/wlxx/changeFjldw"
,
param
,
function
(
res
)
{
if
(
res
[
"success"
])
{
lendEditor
.
target
.
numberbox
(
"setValue"
,
res
[
"data"
][
"records"
][
"sl"
])
}
else
{
//$.messager.alert("提示",res["message"]||"计算错误")
}
});
}
})
});
}
}
function
ckOnSelect
(
data
)
{
$ckkwgl
=
data
[
"kwgl"
];
$ckkwgl
=
data
[
"kwgl"
];
if
(
$bInit
)
{
}
else
{
if
(
data
){
$edtBgy
.
textbox
(
"setValue"
,
data
[
"bgy"
]
||
''
);
}
else
{
$edtBgy
.
textbox
(
"setValue"
,
""
);
}
}
$datagrid
.
edatagrid
(
'acceptChanges'
);
var
rows
=
$datagrid
.
edatagrid
(
'getRows'
);
$
.
each
(
rows
,
function
(
i
,
item
)
{
$datagrid
.
datagrid
(
"updateRow"
,
{
index
:
i
,
row
:
{
kwid
:
''
,
kwmc
:
''
}});
});
if
(
data
[
"kwgl"
])
{
$datagrid
.
datagrid
(
"loadData"
,
rows
);
}
}
});
function
woll
(
$datagrid
)
{
var
$form
=
$
(
'#hzWolldjShow'
);
var
gather
=
[];
var
gaherIds
=
[];
var
mainTableData
=
{};
$
(
'<div id="woll" style="position:relative"/>'
).
iDialog
({
title
:
'选择生产领料单'
,
width
:
1120
,
height
:
630
,
buttons
:
[{
text
:
'确认'
,
iconCls
:
'fa fa-save'
,
btnCls
:
'gui-btn-save'
,
handler
:
function
()
{
var
$container
=
$
(
'#woll'
);
$datagrid
.
datagrid
(
"loadData"
,[]);
if
(
$container
.
form
(
'validate'
))
{
var
detailView
=
$container
.
find
(
".right-table"
);
var
eaRows
=
detailView
.
datagrid
(
'getRows'
);
$
.
each
(
eaRows
,
function
(
index
,
item
)
{
detailView
.
datagrid
(
'endEdit'
,
index
);
});
var
data
=
$container
.
find
(
".main-table"
).
datagrid
(
"getSelected"
);
$form
.
find
(
'input[name="ckid"]'
).
parent
().
prev
().
iTextbox
(
'setValue'
,
data
[
'ckid'
]);
$form
.
find
(
'input[name="ckid"]'
).
parent
().
prev
().
iTextbox
(
'setText'
,
data
[
'ckName'
]);
$form
.
find
(
'input[name="bmid"]'
).
parent
().
prev
().
iTextbox
(
'setValue'
,
data
[
'bmid'
]);
$form
.
find
(
'input[name="bmid"]'
).
parent
().
prev
().
iTextbox
(
'setText'
,
data
[
'bmName'
]);
$form
.
find
(
'input[name="swlxid"]'
).
parent
().
prev
().
iTextbox
(
'setValue'
,
data
[
'swlxid'
]);
$form
.
find
(
'input[name="swlxid"]'
).
parent
().
prev
().
iTextbox
(
'setText'
,
data
[
'swlxName'
]);
$form
.
find
(
'input[name="lydjid"]'
).
val
(
data
[
'id'
]);
$form
.
find
(
'input[name="djly"]'
).
val
(
'WOLL'
);
var
xh
=
$datagrid
.
datagrid
(
"getRows"
).
length
;
var
details
=
gather
||
[];
$
.
each
(
details
,
function
(
i
,
row
)
{
row
[
"flag"
]
=
'I'
;
row
[
"xh"
]
=
xh
+
1
;
row
[
"lydjid"
]
=
row
[
"id"
];
row
[
"wlxxCode"
]
=
row
[
"wlcode"
]
||
row
[
"wlxxCode"
];
row
[
"wlxxName"
]
=
row
[
"wlmc"
]
||
row
[
"wlxxName"
];
row
[
"wlxxGg"
]
=
row
[
"wlxxGg"
];
delete
row
[
"id"
];
$datagrid
.
datagrid
(
'appendRow'
,
row
);
xh
=
xh
+
1
;
$form
.
find
(
'input[textboxname="ckid"]'
).
iCombobox
(
'disable'
);
$form
.
find
(
'input[textboxname="bmid"]'
).
iCombobox
(
'disable'
);
});
$container
.
iDialog
(
'destroy'
);
}
}
},{
text
:
'取消'
,
iconCls
:
"fa fa-close"
,
btnCls
:
"gui-btn-danger"
,
handler
:
function
()
{
$
(
'#woll'
).
iDialog
(
'destroy'
);
}
}],
onOpen
:
function
()
{
var
$container
=
$
(
"#woll"
);
$container
.
find
(
".gui-tabs"
).
iTabs
({
onSelect
:
function
(
title
,
index
)
{
if
(
index
==
0
){
$container
.
next
().
find
(
"a.gui-btn-save"
).
hide
();
return
false
;
}
else
{
$container
.
next
().
find
(
"a.gui-btn-save"
).
show
();
}
mainTableData
=
$container
.
find
(
".main-table"
).
datagrid
(
"getSelected"
);
rightTable
.
find
(
".top-table"
).
datagrid
(
"options"
).
url
=
"wo/wolldj/queryWollmx"
;
if
(
$fieldView
.
datagrid
(
"getChecked"
)
&&
$fieldView
.
datagrid
(
"getChecked"
).
length
>
0
){
rightTable
.
find
(
".top-table"
).
datagrid
(
"load"
,{
mid
:
$fieldView
.
datagrid
(
"getChecked"
)[
0
][
"id"
]
||
''
});
}
}
});
$container
.
find
(
'input[name="djid"]'
).
textbox
();
var
$fieldView
=
$
(
"<div class='main-table' style='width: 100%; 100%'/>"
).
appendTo
(
$container
.
find
(
".detail-view"
));
var
columns
=
[
{
"field"
:
"ck"
,
checkbox
:
true
},
{
"title"
:
"领料单号"
,
"field"
:
"djid"
,
"width"
:
140
},
{
"title"
:
"事务类型"
,
"field"
:
"swlxName"
,
"width"
:
100
},
{
"title"
:
"仓库名称"
,
"field"
:
"ckName"
,
"width"
:
140
},
{
"title"
:
"领料日期"
,
"field"
:
"ywrq"
,
"width"
:
120
,
"fieldType"
:
'ftDate'
,
formatter
:
function
(
value
)
{
if
(
value
==
undefined
||
value
==
''
){
return
""
;
}
var
date
=
new
Date
(
parseInt
(
value
));
if
(
isNaN
(
date
)
){
return
""
}
return
date
.
Format
(
"yyyy-MM-dd"
);
}},
{
"title"
:
"领料人"
,
"field"
:
"llr"
,
"width"
:
140
},
{
"title"
:
"领料部门"
,
"field"
:
"bmName"
,
"width"
:
140
},
{
"title"
:
"备注"
,
"field"
:
"bz"
,
"width"
:
240
}
];
$fieldView
.
datagrid
(
{
pagination
:
false
,
rownumbers
:
true
,
singleSelect
:
true
,
columns
:[
new
$
.
common
.
formatterCol
(
columns
)],
height
:
'100%'
,
onDblClickRow
:
function
()
{
$container
.
find
(
".gui-tabs"
).
tabs
(
"select"
,
1
);
}
});
wollTavel
();
$container
.
find
(
'.search-datagrid'
).
unbind
().
bind
(
'click'
,
function
()
{
wollTavel
();});
/*通知单明细*/
var
rightTable
=
$container
.
find
(
".tzdmx"
);
var
cols1
=
[
{
field
:
""
,
checkbox
:
true
},
{
title
:
"序号"
,
field
:
"xh"
,
width
:
60
,
halign
:
"center"
},
{
title
:
"入库单号"
,
field
:
"djid"
,
width
:
140
,
halign
:
"center"
,
hidden
:
true
},
{
title
:
"物料编码"
,
field
:
"wlid"
,
width
:
140
,
halign
:
"center"
,
hidden
:
true
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
140
,
halign
:
"center"
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
,
halign
:
"center"
},
{
title
:
"规格"
,
field
:
"wlxxGg"
,
width
:
120
,
halign
:
"center"
},
{
title
:
"库位"
,
field
:
"kwid"
,
width
:
120
,
halign
:
"center"
,
hidden
:
true
},
{
title
:
"库位"
,
field
:
"kwmc"
,
width
:
120
,
halign
:
"center"
},
{
title
:
"物料批号"
,
field
:
"wlph"
,
width
:
140
,
halign
:
"center"
},
//{title: "应发数量",field: "llsl", width: 80,halign:"center",align:"right"},
//{title: "已出库数量",field: "ycksl", width: 80,halign:"center",align:"right"},
{
title
:
"应发数量"
,
field
:
"cksl"
,
width
:
100
,
halign
:
"center"
,
align
:
"right"
},
{
title
:
"辅应发数量"
,
field
:
"fcksl"
,
width
:
80
,
halign
:
"center"
,
align
:
"right"
,
hidden
:
true
},
{
title
:
"已分配数量"
,
field
:
"yff"
,
width
:
80
,
halign
:
"center"
,
align
:
'right'
},
{
title
:
"本次分配数量"
,
field
:
"wff"
,
width
:
100
,
halign
:
"center"
,
align
:
"right"
}
];
rightTable
.
find
(
".top-table"
).
datagrid
({
columns
:[
cols1
],
onCheck
:
function
(
rowIndex
,
rowData
)
{
var
selectedRow
=
$container
.
find
(
".main-table"
).
datagrid
(
"getSelected"
);
HTTP
.
post
(
"kc/kchz/queryKchz"
,{
ckid
:
selectedRow
[
"ckid"
]
||
''
,
wlid
:
rowData
[
"wlid"
]
||
""
,
wlph
:
rowData
[
"wlph"
]
||
''
},
function
(
res
)
{
if
(
res
[
"success"
]){
if
(
res
.
data
.
total
==
0
){
rightTable
.
find
(
".left-table"
).
datagrid
(
"loadData"
,[
$
.
extend
({},
rowData
,{
kcsl
:
0
,
yy
:
0
,
ky
:
0
})]);
}
else
{
rightTable
.
find
(
".left-table"
).
datagrid
(
"loadData"
,
res
[
"data"
][
"records"
]);
}
}
},
null
,
false
);
rightTable
.
find
(
".right-table"
).
edatagrid
(
"loadData"
,[]);
if
(
gather
){
$
.
each
(
gather
,
function
(
i
,
item
)
{
if
(
item
[
"id"
]
==
rowData
[
"id"
]){
rightTable
.
find
(
".right-table"
).
datagrid
(
"appendRow"
,
item
);
}
});
$
.
each
(
rightTable
.
find
(
".left-table"
).
datagrid
(
"getRows"
),
function
(
i
,
item
)
{
var
yy
=
0
;
$
.
each
(
gather
,
function
(
j
,
s
)
{
if
(
item
[
"wlid"
]
==
s
[
"wlid"
]
&&
item
[
"kwid"
]
==
s
[
"kwid"
]
&&
item
[
"wlph"
]
==
s
[
"wlph"
]){
yy
+=
floatValue
(
s
[
"cksl"
]);
}
});
var
kyValue
=
0
;
if
(
floatValue
(
item
[
"kcsl"
])
-
yy
>=
0
){
kyValue
=
floatValue
(
item
[
"kcsl"
])
-
yy
}
rightTable
.
find
(
".left-table"
).
datagrid
(
"updateRow"
,{
index
:
i
,
row
:{
yy
:
yy
,
ky
:
kyValue
}
})
})
}
},
singleSelect
:
true
,
pagination
:
true
,
onLoadSuccess
:
function
(
rowData
)
{
var
selectedRow
=
$container
.
find
(
".main-table"
).
datagrid
(
"getSelected"
);
var
operate
=
true
;
if
(
rowData
&&
rowData
.
total
>
0
){
$
.
each
(
rowData
.
rows
,
function
(
i
,
item
)
{
var
rightData
=
[];
rightTable
.
find
(
".top-table"
).
datagrid
(
"updateRow"
,{
index
:
i
,
row
:{
yff
:
item
[
"cksl"
]
||
0
,
wff
:
0
}
});
if
(
gaherIds
.
indexOf
(
item
[
"id"
])
>-
1
){
operate
=
false
;
}
if
(
operate
){
HTTP
.
post
(
"kc/kchz/queryKchz"
,{
ckid
:
selectedRow
[
"ckid"
]
||
''
,
wlid
:
item
[
"wlid"
]
||
""
,
wlph
:
item
[
"wlph"
]
||
''
},
function
(
res
)
{
if
(
res
[
"success"
]){
var
list
=
res
[
"data"
][
"records"
];
if
(
list
.
length
==
0
){
list
=
[
$
.
extend
({},
item
,{
"kcsl"
:
item
[
"cksl"
]})];
}
var
b
=
item
[
"cksl"
]
||
0
;
var
a
=
0
;
$
.
each
(
gather
,
function
(
i
,
item
)
{
$
.
each
(
list
,
function
(
j
,
s
)
{
if
(
item
[
"wlid"
]
==
s
[
"wlid"
]
&&
item
[
"kwid"
]
==
s
[
"kwid"
]
&&
item
[
"wlph"
]
==
s
[
"wlph"
]){
list
[
j
][
'kcsl'
]
=
list
[
j
][
'kcsl'
]
-
item
[
"cksl"
]
}
})
});
$
.
each
(
list
,
function
(
s
,
st
)
{
if
(
st
[
"kcsl"
]
>
0
){
a
+=
st
[
"kcsl"
];
rightData
.
push
(
$
.
extend
({},
st
,{
cksl
:
st
[
"kcsl"
],
id
:
item
[
"id"
]}));
if
(
floatValue
(
a
)
>=
b
){
rightData
[
s
][
"cksl"
]
=
st
[
"kcsl"
]
-
(
a
-
b
);
return
false
;
}
}
});
if
(
a
<
b
){
var
flag
=
true
;
$
.
each
(
rightData
,
function
(
m
,
r
)
{
if
((
item
[
"phgl"
]
==
'Y'
&&
item
[
"wlph"
]
==
r
[
"wlph"
])
||
item
[
"phgl"
]
==
"N"
){
flag
=
false
;
rightData
[
m
][
"cksl"
]
+=
(
b
-
a
);
return
false
;
}
});
if
(
flag
)
rightData
.
push
({
cksl
:
b
-
a
,
id
:
item
[
"id"
],
wlph
:
item
[
"wlph"
],
wlid
:
item
[
"wlid"
],
wlxxCode
:
item
[
"wlxxCode"
]
||
''
,
wlxxName
:
item
[
"wlxxName"
]
||
''
,
wlxxGg
:
item
[
"wlxxGg"
]
||
''
})
}
$
.
each
(
rightData
,
function
(
n
,
nt
)
{
if
(
nt
.
cksl
!=
0
){
gather
.
push
(
nt
);
gaherIds
.
push
(
nt
[
"id"
]);
$
.
unique
(
gaherIds
);
}
});
rightTable
.
find
(
".right-table"
).
data
(
"data"
,
gather
);
}
},
null
,
false
);
}
});
}
}
});
var
cols2
=
[
{
title
:
"id"
,
field
:
"id"
,
width
:
140
,
halign
:
"center"
,
hidden
:
true
},
{
title
:
"库位"
,
field
:
"kwid"
,
width
:
120
,
halign
:
"center"
,
hidden
:
true
},
{
title
:
"库位"
,
field
:
"kwmc"
,
width
:
140
,
halign
:
"center"
},
{
title
:
"物料批号"
,
field
:
"wlph"
,
width
:
140
,
halign
:
"center"
},
{
title
:
"库存数量"
,
field
:
"kcsl"
,
width
:
80
,
halign
:
"center"
,
align
:
"right"
},
{
title
:
"辅库存数量"
,
field
:
"fkcsl"
,
width
:
80
,
halign
:
"center"
,
align
:
"right"
,
hidden
:
true
},
{
title
:
"已用数量"
,
field
:
"yy"
,
width
:
80
,
halign
:
"center"
,
align
:
"right"
,
fieldType
:
"float"
},
{
title
:
"可用数量"
,
field
:
"ky"
,
width
:
80
,
halign
:
"center"
,
align
:
"right"
,
fieldType
:
"float"
},
{
title
:
"入库日期"
,
field
:
"rkrq"
,
width
:
120
,
halign
:
"center"
,
fieldType
:
"ftDate"
},
{
title
:
"仓库编码"
,
field
:
"ckid"
,
width
:
100
,
halign
:
"center"
,
hidden
:
true
},
{
title
:
"物料编码"
,
field
:
"wlid"
,
width
:
140
,
halign
:
"center"
,
hidden
:
true
},
{
title
:
"物料编码"
,
field
:
"wlcode"
,
width
:
140
,
halign
:
"center"
,
hidden
:
true
},
{
title
:
"物料名称"
,
field
:
"wlmc"
,
width
:
140
,
halign
:
"center"
,
hidden
:
true
},
{
title
:
"计量单位"
,
field
:
"jldw"
,
width
:
100
,
halign
:
"center"
,
hidden
:
true
},
{
title
:
"辅计量单位"
,
field
:
"fjldw"
,
width
:
100
,
halign
:
"center"
,
hidden
:
true
},
{
title
:
"规格"
,
field
:
"gg"
,
width
:
120
,
"hidden"
:
true
}
];
rightTable
.
find
(
".left-table"
).
datagrid
({
title
:
"库存明细"
,
idField
:
"id"
,
singleSelect
:
true
,
columns
:[
new
$
.
common
.
formatterCol
(
cols2
)],
onDblClickRow
:
function
(
rowIndex
,
rowData
)
{
var
right
=
rightTable
.
find
(
".right-table"
);
var
left
=
rightTable
.
find
(
".left-table"
);
var
top
=
rightTable
.
find
(
".top-table"
);
var
rightRow
=
rightTable
.
find
(
".right-table"
).
datagrid
(
"getRows"
);
var
flag
=
true
;
$
.
each
(
rightRow
,
function
(
i
,
item
)
{
if
(
item
[
"kwid"
]
==
rowData
[
"kwid"
]
&&
item
[
"wlph"
]
==
rowData
[
"wlph"
]
&&
item
[
"wlid"
]
==
rowData
[
"wlid"
]){
flag
=
false
;
}
});
if
(
!
flag
)
return
false
;
var
checkRow
=
rightTable
.
find
(
".top-table"
).
datagrid
(
"getSelected"
);
var
index
=
rightTable
.
find
(
".top-table"
).
datagrid
(
"getRowIndex"
,
checkRow
);
var
ky
=
rowData
[
"ky"
];
var
txz
=
0
;
if
(
floatValue
(
ky
)
<=
floatValue
(
checkRow
[
"wff"
])){
txz
=
floatValue
(
ky
);
}
else
{
txz
=
floatValue
(
checkRow
[
"wff"
]);
}
var
rightData
=
$
.
extend
({},
rowData
,{
cksl
:
txz
,
id
:
checkRow
[
"id"
],
total
:
rowData
[
"kcsl"
]});
right
.
datagrid
(
"appendRow"
,
rightData
);
var
kyValue
=
0
;
if
(
floatValue
(
rowData
[
"ky"
])
-
txz
>=
0
){
kyValue
=
floatValue
(
rowData
[
"ky"
])
-
txz
}
left
.
datagrid
(
"updateRow"
,{
index
:
rowIndex
,
row
:{
yy
:
txz
,
ky
:
kyValue
}
});
gather
.
push
(
$
.
extend
({},
rightData
,{
kwid
:
rowData
[
"kwid"
],
wlph
:
rowData
[
"wlph"
]}));
var
yff_Z
=
0
;
$
.
each
(
gather
,
function
(
i
,
item
)
{
if
(
item
[
"id"
]
==
checkRow
[
"id"
]){
yff_Z
+=
floatValue
(
item
[
"cksl"
])
}
});
top
.
datagrid
(
"updateRow"
,{
index
:
index
,
row
:{
yff
:
yff_Z
,
wff
:
checkRow
[
"cksl"
]
-
yff_Z
}
});
rightTable
.
find
(
".right-table"
).
data
(
"data"
,
gather
);
},
onLoadSuccess
:
function
(
rowData
)
{
$
.
each
(
rowData
.
rows
,
function
(
i
,
item
)
{
rightTable
.
find
(
".left-table"
).
datagrid
(
"updateRow"
,{
index
:
i
,
row
:{
ky
:
item
[
"kcsl"
]
||
0
}
})
})
}
});
var
cols3
=
[
{
title
:
"id"
,
field
:
"id"
,
width
:
80
,
"hidden"
:
true
},
{
title
:
"序号"
,
field
:
"xh"
,
width
:
80
,
"hidden"
:
true
},
{
title
:
"库位"
,
field
:
"kwid"
,
width
:
200
,
"hidden"
:
true
},
{
title
:
"库位"
,
field
:
"kwmc"
,
width
:
140
,
formatter
:
function
(
value
,
row
,
index
)
{
if
(
!
value
)
value
=
''
;
if
(
mainTableData
[
"kwgl"
]
&&
mainTableData
[
"kwgl"
]
==
"Y"
){
var
ckid
=
mainTableData
[
"ckid"
];
return
"<span class='kwid'>"
+
value
+
"</span><a class='choose-locator' href='javascript:void(0)' onclick='chooseLocator3(
\"
"
+
index
+
"
\"
,
\"
"
+
ckid
+
"
\"
,
\"
"
+
value
+
"
\"
)'>...</a>"
;
}
else
{
return
value
}
}},
{
title
:
"物料批号"
,
field
:
"wlph"
,
width
:
140
},
{
title
:
"出库数量"
,
field
:
"cksl"
,
width
:
80
,
"align"
:
'right'
,
editor
:{
type
:
'numberbox'
,
options
:{
precision
:
3
,
min
:
0
}},
fieldType
:
"float"
},
{
title
:
"辅出库数量"
,
field
:
"fcksl"
,
width
:
80
,
"align"
:
'right'
,
hidden
:
true
},
{
title
:
"可输出总量"
,
field
:
"total"
,
width
:
80
,
align
:
"right"
,
hidden
:
true
},
{
title
:
"物料编码"
,
field
:
"wlid"
,
width
:
140
,
"hidden"
:
true
},
{
title
:
"物料编码"
,
field
:
"wlcode"
,
width
:
140
,
"hidden"
:
true
},
{
title
:
"物料名称"
,
field
:
"wlmc"
,
width
:
160
,
"hidden"
:
true
},
{
title
:
"规格"
,
field
:
"gg"
,
width
:
120
,
"hidden"
:
true
},
{
title
:
"计量单位"
,
field
:
"jldw"
,
width
:
80
,
"align"
:
'center'
,
"hidden"
:
true
},
{
title
:
"辅计量单位"
,
field
:
"fjldw"
,
width
:
80
,
"align"
:
'center'
,
"hidden"
:
true
}
];
rightTable
.
find
(
".right-table"
).
edatagrid
({
toolbar
:[{
text
:
"删除"
,
iconCls
:
"fa fa-trash"
,
handler
:
function
()
{
var
rowData
=
rightTable
.
find
(
".right-table"
).
datagrid
(
"getSelected"
);
var
index
=
rightTable
.
find
(
".right-table"
).
datagrid
(
"getRowIndex"
,
rowData
);
var
yff
=
0
;
$
.
each
(
gather
,
function
(
i
,
item
)
{
if
(
item
){
if
(
item
.
id
==
rowData
[
"id"
]){
if
(
item
[
"wlid"
]
==
rowData
[
"wlid"
]
&&
item
[
"kwid"
]
==
rowData
[
"kwid"
]
&&
item
[
"wlph"
]
==
rowData
[
"wlph"
]){
gather
.
splice
(
i
,
1
);
}
else
{
yff
+=
floatValue
(
gather
[
i
].
cksl
);
}
}
}
});
var
selectRowIndex
=
rightTable
.
find
(
".top-table"
).
datagrid
(
"getRowIndex"
,
rightTable
.
find
(
".top-table"
).
datagrid
(
"getSelected"
));
rightTable
.
find
(
".top-table"
).
datagrid
(
"updateRow"
,{
index
:
selectRowIndex
,
row
:{
wff
:
floatValue
(
rightTable
.
find
(
".top-table"
).
datagrid
(
"getSelected"
).
cksl
)
-
yff
,
yff
:
yff
}});
if
(
gather
){
$
.
each
(
rightTable
.
find
(
".left-table"
).
datagrid
(
"getRows"
),
function
(
i
,
item
)
{
var
yy
=
0
;
$
.
each
(
gather
,
function
(
j
,
s
)
{
if
(
item
[
"wlid"
]
==
s
[
"wlid"
]
&&
item
[
"kwid"
]
==
s
[
"kwid"
]
&&
item
[
"wlph"
]
==
s
[
"wlph"
]){
yy
+=
floatValue
(
s
[
"cksl"
]);
}
});
if
(
yy
!=
0
){
var
kyValue
=
0
;
if
(
floatValue
(
item
[
"kcsl"
])
-
yy
>=
0
){
kyValue
=
floatValue
(
item
[
"kcsl"
])
-
yy
}
rightTable
.
find
(
".left-table"
).
datagrid
(
"updateRow"
,{
index
:
i
,
row
:{
yy
:
yy
,
ky
:
kyValue
}
})
}
})
}
rightTable
.
find
(
".right-table"
).
edatagrid
(
"deleteRow"
,
index
);
rightTable
.
find
(
".right-table"
).
data
(
"data"
,
gather
);
}}],
columns
:[
new
$
.
common
.
formatterCol
(
cols3
)],
onBeginEdit
:
function
(
rowIndex
,
rowData
)
{
var
editors
=
rightTable
.
find
(
".right-table"
).
datagrid
(
'getEditors'
,
rowIndex
);
var
lendEditor
=
editors
[
0
];
lendEditor
.
target
.
numberbox
({
inputEvents
:
$
.
extend
({},
$
.
fn
.
textbox
.
defaults
.
inputEvents
,{
keyup
:
function
(
event
)
{
var
intalValue
=
floatValue
(
rowData
[
"cksl"
]);
var
sjz
=
$
(
this
).
val
();
if
(
$
(
this
).
val
()
==
''
){
$
(
this
).
val
(
0
)}
rowData
[
"cksl"
]
=
floatValue
(
$
(
this
).
val
());
var
yff
=
0
;
$
.
each
(
gather
,
function
(
i
,
item
)
{
if
(
item
[
"id"
]
==
rowData
[
"id"
]){
if
(
item
[
"wlid"
]
==
rowData
[
"wlid"
]
&&
item
[
"kwid"
]
==
rowData
[
"kwid"
]
&&
item
[
"wlph"
]
==
rowData
[
"wlph"
]){
gather
[
i
]
=
$
.
extend
(
item
,{
cksl
:
rowData
[
"cksl"
]})
}
yff
+=
floatValue
(
gather
[
i
][
"cksl"
])
}
});
var
selectRowIndex
=
rightTable
.
find
(
".top-table"
).
datagrid
(
"getRowIndex"
,
rightTable
.
find
(
".top-table"
).
datagrid
(
"getSelected"
));
rightTable
.
find
(
".top-table"
).
datagrid
(
"updateRow"
,{
index
:
selectRowIndex
,
row
:{
wff
:
floatValue
(
rightTable
.
find
(
".top-table"
).
datagrid
(
"getSelected"
).
cksl
)
-
yff
,
yff
:
yff
}});
if
(
gather
){
$
.
each
(
rightTable
.
find
(
".left-table"
).
datagrid
(
"getRows"
),
function
(
i
,
item
)
{
var
yy
=
0
;
$
.
each
(
gather
,
function
(
j
,
s
)
{
if
(
item
[
"wlid"
]
==
s
[
"wlid"
]
&&
item
[
"kwid"
]
==
s
[
"kwid"
]
&&
item
[
"wlph"
]
==
s
[
"wlph"
]){
yy
+=
floatValue
(
s
[
"cksl"
]);
}
});
if
(
yy
!=
0
){
var
kyValue
=
0
;
if
(
floatValue
(
item
[
"kcsl"
])
-
yy
>=
0
){
kyValue
=
floatValue
(
item
[
"kcsl"
])
-
yy
}
rightTable
.
find
(
".left-table"
).
datagrid
(
"updateRow"
,{
index
:
i
,
row
:{
yy
:
yy
,
ky
:
kyValue
}
})
}
})
}
rightTable
.
find
(
".right-table"
).
data
(
"data"
,
gather
);
}
})
});
}
});
function
wollTavel
(){
HTTP
.
post
(
'wo/wolldj/queryWoll'
,{
ckid
:
$form
.
find
(
'input[name="ckid"]'
).
val
(),
djid
:
$container
.
find
(
'input[name="djid"]'
).
val
()
},
function
(
result
)
{
if
(
result
[
'success'
]){
$fieldView
.
datagrid
(
'loadData'
,
result
[
'data'
][
'records'
]);
$fieldView
.
datagrid
(
"selectRow"
,
0
)
}
})
}
},
onClose
:
function
()
{
$
(
this
).
form
(
"clear"
);
$
(
this
).
iDialog
(
'destroy'
);
}
});
var
$div
=
$
(
'<div style="height: 100%;width: 100%;position: relative;overflow: hidden">'
+
'<form style="height:50px;top: 0;width: 100%">'
+
' <div class="gui-row" style="display: inline-block;width:46%">'
+
' <div class="gui-col-sm12">'
+
' <label class="gui-form-label">领料单号:</label>'
+
' <div class="gui-input-block">'
+
' <input type="text" name="djid" style="width: 100%">'
+
' </div>'
+
' </div>'
+
' </div>'
+
' <span class="l-btn-left l-btn-icon-left search-datagrid" style="margin-top: 4px;cursor: pointer">'
+
' <span class="l-btn-text">查询</span><span class="l-btn-icon fa fa-search"> </span>'
+
' </span>'
+
'</form>'
+
'<div style="position: absolute;top: 50px;width: 100%;bottom: 0" class="detail-view"></div></div>'
);
var
$right
=
$
(
'<div class="gui-layout" style="height: 100%;width:100%;position: relative;">'
+
' <div data-options="region:
\'
north
\'
" style="height: 40%;width: 100%;">'
+
' <div class="gui-div" style="width: 100%;height: 100%">'
+
' <table class="top-table" style="width: 100%;height: 100%"></table>'
+
' </div></div>'
+
' <div style="width:100%;height:60%;position: relative;overflow: hidden">'
+
' <div class="gui-div" style="width: 50%;height: 100%;float: left">'
+
' <table class="left-table" style="width: 100%;height: 100%"></table>'
+
' </div>'
+
' <div class="gui-div" style="width: 50%;height: 100%;float: right">'
+
' <table class="right-table" style="width: 100%;height: 100%"></table>'
+
' </div>'
+
' </div>'
+
' </div>'
+
'</div>'
);
var
$pangel
=
$
(
'<div class="gui-tabs" style="width:100%;height:100%;">'
+
' <div title="通知单" class="tzd" style="padding:10px;display:none;">'
+
' </div>'
+
' <div title="通知单明细" class="tzdmx" style="overflow:auto;padding:2px;display:none;">'
+
' </div>'
+
' </div>'
+
'</div>'
);
$pangel
.
find
(
".tzd"
).
append
(
$div
);
$pangel
.
find
(
".tzdmx"
).
append
(
$right
);
$
(
'#woll'
).
html
(
''
);
$
(
'#woll'
).
append
(
$pangel
);
$
(
'#woll'
).
iDialog
(
'open'
);
}
function
chooseLocator
(
event
,
index
)
{
var
element
=
event
;
var
t
=
$
(
'#hzWolldjShow'
),
s
=
$
(
'#bzEditWolldj'
);
chooseMKw
(
s
,
t
,
index
);
}
function
chooseLocator3
(
index
,
t
,
kwid
)
{
var
s
=
$
(
"#woll"
).
find
(
".right-table"
);
chooseMKwCkid
(
s
,
t
,
index
,
function
(
row
)
{
var
rightTable
=
$
(
"#woll"
);
var
gather
=
rightTable
.
find
(
".right-table"
).
data
(
"data"
);
var
rowData
=
rightTable
.
find
(
".right-table"
).
datagrid
(
"getSelected"
);
var
index
=
rightTable
.
find
(
".right-table"
).
datagrid
(
"getRowIndex"
,
rowData
);
var
yff
=
0
;
$
.
each
(
gather
,
function
(
i
,
item
)
{
if
(
item
){
if
(
item
.
id
==
rowData
[
"id"
]
&&
kwid
){
if
(
item
[
"wlid"
]
==
rowData
[
"wlid"
]
&&
kwid
==
item
[
"kwid"
]
&&
item
[
"wlph"
]
==
rowData
[
"wlph"
]){
item
[
"kwid"
]
=
row
[
"kwid"
];
item
[
"kwmc"
]
=
row
[
"kwmc"
];
}
yff
+=
floatValue
(
gather
[
i
].
cksl
);
}
}
});
var
selectRowIndex
=
rightTable
.
find
(
".top-table"
).
datagrid
(
"getRowIndex"
,
rightTable
.
find
(
".top-table"
).
datagrid
(
"getSelected"
));
rightTable
.
find
(
".top-table"
).
datagrid
(
"updateRow"
,{
index
:
selectRowIndex
,
row
:{
wff
:
floatValue
(
rightTable
.
find
(
".top-table"
).
datagrid
(
"getSelected"
).
cksl
)
-
yff
,
yff
:
yff
}});
if
(
gather
){
$
.
each
(
rightTable
.
find
(
".left-table"
).
datagrid
(
"getRows"
),
function
(
i
,
item
)
{
var
yy
=
0
;
$
.
each
(
gather
,
function
(
j
,
s
)
{
if
(
item
[
"wlid"
]
==
s
[
"wlid"
]
&&
item
[
"kwid"
]
==
s
[
"kwid"
]
&&
item
[
"wlph"
]
==
s
[
"wlph"
]){
yy
+=
floatValue
(
s
[
"cksl"
]);
}
});
var
kyValue
=
0
;
if
(
floatValue
(
item
[
"kcsl"
])
-
yy
>=
0
){
kyValue
=
floatValue
(
item
[
"kcsl"
])
-
yy
}
rightTable
.
find
(
".left-table"
).
datagrid
(
"updateRow"
,{
index
:
i
,
row
:{
yy
:
yy
,
ky
:
kyValue
}
})
})
}
});
}
</script>
gavel/src/main/resources/templates/views/kmes/wozpjh/edit.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"kmesWozpjhEdit"
class=
"e-dialog-container"
data-options=
"width:640,height:300"
>
<div
class=
"editTable"
>
<input
type=
"hidden"
name=
"flag"
>
<input
type=
"hidden"
name=
"id"
>
<input
type=
"hidden"
name =
"woid"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
组件编码:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
data-options=
"required:true"
data-toggle=
"gui-textbox"
data-title=
"wlxxCode"
style=
"width: 100%"
>
<input
type=
"hidden"
name=
"wlxxCode"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
组件名称:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"name"
data-options=
"required:true"
data-toggle=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
计划开工日期:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"jhkgrq"
data-toggle=
"gui-datebox"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
计划完工日期:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"jhwgrq"
data-toggle=
"gui-datebox"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
备注:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bz"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#kmesWozpjhEdit'
);
Auxiliary
.
box
(
$div
.
find
(
'input[name="ffgx"]'
),
"FFGX"
);
$div
.
find
(
'input[name="wlid"]'
).
iSearchbox
({
searcher
:
function
(
value
)
{
Mvcbox
.
dialog
({
url
:
'jcsj/wlfl/queryroot'
,
title
:
"选择物料"
,
width
:
1020
,
height
:
600
,
value
:
''
,
datagrid
:{
checkOnSelect
:
true
,
selectOnCheck
:
true
},
buttons
:
{
ok
:
{
label
:
"保存"
,
callback
:
function
(
data
)
{
$div
.
find
(
'input[textboxname="wlid"]'
).
iSearchbox
(
"setValue"
,
data
[
0
][
"id"
]);
$div
.
find
(
'input[textboxname="wlid"]'
).
iSearchbox
(
"setText"
,
data
[
0
][
"code"
]);
$div
.
find
(
'input[textboxname="name"]'
).
textbox
(
"setValue"
,
data
[
0
][
"name"
]);
}
},
cancel
:
{
label
:
"关闭"
}
}
});
}
});
$div
.
find
(
'input[name="ffyz"]'
).
iCombobox
(
{
url
:
'wo/wobom/init/ffyz'
,
valueField
:
'id'
,
textField
:
'name'
,
allowNull
:
false
,
loadFilter
:
function
(
a
)
{
return
a
[
"data"
][
"records"
]}
}
);
if
(
$div
.
closest
(
"form"
).
attr
(
"tag"
)
==
"add"
){
HTTP
.
post
(
"common/datetime"
,{},
function
(
result
)
{
if
(
result
[
'success'
]
&&
result
[
'data'
][
'data'
]){
var
date
=
new
Date
(
result
[
'data'
][
'data'
]);
$div
.
find
(
'input[name="xqrq"]'
).
iDatebox
({
value
:
date
.
Format
(
"yyyy-MM-dd"
)});
}
},
null
,
false
);
$div
.
find
(
'input[name="woid"]'
).
val
(
$div
.
parent
().
dialog
(
"options"
).
params
.
woid
);
}
})
</script>
gavel/src/main/resources/templates/views/kmes/wozpjh/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"kmesWozpjh"
class=
"gui-layout gui-div"
style=
"height: 100%;width:100%;position: relative;overflow: hidden"
>
<div
data-options=
"region:'north'"
style=
"height:80px;width:100%;"
>
<div
class=
"gui-toolbar"
style=
"display: block"
data-options=
"grid:{type:'datagrid',id:'kmesWozpjhTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-review toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-add toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-copy toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-edit toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-delete1 toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-bom toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-zpwl toolbar"
href=
"javascript:void(0)"
>
设置装配零件
</a>
<a
class=
"toolbar-release toolbar"
href=
"javascript:void(0)"
>
下达
</a>
<a
class=
"toolbar-unrelease toolbar"
href=
"javascript:void(0)"
>
取消下达
</a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
工厂:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gcid"
class=
"gui-textbox"
data-options=
"required:true"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
生产单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"djid"
class=
"gui-textbox"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search-wozpjh"
style=
"color:'#fff'"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<div
data-options=
"region:'center'"
>
<div
class=
"gui-div"
>
<table
class=
"toolbar-table toolbar-holder"
data-options=
"id: 'kmesWozpjhTable',herf:'kzzx/gridset/query',type:'datagrid'"
></table>
</div>
</div>
<div
data-options=
"region:'west',split:true"
style=
"width:45%;height:100%;position: relative"
>
<div
id=
"kmesWozpjhWoList"
class=
"gui-div"
>
<div
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'kmesWozpjhWoListTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
style=
"display: none"
></a>
</div>
</div>
<table
class=
"toolbar-table"
data-options=
"id: 'kmesWozpjhWoListTable',herf:'kzzx/gridset/query'"
></table>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#kmesWozpjh'
);
var
$woList
=
$
(
"#kmesWozpjhWoList"
);
var
$cbxGcid
=
$div
.
find
(
'input[name="gcid"]'
);
var
$datKsrq
=
$div
.
find
(
'input[name="ksrq"]'
);
var
$datJsrq
=
$div
.
find
(
'input[name="jsrq"]'
);
var
$datagrid
=
$div
.
find
(
'.toolbar-table:first'
);
var
$datagridWo
=
$woList
.
find
(
'.toolbar-table:first'
);
var
$searchBtn
=
$div
.
find
(
".toolbar-search-wozpjh"
);
var
$delBtn
=
$div
.
find
(
".toolbar-delete1"
);
var
$woztMap
=
{},
$djlyMap
=
{},
$wobomztMap
=
{};
function
paramInit
(
ops
){
//初始化状态
gas
.
postHTTP
(
"wo/wo/init/zt"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
var
data
=
result
[
'data'
][
'records'
];
for
(
var
i
in
data
){
$woztMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}
}
},
ops
);
//初始化生成方式
gas
.
postHTTP
(
"wo/wo/init/djly"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
var
data
=
result
[
'data'
][
'records'
];
for
(
var
i
in
data
){
$djlyMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}
}
},
ops
);
}
function
pageInit
(
ops
)
{
$delBtn
.
iMenubutton
({
iconCls
:
'fa fa-trash'
,
text
:
'删除'
,
btnCls
:
"gui-btn"
,
onClick
:
function
()
{
var
deleteRows
=
[];
var
rows
=
$datagrid
.
datagrid
(
"getChecked"
);
if
(
rows
.
length
==
0
){
gas
.
showTipsError
(
"请选择至少一条装配计划"
);
return
false
}
$
.
each
(
rows
,
function
(
i
,
item
)
{
deleteRows
.
push
({
id
:
item
.
id
})
})
gas
.
post
(
"kmes/wozpjh/delete"
,{
"deleteList"
:
deleteRows
},
function
(
res
)
{
if
(
res
.
success
){
gas
.
showTipsSuccess
(
"删除成功"
);
var
woid
=
$datagridWo
.
datagrid
(
"getSelected"
);
if
(
woid
){
loadList
(
woid
.
id
)
}
else
{
$datagrid
.
datagrid
(
'clientPaging'
,
{
data
:[]});
}
}
else
{
var
messge
=
res
.
message
||
"删除失败"
;
var
msg
=
""
;
if
(
res
.
messageArray
&&
res
.
messageArray
.
length
>
0
){
$
.
each
(
res
.
messageArray
,
function
(
i
,
item
)
{
msg
+=
item
.
message
});
messge
+=
msg
}
gas
.
showCenterTips
(
messge
)
}
})
}
});
var
options
=
{
url
:
"kmes/wozpjh"
,
fontPage
:
true
,
noRequest
:
true
,
columns
:[[
{
title
:
"组件编码"
,
field
:
"wlxxCode"
,
width
:
120
},
{
title
:
"组件名称"
,
field
:
"name"
,
width
:
140
},
{
title
:
"计划单号"
,
field
:
"djid"
,
width
:
120
},
{
title
:
"计划开工日期"
,
field
:
"jhkgrq"
,
fieldType
:
"ftDate"
},
{
title
:
"计划完工日期"
,
field
:
"jhwgrq"
,
fieldType
:
"ftDate"
},
{
title
:
"状态"
,
field
:
"zt"
,
fieldType
:
"ftString"
,
width
:
60
,
formatter
:
function
(
value
,
index
,
row
)
{
var
text
=
$wobomztMap
[
value
];
return
text
||
""
;
}
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
200
},
{
title
:
"维护人"
,
field
:
"whr"
,
fieldType
:
"ftString"
},
{
title
:
"维护时间"
,
field
:
"whsj"
,
fieldType
:
"ftDateTime"
}
]],
dialog
:{
href
:
"kmes/wozpjh/edit"
,
footerIn
:
true
,
onBeforeLoad
:
function
()
{
var
selectedRow
=
$datagridWo
.
getSelectedRow
();
if
(
!
selectedRow
){
gas
.
showTipsWarning
(
"请选择一条生产订单!"
);
return
;
}
$
(
this
).
dialog
(
"options"
).
params
=
{
woid
:
selectedRow
.
id
};
}
},
multipleSelect
:
true
};
$div
.
Holder
(
options
);
$woList
.
Container
({
columns
:
[[
{
title
:
"状态"
,
field
:
"zt"
,
fieldType
:
"ftString"
,
width
:
60
,
formatter
:
function
(
value
,
index
,
row
)
{
var
text
=
$woztMap
[
value
];
return
text
||
""
;
}
},
{
title
:
"订单号"
,
field
:
"djid"
,
fieldType
:
"ftString"
,
width
:
120
},
{
title
:
"业务日期"
,
field
:
"ywrq"
,
fieldType
:
"ftDate"
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
120
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
},
{
title
:
"规格"
,
field
:
"wlxxGg"
,
width
:
140
},
{
title
:
"项目编码"
,
field
:
"xmcode"
,
width
:
140
},
{
title
:
"项目名称"
,
field
:
"xmname"
,
width
:
140
},
{
title
:
"计量单位"
,
field
:
"jldwName"
,
width
:
80
},
{
title
:
"订单数量"
,
field
:
"xqsl"
,
fieldType
:
"float"
},
{
title
:
"完工部门"
,
field
:
"bmName"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"确认人"
,
field
:
"qrr"
,
fieldType
:
"ftString"
,
width
:
80
},
{
title
:
"确认时间"
,
field
:
"qrsj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"下达人"
,
field
:
"xdr"
,
fieldType
:
"ftString"
,
width
:
80
},
{
title
:
"下达时间"
,
field
:
"xdsj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"维护人"
,
field
:
"whr"
,
fieldType
:
"ftString"
},
{
title
:
"维护时间"
,
field
:
"whsj"
,
fieldType
:
"ftDateTime"
}
]],
onClickRow
:
function
(
a
,
b
,
rowData
,
rowIndex
)
{
loadList
(
rowData
.
id
)
},
datagrid
:{
onSelect
:
function
(
rowIndex
,
rowData
)
{
if
(
rowData
){
loadList
(
rowData
.
id
)
}
}
}
});
//初始化工厂
$cbxGcid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
false
,
allowEdit
:
false
});
$datKsrq
.
iDatebox
();
$datJsrq
.
iDatebox
();
$searchBtn
.
iMenubutton
({
iconCls
:
'fa fa-search'
,
text
:
'搜索'
,
btnCls
:
"gui-btn-search"
,
onClick
:
function
()
{
run
()
}
});
}
/*数据初始化*/
function
dataInit
(
ops
){
gas
.
postHTTP
(
"jcsj/common/gc/query"
,{},
function
(
res
)
{
$cbxGcid
.
iCombobox
(
"loadData"
,
res
.
data
.
records
)
},
ops
);
gas
.
postHTTP
(
"common/datetime"
,{},
function
(
response1
)
{
var
date
=
new
Date
(
response1
.
data
.
data
);
$datKsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
beginOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
$datJsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
endOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
},
ops
);
//初始化状态
gas
.
postHTTP
(
"kmes/wozpjh/init/zt"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
var
data
=
result
[
'data'
][
'records'
];
for
(
var
i
in
data
){
$wobomztMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}}
},
ops
);
}
/*用户操作*/
function
run
(){
$datagridWo
.
datagrid
(
"options"
).
url
=
"kmes/wozpjh/query/wo"
;
$datagridWo
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
function
loadList
(
woid
)
{
$datagrid
.
datagrid
(
"loading"
);
HTTP
.
post
(
"kmes/wozpjh/query"
,{
woid
:
woid
},
function
(
res
)
{
if
(
res
.
success
){
$datagrid
.
datagrid
(
"loaded"
);
$datagrid
.
datagrid
(
'clientPaging'
,
{
data
:
res
.
data
.
records
||
[]});
}
})
}
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
$div
.
find
(
".toolbar-bom"
).
iMenubutton
({
text
:
"参照bom生成"
,
dialog
:{
title
:
"参照bom生成"
,
width
:
1120
,
height
:
630
,
href
:
'kmes/wozpjh/wlsearch/index'
,
footerIn
:
true
,
tag
:
"add"
,
onSaveCallback
:
function
(
opt
,
data
)
{
var
selectedRow
=
$datagridWo
.
datagrid
(
"getSelected"
);
loadList
(
selectedRow
.
id
);
},
onBeforeLoad
:
function
()
{
var
selectedRow
=
$datagridWo
.
datagrid
(
"getSelected"
);
$
(
this
).
dialog
(
"options"
).
params
=
{
woid
:
selectedRow
.
id
}
},
messager
:
function
(){
var
selectedRow
=
$datagridWo
.
datagrid
(
"getSelected"
);
if
(
!
selectedRow
||
!
selectedRow
.
id
){
$
.
messager
.
alert
(
'提示'
,
'请选择一条生产订单!'
);
return
false
;
}
}
}
});
$div
.
find
(
".toolbar-zpwl"
).
iMenubutton
({
text
:
"设置装配零件"
,
dialog
:{
title
:
"设置装配零件"
,
width
:
1120
,
height
:
630
,
href
:
'kmes/wozpjh/wobom/index'
,
footerIn
:
true
,
tag
:
"add"
,
onSaveCallback
:
function
(
opt
,
data
)
{
},
onBeforeLoad
:
function
()
{
var
selectedRow
=
$datagrid
.
datagrid
(
"getSelected"
);
$
(
this
).
dialog
(
"options"
).
params
=
{
woid
:
selectedRow
.
woid
,
id
:
selectedRow
.
id
,
wlid
:
selectedRow
.
wlid
}
},
messager
:
function
(){
var
selectedRow
=
$datagrid
.
datagrid
(
"getSelected"
);
if
(
!
selectedRow
||
!
selectedRow
.
id
){
$
.
messager
.
alert
(
'提示'
,
'请选择一条装配计划!'
);
return
true
;
}
}
}
});
$div
.
find
(
".toolbar-release"
).
iMenubutton
({
iconCls
:
'fa fa-check-square-o'
,
btnCls
:
'gui-btn-warm'
,
onClick
:
release
});
$div
.
find
(
".toolbar-unrelease"
).
iMenubutton
({
iconCls
:
'fa fa-reply'
,
btnCls
:
'gui-btn-warm'
,
onClick
:
unrelease
});
/*下达*/
function
release
(){
var
selectedRows
=
$datagrid
.
getSelectedRows
();
var
indexs
=
[];
var
idArray
=
[];
$
.
each
(
selectedRows
,
function
(
i
,
row
){
idArray
.
push
(
row
.
id
);
indexs
.
push
(
$datagrid
.
datagrid
(
'getRowIndex'
,
row
));
});
if
(
!
selectedRows
){
$
.
messager
.
alert
(
'提示'
,
'请选择需要下达的装配计划!'
);
return
;
}
$
.
messager
.
confirm
(
"提示"
,
"是否下达已选择的装配计划?"
,
function
(
r
)
{
if
(
r
){
HTTP
.
post
(
'kmes/wozpjh/release'
,{
ids
:
idArray
},
function
(
result
)
{
if
(
result
[
"success"
]){
$
.
each
(
result
.
data
.
records
,
function
(
i
,
row
){
$
.
each
(
indexs
,
function
(
i
,
index
){
if
(
idArray
[
i
]
==
row
.
id
){
$datagrid
.
datagrid
(
"updateRow"
,{
index
:
index
,
row
:{
zt
:
row
.
zt
}
});
}
})
});
$
.
messager
.
alert
(
'提示'
,
result
[
'message'
]
||
'装配计划下达成功!'
);
}
else
$
.
messager
.
alert
(
'提示'
,
result
[
'message'
]
||
'装配计划下达失败!'
);
});
}
});
}
function
unrelease
(){
var
selectedRows
=
$datagrid
.
getSelectedRows
();
if
(
!
selectedRows
){
$
.
messager
.
alert
(
'提示'
,
'请选择需要取消下达的装配计划!'
);
return
;
}
$
.
messager
.
confirm
(
"提示"
,
"是否取消下达?"
,
function
(
r
)
{
if
(
r
){
var
indexs
=
[],
idArray
=
[];
$
.
each
(
selectedRows
,
function
(
i
,
row
){
idArray
.
push
(
row
.
id
);
indexs
.
push
(
$datagrid
.
datagrid
(
'getRowIndex'
,
row
));
});
gas
.
post
(
"kmes/wozpjh/unrelease"
,{
ids
:
idArray
},
function
(
result
)
{
if
(
result
[
"success"
]){
$
.
each
(
result
.
data
.
records
,
function
(
i
,
row
){
$
.
each
(
indexs
,
function
(
i
,
index
){
if
(
idArray
[
i
]
==
row
.
id
){
$datagrid
.
datagrid
(
"updateRow"
,{
index
:
index
,
row
:{
zt
:
row
.
zt
}
});
}
})
});
gas
.
showTips
(
result
[
'message'
]
||
'装配计划取消下达成功!'
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
result
[
'message'
]
||
'装配计划取消下达失败!'
);
}
});
}
})
}
})
</script>
gavel/src/main/resources/templates/views/kmes/wozpjh/wlsearch.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"wozpjhWlSearchEdit"
class=
"e-dialog-container"
data-options=
"title:'参照bom生成',width: 1024, height: 600"
>
<div>
<input
type=
"hidden"
name=
"woid"
>
<div
class=
"mx-dataTable"
style=
"bottom: 40px"
>
<table
id =
"wozpjhWlSearchTable"
class=
"toolbar-table mx-dataTable"
style=
"bottom: 60px"
data-options=
"id: 'wozpjhWlSearchTable',herf:'kzzx/gridset/query'"
>
</table>
<div
id=
"wozpjhWlSearchTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'wozpjhWlSearchTable'}"
>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
for=
""
>
物料:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
data-toggle=
"gui-textbox"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
>
<a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a>
</span>
</form>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
/*js初始化*/
$
(
function
()
{
var
$div
=
$
(
'#wozpjhWlSearchEdit'
);
var
$datagrid
=
$
(
"#wozpjhWlSearchTable"
);
var
params
=
$div
.
parent
(
"form"
).
dialog
(
"options"
).
params
;
var
$edtWoid
=
$div
.
find
(
'input[name="woid"]'
);
var
$cbxWlid
=
$div
.
find
(
'input[name="wlid"]'
);
var
$searchBtn
=
$div
.
find
(
".toolbar-search"
);
var
$wlsxColumns
=
[]
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
function
paramInit
(
ops
){
initWlsxColumns
(
$wlsxColumns
,
ops
);
}
function
pageInit
(
ops
){
var
columns
=
[
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
180
,
allowEdit
:
false
},
{
title
:
"物料名称"
,
field
:
"name"
,
width
:
200
,
allowEdit
:
false
},
{
title
:
"计划开工日期"
,
field
:
"jhkgrq"
,
fieldType
:
"date"
},
{
title
:
"计划完工日期"
,
field
:
"jhwgrq"
,
fieldType
:
"date"
},
{
title
:
"备注"
,
field
:
"bz"
,
"width"
:
240
}
].
concat
(
$wlsxColumns
);
$datagrid
.
DataTableEditing
({
columns
:[
new
$
.
common
.
formatterCol
(
columns
)],
pagination
:
true
,
allowAdd
:
false
,
multipleSelect
:
true
,
allowEdit
:
true
});
}
function
dataInit
(
ops
){
$edtWoid
.
val
(
params
.
woid
);
}
function
run
(
ops
){
gas
.
post
(
"kmes/wozpjh/query/xnbom"
,
DataBind
.
collectData
(
$div
),
function
(
res
){
$datagrid
.
datagrid
(
"loaded"
);
if
(
res
.
success
)
$datagrid
.
datagrid
(
'clientPaging'
,
{
data
:
res
.
data
.
records
||
[]});
})
}
$searchBtn
.
iMenubutton
({
text
:
"搜索"
,
iconCls
:
"fa fa-search"
,
onClick
:
function
()
{
run
()
}
});
$div
.
find
(
".e-dialog-ok"
).
iMenubutton
({
text
:
"确定"
,
iconCls
:
"fa fa-save"
,
btnCls
:
"gui-btn-save"
,
onClick
:
function
(){
$datagrid
.
datagrid
(
"acceptChanges"
);
var
checedRows
=
$datagrid
.
datagrid
(
"getChecked"
);
var
formData
=
DataBind
.
collectData
(
$div
);
var
postData
=
{
woid
:
$edtWoid
.
val
(),
datas
:
checedRows
}
gas
.
post
(
"kmes/wozpjh/batch/add"
,
postData
,
function
(
res
){
if
(
res
&&
res
.
success
){
$div
.
closest
(
"form"
).
iDialog
(
"setStatus"
,{
"state"
:
"ok"
,
data
:
postData
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
res
[
'message'
]
||
'生成装配计划失败!'
);
}
})
}
});
})
</script>
gavel/src/main/resources/templates/views/kmes/wozpjh/wobom.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"wozpjhWobomSearchEdit"
class=
"e-dialog-container"
data-options=
"title:'设置装配零件',width: 1024, height: 600"
>
<div
style=
"position: absolute;width: 100%;top: 0;left: 0;bottom: 44px;"
>
<table
class=
"toolbar-table"
style=
"height: 100%;"
data-options=
"id: 'wozpjhWobomSearchTable',herf:'kzzx/gridset/query'"
></table>
<div
id=
"wozpjhWobomSearchTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'wozpjhWobomSearchTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-add1 toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-delete toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
for=
""
>
物料:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
data-toggle=
"gui-textbox"
>
<input
type=
"hidden"
name=
"woid"
>
<input
type=
"hidden"
name=
"zpjhid"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
>
<a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a>
</span>
</form>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
/*js初始化*/
$
(
function
()
{
var
$div
=
$
(
'#wozpjhWobomSearchEdit'
);
var
$datagrid
=
$div
.
find
(
'.toolbar-table'
);
var
params
=
$div
.
parent
(
"form"
).
dialog
(
"options"
).
params
;
var
$edtWoid
=
$div
.
find
(
'input[name="woid"]'
);
var
$edtZpjhid
=
$div
.
find
(
'input[name="zpjhid"]'
);
var
$cbxWlid
=
$div
.
find
(
'input[name="wlid"]'
);
var
$searchBtn
=
$div
.
find
(
".toolbar-search"
);
var
$wlsxColumns
=
[]
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
function
paramInit
(
ops
){
initWlsxColumns
(
$wlsxColumns
,
ops
);
}
function
pageInit
(
ops
){
var
options
=
{
url
:
"kmes/wozpjh/wobom"
,
fontPage
:
true
,
noRequest
:
true
,
columns
:[[
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
140
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
},
{
title
:
"关键物料"
,
field
:
"gjwl"
,
fieldType
:
"ftString"
,
width
:
70
,
align
:
'center'
,
formatter
:
function
(
value
,
index
,
row
)
{
var
map
=
{
"Y"
:
"<span style='color: green'>是</span>"
,
"N"
:
"否"
};
var
text
=
map
[
value
];
return
text
||
""
;
}},
{
title
:
"物料批号"
,
field
:
"wlph"
,
width
:
140
},
{
title
:
"发放工序"
,
field
:
"bzgxname"
,
width
:
140
},
{
title
:
"单位用量"
,
field
:
"dwyl"
,
fieldType
:
"int"
},
{
title
:
"损耗率"
,
field
:
"shl"
,
fieldType
:
"int"
},
{
title
:
"损耗值"
,
field
:
"shz"
,
fieldType
:
"int"
},
{
title
:
"总耗用量"
,
field
:
"xqsl"
,
fieldType
:
"int"
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
200
}
]],
dialog
:{
href
:
"kmes/wozpjh/wobom/edit"
,
footerIn
:
true
,
onBeforeLoad
:
function
()
{
$
(
this
).
dialog
(
"options"
).
params
=
{
woid
:
$edtWoid
.
val
(),
zpjhid
:
$edtZpjhid
.
val
(),
zjwlid
:
params
.
wlid
}
}
},
multipleSelect
:
true
,
delimitingRun
:
run
};
$div
.
Holder
(
options
);
}
function
dataInit
(
ops
){
$edtWoid
.
val
(
params
.
woid
);
$edtZpjhid
.
val
(
params
.
id
);
}
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/wozpjh/wobom/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
$div
.
find
(
".e-dialog-ok"
).
iMenubutton
({
text
:
"确定"
,
iconCls
:
"fa fa-save"
,
btnCls
:
"gui-btn-save"
,
onClick
:
function
(){
$datagrid
.
datagrid
(
"acceptChanges"
);
var
checedRows
=
$datagrid
.
datagrid
(
"getChecked"
);
var
formData
=
DataBind
.
collectData
(
$div
);
var
postData
=
{
zpjhid
:
params
.
id
,
datas
:
checedRows
}
$div
.
closest
(
"form"
).
iDialog
(
"setStatus"
,{
"state"
:
"ok"
,
data
:
postData
});
}
});
$div
.
find
(
".toolbar-add1"
).
iMenubutton
({
text
:
"设置装配零件"
,
dialog
:{
title
:
"选择装配物料"
,
width
:
1120
,
height
:
630
,
href
:
'kmes/wozpjh/wobom/edit'
,
footerIn
:
true
,
tag
:
"add"
,
onBeforeLoad
:
function
()
{
$
(
this
).
dialog
(
"options"
).
params
=
{
woid
:
$edtWoid
.
val
(),
zpjhid
:
$edtZpjhid
.
val
(),
zjwlid
:
params
.
wlid
}
},
onSaveCallback
:
function
(
opt
,
data
)
{
run
();
},
}
});
})
</script>
gavel/src/main/resources/templates/views/kmes/wozpjh/wobomEdit.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"wozpjhWobomEditEdit"
class=
"e-dialog-container"
data-options=
"title:'参照bom生成',width: 1024, height: 600"
>
<div>
<div
class=
"mx-dataTable"
style=
"bottom: 40px"
>
<table
id =
"wozpjhWobomEditTable"
class=
"toolbar-table mx-dataTable"
style=
"bottom: 60px"
data-options=
"id: 'wozpjhWobomEditTable',herf:'kzzx/gridset/query'"
>
</table>
<div
id=
"wozpjhWobomEditTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'wozpjhWobomEditTable'}"
>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
for=
""
>
组件物料:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"zjwlid"
data-toggle=
"gui-textbox"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
for=
""
>
物料:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
data-toggle=
"gui-textbox"
>
<input
type=
"hidden"
name=
"woid"
>
<input
type=
"hidden"
name=
"zpjhid"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
>
<a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a>
</span>
</form>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok1"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
/*js初始化*/
$
(
function
()
{
var
$div
=
$
(
'#wozpjhWobomEditEdit'
);
var
$datagrid
=
$
(
"#wozpjhWobomEditTable"
);
var
params
=
$div
.
parent
(
"form"
).
dialog
(
"options"
).
params
;
var
$edtWoid
=
$div
.
find
(
'input[name="woid"]'
);
var
$edtZpjhid
=
$div
.
find
(
'input[name="zpjhid"]'
);
var
$cbxWlid
=
$div
.
find
(
'input[name="wlid"]'
);
var
$edtZjwlid
=
$div
.
find
(
'input[name="zjwlid"]'
);
var
$searchBtn
=
$div
.
find
(
".toolbar-search"
);
var
$wlsxColumns
=
[]
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
function
paramInit
(
ops
){
initWlsxColumns
(
$wlsxColumns
,
ops
);
}
function
pageInit
(
ops
){
var
columns
=
[
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
140
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
},
{
title
:
"关键物料"
,
field
:
"gjwl"
,
fieldType
:
"ftString"
,
width
:
70
,
align
:
'center'
,
formatter
:
function
(
value
,
index
,
row
)
{
var
map
=
{
"Y"
:
"<span style='color: green'>是</span>"
,
"N"
:
"否"
};
var
text
=
map
[
value
];
return
text
||
""
;
}},
{
title
:
"物料批号"
,
field
:
"wlph"
,
width
:
140
},
{
title
:
"发放工序"
,
field
:
"bzgxname"
,
width
:
140
},
{
title
:
"单位用量"
,
field
:
"dwyl"
,
fieldType
:
"int"
},
{
title
:
"损耗率"
,
field
:
"shl"
,
fieldType
:
"int"
},
{
title
:
"损耗值"
,
field
:
"shz"
,
fieldType
:
"int"
},
{
title
:
"总耗用量"
,
field
:
"xqsl"
,
fieldType
:
"int"
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
200
}
].
concat
(
$wlsxColumns
);
$datagrid
.
DataTableEditing
({
columns
:[
new
$
.
common
.
formatterCol
(
columns
)],
pagination
:
true
,
allowAdd
:
false
,
multipleSelect
:
true
,
});
}
function
dataInit
(
ops
){
$edtWoid
.
val
(
params
.
woid
);
$edtZpjhid
.
val
(
params
.
zpjhid
);
$edtZjwlid
.
textbox
(
'setValue'
,
params
.
zjwlid
);
}
function
run
(){
gas
.
post
(
"kmes/wozpjh/wobom/add/query"
,
DataBind
.
collectData
(
$div
),
function
(
res
){
$datagrid
.
datagrid
(
"loaded"
);
if
(
res
.
success
)
$datagrid
.
datagrid
(
'clientPaging'
,
{
data
:
res
.
data
.
records
||
[]});
})
}
$searchBtn
.
iMenubutton
({
text
:
"搜索"
,
iconCls
:
"fa fa-search"
,
onClick
:
function
()
{
run
()
}
});
$div
.
find
(
".e-dialog-ok1"
).
iMenubutton
({
text
:
"确定"
,
iconCls
:
"fa fa-save"
,
btnCls
:
"gui-btn-save"
,
onClick
:
function
(){
$datagrid
.
datagrid
(
"acceptChanges"
);
var
checedRows
=
$datagrid
.
datagrid
(
"getChecked"
);
var
formData
=
DataBind
.
collectData
(
$div
);
var
postData
=
{
woid
:
$edtWoid
.
val
(),
zpjhid
:
$edtZpjhid
.
val
(),
datas
:
checedRows
}
gas
.
post
(
"kmes/wozpjh/wobom/add"
,
postData
,
function
(
res
){
if
(
res
&&
res
.
success
){
$div
.
parent
(
""
).
iDialog
(
"setStatus"
,{
"state"
:
"ok"
,
data
:
postData
});
}
else
{
$
.
messager
.
alert
(
'提示'
,
res
[
'message'
]
||
'生成装配计划失败!'
);
}
})
}
});
})
</script>
gavel/src/main/resources/templates/views/kmes/wozpjhbg/edit.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzgdUwozpjhbgEdit"
class=
"e-dialog-container"
data-options=
"width:640,height:300"
>
<div
class=
"e-dialog-body"
>
<input
type=
"hidden"
name=
"flag"
>
<input
type=
"hidden"
name=
"id"
>
<!--<input type="hidden" name="yjhkgrq" >-->
<!--<input type="hidden" name="yjhwgrq" >-->
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
计划单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"lydjid"
data-toggle=
"gui-textbox"
data-title=
"zpjhDjid"
data-options=
"required:true"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
变更单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"djid"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
变更日期:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bgrq"
data-toggle=
"gui-datebox"
data-options=
"required:true"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
计划开工日期:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"jhkgrq"
data-toggle=
"gui-datebox"
data-options=
"required:true"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
计划完工日期:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"jhwgrq"
data-toggle=
"gui-datebox"
data-options=
"required:true"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
备注:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bz"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
class=
"toolbar chooseZpih"
href=
"javascript:void(0)"
style=
"display: none"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#hzgdUwozpjhbgEdit'
);
var
$edtLydjid
=
$div
.
find
(
'input[name="lydjid"]'
);
var
$edtYjhkgrq
=
$div
.
find
(
'input[name="yjhkgrq"]'
);
var
$edtYjhwgrq
=
$div
.
find
(
'input[name="yjhwgrq"]'
);
if
(
$div
.
closest
(
"form"
).
attr
(
"tag"
)
==
"add"
){
HTTP
.
post
(
"common/datetime"
,{},
function
(
result
)
{
if
(
result
[
'success'
]
&&
result
[
'data'
][
'data'
]){
var
date
=
new
Date
(
result
[
'data'
][
'data'
]);
$div
.
find
(
'input[name="bgrq"]'
).
iDatebox
({
value
:
date
.
Format
(
"yyyy-MM-dd"
)});
}
},
null
,
false
);
}
if
(
$div
.
closest
(
"form"
).
attr
(
"tag"
)
==
"edit"
){
$edtLydjid
.
attr
(
'disabled'
,
'disabled'
);
}
Auxiliary
.
whbox
(
$edtLydjid
,{
callback
:
function
()
{
$div
.
find
(
".chooseZpih"
).
click
()
},
onChange
:
doLydjidChange
});
$div
.
find
(
".chooseZpih"
).
iMenubutton
({
text
:
"选择装配计划"
,
iconCls
:
"fa fa-plus"
,
dialog
:{
href
:
"kmes/wozpjhbg/wozpjhsearch"
,
footerIn
:
true
,
onSaveCallback
:
function
(
opt
,
res
)
{
if
(
res
&&
res
.
length
>
0
){
var
data
=
res
[
0
];
$edtLydjid
.
textbox
(
'setValue'
,
data
[
'id'
]);
$edtLydjid
.
textbox
(
'setText'
,
data
[
'djid'
]);
}
}
}
});
function
doLydjidChange
(
a
,
b
)
{
}
})
</script>
gavel/src/main/resources/templates/views/kmes/wozpjhbg/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzgdUwozpjhbg"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'hzgdUwozpjhbgTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"hzgdUwozpjhbgTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'hzgdUwozpjhbgTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
style=
"display: none"
></a>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-review toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-add toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-edit toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-delete toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-confirm toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-unconfirm toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
变更日期:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"ksrq"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"jsrq"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
变更单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"djid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
计划单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"zpjhDjid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#hzgdUwozpjhbg'
);
var
$datKsrq
=
$div
.
find
(
'input[name="ksrq"]'
);
var
$datJsrq
=
$div
.
find
(
'input[name="jsrq"]'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
var
$ztMap
=
{};
function
paramInit
(
ops
){
//初始化状态
gas
.
post
(
"kmes/wozpjhbg/init/zt"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
var
data
=
result
[
'data'
][
'records'
];
for
(
var
i
in
data
){
$ztMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}
}
},
ops
);
}
function
pageInit
()
{
$datKsrq
.
iDatebox
();
$datJsrq
.
iDatebox
();
var
options
=
{
url
:
'kmes/wozpjhbg'
,
noRequest
:
true
,
columns
:
[[
{
title
:
"状态"
,
field
:
"zt"
,
fieldType
:
"ftString"
,
width
:
60
,
formatter
:
function
(
value
,
index
,
row
)
{
var
text
=
$ztMap
[
value
];
return
text
||
""
;
}
},
{
title
:
"变更单号"
,
field
:
"djid"
,
fieldType
:
"ftString"
,
width
:
120
},
{
title
:
"变更日期"
,
field
:
"bgrq"
,
fieldType
:
"ftDateTime"
},
{
title
:
"变更版本"
,
field
:
"version"
,
fieldType
:
"int"
,
width
:
80
},
{
title
:
"计划开工日期"
,
field
:
"jhkgrq"
,
fieldType
:
"ftDate"
},
{
title
:
"计划完工日期"
,
field
:
"jhwgrq"
,
fieldType
:
"ftDate"
},
{
title
:
"计划单号"
,
field
:
"zpjhDjid"
,
fieldType
:
"ftString"
,
width
:
120
},
{
title
:
"原计划开工日期"
,
field
:
"yjhkgrq"
,
fieldType
:
"ftDate"
},
{
title
:
"原计划完工日期"
,
field
:
"yjhwgrq"
,
fieldType
:
"ftDate"
},
{
title
:
"维护人"
,
field
:
"whr"
,
fieldType
:
"ftString"
},
{
title
:
"维护时间"
,
field
:
"whsj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
200
}
]],
dialog
:
{
footerIn
:
true
,
href
:
'kmes/wozpjhbg/edit'
}
};
$div
.
Holder
(
options
);
}
/*数据初始化*/
function
dataInit
(
ops
){
gas
.
postHTTP
(
"common/datetime"
,{},
function
(
response1
)
{
var
date
=
new
Date
(
response1
.
data
.
data
);
$datKsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
beginOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
$datJsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
endOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
},
ops
);
}
$div
.
find
(
".toolbar-confirm"
).
iMenubutton
({
iconCls
:
'fa fa-check-square-o'
,
btnCls
:
'gui-btn-warm'
,
text
:
'确认变更'
,
onClick
:
confirm
});
$div
.
find
(
".toolbar-unconfirm"
).
iMenubutton
({
iconCls
:
'fa fa-reply'
,
btnCls
:
'gui-btn-warm'
,
text
:
'取消变更'
,
onClick
:
unconfirm
});
function
confirm
(){
var
selectedRow
=
$div
.
find
(
'.toolbar-table'
).
datagrid
(
'getSelected'
);
HTTP
.
post
(
'kmes/wozpjhbg/confirm'
,
selectedRow
||
{},
function
(
result
)
{
if
(
result
[
'success'
]){
$div
.
find
(
'.toolbar-reload'
).
click
();
$
.
messager
.
alert
(
'提示'
,
'确认变更成功!'
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
result
[
'message'
]
||
'确认变更失败,请重新操作!'
);
}
})
}
function
unconfirm
(){
var
selectedRow
=
$div
.
find
(
'.toolbar-table'
).
datagrid
(
'getSelected'
);
if
(
selectedRow
==
null
){
$
.
messager
.
alert
(
'提示'
,
'请选中一条数据进行操作'
);
return
false
;
}
$
.
messager
.
confirm
(
"提示"
,
"是否取消确认?"
,
function
(
r
)
{
if
(
r
){
HTTP
.
post
(
'kmes/wozpjhbg/unconfirm'
,
selectedRow
,
function
(
result
)
{
if
(
result
[
'success'
]){
$div
.
find
(
'.toolbar-reload'
).
click
();
$
.
messager
.
alert
(
'提示'
,
'取消变更成功!'
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
result
[
'message'
]
||
'取消变更失败,请重新操作!'
);
}
})
}
})
}
/*用户操作*/
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/wozpjhbg/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
))
}
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/wozpjhbg/wozpjhsearch.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"woZpjhSearch"
class=
"e-dialog-container"
data-options=
"title:'选择装配计划',width: 1020, height: 500"
>
<div>
<div
class=
"mx-dataTable"
style=
"bottom: 40px"
>
<table
id =
"woZpjhSearchTable"
class=
"toolbar-table mx-dataTable"
style=
"bottom: 60px"
data-options=
"id: 'woZpjhSearchTable',herf:'kzzx/gridset/query'"
>
</table>
<div
id=
"woZpjhSearchTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'woZpjhSearchTable'}"
>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
开工日期:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"jhkgrqs"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"jhkgrqe"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
计划单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"djid"
data-toggle=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
>
<a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a>
</span>
</form>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
/*js初始化*/
$
(
function
()
{
var
$div
=
$
(
'#woZpjhSearch'
);
var
$datagrid
=
$
(
"#woZpjhSearchTable"
);
var
$datStart
=
$div
.
find
(
'input[name="jhkgrqs"]'
);
var
$datEnd
=
$div
.
find
(
'input[name="jhkgrqe"]'
);
var
$searchBtn
=
$div
.
find
(
".toolbar-search"
);
var
$wobomztMap
=
{};
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
function
paramInit
(
ops
){
}
function
pageInit
(
ops
){
var
columns
=
[
{
field
:
"ck"
,
checkbox
:
true
},
{
title
:
"计划单号"
,
field
:
"djid"
,
width
:
120
},
{
title
:
"组件编码"
,
field
:
"wlxxCode"
,
width
:
140
},
{
title
:
"组件名称"
,
field
:
"name"
,
width
:
140
},
{
title
:
"计划开工日期"
,
field
:
"jhkgrq"
,
fieldType
:
"ftDate"
},
{
title
:
"计划完工日期"
,
field
:
"jhwgrq"
,
fieldType
:
"ftDate"
},
{
title
:
"状态"
,
field
:
"zt"
,
fieldType
:
"ftString"
,
width
:
60
,
formatter
:
function
(
value
,
index
,
row
)
{
var
text
=
$wobomztMap
[
value
];
return
text
||
""
;
}
},
{
title
:
"下达人"
,
field
:
"xdr"
,
fieldType
:
"ftString"
,
width
:
100
},
{
title
:
"下达时间"
,
field
:
"xdsj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
200
}
];
$datagrid
.
DataTableEditing
({
columns
:[
new
$
.
common
.
formatterCol
(
columns
)],
pagination
:
false
,
singleSelect
:
true
,
checkOnSelect
:
true
,
selectOnCheck
:
true
,
allowAdd
:
false
});
$datStart
.
iDatebox
();
$datEnd
.
iDatebox
();
}
function
dataInit
(
ops
){
gas
.
postHTTP
(
"kmes/wozpjh/init/zt"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
var
data
=
result
[
'data'
][
'records'
];
for
(
var
i
in
data
){
$wobomztMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}}
},
ops
);
}
function
run
(){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/wozpjhbg/queryWozpjh"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
$div
.
find
(
".e-dialog-ok"
).
iMenubutton
({
text
:
"确定"
,
iconCls
:
"fa fa-save"
,
btnCls
:
"gui-btn-save"
,
onClick
:
function
(){
var
data
=
$datagrid
.
datagrid
(
"getChecked"
);
$div
.
closest
(
"form"
).
iDialog
(
"setStatus"
,{
"state"
:
"ok"
,
data
:
data
});
}
});
$searchBtn
.
iMenubutton
({
text
:
"搜索"
,
iconCls
:
"fa fa-search"
,
onClick
:
function
()
{
run
()
}
});
})
</script>
gavel/src/main/resources/templates/views/kmes/ysfk/bhgXq.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"bhgXqEdit"
class=
"e-dialog-container"
data-options=
"width:700,height:270"
>
<div
class=
"e-dialog-body"
>
<div
class=
"list"
style=
"height: 100%"
></div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$dialog
=
$
(
'#bhgXqEdit'
);
var
parmas
=
$dialog
.
parent
(
""
).
dialog
(
"options"
).
queryParams
.
id
;
HTTP
.
post
(
"kmes/ysfk/getYsfkbhg"
,{
mid
:
parmas
},
function
(
res
)
{
if
(
res
.
success
){
$dialog
.
find
(
".list"
).
datalist
({
valueField
:
"bhgxxCode"
,
textField
:
"bhgxxName"
,
data
:
res
.
data
.
records
||
[]
})
}
})
})
</script>
gavel/src/main/resources/templates/views/kmes/ysfk/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzgdysfk"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'hzgdysfkTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"hzgdysfkTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'hzgdysfkTable'}"
>
<div
class=
"navbar-toolbar"
>
<!--<a class="toolbar-print toolbar" href="javascript:void(0)"></a>-->
<!--<a class="toolbar-export toolbar" href="javascript:void(0)"></a>-->
<a
class=
"toolbar-bhgxq toolbar"
href=
"javascript:void(0)"
>
查看不合格信息
</a>
<a
class=
"toolbar-ngxx toolbar"
href=
"javascript:void(0)"
>
查看NG信息
</a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
序列号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wosnid"
id=
"wosngn_wosonid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
生产单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wodjid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
物料:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlinfo"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
项目:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"xminfo"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
客户:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"khinfo"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
校验日期:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"start"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"end"
style=
"width: 100%"
>
</div>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#hzgdysfk'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
var
$datStart
=
$div
.
find
(
"input[name='start']"
);
var
$datEnd
=
$div
.
find
(
"input[name='end']"
);
function
paramInit
(
ops
){
}
function
pageInit
()
{
$datStart
.
iDatebox
();
$datEnd
.
iDatebox
();
var
options
=
{
url
:
'kmes/ysfk'
,
noRequest
:
true
,
columns
:
[[
{
title
:
"验收单号"
,
field
:
"djid"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"产品条码"
,
field
:
"wosnid"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"生产订单"
,
field
:
"woDjid"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"项目编码"
,
field
:
"xmCode"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"项目名称"
,
field
:
"xmName"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"客户编码"
,
field
:
"khCode"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"客户名称"
,
field
:
"khName"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"验收结果"
,
field
:
"hgbz"
,
fieldType
:
"ftString"
,
width
:
70
,
align
:
'center'
,
formatter
:
function
(
value
,
index
,
row
)
{
var
map
=
{
"Y"
:
"<span style='color: green'>通过</span>"
,
"N"
:
"<span style='color: red'>不通过</span>"
};
var
text
=
map
[
value
];
return
text
||
""
;
}},
{
title
:
"验收人"
,
field
:
"fkr"
,
fieldType
:
"ftString"
,
width
:
180
},
{
title
:
"验收日期"
,
field
:
"ysrq"
,
fieldType
:
"ftDateTime"
},
{
title
:
"验收说明"
,
field
:
"yssm"
,
fieldType
:
"ftString"
,
width
:
300
}
// {title: "备注", field: "bz", fieldType: "ftString",width:300}
]],
dialog
:
{
footerIn
:
true
,
href
:
'hzgd/ysfk/edit'
}
};
$div
.
Holder
(
options
);
}
/*数据初始化*/
function
dataInit
(
ops
){
}
/*用户操作*/
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/ysfk/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
))
}
$div
.
find
(
".toolbar-bhgxq"
).
iMenubutton
({
text
:
'查看不合格信息'
,
onClick
:
function
(){
showdetialBhgXq
();
}
});
$div
.
find
(
".toolbar-ngxx"
).
iMenubutton
({
text
:
'查看NG信息'
,
onClick
:
function
(){
showdetialYsNGInfo
();
}
});
function
showdetialBhgXq
(){
var
selectedRow
=
$datagrid
.
getSelectedRow
();
if
(
selectedRow
==
null
){
$
.
messager
.
alert
(
'提示'
,
'请选中数据进行操作'
);
return
false
;
}
var
id
=
selectedRow
.
id
;
gas
.
Dialog
({
title
:
"不合格详情"
,
width
:
640
,
height
:
360
,
href
:
"kmes/ysfk/bhgXq"
,
onBeforeLoad
:
function
()
{
$
(
this
).
dialog
(
"options"
).
queryParams
=
{
id
:
id
}
},
})
};
function
showdetialYsNGInfo
(){
var
selectedRow
=
$datagrid
.
getSelectedRow
();
if
(
selectedRow
==
null
){
$
.
messager
.
alert
(
'提示'
,
'请选中数据进行操作'
);
return
false
;
}
var
id
=
selectedRow
.
id
;
gas
.
Dialog
({
title
:
"查看NG信息"
,
width
:
640
,
height
:
360
,
href
:
"kmes/ysfk/ngInfo"
,
onBeforeLoad
:
function
()
{
$
(
this
).
dialog
(
"options"
).
queryParams
=
{
id
:
id
}
},
})
};
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/ysfk/ysNginfo.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"bznrdetiails"
class=
"e-dialog-container"
data-options=
"width: 1020,height: 600"
>
<div
class=
"e-dialog-body"
style=
""
>
<div
style=
"width: 100%;height: 100%"
class=
"bznrList"
id =
"bznrList"
></div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$Container
=
$
(
"#bznrdetiails"
);
var
params
=
$Container
.
parent
().
dialog
(
"options"
).
queryParams
;
var
id
=
""
;
function
paramInit
(
ops
){
id
=
params
.
id
}
function
pageInit
(){
jglk
(
id
)
}
function
dataInit
(){
}
function
run
(){
}
function
jglk
(
rowData
)
{
var
$right
=
$Container
.
find
(
".bznrList"
);
var
$righColumns
=
[
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
100
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
200
},
{
title
:
"需求数量"
,
field
:
"xqsl"
,
width
:
200
},
{
title
:
"装配数量"
,
field
:
"zpsl"
,
width
:
200
},
];
$right
.
datagrid
({
title
:
"NG信息"
,
columns
:[
new
$
.
common
.
formatterCol
(
$righColumns
)],
pagination
:
false
});
HTTP
.
post
(
"kmes/ysfk/getYsfkNG"
,{
mid
:
id
},
function
(
res
)
{
if
(
res
.
success
){
$right
.
datagrid
(
"loadData"
,
res
.
data
.
records
||
[])
}
})
}
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/zbgz/edit.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzgdZbgzEdit"
class=
"e-dialog-container"
data-options=
"width:820,height:400"
>
<div
class=
"e-dialog-body"
>
<input
type=
"hidden"
name=
"flag"
>
<input
type=
"hidden"
name=
"id"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
编码:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"code"
data-toggle=
"gui-textbox"
data-options=
"required:true"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
名称:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"name"
data-toggle=
"gui-textbox"
data-options=
"required:true"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
一级装包数量:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"pfirst"
data-toggle=
"gui-numberbox"
data-options=
""
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
二级装包数量:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"psecond"
data-toggle=
"gui-numberbox"
data-options=
""
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
三级装包数量:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"pthird"
data-toggle=
"gui-numberbox"
data-options=
""
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
四级装包数量:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"pforth"
data-toggle=
"gui-numberbox"
data-options=
""
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
一级装包条码规则:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gfirst"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
二级装包条码规则:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gsecond"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
三级装包条码规则:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gthird"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
四级装包条码规则:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gforth"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-block"
style=
"margin-left: 56px"
data-toggle=
"gui-checkbox"
data-options=
"label:'单件装箱:',labelPosition:'left'"
>
<input
type=
"checkbox"
name=
"djzx"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
备注:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bz"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#hzgdZbgzEdit'
);
var
$cbxFirst
=
$div
.
find
(
'input[name="gfirst"]'
);
var
$cbxSecond
=
$div
.
find
(
'input[name="gsecond"]'
);
var
$cbxThird
=
$div
.
find
(
'input[name="gthird"]'
);
var
$cbxForth
=
$div
.
find
(
'input[name="gforth"]'
);
function
pageInit
(
ops
){
$cbxFirst
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
});
$cbxSecond
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
});
$cbxThird
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
});
$cbxForth
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
});
}
function
dataInit
(
ops
){
gas
.
post
(
"kmes/coderule/query"
,{},
function
(
result
)
{
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
$cbxFirst
.
combobox
(
"loadData"
,
result
.
data
.
records
);
$cbxSecond
.
combobox
(
"loadData"
,
result
.
data
.
records
);
$cbxThird
.
combobox
(
"loadData"
,
result
.
data
.
records
);
$cbxForth
.
combobox
(
"loadData"
,
result
.
data
.
records
);
}
},
ops
);
}
gas
.
load
(
pageInit
,
dataInit
);
})
</script>
gavel/src/main/resources/templates/views/kmes/zbgz/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzgdZbgz"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'hzgdZbgzTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"hzgdZbgzTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'hzgdZbgzTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-review toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-add toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-copy toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-edit toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-delete toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
</ul>
<!-- <span class="toolbar-search-span"><a class="toolbar-search" href="javascript:void(0)"></a></span>-->
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
/*js初始化*/
var
$div
=
$
(
'#hzgdZbgz'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
function
paramInit
(
ops
){
}
function
pageInit
()
{
var
options
=
{
url
:
'kmes/zbgz'
,
noRequest
:
true
,
columns
:
[[
{
title
:
"编码"
,
field
:
"code"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"名称"
,
field
:
"name"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"单件装箱"
,
field
:
"djzx"
,
fieldType
:
"ftString"
,
width
:
80
,
align
:
'center'
,
formatter
:
function
(
value
,
index
,
row
)
{
var
map
=
{
"Y"
:
"<span style='color: green'>是</span>"
,
"N"
:
"否"
};
var
text
=
map
[
value
];
return
text
||
""
;
}},
{
title
:
"一级装包数量"
,
field
:
"pfirst"
,
fieldType
:
"int"
},
{
title
:
"二级装包数量"
,
field
:
"psecond"
,
fieldType
:
"int"
},
{
title
:
"三级装包数量"
,
field
:
"pthird"
,
fieldType
:
"int"
},
{
title
:
"四级装包数量"
,
field
:
"pforth"
,
fieldType
:
"int"
},
{
title
:
"一级装包条码规则"
,
field
:
"azbsnname"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"二级装包条码规则"
,
field
:
"bzbsnname"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"三级装包条码规则"
,
field
:
"czbsnname"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"四级装包条码规则"
,
field
:
"dzbsnname"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"维护人"
,
field
:
"whr"
,
fieldType
:
"ftString"
},
{
title
:
"维护时间"
,
field
:
"whsj"
,
fieldType
:
"ftDateTime"
}
]],
dialog
:
{
footerIn
:
true
,
href
:
'kmes/zbgz/edit'
}
};
$div
.
Holder
(
options
);
}
/*数据初始化*/
function
dataInit
(
ops
){
}
/*用户操作*/
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/zbgz/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
))
}
$
(
function
()
{
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/zbgzsz/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"zbgzszWlxx"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'zbgzszWlxxTable',herf:'kzzx/gridset/query'"
>
</table>
<div
id=
"zbgzszWlxxTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'zbgzszWlxxTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-zbsnsz toolbar"
href=
"javascript:void(0)"
>
装包规则设置
</a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
物料信息:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"condition"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#zbgzszWlxx'
);
var
sngzData
=
{};
var
promise
=
new
Promise
(
function
(
reslove
,
reject
)
{
HTTP
.
post
(
'jcsj/snrule/init/sngz'
,{},
function
(
result
)
{
if
(
result
[
"success"
]){
var
data
=
result
[
"data"
][
"records"
]
||
[];
for
(
var
i
in
data
){
sngzData
[
data
[
i
].
id
]
=
data
[
i
].
name
}
reslove
(
sngzData
)
}
});
});
promise
.
then
(
function
(
result
){
var
options
=
{
url
:
'kmes/zbgzsz'
,
queryParams
:{
condition
:
$div
.
find
(
'form input[name="condition"]'
).
val
()
},
columns
:[[
{
title
:
"物料编码"
,
field
:
"code"
,
width
:
160
},
{
title
:
"物料名称"
,
field
:
"name"
,
width
:
160
},
{
title
:
"规格"
,
field
:
"gg"
,
width
:
160
},
{
title
:
"装包规则编码"
,
field
:
"zbgzcode"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"装包规则名称"
,
field
:
"zbgzname"
,
fieldType
:
"ftString"
,
width
:
160
},
{
title
:
"一级装包数量"
,
field
:
"pfirst"
,
fieldType
:
"int"
},
{
title
:
"二级装包数量"
,
field
:
"psecond"
,
fieldType
:
"int"
},
{
title
:
"三级装包数量"
,
field
:
"pthird"
,
fieldType
:
"int"
},
{
title
:
"四级装包数量"
,
field
:
"pforth"
,
fieldType
:
"int"
},
{
title
:
"一级装包条码规则"
,
field
:
"azbsnname"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"二级装包条码规则"
,
field
:
"bzbsnname"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"三级装包条码规则"
,
field
:
"czbsnname"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"四级装包条码规则"
,
field
:
"dzbsnname"
,
fieldType
:
"ftString"
,
width
:
140
}
]]
};
$div
.
Holder
(
options
);
});
$
(
'.toolbar-zbsnsz'
).
iMenubutton
({
event
:
'openDialog'
,
iconCls
:
'fa fa-plus'
,
dialog
:{
title
:
'装包规则设置'
,
href
:
'kmes/zbgzsz/zbsnsz'
,
footerIn
:
true
,
tag
:
'add'
,
onSaveCallback
:
function
(
opt
,
data
)
{
$div
.
find
(
'.toolbar-search'
).
click
();
}
}
});
});
</script>
gavel/src/main/resources/templates/views/kmes/zbgzsz/zbsnsz.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"zbsnszWlxxEdit"
class=
"e-dialog-container"
data-options=
"width:520,height:220"
>
<div
class=
"e-dialog-body"
>
<input
type=
"hidden"
name=
"flag"
>
<input
type=
"hidden"
name=
"id"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
物料编码:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
data-options=
"required:true"
data-toggle=
"gui-textbox"
data-title=
"name"
style=
"width: 100%"
>
<input
type=
"hidden"
name=
"name"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
装包规则:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"zbgzid"
data-toggle=
"gui-textbox"
data-options=
"required:true"
>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#zbsnszWlxxEdit'
);
Auxiliary
.
box
(
$div
.
find
(
'input[name="wlid"]'
),
"WLID"
);
$div
.
find
(
'input[name="zbgzid"]'
).
iCombobox
({
url
:
'kmes/zbgz/query'
,
valueField
:
'id'
,
textField
:
'name'
,
allowNull
:
true
,
loadFilter
:
function
(
a
)
{
return
a
[
"data"
][
"records"
]
}
});
$div
.
find
(
".e-dialog-ok"
).
iMenubutton
({
text
:
"确定"
,
iconCls
:
"fa fa-save"
,
btnCls
:
"gui-btn-save"
,
onClick
:
function
(){
HTTP
.
post
(
"kmes/zbgzsz/zbsnsz"
,{
wlid
:
$div
.
find
(
'input[name="wlid"]'
).
val
(),
zbgzid
:
$div
.
find
(
'input[name="zbgzid"]'
).
val
()},
function
(
res
)
{
if
(
res
.
success
){
$div
.
closest
(
"form"
).
iDialog
(
"setStatus"
,{
"state"
:
"ok"
,
data
:
res
.
data
});
}
else
{
$
.
messager
.
alert
(
"提示"
,
res
.
message
);
}
})
}
});
});
</script>
gavel/src/main/resources/templates/views/kmes/zbsnrule/edit.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzgdzbsnruleEdit"
class=
"e-dialog-container"
data-options=
"width:640,height:280"
>
<div
class=
"e-dialog-body"
>
<input
type=
"hidden"
name=
"flag"
>
<input
type=
"hidden"
name=
"id"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
编码:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"code"
data-toggle=
"gui-textbox"
data-options=
"required:true"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
名称:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"name"
data-toggle=
"gui-textbox"
data-options=
"required:true"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
前缀:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"qz"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
后缀:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"hz"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
长度:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"cd"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
备注:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bz"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#hzgdzbsnruleEdit'
);
//新增初始化
if
(
$div
.
closest
(
"form"
).
attr
(
"tag"
)
==
"add"
){
$div
.
find
(
"input[name='cd']"
).
val
(
10
);
}
$div
.
find
(
'input[name="gz"]'
).
iCombobox
({
url
:
'jcsj/snrule/init/sngz'
,
valueField
:
'id'
,
textField
:
'name'
,
allowNull
:
true
,
loadFilter
:
function
(
a
)
{
return
a
[
"data"
][
"records"
]}
});
})
</script>
\ No newline at end of file
gavel/src/main/resources/templates/views/kmes/zbsnrule/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzgdzbsnrule"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'hzgdzbsnruleTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"hzgdzbsnruleTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'hzgdzbsnruleTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-review toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-add toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-copy toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-edit toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-delete toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
</ul>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
/*js初始化*/
var
$div
=
$
(
'#hzgdzbsnrule'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
var
sngzData
=
{};
function
paramInit
(
ops
){
HTTP
.
post
(
'jcsj/snrule/init/sngz'
,{},
function
(
result
)
{
if
(
result
[
"success"
]){
var
data
=
result
[
"data"
][
"records"
]
||
[];
for
(
var
i
in
data
){
sngzData
[
data
[
i
].
id
]
=
data
[
i
].
name
}
}
});
}
function
pageInit
()
{
var
options
=
{
url
:
'kmes/zbsnrule'
,
noRequest
:
true
,
columns
:
[[
{
title
:
"编码"
,
field
:
"code"
,
fieldType
:
"ftString"
,
width
:
120
},
{
title
:
"名称"
,
field
:
"name"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"编码规则"
,
field
:
"gz"
,
fieldType
:
"ftString"
,
width
:
160
,
formatter
:
function
(
value
,
index
,
row
)
{
var
text
=
sngzData
[
value
];
return
text
||
""
;
}
},
{
title
:
"前缀"
,
field
:
"qz"
,
fieldType
:
"ftString"
,
width
:
100
},
{
title
:
"后缀"
,
field
:
"hz"
,
fieldType
:
"ftString"
,
width
:
100
},
{
title
:
"长度"
,
field
:
"cd"
,
fieldType
:
"int"
},
{
title
:
"最大流水号"
,
field
:
"lsh"
,
fieldType
:
"int"
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"维护人"
,
field
:
"whr"
,
fieldType
:
"ftString"
},
{
title
:
"维护时间"
,
field
:
"whsj"
,
fieldType
:
"ftDateTime"
}
]],
dialog
:
{
footerIn
:
true
,
href
:
'kmes/zbsnrule/edit'
}
};
$div
.
Holder
(
options
);
}
/*数据初始化*/
function
dataInit
(
ops
){
}
/*用户操作*/
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/zbsnrule/query"
;
$datagrid
.
datagrid
(
"reload"
,
DataBind
.
collectData
(
$div
))
}
$
(
function
()
{
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/zpdm/addgjwl.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"zpdmSearchAdd"
class=
"e-dialog-container"
data-options=
"title:'按采购收货单生成',width: 1024, height: 600"
>
<div>
<div
class=
"mx-dataTable"
style=
"bottom: 40px"
>
<table
id =
"zpdmSearchAddTable"
class=
"toolbar-table mx-dataTable"
style=
"bottom: 60px"
data-options=
"id: 'zpdmSearchAddTable',herf:'kzzx/gridset/query'"
>
</table>
<div
id=
"zpdmSearchAddTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'zpdmSearchAddTable'}"
>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
收货日期:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"ksrq"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"jsrq"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
收货单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"djid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
物料信息:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
class=
"gui-textbox"
data-options=
""
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
供应商:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gysid"
class=
"gui-textbox"
data-options=
""
style=
"width: 100%"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
>
<a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a>
</span>
</form>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
/*js初始化*/
$
(
function
()
{
var
$div
=
$
(
'#zpdmSearchAdd'
);
var
$datagrid
=
$
(
"#zpdmSearchAddTable"
);
var
$datKsrq
=
$div
.
find
(
'input[name="ksrq"]'
);
var
$datJsrq
=
$div
.
find
(
'input[name="jsrq"]'
);
var
params
=
$div
.
parent
(
"form"
).
dialog
(
"options"
).
params
;
var
$edtGysid
=
$div
.
find
(
'input[name="gysid"]'
);
var
$searchBtn
=
$div
.
find
(
".toolbar-search"
);
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
function
paramInit
(
ops
){
}
function
pageInit
(
ops
){
var
columns
=
[
{
field
:
"ck"
,
checkbox
:
true
},
{
title
:
"收货ID"
,
field
:
"id"
,
"width"
:
120
,
hidden
:
true
},
{
title
:
"收货单号"
,
field
:
"shid"
,
"width"
:
120
},
{
title
:
"到货日期"
,
field
:
"ywrq"
,
"fieldType"
:
'ftDate'
},
{
title
:
"物料ID"
,
field
:
"wlid"
,
width
:
120
,
hidden
:
true
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
140
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
},
{
title
:
"需求数量"
,
field
:
"shsl"
,
fieldType
:
"int"
},
{
title
:
"规格"
,
field
:
"wlxxGg"
,
width
:
140
},
{
title
:
"供应商ID"
,
field
:
"gysid"
,
width
:
120
,
hidden
:
true
},
{
title
:
"供应商"
,
field
:
"gysName"
,
width
:
160
},
{
title
:
"机种"
,
field
:
"jzname"
,
width
:
140
}
]
$datagrid
.
DataTableEditing
({
columns
:[
new
$
.
common
.
formatterCol
(
columns
)],
pagination
:
false
,
allowAdd
:
false
,
singleSelect
:
true
});
$datKsrq
.
iDatebox
();
$datJsrq
.
iDatebox
();
Auxiliary
.
box
(
$edtGysid
,
'GYSID'
);
}
function
dataInit
(
ops
){
gas
.
postHTTP
(
"common/datetime"
,{},
function
(
response1
)
{
var
date
=
new
Date
(
response1
.
data
.
data
);
$datKsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
beginOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
$datJsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
endOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
},
ops
);
}
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/zpdm/getgjjdh"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
$searchBtn
.
iMenubutton
({
text
:
"搜索"
,
iconCls
:
"fa fa-search"
,
onClick
:
function
()
{
run
()
}
});
$div
.
find
(
".e-dialog-ok"
).
iMenubutton
({
text
:
"确认"
,
iconCls
:
"fa fa-save"
,
btnCls
:
"gui-btn-save"
,
onClick
:
function
(){
$datagrid
.
datagrid
(
"acceptChanges"
);
var
datas
=
$datagrid
.
datagrid
(
"getChecked"
);
$
.
each
(
datas
,
function
(
i
,
item
)
{
item
[
"lydjid"
]
=
item
[
'id'
];
item
[
"xqsl"
]
=
item
[
'shsl'
]
||
0
;
delete
item
[
'id'
];
});
HTTP
.
post
(
"kmes/zpdm/batchData"
,{
datas
:
datas
},
function
(
res
)
{
if
(
res
.
success
){
$
.
messager
.
alert
(
"提示"
,
"数据操作成功"
);
$div
.
closest
(
"form"
).
iDialog
(
"setStatus"
,{
"state"
:
"ok"
,
data
:
res
.
data
});
}
else
{
$
.
messager
.
alert
(
"提示"
,
res
.
message
);
}
})
}
});
})
</script>
gavel/src/main/resources/templates/views/kmes/zpdm/autoadd.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"zpwlsnAutoadd"
class=
"e-dialog-container"
data-options=
"width:620,height:560"
>
<div
class=
"editTable"
>
<input
type=
"hidden"
name=
"flag"
>
<input
type=
"hidden"
name=
"id"
>
<input
type=
"hidden"
name =
"wlid"
>
<input
type=
"hidden"
name =
"lydjid"
>
<input
type=
"hidden"
name =
"wlph"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
数量:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"count"
class=
"gui-numberbox"
data-options=
"required:true"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
id=
"zpwlsnAuto"
class=
"gui-col-sm12"
></div>
</div>
<div
class=
"gui-row"
style=
"overflow-y: auto;height: 300px"
>
<div
id=
"zpwlsnAutosp"
class=
"gui-col-sm12"
></div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
style=
"background: #f76821;"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$dialog
=
$
(
'#zpwlsnAutoadd'
);
var
$span
=
$
(
"#zpwlsnAutosp"
);
var
$pan
=
$
(
"#zpwlsnAuto"
);
var
sefw
=
[];
var
khsnCRList
=
[];
function
paramsInit
(
ops
){
$dialog
.
find
(
'input[name="wlid"]'
).
val
(
$dialog
.
parent
().
dialog
(
"options"
).
queryParams
.
wlid
);
$dialog
.
find
(
'input[name="lydjid"]'
).
val
(
$dialog
.
parent
().
dialog
(
"options"
).
queryParams
.
lydjid
);
$dialog
.
find
(
'input[name="wlph"]'
).
val
(
$dialog
.
parent
().
dialog
(
"options"
).
queryParams
.
wlph
);
gas
.
post
(
"kmes/zpdm/getDhgjWlsnCR"
,{
wlid
:
$dialog
.
find
(
'input[name="wlid"]'
).
val
()},
function
(
result
)
{
if
(
result
[
'success'
]){
sefw
=
result
[
'data'
][
'records'
][
"wosnCRList"
];
}
},
ops
);
}
function
dataInit
(
ops
){
//获取本次打印数量
}
function
pageInit
(
ops
){
var
$s
=
$
(
"<label class=
\"
gui-form-label
\"
>序列号:</label>"
+
"<div class=
\"
gui-input-block
\"
>"
+
"<input type=
\"
text
\"
name=
\"
xhe
\"
id=
\"
ss
\"
data-toggle=
\"
gui-textbox
\"
readonly style='width: 100%'>"
+
"</div>"
);
$pan
.
append
(
$s
);
sefw
=
sefw
.
sort
(
sortByArr
([
'xh'
],
true
));
$
.
each
(
sefw
,
function
(
i
,
item
)
{
var
value
=
item
.
value
||
''
;
var
label
=
""
;
if
(
item
.
bz
){
label
=
item
.
bz
+
":"
}
var
read
=
false
;
if
(
item
.
canedit
==
'N'
){
read
=
"true"
}
var
p
=
$
(
'<label class="gui-form-label">'
+
label
+
'</label><div class="gui-input-block" style="margin-bottom: 10px">'
+
'<input type="text" data-toggle="gui-textbox" value="'
+
value
+
'" name="'
+
item
.
xh
+
'" data-options="disabled:'
+
read
+
'" style="width: 100%">'
+
'</div>'
);
$span
.
append
(
p
);
});
var
ss
=
$pan
.
find
(
"#ss"
);
$span
.
find
(
'[data-toggle="gui-textbox"]'
).
each
(
function
(
b
)
{
var
c
=
$
(
this
),
d
=
getOptionsJson
(
c
);
c
.
iTextbox
(
$
.
extend
({},
d
,{
inputEvents
:
$
.
extend
({},
$
.
fn
.
textbox
.
defaults
.
inputEvents
,{
keyup
:
function
(
event
){
var
value
=
$
(
this
).
val
();
var
name
=
$
(
this
).
next
().
attr
(
"name"
);
var
values
=
''
;
$span
.
find
(
'[data-toggle="gui-textbox"]'
).
each
(
function
(
a
,
b
)
{
var
r
=
$
(
b
).
textbox
(
"getValue"
);
if
(
$
(
b
).
attr
(
"textboxname"
)
==
name
){
r
=
value
}
values
+=
r
})
ss
.
textbox
(
"setValue"
,
values
);
},
})
}))
})
var
valuess
=
""
;
$span
.
find
(
'[data-toggle="gui-textbox"]'
).
each
(
function
(
a
,
b
)
{
var
r
=
$
(
b
).
textbox
(
"getValue"
);
valuess
+=
r
});
ss
.
iTextbox
({
value
:
valuess
})
}
function
run
(){
}
$dialog
.
find
(
".e-dialog-ok"
).
iMenubutton
({
text
:
"确定"
,
iconCls
:
"fa fa-save"
,
btnCls
:
"gui-btn-save"
,
onClick
:
function
(){
var
data
=
DataBind
.
collectData
(
$dialog
);
var
codeValueList
=
sefw
;
$
.
each
(
codeValueList
,
function
(
i
,
item
)
{
if
(
item
[
"xh"
]
&&
data
[
item
[
"xh"
]]){
item
[
"value"
]
=
data
[
item
[
"xh"
]]
}
})
var
parms
=
{
"wlid"
:
data
.
wlid
,
"lydjid"
:
data
.
lydjid
,
"wlph"
:
data
.
wlph
,
"count"
:
data
.
count
,
"codeValueList"
:
codeValueList
};
HTTP
.
post
(
"kmes/zpdm/createGjWlsn"
,
parms
,
function
(
res
)
{
if
(
res
.
success
){
gas
.
showTips
(
"操作成功"
);
$dialog
.
parent
().
iDialog
(
"setStatus"
,{
"state"
:
"ok"
,
data
:[]});
}
else
{
gas
.
showTipsError
(
res
.
message
||
"操作失败"
);
}
})
}
});
$dialog
.
find
(
".e-dialog-cancel"
).
iMenubutton
({
text
:
"关闭"
,
iconCls
:
"fa fa-close"
,
btnCls
:
"gui-btn-save"
,
onClick
:
function
()
{
$dialog
.
parent
(
""
).
iDialog
(
"destroy"
);
}
});
gas
.
load
(
paramsInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/zpdm/edit.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzgdUshgjwlEdit"
class=
"e-dialog-container"
data-options=
"width:700,height:280"
>
<div
class=
"e-dialog-body"
>
<input
type=
"hidden"
name=
"flag"
>
<input
type=
"hidden"
name=
"id"
>
<input
type=
"hidden"
name=
"lydjid"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
到货单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"djid"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
到货日期:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"dhrq"
data-toggle=
"gui-datebox"
data-options=
""
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
物料:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
data-options=
"required:true"
data-title=
"wlxxName"
data-toggle=
"gui-textbox"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
供应商:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gysid"
data-toggle=
"gui-textbox"
data-title=
"gysName"
data-options=
"required:true"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
项目:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"xmid"
data-toggle=
"gui-textbox"
data-title=
"gcxmName"
data-options=
""
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
需求数量:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"xqsl"
data-toggle=
"gui-textbox"
data-options=
"required:true"
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
备注:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bz"
data-toggle=
"gui-textbox"
data-options=
""
>
</div>
</div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<a
href=
"javascript:void(0);"
class=
"e-dialog-ok"
></a>
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$div
=
$
(
'#hzgdUshgjwlEdit'
);
var
$edtWlid
=
$div
.
find
(
'input[name="wlid"]'
);
var
$cbxGysid
=
$div
.
find
(
'input[name="gysid"]'
);
var
$cbxXmid
=
$div
.
find
(
'input[name="xmid"]'
);
var
$datDhrq
=
$div
.
find
(
'input[name="dhrq"]'
);
gas
.
load
(
pageInit
,
dataInit
);
function
pageInit
(
ops
){
Auxiliary
.
box
(
$edtWlid
,
"WLID"
);
Auxiliary
.
box
(
$cbxGysid
,
"GYSID"
);
Auxiliary
.
box
(
$cbxXmid
,
"XMID"
);
$datDhrq
.
iDatebox
();
}
function
dataInit
(
ops
){
if
(
$div
.
closest
(
"form"
).
attr
(
"tag"
)
==
"add"
){
gas
.
post
(
"common/datetime"
,{},
function
(
result
)
{
if
(
result
[
'success'
]
&&
result
[
'data'
][
'data'
]){
var
date
=
new
Date
(
result
[
'data'
][
'data'
]);
$datDhrq
.
iDatebox
({
value
:
DateUtils
.
format
(
date
)});
}
},
ops
);
}
}
})
</script>
\ No newline at end of file
gavel/src/main/resources/templates/views/kmes/zpdm/index.html
deleted
100644 → 0
View file @
070ba420
<style>
#hzgdUshgjwlList
{
top
:
0
}
</style>
<div
id=
"hzgdUshgjwl"
class=
"gui-layout gui-div"
style=
"height: 100%;width:100%;position: relative;overflow: hidden"
>
<div
data-options=
"region:'north'"
style=
"height:112px;width:100%;"
>
<div
class=
"gui-toolbar"
style=
"display: block"
data-options=
"grid:{type:'datagrid',id:'hzgdUshgjwlTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-export toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-add toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-edit toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-delete toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-addgjwl toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-wlsn toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-zpwlsn toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
到货日期:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"ksrq"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"jsrq"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
到货单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"djid"
class=
"gui-textbox"
style=
"width: 100%"
>
<input
type=
"hidden"
name=
"lydjid"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
物料信息:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
class=
"gui-textbox"
data-options=
""
style=
"width: 100%"
>
</div>
</div>
</li>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
供应商信息:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gysinfo"
class=
"gui-textbox"
data-options=
""
style=
"width: 100%"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search1"
href=
"javascript:void(0)"
style=
"color: white"
></a></span>
</form>
</div>
</div>
</div>
<div
data-options=
"region:'center'"
>
<div
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'hzgdUshgjwlTable',herf:'kzzx/gridset/query',type:'datagrid'"
></table>
</div>
</div>
<div
data-options=
"region:'east',split:true"
style=
"width:30%;height:100%;position: relative"
>
<div
id=
"hzgdUshgjwlList"
class=
"gui-div"
>
<div
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'hzgdUshgjwlListTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
style=
"display: none"
></a>
</div>
</div>
<table
class=
"toolbar-table"
data-options=
"id: 'hzgdUshgjwlListTable',herf:'kzzx/gridset/query'"
></table>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#hzgdUshgjwl'
);
var
$hzgdList
=
$
(
"#hzgdUshgjwlList"
);
var
$datKsrq
=
$div
.
find
(
'input[name="ksrq"]'
);
var
$datJsrq
=
$div
.
find
(
'input[name="jsrq"]'
);
var
$datLydjid
=
$div
.
find
(
'input[name="lydjid"]'
);
var
$datagrid
=
$div
.
find
(
'.toolbar-table:first'
);
var
$datagridWo
=
$hzgdList
.
find
(
'.toolbar-table:first'
);
var
$searchBtn
=
$div
.
find
(
".toolbar-search1"
);
var
$tmbdBtn
=
$div
.
find
(
".toolbar-zpwlsn"
);
var
$djlyMap
=
{};
var
$wlsxColumns
=
[];
function
paramInit
(
ops
){
gas
.
post
(
"kmes/zpdm/init/djly"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
var
data
=
result
[
'data'
][
'records'
];
for
(
var
i
in
data
){
$djlyMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}
}
},
ops
);
initWlsxColumns
(
$wlsxColumns
,
ops
);
}
function
pageInit
(
ops
)
{
var
options
=
{
url
:
"kmes/zpdm"
,
noRequest
:
true
,
columns
:
[[
{
title
:
"到货单号"
,
field
:
"djid"
,
fieldType
:
"ftString"
,
width
:
120
},
{
title
:
"到货日期"
,
field
:
"dhrq"
,
fieldType
:
"ftDate"
},
{
title
:
"供应商编码"
,
field
:
"gysid"
,
fieldType
:
"ftString"
,
width
:
140
,
hidden
:
true
},
{
title
:
"供应商"
,
field
:
"gysName"
,
fieldType
:
"ftString"
,
width
:
180
},
{
title
:
"物料编码"
,
field
:
"wlid"
,
fieldType
:
"ftString"
,
width
:
140
,
hidden
:
true
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
140
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
},
{
title
:
"规格"
,
field
:
"wlxxGg"
,
width
:
140
},
{
title
:
"批号"
,
field
:
"wlph"
,
width
:
140
},
{
title
:
"需求数量"
,
field
:
"xqsl"
,
fieldType
:
"int"
},
{
title
:
"机种"
,
field
:
"jzname"
,
width
:
140
},
{
title
:
"项目名称"
,
field
:
"gcxmName"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"单据来源"
,
field
:
"djly"
,
fieldType
:
"ftString"
,
width
:
100
,
formatter
:
function
(
value
,
index
,
row
)
{
var
text
=
$djlyMap
[
value
];
return
text
||
""
;
}
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
200
},
{
title
:
"维护人"
,
field
:
"whr"
,
fieldType
:
"ftString"
},
{
title
:
"维护时间"
,
field
:
"whsj"
,
fieldType
:
"ftDateTime"
}
].
concat
(
$wlsxColumns
,
ops
)],
dialog
:{
href
:
"kmes/zpdm/edit"
,
footerIn
:
true
},
onLoadSuccess
:
function
()
{
},
datagrid
:{
onSelect
:
function
(
rowIndex
,
rowData
)
{
if
(
rowData
){
loadList
(
rowData
.
id
)
}
}
}
};
$div
.
Holder
(
options
);
$datKsrq
.
iDatebox
();
$datJsrq
.
iDatebox
();
$searchBtn
.
iMenubutton
({
iconCls
:
'fa fa-search1'
,
text
:
'搜索'
,
onClick
:
function
()
{
run
();
/* loadList('1')*/
}
});
$hzgdList
.
Container
({
title
:
"条码"
,
rownumbers
:
true
,
columns
:
[
new
$
.
common
.
formatterCol
([
{
title
:
"物料序列号"
,
field
:
"code"
,
width
:
240
},
{
title
:
"物料打印分类"
,
field
:
"sx01"
,
width
:
120
}
])
],
pagination
:
true
,
fitColumns
:
true
,
scrollbarSize
:
0
});
}
/*数据初始化*/
function
dataInit
(
ops
){
gas
.
postHTTP
(
"common/datetime"
,{},
function
(
response1
)
{
var
date
=
new
Date
(
response1
.
data
.
data
);
$datKsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
beginOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
$datJsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
endOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
},
ops
);
}
/*用户操作*/
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/zpdm/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
function
loadList
(
id
)
{
$datagridWo
.
datagrid
(
"loading"
);
$datLydjid
.
val
(
id
);
HTTP
.
post
(
"kmes/zpdm/wlsn/query"
,{
lydjid
:
id
},
function
(
res
)
{
if
(
res
.
success
){
$datagridWo
.
datagrid
(
"loaded"
);
$datagridWo
.
datagrid
(
"loadData"
,
res
.
data
.
records
||
[])
}
})
}
$div
.
find
(
".toolbar-addgjwl"
).
iMenubutton
({
text
:
"按采购收货单生成"
,
dialog
:{
title
:
"按采购收货单生成"
,
href
:
'kmes/zpdm/addgjwl'
,
tag
:
'add'
,
footerIn
:
true
,
onSaveCallback
:
function
(
opt
,
data
)
{
$div
.
find
(
'.toolbar-search1'
).
click
();
}
}
});
$div
.
find
(
".toolbar-wlsn"
).
iMenubutton
({
text
:
"条码绑定"
,
iconCls
:
'fa fa-check-square-o'
,
btnCls
:
'gui-btn-warm'
,
event
:
"openDialog"
,
dialog
:{
href
:
'kmes/zpdm/wlsn/add/index'
,
footerIn
:
true
,
/* url:true,
tag:"edit",*/
title
:
"条码绑定"
,
cancelNoMessage
:
true
,
onBeforeLoad
:
function
()
{
var
selected
=
$datagrid
.
datagrid
(
"getSelected"
);
$
(
this
).
dialog
(
"options"
).
queryParams
=
{
"lydjid"
:
selected
.
id
||
""
,
"wlid"
:
selected
.
wlid
||
""
,
"wlxxCode"
:
selected
.
wlxxCode
||
""
,
"wlph"
:
selected
.
wlph
||
""
}
},
onSaveCallback
:
function
(
a
,
b
)
{
var
selectedRow
=
$datagrid
.
datagrid
(
"getSelected"
);
var
rowIndex
=
$datagrid
.
datagrid
(
"getRowIndex"
,
selectedRow
);
$datagrid
.
datagrid
(
"updateRow"
,{
index
:
rowIndex
,
row
:{
sncount
:
b
}
});
}
}
});
$tmbdBtn
.
iMenubutton
({
text
:
"条码生成"
,
iconCls
:
"fa fa-bullseye"
,
onClick
:
function
()
{
var
selected
=
$div
.
find
(
".toolbar-table"
).
datagrid
(
"getSelected"
);
if
(
!
selected
){
gas
.
showCenterTips
(
"请选择一条到货单操作"
);
return
false
}
gas
.
Dialog
({
width
:
1040
,
height
:
640
,
title
:
'生成条码'
,
href
:
"kmes/zpdm/auto/add/index"
,
footerIn
:
true
,
onBeforeLoad
:
function
()
{
$
(
this
).
dialog
(
"options"
).
queryParams
=
{
lydjid
:
selected
[
"id"
],
wlph
:
selected
[
"wlph"
],
wlid
:
selected
[
"wlid"
]}
},
onSaveCallback
:
function
(
a
,
b
)
{
var
rowData
=
$div
.
find
(
".toolbar-table"
).
datagrid
(
"getSelected"
);
if
(
rowData
){
gas
.
post
(
"kmes/zpdm/wlsn/query"
,{
lydjid
:
rowData
[
"id"
]},
function
(
res
)
{
if
(
res
.
success
){
$datagridWo
.
datagrid
(
"loadData"
,
res
.
data
.
records
||
[])
}
})
}
}
})
}
});
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/zpdm/wlsn.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"uzpdmWlsn"
class=
"e-dialog-container"
data-options=
"width:600,height:620"
>
<div
class=
"editTable"
>
<input
type=
"hidden"
name=
"flag"
>
<input
type=
"hidden"
name =
"id"
>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
物料:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlxxCode"
data-toggle=
"gui-textbox"
readonly
>
</div>
</div>
</div>
<div
class=
"gui-row"
>
<div
class=
"gui-col-sm12"
>
<label
class=
"gui-form-label"
>
条码:
</label>
<div
class=
"gui-input-block"
style=
"height: 100%"
>
<input
type=
"text"
name=
"code"
data-options=
"required:true"
id=
"zpdmWlsnEdit_input"
data-toggle=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"mx-dataTable"
style=
"padding: 10px;margin-top: 120px;bottom: 40px"
>
<div
style=
"height: 100%;width: 100%"
id=
"zpdmWlsnEdit"
></div>
</div>
</div>
<div
class=
"e-dialog-footer"
>
<!-- <a href="javascript:void(0);" class="e-dialog-ok"></a>-->
<a
href=
"javascript:void(0);"
class=
"e-dialog-cancel"
data-options=
"noMessage:true"
></a>
</div>
</div>
<script>
$
(
function
()
{
var
$dialog
=
$
(
'#uzpdmWlsn'
);
var
$list
=
$
(
"#zpdmWlsnEdit"
);
var
$input
=
$
(
"#zpdmWlsnEdit_input"
);
var
parmas
=
$dialog
.
parents
(
"form"
).
dialog
(
"options"
).
queryParams
;
;
$dialog
.
find
(
'input[name="wlxxCode"]'
).
val
(
parmas
.
wlxxCode
);
var
columns
=
[
{
title
:
"id"
,
field
:
"id"
,
width
:
"100"
,
hidden
:
true
},
{
title
:
"条码"
,
field
:
"code"
,
width
:
"100"
}
];
$list
.
datagrid
({
rownumbers
:
true
,
columns
:[
new
$
.
common
.
formatterCol
(
columns
)],
pagination
:
false
,
fitColumns
:
true
,
toolbar
:[{
iconCls
:
'fa fa-trash'
,
text
:
'删除'
,
handler
:
function
(){
var
selected
=
$list
.
datagrid
(
"getSelected"
);
if
(
!
selected
){
return
false
}
var
index
=
$list
.
datagrid
(
"getRowIndex"
,
selected
);
HTTP
.
post
(
"kmes/zpdm/wlsn/delete"
,
selected
,
function
(
res
)
{
if
(
res
.
success
){
gas
.
showTips
(
"删除成功"
);
$list
.
datagrid
(
"deleteRow"
,
index
);
}
else
{
gas
.
showTipsError
(
res
.
message
||
"删除失败"
)
}
})
}
}]
});
HTTP
.
post
(
"kmes/zpdm/wlsn/query"
,{
"lydjid"
:
parmas
.
lydjid
},
function
(
res
)
{
if
(
res
.
success
){
$list
.
datagrid
(
"loadData"
,
res
.
data
.
records
||
[]);
}
});
$input
.
textbox
({
inputEvents
:
$
.
extend
({},
$
.
fn
.
textbox
.
defaults
.
inputEvents
,
{
keyup
:
function
(
event
)
{
if
(
event
.
keyCode
==
"13"
){
HTTP
.
post
(
"kmes/zpdm/wlsn/add"
,{
wlid
:
parmas
.
wlid
,
code
:
$
(
this
).
val
(),
lydjid
:
parmas
.
lydjid
,
wlph
:
parmas
.
wlph
},
function
(
res
)
{
if
(
res
.
success
){
$list
.
datagrid
(
"appendRow"
,
res
.
data
.
records
||
{});
$dialog
.
parents
(
"form"
).
iDialog
(
"setStatus"
,{
"state"
:
"next"
,
data
:
$list
.
datagrid
(
"getRows"
).
length
});
gas
.
showTips
(
"添加成功"
);
$input
.
textbox
(
"setValue"
,
""
);
$input
.
textbox
().
next
(
"span"
).
find
(
"input.textbox-text"
).
focus
();
}
else
{
gas
.
showCenterTips
(
res
.
message
||
"添加失败"
);
$input
.
textbox
(
"setValue"
,
""
);
$input
.
textbox
().
next
(
"span"
).
find
(
"input.textbox-text"
).
focus
();
}
})
}
}
})
});
})
</script>
gavel/src/main/resources/templates/views/kmes/zpfkfc/index.html
deleted
100644 → 0
View file @
070ba420
<div
id=
"hzgdzpjgfc"
class=
"gui-div"
>
<table
class=
"toolbar-table"
data-options=
"id: 'hzgdzpjgfcTable',herf:'kzzx/gridset/query'"
></table>
<!-- 表格工具栏开始 -->
<div
id=
"hzgdzpjgfcTable-toolbar"
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'hzgdzpjgfcTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-attachment toolbar"
href=
"javascript:void(0)"
></a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
关键件条码:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"code"
id=
"wosngn_wosonid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
批号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlph"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
物料:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<div
class=
"gui-input-block"
data-options=
"label:'仅显示已装配条码:',labelPosition:'left'"
id=
"xsyzpChk"
>
<input
type=
"checkbox"
name=
"xsyzp"
style=
"width: 100%"
checked
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar-search"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#hzgdzpjgfc'
);
var
$datagrid
=
$div
.
find
(
".toolbar-table"
);
var
$xsyzpCheckbox
=
$
(
"#xsyzpChk"
);
function
paramInit
(
ops
){
}
function
pageInit
()
{
$xsyzpCheckbox
.
iCheckbox
({
label
:
"仅显示已装配条码"
,
value
:
"Y"
});
var
options
=
{
url
:
'kmes/zpfkfc'
,
noRequest
:
true
,
columns
:
[[
{
title
:
"关键件条码"
,
field
:
"code"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"物料编码"
,
field
:
"wlcode"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"物料名称"
,
field
:
"wlname"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"组件编码"
,
field
:
"zjCode"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"组件名称"
,
field
:
"zpjhName"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"批号"
,
field
:
"wlph"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"供应商编码"
,
field
:
"gysCode"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"供应商名称"
,
field
:
"gysName"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"到货日期"
,
field
:
"shgjwlDhrq"
,
fieldType
:
"ftDate"
,
width
:
192
},
{
title
:
"产品条码"
,
field
:
"wosnid"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"生产订单"
,
field
:
"woDjid"
,
fieldType
:
"ftString"
,
width
:
240
},
{
title
:
"项目编码"
,
field
:
"xmCode"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"项目名称"
,
field
:
"xmName"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"客户编码"
,
field
:
"khCode"
,
fieldType
:
"ftString"
,
width
:
192
},
{
title
:
"客户名称"
,
field
:
"khName"
,
fieldType
:
"ftString"
,
width
:
192
}
]],
dialog
:
{
footerIn
:
true
,
href
:
'hzgd/ysfk/edit'
}
};
$div
.
Holder
(
options
);
}
/*数据初始化*/
function
dataInit
(
ops
){
}
/*用户操作*/
function
run
(
ops
){
$datagrid
.
datagrid
(
"options"
).
url
=
"kmes/zpfkfc/query"
;
$datagrid
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
))
}
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/zpmxcx/index.html
deleted
100644 → 0
View file @
070ba420
<style>
#zpmxcxWoList
.product-nav-list
{
top
:
0
}
</style>
<div
id=
"zpmxcx"
class=
"gui-layout gui-div"
style=
"height: 100%;width:100%;"
>
<div
data-options=
"region:'north'"
style=
"height:112px;width:100%;"
>
<div
class=
"gui-toolbar"
style=
"display: block"
data-options=
"grid:{type:'datagrid',id:'zpmxcxTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-exportWlsn toolbar"
href=
"javascript:void(0)"
>
导出条码
</a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm2"
>
<label
class=
"gui-form-label"
>
工厂:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"gcid"
class=
"gui-textbox"
data-options=
"required:true"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
订单日期:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"ksrq"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"jsrq"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
生产单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"djid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
部门:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"bmid"
class=
"gui-textbox"
data-options=
""
style=
"width: 100%"
>
</div>
</div>
</li>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm2"
>
<label
class=
"gui-form-label"
>
状态:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"zt"
class=
"gui-textbox"
data-options=
"required:false"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
物料信息:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
机种:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"jzname"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm3"
>
<label
class=
"gui-form-label"
>
关联件信息:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"snid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar toolbar-search1"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<div
data-options=
"region:'center'"
>
<div
class=
"gui-div"
>
<table
class=
"toolbar-table toolbar-holder"
data-options=
"id: 'zpmxcxTable',herf:'kzzx/gridset/query',type:'datagrid'"
></table>
</div>
</div>
<div
data-options=
"region:'west',split:true"
style=
"width:52%;height:100%;position: relative"
>
<div
id=
"zpmxcxWoList"
class=
"gui-div"
>
<div
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'zpmxcxWoListTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
style=
"display: none"
></a>
</div>
</div>
<table
class=
"toolbar-table"
id=
"zpmxcxWoListTable"
data-options=
"id: 'zpmxcxWoListTable',herf:'kzzx/gridset/query'"
></table>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#zpmxcx'
);
var
$woList
=
$
(
"#zpmxcxWoList"
);
var
$cbxGcid
=
$div
.
find
(
'input[name="gcid"]'
);
var
$datKsrq
=
$div
.
find
(
'input[name="ksrq"]'
);
var
$datJsrq
=
$div
.
find
(
'input[name="jsrq"]'
);
var
$cbxBmid
=
$div
.
find
(
'input[name="bmid"]'
);
var
$cbxZt
=
$div
.
find
(
'input[name="zt"]'
);
var
$cbxGjwl
=
$div
.
find
(
'input[name="gjwl"]'
);
var
$datagrid
=
$div
.
find
(
'.toolbar-table:first'
);
var
$datagridWo
=
$woList
.
find
(
'.toolbar-table:first'
);
var
$searchBtn
=
$div
.
find
(
".toolbar-search1"
);
var
$woztMap
=
{},
$djlyMap
=
{},
$wobomztMap
=
{}
;
function
paramInit
(
ops
){
//初始化状态
gas
.
post
(
"wo/wo/init/zt"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
var
data
=
result
[
'data'
][
'records'
];
for
(
var
i
in
data
){
$woztMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}
}
},
ops
);
//初始化生成方式
gas
.
post
(
"wo/wo/init/djly"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
var
data
=
result
[
'data'
][
'records'
];
for
(
var
i
in
data
){
$djlyMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}
}
},
ops
);
//初始化wobom状态
gas
.
post
(
"wo/wobom/init/zt"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
var
data
=
result
[
'data'
][
'records'
];
for
(
var
i
in
data
){
$wobomztMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}}
},
ops
);
}
function
pageInit
(
ops
)
{
var
options
=
{
url
:
"kmes/zpmxcx"
,
fontPage
:
true
,
noRequest
:
true
,
conditionExpand
:
"Y"
,
columns
:[[
{
title
:
"序列号"
,
field
:
"wosnid"
,
fieldType
:
"ftString"
,
width
:
180
},
{
title
:
"条码"
,
field
:
"wlsnid"
,
fieldType
:
"ftString"
,
width
:
180
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
140
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
},
{
title
:
"装配数量"
,
field
:
"zpsl"
,
fieldType
:
"int"
,
width
:
80
},
{
title
:
"拆卸数量"
,
field
:
"cxsl"
,
fieldType
:
"int"
,
width
:
80
},
{
title
:
"反馈人"
,
field
:
"fkr"
,
fieldType
:
"ftString"
,
width
:
100
},
{
title
:
"反馈时间"
,
field
:
"fksj"
,
fieldType
:
"ftDateTime"
}
// {title: "工作中心", field: "gzzxName",width:100,align:'center'},
// {title: "工序名称", field: "bzgxName",width:160},
/* {title: "类型", field: "hylx",align:'center', fieldType: "ftString",width:80,formatter:function (value) {
var text={
"BOM":"关键件",
"LINK":"关联件",
"MAC":"MAC地址",
"MZ":"模组码"
};
return text[value]||''
}},*/
]],
dialog
:{
href
:
"kmes/wo/wobom/edit"
,
footerIn
:
true
,
onBeforeLoad
:
function
()
{
var
selectedRow
=
$datagridWo
.
getSelectedRow
();
if
(
!
selectedRow
){
gas
.
showTipsWarning
(
"请选择一条生产订单!"
);
return
;
}
$
(
this
).
dialog
(
"options"
).
woid
=
selectedRow
.
id
}
}
};
$div
.
Holder
(
options
);
$woList
.
Container
({
columns
:
[[
{
title
:
"状态"
,
field
:
"zt"
,
fieldType
:
"ftString"
,
width
:
60
,
align
:
'center'
,
formatter
:
function
(
value
,
index
,
row
)
{
var
text
=
$woztMap
[
value
];
return
text
||
""
;
}
},
{
title
:
"订单号"
,
field
:
"djid"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
120
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
},
{
title
:
"机种"
,
field
:
"jzname"
,
width
:
140
},
/*{title: "计量单位", field: "jldwName", width: 80},*/
{
title
:
"订单数量"
,
field
:
"xqsl"
,
fieldType
:
"int"
},
{
title
:
"完工部门编码"
,
field
:
"bmCode"
,
fieldType
:
"ftString"
,
width
:
140
,
hidden
:
true
},
{
title
:
"完工部门"
,
field
:
"bmName"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"订单日期"
,
field
:
"ywrq"
,
fieldType
:
"ftDate"
},
{
title
:
"计划开工日期"
,
field
:
"jhkgrq"
,
fieldType
:
"ftDate"
},
{
title
:
"计划完工日期"
,
field
:
"jhwgrq"
,
fieldType
:
"ftDate"
},
{
title
:
"确认人"
,
field
:
"qrr"
,
fieldType
:
"ftString"
,
width
:
100
},
{
title
:
"确认时间"
,
field
:
"qrsj"
,
fieldType
:
"ftDateTime"
},
{
title
:
"生成方式"
,
field
:
"djly"
,
fieldType
:
"ftString"
,
width
:
100
,
formatter
:
function
(
value
,
index
,
row
)
{
var
text
=
$djlyMap
[
value
];
return
text
||
""
;
}
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
200
},
{
title
:
"维护人"
,
field
:
"whr"
,
fieldType
:
"ftString"
},
{
title
:
"维护时间"
,
field
:
"whsj"
,
fieldType
:
"ftDateTime"
}
]],
onLoadSuccess
:
function
()
{
if
(
$datagridWo
.
datagrid
(
"getData"
)
&&
$datagridWo
.
datagrid
(
"getData"
).
rows
){
var
selectedRow
=
$datagridWo
.
datagrid
(
"getData"
).
rows
[
0
];
if
(
selectedRow
){
loadList
(
selectedRow
.
id
)
}
}
},
datagrid
:{
/* onClickRow:function (rowIndex,rowData) {
loadList(rowData.id)
},*/
onSelect
:
function
(
rowIndex
,
rowData
)
{
if
(
rowData
){
loadList
(
rowData
.
id
)
}
}
}
});
//初始化工厂
$cbxGcid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
false
,
allowEdit
:
false
});
$cbxBmid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"bmmc"
,
allowNull
:
true
,
allowEdit
:
false
});
$cbxZt
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
,
allowEdit
:
false
});
$cbxGjwl
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
,
allowEdit
:
false
});
$datKsrq
.
iDatebox
();
$datJsrq
.
iDatebox
();
$searchBtn
.
iMenubutton
({
iconCls
:
'fa fa-search'
,
text
:
'搜索'
,
onClick
:
function
()
{
run
();
/* loadList("1")*/
}
});
}
/*数据初始化*/
function
dataInit
(
ops
){
gas
.
postHTTP
(
"jcsj/common/gc/query"
,{},
function
(
res
)
{
$cbxGcid
.
iCombobox
(
"loadData"
,
res
.
data
.
records
)
},
ops
);
gas
.
postHTTP
(
"common/datetime"
,{},
function
(
response1
)
{
var
date
=
new
Date
(
response1
.
data
.
data
);
$datKsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
beginOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
$datJsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
endOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
},
ops
);
gas
.
postHTTP
(
"wo/wo/init/zt"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
$cbxZt
.
iCombobox
(
"loadData"
,
result
.
data
.
records
)
}
},
ops
);
gas
.
post
(
"jcsj/common/bm/queryZzbm"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
$cbxBmid
.
iCombobox
(
"loadData"
,
result
.
data
.
records
)
}
},
ops
);
gas
.
postHTTP
(
"kmes/wo/wobom/init/gjwl"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
$cbxGjwl
.
iCombobox
(
"loadData"
,
result
.
data
.
records
)
}
},
ops
);
}
/*用户操作*/
function
run
(
ops
){
$datagridWo
.
datagrid
(
"options"
).
url
=
"kmes/zpmxcx/query/woZpxx"
;
$datagridWo
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
function
loadList
(
woid
)
{
$datagrid
.
datagrid
(
"loading"
);
HTTP
.
post
(
"kmes/zpmxcx/query/detail"
,{
woid
:
woid
,
snid
:
$div
.
find
(
'input[name="snid"]'
).
val
()},
function
(
res
)
{
if
(
res
.
success
){
$datagrid
.
datagrid
(
"loaded"
);
$datagrid
.
datagrid
(
'clientPaging'
,
{
data
:
res
.
data
.
records
||
[]});
}
})
}
$div
.
find
(
".toolbar-exportWlsn"
).
iMenubutton
({
text
:
"导出条码"
,
iconCls
:
"fa fa-save"
,
onClick
:
function
(){
var
selectedRow
=
$datagridWo
.
getSelectedRow
();
if
(
!
selectedRow
){
gas
.
showTipsWarning
(
"请选择一条生产订单!"
);
return
;
}
var
params
=
{
woid
:
selectedRow
[
'id'
],
snid
:
$div
.
find
(
'input[name="snid"]'
).
val
()
||
''
};
var
f
=
[],
decimal
=
0
,
e
=
$datagrid
.
datagrid
(
"getColumnFields"
);
for
(
var
g
=
0
;
g
<
e
.
length
;
g
++
)
{
var
h
=
$datagrid
.
datagrid
(
"getColumnOption"
,
e
[
g
]);
if
(
h
.
fieldType
){
switch
(
h
.
fieldType
)
{
case
"float"
:
decimal
=
3
;
break
;
case
"ftFloat"
:
decimal
=
3
;
break
;
case
"ftMoney"
:
decimal
=
2
;
break
;
case
"money"
:
decimal
=
2
;
break
;
}
}
if
(
h
.
hidden
==
false
||!
h
.
hidden
){
f
.
push
({
"name"
:
h
[
"field"
],
"caption"
:
h
[
"title"
],
"width"
:
h
[
"width"
],
"decimal"
:
decimal
})
}
}
var
formData
=
{
condition
:
JSON
.
stringify
(
params
),
fileName
:
"条码信息"
,
fields
:
JSON
.
stringify
(
f
)
};
HTTP
.
download
(
"kmes/zpmxcx/export"
,
formData
,
"post"
);
}
});
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
gavel/src/main/resources/templates/views/kmes/zpxxcx/index.html
deleted
100644 → 0
View file @
070ba420
<style>
#zpxxcxWoList
.product-nav-list
{
top
:
0
}
</style>
<div
id=
"zpxxcx"
class=
"gui-layout gui-div"
style=
"height: 100%;width:100%;"
>
<div
data-options=
"region:'north'"
style=
"height:112px;width:100%;"
>
<div
class=
"gui-toolbar"
style=
"display: block"
data-options=
"grid:{type:'datagrid',id:'zpxxcxTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-print toolbar"
href=
"javascript:void(0)"
></a>
<a
class=
"toolbar-exportWosn toolbar"
href=
"javascript:void(0)"
>
导出条码
</a>
</div>
<div
class=
"form-sub"
>
<form
class=
"query-criteria"
>
<ul>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
序列号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"woid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<div
class=
"gui-col-sm6"
>
<label
class=
"gui-form-label"
>
订单日期:
</label>
<div
class=
"gui-input-date-start"
>
<input
type=
"text"
name=
"ksrq"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm6"
>
<div
class=
"gui-input-date-end"
>
<input
type=
"text"
name=
"jsrq"
style=
"width: 100%"
>
</div>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
生产单号:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"djid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
<li
class=
"gui-form-row"
>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
物料信息:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"wlid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
机种:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"jzname"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
<div
class=
"gui-col-sm4"
>
<label
class=
"gui-form-label"
>
关联件信息:
</label>
<div
class=
"gui-input-block"
>
<input
type=
"text"
name=
"snid"
class=
"gui-textbox"
style=
"width: 100%"
>
</div>
</div>
</li>
</ul>
<span
class=
"toolbar-search-span"
><a
class=
"toolbar toolbar-search1"
href=
"javascript:void(0)"
></a></span>
</form>
</div>
</div>
</div>
<div
data-options=
"region:'center'"
>
<div
class=
"gui-div"
>
<table
class=
"toolbar-table toolbar-holder"
data-options=
"id: 'zpxxcxTable',herf:'kzzx/gridset/query',type:'datagrid'"
></table>
</div>
</div>
<div
data-options=
"region:'west',split:true"
style=
"width:52%;height:100%;position: relative"
>
<div
id=
"zpxxcxWoList"
class=
"gui-div"
>
<div
class=
"gui-toolbar"
data-options=
"grid:{type:'datagrid',id:'zpxxcxWoListTable'}"
>
<div
class=
"navbar-toolbar"
>
<a
class=
"toolbar-reload toolbar"
href=
"javascript:void(0)"
style=
"display: none"
></a>
</div>
</div>
<table
class=
"toolbar-table"
id=
"zpxxcxWoListTable"
data-options=
"id: 'zpxxcxWoListTable',herf:'kzzx/gridset/query'"
></table>
</div>
</div>
</div>
<!-- 表格工具栏结束 -->
<script>
$
(
function
()
{
/*js初始化*/
var
$div
=
$
(
'#zpxxcx'
);
var
$woList
=
$
(
"#zpxxcxWoList"
);
var
$cbxGcid
=
$div
.
find
(
'input[name="gcid"]'
);
var
$datKsrq
=
$div
.
find
(
'input[name="ksrq"]'
);
var
$datJsrq
=
$div
.
find
(
'input[name="jsrq"]'
);
var
$cbxBmid
=
$div
.
find
(
'input[name="bmid"]'
);
var
$cbxZt
=
$div
.
find
(
'input[name="zt"]'
);
var
$cbxGjwl
=
$div
.
find
(
'input[name="gjwl"]'
);
var
$datagrid
=
$div
.
find
(
'.toolbar-table:first'
);
var
$datagridWo
=
$woList
.
find
(
'.toolbar-table:first'
);
var
$searchBtn
=
$div
.
find
(
".toolbar-search1"
);
var
$woztMap
=
{},
$djlyMap
=
{},
$wobomztMap
=
{}
;
function
paramInit
(
ops
){
//初始化状态
gas
.
post
(
"wo/wo/init/zt"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
var
data
=
result
[
'data'
][
'records'
];
for
(
var
i
in
data
){
$woztMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}
}
},
ops
);
//初始化生成方式
gas
.
post
(
"wo/wo/init/djly"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
var
data
=
result
[
'data'
][
'records'
];
for
(
var
i
in
data
){
$djlyMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}
}
},
ops
);
//初始化wobom状态
gas
.
post
(
"wo/wobom/init/zt"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
var
data
=
result
[
'data'
][
'records'
];
for
(
var
i
in
data
){
$wobomztMap
[
data
[
i
].
id
]
=
data
[
i
].
name
}}
},
ops
);
}
function
pageInit
(
ops
)
{
var
options
=
{
url
:
"kmes/zpxxcx"
,
fontPage
:
true
,
noRequest
:
true
,
conditionExpand
:
"Y"
,
columns
:[[
{
title
:
"条码"
,
field
:
"wlsnid"
,
fieldType
:
"ftString"
,
width
:
180
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
140
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
},
{
title
:
"装配数量"
,
field
:
"zpsl"
,
fieldType
:
"int"
,
width
:
80
},
{
title
:
"拆卸数量"
,
field
:
"cxsl"
,
fieldType
:
"int"
,
width
:
80
},
{
title
:
"反馈人"
,
field
:
"fkr"
,
fieldType
:
"ftString"
,
width
:
100
},
{
title
:
"反馈时间"
,
field
:
"fksj"
,
fieldType
:
"ftDateTime"
}
]],
delimitingRun
:
run
,
dialog
:{
href
:
"kmes/wo/wobom/edit"
,
footerIn
:
true
,
onBeforeLoad
:
function
()
{
var
selectedRow
=
$datagridWo
.
getSelectedRow
();
if
(
!
selectedRow
){
gas
.
showTipsWarning
(
"请选择一条生产订单!"
);
return
;
}
$
(
this
).
dialog
(
"options"
).
code
=
selectedRow
.
code
}
}
};
$div
.
Holder
(
options
);
$woList
.
Container
({
columns
:
[[
{
title
:
"序列号"
,
field
:
"code"
,
fieldType
:
"ftString"
,
width
:
180
},
{
title
:
"订单号"
,
field
:
"djid"
,
fieldType
:
"ftString"
,
width
:
140
},
{
title
:
"物料编码"
,
field
:
"wlxxCode"
,
width
:
120
},
{
title
:
"物料名称"
,
field
:
"wlxxName"
,
width
:
140
},
{
title
:
"规格"
,
field
:
"wlxxGg"
,
width
:
140
},
{
title
:
"机种"
,
field
:
"jzname"
,
width
:
140
},
{
title
:
"订单日期"
,
field
:
"ywrq"
,
fieldType
:
"ftDate"
},
{
title
:
"备注"
,
field
:
"bz"
,
fieldType
:
"ftString"
,
width
:
200
},
{
title
:
"维护人"
,
field
:
"whr"
,
fieldType
:
"ftString"
},
{
title
:
"维护时间"
,
field
:
"whsj"
,
fieldType
:
"ftDateTime"
}
]],
onLoadSuccess
:
function
()
{
if
(
$datagridWo
.
datagrid
(
"getData"
)
&&
$datagridWo
.
datagrid
(
"getData"
).
rows
){
var
selectedRow
=
$datagridWo
.
datagrid
(
"getData"
).
rows
[
0
];
if
(
selectedRow
){
loadList
(
selectedRow
.
code
)
}
}
},
datagrid
:{
/* onClickRow:function (rowIndex,rowData) {
loadList(rowData.id)
},*/
onSelect
:
function
(
rowIndex
,
rowData
)
{
if
(
rowData
){
loadList
(
rowData
.
code
)
}
}
}
});
//初始化工厂
$cbxGcid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
false
,
allowEdit
:
false
});
$cbxBmid
.
iCombobox
({
valueField
:
"id"
,
textField
:
"bmmc"
,
allowNull
:
true
,
allowEdit
:
false
});
$cbxZt
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
,
allowEdit
:
false
});
$cbxGjwl
.
iCombobox
({
valueField
:
"id"
,
textField
:
"name"
,
allowNull
:
true
,
allowEdit
:
false
});
$datKsrq
.
iDatebox
();
$datJsrq
.
iDatebox
();
$searchBtn
.
iMenubutton
({
iconCls
:
'fa fa-search'
,
text
:
'搜索'
,
onClick
:
function
()
{
run
();
/* loadList("1")*/
}
});
}
/*数据初始化*/
function
dataInit
(
ops
){
gas
.
postHTTP
(
"jcsj/common/gc/query"
,{},
function
(
res
)
{
$cbxGcid
.
iCombobox
(
"loadData"
,
res
.
data
.
records
)
},
ops
);
gas
.
postHTTP
(
"common/datetime"
,{},
function
(
response1
)
{
var
date
=
new
Date
(
response1
.
data
.
data
);
$datKsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
beginOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
$datJsrq
.
iDatebox
(
"setValue"
,
DateUtils
.
endOfMonth
(
date
).
Format
(
"yyyy-MM-dd"
));
},
ops
);
gas
.
postHTTP
(
"wo/wo/init/zt"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
$cbxZt
.
iCombobox
(
"loadData"
,
result
.
data
.
records
)
}
},
ops
);
gas
.
post
(
"jcsj/common/bm/queryZzbm"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
$cbxBmid
.
iCombobox
(
"loadData"
,
result
.
data
.
records
)
}
},
ops
);
gas
.
postHTTP
(
"kmes/wo/wobom/init/gjwl"
,{},
function
(
result
){
if
(
result
[
'success'
]
&&
result
[
'data'
][
'records'
]){
$cbxGjwl
.
iCombobox
(
"loadData"
,
result
.
data
.
records
)
}
},
ops
);
}
/*用户操作*/
function
run
(
ops
){
$datagridWo
.
datagrid
(
"options"
).
url
=
"kmes/zpxxcx/query/wosnZpxx"
;
$datagridWo
.
datagrid
(
"load"
,
DataBind
.
collectData
(
$div
));
}
function
loadList
(
code
)
{
$datagrid
.
datagrid
(
"loading"
);
HTTP
.
post
(
"kmes/zpxxcx/query/detail"
,{
woid
:
code
,
snid
:
$div
.
find
(
'input[name="snid"]'
).
val
()},
function
(
res
)
{
if
(
res
.
success
){
$datagrid
.
datagrid
(
"loaded"
);
$datagrid
.
datagrid
(
'clientPaging'
,
{
data
:
res
.
data
.
records
||
[]});
}
})
}
$div
.
find
(
".toolbar-exportWosn"
).
iMenubutton
({
text
:
"导出条码"
,
iconCls
:
"fa fa-save"
,
onClick
:
function
(){
var
selectedRow
=
$datagridWo
.
getSelectedRow
();
if
(
!
selectedRow
){
gas
.
showTipsWarning
(
"请选择一条生产订单!"
);
return
;
}
var
params
=
{
woid
:
selectedRow
[
'code'
],
snid
:
$div
.
find
(
'input[name="snid"]'
).
val
()
||
''
};
var
f
=
[],
decimal
=
0
,
e
=
$datagrid
.
datagrid
(
"getColumnFields"
);
for
(
var
g
=
0
;
g
<
e
.
length
;
g
++
)
{
var
h
=
$datagrid
.
datagrid
(
"getColumnOption"
,
e
[
g
]);
if
(
h
.
fieldType
){
switch
(
h
.
fieldType
)
{
case
"float"
:
decimal
=
3
;
break
;
case
"ftFloat"
:
decimal
=
3
;
break
;
case
"ftMoney"
:
decimal
=
2
;
break
;
case
"money"
:
decimal
=
2
;
break
;
}
}
if
(
h
.
hidden
==
false
||!
h
.
hidden
){
f
.
push
({
"name"
:
h
[
"field"
],
"caption"
:
h
[
"title"
],
"width"
:
h
[
"width"
],
"decimal"
:
decimal
})
}
}
var
formData
=
{
condition
:
JSON
.
stringify
(
params
),
fileName
:
"条码信息"
,
fields
:
JSON
.
stringify
(
f
)
};
HTTP
.
download
(
"kmes/zpxxcx/export"
,
formData
,
"post"
);
}
});
gas
.
load
(
paramInit
,
pageInit
,
dataInit
,
run
);
})
</script>
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