From 75e6f0dce0fd2edeaba8b2d3d82fc3a3b967a15f Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期一, 13 三月 2023 15:06:19 +0800
Subject: [PATCH] 其他出库、其他入库扫码模块界面增加日期选择框,优化
---
WebTM/views/验收入库/其他入库/Kf_OtherInBill_Fast.html | 108 ++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 97 insertions(+), 11 deletions(-)
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_Fast.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_Fast.html"
index bc52985..09ea7e1 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_Fast.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_Fast.html"
@@ -61,7 +61,7 @@
<label class="layui-form-label" style="width:60px;padding-left:0px;">婧愬崟绫诲瀷</label>
</div>
<div class="layui-col-xs8">
- <select name=" HBillType" id="HBillType">
+ <select name="HBillType" id="HBillType">
<option value="1241">鍏ュ簱鐢宠鍗�</option>
<option value="-1">鎵嬪伐褰曞叆</option>
</select>
@@ -90,6 +90,16 @@
<select name=" HBillSubType" id="HBillSubType">
<!--鍔ㄦ�佹覆鏌撶粍缁�-->
</select>
+ </div>
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <div class="layui-row">
+ <div class="layui-col-xs3">
+ <label class="layui-form-label" style="width:60px;padding-left:0px;">鏃ユ湡</label>
+ </div>
+ <div class="layui-col-xs8">
+ <input name="HDate" id="HDate" autocomplete="off" class="layui-input">
</div>
</div>
</div>
@@ -245,6 +255,7 @@
, layer = layui.layer
, table = layui.table
, form = layui.form
+ , laydate = layui.laydate
, element = layui.element;
//琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
@@ -268,7 +279,23 @@
$("#HOrgID").val(sessionStorage["OrganizationID"]);
$("#HOrgID").hide();
$("#HBillSubType").val(sessionStorage["HBillSubType"]);
+ $("#HDate").val(formatDate(sessionStorage["HDate"]));
+ var HSourceFlag = sessionStorage["SourceFlag"];
//榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
+
+
+ // 缂栬緫鑾峰彇琛ㄥご鏃舵椂闂存牸寮忕煫姝f柟寮�
+ function formatDate(date) {
+ var d = new Date(date),
+ month = '' + (d.getMonth() + 1),
+ day = '' + d.getDate(),
+ year = d.getFullYear();
+
+ if (month.length < 2) month = '0' + month;
+ if (day.length < 2) day = '0' + day;
+
+ return [year, month, day].join('-');
+ }
//鑾峰彇鍙傛暟
@@ -286,6 +313,17 @@
var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
var lSourceBillType = params[params[2]]; //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
+ //鍒濆鍖栬〃鍗曟彃浠�
+ set_InitFrom();
+
+ //鍒濆鍖栬〃鍗曟彃浠�
+ function set_InitFrom() {
+ //甯歌鐢ㄦ硶
+ laydate.render({
+ elem: '#HDate'
+ });
+ }
+
function RoadBillMain(linterid)//鍔犺浇琛ㄥご
{
$.ajax({
@@ -296,14 +334,36 @@
// console.log(d.data);
$("#HInterID").val(d.data[0].HInterID);
$("#HBillNo").val(d.data[0].HBillNo);
- $("#HBillType").val(d.data[0].HSourceBillType);
+ $("#HBillType").val(d.data[0].HSourceBillType == null ? "1241" : d.data[0].HSourceBillType);
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (d.data[0].HSourceBillType == "1241") {
+ $("#HBillType").empty();
+ $("#HBillType").val("1241");
+ var optionHtml = '';
+ optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鍏ュ簱鐢宠鍗�' + "</option>";
+ $("#HBillType").append(optionHtml);
+ layui.form.render('select');
+ $("#HBillType").attr("readonly", "readonly");
+ }
+ else {
+ $("#HBillType").empty();
+ $("#HBillType").val("-1");
+ var optionHtml = '';
+ optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鎵嬪伐褰曞叆' + "</option>";
+ $("#HBillType").append(optionHtml);
+ layui.form.render('select');
+ $("#HBillType").attr("readonly", "readonly");
+ }
$("#HSourceBillNo").val(d.data[0].HSourceBillNo);
+ $("#HSourceBillNo").attr("disabled", "true");
+ $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
//$("#HWHID").val(d.data[0].HWhID);
//$("#HKeeperID").val(d.data[0].HKeeperID);
//$("#HSecManagerID").val(d.data[0].HSecManagerID);
//$("#HDeptID").val(d.data[0].HDeptID);
//$("#HBarCode").val(d.data[0].HBarCode);
//$("#HQty").val(d.data[0].HQty);
+ HSourceFlag = true;
}
})
//鑾峰彇鍗曟嵁瀛愮被鍨�
@@ -375,6 +435,7 @@
//console.log(d.data);
$("#HInterID").val(d.data[0].HInterID);
$("#HBillNo").val(d.data[0].HBillNo);
+ $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
}
});
//鑾峰彇鍗曟嵁瀛愮被鍨�
@@ -1015,7 +1076,7 @@
//url: "http://localhost:12761/OtherInStockBill/get_InfoByBarCode_Source_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
url: GetWEBURL() + "/WEBSController/Get_BarCode_Json",
type: "GET",
- data: { "sBarCode": sBarCode, "HInterID": sInterID, "HBillType": HBillType, "HBillNo": sBillNo, "HMaker": sessionStorage["HUserName"], "HWhID": sHWHID, "HSPID": sHSPID, "HQty": sQty, "HRedBlueFlag": false, "SourceFlag": sessionStorage["SourceFlag"], "HSourceBillNo": sSourceBillNo, "HSourceBillType": sHBillType, "HStockOrgID": sessionStorage["OrganizationID"], "HScanStyle": "", "HCustom1": "", "HCustom2": "" },
+ data: { "sBarCode": sBarCode, "HInterID": sInterID, "HBillType": HBillType, "HBillNo": sBillNo, "HMaker": sessionStorage["HUserName"], "HWhID": sHWHID, "HSPID": sHSPID, "HQty": sQty, "HRedBlueFlag": false, "SourceFlag": HSourceFlag, "HSourceBillNo": sSourceBillNo, "HSourceBillType": sHBillType, "HStockOrgID": sessionStorage["OrganizationID"], "HScanStyle": "", "HCustom1": "", "HCustom2": "" },
success: function (result) {
if (result.count == 1) {
if (result.data.HBarType == '浠撳簱鏉$爜') {
@@ -1045,7 +1106,7 @@
$("#HDeptName").val(result.data.HDeptName);
$("#HDeptID").val(result.data.HDeptID);
$("#HSourceBillNo").val(result.data.HSourceBillNo);
- sessionStorage["SourceFlag"] = true;
+ HSourceFlag = true;
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
if (result.data.HSourceBillType == "1241") {
$("#HBillType").val("1241");
@@ -1058,7 +1119,7 @@
element.tabChange('tab-Kf_OtherInBill', '3');
}
else {
- if (sessionStorage["SourceFlag"] == "true") {
+ if (HSourceFlag == true) {
element.tabChange('tab-Kf_OtherInBill', '3');
}
else {
@@ -1067,15 +1128,40 @@
//$("#HDeptName").val(result.data.HDeptName);
//$("#HDeptID").val(result.data.HDeptID);
//$("#HSourceBillNo").val(result.data.HSourceBillNo);
- sessionStorage["SourceFlag"] = true;
+ //sessionStorage["SourceFlag"] = true;
//鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- if (result.data.HSourceBillType == "1241") {
- $("#HBillType").val("1241");
+ //if (result.data.HSourceBillType == "1241") {
+ // $("#HBillType").val("1241");
+ //}
+ //else if (result.data.HSourceBillType == "1601") {
+ // $("#HBillType").val("1601");
+ //}
+
+
+ HSourceFlag = true;
+ $("#HSourceBillNo").val(result.data.hSourceBillNoField);
+ $("#HBillType").val(result.data.hSourceBillTypeField == null ? "1241" : result.data.hSourceBillTypeField);
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (result.data.hSourceBillTypeField == "1241") {
+ $("#HBillType").empty();
+ $("#HBillType").val("1241");
+ var optionHtml = '';
+ optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鍏ュ簱鐢宠鍗�' + "</option>";
+ $("#HBillType").append(optionHtml);
+ layui.form.render('select');
+ $("#HBillType").attr("readonly", "readonly");
}
- else if (result.data.HSourceBillType == "1601") {
- $("#HBillType").val("1601");
+ else {
+ //$("#HBillType").empty();
+ $("#HBillType").val("-1");
+ var optionHtml = '';
+ optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鎵嬪伐褰曞叆' + "</option>";
+ $("#HBillType").append(optionHtml);
+ layui.form.render('select');
+ $("#HBillType").attr("readonly", "readonly");
}
+ $("#HSourceBillNo").attr("readonly", "readonly");
$("#HNote").val(";鐗╂枡鏉$爜");
element.tabChange('tab-Kf_OtherInBill', '3');
}
@@ -1236,7 +1322,7 @@
element.tabChange('tab-Kf_OtherInBill', '2');
playSound1();
HSourceFlag = true;
- sessionStorage["SourceFlag"] = true;
+ //sessionStorage["SourceFlag"] = true;
layer.load(3)
//table.render({
// elem: '#wl-table'
--
Gitblit v1.9.1