From 5f951d33f6ada34c68eae3629b331ff45179f590 Mon Sep 17 00:00:00 2001 From: hjhan Date: Fri, 28 Aug 2026 10:48:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A2=84=E4=BB=98=E9=87=91=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=90=84=20Tab=20=E5=BC=B9=E7=AA=97=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E5=8C=BA=E5=88=86=EF=BC=8C=E9=A1=B5=E9=9D=A2=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E5=8E=BB=20V2=EF=BC=8C=E5=AE=A2=E6=88=B7=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E6=94=B9=E4=B8=BA=E8=AF=BB=E6=8E=A7=E4=BB=B6?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 四个 Tab 的新增/编辑/复制弹窗标题带各自归属(全局/客户/自定义/绑定), 客户预付金 tab 原与全局同为"编辑默认预付金模板"无法区分 - 列表页 ViewBag.Title 去掉 V2 - 客户多选保存取值改为 $("#ClientId").val()(与兄弟页面读 chosen 一致), 不再依赖 v-model 同步;编辑态仍走表单对象原绑定客户 --- .../client_margin_templateEdit.cshtml | 2 +- .../client_margin_templateList.cshtml | 4 ++-- .../margin_template_v2ClientList.cshtml | 6 +++--- .../margin_template_v2DefaultList.cshtml | 6 +++--- .../margin_template_v2/margin_template_v2List.cshtml | 6 +++--- .../Scripts/app/client/clientMarginTemplateEdit.js | 9 ++++++--- 6 files changed, 18 insertions(+), 15 deletions(-) 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;