diff --git a/YLErpWeb/Views/client_margin_template/client_margin_templateEdit.cshtml b/YLErpWeb/Views/client_margin_template/client_margin_templateEdit.cshtml index 50a45b9b..3e7dce42 100644 --- a/YLErpWeb/Views/client_margin_template/client_margin_templateEdit.cshtml +++ b/YLErpWeb/Views/client_margin_template/client_margin_templateEdit.cshtml @@ -51,7 +51,7 @@ @if (pageObj.isAdd) { @*新增:客户多选(类似适用簿记账户),保存时按选中客户逐条调用原有单条保存接口*@ - } diff --git a/YLErpWeb/Views/client_margin_template/client_margin_templateList.cshtml b/YLErpWeb/Views/client_margin_template/client_margin_templateList.cshtml index ef88d0d7..404a6f6f 100644 --- a/YLErpWeb/Views/client_margin_template/client_margin_templateList.cshtml +++ b/YLErpWeb/Views/client_margin_template/client_margin_templateList.cshtml @@ -1,6 +1,6 @@ @using YLErp.Enums; @{ - ViewBag.Title = "预付金模板V2"; + ViewBag.Title = "预付金模板"; ViewBag.Menu = "数据管理-预付金模板V2"; Layout = "~/Views/Shared/_MainLayout.cshtml"; } @@ -70,7 +70,7 @@ function setClientMarginTemplate(id) { var editurl = "/client_margin_template/client_margin_templateEdit/?id=" + id; - main.infopage("设置客户预付金", editurl, { area: ['1480px', '800px'] }); + main.infopage(id ? "编辑客户预付金绑定" : "新增客户预付金绑定", editurl, { area: ['1480px', '800px'] }); } function deleteClientMarginTemplate(id) { diff --git a/YLErpWeb/Views/margin_template_v2/margin_template_v2ClientList.cshtml b/YLErpWeb/Views/margin_template_v2/margin_template_v2ClientList.cshtml index 7e0e4226..75ada014 100644 --- a/YLErpWeb/Views/margin_template_v2/margin_template_v2ClientList.cshtml +++ b/YLErpWeb/Views/margin_template_v2/margin_template_v2ClientList.cshtml @@ -1,5 +1,5 @@ @{ - ViewBag.Title = "预付金模板V2"; + ViewBag.Title = "预付金模板"; ViewBag.Menu = "数据管理-预付金模板V2"; Layout = "~/Views/Shared/_MainLayout.cshtml"; } @@ -119,13 +119,13 @@ if (id) { editurl = "/margin_template_v2/margin_template_v2ClientEdit/?enid=" + id; } - main.infopage("编辑默认预付金模板", editurl, { area: ['1480px', '800px'] }); + main.infopage(id ? "编辑客户预付金模板" : "新增客户预付金模板", editurl, { area: ['1480px', '800px'] }); } function startCopymargin_template_v2(id) { var editurl = "/margin_template_v2/margin_template_v2ClientCopy/?enid=" + id; - main.infopage("复制默认预付金模板", editurl, { area: ['1480px', '800px'] }); + main.infopage("复制客户预付金模板", editurl, { area: ['1480px', '800px'] }); } function deleteEditmargin_template_v2(id) { diff --git a/YLErpWeb/Views/margin_template_v2/margin_template_v2DefaultList.cshtml b/YLErpWeb/Views/margin_template_v2/margin_template_v2DefaultList.cshtml index 9f183439..721b3347 100644 --- a/YLErpWeb/Views/margin_template_v2/margin_template_v2DefaultList.cshtml +++ b/YLErpWeb/Views/margin_template_v2/margin_template_v2DefaultList.cshtml @@ -1,5 +1,5 @@ @{ - ViewBag.Title = "预付金模板V2"; + ViewBag.Title = "预付金模板"; ViewBag.Menu = "数据管理-预付金模板V2"; Layout = "~/Views/Shared/_MainLayout.cshtml"; } @@ -127,12 +127,12 @@ if (id) { editurl = "/margin_template_v2/margin_template_v2DefaultEdit/?enid=" + id; } - main.infopage("编辑默认预付金模板", editurl, { area: ['1480px', '800px'] }); + main.infopage(id ? "编辑全局预付金模板" : "新增全局预付金模板", editurl, { area: ['1480px', '800px'] }); } function startCopymargin_template_v2(id) { editurl = "/margin_template_v2/margin_template_v2DefaultCopy/?enid=" + id; - main.infopage("复制默认预付金模板", editurl, { area: ['1480px', '800px'] }); + main.infopage("复制全局预付金模板", editurl, { area: ['1480px', '800px'] }); } function deleteEditmargin_template_v2(id) { diff --git a/YLErpWeb/Views/margin_template_v2/margin_template_v2List.cshtml b/YLErpWeb/Views/margin_template_v2/margin_template_v2List.cshtml index 24eb54e4..410f8990 100644 --- a/YLErpWeb/Views/margin_template_v2/margin_template_v2List.cshtml +++ b/YLErpWeb/Views/margin_template_v2/margin_template_v2List.cshtml @@ -1,6 +1,6 @@ @using YLErp.Enums; @{ - ViewBag.Title = "预付金模板V2"; + ViewBag.Title = "预付金模板"; ViewBag.Menu = "数据管理-预付金模板V2"; Layout = "~/Views/Shared/_MainLayout.cshtml"; } @@ -134,13 +134,13 @@ if (id) { editurl = "/margin_template_v2/margin_template_v2Edit/?enid=" + id; } - main.infopage("编辑预付金模板", editurl, { area: ['1180px', '92%'] }); + main.infopage(id ? "编辑自定义预付金模板" : "新增自定义预付金模板", editurl, { area: ['1180px', '92%'] }); } function startCopymargin_template_v2(id) { editurl = "/margin_template_v2/margin_template_v2Copy/?enid=" + id; - main.infopage("复制预付金模板", editurl, { area: ['1180px', '92%'] }); + main.infopage("复制自定义预付金模板", editurl, { area: ['1180px', '92%'] }); } function startDeletemargin_template_v2(id) { diff --git a/YLErpWeb/wwwroot/Scripts/app/client/clientMarginTemplateEdit.js b/YLErpWeb/wwwroot/Scripts/app/client/clientMarginTemplateEdit.js index ee9aaac4..ed41b441 100644 --- a/YLErpWeb/wwwroot/Scripts/app/client/clientMarginTemplateEdit.js +++ b/YLErpWeb/wwwroot/Scripts/app/client/clientMarginTemplateEdit.js @@ -25,8 +25,6 @@ const vue = new Vue({ marginTemplates: page.marginTemplates, marginTemplate: page.marginTemplate, clientNames: [], - //新增模式的客户多选(编辑模式仍为单条绑定,走 clientMarginTemplate.ClientId) - selectedClientIds: [], isAdd: page.isAdd }, created: function () { @@ -127,7 +125,12 @@ const vue = new Vue({ //当前内容上供修正重试(已成功的客户重试会因同天同结构互斥校验失败,不会重复入库) saveMarginTemplateV2() { var thisObj = this; - var ids = this.isAdd ? (this.selectedClientIds || []) : [this.clientMarginTemplate.ClientId]; + //取值直接读控件(与兄弟页面读 chosen 的 $("#tradeTypes").val() 一致,不依赖 v-model 同步): + //新增=多选控件 val()(数组);编辑=表单对象上的原绑定客户 + var chosenVal = this.isAdd ? $("#ClientId").val() : this.clientMarginTemplate.ClientId; + var ids = this.isAdd + ? (Array.isArray(chosenVal) ? chosenVal : (chosenVal ? [chosenVal] : [])) + : [chosenVal]; if (!ids.length) { main.message("请至少选择一个客户"); return;