From a6013fee1895815cda77bfdcb5e5b9f4d190640b Mon Sep 17 00:00:00 2001
From: YYC <1833023622@qq.com>
Date: 星期日, 05 十一月 2023 00:08:35 +0800
Subject: [PATCH] 结算页面
---
igds-web/src/main/resources/static/admin/inout/out-card-back.js | 362 +++++++++++++++++++++++++-------------------------
1 files changed, 181 insertions(+), 181 deletions(-)
diff --git a/igds-web/src/main/resources/static/admin/inout/out-card-back.js b/igds-web/src/main/resources/static/admin/inout/out-card-back.js
index 542beed..d64a8ee 100644
--- a/igds-web/src/main/resources/static/admin/inout/out-card-back.js
+++ b/igds-web/src/main/resources/static/admin/inout/out-card-back.js
@@ -2,226 +2,226 @@
var layer;
var form;
var recordData = null;
-$(function() {
- layui.use([ 'layer', 'laydate', 'form', 'util' ], function() {
- layer = layui.layer;
- form = layui.form;
- layui.laydate.render({
- elem : '#test1',
- theme : '#7b8e9f'
- });
+$(function () {
+ layui.use(['layer', 'laydate', 'form', 'util'], function () {
+ layer = layui.layer;
+ form = layui.form;
+ layui.laydate.render({
+ elem: '#test1',
+ theme: '#7b8e9f'
+ });
- });
+ });
- showProgress();
+ showProgress();
});
//鎺у埗娴佺▼鐜妭鏄剧ず
function showProgress() {
- if(!inoutProgress){
- return;
- }
+ if (!inoutProgress) {
+ return;
+ }
- if(inoutProgress.indexOf("REGISTER") == -1){
- $("#progress-register").css("display", "none");
- }
- if(inoutProgress.indexOf("WEIGHT_FULL") == -1){
- $("#progress-fullWeight").css("display", "none");
- }
- if(inoutProgress.indexOf("HANDLE") == -1){
- $("#progress-hand").css("display", "none");
- }
- if(inoutProgress.indexOf("WEIGHT_EMPTY") == -1){
- $("#progress-emptyWeight").css("display", "none");
- }
- if(inoutProgress.indexOf("CARD_BACK") == -1){
- $("#progress-cardBack").css("display", "none");
- }
+ if (inoutProgress.indexOf("REGISTER") == -1) {
+ $("#progress-register").css("display", "none");
+ }
+ if (inoutProgress.indexOf("WEIGHT_FULL") == -1) {
+ $("#progress-fullWeight").css("display", "none");
+ }
+ if (inoutProgress.indexOf("HANDLE") == -1) {
+ $("#progress-hand").css("display", "none");
+ }
+ if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) {
+ $("#progress-emptyWeight").css("display", "none");
+ }
+ if (inoutProgress.indexOf("CARD_BACK") == -1) {
+ $("#progress-cardBack").css("display", "none");
+ }
}
//鏂扮殑璇诲崱鏂瑰紡
function flushICCard() {
- $("#intelCard").val(null);
- resetForm();
- $.ajax({
- type: "GET",
- async: true,
- url: "http://127.0.0.1:9111/ICCARD",
- data: {},
- dataType: "jsonp",
- jsonp: "callback",
- jsonpCallback: "jsonpCallback",
- success: function (json) {
- //console.log(json);
- var data = json.no;
- //console.log(data);
- if (data === "not found") {
- layer.alert("璇烽噸鏂拌鍗★紒", {offset: ['300px', '300px']});
- } else {
- $("#intelCard").val(data);
- flushData();
- }
- },
- error: function () {
- layer.alert("IC鍗¤鍙栧嚭閿欙紒", {offset: ['300px', '300px']});
- }
- });
+ $("#intelCard").val(null);
+ resetForm();
+ $.ajax({
+ type: "GET",
+ async: true,
+ url: "http://127.0.0.1:9111/ICCARD",
+ data: {},
+ dataType: "jsonp",
+ jsonp: "callback",
+ jsonpCallback: "jsonpCallback",
+ success: function (json) {
+ //console.log(json);
+ var data = json.no;
+ //console.log(data);
+ if (data === "not found") {
+ layer.alert("璇烽噸鏂拌鍗★紒", {offset: ['300px', '300px']});
+ } else {
+ $("#intelCard").val(data);
+ flushData();
+ }
+ },
+ error: function () {
+ layer.alert("IC鍗¤鍙栧嚭閿欙紒", {offset: ['300px', '300px']});
+ }
+ });
}
// 浣跨敤鎻掍欢鑾峰彇鐪佷唤璇�
function flushIdCard() {
- var index = layer.load();
- $.ajax({
- type: "GET",
- async: true,
- url: "http://127.0.0.1:9111/IDCARD",
- data: {},
- dataType: "jsonp",
- jsonp: "callback",
- jsonpCallback: "jsonpCallback",
- success: function (json) {
- layer.close(index);
- var data = json.content;
- if (data === "not found") {
- layer.alert("娌℃湁璇诲彇鍒拌韩浠借瘉淇℃伅锛岃鎵嬪姩褰曞叆锛�", {
- offset: ['300px', '300px']
- });
- return;
- }
- $("#userId").val(data.idNum);
- flushData();
- },
- error: function () {
- layer.alert("韬唤璇佽鍙栧け璐ワ紝璇锋墜鍔ㄥ綍鍏ワ紒", {
- offset: ['300px', '300px']
- });
- layer.close(index);
- }
- });
+ var index = layer.load();
+ $.ajax({
+ type: "GET",
+ async: true,
+ url: "http://127.0.0.1:9111/IDCARD",
+ data: {},
+ dataType: "jsonp",
+ jsonp: "callback",
+ jsonpCallback: "jsonpCallback",
+ success: function (json) {
+ layer.close(index);
+ var data = json.content;
+ if (data === "not found") {
+ layer.alert("娌℃湁璇诲彇鍒拌韩浠借瘉淇℃伅锛岃鎵嬪姩褰曞叆锛�", {
+ offset: ['300px', '300px']
+ });
+ return;
+ }
+ $("#userId").val(data.idNum);
+ flushData();
+ },
+ error: function () {
+ layer.alert("韬唤璇佽鍙栧け璐ワ紝璇锋墜鍔ㄥ綍鍏ワ紒", {
+ offset: ['300px', '300px']
+ });
+ layer.close(index);
+ }
+ });
}
// 鎵撳嵃杩囩鍗�
function printBill() {
- if (!recordData) {
- layer.alert("娌℃湁鑾峰彇鍒颁笟鍔℃暟鎹紝涓嶆敮鎸佹墦鍗帮紒");
- return;
- }
+ if (!recordData) {
+ layer.alert("娌℃湁鑾峰彇鍒颁笟鍔℃暟鎹紝涓嶆敮鎸佹墦鍗帮紒");
+ return;
+ }
- if(InoutProgress.CARD_BACK != recordData.progress){
- layer.alert("褰撳墠鏁版嵁涓嶅畬鏁达紝涓嶆敮鎸佹墦鍗帮紒");
- return;
- }
+ if (InoutProgress.CARD_BACK != recordData.progress) {
+ layer.alert("褰撳墠鏁版嵁涓嶅畬鏁达紝涓嶆敮鎸佹墦鍗帮紒");
+ return;
+ }
- //浠庡悗鍙拌幏鍙栨ā鐗堝苟鎵撳嵃
- var index = layer.load();
- $.ajax({
- type : "POST",
- url : "../../basic/inout-report/inout-bill-weight",
- dataType : "json",
- contentType : "application/json;charset=UTF-8",
- data : JSON.stringify(recordData),
- success : function(result) {
- if (result.code != "0000") {
- layer.msg(result.msg);
- } else {
- layer.msg("寮�濮嬫覆鏌撴墦鍗板崟鈥︹��");
- printWeight(result.data);
- }
- layer.close(index);
- },
- error : function() {
- layer.close(index);
- layer.msg("鑾峰彇鎵撳嵃妯$増澶辫触锛岃鑱旂郴绠$悊鍛樻煡鐪嬪師鍥狅紒锛�");
- }
- });
+ //浠庡悗鍙拌幏鍙栨ā鐗堝苟鎵撳嵃
+ var index = layer.load();
+ $.ajax({
+ type: "POST",
+ url: "../../basic/inout/report/bill-weight",
+ dataType: "json",
+ contentType: "application/json;charset=UTF-8",
+ data: JSON.stringify(recordData),
+ success: function (result) {
+ if (result.code != "0000") {
+ layer.msg(result.msg);
+ } else {
+ layer.msg("寮�濮嬫覆鏌撴墦鍗板崟鈥︹��");
+ printWeight(result.data);
+ }
+ layer.close(index);
+ },
+ error: function () {
+ layer.close(index);
+ layer.msg("鑾峰彇鎵撳嵃妯$増澶辫触锛岃鑱旂郴绠$悊鍛樻煡鐪嬪師鍥狅紒锛�");
+ }
+ });
}
// 鎵撳嵃鎶芥牱鍗�
function showCheck() {
- if (null == recordData) {
- layer.alert("娌℃湁鑾峰彇鍒颁笟鍔℃暟鎹紝鏃犳硶鏌ョ湅锛�");
- }
+ if (null == recordData) {
+ layer.alert("娌℃湁鑾峰彇鍒颁笟鍔℃暟鎹紝鏃犳硶鏌ョ湅锛�");
+ }
}
// 琛ㄥ崟娓呯┖
function resetForm() {
- $("#form-data")[0].reset();
- $("#form-basic")[0].reset();
+ $("#form-data")[0].reset();
+ $("#form-basic")[0].reset();
- form.render();
+ form.render();
- recordData = null;
+ recordData = null;
}
// 鏇存柊鏁版嵁淇℃伅
function flushData() {
- var index = layer.load();
- var plateNum = $("#plateNum").val();
- var userId2 = $("#userId").val();
- var intelCard = $("#intelCard").val();
- var param = {
- type : type,
- progress : progress,
- userId: userId2,
- intelCard: intelCard,
- plateNum : plateNum
- };
+ var index = layer.load();
+ var plateNum = $("#plateNum").val();
+ var userId2 = $("#userId").val();
+ var intelCard = $("#intelCard").val();
+ var param = {
+ type: type,
+ progress: progress,
+ userId: userId2,
+ intelCard: intelCard,
+ plateNum: plateNum
+ };
- $.ajax({
- type : "POST",
- url : "../../basic/inout/inout-query-back",
- dataType : "json",
- contentType : "application/json;charset=UTF-8",
- data : JSON.stringify(param),
- success : function(result) {
- if (result.code != "0000") {
- layer.alert(result.msg);
- } else {
- recordData = result.data;
- // 杩斿洖鐨勬暟鎹繘琛岃祴鍊�
- form.val("form-data", recordData);
- form.val("form-basic", recordData);
- form.render();
- }
- layer.close(index);
- },
- error : function() {
- layer.close(index);
- layer.alert("鏌ヨ澶辫触锛岃閲嶆柊灏濊瘯锛侊紒");
- }
- });
+ $.ajax({
+ type: "POST",
+ url: "../../basic/inout/inout-query-back",
+ dataType: "json",
+ contentType: "application/json;charset=UTF-8",
+ data: JSON.stringify(param),
+ success: function (result) {
+ if (result.code != "0000") {
+ layer.alert(result.msg);
+ } else {
+ recordData = result.data;
+ // 杩斿洖鐨勬暟鎹繘琛岃祴鍊�
+ form.val("form-data", recordData);
+ form.val("form-basic", recordData);
+ form.render();
+ }
+ layer.close(index);
+ },
+ error: function () {
+ layer.close(index);
+ layer.alert("鏌ヨ澶辫触锛岃閲嶆柊灏濊瘯锛侊紒");
+ }
+ });
}
// 褰撳墠瀹屾垚
function submit(data) {
- if (!recordData) {
- layer.alert("娌℃湁鏁版嵁鍙互鎻愪氦锛侊紒锛�");
- return;
- }
- // 鎻愪氦鏁版嵁姣旇緝鐗规畩锛屼笉鐢ㄨ�冭檻鍩烘湰淇℃伅鎻愪氦
- var index = layer.load();
- var data = form.val("form-data");
- Object.assign(recordData, data);
+ if (!recordData) {
+ layer.alert("娌℃湁鏁版嵁鍙互鎻愪氦锛侊紒锛�");
+ return;
+ }
+ // 鎻愪氦鏁版嵁姣旇緝鐗规畩锛屼笉鐢ㄨ�冭檻鍩烘湰淇℃伅鎻愪氦
+ var index = layer.load();
+ var data = form.val("form-data");
+ Object.assign(recordData, data);
- $.ajax({
- type : "POST",
- url : "../../basic/inout/inout-back-submit",
- dataType : "json",
- contentType : "application/json;charset=UTF-8",
- data : JSON.stringify(recordData),
- success : function(result) {
- if (result.code != "0000") {
- layer.msg(result.msg);
- } else {
- layer.alert("鍗$墖鍥炴敹鎴愬姛锛�");
- // 閲嶇疆椤甸潰
- resetForm();
- }
- layer.close(index);
- },
- error : function() {
- layer.close(index);
- layer.msg("鍗$墖鍥炴敹澶辫触锛岃閲嶆柊灏濊瘯锛侊紒");
- }
- });
+ $.ajax({
+ type: "POST",
+ url: "../../basic/inout/submit-card-back",
+ dataType: "json",
+ contentType: "application/json;charset=UTF-8",
+ data: JSON.stringify(recordData),
+ success: function (result) {
+ if (result.code != "0000") {
+ layer.msg(result.msg);
+ } else {
+ layer.alert("鍗$墖鍥炴敹鎴愬姛锛�");
+ // 閲嶇疆椤甸潰
+ resetForm();
+ }
+ layer.close(index);
+ },
+ error: function () {
+ layer.close(index);
+ layer.msg("鍗$墖鍥炴敹澶辫触锛岃閲嶆柊灏濊瘯锛侊紒");
+ }
+ });
}
\ No newline at end of file
--
Gitblit v1.9.3