From 53fab3f56e8335fbf39fc07c4e10f6abdb0505bb Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期三, 03 十二月 2025 18:48:11 +0800
Subject: [PATCH] 登记、化验、称重页面调整,及登记化验数据提交
---
fzzy-igdss-web/src/main/resources/static/inout/inout-common.js | 186 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 185 insertions(+), 1 deletions(-)
diff --git a/fzzy-igdss-web/src/main/resources/static/inout/inout-common.js b/fzzy-igdss-web/src/main/resources/static/inout/inout-common.js
index 6609900..6193019 100644
--- a/fzzy-igdss-web/src/main/resources/static/inout/inout-common.js
+++ b/fzzy-igdss-web/src/main/resources/static/inout/inout-common.js
@@ -23,6 +23,191 @@
}
}
+
+// ---------------------------绮浜у湴-寮�濮� -------------------//
+function showFoodLocation() {
+ var index = layer.load();
+ table.render({
+ elem: '#tableFoodLoaction',
+ url: '/basic/inout/page-dicArea',
+ page: true,
+ toolbar: '#toolbarFoodLocaton',
+ even: true,
+ method: 'POST',
+ contentType: "application/json;charset=UTF-8",
+ cols: [[{
+ field: 'code',
+ title: '缂栫爜',
+ }, {
+ field: 'simple',
+ title: '绠�鎷�',
+ }, {
+ field: 'name',
+ title: '鍚嶇О',
+ width: '60%'
+ }]],
+ where: {
+ "page": 1,
+ "limit": 8
+ },
+ parseData: function (res) {
+ if ("0000" == res.code) {
+ return {
+ "code": "0",
+ "msg": res.msg,
+ "count": res.data.total,
+ "data": res.data.records
+ }
+ } else {
+ return {
+ "code": "1",
+ "msg": res.msg
+ }
+ }
+ },
+ done: function (res) {
+ layer.close(index);
+ }
+ });
+
+ //鍙屽嚮鏄剧ず閫変腑鏁版嵁
+ table.on('rowDouble(tableFoodLoaction)', function (obj) {
+ var data = obj.data;
+ // 璧嬪��
+ form.val("form-data", {
+ foodLocation: data.name,
+ foodLocationId: data.code
+ });
+ // 鍏抽棴
+ $("#listFoodLocation").css("display", "none");
+ layer.close(index3);
+ });
+
+ // 寮瑰嚭瀵硅瘽妗�
+ var index3 = layer.open({
+ type: 1,
+ title: "閫夋嫨绮骇鍦�",
+ offset: ['240px', '100px'],
+ area: ['600px', '530px'],
+ cancel: function (index, layero) {
+ $("#listFoodLocation").css("display", "none");
+ },
+ shade: 0,
+ scrollbar: 0,
+ content: $('#listFoodLocation'),
+ closeBtn: 1
+ });
+}
+
+// 鍒锋柊
+function flushFoodLocation() {
+ var key = $("#key2").val();
+ table.reload('tableFoodLoaction', {
+ url: "/basic/inout/page-dicArea",
+ where: {
+ key: key
+ },
+ done: function (res) {
+ if (key) {
+ $("#key2").val(key);
+ }
+ }
+ });
+}
+
+
+// ---------------------------閫氱煡鍗�-寮�濮� -------------------//
+// 寮瑰嚭寰�鏉ュ崟浣嶄笅鎷夋
+function showNotice() {
+ var titleCustomer = "閫佽揣鍗曚綅";
+ var url = "/basic/inout/list-notice-in";
+ if ("OUT" == type) {
+ titleCustomer = "鏀惰揣鍗曚綅";
+ url = "/basic/inout/list-notice-out"
+ }
+ var index = layer.load();
+ var param = {
+ type: type
+ };
+
+ console.log(url);
+
+ table.render({
+ elem: '#tableNotice',
+ url: url,
+ page: false,
+ even: true,
+ method: 'POST',
+ contentType: "application/json;charset=UTF-8",
+ cols: [[{
+ field: 'name',
+ title: '閫氱煡鍗曞悕绉�',
+ width: '15%'
+ }, {
+ field: 'customerName',
+ title: titleCustomer
+ }, {
+ field: 'foodVarietyName',
+ title: '绮鍝佺',
+ width: '10%'
+ }, {
+ field: 'year',
+ title: '骞翠唤',
+ width: '8%'
+ }, {
+ field: 'contract',
+ title: '鍏宠仈鍚堝悓'
+ }]],
+ where: param,
+ parseData: function (res) {
+ if ("0000" == res.code) {
+ return {
+ "code": "0",
+ "msg": res.msg,
+ "data": res.data
+ }
+ } else {
+ return {
+ "code": "1",
+ "msg": res.msg
+ }
+ }
+ },
+ done: function (res) {
+ layer.close(index);
+ }
+ });
+ //鍙屽嚮鏄剧ず閫変腑鏁版嵁
+ table.on('rowDouble(tableNotice)', function (obj) {
+ var data = obj.data;
+ console.log(data)
+ form.val("form-data", {
+ customerName: data.customerName,
+ noticeId: data.id,
+ foodYear: data.year,
+ depotId: data.depotId,
+ foodVariety: data.foodVariety
+ });
+ layer.close(index2);
+ // 鍏抽棴
+ $("#listNotice").css("display", "none");
+ });
+ // 寮瑰嚭瀵硅瘽妗�
+ var index2 =layer.open({
+ type: 1,
+ offset: ['100px', '250px'],
+ title: "閫氱煡鍗曞垪琛紙鍙屽嚮閫変腑锛�",
+ area: ['900px', '600px'],
+ cancel: function (index, layero) {
+ $("#listNotice").css("display", "none");
+ },
+ shade: 0,
+ scrollbar: 0,
+ content: $('#listNotice'),
+ closeBtn: 1
+ });
+}
+
//閿欒鎻愰啋
function alertError(msg) {
layer.alert(msg, {
@@ -54,7 +239,6 @@
} else {
$("#resultType").text("鍑哄簱-" + INOUT_PROGRESS_MSG(data.progress));
}
- $("#resultIntelCard").text(data.intelCard);
layer.open({
type: 1,
offset: ['150px', '200px'],
--
Gitblit v1.9.3