wx.ready(function () {
document.getElementById('scan').onclick = function () {
wx.scanQRCode({
needResult: 1,
scanType: ['qrCode','barCode'],
success: function (res) {
var code = res.resultStr;
if(code.indexOf(",") >= 0){
code = code.split(",")[1];
}
document.getElementById("sptm").value = code;
setAjaxOptions('spxx','getCounties.htm','sptm',false)
}
});
};
document.getElementById('btn1').onclick = function () {
var result = submitAjaxForm('form1','',false);
if(result =='OK'){
//location="bj.htm";
document.getElementById('sptm').value=""
document.getElementById('spxx').value=""
document.getElementById('spbm').value=""
document.getElementById('spmc').value=""
document.getElementById('spgg').value=""
document.getElementById('scqy').value=""
document.getElementById('bzdw').value=""
document.getElementById('sl').value=""
//document.getElementById('divtablelist').innerHTML = result;
}
else{showDialog('dlg1','错误',result)}
wx.scanQRCode({
needResult: 1,
scanType: ['qrCode','barCode'],
success: function (res) {
var code = res.resultStr;
if(code.indexOf(",") >= 0){
code = code.split(",")[1];
}
document.getElementById("sptm").value = code;
setAjaxOptions('spxx','getCounties.htm','sptm',false)
}
});
};
});
wx.error(function (res) {
//alert(res.errMsg);
});
'wb.InsertHTML("page1","<div id='divtablelist'>") '插入占位的DIV标签,用于动态更新练习列表
With wb.AddTable("","Table1")
.Alternate = 3
Dim nms() As String = {"商品编码","录入时间","数量","创建人"}
.Head.AddRow(nms)
Dim i As Integer = 1
For Each r As DataRow In DataTables("商品盘点").Select("创建人='" & e.Cookies("username") &"'", "录入时间 desc,_Identify desc")
With .Body.AddRow(r("spbm"),r("录入时间"),r("sl"),r("创建人"))
'.AddCell(Format(r("单价"),"#0.00"))
'.AddCell(Format(r("日期"),"MM月dd日"))
End With
If i = 10 Then Exit For
i=i+1
Next
End With
'wb.InsertHTML("page1","</div>") '占位的DIV标签的结束标签