|
@@ -173,6 +173,25 @@ $(document).ready(function () {
|
|
|
$("#addTaxGroup").modal("hide");
|
|
|
});
|
|
|
|
|
|
+ $("#addRatioBtn").click(function () {
|
|
|
+ let rationLibData = rationList === undefined ? [] : JSON.parse(rationList);
|
|
|
+ let unSelectLibs = [];
|
|
|
+ for (let lib of rationLibData) {
|
|
|
+ if (
|
|
|
+ $("input:hidden[name=ration_lib][data-id = " + lib.id + "]").length > 0
|
|
|
+ ) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ unSelectLibs.push(lib);
|
|
|
+ }
|
|
|
+ let html = "";
|
|
|
+ for (let tmp of unSelectLibs) {
|
|
|
+ let tmpHtml = '<option value="' + tmp.id + '">' + tmp.name + "</option>";
|
|
|
+ html += tmpHtml;
|
|
|
+ }
|
|
|
+ $("select[name='ration_lib']").html(html);
|
|
|
+ });
|
|
|
+
|
|
|
$("#ration_lib-search-box").on("input", function () {
|
|
|
var keyword = $(this).val().toLowerCase().trim(); // 获取输入的关键字并转为小写
|
|
|
// 遍历所有option元素
|