From 7df042662e1929abdd667cfd7b037f4e10e8c2ad Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 14 三月 2024 11:27:56 +0800
Subject: [PATCH] 其他应付单 增加子表保存,目录放到采购管理,其他入库单编辑模块 并完善 其他出库单 列表功能;( 常规 功能, 新增,修改,删除,审核,作废,关闭,自定义过滤,源单类型列表(源单 手工录入), 合计行,保存控制,审核控制,删除控制,关联数回填 等等 ) (注: 基础资料选择, 均用 基础资料列表 的方式)
---
WebTM/views/验收入库/产品入库/Kf_ProductInBill_FastList.html | 207 ++++++++++++++++++++++++++++++++++-----------------
1 files changed, 138 insertions(+), 69 deletions(-)
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_FastList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_FastList.html"
index 04069e6..9d4fcb5 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_FastList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_FastList.html"
@@ -138,6 +138,8 @@
, table = layui.table
, form = layui.form
, element = layui.element;
+ var option = {}
+
//娓呯┖鐣岄潰 new
var sBillType = '1202'
@@ -148,8 +150,10 @@
//璇诲彇鍗曟嵁鍒楄〃
//
- form.on('submit(Cancel)', function () {
- parent.location.href = "../../../views/index.html"
+ form.on('submit(cmdCancel)', function () {
+ layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
+ parent.location.href = "../../../views/index_Mobile.html"
+ });
//window.close();//鍏抽棴褰撳墠椤�
})
@@ -212,27 +216,7 @@
}
})
});
- var option = {
- elem: '#dj-table'
- //, url: GetWEBURL() + '/ProductIn/DisBillEntryList_Json'
- , toolbar: '#toolbarDemo'
- , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
- , cols: [[
- { type: 'radio' }
- , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
- , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
- , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
- , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
- , { field: 'HQty', title: '鏁伴噺', width: 100 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
- , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 120 }
- , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
- ]]
- , height: 500
- , done: function () {
- layer.closeAll("loading");
- }
- }
+
table.render({
elem: '#sy-table'
@@ -256,28 +240,34 @@
// url: GetWEBURL() + '/Web/chanpinruk',
form.on('submit(cmdRefresh)', function () {//鍒锋柊
- table.render({
- elem: '#dj-table'
- , url: GetWEBURL() + '/Web/chanpinruk'
- , toolbar: '#toolbarDemo'
- , defaultToolbar: []
- , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
- , cols: [[
- { type: 'radio' }
- , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
- , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
- , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
- , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
- , { field: 'HQty', title: '鏁伴噺', width: 100 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
- , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 120 }
- , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
- ]]
- , height: 500
- , done: function () {
- layer.closeAll("loading");
- }
- }),
+ ////鍒锋柊缂撳瓨鍒楄〃鐨勬覆鏌�
+ //table.render({
+ // elem: '#dj-table'
+ // , url: GetWEBURL() + '/Web/chanpinruk'
+ // , toolbar: '#toolbarDemo'
+ // , defaultToolbar: []
+ // , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
+ // , cols: [[
+ // { type: 'radio' }
+ // , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
+ // , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+ // , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
+ // , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+ // , { field: 'HQty', title: '鏁伴噺', width: 100 }
+ // , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+ // , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 120 }
+ // , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
+ // ]]
+ // , height: 500
+ // , done: function () {
+ // layer.closeAll("loading");
+ // }
+ //}),
+
+ //鍔ㄦ�佸垪琛�-鍒锋柊缂撳瓨鍒楄〃
+ table.render(option);
+
+ //鍒锋柊宸蹭笂浼犲垪琛�
table.render({
elem: '#yd-table'
, url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
@@ -312,16 +302,19 @@
form.on('submit(cmdRescind)', function () {
var checkStatus = table.checkStatus('yd-table');
var checkStatus2 = table.checkStatus('sy-table');
+ var checkStatus3 = table.checkStatus('dj-table');
var data = "";
if (checkStatus.data.length != 0) {
data = checkStatus.data;
} else if (checkStatus2.data.length != 0) {
data = checkStatus2.data;
+ } else if (checkStatus3.data.length != 0) {
+ data = checkStatus3.data;
} else {
return layer.msg("璇烽�夋嫨涓�鏉℃暟鎹�");
}
- var sInterID = data[0].HInterID
- var sBillNo = data[0].HBillNo
+ var sInterID = data[0].HInterID == 'undefined' ? data[0].鍗曟嵁鍐呯爜 : data[0].HInterID;
+ var sBillNo = data[0].HBillNo == 'undefined' ? data[0].鍗曟嵁鍙� : data[0].HBillNo;
var sBillType = '1202'
$.ajax(
{
@@ -363,7 +356,7 @@
var checkStatus = table.checkStatus('dj-table')
, data = checkStatus.data;
if (checkStatus.data.length === 1) {
- var sInterID = data[0].HInterID
+ var sInterID = data[0].HInterID == 'undefined' ? data[0].鍗曟嵁鍐呯爜 : data[0].HInterID;
//閫昏緫鍒犻櫎鏂规硶
layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
$.ajax(
@@ -473,30 +466,106 @@
})
});
+ ////缂撳瓨鍒楄〃
+ //table.render({
+ // elem: '#dj-table'
+ // , url: GetWEBURL() + '/Web/chanpinruk'
+ // , toolbar: '#toolbarDemo'
+ // , defaultToolbar: []
+ // , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
+ // , cols: [[
+ // { type: 'radio' }
+ // , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
+ // , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+ // , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
+ // , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+ // , { field: 'HQty', title: '鏁伴噺', width: 100 }
+ // , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+ // , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 120 }
+ // , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
+ // ]]
+ // , height: 500
+ // , done: function () {
+ // layer.closeAll("loading");
+ // }
+ //})
- table.render({
- elem: '#dj-table'
- , url: GetWEBURL() + '/Web/chanpinruk'
- , toolbar: '#toolbarDemo'
- , defaultToolbar: []
- , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
- , cols: [[
- { type: 'radio' }
- , { field: 'HInterID', title: '鍗曟嵁鍐呯爜', width: 120 }
- , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
- , { field: 'HMaker', title: '鍒跺崟浜�', width: 120 }
- , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
- , { field: 'HQty', title: '鏁伴噺', width: 100 }
- , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
- , { field: 'HRedBlueFlag', title: '绾㈣摑瀛�', width: 120 }
- , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
- ]]
- , height: 500
- , done: function () {
- layer.closeAll("loading");
+
+ //鍔ㄦ�佸垪-缂撳瓨鍒楄〃
+ $.ajax({
+ url: GetWEBURL() + "/Web/chanpinruk1",
+ type: "GET",
+ async: false,
+ data: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] },
+ //async: false,
+ success: function (data1) {
+
+ if (data1.count == 1) {
+
+ var data = [];
+ var col = [];
+ //缁欑┖鐨勬暟缁勮祴鍊�
+ for (var key in data1.list) {
+ data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+ }
+ //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+ col.push({ type: 'radio', fixed: 'left' });
+ for (var i = 0; i < data.length; i++) {
+ if ($.inArray(data[i].name, "") > -1) {
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+ }
+ else {
+ switch (data[i].Type) {
+ //int
+ case 'DateTime':
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 });
+ break;
+ default:
+ col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+ }
+ }
+ }
+
+ option = {
+ elem: '#dj-table'
+ , toolbar: '#toolbarDemo'
+ , height: 500
+ , page: true //寮�鍚垎椤�
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , cols: [col]
+ , data: data1.data
+ };
+ table.render(option);
+ } else {
+ option = {
+ elem: '#dj-table'
+ , toolbar: '#toolbarDemo'
+ , height: 500
+ , page: true //寮�鍚垎椤�
+ , limit: 50
+ , limits: [50, 500, 5000, 20000]
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡', width: 150 }
+ , { field: 'HBillNo', title: '鍗曟嵁鍙�', width: 150 }
+ , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+ , { field: 'HQty', title: '鏁伴噺', width: 100 }
+ ]]
+ , data: []
+ };
+ table.render(option);
+ }
+ },
+ error: function (err) {
+ layer.msg('閿欒' + err, {
+ icon: 5,
+ time: 20000
+ }, function () {
+ //do something
+ });
}
})
-
//宸蹭笂浼犲垪琛�
table.render({
--
Gitblit v1.9.1