From d2c9949f940766f56cfcf61c16f0e845b7a47098 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 08 十二月 2023 15:29:18 +0800
Subject: [PATCH] 特批申请单下推收款单
---
WebTM/views/销售管理/收款单/YS_ReceiveBill.html | 121 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 120 insertions(+), 1 deletions(-)
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\346\224\266\346\254\276\345\215\225/YS_ReceiveBill.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\346\224\266\346\254\276\345\215\225/YS_ReceiveBill.html"
index e82983f..975def1 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\346\224\266\346\254\276\345\215\225/YS_ReceiveBill.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\346\224\266\346\254\276\345\215\225/YS_ReceiveBill.html"
@@ -290,6 +290,18 @@
</div>
</div>
</div>
+
+ <!--闅愯棌瀛楁-->
+ <div class="layui-row" style="display:none;">
+ <div class="layui-inline">
+ <div class="layui-input-block">
+ <input class="layui-input" name="HMainSourceInterID" id="HMainSourceInterID" value="0" autocomplete="off">
+ <input class="layui-input" name="HMainSourceEntryID" id="HMainSourceEntryID" value="0" autocomplete="off">
+ <input class="layui-input" name="HMainSourceBillNo" id="HMainSourceBillNo" value="" autocomplete="off">
+ <input class="layui-input" name="HMainSourceBillType" id="HMainSourceBillType" value="" autocomplete="off">
+ </div>
+ </div>
+ </div>
</div>
</div>
<!--鍏朵粬淇℃伅-->
@@ -425,6 +437,9 @@
//鍔犺浇缂栬緫椤甸潰
RoadBillMain(linterid);
}
+ else if (OperationType == 4) { //涓嬫帹
+ setInit_PushBill(linterid);
+ }
//#endregion
//#region 缁勭粐鍒濆鍖�
@@ -552,6 +567,26 @@
//#region 鎿嶄綔鎸夐挳瑙﹀彂浜嬩欢
//#region 淇濆瓨鎻愪氦
form.on('submit(btnSave)', function (data) {//鎻愪氦
+ if (OperationType == 4) {
+ //#region 鍒ゆ柇婧愬崟鐘舵��
+ var HSourceBillData = "";
+ var HSourceBillData = getSourceBillStatus_ExceptiveCheckRequestBill(); //鑾峰彇婧愬崟鏁版嵁
+ if (HSourceBillData != "none") {
+ if (HSourceBillData.length == 0) {
+ layer.alert("淇濆瓨澶辫触!鏈煡璇㈠埌婧愬崟鍗曟嵁!", { icon: 5 });
+ return;
+ } else if (HSourceBillData[0]["鐘舵��"] != "宸插鏍�") {
+ layer.alert("淇濆瓨澶辫触!婧愬崟鍗曟嵁鐘舵�佹湭涓�'宸插鏍�'鐘舵��!", { icon: 5 });
+ return;
+ }
+ } else {
+ return;
+ }
+ //#endregion
+ }
+
+
+
//if (AllowLoadData(data)) {
set_AddNew(data);
//}
@@ -920,7 +955,7 @@
function set_AddNew(data) {
//鑾峰彇鎿嶄綔鏂瑰紡
var refSav = "";
- if (OperationType == 1 || OperationType == 2) {
+ if (OperationType == 1 || OperationType == 2 || OperationType == 4) {
refSav = "Add";
}
if (OperationType == 3) {
@@ -1016,6 +1051,11 @@
, "HCreditRating_Now": data.HCreditRating_Now
, "HRemark": data.琛ㄥご澶囨敞
+ , "HMainSourceInterID": data.HMainSourceInterID == null ? 0 : data.HMainSourceInterID
+ , "HMainSourceEntryID": data.HMainSourceEntryID == null ? 0 : data.HMainSourceEntryID
+ , "HMainSourceBillNo": data.HMainSourceBillNo
+ , "HMainSourceBillType": data.HMainSourceBillType
+
, "HMaker": data.鍒跺崟浜�
, "HMakeDate": data.鍒跺崟鏃ユ湡 == null ? "" : Format(new Date(data.鍒跺崟鏃ユ湡), "yyyy-MM-dd")
, "HUpDater": data.淇敼浜�
@@ -1030,6 +1070,62 @@
HOrgIDBar = data.HOrgID == null ? 0 : data.HOrgID;
+ layer.close(ajaxLoad);
+ } else {
+ layer.close(ajaxLoad);
+ layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+ }
+ }, error: function () {
+ layer.close(ajaxLoad);
+ layer.alert("鍙戠敓閿欒!", { icon: 5 });
+ }
+ });
+ }
+ //#endregion
+
+ //#region 涓嬫帹椤甸潰鍒濆鍖�
+ function setInit_PushBill(linterid) {
+ //鐢熸垚骞惰缃富琛ㄧ殑鍐呯爜鍜屽崟鎹彿
+ createBillNo();
+
+ //鐩稿叧鏂囨湰妗嗕俊鎭垵濮嬪寲
+ $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
+ $("#HMaker").val(sessionStorage["HUserName"]);
+ $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd"));
+
+ //鏌ヨ 鐗规壒鐢宠鍗� 鏄惁瀛樺湪
+ var ajaxLoad = layer.load();
+ $.ajax({
+ url: GetWEBURL() + "/Xs_ExceptiveCheckRequestBill/cx",
+ async: false,
+ type: "GET",
+ data: {
+ "HInterID": linterid
+ },
+ success: function (result) {
+ if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ var data = result.data[0];
+
+ getCustomerByCusID(data.HCusID);
+
+ form.val("formData", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+ "HDeptID": data.HDeptID
+ , "HDeptName": data.閿�鍞儴闂�
+ , "HEmpID": data.HEmpID
+ , "HEmpName": data.閿�鍞憳
+ , "HManagerID": data.HManagerID
+ , "HManagerName": data.閿�鍞富绠�
+ , "HCurID": data.HCurID
+ , "HCurName": data.甯佸埆
+ , "HExRate": data.姹囩巼
+ , "HCusID": data.HCusID
+ , "HCusName": data.涓氬姟瀹㈡埛
+ , "HAccCusID": data.HCusID
+ , "HAccCusName": data.涓氬姟瀹㈡埛
+ , "HMainSourceInterID": linterid
+ , "HMainSourceBillNo": data.鍗曟嵁鍙�
+ , "HMainSourceBillType": params[params[2]]
+ });
layer.close(ajaxLoad);
} else {
layer.close(ajaxLoad);
@@ -1119,6 +1215,29 @@
});
}
//#endregion
+
+ //#region 鑾峰彇婧愬崟-鐗规壒鐢宠鍗曞崟鎹姸鎬�
+ function getSourceBillStatus_ExceptiveCheckRequestBill() {
+ var HSourceBillData = "none";
+ var sWhere = " and hmainid = " + $("#HMainSourceInterID").val();
+ $.ajax({
+ url: GetWEBURL() + '/Xs_ExceptiveCheckRequestBill/list',
+ async: false,
+ type: "GET",
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ HSourceBillData = data1.data;
+ } else {
+ layer.alert(data1.code + "婧愬崟鍗曟嵁鐘舵�佸垽鏂け璐ワ紒", { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ return HSourceBillData;
+ }
+ //#endregion
//#endregion
//#endregion
--
Gitblit v1.9.1