<tbody id= "Datagridtemplate" style= "Display:none" >
<TR id= "List" >
<TD class= "Text-center" nowrap> #radiolink #</td>
<TD class= "Text-center" style= "color: #8c8c8c; width:50px;" Nowrap>
<p><span class= "Glyphicon glyphicon-edit edit_btn"code= "#vc_code #" status= "#i_status #"></span></p>
<p><span class= "Glyphicon glyphicon-trash delete_btn" code= "#vc_code #" status= "#i_status #" ></span ></p>
</td>
<TD class= "Text-center" nowrap> #vc_storagename #</td>
Select
' <input type= ' Radio "name=" Paramlist "value=" ' | | vc_code| | ' status= ' | | i_status| | ' code= ' | | i_flag| | '/> ' as RadioLINK,
Vc_code,
(SELECT vc_storage_name from e_storage WHERE e_inout.vc_storage = e_storage.vc_code) As Vc_storagename,
Vc_storage,
"I_status" is ' Status: 1 Pending confirmation, 2 confirmed ';
Search= $Search ({datagrid: "DataGrid", FormId: "Searchform", Success:function () {
$ (". Edit_btn"). Unbind (). On ("click", Function () {
if ($ (this). attr ("code")! = undefined && $ (this). attr ("code")! = "") {
if ("2" = = $ (this). attr ("status")) {
Ccms.dialog.notice ("Universal ticket out of the storage list has been confirmed, not allowed to modify!", 2000);
}else{
Obj.edit ({id:$ (this). attr ("Code")});
}
}
});
$ (". Delete_btn"). Unbind (). On ("click", Function () {
var obthis = $ (this);
if ("2" = = Obthis.attr ("status")) {
Ccms.dialog.notice ("Universal ticket out of the storage list has been confirmed, not allowed to delete!", 2000);
}else{
$Dialog (). Confirm ("OK to delete this piece of data?", function () {
if (obthis.attr ("code")! = undefined && obthis.attr ("code") = = "") {
Obj.del ({id:obthis.attr ("code")});
}
});
}
});
$ (". Btn_merchandise"). each (function () {
$ (this). Click (function () {
Ccms.dialog.open ({url: "${def:context}/action/project/erpclub/fncmngsys/goodsmng/conset/crud?inout_code=" +$ ( This). attr ("Code1") + "&inout_type=" +$ (This). attr ("code") + "&vc_storage=" +$ (This). attr ("Code2"), ID: " Pickid "});
});
});
Ccms.util.renderRadio ("Paramlist");
}}). initsearchbtn (). Searchdata (1);
$ ("#confirm_btn"). Unbind (). On ("click", Function () {----------Confirm Document button
var pobj = $ ("input[name=paramlist]:checked");
if (pobj.length <= 0) {
ccms.dialog.notice ("Please select the documents to be confirmed first,");
}else if ("2" = = Pobj.attr ("status")) {
Ccms.dialog.notice ("The document has been confirmed and cannot be confirmed repeatedly", 2000);
}else if ("1" = = Pobj.attr ("status")) {
var i_flag = pobj.attr ("code");
var url = "";
if ("1" = = I_flag) {//In
url = "${def:actionroot}/confirm/in?vc_code=" + pobj.val ();
}else if ("0" = = I_flag) {
url = "${def:actionroot}/confirm/out?vc_code=" + pobj.val ();
}
if (""! = URL) {
Ajaxcall (url,{
Method: "Get",
Progress:true,
DataType: "Script",
Success:function () {
$Dialog (). Notice ("The document has been confirmed! ", 1200,function () {
Search.searchdata (1);
});
}
});
}
}
});
$ ("#print_btn"). Unbind (). On ("click", Function () {
var pobj = $ ("input[name=paramlist]:checked");
if (pobj.length <= 0) {
Ccms.dialog.notice ("Please select the document to be printed first", 2000);
}else{
var url = "${def:context}/action/project/erpclub/print/excel/printwarehouse?vc_code=" + pobj.val ();
Ajaxcall (url,{
Method: "Get",
Progress:true,
DataType: "Script",
Success:function () {
}
});
}
});
});
Radio button, universal ticket out of storage.