From 87110c04df904eb4947587a34f3fc5a1eb45eb7e Mon Sep 17 00:00:00 2001
From: wxw <Administrator@DESKTOP-5BIMHQ3>
Date: 星期日, 12 十月 2025 16:21:11 +0800
Subject: [PATCH] 入库单据开发导入入库单功能;
---
HTML/views/BaseSetting/Materials.html | 1127 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 562 insertions(+), 565 deletions(-)
diff --git a/HTML/views/BaseSetting/Materials.html b/HTML/views/BaseSetting/Materials.html
index 93a71ec..0d65c55 100644
--- a/HTML/views/BaseSetting/Materials.html
+++ b/HTML/views/BaseSetting/Materials.html
@@ -1,133 +1,141 @@
<!DOCTYPE html>
<html>
- <head>
- <meta charset="utf-8">
- <title>鐗╂枡缂栫爜淇℃伅鍒楄〃</title>
- <meta name="renderer" content="webkit">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
- <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
- <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
- <script>
- // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
- document.addEventListener("DOMContentLoaded", function() {
-
- //鑾峰彇table榛樿鏄剧ず鏁�
- pageCntFirst();
- });
- </script>
- </head>
- <body id="body">
- <div class="layui-fluid" style="padding-bottom: 0;">
- <div class="layui-card">
- <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC" id="top">
- <div class="layui-form-item">
- <!-- 鐗╂枡缂栫爜 -->
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 60px;">鐗╂枡缂栫爜</label>
- <div class="layui-input-inline">
- <input type="text" id="SkuNo" name="SkuNo" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" autocomplete="off" class="layui-input">
- </div>
- </div>
- <!-- 鐗╂枡鍚嶇О -->
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 60px;">鐗╂枡鍚嶇О</label>
- <div class="layui-input-inline">
- <input type="text" id="SkuName" name="SkuName" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-inline">
- <!-- 瀹℃牳鐘舵�� -->
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 60px;">瀹℃牳鐘舵��</label>
- <div class="layui-input-inline">
- <select name="AuditStatusNo" id="AuditStatusNo" lay-verify="">
- <option value=""></option>
- <option value="0">寰呭鏍�</option>
- <option value="9">宸查�氳繃</option>
- </select>
- </div>
- </div>
- </div>
- <div class="layui-inline">
- <!-- 绫诲瀷 -->
- <label class="layui-form-label" style="width: 60px;">绫诲瀷</label>
- <div class="layui-input-inline">
- <select name="Type" id="Type" lay-verify="" lay-verify="" lay-search>
- <option value=""></option>
- <option value="0">鍘熸枡</option>
- <option value="1">鍖呮潗</option>
- <option value="2">鎴愬搧</option>
- <option value="3">鑰楁潗</option>
- <option value="4">涓棿鍝�</option>
- </select>
- </div>
- </div>
- <!-- 鏄惁鍙楁帶 -->
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 60px;">鏄惁鍙楁帶</label>
- <div class="layui-input-inline">
- <select name="IsControlled" id="IsControlled" lay-verify="" lay-verify="" lay-search>
- <option value=""></option>
- <option value="0">鍙楁帶</option>
- <option value="1">闈炲彈鎺�</option>
- </select>
- </div>
- </div>
- <!-- 鏄惁鍏嶆 -->
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 60px;">鏄惁鍏嶆</label>
- <div class="layui-input-inline">
- <select name="IsInspect" id="IsInspect" lay-verify="" lay-verify="" lay-search>
- <option value=""></option>
- <option value="0">鍚�</option>
- <option value="1">鏄�</option>
- </select>
- </div>
- </div>
- <!-- 瀛樺偍鐜 -->
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 60px;">瀛樺偍鐜</label>
- <div class="layui-input-inline">
- <select name="Environment" id="Environment" lay-verify="" lay-verify="" lay-search>
- <option value=""></option>
- <option value="0">甯告俯</option>
- <option value="1">浣庢俯</option>
- <!-- <option value="3">骞茬嚗閫氶</option> -->
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <!-- 鐗╂枡绫诲埆 -->
- <div class="layui-inline">
- <label class="layui-form-label" style="width: 60px;">鐗╂枡绫诲埆</label>
- <div class="layui-input-inline">
- <select name="CategoryNo" id="CategoryNo" lay-verify="">
- <option value=""></option>
- </select>
- </div>
- </div>
- </div>
- <div class="layui-inline">
- <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit lay-filter="LAY-app-contlist-search">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储
- </button>
- </div>
- <div class="layui-inline">
- <button class="layui-btn layui-btn-sm layuiadmin-btn-list approvalBtn" style="margin-right: 10px;" data-type="add" id="approvalBtn">
- <i class="layui-icon layuiadmin-button-btn"></i>娣诲姞
- </button>
+
+<head>
+ <meta charset="utf-8">
+ <title>鐗╂枡缂栫爜淇℃伅鍒楄〃</title>
+ <meta name="renderer" content="webkit">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport"
+ content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+ <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
+ <script>
+ // 杩欓噷鏄渶瑕佸湪椤甸潰娓叉煋涔嬪墠鎵ц鐨勪唬鐮�
+ document.addEventListener("DOMContentLoaded", function () {
+
+ //鑾峰彇table榛樿鏄剧ず鏁�
+ pageCntFirst();
+ });
+ </script>
+</head>
+
+<body id="body">
+ <div class="layui-fluid" style="padding-bottom: 0;">
+ <div class="layui-card">
+ <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="border-bottom:1px solid #CCC"
+ id="top">
+ <div class="layui-form-item">
+ <!-- 鐗╂枡缂栫爜 -->
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 60px;">鐗╂枡缂栫爜</label>
+ <div class="layui-input-inline">
+ <input type="text" id="SkuNo" name="SkuNo" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�" autocomplete="off"
+ class="layui-input">
</div>
</div>
+ <!-- 鐗╂枡鍚嶇О -->
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 60px;">鐗╂枡鍚嶇О</label>
+ <div class="layui-input-inline">
+ <input type="text" id="SkuName" name="SkuName" placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" autocomplete="off"
+ class="layui-input">
+ </div>
+ </div>
+ <div class="layui-inline">
+ <!-- 瀹℃牳鐘舵�� -->
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 60px;">瀹℃牳鐘舵��</label>
+ <div class="layui-input-inline">
+ <select name="AuditStatusNo" id="AuditStatusNo" lay-verify="">
+ <option value=""></option>
+ <option value="0">寰呭鏍�</option>
+ <option value="9">宸查�氳繃</option>
+ </select>
+ </div>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <!-- 绫诲瀷 -->
+ <label class="layui-form-label" style="width: 60px;">绫诲瀷</label>
+ <div class="layui-input-inline">
+ <select name="Type" id="Type" lay-verify="" lay-verify="" lay-search>
+ <option value=""></option>
+ <option value="0">鍘熸枡</option>
+ <option value="1">鍖呮潗</option>
+ <option value="2">鎴愬搧</option>
+ <option value="3">鑰楁潗</option>
+ <option value="4">涓棿鍝�</option>
+ </select>
+ </div>
+ </div>
+ <!-- 鏄惁鍙楁帶 JC34 鍙樻洿涓� 鏄惁璇烽獙 -->
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 60px;">鏄惁璇烽獙</label>
+ <div class="layui-input-inline">
+ <select name="IsControlled" id="IsControlled" lay-verify="" lay-verify="" lay-search>
+ <option value=""></option>
+ <option value="0">鏄�</option>
+ <option value="1">鍚�</option>
+ </select>
+ </div>
+ </div>
+ <!-- 鏄惁鍏嶆 JC34 鍙樻洿涓� 鏄惁鍙楁帶-->
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 60px;">鏄惁鍙楁帶</label>
+ <div class="layui-input-inline">
+ <select name="IsInspect" id="IsInspect" lay-verify="" lay-verify="" lay-search>
+ <option value=""></option>
+ <option value="0">鏄�</option>
+ <option value="1">鍚�</option>
+ </select>
+ </div>
+ </div>
+ <!-- 瀛樺偍鐜 -->
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 60px;">瀛樺偍鐜</label>
+ <div class="layui-input-inline">
+ <select name="Environment" id="Environment" lay-verify="" lay-verify="" lay-search>
+ <option value=""></option>
+ <option value="0">甯告俯</option>
+ <option value="1">浣庢俯</option>
+ <!-- <option value="3">骞茬嚗閫氶</option> -->
+ </select>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <!-- 鐗╂枡绫诲埆 -->
+ <div class="layui-inline">
+ <label class="layui-form-label" style="width: 60px;">鐗╂枡绫诲埆</label>
+ <div class="layui-input-inline">
+ <select name="CategoryNo" id="CategoryNo" lay-verify="">
+ <option value=""></option>
+ </select>
+ </div>
+ </div>
+ </div>
+ <div class="layui-inline">
+ <button class="layui-btn layui-btn-sm layuiadmin-btn-list" lay-submit
+ lay-filter="LAY-app-contlist-search">
+ <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>鎼滅储
+ </button>
+ </div>
+ <div class="layui-inline">
+ <button class="layui-btn layui-btn-sm layuiadmin-btn-list approvalBtn"
+ style="margin-right: 10px;" data-type="add" id="approvalBtn">
+ <i class="layui-icon layuiadmin-button-btn"></i>娣诲姞
+ </button>
+ </div>
</div>
+ </div>
- <div id="center"></div>
+ <div id="center"></div>
- <div class="layui-card-body">
- <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table>
-
- <!-- 瀹℃牳鐘舵�� -->
- <!-- <script type="text/html" id="buttonAuditStatusNo">
+ <div class="layui-card-body">
+ <table id="LAY-app-content-list" lay-filter="LAY-app-content-list"></table>
+
+ <!-- 瀹℃牳鐘舵�� -->
+ <!-- <script type="text/html" id="buttonAuditStatusNo">
{{# if(d.AuditStatusNo=='0'){ }}
<button class="layui-btn layui-btn-radius layui-btn-xs" style="background-color:RED;">寰呭鏍�</button>
{{# } else if(d.AuditStatusNo=='9') { }}
@@ -136,8 +144,8 @@
<button class="layui-btn layui-btn-radius layui-btn-danger layui-btn-xs" style="background-color: blue;">鍏跺畠</button>
{{# } }}
</script> -->
- <!-- 绫诲瀷 -->
- <script type="text/html" id="buttonType">
+ <!-- 绫诲瀷 -->
+ <script type="text/html" id="buttonType">
{{# if(d.Type=='0'){ }}
<p>鍘熸枡</p>
{{# } else if(d.Type=='1') { }}
@@ -151,25 +159,25 @@
{{# } }}
</script>
- <!-- 鏄惁鍙楁帶 -->
- <script type="text/html" id="buttonIsControlled">
+ <!-- 鏄惁鍙楁帶 -->
+ <script type="text/html" id="buttonIsControlled">
{{# if(d.IsControlled=='0'){ }}
<p>鍙楁帶</p>
{{# } else if(d.IsControlled=='1') { }}
<p>闈炲彈鎺�</p>
{{# } }}
</script>
-
- <!-- 鏄惁鍏嶆 -->
- <script type="text/html" id="buttonIsInspect">
+
+ <!-- 鏄惁鍏嶆 -->
+ <script type="text/html" id="buttonIsInspect">
{{# if(d.IsInspect=='0'){ }}
<p>鍚�</p>
{{# } else if(d.IsInspect=='1') { }}
<p>鏄�</p>
{{# } }}
</script>
- <!-- 鏄惁璐存爣 -->
- <script type="text/html" id="buttonIsPasteCode">
+ <!-- 鏄惁璐存爣 -->
+ <script type="text/html" id="buttonIsPasteCode">
{{# if(d.IsPasteCode=='0'){ }}
<p>鍚�</p>
{{# } else if(d.IsPasteCode=='1') { }}
@@ -177,8 +185,8 @@
{{# } }}
</script>
- <!-- 瀛樺偍鐜 -->
- <script type="text/html" id="buttonEnvironment">
+ <!-- 瀛樺偍鐜 -->
+ <script type="text/html" id="buttonEnvironment">
{{# if(d.Environment=='0'){ }}
<p>甯告俯</p>
{{# } else if(d.Environment=='1') { }}
@@ -188,7 +196,7 @@
{{# } }}
</script>
- <script type="text/html" id="table-content-list">
+ <script type="text/html" id="table-content-list">
<a class="layui-btn layui-btn-normal layui-btn-xs approvalBtnupt" lay-event="edit">
<i class="layui-icon layui-icon-edit"></i>缂栬緫
</a>
@@ -196,122 +204,74 @@
<i class="layui-icon layui-icon-delete"></i>鍒犻櫎
</a>
</script>
- </div>
</div>
</div>
- <script src="../../layuiadmin/layui/layui.js"></script>
- <script src="../../js/public.js"></script>
- <script src="../../js/jquery-3.5.1.min.js"></script>
- <script src="../../js/jquery.cookie.js"></script>
- <script>
- layui.config({
- base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
- }).extend({
- index: 'lib/index' //涓诲叆鍙fā鍧�
- }).use(['index', 'table', 'laypage', 'layer'], function() {
- var table = layui.table,
- form = layui.form,
- laypage = layui.laypage,
- layer = layui.layer;
+ </div>
+ <script src="../../layuiadmin/layui/layui.js"></script>
+ <script src="../../js/public.js"></script>
+ <script src="../../js/jquery-3.5.1.min.js"></script>
+ <script src="../../js/jquery.cookie.js"></script>
+ <script>
+ layui.config({
+ base: '../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+ }).extend({
+ index: 'lib/index' //涓诲叆鍙fā鍧�
+ }).use(['index', 'table', 'laypage', 'layer'], function () {
+ var table = layui.table,
+ form = layui.form,
+ laypage = layui.laypage,
+ layer = layui.layer;
- var h1 = GetTableHeight();
- refreshTable("","","","","","","","");
- var tableIns;
- //鑾峰彇绫诲埆淇℃伅
- sendData(IP + "/sys/GetMaterialCategories1",{},'get',function(res){
- console.log(res)
- if (res.code == 1) //鎴愬姛
- {
- Categoryhtml = '<option value =""></option>';
- for (var i = 0; i < res.data.length; i++) {
- Categoryhtml = Categoryhtml + '<option value =' + res.data[i].CategoryNo + '>' + res.data[i].CategoryName + '</option>'
- }
- $("#CategoryNo").append(Categoryhtml);
- form.render('select');
+ var h1 = GetTableHeight();
+ refreshTable("", "", "", "", "", "", "", "");
+ var tableIns;
+ //鑾峰彇绫诲埆淇℃伅
+ sendData(IP + "/sys/GetMaterialCategories1", {}, 'get', function (res) {
+ console.log(res)
+ if (res.code == 1) //鎴愬姛
+ {
+ Categoryhtml = '<option value =""></option>';
+ for (var i = 0; i < res.data.length; i++) {
+ Categoryhtml = Categoryhtml + '<option value =' + res.data[i].CategoryNo + '>' + res.data[i].CategoryName + '</option>'
}
- })
-
- function refreshTable(SkuNo,SkuName,AuditStatusNo,Type,IsControlled,IsInspect,Environment,CategoryNo) {
- var param = {
- SkuNo: SkuNo,
- SkuName: SkuName,
- AuditStatusNo: AuditStatusNo,
- Type: Type,
- IsControlled: IsControlled,
- IsInspect: IsInspect,
- Environment: Environment,
- CategoryNo:CategoryNo
- };
-
- var url = "/Basis/GetMateList?SkuNo="+SkuNo+"&&SkuName="+SkuName+"&&AuditStatusNo="+AuditStatusNo+"&&Type="+Type+"&&IsControlled="+IsControlled+"&&IsInspect="+IsInspect+"&&Environment="+Environment+"&CategoryNo="+CategoryNo;
- sendData(IP + url, {}, 'get', function(res) {
- if (res.code == 0) //鎴愬姛
- {
- var list = res.data;
- $.extend(infoOptions, {
- data: list
- });
- infoOptions.page = {
- curr: 1
- }
- tableIns = table.render(infoOptions);
- }
- else //涓嶆垚鍔�
- {
- layer.msg('鑾峰彇鐗╂枡鍒楄〃淇℃伅澶辫触锛�', {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {});
- }
- });
- sendData(IP + "/basis/GetRoleRightList", {}, "get", function (res) {
- $(function () {
- $(".approvalBtn").hide();
- });
- $(function () {
- $(".approvalBtndel").hide();
- });
- $(function () {
- $(".approvalBtnupt").hide();
- });
- if (res.code == 0) //鎴愬姛
- {
- for (var k = 0; k < res.data.length; k++) {
- if (res.data[k].MenuName == "娣诲姞鐗╂枡") {
- $(function () {
- $(".approvalBtn").show();
- });
- }
- if (res.data[k].MenuName == "鍒犻櫎鐗╂枡") {
- $(function () {
- $(".approvalBtndel").show();
- });
- }
- if (res.data[k].MenuName == "缂栬緫鐗╂枡") {
- $(function () {
- $(".approvalBtnupt").show();
- });
- }
- }
- }
- else //涓嶆垚鍔�
- {
- layer.msg(
- "鑾峰彇淇℃伅澶辫触",
- {
- icon: 2,
- time: 2000, //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- },
- function () {
- //鍥炶皟
- }
- );
- }
- });
+ $("#CategoryNo").append(Categoryhtml);
+ form.render('select');
}
-
+ })
-
+ function refreshTable(SkuNo, SkuName, AuditStatusNo, Type, IsControlled, IsInspect, Environment, CategoryNo) {
+ var param = {
+ SkuNo: SkuNo,
+ SkuName: SkuName,
+ AuditStatusNo: AuditStatusNo,
+ Type: Type,
+ IsControlled: IsControlled,
+ IsInspect: IsInspect,
+ Environment: Environment,
+ CategoryNo: CategoryNo
+ };
+
+ var url = "/Basis/GetMateList?SkuNo=" + SkuNo + "&&SkuName=" + SkuName + "&&AuditStatusNo=" + AuditStatusNo + "&&Type=" + Type + "&&IsControlled=" + IsControlled + "&&IsInspect=" + IsInspect + "&&Environment=" + Environment + "&CategoryNo=" + CategoryNo;
+ sendData(IP + url, {}, 'get', function (res) {
+ if (res.code == 0) //鎴愬姛
+ {
+ var list = res.data;
+ $.extend(infoOptions, {
+ data: list
+ });
+ infoOptions.page = {
+ curr: 1
+ }
+ tableIns = table.render(infoOptions);
+ }
+ else //涓嶆垚鍔�
+ {
+ layer.msg('鑾峰彇鐗╂枡鍒楄〃淇℃伅澶辫触锛�', {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { });
+ }
+ });
sendData(IP + "/basis/GetRoleRightList", {}, "get", function (res) {
$(function () {
$(".approvalBtn").hide();
@@ -356,354 +316,391 @@
);
}
});
-
-
- var infoOptions = {
- elem: "#LAY-app-content-list",
- height: h1,
- id: "LAY-app-content-list",
- page: true,
- limit: pageCnt,
- limits: pageLimits,
- even: true,
- cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
- cols:
+ }
+
+
+
+ sendData(IP + "/basis/GetRoleRightList", {}, "get", function (res) {
+ $(function () {
+ $(".approvalBtn").hide();
+ });
+ $(function () {
+ $(".approvalBtndel").hide();
+ });
+ $(function () {
+ $(".approvalBtnupt").hide();
+ });
+ if (res.code == 0) //鎴愬姛
+ {
+ for (var k = 0; k < res.data.length; k++) {
+ if (res.data[k].MenuName == "娣诲姞鐗╂枡") {
+ $(function () {
+ $(".approvalBtn").show();
+ });
+ }
+ if (res.data[k].MenuName == "鍒犻櫎鐗╂枡") {
+ $(function () {
+ $(".approvalBtndel").show();
+ });
+ }
+ if (res.data[k].MenuName == "缂栬緫鐗╂枡") {
+ $(function () {
+ $(".approvalBtnupt").show();
+ });
+ }
+ }
+ }
+ else //涓嶆垚鍔�
+ {
+ layer.msg(
+ "鑾峰彇淇℃伅澶辫触",
+ {
+ icon: 2,
+ time: 2000, //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ },
+ function () {
+ //鍥炶皟
+ }
+ );
+ }
+ });
+
+
+ var infoOptions = {
+ elem: "#LAY-app-content-list",
+ height: h1,
+ id: "LAY-app-content-list",
+ page: true,
+ limit: pageCnt,
+ limits: pageLimits,
+ even: true,
+ cellMinWidth: 80, //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
+ cols:
[[
{
- title: '搴忓彿',type: 'numbers',fixed: 'left',width:65
+ title: '搴忓彿', type: 'numbers', fixed: 'left', width: 65
},
{
- field: 'SkuNo',title: '鐗╂枡缂栫爜',align: 'center',fixed: 'left',width: 100
- },
- {
- field: 'SkuName',title: '鐗╂枡鍚嶇О',align: 'center',width: 150
- },
- {
- field: 'Standard',title: '鐗╂枡瑙勬牸',align: 'center',width: 130
- },
-
- {
- field: 'Type',title: '绫诲瀷',align: 'center',templet: '#buttonType',width: 100
+ field: 'SkuNo', title: '鐗╂枡缂栫爜', align: 'center', fixed: 'left', width: 100
},
{
- field: 'IsControlled',templet: '#buttonIsControlled',title: '鏄惁鍙楁帶',align: 'center',width: 100
- },
- {
- field: 'IsInspect',title: '鏄惁鍏嶆',align: 'center',templet: '#buttonIsInspect',width: 100
- },
- {
- field: 'IsPasteCode',title: '鏄惁璐存爣',align: 'center',templet: '#buttonIsPasteCode',width: 100
- },
- {
- field: 'Origin',title: '鏉ユ簮',align: 'center',width: 200
- },
- {
- field: 'UnitNo',title: '鍗曚綅',align: 'center',width: 100
+ field: 'SkuName', title: '鐗╂枡鍚嶇О', align: 'center', width: 150
},
{
- field: 'PackagName',title: '鍖呰',align: 'center',width: 100
+ field: 'Standard', title: '鐗╂枡瑙勬牸', align: 'center', width: 130
+ },
+
+ {
+ field: 'Type', title: '绫诲瀷', align: 'center', templet: '#buttonType', width: 100
},
{
- field: 'Environment',title: '瀛樺偍鐜',align: 'center',templet: '#buttonEnvironment',width: 120
+ field: 'IsControlled', templet: '#buttonIsControlled', title: '鏄惁鍙楁帶', align: 'center', width: 100
},
{
- field: 'CategoryName',title: '鐗╂枡绫诲埆',align: 'center',width: 120
+ field: 'IsInspect', title: '鏄惁鍏嶆', align: 'center', templet: '#buttonIsInspect', width: 100
},
{
- field: 'Weight',title: '鐞嗚閲嶉噺',align: 'center',width: 135
- },
- {
- field: 'Warranty',title: '淇濊川鏈�(澶�)',align: 'center',width: 140
- },
- {
- field: 'UnpackWarranty',title: '鎷嗗寘鏁堟湡(澶�)',align: 'center',width: 140
- },
-
- {
- field: 'AdventTime',title: '涓存湡(澶�)',align: 'center',width: 140
+ field: 'IsPasteCode', title: '鏄惁璐存爣', align: 'center', templet: '#buttonIsPasteCode', width: 100
},
{
- field: 'LowInventory',title: '浣庡簱瀛�',align: 'center',width: 150
+ field: 'Origin', title: '鏉ユ簮', align: 'center', width: 200
},
{
- field: 'Demo',title: '澶囨敞',align: 'center',width: 200
+ field: 'UnitNo', title: '鍗曚綅', align: 'center', width: 100
},
{
- field: 'CreateUserName',title: '鍒涘缓浜�',align: 'center',width: 130
+ field: 'PackagName', title: '鍖呰', align: 'center', width: 100
},
{
- field: 'CreateTime',title: '鍒涘缓鏃ユ湡',align: 'center',width: 170,
+ field: 'Environment', title: '瀛樺偍鐜', align: 'center', templet: '#buttonEnvironment', width: 120
+ },
+ {
+ field: 'CategoryName', title: '鐗╂枡绫诲埆', align: 'center', width: 120
+ },
+ {
+ field: 'Weight', title: '鐞嗚閲嶉噺', align: 'center', width: 135
+ },
+ {
+ field: 'Warranty', title: '淇濊川鏈�(澶�)', align: 'center', width: 140
+ },
+ {
+ field: 'UnpackWarranty', title: '鎷嗗寘鏁堟湡(澶�)', align: 'center', width: 140
+ },
+
+ {
+ field: 'AdventTime', title: '涓存湡(澶�)', align: 'center', width: 140
+ },
+ {
+ field: 'LowInventory', title: '浣庡簱瀛�', align: 'center', width: 150
+ },
+ {
+ field: 'Demo', title: '澶囨敞', align: 'center', width: 200
+ },
+ {
+ field: 'CreateUserName', title: '鍒涘缓浜�', align: 'center', width: 130
+ },
+ {
+ field: 'CreateTime', title: '鍒涘缓鏃ユ湡', align: 'center', width: 170,
templet: function (d) {
return formatDate(d.CreateTime);
}
},
{
- title: '鎿嶄綔',fixed: 'right',align: 'center',toolbar: '#table-content-list',width: 170
+ title: '鎿嶄綔', fixed: 'right', align: 'center', toolbar: '#table-content-list', width: 170
}
]],
+ };
+
+ //鐩戝惉鎼滅储
+ form.on('submit(LAY-app-contlist-search)', function (data) {
+ var SkuNo = data.field.SkuNo;
+ var SkuName = data.field.SkuName;
+ var AuditStatusNo = data.field.AuditStatusNo;
+ var Type = data.field.Type;
+ var IsControlled = data.field.IsControlled;
+ var IsInspect = data.field.IsInspect;
+ var Environment = data.field.Environment;
+ var CategoryNo = data.field.CategoryNo;
+
+ refreshTable(SkuNo, SkuName, AuditStatusNo, Type, IsControlled, IsInspect, Environment, CategoryNo);
+ });
+ var doing = true;
+ var $ = layui.$,
+ active = {
+ //鏂板
+ add: function () {
+ layer.open({
+ type: 2,
+ title: '娣诲姞鐗╂枡淇℃伅',
+ content: 'MaterialsForm.html',
+ maxmin: true,
+ area: ['640px', '746px'],
+ btn: ['纭畾', '鍙栨秷'],
+ yes: function (index, layero) {
+ var iframeWindow = window['layui-layer-iframe' + index],
+ submitID = 'layuiadmin-app-form-submit',
+ submit = layero.find('iframe').contents().find('#' + submitID);
+ //鐩戝惉鎻愪氦
+ iframeWindow.layui.form.on('submit(' + submitID + ')', function (
+ data) {
+ var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈�
+ //鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹�
+ var param = {
+ SkuNo: field.SkuNo,
+ SkuName: field.SkuName,
+ Standard: field.Standard,
+ //AuditStatusNo: field.AuditStatusNo,
+ Type: field.Type,
+ IsControlled: field.IsControlled,
+ IsInspect: field.IsInspect,
+ IsPasteCode: field.IsPasteCode,
+ Origin: field.Origin,
+ CategoryNo: field.CategoryNo,
+ UnitNo: field.UnitNo,
+ PackagNo: field.PackagNo,
+ Environment: field.Environment,
+ Weight: Number(field.Weight),
+ Warranty: Number(field.Warranty),
+ UnpackWarranty: Number(field.UnpackWarranty),
+ Price: Number(field.Price),
+ AdventTime: Number(field.AdventTime), //涓存湡
+ LowInventory: Number(field.LowInventory), //浣庡簱瀛�
+ Demo: field.Demo
+ };
+ if (doing) {
+ doing = false;
+ sendData(IP + "/Basis/AddMate", param, 'post', function (res) {
+ console.log(res);
+ if (res.code == 0) { //鎴愬姛
+ layer.msg(res.msg, {
+ icon: 1,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ layer.close(index); //鍏抽棴寮瑰眰
+ refreshTable
+ (
+ $("#SkuNo").val(),
+ $("#SkuName").val(),
+ $("#AuditStatusNo").val(),
+ $("#Type").val(),
+ $("#IsControlled").val(),
+ $("#IsInspect").val(),
+ $("#Environment").val(),
+ $("#CategoryNo").val()
+ );
+ doing = true;
+ });
+ }
+ else if (res.code == 2) {
+ layer.msg("鐗╂枡缂栫爜鎴栧悕绉伴噸澶嶏紝娣诲姞澶辫触锛�", {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { doing = true; });
+ }
+ else //涓嶆垚鍔�
+ {
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { doing = true; });
+ }
+ });
+ }
+ else {
+ console.log(123);
+ }
+
+ });
+ submit.trigger('click');
+ }
+ });
+ }
};
-
- //鐩戝惉鎼滅储
- form.on('submit(LAY-app-contlist-search)', function(data) {
- var SkuNo = data.field.SkuNo;
- var SkuName = data.field.SkuName;
- var AuditStatusNo = data.field.AuditStatusNo;
- var Type = data.field.Type;
- var IsControlled = data.field.IsControlled;
- var IsInspect = data.field.IsInspect;
- var Environment = data.field.Environment;
- var CategoryNo = data.field.CategoryNo;
-
- refreshTable(SkuNo,SkuName,AuditStatusNo,Type,IsControlled,IsInspect,Environment,CategoryNo);
- });
- var doing = true;
- var $ = layui.$,
- active = {
- //鏂板
- add: function() {
- layer.open({
- type: 2,
- title: '娣诲姞鐗╂枡淇℃伅',
- content: 'MaterialsForm.html',
- maxmin: true,
- area: ['640px', '746px'],
- btn: ['纭畾', '鍙栨秷'],
- yes: function(index, layero) {
- var iframeWindow = window['layui-layer-iframe' + index],
- submitID = 'layuiadmin-app-form-submit',
- submit = layero.find('iframe').contents().find('#' + submitID);
- //鐩戝惉鎻愪氦
- iframeWindow.layui.form.on('submit(' + submitID + ')', function(
- data) {
- var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈�
- //鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹�
- var param = {
- SkuNo: field.SkuNo,
- SkuName: field.SkuName,
- Standard: field.Standard,
- //AuditStatusNo: field.AuditStatusNo,
- Type: field.Type,
- IsControlled: field.IsControlled,
- IsInspect: field.IsInspect,
- IsPasteCode: field.IsPasteCode,
- Origin: field.Origin,
- CategoryNo: field.CategoryNo,
- UnitNo: field.UnitNo,
- PackagNo: field.PackagNo,
- Environment: field.Environment,
- Weight: Number(field.Weight),
- Warranty: Number(field.Warranty),
- UnpackWarranty: Number(field.UnpackWarranty),
- Price: Number(field.Price),
- AdventTime: Number(field.AdventTime), //涓存湡
- LowInventory: Number(field.LowInventory), //浣庡簱瀛�
- Demo: field.Demo
- };
- if(doing)
- {
- doing = false;
- sendData(IP + "/Basis/AddMate", param, 'post',function(res) {
- console.log(res);
- if (res.code == 0) { //鎴愬姛
- layer.msg(res.msg, {
- icon: 1,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {
- layer.close(index); //鍏抽棴寮瑰眰
- refreshTable
- (
- $("#SkuNo").val(),
- $("#SkuName").val(),
- $("#AuditStatusNo").val(),
- $("#Type").val(),
- $("#IsControlled").val(),
- $("#IsInspect").val(),
- $("#Environment").val(),
- $("#CategoryNo").val()
- );
- doing = true;
- });
- }
- else if (res.code == 2) {
- layer.msg("鐗╂枡缂栫爜鎴栧悕绉伴噸澶嶏紝娣诲姞澶辫触锛�", {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {doing = true;});
- }
- else //涓嶆垚鍔�
- {
- layer.msg(res.msg, {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {doing = true;});
- }
- });
- }
- else{
- console.log(123);
- }
-
- });
- submit.trigger('click');
- }
- });
- }
- };
- $('.layui-btn.layuiadmin-btn-list').on('click', function() {
- var type = $(this).data('type');
- active[type] ? active[type].call(this) : '';
- });
+ $('.layui-btn.layuiadmin-btn-list').on('click', function () {
+ var type = $(this).data('type');
+ active[type] ? active[type].call(this) : '';
+ });
- var element = layui.element;
- var houseId = 0;
- var param = {
- Id: $.cookie('userId')
- }
- var xml = '';
- function getchiled(data, mainId) {
- if (data)
- {
- var list = data.filter(item => item.ParentId == mainId);
- if (list)
- {
- for (var i = 0; i < list.length; i++)
- {
- var id = list[i].Id;
- //鏌ヨ鏈夋棤瀛愯彍鍗�
- var count = data.filter(item => item.ParentId == id).length;
- if (count > 0)
- {
- xml = xml + '<dd>' + '<a href="javascript:;">' + list[i].Name + '</a>' + '<dl class="layui-nav-child">';
- getchiled(data, id);
- xml = xml + '</dl></dd>';
- }
- else
- {
- xml = xml + '<dd>' + '<a lay-href="' + list[i].Url + '">' + list[i].Name + '</a>' + '</dd>';
- }
+ var element = layui.element;
+ var houseId = 0;
+ var param = {
+ Id: $.cookie('userId')
+ }
+ var xml = '';
+ function getchiled(data, mainId) {
+ if (data) {
+ var list = data.filter(item => item.ParentId == mainId);
+ if (list) {
+ for (var i = 0; i < list.length; i++) {
+ var id = list[i].Id;
+ //鏌ヨ鏈夋棤瀛愯彍鍗�
+ var count = data.filter(item => item.ParentId == id).length;
+ if (count > 0) {
+ xml = xml + '<dd>' + '<a href="javascript:;">' + list[i].Name + '</a>' + '<dl class="layui-nav-child">';
+ getchiled(data, id);
+ xml = xml + '</dl></dd>';
+ }
+ else {
+ xml = xml + '<dd>' + '<a lay-href="' + list[i].Url + '">' + list[i].Name + '</a>' + '</dd>';
}
}
}
}
- var uid = $.cookie('userId');
- table.on('tool(LAY-app-content-list)', function(obj) {
- var data = obj.data;
- //鍒犻櫎
- if (obj.event === 'del')
- {
- layer.confirm('纭畾鍒犻櫎閫変腑鐨勭墿鏂欙紵', function(index) {
- cusid = data.Id;
- var arr = [];
- arr.push(cusid); //灞炴��
- var param = {
- Ids: arr
- };
- if(doing)
- {
- doing = false;
- sendData(IP + "/Basis/DelMate?Id="+data.Id+"", {} , 'get', function(res) {
- console.log(res);
- if (res.code == 0) { //鎴愬姛
- layer.msg(res.msg, {
- icon: 1,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {
- refreshTable
- (
- $("#SkuNo").val(),
- $("#SkuName").val(),
- $("#AuditStatusNo").val(),
- $("#Type").val(),
- $("#IsControlled").val(),
- $("#IsInspect").val(),
- $("#Environment").val(),
- $("#CategoryNo").val()
- );
- //table.reload('LAY-app-content-list'); //鏁版嵁鍒锋柊
- doing = true;
- });
- }
- else //涓嶆垚鍔�
- {
- layer.msg(res.msg, {
- icon: 2,
- time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {doing = true;});
- }
- });
- }
- else
- {
- console.log(123);
- }
- });
- }
- //缂栬緫
- else if (obj.event === 'edit')
- {
- cusId = data.Id;
- layer.open({
- type: 2,
- title: '缂栬緫鐗╂枡淇℃伅',
- content: 'MaterialsForm.html?id=' + cusId,
- maxmin: true,
- area: ['640px', '746px'],
- btn: ['纭畾', '鍙栨秷'],
- yes: function(index, layero) {
- var iframeWindow = window['layui-layer-iframe' + index],
- submitID = 'layuiadmin-app-form-edit',
- submit = layero.find('iframe').contents().find('#' + submitID);
- //鐩戝惉鎻愪氦
- iframeWindow.layui.form.on('submit(' + submitID + ')', function(data) {
- var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈�
- //鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹�
- var param = {
- Id: cusId,
- SkuNo: field.SkuNo,
- SkuName: field.SkuName,
- Standard: field.Standard,
- AuditStatusNo: field.AuditStatusNo,
- Type: field.Type,
- IsControlled: field.IsControlled,
- IsInspect: field.IsInspect,
- IsPasteCode: field.IsPasteCode,
- Origin: field.Origin,
- CategoryNo: field.CategoryNo,
- UnitNo: field.UnitNo,
- PackagNo: field.PackagNo,
- Environment: field.Environment,
- Weight: Number(field.Weight),
- Warranty: Number(field.Warranty),
- UnpackWarranty: Number(field.UnpackWarranty),
- Price: Number(field.Price),
- AdventTime: Number(field.AdventTime), //涓存湡
- LowInventory: Number(field.LowInventory), //浣庡簱瀛�
- Demo: field.Demo
- };
- if(doing)
- {
- doing = false;
- sendData(IP + "/Basis/ExitMate", param, 'post',
- function(res) {
+ }
+ var uid = $.cookie('userId');
+ table.on('tool(LAY-app-content-list)', function (obj) {
+ var data = obj.data;
+ //鍒犻櫎
+ if (obj.event === 'del') {
+ layer.confirm('纭畾鍒犻櫎閫変腑鐨勭墿鏂欙紵', function (index) {
+ cusid = data.Id;
+ var arr = [];
+ arr.push(cusid); //灞炴��
+ var param = {
+ Ids: arr
+ };
+ if (doing) {
+ doing = false;
+ sendData(IP + "/Basis/DelMate?Id=" + data.Id + "", {}, 'get', function (res) {
+ console.log(res);
+ if (res.code == 0) { //鎴愬姛
+ layer.msg(res.msg, {
+ icon: 1,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () {
+ refreshTable
+ (
+ $("#SkuNo").val(),
+ $("#SkuName").val(),
+ $("#AuditStatusNo").val(),
+ $("#Type").val(),
+ $("#IsControlled").val(),
+ $("#IsInspect").val(),
+ $("#Environment").val(),
+ $("#CategoryNo").val()
+ );
+ //table.reload('LAY-app-content-list'); //鏁版嵁鍒锋柊
+ doing = true;
+ });
+ }
+ else //涓嶆垚鍔�
+ {
+ layer.msg(res.msg, {
+ icon: 2,
+ time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
+ }, function () { doing = true; });
+ }
+ });
+ }
+ else {
+ console.log(123);
+ }
+ });
+ }
+ //缂栬緫
+ else if (obj.event === 'edit') {
+ cusId = data.Id;
+ layer.open({
+ type: 2,
+ title: '缂栬緫鐗╂枡淇℃伅',
+ content: 'MaterialsForm.html?id=' + cusId,
+ maxmin: true,
+ area: ['640px', '746px'],
+ btn: ['纭畾', '鍙栨秷'],
+ yes: function (index, layero) {
+ var iframeWindow = window['layui-layer-iframe' + index],
+ submitID = 'layuiadmin-app-form-edit',
+ submit = layero.find('iframe').contents().find('#' + submitID);
+ //鐩戝惉鎻愪氦
+ iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
+ var field = data.field; //鑾峰彇鎻愪氦鐨勫瓧娈�
+ //鎻愪氦 Ajax 鎴愬姛鍚庯紝闈欐�佹洿鏂拌〃鏍间腑鐨勬暟鎹�
+ var param = {
+ Id: cusId,
+ SkuNo: field.SkuNo,
+ SkuName: field.SkuName,
+ Standard: field.Standard,
+ AuditStatusNo: field.AuditStatusNo,
+ Type: field.Type,
+ IsControlled: field.IsControlled,
+ IsInspect: field.IsInspect,
+ IsPasteCode: field.IsPasteCode,
+ Origin: field.Origin,
+ CategoryNo: field.CategoryNo,
+ UnitNo: field.UnitNo,
+ PackagNo: field.PackagNo,
+ Environment: field.Environment,
+ Weight: Number(field.Weight),
+ Warranty: Number(field.Warranty),
+ UnpackWarranty: Number(field.UnpackWarranty),
+ Price: Number(field.Price),
+ AdventTime: Number(field.AdventTime), //涓存湡
+ LowInventory: Number(field.LowInventory), //浣庡簱瀛�
+ Demo: field.Demo
+ };
+ if (doing) {
+ doing = false;
+ sendData(IP + "/Basis/ExitMate", param, 'post',
+ function (res) {
if (res.code == 0) //鎴愬姛
{
layer.msg("淇敼鎴愬姛", {
icon: 1,
time: 1000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {
+ }, function () {
layer.close(index); //鍏抽棴寮瑰眰
refreshTable
- (
- $("#SkuNo").val(),
- $("#SkuName").val(),
- $("#AuditStatusNo").val(),
- $("#Type").val(),
- $("#IsControlled").val(),
- $("#IsInspect").val(),
- $("#Environment").val(),
- $("#CategoryNo").val(),
- );
+ (
+ $("#SkuNo").val(),
+ $("#SkuName").val(),
+ $("#AuditStatusNo").val(),
+ $("#Type").val(),
+ $("#IsControlled").val(),
+ $("#IsInspect").val(),
+ $("#Environment").val(),
+ $("#CategoryNo").val(),
+ );
doing = true;
});
}
@@ -712,21 +709,21 @@
layer.msg(res.msg, {
icon: 2,
time: 2000 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
- }, function() {doing = true;});
+ }, function () { doing = true; });
}
});
- }
- else
- {
- console.log(123);
- }
- });
- submit.trigger('click');
- }
- });
- }
- });
+ }
+ else {
+ console.log(123);
+ }
+ });
+ submit.trigger('click');
+ }
+ });
+ }
});
- </script>
- </body>
-</html>
+ });
+ </script>
+</body>
+
+</html>
\ No newline at end of file
--
Gitblit v1.8.0