|
@@ -93,14 +93,14 @@
|
|
|
<a class="list">营业执照</a>
|
|
|
</td>
|
|
|
</tr>
|
|
|
- <tr class="info" data-id="sqcn" onclick="selTr(this)">
|
|
|
+ <!--<tr class="info" data-id="sqcn" onclick="selTr(this)">
|
|
|
<td>
|
|
|
2
|
|
|
</td>
|
|
|
<td>
|
|
|
<a class="list">申请人承诺</a>
|
|
|
</td>
|
|
|
- </tr>
|
|
|
+ </tr>-->
|
|
|
|
|
|
</tbody>
|
|
|
</table>
|
|
@@ -501,7 +501,6 @@
|
|
|
/>
|
|
|
<input
|
|
|
id="chengnuoshu"
|
|
|
- name="chengnuoshu"
|
|
|
type="hidden"
|
|
|
/>
|
|
|
|
|
@@ -533,7 +532,13 @@
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
-
|
|
|
+ <div class="content4">
|
|
|
+ <input id="printFilePath" value="" type="hidden">
|
|
|
+ <a style=" font-size: 25px; font-weight: bolder;">请打印行政许可告知承诺书</a>
|
|
|
+ <button class="btn btn-lg btn-success" type="button" onclick="printCns()" >
|
|
|
+ 打印行政许可告知承诺书
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
</article>
|
|
@@ -576,10 +581,36 @@
|
|
|
},
|
|
|
servicePlace: {
|
|
|
required: true,
|
|
|
+ },
|
|
|
+ businessScope:{
|
|
|
+ required: true,
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ function printCns() {
|
|
|
+
|
|
|
+ $.modal.loading("等待打印中");
|
|
|
+ window.setTimeout(function(){
|
|
|
+ $.modal.closeLoading()
|
|
|
+ },4000)
|
|
|
+ //开始打印
|
|
|
+ var Url = getRootPath_web();
|
|
|
+ console.log(Url+$("#printFilePath").val())
|
|
|
+ Toast('', '打印指定网页文件');
|
|
|
+ Toast('打印指定网页文件.....');
|
|
|
+ module_printer.print_webpage2(
|
|
|
+ Url+$("#printFilePath").val(),
|
|
|
+ 1, //打印数量
|
|
|
+ 0, //打印纸盒选择(0:使用默认纸盒,1:使用纸盒1,2:使用纸盒2,5:使用手动纸盒)
|
|
|
+ 0, //打印纸张选择(0:A4,1:A3,2:A5)
|
|
|
+ 1, //是否彩色打印(0:黑白打印,1:彩色打印)
|
|
|
+ 1, //是否横向打印(0:纵向,1:横向)
|
|
|
+ 0 //是否需要返回实际打印结果(0:不需要,1:需要
|
|
|
+ );
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
function toQianming() {
|
|
|
$("#content1").hide()
|
|
|
$("#content3").show()
|
|
@@ -589,22 +620,22 @@
|
|
|
$("#content1").show()
|
|
|
}
|
|
|
function toSaomiao() {
|
|
|
- $("#content1").hide()
|
|
|
- $("#content2").show()
|
|
|
- cl_openidA4photos(0, 1);
|
|
|
- open_light()
|
|
|
+ $("#content1").hide()
|
|
|
+ $("#content2").show()
|
|
|
+ cl_openidA4photos(0, 1);
|
|
|
+ open_light()
|
|
|
}
|
|
|
|
|
|
function goBackStep() {
|
|
|
|
|
|
- if($("input[name='file").val()==""){
|
|
|
- alert("请拍摄营业执照材料")
|
|
|
- return false;
|
|
|
+ if($("input[name='file").val()==""){
|
|
|
+ alert("请拍摄营业执照材料")
|
|
|
+ return false;
|
|
|
}
|
|
|
- if($("input[name='chengnuoshu").val()==""){
|
|
|
+ /*if($("input[name='chengnuoshu").val()==""){
|
|
|
alert("请拍摄承诺书材料")
|
|
|
return false;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
$.ajax({
|
|
|
url: prefix+"/getOcrJson",
|
|
@@ -618,10 +649,10 @@
|
|
|
console.log(res)
|
|
|
$.modal.closeLoading()
|
|
|
if(res.code=="0"){
|
|
|
- $("#input[name='name']").val()
|
|
|
- $("#input[name='creditCode']").val()
|
|
|
- $("#input[name='legalName']").val()
|
|
|
- $("#input[name='servicePlace']").val()
|
|
|
+ $("input[name='name']").val(res.data['名称'])
|
|
|
+ $("input[name='creditCode']").val(res.data['社会信用代码'])
|
|
|
+ $("input[name='legalName']").val(res.data['法定代表人'])
|
|
|
+ $("input[name='servicePlace']").val(res.data['住所'])
|
|
|
$("#content1").show()
|
|
|
$("#content2").hide()
|
|
|
}
|
|
@@ -644,7 +675,7 @@
|
|
|
function submitinfo() {
|
|
|
if ($.validate.form()) {
|
|
|
var qmData=""
|
|
|
- qmData= getFileFromBase64($("#qianming").val().replace("data:image/jpeg;base64,",""), "qm.jpg");
|
|
|
+ qmData= getFileFromBase64($("#qianming").val().replace("data:image/png;base64,",""), "qm.jpg");
|
|
|
$.ajax({
|
|
|
type: "post",
|
|
|
url: ctx + "common/upload",
|
|
@@ -665,9 +696,9 @@
|
|
|
data: $('#form-file-add').serialize(),
|
|
|
success: function (res) {
|
|
|
if(res.code=="0"){
|
|
|
- cl_closeidA4photos();
|
|
|
+ $("#printFilePath").val(res.data)
|
|
|
alert("提交成功")
|
|
|
- window.location.href = "/zhuxiao/index"
|
|
|
+
|
|
|
}else {
|
|
|
alert(res.msg)
|
|
|
}
|
|
@@ -897,6 +928,149 @@
|
|
|
Toast('err', '拍照失败:' + code);
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ window.module_printer = channel.objects.printer;
|
|
|
+ module_printer.sig_printer_status.connect(
|
|
|
+ function (status_code, code_info) {
|
|
|
+ console.log("获取打印机状态结果:" + status_code + " " + code_info);
|
|
|
+ if (status_code >= 0) {
|
|
|
+ Toast('', code_info);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ switch (status_code) {
|
|
|
+ case -1:
|
|
|
+ message = "获取失败";
|
|
|
+ break;
|
|
|
+ case -8:
|
|
|
+ message = "初始化异常";
|
|
|
+ break;
|
|
|
+ case -65535:
|
|
|
+ message = "程序未初始化";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ message = "未知" + "\t" + status_code;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ module_printer.sig_printer_info.connect(
|
|
|
+ function (json_info) {
|
|
|
+ console.log(json_info)
|
|
|
+ var data = JSON.parse(json_info);
|
|
|
+ if (data.code == 0) {
|
|
|
+ Toast('res', '打印机信息获取成功');
|
|
|
+ console.log('打印机信息获取成功');
|
|
|
+ var print_info = data.status.code_info;
|
|
|
+ //打印机状态
|
|
|
+ console.log('打印机状态:' + print_info);
|
|
|
+
|
|
|
+ //墨粉量
|
|
|
+ var toner = '';
|
|
|
+ if (data.toner.status == 100) {
|
|
|
+ for (var i = 0; i < data.toner.toners.length; i++) {
|
|
|
+ toner += data.toner.toners[i].color + ':' + data.toner.toners[i].remaining + '%; ';
|
|
|
+ }
|
|
|
+ } else if (data.toner.status == 200) {
|
|
|
+ toner = data.toner.msg;
|
|
|
+ }
|
|
|
+ console.log('墨粉量:' + toner);
|
|
|
+
|
|
|
+ //纸张总量
|
|
|
+ if (data.statistics.code == 0) {
|
|
|
+ console.log('打印总量:' + data.statistics.print_sum);
|
|
|
+ } else if (data.printsum.status == 200) {
|
|
|
+ console.log('获取打印总量失败');
|
|
|
+ }
|
|
|
+
|
|
|
+ //纸盘信息
|
|
|
+ for (var i = 0; i < data.papertray.papertrays.length; i++) {
|
|
|
+ var paper;
|
|
|
+ var tray;
|
|
|
+ var item = data.papertray.papertrays[i]
|
|
|
+ if (item.trayid != 5) {
|
|
|
+ switch (item.state) {
|
|
|
+ case 0:
|
|
|
+ paper = "没有纸张";
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ paper = "纸张数量较低";
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ paper = "纸量充足";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ tray = item.trayid + '号纸盘';
|
|
|
+ } else {
|
|
|
+ switch (item.state) {
|
|
|
+ case 0:
|
|
|
+ paper = "没有纸张";
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ paper = "有纸";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ tray = "手动送纸盘";
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ Toast('err', '打印机信息获取失败:' + data.msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ )
|
|
|
+
|
|
|
+ module_printer.sig_print_state_change.connect(function (code, print_state, message) {
|
|
|
+ var info
|
|
|
+ switch (code) {
|
|
|
+ case 0:
|
|
|
+ info = "文件成功发送到打印机"
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ info = "下载文件成功,开始打印"
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ info = "打印机完成打印"
|
|
|
+
|
|
|
+ break;
|
|
|
+ case -1:
|
|
|
+ info = "打印失败:" + message;
|
|
|
+ break;
|
|
|
+ case -2:
|
|
|
+ info = "不支持的文件格式";
|
|
|
+ break;
|
|
|
+ case -3:
|
|
|
+ info = "下载文件失败";
|
|
|
+ break;
|
|
|
+ case -4:
|
|
|
+ info = "文件不存在";
|
|
|
+ break;
|
|
|
+ case -5:
|
|
|
+ info = "图片数据无效";
|
|
|
+ break;
|
|
|
+ case -6:
|
|
|
+ info = "组件连接异常";
|
|
|
+ break;
|
|
|
+ case -8:
|
|
|
+ info = "初始化异常";
|
|
|
+ break;
|
|
|
+ case -65535:
|
|
|
+ info = "程序未初始化";
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ info = "未知状态:" + "\t" + code;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ if(code=='0'){
|
|
|
+ $.modal.loading("开始打印");
|
|
|
+ window.setTimeout(function(){
|
|
|
+ $.modal.closeLoading()
|
|
|
+ },2000)
|
|
|
+ }
|
|
|
+ console.log(info)
|
|
|
+ });
|
|
|
+
|
|
|
cl_openidA4photos(0, 1);
|
|
|
open_light()
|
|
|
});
|