This commit is contained in:
xd 2024-05-29 17:21:55 +08:00
parent a3b5e19832
commit 008e007a09
5 changed files with 45 additions and 10 deletions

View File

@ -95,8 +95,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotLxrdh != null and quotLxrdh != ''">quotLxrdh,</if>
<if test="totalPrice != null and totalPrice != ''">totalPrice,</if>
<if test="rbDateUid != null and rbDateUid != ''">rbDateUid,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
create_time
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="quot_id != null">#{quot_id},</if>
@ -107,8 +109,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="quotLxrdh != null and quotLxrdh != ''">#{quotLxrdh},</if>
<if test="totalPrice != null and totalPrice != ''">#{totalPrice},</if>
<if test="rbDateUid != null and rbDateUid != ''">#{rbDateUid},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
getdate()
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
@ -123,8 +127,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="totalPrice != null and totalPrice != ''">totalPrice = #{totalPrice},</if>
<if test="rbDateUid != null and rbDateUid != ''">rbDateUid = #{rbDateUid},</if>
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">quotApprovalStatus = #{quotApprovalStatus},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
update_time = getdate()
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where quot_id = #{quot_id}
</update>

View File

@ -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

View File

@ -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'

View File

@ -49,11 +49,11 @@
<el-link :underline="false" type="primary" @click="handleDetail(scope.row)">{{scope.row.quotCode}}</el-link>
</template>
</el-table-column>
<el-table-column fixed="left" label="提交状态" align="center" prop="quotApprovalStatus" width="150px">
<!--<el-table-column fixed="left" label="提交状态" align="center" prop="quotApprovalStatus" width="150px">
<template slot-scope="scope">
<dict-tag :options="dict.type.rb_quot_approval_status" :value="scope.row.quotApprovalStatus"/>
</template>
</el-table-column>
</el-table-column>-->
<el-table-column label="报价客户" width="250" align="center" prop="quotCustomer" />
<el-table-column label="报价项目" width="250" align="center" prop="quotProject" />
<el-table-column label="总价" width="100" align="center" prop="totalPrice" />
@ -114,6 +114,7 @@
@click.native="selectRbDate(item.value)"/>
</el-select>
<el-button style="float: right;margin-left: 5px;" size="small" type="success" icon="el-icon-document" @click="handleMadeQuotClick" :disabled="selectedResultData.length==0">生成报价单</el-button>
<el-button style="float: right;" size="small" type="warning" icon="el-icon-folder" @click="handleSaveOtherClick" v-if="this.form.quotApprovalStatus==0" :disabled="selectedResultData.length==0">另存为</el-button>
<el-button style="float: right;" size="small" type="warning" icon="el-icon-folder" @click="handleSaveClick" v-if="this.form.quotApprovalStatus==0" :disabled="selectedResultData.length==0">保存</el-button>
</el-form-item>
</el-col>
@ -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 => {

View File

@ -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
},