From dbe35003ea2f09e93d8a85d2f481fd0c81d9edfb Mon Sep 17 00:00:00 2001 From: wangjiuyun <1595161655@qq.com> Date: Fri, 6 Jun 2025 17:34:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=96=B0=E5=A2=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/templates/project/info/add.html | 11 +- .../templates/project/info/edit.html | 10 +- .../templates/project/info/project.html | 8 +- .../templates/project/order/add.html | 223 ++++++++---------- .../templates/project/order/order.html | 13 +- 5 files changed, 110 insertions(+), 155 deletions(-) diff --git a/ruoyi-admin/src/main/resources/templates/project/info/add.html b/ruoyi-admin/src/main/resources/templates/project/info/add.html index b031fcbd..8d7d0aa7 100644 --- a/ruoyi-admin/src/main/resources/templates/project/info/add.html +++ b/ruoyi-admin/src/main/resources/templates/project/info/add.html @@ -339,9 +339,6 @@ $(function () { initProductList() - var layerIndex = parent.layer.index - parent.layer.full(layerIndex) - $("input[name='estimatedOrderTime']").datetimepicker({ format: "yyyy-mm-dd", minView: "month", @@ -490,14 +487,14 @@ ${softwareProjectProductInfoList.map((ele) => { let tr = $(` ${length + 1} - ${hardwareProjectProductInfoList.map((ele) => { return `` }).join('') } - ${hardwareProjectProductInfoList.map((ele) => { return `` }).join('') @@ -526,14 +523,14 @@ ${hardwareProjectProductInfoList.map((ele) => { let tr = $(` ${length + 1} - ${hardwareProjectProductInfoList.map((ele) => { return `` }).join('') } - ${hardwareProjectProductInfoList.map((ele) => { return `` }).join('') diff --git a/ruoyi-admin/src/main/resources/templates/project/info/edit.html b/ruoyi-admin/src/main/resources/templates/project/info/edit.html index fd22b1a2..f9266a17 100644 --- a/ruoyi-admin/src/main/resources/templates/project/info/edit.html +++ b/ruoyi-admin/src/main/resources/templates/project/info/edit.html @@ -377,8 +377,6 @@ $(function () { initProductList() var layerIndex = parent.layer.index - parent.layer.full(layerIndex) - $("input[name='estimatedOrderTime']").datetimepicker({ format: "yyyy-mm-dd", minView: "month", @@ -556,13 +554,13 @@ ${softwareProjectProductInfoList.map((ele) => { ${length + 1} - ${hardwareProjectProductInfoList.map((ele) => { return `` }).join('') } - ${hardwareProjectProductInfoList.map((ele) => { return `` }).join('') @@ -591,13 +589,13 @@ ${hardwareProjectProductInfoList.map((ele) => { ${length + 1} - ${maintenanceProjectProductInfoList.map((ele) => { return `` }).join('') } - ${maintenanceProjectProductInfoList.map((ele) => { return `` }).join('') diff --git a/ruoyi-admin/src/main/resources/templates/project/info/project.html b/ruoyi-admin/src/main/resources/templates/project/info/project.html index df09ea1d..45833749 100644 --- a/ruoyi-admin/src/main/resources/templates/project/info/project.html +++ b/ruoyi-admin/src/main/resources/templates/project/info/project.html @@ -52,7 +52,7 @@
  • - +
  • @@ -135,10 +135,10 @@
    - + 添加 - 修改 @@ -265,7 +265,7 @@ align: 'center', formatter: function (value, row, index) { var actions = []; - actions.push('项目详情 '); + actions.push('项目详情 '); actions.push('生成订单 '); actions.push('删除'); return actions.join(''); diff --git a/ruoyi-admin/src/main/resources/templates/project/order/add.html b/ruoyi-admin/src/main/resources/templates/project/order/add.html index fd48cede..20a62260 100644 --- a/ruoyi-admin/src/main/resources/templates/project/order/add.html +++ b/ruoyi-admin/src/main/resources/templates/project/order/add.html @@ -131,7 +131,7 @@ 合同编号* - + 币种* @@ -244,7 +244,7 @@
    配置信息

    软件

    - + @@ -267,7 +267,7 @@

    硬件

    - + @@ -290,7 +290,7 @@

    维保

    - + @@ -328,7 +328,17 @@ 上传
    -
    + + + + + + + + + + +
    合同名称上传人上传时间操作
    @@ -378,9 +388,6 @@ $(function () { initProductList() - var layerIndex = parent.layer.index - parent.layer.full(layerIndex) - $("input[name='estimatedOrderTime']").datetimepicker({ format: "yyyy-mm-dd", minView: "month", @@ -466,8 +473,7 @@ $('[name="agentCode"]').val(rows[0].agentCode); changeBg() $('[name="industryType"]').val(rows[0].industryType); - - + initProjectList() $.modal.close(index); } @@ -501,12 +507,12 @@ // 添加软件 - function addProduct() { + function addProduct(data) { let length = $('#productTable tbody').find('tr').length let tr = $(` ${length + 1} - - - - - - - - - - + + + + + + + + + + 删除 `) @@ -535,34 +542,35 @@ ${softwareProjectProductInfoList.map((ele) => { initPrice() } - function addProduct2() { + function addProduct2(data) { let length = $('#productTable2 tbody').find('tr').length let tr = $(` ${length + 1} - - ${hardwareProjectProductInfoList.map((ele) => { return `` }).join('') } - - - - - - - - - + + + + + + + + + + 删除 `) @@ -571,34 +579,35 @@ ${hardwareProjectProductInfoList.map((ele) => { initPrice() } - function addProduct3() { + function addProduct3(data) { let length = $('#productTable3 tbody').find('tr').length let tr = $(` ${length + 1} - - ${maintenanceProjectProductInfoList.map((ele) => { return `` }).join('') } - - - - - - - - - + + + + + + + + + + 删除 `) @@ -621,29 +630,29 @@ ${maintenanceProjectProductInfoList.map((ele) => { } function initSearchProduct() { - layui.use(function (){ - var form=layui.form + layui.use(function () { + var form = layui.form form.render() - form.on('select(productCode1)',function (data) { + form.on('select(productCode1)', function (data) { searchProduct(data.value, 'code', data.elem) }) - form.on('select(productCode2)',function (data) { + form.on('select(productCode2)', function (data) { searchProduct(data.value, 'code', data.elem) }) - form.on('select(productCode3)',function (data) { + form.on('select(productCode3)', function (data) { searchProduct(data.value, 'code', data.elem) }) - form.on('select(productModel1)',function (data) { + form.on('select(productModel1)', function (data) { searchProduct(data.value, 'model', data.elem) }) - form.on('select(productModel2)',function (data) { + form.on('select(productModel2)', function (data) { searchProduct(data.value, 'model', data.elem) }) - form.on('select(productModel3)',function (data) { + form.on('select(productModel3)', function (data) { searchProduct(data.value, 'model', data.elem) }) - $('.layui-input').on('mouseout',function (){ + $('.layui-input').on('mouseout', function () { $(this).blur() }) }) @@ -734,13 +743,6 @@ ${maintenanceProjectProductInfoList.map((ele) => { }) } - function changeInstitution() { - if ($('[name="operateInstitution"]').val() == 'h3c') { - $('[name="partnerName"]').val('新华三') - $('[name="partnerCode"]').val('') - } - } - function changeBg() { if ($('[name="bgProperty"]').val() != 'YYS') { let datas = [[${@dict.getType('bg_hysy')}]] @@ -797,17 +799,8 @@ ${maintenanceProjectProductInfoList.map((ele) => { let data = JSON.parse(res.currentTarget.response) if (data.code === 0) { $.modal.msgSuccess('导入成功'); - data.data.forEach((row) => { - addRow(row) - }) - - $('.discount').on('change', function () { - - changeTotal($(this)) - }) - $('.discount').on('focus', function () { - $(this).blur() + addFile(row) }) } else { $.modal.msgError(data.msg || '导入失败'); @@ -824,65 +817,6 @@ ${maintenanceProjectProductInfoList.map((ele) => { xhr.send(data); }); - function initTable() { - var options = { - pagination: false, - showSearch: false, - showRefresh: false, - showToggle: false, - showColumns: false, - sidePagination: "client", - columns: [{ - checkbox: true - }, - { - field: 'index', - align: 'center', - title: "序号", - formatter: function (value, row, index) { - var columnIndex = $.common.sprintf("", $.table.serialNumber(index)); - return columnIndex + $.table.serialNumber(index); - } - }, - { - field: 'fileName', - align: 'center', - title: '合同名称', - formatter: function (value, row, index) { - var html = $.common.sprintf("", index, value); - return html; - } - }, - { - field: 'uploadUser', - align: 'center', - title: '上传人', - formatter: function (value, row, index) { - var html = $.common.sprintf("", index, value); - return html; - } - }, - { - field: 'uploadTime', - align: 'center', - title: '上传时间', - formatter: function (value, row, index) { - var html = $.common.sprintf("", index, value); - return html; - } - }, - { - title: '操作', - align: 'center', - formatter: function (value, row, index) { - var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index); - return '删除'; - } - }] - }; - $.table.init(options); - } - function importList() { if (!$('[name="projectId"]').val()) { $.modal.alertWarning("请先选择项目"); @@ -890,6 +824,35 @@ ${maintenanceProjectProductInfoList.map((ele) => { } $('#uploadInput').click() } + + function addFile() { + let tr = $(` + + + + +`) + $('#fileBox tbody').append(tr) + + } + + function initProjectList() { + let id = $('[name="projectId"]').val() + $.operate.get(ctx + `sip/project/query/${id}`, function (res) { + $('#productTable tbody').html('') + $('#productTable2 tbody').html('') + $('#productTable3 tbody').html('') + res.data.softwareProjectProductInfoList ? res.data.softwareProjectProductInfoList.forEach((ele) => { + addProduct(ele) + }) : '' + res.data.hardwareProjectProductInfoList ? res.data.hardwareProjectProductInfoList.forEach((ele) => { + addProduct2(ele) + }) : '' + res.data.maintenanceProjectProductInfoList ? res.data.maintenanceProjectProductInfoList.forEach((ele) => { + addProduct3(ele) + }) : '' + }) + } \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/project/order/order.html b/ruoyi-admin/src/main/resources/templates/project/order/order.html index e826d12d..97a015da 100644 --- a/ruoyi-admin/src/main/resources/templates/project/order/order.html +++ b/ruoyi-admin/src/main/resources/templates/project/order/order.html @@ -24,11 +24,8 @@
  • - + +
  • @@ -50,10 +47,10 @@
    - + 添加 - + 修改 @@ -153,7 +150,7 @@ align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); + actions.push('编辑 '); actions.push('删除'); return actions.join(''); }