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/in-check.js | 67 +++++++++++++++++++++++++--------
1 files changed, 51 insertions(+), 16 deletions(-)
diff --git a/igds-web/src/main/resources/static/admin/inout/in-check.js b/igds-web/src/main/resources/static/admin/inout/in-check.js
index 54d4873..47d1a88 100644
--- a/igds-web/src/main/resources/static/admin/inout/in-check.js
+++ b/igds-web/src/main/resources/static/admin/inout/in-check.js
@@ -29,6 +29,13 @@
});
laydate.render({
+ elem: '#foodYear',
+ theme: '#7b8e9f',
+ value: foodYear,
+ type: 'year'
+ });
+
+ laydate.render({
elem: '#checkTime',
theme: '#7b8e9f',
format: 'yyyy-MM-dd HH:mm:ss',
@@ -67,11 +74,18 @@
//鏄剧ず鍏ュ簱娴佺▼
showProgress();
});
+window.onbeforeunload = function () {
+}
+window.onunload = function () {
+}
window.onload = function () {
+
//鎵弿鏋嚜鍔ㄥ洖杞︿簨浠�
- $('#checkId').bind('keyup', function(event) {
+ $('#checkId').bind('keyup', function (event) {
if (event.keyCode == "13") {
+ // //鍘绘帀鐒︾偣锛岄槻姝㈠埛鏂伴〉闈�
+ // $('#checkId').blur();
getDataByCheckId();
}
});
@@ -117,7 +131,6 @@
var limit = data.upperLimit;
//杩愮畻绗�
var symbol = data.operaSymbol;
-
if (symbol && limit) {
if (">=" == symbol) {
if (newValue < limit) {
@@ -217,6 +230,7 @@
// var url = "com.ld.igds.inout.ReportInoutCheck.d";
// window.parent.openTab(url, "鍖栭獙缁撴灉瀵煎嚭", "checkDataExport");
};
+
// 鎵︽牱鏈鸿В闄ゆ�ュ仠
function checkResetStop() {
var param = JSON.stringify(checkDto);
@@ -348,7 +362,8 @@
title: '澶囨敞璇存槑',
align: 'center',
edit: 'text'
- }]]
+ }]],
+ limit: this.curCheckItems.length //鏄剧ず鐨勬暟閲�
});
$("thead tr").css({
@@ -359,7 +374,6 @@
function showDetail(data) {
curCheckData = data;
-
if (!curCheckData.checkTime) {
curCheckData.checkTime = dateFtt("yyyy-MM-dd hh:mm:ss", new Date());
}
@@ -376,14 +390,14 @@
shade: 0,
content: $('#checkDetail'),
btnAlign: 'c',
- btn: ['浠呬繚瀛�', '淇濆瓨鎻愪氦','鍏抽棴鍙栨秷'],
+ btn: ['浠呬繚瀛�', '淇濆瓨鎻愪氦', '鍏抽棴鍙栨秷'],
yes: function () {
// 鏇存柊鍒伴〉闈�
var data = form.val("form-detail");
// 鍚堝苟鏇存柊鐣跺墠缂栬緫鏁版嵁
Object.assign(curCheckData, data);
saveCheckData();
- if(scanCodeTag){
+ if (scanCodeTag) {
showScanCode();
}
}, btn2: function () {
@@ -392,18 +406,17 @@
// 鍚堝苟鏇存柊鐣跺墠缂栬緫鏁版嵁
Object.assign(curCheckData, data);
submit();
- if(scanCodeTag){
+ if (scanCodeTag) {
showScanCode();
}
}, btn3: function () {
parent.layer.closeAll();
- if(scanCodeTag){
+ if (scanCodeTag) {
showScanCode();
}
},
closeBtn: 0
});
-
// 鑾峰彇鍖栭獙椤逛俊鎭�
flushCheckItem(curCheckData.foodVariety);
getPriceByFoodLevel(curCheckData.foodLevel);
@@ -417,7 +430,6 @@
$("#check-result-tip").text("妫�楠岀粨鏋滐細#");
$("#price-result-tip2").text("绮瀹氫环锛�#鍏�/鍏枻");
curCheckData.foodVariety = foodVariety;
-
var index = layer.load();
$.ajax({
type: "POST",
@@ -479,6 +491,11 @@
//淇濆瓨鎻愪氦
function submit() {
+ console.log(curCheckData)
+ if (!curCheckData.sampleUser) {
+ layer.alert("璇峰厛鎵︽牱锛侊紒");
+ return;
+ }
if (curCheckData.checkStatus == "NONE" || curCheckData.checkStatus == "NONE2") {
layer.alert("璇风‘璁ゅ寲楠岀粨鏋滐紒锛�");
return;
@@ -489,6 +506,10 @@
}
if (!curCheckData.foodLevel) {
layer.alert("璇风‘璁ょ伯椋熺瓑绾э紒锛�");
+ return;
+ }
+ if (!curCheckData.foodType) {
+ layer.alert("璇风‘璁ょ伯椋熸�ц川锛侊紒");
return;
}
if (!curCheckData.price) {
@@ -537,7 +558,7 @@
area: ['700px', '320px'],
shade: 0,
content: $('#scanCodeDetail'),
- success: function(){
+ success: function () {
document.getElementById('checkId').focus();
},
btnAlign: 'c',
@@ -555,7 +576,7 @@
//鏍规嵁璐ㄦ鍗曞彿鑾峰彇淇℃伅
function getDataByCheckId() {
var param = form.val("form-sacnCodeDetail");
- if(!param.checkId){
+ if (!param.checkId) {
layer.alert("璐ㄦ鍗曞彿涓虹┖锛岃鎵爜鎴栬緭鍏ヨ川妫�鍗曞彿");
}
var index = layer.load();
@@ -606,7 +627,7 @@
}, {
field: 'registerTime',
title: '鐧昏鏃堕棿',
- width: '15%',
+ width: '13%',
style: 'font-weight: bold'
}, {
field: 'sampleStatus',
@@ -631,12 +652,26 @@
}, {
field: 'sampleTime',
title: '鎵︽牱鏃堕棿',
- width: '15%',
+ width: '13%',
style: 'font-weight: bold'
+ }, {
+ field: 'foodType',
+ title: '绮鎬ц川',
+ width: '9%',
+ templet: function (item) {
+ var result = item.foodType;
+ $.each(listFoodType, function (index, data) {
+ if (item.foodType == data.code) {
+ result = data.name;
+ return true;
+ }
+ });
+ return result == null ? "" : result;
+ }
}, {
field: 'foodVariety',
title: '绮鍝佺',
- width: '11%',
+ width: '9%',
templet: function (item) {
var result = item.foodVariety;
$.each(listFoodVariety, function (index, data) {
@@ -650,7 +685,7 @@
}, {
field: 'depotId',
title: '瑁呭嵏浠撳簱',
- width: '11%',
+ width: '10%',
templet: function (item) {
var result = item.depotId;
$.each(listDepot, function (index, data) {
--
Gitblit v1.9.3