From 549a7e17ba45ba3669f6d5a5f86acdcfa0646ce8 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期四, 07 三月 2024 13:36:16 +0800
Subject: [PATCH] 其他应收单单据新增页面增加审核反审核,优化不是创建状态也可以进入编辑页面
---
WebTM/views/销售管理/其他应收单/YS_ReceiveOtherBillMain.html | 65 +++++++++++++++++++++++++++++++-
WebTM/views/销售管理/其他应收单/YS_ReceiveOtherBillMain.htmlList.html | 29 ++++++--------
2 files changed, 75 insertions(+), 19 deletions(-)
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\346\224\266\345\215\225/YS_ReceiveOtherBillMain.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\346\224\266\345\215\225/YS_ReceiveOtherBillMain.html"
index f0e2207..71cee57 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\346\224\266\345\215\225/YS_ReceiveOtherBillMain.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\346\224\266\345\215\225/YS_ReceiveOtherBillMain.html"
@@ -21,8 +21,11 @@
<div class="layui-fluid" style="padding: 0;">
<div class="layui-card" style="padding: 2px;background-color: #efefef;">
<div class="layui-card-body" style="padding: 1px;">
- <form class="layui-form" action="" lay-filter="formData" style="background-color:white;">
+ <form class="layui-form" action="" lay-filter="formData" style="background-color:white;height :1500px">
<div style="padding: 2px; ">
+
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_CheckBill" id="set_CheckBill">瀹℃牳</button>
+ <button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="set_AbandonCheck" id="set_AbandonCheck">鍙嶅鏍�</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnSave" id="btnSave">淇濆瓨</button>
<button class="layui-btn layui-btn-normal" style="margin-left: 0px" type="button" lay-submit="" lay-filter="btnEdit" id="btnEdit">閫�鍑�</button>
</div>
@@ -380,6 +383,16 @@
});
//#endregion
+ //#region 瀹℃牳 鍙嶅鏍�
+ form.on('submit(set_CheckBill)', function (data) {
+ set_CheckBill(0);
+ });
+ //鍙嶅鏍�
+ form.on('submit(set_AbandonCheck)', function (data) {
+ set_CheckBill(1);
+ });
+ //#endregion
+
//#endregion
//#endregion
@@ -477,8 +490,27 @@
//#region 淇濆瓨鎻愪氦
form.on('submit(btnSave)', function (data) {//鎻愪氦
if (AllowLoadData(data)) {
- set_AddNew(data);
+
+ var sWhere = " and hmainid = '" + $("#HInterID").val() + "' ";
+ $.ajax({
+ url: GetWEBURL() + '/YS_ReceiveOtherBill/YS_ReceiveOtherBillMainList',
+ async: false,
+ type: "GET",
+ data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+ success: function (data1) {
+ if (data1.count == 1) {
+ var starts = data1.data[0].鍗曟嵁鐘舵��
+ if (starts == "鍒涘缓") {
+ set_AddNew(data);
+ }
+ else {
+ layer.msg('姝ゅ崟鎹笉鏄垱寤虹姸鎬侊紒鏃犳硶杩涜缂栬緫淇濆瓨!');
+ }
+ }
+ }
+ });
}
+
});
//#endregion
@@ -916,6 +948,35 @@
}
//#endregion
+ //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
+ function set_CheckBill(num) {
+ var InterID = $("#HInterID").val();
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/YS_ReceiveOtherBill/AuditYS_ReceiveOtherBillMain", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+ // 寰楀埌frame绱㈠紩
+ var index = layer.getFrameIndex(window.name);
+ //鍏抽棴褰撳墠frame
+ layer.close(index);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ $("#btnSearch").trigger('click');
+ });
+
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+ }
+ });
+ }
+ //#endregion
+
//#region 鏍规嵁瀹㈡埛鑾峰彇瀹㈡埛瀵瑰簲绋庣巼
function getHTaxRateByCusID(HCusID) {
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\346\224\266\345\215\225/YS_ReceiveOtherBillMain.htmlList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\346\224\266\345\215\225/YS_ReceiveOtherBillMain.htmlList.html"
index 6a1fc52..ccc3f62 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\346\224\266\345\215\225/YS_ReceiveOtherBillMain.htmlList.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\205\266\344\273\226\345\272\224\346\224\266\345\215\225/YS_ReceiveOtherBillMain.htmlList.html"
@@ -482,23 +482,18 @@
, data = checkStatus.data;
if (checkStatus.data.length === 1) {
var linterid = data[0].hmainid.toString();
- if (data[0].鍗曟嵁鐘舵�� =="鍒涘缓") {
- layer.open({
- type: 2
- , area: ['100%', '100%']
- , title: '缂栬緫' + HPageTitle
- , shift: 0//寮瑰嚭鍔ㄧ敾
- , content: '../../閿�鍞鐞�/鍏朵粬搴旀敹鍗�/YS_ReceiveOtherBillMain.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
- , btn: [],
- end: function (index, layero, that) {
- //鍒锋柊椤甸潰
- $("#btnSearch").trigger('click');
- }
- })
- }
- else {
- layer.msg('鍗曟嵁涓嶆槸鍒涘缓鐘舵�侊紒鏃犳硶缂栬緫锛�');
- }
+ layer.open({
+ type: 2
+ , area: ['100%', '100%']
+ , title: '缂栬緫' + HPageTitle
+ , shift: 0//寮瑰嚭鍔ㄧ敾
+ , content: '../../閿�鍞鐞�/鍏朵粬搴旀敹鍗�/YS_ReceiveOtherBillMain.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
+ , btn: [],
+ end: function (index, layero, that) {
+ //鍒锋柊椤甸潰
+ $("#btnSearch").trigger('click');
+ }
+ })
} else {
layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
}
--
Gitblit v1.9.1