From 286ef370400f76d689607bed965cbd5aaef66579 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期四, 07 八月 2025 11:16:59 +0800
Subject: [PATCH] 价目表 价目表页面没有”按钮设置“选项。没有导出功能,需要添加。 价目表 价目表编辑,保存时判断单价不能为0。 价目表 新增界面审核按钮有问题,按不了 编辑、删除、审核、禁用、导出权限
---
WebTM/views/基础资料/基础资料/Gy_MatePrice.html | 36 +++++-------
WebTM/views/基础资料/基础资料/Gy_MatePriceEdit.html | 87 ++++++++++++++++++----------
2 files changed, 70 insertions(+), 53 deletions(-)
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePrice.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePrice.html"
index a4723a2..8d3c9d1 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePrice.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePrice.html"
@@ -351,17 +351,6 @@
col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
}
else {
- if (data[i].name === "鏄惁绂佺敤") {
- col.push({
- field: data[i].id,
- title: data[i].name,
- align: 'center',
- templet: function (d) {
- return d.鏄惁绂佺敤 === 1 ? 'Y' : '';
- }
- });
- }
- else {
switch (data[i].Type) {
//int
case 'DateTime':
@@ -377,7 +366,7 @@
default:
col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
}
- }
+
}
}
//鍔ㄦ�佹樉绀哄垪鍚�
@@ -892,18 +881,23 @@
}
//#region 瀵煎嚭Execel
function btn_Export() {
- option.data.forEach((item) => {
- for (let itemobj in item) {
- if (item[itemobj] == null) {
- item[itemobj] = "";
+ var ModRightNameCheck = "Gy_MatePrice_ExportExcel";
+
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/LMES/getReportByModRightNameCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "ModRightNameCheck": ModRightNameCheck, "user": sessionStorage["HUserName"] },
+ success: function (result) {
+ if (result.count == 1) {
+ table.exportFile(ins.config.id, option.data, "xls");
+ } else {
+ layer.alert("褰撳墠妯″潡娌℃湁瀵煎嚭鏉冮檺!", { icon: 5 });
}
- if (item[itemobj].length > 0) { // 鍋囪瀛楁鍚嶄负field
- item[itemobj] = item[itemobj].toString().replaceAll(/[\r\n]+/g, ''); // 灏嗘崲琛岀鏇挎崲涓虹┖瀛楃涓�
- }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
});
-
- table.exportFile(ins.config.id, option.data, "xls");
}
//#endregion
//璇诲彇鏂规
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceEdit.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceEdit.html"
index 860c1d1..9fd73ed 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceEdit.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_MatePriceEdit.html"
@@ -132,7 +132,7 @@
<div class="layui-col-xs4 layui-inline">
<label class="layui-form-label">绂佺敤鏍囧織</label>
<div class="layui-input-inline">
- <input type="checkbox" name="checkboxHStopflag" id="checkboxHStopflag" lay-skin="primary" lay-filter="checkboxHStopflag" value="true" title="鏄惁绂佺敤">
+ <input type="checkbox" name="checkboxHStopflag" id="checkboxHStopflag" lay-skin="primary" lay-filter="checkboxHStopflag" value="false" title="鏄惁绂佺敤">
<input type="hidden" value="false" name="HStopflag" id="HStopflag">
<!--<input type="hidden" value="false" name="HStopflag" id="HStopflag">-->
</div>
@@ -275,12 +275,18 @@
} else {
var OperationType = params[params[0]];//鎿嶄綔绫诲瀷//浠庡弬鏁颁腑鑾峰彇 鏁版嵁绫诲瀷 1娣诲姞 淇濆瓨 2澶嶅埗 3 缂栬緫
var linterid = params[params[1]];//婧愬崟id
- var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷
+ var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷
}
+
+ if ($("#HCheckEmp").val() == "") {
+ $('#set_CheckBill').removeClass('layui-btn-disabled').attr('disabled', false)
+ }
+ else
$('#set_CheckBill').addClass('layui-btn-disabled').attr('disabled', true);
//鍒ゆ柇鎿嶄綔绫诲瀷
if (OperationType == 1) {//鏃犳簮鍗曟柊澧�
$("#HItemID").val(0);
+ linterid = 0;
$("#HMakeTime").val(util.toDateString(new Date(), 'yyyy-MM-dd'))
}
else if (OperationType == 2) {//澶嶅埗
@@ -443,7 +449,11 @@
$("#HMakeEmp").val(sessionStorage["HUserName"]);
$("#HMakeTime").val(Format(new Date(), "yyyy-MM-dd"));
$("#HStopEmp").val(sessionStorage["HUserName"]);
- $("#HCheckEmp").val(sessionStorage["HUserName"]);
+ if ($("#HStopflag").val() != false) {
+ $("#HStopTime").val(Format(new Date(), "yyyy-MM-dd"));
+ }
+ //$("#HCheckEmp").val(sessionStorage["HUserName"]);
+ //$("#HCheckTime").val(Format(new Date(), "yyyy-MM-dd"));
$("#HModifyEmp").val(sessionStorage["HUserName"]);
Organ();
Organ1();
@@ -456,6 +466,11 @@
function set_AddNew(data) {
var HPrice = $('#HPrice').val();
+ var HStopflag_check = $('#HStopflag').val();
+ if (HStopflag_check == "false") {
+ $('#HStopTime').val(" ");
+ console.log("1");
+ }
if (HPrice.substring(HPrice.length - 1, HPrice.length) == ".") {
layer.msg("鍗曚环鐨勭粨灏句笉鑳芥槸.锛�");
return;
@@ -465,7 +480,12 @@
layer.msg("鍗曚环璇疯緭姝g‘鍏ユ暟瀛楋紒");
return;
}
+ if (HPrice == 0 || HPrice == null || HPrice == "0") {
+ layer.msg("鍗曚环璇蜂笉鑳戒负0锛�");
+ return;
+ }
}
+
var HisBan = $('#HStopflag').val();
var UseType = $('#HUseFlag').val();
var HStopEmp = $('#HStopEmp').val();
@@ -509,12 +529,14 @@
success: function (d) {
var IsHStopflag = d.data[0].鏄惁绂佺敤;
//绂佺敤鏍囪
- //if (IsHStopflag=== 1) {
- // $("#HStopflag").attr("checked", true);
- //}
- if (IsHStopflag) {
- $("input[name='checkboxHStopflag'][value='" + IsHStopflag + "']").attr("checked", true);
+ if (IsHStopflag === false) {
+ $("#checkboxHStopflag").attr("checked", false);
}
+ else
+ $("#checkboxHStopflag").attr("checked", true);
+ //if (IsHStopflag) {
+ // $("input[name='checkboxHStopflag'][value='" + IsHStopflag + "']").attr("checked", false);
+ //}
//涓昏〃
form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
"HItemID": d.data[0].HItemID
@@ -572,32 +594,33 @@
})
}
form.on('submit(set_CheckBill)', function () {
- var InterID = linterid
- //閫昏緫瀹℃牳鏂规硶
- $.ajax({
- type: "GET",
- url: GetWEBURL() + "/Gy_MatePriceController/MatePriceCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- data: { "HInterID": InterID, "IsAudit": 0, "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);
- $('#set_CheckBill').addClass('layui-btn-disabled').attr('disabled', true);
- $('#saver').addClass('layui-btn-disabled').attr('disabled', true);
- //淇敼涓哄姛鍚庡埛鏂扮晫闈�
- //$("#btnSearch").trigger('click');
- });
+ //閫昏緫瀹℃牳鏂规硶
+ $.ajax({
+ type: "GET",
+ url: GetWEBURL() + "/Gy_MatePriceController/MatePriceCheck", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ data: { "HInterID": linterid, "IsAudit": 0, "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);
+ $('#set_CheckBill').addClass('layui-btn-disabled').attr('disabled', true);
+ $('#saver').addClass('layui-btn-disabled').attr('disabled', true);
+ //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+ //$("#btnSearch").trigger('click');
+ });
- } else {
- layer.alert(result.code + result.Message, { icon: 5 });
+ } else {
+ layer.alert(result.code + result.Message, { icon: 5 });
+ }
+ }, error: function () {
+ layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
}
- }, error: function () {
- layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
- }
- });
+ });
+
+
})
//#region 鑾峰彇缁勭粐
function Organ() {
--
Gitblit v1.9.1