| | |
| | | /* var WEBURL = "http://localhost:8082/SRMAPI/";*/ |
| | | |
| | | return WEBURL |
| | | } |
| | | |
| | | function GetWEBURlLanguage() { |
| | | return GetWEBURL() |
| | | } |
| | |
| | | <Content Include="layuiAdmin.std-v1.2.1\src\layuiadmin\lib\extend\echartsTheme.js" /> |
| | | <Content Include="layuiAdmin.std-v1.2.1\src\layuiadmin\lib\index.js" /> |
| | | <Content Include="layuiAdmin.std-v1.2.1\src\layuiadmin\lib\view.js" /> |
| | | <Content Include="layuiAdmin.std-v1.2.1\src\layuiadmin\MESLanguage.js" /> |
| | | <Content Include="layuiAdmin.std-v1.2.1\src\layuiadmin\modules\common.js" /> |
| | | <Content Include="layuiAdmin.std-v1.2.1\src\layuiadmin\modules\console.js" /> |
| | | <Content Include="layuiAdmin.std-v1.2.1\src\layuiadmin\modules\contlist.js" /> |
| | |
| | | slide_links: 'blank', // Individual links for each slide (Options: false, 'num', 'name', 'blank') |
| | | slides: [ // Slideshow Images |
| | | //{ image: 'layuiAdmin.std-v1.2.1/src/img/1.jpg' }, |
| | | { image: 'layuiAdmin.std-v1.2.1/src/img/2.jpg' }, |
| | | //{ image: 'layuiAdmin.std-v1.2.1/src/img/3.jpg' }, |
| | | //{ image: 'layuiAdmin.std-v1.2.1/src/img/2.jpg' }, |
| | | { image: 'layuiAdmin.std-v1.2.1/src/img/3.jpg' }, |
| | | //{ image: 'layuiAdmin.std-v1.2.1/src/img/4.jpg' }, |
| | | //{ image: 'layuiAdmin.std-v1.2.1/src/img/5.jpg' }, |
| | | //{ image: 'layuiAdmin.std-v1.2.1/src/img/6.jpg' }, |
| New file |
| | |
| | | |
| | | var HModNameData = ""; |
| | | var HLanguageType_Data = ""; |
| | | document.addEventListener('click', function (event) { |
| | | var data = localStorage.getItem("data"); |
| | | var data2 = JSON.parse(data); |
| | | if (HModNameData != "indexMenu") { |
| | | if (data == null || data2.HTranSlate != HLanguageType_Data) { |
| | | ClickFunction(2,HModNameData, HLanguageType_Data); |
| | | } else { |
| | | ClickFunction(2,HModNameData, data2.HTranSlate); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | //点击事件触发的方法 |
| | | function ClickFunction(InitiaType,HModName,HLanguageType) { |
| | | var data = localStorage.getItem(HModName); |
| | | if (data != null) { |
| | | var data2 = JSON.parse(data) |
| | | if (HModName == "SRM_login") { |
| | | LoginDataShow(data2, HLanguageType); |
| | | } else { |
| | | ModelDataShow(InitiaType,data2, HLanguageType); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //初始化页面加载数据 InitiaType 初始化 默认1 2=点击事件 |
| | | function initFunction(InitiaType, HModName, HLanguageType) { |
| | | HModNameData = HModName; |
| | | HLanguageType_Data = HLanguageType; |
| | | get_ReadConfigFile(InitiaType,HModName, HLanguageType); |
| | | } |
| | | |
| | | //登录页面 显示数据 |
| | | function LoginDataShow(data, HLanguageType) { |
| | | for (var i = 0; i < data.length; i++) { |
| | | var HTranslationText = ""; |
| | | |
| | | if (HLanguageType == 1) { |
| | | HTranslationText = data[i].HFieldName; |
| | | } else if (HLanguageType == 2) { |
| | | HTranslationText = data[i].HTranslationText_English; |
| | | } else if (HLanguageType == 3) { |
| | | HTranslationText = data[i].HTranslationText_Spain; |
| | | } |
| | | |
| | | if (data[i].HFieldModelType == "id") { |
| | | $("#" + data[i].HFieldCode).text(data[i].HFieldName) |
| | | } else if (data[i].HFieldModelType == "class") { |
| | | if (data[i].HFieldCode != "select option") { |
| | | var count = document.querySelectorAll(data[i].HFieldCode).length; |
| | | for (var j = 0; j < count; j++) { |
| | | document.querySelectorAll(data[i].HFieldCode)[j].innerText = data[i].HFieldName; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (data[i].HFieldModelType == "id") { |
| | | if ($("#" + data[i].HFieldCode).text().trim() == data[i].HFieldName) { |
| | | $("#" + data[i].HFieldCode).text(HTranslationText) |
| | | } |
| | | } else if (data[i].HFieldModelType == "class") { |
| | | if (data[i].HFieldCode != "select option") { |
| | | var count = document.querySelectorAll(data[i].HFieldCode).length; |
| | | for (var j = 0; j < count; j++) { |
| | | if (document.querySelectorAll(data[i].HFieldCode)[j].innerText.trim() == data[i].HFieldName) { |
| | | document.querySelectorAll(data[i].HFieldCode)[j].innerText = HTranslationText; |
| | | //break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //模块 显示数据 |
| | | function ModelDataShow(InitiaType, data, HLanguageType) { |
| | | //下拉框所有值 .layui-unselect dd |
| | | var OptionData = []; |
| | | const ddElementsOptionData = document.querySelectorAll(".layui-unselect dd"); |
| | | // 遍历元素并获取内容 |
| | | ddElementsOptionData.forEach((dd, index) => { |
| | | OptionData.push(dd.innerText.trim()); |
| | | }); |
| | | |
| | | //下拉框所有值 select option |
| | | var OptionList = []; |
| | | const ddElementsOptionList = document.querySelectorAll("select option"); |
| | | // 遍历元素并获取内容 |
| | | ddElementsOptionList.forEach((dd, index) => { |
| | | OptionList.push(dd.innerText.trim()); |
| | | }); |
| | | |
| | | //表格列数据 |
| | | var tableColData = []; |
| | | const tableColDataList = document.querySelectorAll(".layui-table tr span"); |
| | | // 遍历元素并获取内容 |
| | | tableColDataList.forEach((dd, index) => { |
| | | tableColData.push(dd.innerText.trim()); |
| | | }); |
| | | |
| | | for (var i = 0; i < data.length; i++) { |
| | | var HTranslationText = ""; |
| | | |
| | | if (HLanguageType == 1) { |
| | | HTranslationText = data[i].HFieldName; |
| | | } else if (HLanguageType == 2) { |
| | | HTranslationText = data[i].HTranslationText_English; |
| | | } else if (HLanguageType == 3) { |
| | | HTranslationText = data[i].HTranslationText_Spain; |
| | | } |
| | | |
| | | if (data[i].HFieldModelType == "id") { |
| | | if ($("#" + data[i].HFieldCode).text().trim() == data[i].HFieldName) { |
| | | if (document.querySelectorAll("#" + data[i].HFieldCode)[0].innerHTML == data[i].HFieldName) { |
| | | document.querySelectorAll("#" + data[i].HFieldCode)[0].innerHTML = document.querySelectorAll("#" + data[i].HFieldCode)[0].innerHTML.replace(data[i].HFieldName.replace('*', ''), HTranslationText.replace('*', '')); |
| | | } else if (document.querySelectorAll("#" + data[i].HFieldCode)[0].innerText == data[i].HFieldName) { |
| | | document.querySelectorAll("#" + data[i].HFieldCode)[0].innerHTML = document.querySelectorAll("#" + data[i].HFieldCode)[0].innerText.replace(data[i].HFieldName.replace('*', ''), HTranslationText.replace('*', '')); |
| | | } else { |
| | | document.querySelectorAll("#" + data[i].HFieldCode)[0].innerText = document.querySelectorAll("#" + data[i].HFieldCode)[0].innerText.replace(data[i].HFieldName.replace('*', ''), HTranslationText.replace('*', '')); |
| | | } |
| | | } |
| | | } else if (data[i].HFieldModelType == "class") { |
| | | |
| | | if (InitiaType != 2) { |
| | | if (data[i].HFieldCode != "select option") { |
| | | if (data[i].HFieldCode != ".layui-table tr span") { |
| | | var count = document.querySelectorAll(data[i].HFieldCode).length; |
| | | for (var j = 0; j < count; j++) { |
| | | if (document.querySelectorAll(data[i].HFieldCode)[j].innerText.trim() == data[i].HFieldName) { |
| | | document.querySelectorAll(data[i].HFieldCode)[j].innerHTML = document.querySelectorAll(data[i].HFieldCode)[j].innerHTML.replace(data[i].HFieldName, HTranslationText); |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | |
| | | //下拉框的所有值 |
| | | var indicesData = []; |
| | | var currentIndex = -1; |
| | | while ((currentIndex = OptionData.indexOf(data[i].HFieldName, currentIndex + 1)) !== -1) { |
| | | indicesData.push(currentIndex); |
| | | } |
| | | |
| | | for (var j = 0; j < indicesData.length; j++) { |
| | | document.querySelectorAll(".layui-unselect dd")[indicesData[j]].innerHTML = document.querySelectorAll(".layui-unselect dd")[indicesData[j]].innerHTML.replace(data[i].HFieldName, HTranslationText); |
| | | |
| | | } |
| | | |
| | | var indicesList = []; |
| | | currentIndex = -1; |
| | | while ((currentIndex = OptionList.indexOf(data[i].HFieldName, currentIndex + 1)) !== -1) { |
| | | indicesList.push(currentIndex); |
| | | } |
| | | |
| | | for (var j = 0; j < indicesList.length; j++) { |
| | | document.querySelectorAll(data[i].HFieldCode)[indicesList[j]].innerText = document.querySelectorAll(data[i].HFieldCode)[indicesList[j]].innerText.replace(data[i].HFieldName, HTranslationText); |
| | | } |
| | | |
| | | } |
| | | } else { |
| | | if (data[i].HFieldCode != "select option" && data[i].HFieldCode != ".layui-table tr span") { |
| | | var count = document.querySelectorAll(data[i].HFieldCode).length; |
| | | for (var j = 0; j < count; j++) { |
| | | if (document.querySelectorAll(data[i].HFieldCode)[j].innerText.trim() == data[i].HFieldName) { |
| | | document.querySelectorAll(data[i].HFieldCode)[j].innerHTML = document.querySelectorAll(data[i].HFieldCode)[j].innerHTML.replace(data[i].HFieldName, HTranslationText); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //表格列数据 |
| | | if (data[i].HFieldCode == ".layui-table tr span") { |
| | | var indicesData = []; |
| | | var currentIndex = -1; |
| | | while ((currentIndex = tableColData.indexOf(data[i].HFieldName, currentIndex + 1)) !== -1) { |
| | | indicesData.push(currentIndex); |
| | | } |
| | | if (data[i].HFieldCode != "select option") { |
| | | for (var j = 0; j < indicesData.length; j++) { |
| | | document.querySelectorAll(data[i].HFieldCode)[indicesData[j]].innerHTML = document.querySelectorAll(data[i].HFieldCode)[indicesData[j]].innerHTML.replace(data[i].HFieldName, HTranslationText); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //下拉框的默认值 |
| | | if (data[i].HFieldCode == ".layui-unselect input") { |
| | | var uncount = document.querySelectorAll(".layui-unselect input").length; |
| | | for (var j = 0; j < uncount; j++) { |
| | | if (document.querySelectorAll(".layui-unselect input")[j].placeholder.trim() == data[i].HFieldName) { |
| | | document.querySelectorAll(".layui-unselect input")[j].placeholder = document.querySelectorAll(".layui-unselect input")[j].placeholder.replace(data[i].HFieldName, HTranslationText); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //获取页面的所有标签id 对应要翻译的字段 |
| | | function SelectData() { |
| | | var DataList = ""; |
| | | |
| | | //#region 登录界面 自定义 类 FY_BT 为了统一 |
| | | //刷卡 字段可以获取 所以 不用自定义 |
| | | var logCount = document.querySelectorAll('.FY_BT').length; |
| | | for (var i = 0; i < logCount; i++) { |
| | | var id = document.querySelectorAll('.FY_BT')[i].id; |
| | | var data = document.querySelectorAll('.FY_BT')[i].innerText.trim(); |
| | | var type = "id"; |
| | | DataList += id + "|" + data + "|" + type + "," |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //文本标签的数据获取 通过id |
| | | var LableCount = document.querySelectorAll('.layui-form-label').length; |
| | | for (var i = 0; i < LableCount; i++) { |
| | | var id = document.querySelectorAll('.layui-form-label')[i].id; |
| | | var data = document.querySelectorAll('.layui-form-label')[i].innerText.trim(); |
| | | var type = "id"; |
| | | DataList += id + "|" + data + "|" + type + "," |
| | | } |
| | | |
| | | //复选框标签的的数据获取 通过id |
| | | var CheckCount = document.querySelectorAll("input[type='checkbox']").length; |
| | | for (var i = 0; i < CheckCount; i++) { |
| | | var data = document.querySelectorAll("input[type='checkbox']")[i].title.trim(); |
| | | if (data != "") { |
| | | var id = document.querySelectorAll("input[type='checkbox']")[i].id; |
| | | var type = "id"; |
| | | DataList += id + "|" + data + "|" + type + "," |
| | | } |
| | | |
| | | } |
| | | |
| | | //#region 单据页面 按钮的获取 |
| | | |
| | | //单据页面 标题标签获取 通过id |
| | | var BTCount = document.querySelectorAll('.layui-tab h1').length |
| | | for (var i = 0; i < BTCount; i++) { |
| | | if (document.querySelectorAll('.layui-tab h1')[i].innerText.trim() != '') { |
| | | var id = document.querySelectorAll('.layui-tab h1')[i].id; |
| | | var data = document.querySelectorAll('.layui-tab h1')[i].innerText.trim(); |
| | | var type = "id"; |
| | | DataList += id + "|" + data + "|" + type + "," |
| | | } |
| | | } |
| | | |
| | | //#endregion |
| | | |
| | | //按钮标签的数据获取 通过id |
| | | //按钮标签的数据获取 通过class 例如 子表删除 他的id会变 |
| | | var BtnCount = document.querySelectorAll('.layui-btn').length; |
| | | for (var i = 0; i < BtnCount; i++) { |
| | | if (document.querySelectorAll('.layui-btn')[i].innerText.trim() != "") { |
| | | var id = document.querySelectorAll('.layui-btn')[i].id.trim(); |
| | | var type = ""; |
| | | if (id != "") { |
| | | type = "id"; |
| | | } else { |
| | | id = ".layui-btn"; |
| | | type = "class"; |
| | | } |
| | | var data = document.querySelectorAll('.layui-btn')[i].innerText.trim(); |
| | | |
| | | DataList += id + "|" + data + "|" + type + "," |
| | | } |
| | | } |
| | | |
| | | //页签标签的数据获取 通过class |
| | | var YQCount = document.querySelectorAll('.layui-tab-title>li').length; |
| | | for (var i = 0; i < YQCount; i++) { |
| | | if (document.querySelectorAll('.layui-tab-title>li')[i].innerText.trim() != '') { |
| | | var id = ".layui-tab-title>li" |
| | | var data = document.querySelectorAll('.layui-tab-title>li')[i].innerText.trim(); |
| | | var type = "class"; |
| | | DataList += id + "|" + data + "|" + type + "," |
| | | } |
| | | } |
| | | |
| | | //表格列标签的数据获取 通过class |
| | | var ColCount = document.querySelectorAll('.layui-table tr span').length |
| | | for (var i = 0; i < ColCount; i++) { |
| | | if (document.querySelectorAll('.layui-table tr span')[i].innerText.trim() != '') { |
| | | var id = ".layui-table tr span" |
| | | var data = document.querySelectorAll('.layui-table tr span')[i].innerText.trim(); |
| | | var type = "class"; |
| | | DataList += id + "|" + data + "|" + type + "," |
| | | } |
| | | } |
| | | |
| | | //所有页面 下拉框的所有值 通过class |
| | | var ModelCount = document.querySelectorAll('select option').length |
| | | for (var i = 0; i < ModelCount; i++) { |
| | | if (document.querySelectorAll('select option')[i].innerText.trim() != '') { |
| | | var id = "select option" |
| | | var data = document.querySelectorAll('select option')[i].innerText.trim(); |
| | | var type = "class"; |
| | | DataList += id + "|" + data + "|" + type + "," |
| | | } |
| | | } |
| | | |
| | | |
| | | ////获取页面页签的标签 获取数据 通过 class |
| | | //var YMBQCount = document.querySelectorAll('.layui-tab-title li span').length |
| | | //for (var i = 0; i < YMBQCount; i++) { |
| | | // if (document.querySelectorAll('.layui-tab-title li span')[i].innerText.trim() != '') { |
| | | // var id = ".layui-tab-title li span" |
| | | // var data = document.querySelectorAll('.layui-tab-title li span')[i].innerText.trim(); |
| | | // var type = "class"; |
| | | // DataList += id + "|" + data + "|" + type + "," |
| | | // } |
| | | //} |
| | | |
| | | return DataList; |
| | | } |
| | | |
| | | |
| | | //查询当前页面的数据 |
| | | function Select(InitiaType,HModName, HLanguageType) { |
| | | var sWhere = " and HModuleCode in('" + HModName + "','GYModel') "; |
| | | //1 中文 2 英语 3 西班牙语 |
| | | if (HLanguageType == "1") { |
| | | return false; |
| | | } |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURlLanguage() + '/Xt_grdAlignment_WMES/SelectMESLanguage', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "sWhere": sWhere}, |
| | | success: function (data1) { |
| | | if (data1.data.length > data1.count) { |
| | | get_WriteConfigFile(HModName, data1.data); |
| | | //var data= |
| | | ClickFunction(InitiaType, HModName, HLanguageType); |
| | | |
| | | } else { |
| | | //保存当前页面的数据 |
| | | Save(HModName); |
| | | } |
| | | }, error: function () { |
| | | layer.alert("接口请求失败!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | //保存当前页面的数据 |
| | | function Save(HModName) { |
| | | var DataList = SelectData(); |
| | | DataList = DataList.substring(0, DataList.length - 1); |
| | | DataList += ";"+HModName; |
| | | $.ajax({ |
| | | url: GetWEBURlLanguage() + '/Xt_grdAlignment_WMES/SaveMESLanguage', |
| | | type: "Post", |
| | | async: false, |
| | | data: { "sMainSub": DataList}, |
| | | success: function (data1) { |
| | | if (data1.count != 0) { |
| | | |
| | | } else { |
| | | |
| | | } |
| | | }, error: function () { |
| | | layer.alert("接口请求失败!", { icon: 5 }); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //存储配置文件 |
| | | function get_WriteConfigFile(HModName, SqlDataList) { |
| | | //清空本地存储的数据 |
| | | localStorage.removeItem(HModName); |
| | | var data = []; |
| | | for (var i = 0; i < SqlDataList.length; i++) { |
| | | var HFieldCode = SqlDataList[i].HFieldCode; |
| | | var HFieldName = SqlDataList[i].HFieldName; |
| | | var HFieldModelType = SqlDataList[i].HFieldModelType; |
| | | var HTranslationText_English = SqlDataList[i].HTranslationText_English; |
| | | var HTranslationText_Spain = SqlDataList[i].HTranslationText_Spain; |
| | | |
| | | data.push({ HFieldCode: HFieldCode, HFieldName: HFieldName, HFieldModelType: HFieldModelType, HTranslationText_English: HTranslationText_English, HTranslationText_Spain: HTranslationText_Spain }) |
| | | } |
| | | |
| | | //本地存储 |
| | | localStorage.setItem(HModName, JSON.stringify(data)); |
| | | } |
| | | |
| | | //读取配置文件 |
| | | function get_ReadConfigFile(InitiaType,HModName, HLanguageType) { |
| | | //获取本地存储的数据 |
| | | var data = localStorage.getItem(HModName); |
| | | if (data == null) { |
| | | Select(InitiaType,HModName, HLanguageType); |
| | | } else { |
| | | ClickFunction(InitiaType,HModName,HLanguageType); |
| | | } |
| | | } |
| | | |
| | | //报错信息 通过代码查询 |
| | | //ErrorCode 报错信息 |
| | | //HLanguageType 翻译类型 |
| | | function get_MessageError(ErrorCode, HLanguageType) { |
| | | var result = ""; |
| | | var Message = ""; |
| | | |
| | | const match = ErrorCode.match(/\[(.*?)\]/); |
| | | if (match) { |
| | | result= match[1]; |
| | | } |
| | | if (result == "") { |
| | | return ErrorCode; |
| | | } |
| | | |
| | | $.ajax({ |
| | | url: GetWEBURlLanguage() + '/Xt_grdAlignment_WMES/SelectMessageError', |
| | | type: "get", |
| | | async: false, |
| | | data: { "ErrorCode": result }, |
| | | success: function (data1) { |
| | | |
| | | if (data1.count != 0) { |
| | | if (HLanguageType == 1) { |
| | | Message = data1.data[0].HErrorName; |
| | | } else if (HLanguageType == 2) { |
| | | Message = data1.data[0].HTranslationText_English; |
| | | } else if (HLanguageType == 3) { |
| | | Message = data1.data[0].HTranslationText_Spain; |
| | | } |
| | | } |
| | | }, error: function () { |
| | | layer.alert("接口请求失败!", { icon: 5 }); |
| | | } |
| | | }) |
| | | return Message; |
| | | } |
| | | |
| | |
| | | //var WEBURL = "http://192.168.31.47:8083/WEB-API/"; |
| | | //new |
| | | return WEBURL |
| | | } |
| | | |
| | | function GetWEBURlLanguage() { |
| | | return GetWEBURL() |
| | | } |
| | |
| | | <div class="layui-colla-item"> |
| | | <div class="layui-colla-title layui-inline"> |
| | | <div class="layui-inline"> |
| | | <span>更多</span> |
| | | <span id="BT_GD">更多</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">源单单号</label> |
| | | <label class="layui-form-label" id="bt_HSourceBillNo">源单单号</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HSourceBillNo" id="HSourceBillNo"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">物料编码</label> |
| | | <label class="layui-form-label" id="bt_HShortNumber">物料编码</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HShortNumber" id="HShortNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">物料名称</label> |
| | | <label class="layui-form-label" id="bt_HName">物料名称</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HName" id="HName"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">规格型号</label> |
| | | <label class="layui-form-label" id="bt_HModel">规格型号</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HModel" id="HModel"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">供应商</label> |
| | | <label class="layui-form-label" id="bt_HSupName">供应商</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HSupName" id="HSupName"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="f_Query"> |
| | | <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i> |
| | |
| | | </div> |
| | | <div class="layui-colla-content" style="padding-left:82px"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">状态</label> |
| | | <label class="layui-form-label" id="bt_HStatus">状态</label> |
| | | <div class="layui-input-block"> |
| | | <select name="HStatus" id="HStatus" lay-filter=""> |
| | | <option value="" selected="">全部</option> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">条码编号</label> |
| | | <label class="layui-form-label" id="bt_HBarCode">条码编号</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HBarCode" id="HBarCode"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">物料代码</label> |
| | | <label class="layui-form-label" id="bt_HNumber">物料代码</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HNumber" id="HNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">开始日期</label> |
| | | <label class="layui-form-label" id="bt_HDate1">开始日期</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HDate1" id="HDate1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">结束日期</label> |
| | | <label class="layui-form-label" id="bt_HDate2">结束日期</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HDate2" id="HDate2"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">采购组织</label> |
| | | <label class="layui-form-label" id="bt_HPURCHASEORGID">采购组织</label> |
| | | <div class="layui-input-block"> |
| | | <select id="HPURCHASEORGID" name="HPURCHASEORGID" lay-filter=""> |
| | | <option value="">组织1</option> |
| | |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>预览</button>--> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="getCheckLength">获取选中数目</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="isAll">验证是否全选</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>刷新</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload" id="btn_reload"><i class="layui-icon layui-icon-refresh"></i>刷新</button> |
| | | <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm"><i class="layui-icon layui-icon-ok-circle"></i>确认</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back"><i class="layui-icon layui-icon-close-fill"></i>驳回</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>详情</button>--> |
| | | <button type="button" class="layui-btn layui-btn-sm" id="btn_HideColumn" lay-event="btn-HideColumn"><i class="layui-icon layui-icon-return"></i>隐藏列设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>条码打印</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print-Convenient"><i class="layui-icon layui-icon-print"></i>一键打印</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>删除</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-HideColumn" id="btn_HideColumn"><i class="layui-icon layui-icon-return"></i>隐藏列设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="btn_print"><i class="layui-icon layui-icon-print"></i>条码打印</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print-Convenient" id="btn_print_Convenient"><i class="layui-icon layui-icon-print"></i>一键打印</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete" id="btn_Delete"><i class="layui-icon layui-icon-delete"></i>删除</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit" id="btn_exit"><i class="layui-icon layui-icon-return"></i>退出</button> |
| | | </div> |
| | | </script> |
| | | </div> |
| | |
| | | <script src="../GRInstall.js"></script> |
| | | <script src="../GRUtility.js"></script> |
| | | <script src="../../../../Scripts/webConfig.js"></script> |
| | | <script src="../../layuiadmin/Scripts/jquery-1.4.1.min.js"></script> |
| | | <script src="../../layuiadmin/MESLanguage.js"></script> |
| | | <script> |
| | | //CreateReport("Report"); //打印 |
| | | // Report.LoadFromURL("物料条码(七行纸大)_五云.grf"); |
| | |
| | | |
| | | var params = getUrlVars(); |
| | | var type = params[params[0]]; |
| | | var HSourceBillNo = params[params[1]]; |
| | | var HSourceBillNo = params[params[1]]; |
| | | |
| | | layui.config({ |
| | | base: '../../layuiadmin/' //静态资源所在路径 |
| | |
| | | }); |
| | | //layui.code(); |
| | | RoadHBillNo(sql); |
| | | //调用页面标题翻译方法 |
| | | initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | layer.load(3) |
| | | //方法级渲染 |
| | | table.render({ |
| | |
| | | <div class="layui-btn-group"> |
| | | |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="HBarcodeSaverBox" id="HBarcodeSaverBox">生成条码</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Print">条码打印</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">退出</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Print" id="Print">条码打印</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit" id="Exit">退出</button> |
| | | |
| | | </div> |
| | | </div> |
| | |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label">日期:</label> |
| | | <label class="layui-form-label" id="bt_HDate">日期:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HDate" id="HDate" readonly="readonly" autocomplete="off" disabled> |
| | | </div> |
| | |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label"> 供应商代码:</label> |
| | | <label class="layui-form-label" id="bt_HSupNumber"> 供应商代码:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HSupNumber" lay-verify="HSupNumber" id="HSupNumber" readonly="readonly" autocomplete="off"> |
| | | <input id="HSupID" name="HSupID" type="hidden" /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs3"> |
| | | <label class="layui-form-label"> 供 应 商:</label> |
| | | <label class="layui-form-label" id="bt_HSupName"> 供 应 商:</label> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" name="HSupName" lay-verify="HSupName" id="HSupName" readonly="readonly" autocomplete="off"> |
| | | </div> |
| | |
| | | <script src="../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script> |
| | | <script src="../../../../Scripts/webConfig.js"></script> |
| | | <script src="../../layuiadmin/Scripts/general.js"></script> |
| | | <script src="../../layuiadmin/MESLanguage.js"></script> |
| | | <!--<script src="../../../../Scripts/jquery-1.8.2.js"></script>--> |
| | | <script> |
| | | var HModName = "Gy_BarCodeBill"; |
| | | var HModName = "SRM_MaterialBarCodeBill"; |
| | | function f_alert(sMsg) { |
| | | layer.alert(sMsg, { icon: 5 }); |
| | | } |
| | |
| | | //}; |
| | | ////#endregion |
| | | |
| | | //#region 参数获取function |
| | | //#region 参数获取function |
| | | function getUrlVars() { |
| | | var vars = [], hash; |
| | | var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); |
| | |
| | | , { field: 'HMaterID', title: '物料ID', width: 100, hide: true } |
| | | , { field: 'HItemID', title: 'ID', width: 100, hide: true } |
| | | , { field: 'HMaterNumber', title: '物料编码', width: 120 } |
| | | /* , { field: 'HOldMaterNumber', title: '旧物料编码', width: 120, hide: true }*/ |
| | | /* , { field: 'HOldMaterNumber', title: '旧物料编码', width: 120, hide: true }*/ |
| | | , { field: 'HMaterShortNumber', title: '物料代码', width: 120, hide: true } |
| | | , { field: 'HSubjoin', title: '物料简称', width: 120, } |
| | | , { field: 'HMaterName', title: '物料名称', width: 120 } |
| | |
| | | , { field: 'HStatusMan', title: '工号', width: 120, edit: 'text' } |
| | | , { field: 'HQty', title: '本次生成条码数量', width: 135, edit: 'text', event: "inputHQty" } |
| | | , { field: 'HMinQty', title: '标准包装数(内箱装箱数)', width: 100, event: "inputHMinQty" } |
| | | , { field: 'HBQty', title: '最小包装数(内箱数)', width: 100 } |
| | | , { field: 'HBQty', title: '最小包装数(内箱数)', width: 100 } |
| | | , { field: 'biaoqianzhangshu', title: '标签张数', width: 100 } |
| | | , { field: 'HBatchNo', title: '批号', width: 100, edit: 'text', hide: true } |
| | | , { field: 'HBatchManager', title: '启用批号', width: 100, hide: true } |
| | |
| | | } |
| | | }); |
| | | //#endregion |
| | | |
| | | |
| | | //#region 初次赋值 |
| | | //进入页面查询表体物料信息 |
| | | if (mergeTags != 1) { |
| | |
| | | , { field: 'HSubjoin', title: '物料代码', width: 120, hide: true } |
| | | , { field: 'HMaterName', title: '物料名称', width: 120 } |
| | | , { field: 'HMaterModel', title: '规格型号', width: 120 } |
| | | , { field: 'HStatusMan', title: '工号', width: 120, edit: 'text'} |
| | | , { field: 'HStatusMan', title: '工号', width: 120, edit: 'text' } |
| | | , { field: 'HQty', title: '本次生成条码数量', width: 135, edit: 'text', event: "inputHQty" } |
| | | , { field: 'HMinQty', title: '标准包装数(内箱装箱数)', width: 100, event: "inputHMinQty" } |
| | | , { field: 'HBQty', title: '最小包装数(内箱数)', width: 100 } |
| | |
| | | , { field: 'HSourceBillType', title: '条码类型', width: 100, hide: true } |
| | | , { field: 'HKFDate', title: '生产日期', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate", hide: true }//, event: "chooseHKFDate" |
| | | , { field: 'HKFPeriod', title: '保质期', width: 100, hide: true }// |
| | | , { field: 'HKFDQDate', title: '到期日期', align: 'center', width: 150, data_field: 'HKFDQDate', hide: true}//, event: "chooseHKFDQDate" |
| | | , { field: 'HKFDQDate', title: '到期日期', align: 'center', width: 150, data_field: 'HKFDQDate', hide: true }//, event: "chooseHKFDQDate" |
| | | , { field: 'HSupID', title: '供应商ID', width: 150, hide: true } |
| | | , { field: 'HSupName', title: '供应商名称', width: 150, hide: true } |
| | | |
| | |
| | | "HMaterID": data[i].MaterID, |
| | | "HItemID": data[i].HItemID, |
| | | "HMaterNumber": data[i].物料代码, |
| | | /* "HOldMaterNumber": "",*/ |
| | | /* "HOldMaterNumber": "",*/ |
| | | "HMaterShortNumber": "", |
| | | "HSubjoin": data[i].物料简称, |
| | | "HMaterName": data[i].物料名称, |
| | |
| | | } |
| | | }); |
| | | } |
| | | //#endregion |
| | | //#endregion |
| | | |
| | | //调用页面标题翻译方法 |
| | | initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | |
| | | form.on('submit(Exit)', function (data) {//退出 |
| | | var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引 |
| | | parent.layer.close(index); //再执行关闭 |
| | |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/[^\d*\.?\d*]/g, '')); |
| | | }); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | else if (obj.event == 'inputHMinQty') { |
| | | var $input = $(this), val = $input.val(); |
| | |
| | | var $input = $(this), val = $input.val(); |
| | | if (!val) val = "0"; |
| | | $input.val(val.replace(/[^\d*\.?\d*]/g, '')); |
| | | }); |
| | | }); |
| | | } |
| | | //外箱包装数事件,本页面暂时用不到 |
| | | //else if (obj.event == 'inputHWXQty') { |
| | |
| | | |
| | | |
| | | |
| | | table.on('edit(mainTable)', function (obj) { //注:edit是固定事件名,test是table原始容器的属性 lay-filter="对应的值" |
| | | var value = obj.value //得到修改后的值 |
| | | , data = obj.data //得到所在行所有键值 |
| | | , field = obj.field; //得到字段 |
| | | table.on('edit(mainTable)', function (obj) { //注:edit是固定事件名,test是table原始容器的属性 lay-filter="对应的值" |
| | | var value = obj.value //得到修改后的值 |
| | | , data = obj.data //得到所在行所有键值 |
| | | , field = obj.field; //得到字段 |
| | | |
| | | var HMinQty = 0; |
| | | var HWXQty = 0; |
| | | var HKFPeriod = 0; |
| | | var HWBQty = 0; |
| | | var HBQty = 0; |
| | | var biaoqianzhangshu = 0; |
| | | if (obj.data.HMinQty != undefined) { |
| | | HMinQty = parseFloat(obj.data.HMinQty); |
| | | } |
| | | if (obj.data.biaoqianzhangshu != undefined) { |
| | | biaoqianzhangshu = parseFloat(obj.data.biaoqianzhangshu); |
| | | } |
| | | if (obj.data.HWXQty != undefined) { |
| | | HWXQty = parseFloat(obj.data.HWXQty); |
| | | } |
| | | if (obj.data.HKFPeriod != undefined) { |
| | | HKFPeriod = parseFloat(obj.data.HKFPeriod); |
| | | } |
| | | if (obj.data.HWBQty != undefined) { |
| | | HWBQty = parseFloat(obj.data.HWBQty); |
| | | } |
| | | if (obj.data.HBQty != undefined) { |
| | | HBQty = parseFloat(obj.data.HBQty); |
| | | } |
| | | if (obj.data.HQty != undefined) { |
| | | HBQty = parseFloat(obj.data.HBQty); |
| | | } |
| | | //HMinQty 内箱包装数(标准包装数) |
| | | //HBQty 内箱数(最小包装数) |
| | | //HWXQty 外箱包装数 |
| | | //HWBQty 外箱数 HWBQty |
| | | //biaoqianzhangshu 标签shu |
| | | //HQty 本次生成条码数 |
| | | switch (field) { |
| | | case "HQty": |
| | | if (HMinQty == 0) |
| | | f_alert("注意:包装数为0!"); |
| | | else { |
| | | obj.update({ |
| | | biaoqianzhangshu: Math.ceil(parseFloat(obj.data.HQty) / parseFloat(obj.data.HMinQty)), |
| | | }); |
| | | } |
| | | |
| | | break; |
| | | case "HMinQty": //包装数 |
| | | if (HMinQty < 0) { |
| | | f_alert("包装数不能为负数!"); |
| | | } |
| | | if (HMinQty < HBQty) { |
| | | f_alert("标准包装数量不能小于最小包装数量!请重新输入!") |
| | | return; |
| | | } |
| | | else { |
| | | obj.update({ |
| | | biaoqianzhangshu: Math.ceil(parseFloat(obj.data.HQty) / parseFloat(obj.value)), |
| | | }); |
| | | var HMinQty = 0; |
| | | var HWXQty = 0; |
| | | var HKFPeriod = 0; |
| | | var HWBQty = 0; |
| | | var HBQty = 0; |
| | | var biaoqianzhangshu = 0; |
| | | if (obj.data.HMinQty != undefined) { |
| | | HMinQty = parseFloat(obj.data.HMinQty); |
| | | } |
| | | if (obj.data.biaoqianzhangshu != undefined) { |
| | | biaoqianzhangshu = parseFloat(obj.data.biaoqianzhangshu); |
| | | } |
| | | if (obj.data.HWXQty != undefined) { |
| | | HWXQty = parseFloat(obj.data.HWXQty); |
| | | } |
| | | if (obj.data.HKFPeriod != undefined) { |
| | | HKFPeriod = parseFloat(obj.data.HKFPeriod); |
| | | } |
| | | if (obj.data.HWBQty != undefined) { |
| | | HWBQty = parseFloat(obj.data.HWBQty); |
| | | } |
| | | if (obj.data.HBQty != undefined) { |
| | | HBQty = parseFloat(obj.data.HBQty); |
| | | } |
| | | if (obj.data.HQty != undefined) { |
| | | HBQty = parseFloat(obj.data.HBQty); |
| | | } |
| | | //HMinQty 内箱包装数(标准包装数) |
| | | //HBQty 内箱数(最小包装数) |
| | | //HWXQty 外箱包装数 |
| | | //HWBQty 外箱数 HWBQty |
| | | //biaoqianzhangshu 标签shu |
| | | //HQty 本次生成条码数 |
| | | switch (field) { |
| | | case "HQty": |
| | | if (HMinQty == 0) |
| | | f_alert("注意:包装数为0!"); |
| | | else { |
| | | obj.update({ |
| | | biaoqianzhangshu: Math.ceil(parseFloat(obj.data.HQty) / parseFloat(obj.data.HMinQty)), |
| | | }); |
| | | } |
| | | |
| | | } |
| | | break; |
| | | } |
| | | break; |
| | | case "HMinQty": //包装数 |
| | | if (HMinQty < 0) { |
| | | f_alert("包装数不能为负数!"); |
| | | } |
| | | if (HMinQty < HBQty) { |
| | | f_alert("标准包装数量不能小于最小包装数量!请重新输入!") |
| | | return; |
| | | } |
| | | else { |
| | | obj.update({ |
| | | biaoqianzhangshu: Math.ceil(parseFloat(obj.data.HQty) / parseFloat(obj.value)), |
| | | }); |
| | | |
| | | } |
| | | break; |
| | | } |
| | | |
| | | |
| | | }); |
| | | //#endregion |
| | | }); |
| | | //#endregion |
| | | |
| | | //#region 保存 |
| | | //#region 保存 |
| | | form.on('submit(HBarcodeSaverBox)', function (data) {//保存 |
| | | var a = 0; |
| | | var newArray = []; |
| | |
| | | |
| | | for (let i = 0; i < newArray.length; i++) { |
| | | //if (newArray[i].HQty > newArray[i].HNotBarcodeCount) { |
| | | if (newArray[i].HQty ) { |
| | | if (newArray[i].HQty) { |
| | | //layer.msg("编码:" + newArray[i].HMaterNumber + " 规格型号:" + newArray[i].HMaterModel + "<br>" + " 本次生成条码总数量超出剩余可生成条码数!" + "<br>" + " 本次生成总数量:" + newArray[i].HQty + " 可生成条码数量:" + newArray[i].HNotBarcodeCount, { icon: 5, btn: ['确认'], time: 10000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" }); |
| | | layer.msg("编码:" + newArray[i].HMaterNumber + " 规格型号:" + newArray[i].HMaterModel + "<br>" + " 本次生成条码总数量超出剩余可生成条码数!" + "<br>" + " 本次生成总数量:" + newArray[i].HQty , { icon: 5, btn: ['确认'], time: 10000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" }); |
| | | layer.msg("编码:" + newArray[i].HMaterNumber + " 规格型号:" + newArray[i].HMaterModel + "<br>" + " 本次生成条码总数量超出剩余可生成条码数!" + "<br>" + " 本次生成总数量:" + newArray[i].HQty, { icon: 5, btn: ['确认'], time: 10000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" }); |
| | | return Result = false; |
| | | } |
| | | } |
| | |
| | | }); |
| | | //#endregion |
| | | |
| | | |
| | | |
| | | } else { |
| | | layer.msg(data.Message); |
| | | } |
| | |
| | | }); |
| | | return false; |
| | | }); |
| | | //#endregion |
| | | //#endregion |
| | | |
| | | //#region 打印 |
| | | //内箱打印 |
| | |
| | | <script src="../../../../Scripts/webConfig.js"></script> |
| | | <script src="../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../layuiadmin/MESLanguage.js"></script> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid"> |
| | |
| | | <div class="layui-colla-item"> |
| | | <div class="layui-colla-title layui-inline"> |
| | | <div class="layui-inline"> |
| | | <span>更多</span> |
| | | <span id="BT_GD">更多</span> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">物料代码</label> |
| | | <label class="layui-form-label" id="bt_HMaterNumber">物料代码</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">物料名称</label> |
| | | <label class="layui-form-label" id="bt_HMaterName">物料名称</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HMaterName" id="HMaterName"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">规格型号</label> |
| | | <label class="layui-form-label" id="bt_HModel">规格型号</label> |
| | | <div class="layui-input-block"> |
| | | <input type="text" class="layui-input" name="HModel" id="HModel"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">是否启用</label> |
| | | <label class="layui-form-label" id="bt_ForFilteringSchemes">是否启用</label> |
| | | <div class="layui-input-block"> |
| | | <select id="HUseFlag" name="HUseFlag" class=" ForFilteringSchemes" lay-verify="HUseFlag"> |
| | | <option value="0" selected="selected">全部</option> |
| | |
| | | <table class="" id="mainTable" lay-filter="mainTable"></table> |
| | | <script type="text/html" id="toolbarDemo"> |
| | | <div class="layui-btn-container"> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-logout"></i>新增</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_use"><i class="layui-icon layui-icon-logout"></i>启用</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_createBarCode"><i class="layui-icon layui-icon-logout"></i>生成条码</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-logout"></i>删除</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>刷新</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew" id="set_AddNew"><i class="layui-icon layui-icon-logout"></i>新增</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_use" id="get_use"><i class="layui-icon layui-icon-logout"></i>启用</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_createBarCode" id="get_createBarCode"><i class="layui-icon layui-icon-logout"></i>生成条码</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill" id="set_DeleteBill"><i class="layui-icon layui-icon-logout"></i>删除</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>刷新</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_MaterPackQtyExcel" id="btn_MaterPackQtyExcel"><i class="layui-icon layui-icon-file-b"></i>Excel导入</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>退出</button> |
| | | <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>退出</button> |
| | | </div> |
| | | </script> |
| | | </form> |
| | |
| | | get_Display(""); |
| | | //初始化表格 |
| | | //DisPlay_HideColumn(); |
| | | //调用页面标题翻译方法 |
| | | initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | } |
| | | |
| | | // 查询 |
| | |
| | | <script src="../../layuiadmin/Scripts/json2.js"></script> |
| | | <script src="../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../layuiadmin/Scripts/general.js"></script> |
| | | <script src="../../layuiadmin/MESLanguage.js"></script> |
| | | <style> |
| | | .main-btn { /*头部主按钮*/ |
| | | padding: 0 2px; /*调整按钮左右空隙大小*/ |
| | |
| | | <div class="layui-btn-group"> |
| | | <button type="button" id="Saver" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">新增</button> |
| | | <button type="button" id="Saver_Edit" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver_Edit">保存</button> |
| | | <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">退出</button> |
| | | <button type="button" id="Cancel" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">退出</button> |
| | | </div> |
| | | </div> |
| | | <div class="layui-tab" lay-filter="tab-POStockInBill"> |
| | |
| | | |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | |
| | | <label class="layui-form-label">物料代码</label> |
| | | <label class="layui-form-label" id="bt_HMaterNumber">物料代码</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="background-color:#efefef4d;"> |
| | | <input type="hidden" class="layui-input" name="HMaterID" id="HMaterID" style="background-color:#efefef4d;"> |
| | |
| | | </button> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">物料简称</label> |
| | | <label class="layui-form-label" id="bt_HMaterName">物料简称</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HMaterName" id="HMaterName" onmouseover="this.title=this.value" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;" readonly> |
| | | <input type="hidden" name="HUserID" id="HUserID" value="0"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">规格型号</label> |
| | | <label class="layui-form-label" id="bt_HModel">规格型号</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HModel" id="HModel" readonly> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">物料名称</label> |
| | | <label class="layui-form-label" id="bt_HMaterName0">物料名称</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HMaterName0" id="HMaterName0" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">最小包装</label> |
| | | <label class="layui-form-label" id="bt_HMinPackQty">最小包装</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HMinPackQty" id="HMinPackQty" style=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">标准包装数</label> |
| | | <label class="layui-form-label" id="bt_HInBoxPackQty">标准包装数</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HInBoxPackQty" id="HInBoxPackQty" style=""> |
| | | <input type="hidden" class="layui-input" name="HOutBoxPackQty" id="HOutBoxPackQty" style="" value="0"> |
| | |
| | | </div> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">使用组织</label> |
| | | <label class="layui-form-label" id="bt_HUSEORGID">使用组织</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <select name="HUSEORGID" id="HUSEORGID" class=" ForFilteringSchemes" lay-verify="HUSEORGID"> |
| | | <!--动态渲染组织--> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">供应商代码</label> |
| | | <label class="layui-form-label" id="bt_HSupNumber">供应商代码</label> |
| | | <div class="layui-input-inline" style="position: relative;"> |
| | | <input type="text" class="layui-input" name="HSupNumber" id="HSupNumber" readonly style="padding-right: 40px;"> |
| | | <input type="text" class="layui-input" name="HSupID" id="HSupID" style="display:none;"> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">供应商名称</label> |
| | | <label class="layui-form-label" id="bt_HSupName">供应商名称</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" class="layui-input" name="HSupName" id="HSupName" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-xs4 layui-inline"> |
| | | <label class="layui-form-label">是否启用</label> |
| | | <label class="layui-form-label" id="bt_checkboxHUseFlag">是否启用</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="checkbox" name="checkboxHUseFlag" id="checkboxHUseFlag" lay-skin="primary" lay-filter="checkboxHUseFlag" value="false" title=""> |
| | | <input type="hidden" value="0" name="HUseFlag" id="HUseFlag"> |
| | |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">创建人</label> |
| | | <label class="layui-form-label" style="width: 85px;" id="bt_HMaker">创建人</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HMaker" id="HMaker" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">修改人</label> |
| | | <label class="layui-form-label" style="width: 85px;" id="bt_HUpDater">修改人</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HUpDater" id="HUpDater" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">审核人</label> |
| | | <label class="layui-form-label" style="width: 85px;" id="bt_HCheckEmp">审核人</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HCheckEmp" id="HCheckEmp" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | |
| | | <div class="layui-row"> |
| | | |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">创建日期</label> |
| | | <label class="layui-form-label" style="width: 85px;" id="bt_HMakeTime">创建日期</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HMakeTime" id="HMakeTime" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">审核日期</label> |
| | | <label class="layui-form-label" style="width: 85px;" id="bt_HCheckTime">审核日期</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HCheckTime" id="HCheckTime" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">修改日期</label> |
| | | <label class="layui-form-label" style="width: 85px;" id="bt_HUpDateDate">修改日期</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HUpDateDate" id="HUpDateDate" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | |
| | | , laydate = layui.laydate |
| | | , element = layui.element; |
| | | var option; |
| | | |
| | | var HModName = "SRM_MaterialHandingEdit"; |
| | | //#endregion |
| | | |
| | | //#region 进入页面即加载 |
| | |
| | | /*$('#btnSearchSup').addClass("layui-btn-disabled").attr("disabled", true);//供应商按钮禁用*/ |
| | | //$("#HSupName").val(sessionStorage["HUserName"]); //自动获取供应商信息 |
| | | |
| | | |
| | | //调用页面标题翻译方法 |
| | | initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | |
| | | //保存提交 |
| | | form.on('submit(Saver)', function (data) {//提交 |
| | |
| | | <script src="../../../../Scripts/webConfig.js"></script> |
| | | <script src="../../layuiadmin/Scripts/general.js"></script> |
| | | <!--<script src="../../../layuiadmin/PubCustom.js"></script>--> |
| | | <script src="../../layuiadmin/MESLanguage.js"></script> |
| | | </head> |
| | | <body> |
| | | <div class="layui-fluid" style="padding: 0;"> |
| | |
| | | , upload = layui.upload |
| | | |
| | | var option = []; |
| | | var HModName = "SRM_SupMaterPackBill_Excel"; |
| | | //#endregion |
| | | |
| | | //#region 进入页面即加载 |
| | |
| | | function set_ClearBill() { |
| | | //初始化表格 |
| | | set_InitGrid(); |
| | | //调用页面标题翻译方法 |
| | | initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | } |
| | | //#endregion |
| | | |
| | |
| | | <li data-name="home" class="layui-nav-item"> |
| | | <a href="javascript:;" lay-tips="条码" lay-direction="2"> |
| | | <i class="layui-icon layui-icon-auz"></i> |
| | | <cite>条码管理</cite> |
| | | <cite id="menu_BarCodeManager">条码管理</cite> |
| | | </a> |
| | | <dl class="layui-nav-child"> |
| | | <dd> |
| | | <a>条码档案</a> |
| | | <a id="menu_BarCodeArchives">条码档案</a> |
| | | <dl class="layui-nav-child"> |
| | | <dd data-name="SRM_BarCodeBillList"><a lay-href="SRM/SRM_BarCodeBillList.html">全部档案</a></dd> |
| | | <dd data-name="SRM_BarCodeBillList" id="menu_BarCodeList_All"><a lay-href="SRM/SRM_BarCodeBillList.html">全部档案</a></dd> |
| | | <dd data-name="SRM_POInStockBillList_UnBarCode"><a lay-href="SRM/SRM_POInStockBillList.html?type=UnBarCode">未生成条码单据</a> </dd> |
| | | <dd data-name="SRM_BarCodeBillList_UnPrint"><a lay-href="SRM/SRM_BarCodeBillList.html?type=UnPrint">未打印条码档案</a></dd> |
| | | <dd data-name="SRM_BarCodeBillList_RePrint"><a lay-href="SRM/SRM_BarCodeBillList.html?type=RePrint">已打印条码档案</a></dd> |
| | |
| | | <li data-name="home" class="layui-nav-item"> |
| | | <a href="javascript:;" lay-tips="送货" lay-direction="2"> |
| | | <i class="layui-icon layui-icon-senior"></i> |
| | | <cite>送货管理</cite> |
| | | <cite id="menu_DeliveryManager">送货管理</cite> |
| | | </a> |
| | | <dl class="layui-nav-child"> |
| | | <dd> |
| | |
| | | </dl> |
| | | </dd> |
| | | <dd> |
| | | <a>送货信息</a> |
| | | <a id="menu_DeliveryInfo">送货信息</a> |
| | | <dl class="layui-nav-child"> |
| | | <dd data-name="SRM_MaterialHanding"><a lay-href="SRM/SRM_MaterialHanding.html">维护送货信息</a></dd> |
| | | <dd data-name="SRM_MaterialHanding" id="menu_DeliveryInfoList"><a lay-href="SRM/SRM_MaterialHanding.html">维护送货信息</a></dd> |
| | | <dd data-name="SRM_MaterialHandingEdit"><a lay-href="SRM/SRM_MaterialHandingEdit.html">新增送货信息</a></dd> |
| | | </dl> |
| | | </dd> |
| | |
| | | <li data-name="set" class="layui-nav-item"> |
| | | <a href="javascript:;" lay-tips="设置" lay-direction="2"> |
| | | <i class="layui-icon layui-icon-set"></i> |
| | | <cite>系统设置</cite> |
| | | <cite id="menu_SystemSettings">系统设置</cite> |
| | | </a> |
| | | <dl class="layui-nav-child"> |
| | | <dd class="layui-nav-itemed"> |
| | | <a href="javascript:;">我的设置</a> |
| | | <a href="javascript:;" id="menu_MySettings">我的设置</a> |
| | | <dl class="layui-nav-child"> |
| | | <dd><a lay-href="set/user/password.html">修改密码</a></dd> |
| | | <dd><a lay-href="set/user/password.html" id="menu_ChangePassword">修改密码</a></dd> |
| | | <dd> |
| | | <a>系统消息</a> |
| | | <dl class="layui-nav-child"> |
| | |
| | | <script src="../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../Scripts/webConfig.js"></script> |
| | | <script src="../../../Scripts/PubCusStom.js"></script> |
| | | <script src="../layuiadmin/MESLanguage.js"></script> |
| | | <script src="../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../layuiadmin/' //静态资源所在路径 |
| | |
| | | , tree = layui.tree |
| | | var sWhere1 = " and B.HReceiveMan='" + sessionStorage["HUserName"] + "' and B.HReadFlag='0'"; |
| | | var flag = 0; |
| | | var HModName = "SRM_index"; |
| | | |
| | | Load(sWhere1, flag); |
| | | var interval = setInterval(function () { |
| | | Load(sWhere1, flag); |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //调用页面标题翻译方法 |
| | | initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | }); |
| | | |
| | | //$("#UserName").val(sessionStorage["HUserName"]); |
| | | document.getElementById('UserName').innerHTML = sessionStorage["HUserName"]; |
| | | |
| | | </script> |
| | | |
| | | <!-- 百度统计 --> |
| | |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-row layui-col-space15"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header">修改密码</div> |
| | | <div class="layui-card-body" pad15> |
| | | |
| | | <div class="layui-form" lay-filter=""> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">当前密码</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="password" name="oldPassword" lay-verify="required" lay-verType="tips" class="layui-input"> |
| | | <div class="layui-fluid"> |
| | | <div class="layui-row layui-col-space15"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header" id="bt_UpdatePassword">修改密码</div> |
| | | <div class="layui-card-body" pad15> |
| | | |
| | | <div class="layui-form" lay-filter=""> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" id="bt_oldPassword">当前密码</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="password" name="oldPassword" lay-verify="required" lay-verType="tips" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" id="bt_password">新密码</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="password" name="password" lay-verify="pass" lay-verType="tips" autocomplete="off" id="LAY_password" class="layui-input"> |
| | | </div> |
| | | <div class="layui-form-mid layui-word-aux" id="Instruction">6到16个字符</div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" id="bt_repassword">确认新密码</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="password" name="repassword" lay-verify="repass" lay-verType="tips" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-input-block"> |
| | | <button class="layui-btn" lay-submit lay-filter="setmypass" id="confirmUpdate">确认修改</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">新密码</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="password" name="password" lay-verify="pass" lay-verType="tips" autocomplete="off" id="LAY_password" class="layui-input"> |
| | | </div> |
| | | <div class="layui-form-mid layui-word-aux">6到16个字符</div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">确认新密码</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="password" name="repassword" lay-verify="repass" lay-verType="tips" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-input-block"> |
| | | <button class="layui-btn" lay-submit lay-filter="setmypass">确认修改</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../layuiadmin/layui/layui.js"></script> |
| | | <script src="../../../../../Scripts/webConfig.js"></script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'set'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , form = layui.form; |
| | | <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script> |
| | | <script src="../../../layuiadmin/MESLanguage.js"></script> |
| | | <script> |
| | | layui.config({ |
| | | base: '../../../layuiadmin/' //静态资源所在路径 |
| | | }).extend({ |
| | | index: 'lib/index' //主入口模块 |
| | | }).use(['index', 'set'], function () { |
| | | var $ = layui.$ |
| | | , admin = layui.admin |
| | | , form = layui.form; |
| | | var HModName = "SRM_password"; |
| | | //调用页面标题翻译方法 |
| | | initFunction(1, HModName, sessionStorage["HTranSlate"]); |
| | | |
| | | form.render(); |
| | | form.on("submit(setmypass)", function (obj) { |
| | | var user = obj.field; |
| | | layer.load(3) |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL()+"GetXGPassword", |
| | | data: { "UserName": sessionStorage["HUserName"], "oldPassword": user.oldPassword, "PassWord": user.password, "Repassword": user.repassword }, |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说明验证成功了, |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | } |
| | | else { |
| | | // $("#verifycode").click(); |
| | | layer.msg(result.Message, { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | }) |
| | | form.render(); |
| | | form.on("submit(setmypass)", function (obj) { |
| | | var user = obj.field; |
| | | layer.load(3) |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL() + "GetXGPassword", |
| | | data: { "UserName": sessionStorage["HUserName"], "oldPassword": user.oldPassword, "PassWord": user.password, "Repassword": user.repassword }, |
| | | success: function (result) { |
| | | if (result.count == 1) { // 说明验证成功了, |
| | | layer.msg(result.Message, { icon: 1 }); |
| | | } |
| | | else { |
| | | // $("#verifycode").click(); |
| | | layer.msg(result.Message, { icon: 5 }); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | }); |
| | | }); |
| | | |
| | | </script> |
| | | </script> |
| | | </body> |
| | | </html> |
| | |
| | | <div class="layadmin-user-login-main"> |
| | | <div class="layadmin-user-login-box layadmin-user-login-header"> |
| | | <!--<img src="layuiAdmin.std-v1.2.1/src/img/Logo.png" alt="供应商协同平台" align="middle" />--> |
| | | <h2 style="color:white;">供应商协同平台</h2> |
| | | <p style="color: white;">智云LMES管理系统</p> |
| | | <h2 style="color:white;" id="title1">供应商协同平台</h2> |
| | | <p style="color: white;margin-bottom:10px;" id="title2">智云LMES管理系统</p> |
| | | <a class="ax-item FY_BT" id="Hlanguage" style="color: white;">语言</a> |
| | | <select id="HTranSlate" style="width: 25%; margin-right: 1%; padding-left: 1px; font-size: 13px;"> |
| | | <option value="1" selected>中文</option> |
| | | <option value="2">Eeglish</option> |
| | | <option value="3">Spanish</option> |
| | | </select> |
| | | </div> |
| | | <div class="layadmin-user-login-box layadmin-user-login-body layui-form"> |
| | | <div class="layui-form-item"> |
| | |
| | | <div class="layui-form-item"> |
| | | <button type="button" lay-submit="" class="layui-btn layui-btn-fluid" id="LAY-user-login-submit" name="LAY-user-login-submit" lay-filter="LAY-user-login-submit">登 入</button> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <!--<div class="layui-form-item"> |
| | | <a href="./layuiAdmin.std-v1.2.1/src/Download/组装车间未排产代码.xlsx" download="组装车间未排产代码.xlsx" style="color:red;font-size:20px;">点击下载操作手册</a> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <a href="./layuiAdmin.std-v1.2.1/src/Download/gridreport6.8.zip" download="插件压缩包.zip" style="color:red;font-size:20px;">点击下载压缩包</a> |
| | | </div> |
| | | </div>--> |
| | | </div> |
| | | </div> |
| | | <!--顺序不能改变--> |
| | |
| | | <script src="layuiAdmin.std-v1.2.1/src/js/jquery-1.9.1.min.js"></script> |
| | | <script src="layuiAdmin.std-v1.2.1/src/js/jquery.selectlist.js"></script> |
| | | <script src="layuiAdmin.std-v1.2.1/src/layuiadmin/layui/layui.js"></script> |
| | | <script src="layuiAdmin.std-v1.2.1/src/layuiadmin/MESLanguage.js"></script> |
| | | <script src="Scripts/webConfig.js"></script> |
| | | <script type="text/javascript"> |
| | | layui.config({ |
| | |
| | | , form = layui.form |
| | | , router = layui.router() |
| | | , search = router.search; |
| | | |
| | | //#region 多语言 |
| | | var HModName = "SRM_login"; |
| | | var login_data = localStorage.getItem("data"); |
| | | var login_data2 = []; |
| | | if (login_data != null) { |
| | | login_data2 = JSON.parse(login_data); |
| | | } |
| | | //获取基础信息 |
| | | getBaseInfo(login_data2.HTranSlate); |
| | | |
| | | if (login_data == null || login_data2.HTranSlate == undefined) { |
| | | initFunction(1, "SRM_login", 1); |
| | | } else { |
| | | initFunction(1, "SRM_login", login_data2.HTranSlate); |
| | | } |
| | | //#endregion |
| | | |
| | | //获取登录页组织列 |
| | | var Organization = '<option value="0" style="color:red;">组织</option>'; |
| | | $.ajax({ |
| | |
| | | } |
| | | $("#edu").append(Organization); |
| | | form.render('select'); |
| | | |
| | | //读取配置文件 |
| | | get_ReadConfigFile(); |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | form.on('submit(LAY-user-login-submit)', function (obj) {//登录 |
| | | loging(obj); |
| | | if ($("#HTranSlate").val() == null) { |
| | | layer.msg("请选择语言!"); |
| | | return false; |
| | | } |
| | | loging(obj); |
| | | }) |
| | | |
| | | function loging(obj) { |
| | |
| | | sessionStorage["OrganizationID"] = $("#edu").val(); |
| | | sessionStorage["Organization"] = $("#edu option:selected").text(); |
| | | sessionStorage["login"] = "login"; |
| | | sessionStorage["HTranSlate"] = $("#HTranSlate option:selected").val(); |
| | | get_WriteConfigFile(); |
| | | window.location.href = "layuiAdmin.std-v1.2.1/src/views/index.html" |
| | | } |
| | | else { |
| | |
| | | } |
| | | layer.closeAll("loading"); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | //密码框回车执行登录 |
| | | $('#LAY-user-login-password').on('keydown', function (e) { |
| | | if (e.keyCode == 13) { |
| | | if ($("#HTranSlate").val() == null) { |
| | | layer.msg("请选择语言!"); |
| | | return false; |
| | | } |
| | | loging(); |
| | | } |
| | | }); |
| | |
| | | $("#LAY-user-login-password").focus(); |
| | | } |
| | | }) |
| | | |
| | | //#region 多语言翻译 |
| | | |
| | | $("#HTranSlate").change(function () { |
| | | var select = $("#HTranSlate").val(); |
| | | getBaseInfo(select); |
| | | initFunction(1, HModName, select); |
| | | //sessionStorage["HTranSlate"] = select; |
| | | }) |
| | | |
| | | //读取配置文件 |
| | | function get_ReadConfigFile() { |
| | | //获取本地存储的数据 |
| | | var data = localStorage.getItem("data"); |
| | | if (data != null) { |
| | | var data2 = JSON.parse(data); |
| | | $("#LAY-user-login-username").val(data2["UserID"]); |
| | | $("#Organization").val(data2["OrgID"]); |
| | | $("#HTranSlate").val(data2["HTranSlate"] == undefined ? 1 : data2["HTranSlate"]); |
| | | form.render('select'); |
| | | } |
| | | } |
| | | |
| | | //存储配置文件 |
| | | function get_WriteConfigFile() { |
| | | //清空本地存储的数据 |
| | | localStorage.removeItem("data"); |
| | | var data = { |
| | | UserID: sessionStorage["Czybm"] |
| | | , OrgID: sessionStorage["OrganizationID"] |
| | | , HTranSlate: sessionStorage["HTranSlate"] |
| | | } |
| | | //本地存储 |
| | | localStorage.setItem("data", JSON.stringify(data)); |
| | | } |
| | | |
| | | //获取基础信息 |
| | | function getBaseInfo(HTranSlate) { |
| | | if (HTranSlate == undefined) { |
| | | HTranSlate = "1"; |
| | | } |
| | | |
| | | $.ajax({ |
| | | type: "get", |
| | | url: GetWEBURL() + "Web/BaseInfo", |
| | | async: false, |
| | | data: {}, |
| | | success: function (res) { |
| | | //查询成功 |
| | | if (res.count == 1) { |
| | | var data = res.data[0]; |
| | | console.log(data); |
| | | |
| | | //判断当前登录的语言类型 |
| | | var HLogoLabel = ""; |
| | | var HMenuLabel = ""; |
| | | if (HTranSlate == "1" || (login_data2.length == 0 && HTranSlate == undefined)) { |
| | | HLogoLabel = data.HLogoLabel; |
| | | HMenuLabel = data.HMenuLabel; |
| | | } else if (HTranSlate == "2") { |
| | | HLogoLabel = data.HLogoTranslationText_English; |
| | | HMenuLabel = data.HMenuTranslationText_English; |
| | | } else if (HTranSlate == "3") { |
| | | HLogoLabel = data.HLogoTranslationText_Spain; |
| | | HMenuLabel = data.HMenuTranslationText_Spain; |
| | | } |
| | | |
| | | sessionStorage["HCusName"] = data.HCusName; |
| | | sessionStorage["HLogoLabel"] = HLogoLabel; |
| | | sessionStorage["HMenuLabel"] = HMenuLabel; |
| | | $("#HLogoLabel").text(HLogoLabel); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | //#endregion |
| | | |
| | | }); |
| | | </script> |
| | | </body> |