From 008e007a0929c51f49182795c5a1d781501190af Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Wed, 29 May 2024 17:21:55 +0800 Subject: [PATCH] '123' --- .../mapper/redBook/OARedBookMapper.xml | 18 ++++++++++----- ruoyi-ui/.env.development | 3 +++ ruoyi-ui/.env.production | 3 +++ ruoyi-ui/src/views/redBook/quots.vue | 22 ++++++++++++++++--- ruoyi-ui/vue.config.js | 9 +++++++- 5 files changed, 45 insertions(+), 10 deletions(-) diff --git a/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml b/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml index 3ad9fa7..1230e60 100644 --- a/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml @@ -95,8 +95,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" quotLxrdh, totalPrice, rbDateUid, - create_by, - create_time + create_by, + create_time, + update_by, + update_time, #{quot_id}, @@ -107,8 +109,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{quotLxrdh}, #{totalPrice}, #{rbDateUid}, - #{createBy}, - getdate() + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, @@ -123,8 +127,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" totalPrice = #{totalPrice}, rbDateUid = #{rbDateUid}, quotApprovalStatus = #{quotApprovalStatus}, - update_by = #{updateBy}, - update_time = getdate() + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, where quot_id = #{quot_id} diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index 73a1157..670fc24 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -11,5 +11,8 @@ VUE_APP_BASE_API = '/dev-api' VUE_APP_WEBSOCKET_API = '/websocket-api' VUE_APP_WSS_WEBSOCKET_API = '/wss-websocket-api' +# 江南业务系统-WebSocket/开发环境 +VUE_APP_QUOT_API = '/quot-api' + # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/ruoyi-ui/.env.production b/ruoyi-ui/.env.production index baf0287..2482e5c 100644 --- a/ruoyi-ui/.env.production +++ b/ruoyi-ui/.env.production @@ -10,3 +10,6 @@ VUE_APP_BASE_API = '/prod-api' # 江南业务系统-WebSocket/开发环境 VUE_APP_WEBSOCKET_API = '/websocket-api' VUE_APP_WSS_WEBSOCKET_API = '/wss-websocket-api' + +# 江南业务系统-WebSocket/开发环境 +VUE_APP_QUOT_API = '/quot-api' diff --git a/ruoyi-ui/src/views/redBook/quots.vue b/ruoyi-ui/src/views/redBook/quots.vue index 9185734..950a06e 100644 --- a/ruoyi-ui/src/views/redBook/quots.vue +++ b/ruoyi-ui/src/views/redBook/quots.vue @@ -49,11 +49,11 @@ {{scope.row.quotCode}} - + @@ -114,6 +114,7 @@ @click.native="selectRbDate(item.value)"/> 生成报价单 + 另存为 保存 @@ -378,7 +379,7 @@ // 报价单保存修改 handleSaveClick() { const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0); - this.form.totalPrice = allPrice.toFixed(2); + this.form.totalPrice = toDecimal(allPrice); this.form.selectedResultData = this.selectedResultData; saveQuot(this.form).then(response => { this.$modal.msgSuccess("修改报价单成功"); @@ -387,6 +388,21 @@ }) }, + // 报价单另存为 + handleSaveOtherClick() { + this.$modal.confirm('是否确认生成新报价单?').then(function() {}).then(() => { + const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0); + this.form.totalPrice = toDecimal(allPrice); + this.form.selectedResultData = this.selectedResultData; + this.form.quot_id = ""; + saveQuot(this.form).then(response => { + this.$modal.msgSuccess("生成报价单成功,单号:"+response.data.quotCode); + this.open = false; + this.getList(); + }) + }).catch(() => {}); + }, + // 报价单提交报价组 /*handleCommitClick() { this.$refs["form"].validate(valid => { diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index cb67741..d80d4bd 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -41,7 +41,7 @@ module.exports = { ['^' + process.env.VUE_APP_BASE_API]: '' } }, - [process.env.VUE_APP_WEBSOCKET_API]: { + [process.env.VUE_APP_WEBSOCKET_API]: { target: `http://localhost:3334`, changeOrigin: true, ws: true, @@ -49,6 +49,13 @@ module.exports = { ['^' + process.env.VUE_APP_WEBSOCKET_API]: '' } }, + [process.env.VUE_APP_QUOT_API]: { + target: `http://localhost:3334`, + changeOrigin: true, + pathRewrite: { + ['^' + process.env.VUE_APP_QUOT_API]: '' + } + }, }, disableHostCheck: true },