From bd307a6664b3bf488efa557790625f3af185fd72 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 02 十二月 2024 15:09:43 +0800
Subject: [PATCH] 采购订单,收料通知单,采购入库单,应付单,付款单,销售订单,发货通知单,销售出库单,应收单 分页优化,列设置默认页大小添加 添加新js文件
---
WebTM/views/采购管理/应付单/Cg_PayableBill.html | 106 +++++++++++++++++++++++++++++------------------------
1 files changed, 58 insertions(+), 48 deletions(-)
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html"
index f7c12bb..ee6ecf7 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\345\272\224\344\273\230\345\215\225/Cg_PayableBill.html"
@@ -1642,8 +1642,8 @@
, { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
, { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, edit: 'text', event: "HUnitID"}//f7
, { field: 'HQty', title: '鏁伴噺', width: 100, totalRow: true, edit: 'text'}
- , { field: 'HPrice', title: '鍗曚环', width: 100, edit: 'text', event: "HPrice" }
- , { field: 'HMoney', title: '閲戦', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
+ , { field: 'HPrice', title: '鍗曚环', width: 100, event: "HPrice", style: 'background-color:#efefef4d;' }
+ , { field: 'HMoney', title: '閲戦', width: 100, totalRow: true, edit: 'text' }
, { field: 'HTaxPrice', title: '鍚◣鍗曚环', width: 100, edit: 'text', event: "HTaxPrice" }
, { field: 'HDiscountRate', title: '鎶樻墸鐜�', width: 100, edit: 'text' }
, { field: 'HRelTaxPrice', title: '瀹為檯鍚◣鍗曚环', width: 100, style: 'background-color:#efefef4d;' }
@@ -1760,52 +1760,12 @@
table.render(optionEntry);
}
function set_InitGridHaveSource() {
- option = {
- elem: '#mainTable'
- , toolbar: '#toolbarDemo'
- , totalRow: true
- , limit: 500
- , height: 500
- , loading: false
- , cols: [[ //瀛愯〃
- { type: 'checkbox', totalRowText: '鍚堣琛�' }
- , { type: 'numbers', title: '搴忓彿', width: 100 }
- , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 150, edit: 'text', event: "HMaterID" }//f7
- , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 150, style: 'background-color:#efefef4d;' }
- , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 100, style: 'background-color:#efefef4d;' }
- , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 100, edit: 'text', event: "HUnitID" }//f7
- , { field: 'HQty', title: '鏁伴噺', width: 100, totalRow: true, style: 'background-color:#efefef4d;'}
- , { field: 'HPrice', title: '鍗曚环', width: 100, edit: 'text', event: "HPrice" }
- , { field: 'HMoney', title: '閲戦', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
- , { field: 'HTaxPrice', title: '鍚◣鍗曚环', width: 100, edit: 'text', event: "HTaxPrice" }
- , { field: 'HDiscountRate', title: '鎶樻墸鐜�', width: 100, edit: 'text' }
- , { field: 'HRelTaxPrice', title: '瀹為檯鍚◣鍗曚环', width: 100, edit: 'text' }
- , { field: 'HTaxRate', title: '绋庣巼', width: 100, edit: 'text' }
- , { field: 'HTaxMoney', title: '绋庨', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
- , { field: 'HMoneyBB', title: '鏈綅甯侀噾棰�', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
- , { field: 'HlineTotal', title: '浠风◣鍚堣', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
- , { field: 'HlineTotalBB', title: '鏈綅甯佷环绋庡悎璁�', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
- , { field: 'HRemark', title: '澶囨敞', width: 100, edit: 'text' }
-
- , { field: 'HSourceInterID', title: '婧愬崟鍐呯爜', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { field: 'HSourceBillNo', title: '婧愬崟鍙�', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { field: 'HRelationQty', title: '鍏宠仈鏁伴噺', width: 100, totalRow: true, hide: true, style: 'background-color:#efefef4d;' }
- , { field: 'HRelationMoney', title: '鍏宠仈閲戦', width: 100, totalRow: true, hide: true, style: 'background-color:#efefef4d;' }
-
- , { field: 'HPOOrderInterID', title: '閲囪喘璁㈠崟鍐呯爜', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { field: 'HPOOrderEntryID', title: '閲囪喘璁㈠崟瀛愬唴鐮�', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { field: 'HPOOrderBillNo', title: '閲囪喘璁㈠崟鍙�', width: 100, hide: true, style: 'background-color:#efefef4d;' }
-
- , { field: 'HSeOrderTaxPrice', title: '璁㈠崟鍚◣鍗曚环', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { field: 'HSeOrderInterID', title: '閿�鍞鍗曞唴鐮�', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { field: 'HSeOrderEntryID', title: '閿�鍞鍗曞瓙鍐呯爜', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { field: 'HSeOrderBillNo', title: '閿�鍞鍗曞彿', width: 100, hide: true, style: 'background-color:#efefef4d;' }
- , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
- ]]
+ //閫変腑婧愬崟鍚庢暟閲忎笉鍙紪杈�
+ for (var i = 0; i < option.cols[0].length; i++) {
+ if (option.cols[0][i]["field"] == "HQty") {
+ option.cols[0][i]["edit"] = false;
+ }
+
}
}
//#endregion
@@ -2072,6 +2032,56 @@
});
table.render(option);
break;
+ case "HMoney": //閲戦
+ //鏁版嵁鏍煎紡鏍¢獙
+ temp = value + "";
+ if (!ref.test(temp) || temp == 0 ||obj.data.HQty == 0) {
+ //鎭㈠鏁版嵁鍒扮紪杈戝墠
+ obj.update({
+ HMoney: oldText
+ });
+ table.render(option);
+ layer.msg("閲戦鎴栨暟閲忚杈撳叆澶т簬0鐨勬暟瀛�!");
+ return;
+ }
+
+ //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+ var HQty = obj.data.HQty * 1; //鏁伴噺
+ var HMoney = value * 1; //閲戦=鏁伴噺*鍗曚环
+ var HPrice = HMoney / HQty;
+ var HTaxRate = obj.data.HTaxRate * 0.01; //绋庣巼
+ var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4)); //绋庨=閲戦*绋庣巼
+ var HlineTotal = HMoney + HTaxMoney; //浠风◣鍚堣=閲戦+绋庨
+ var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4)); //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+ var HDiscountRate = obj.data.HDiscountRate * 1; //鎶樻墸鐜�
+ var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(4)); //瀹為檯鍚◣鍗曚环=鍚◣鍗曚环*鎶樻墸鐜�
+ var HExRate = $("#HExRate").val(); //姹囩巼
+ var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4)); //鏈綅甯佷环绋庡悎璁�=(绋庨+閲戦)*姹囩巼
+ var HMoneyBB = HMoney * HExRate;
+ //鏁板瓧绮惧害
+ HQty = Number(HQty.toFixed(HQtyDec));
+ HPrice = Number(HPrice.toFixed(HPriceDec));
+ HMoney = Number(HMoney.toFixed(HMoneyDec));
+ HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+ HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
+ HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
+ HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
+ HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+ HMoneyBB = Number(HMoneyBB.toFixed(HMoneyDec));
+ //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+ obj.update({
+ HQty: HQty
+ , HPrice: HPrice
+ , HMoney: HMoney
+ , HTaxMoney: HTaxMoney
+ , HlineTotal: HlineTotal
+ , HTaxPrice, HTaxPrice
+ , HRelTaxPrice: HRelTaxPrice
+ , HlineTotalBB: HlineTotalBB
+ , HMoneyBB: HMoneyBB
+ });
+ table.render(option);
+ break;
default:
}
});
--
Gitblit v1.9.1