'123'
This commit is contained in:
parent
1dd6f52bde
commit
0369036272
|
@ -2,6 +2,7 @@ package com.ruoyi.redBook.domain;
|
|||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
public class OAQuot extends BaseEntity {
|
||||
|
@ -13,6 +14,8 @@ public class OAQuot extends BaseEntity {
|
|||
private String quotLxrdh;//联系人电话
|
||||
private String totalPrice;//总金额
|
||||
|
||||
private BigDecimal perc;//一次折扣
|
||||
private BigDecimal perc2;//二次折扣
|
||||
private String rbDateUid;//调价版本
|
||||
private String quotApprovalStatus;//提交状态
|
||||
|
||||
|
@ -64,6 +67,14 @@ public class OAQuot extends BaseEntity {
|
|||
|
||||
public void setTotalPrice(String totalPrice) { this.totalPrice = totalPrice; }
|
||||
|
||||
public BigDecimal getPerc() {return perc; }
|
||||
|
||||
public void setPerc(BigDecimal perc) {this.perc = perc; }
|
||||
|
||||
public BigDecimal getPerc2() { return perc2; }
|
||||
|
||||
public void setPerc2(BigDecimal perc2) { this.perc2 = perc2; }
|
||||
|
||||
public String getRbDateUid() { return rbDateUid; }
|
||||
|
||||
public void setRbDateUid(String rbDateUid) { this.rbDateUid = rbDateUid; }
|
||||
|
|
|
@ -94,6 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="quotLxr != null and quotLxr != ''">quotLxr,</if>
|
||||
<if test="quotLxrdh != null and quotLxrdh != ''">quotLxrdh,</if>
|
||||
<if test="totalPrice != null and totalPrice != ''">totalPrice,</if>
|
||||
<if test="perc != null and perc != ''">perc,</if>
|
||||
<if test="perc2 != null and perc2 != ''">perc2,</if>
|
||||
<if test="rbDateUid != null and rbDateUid != ''">rbDateUid,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
|
@ -108,6 +110,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="quotLxr != null and quotLxr != ''">#{quotLxr},</if>
|
||||
<if test="quotLxrdh != null and quotLxrdh != ''">#{quotLxrdh},</if>
|
||||
<if test="totalPrice != null and totalPrice != ''">#{totalPrice},</if>
|
||||
<if test="perc != null and perc != ''">#{perc},</if>
|
||||
<if test="perc2 != null and perc2 != ''">#{perc2},</if>
|
||||
<if test="rbDateUid != null and rbDateUid != ''">#{rbDateUid},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
|
@ -125,6 +129,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="quotLxr != null and quotLxr != ''">quotLxr = #{quotLxr},</if>
|
||||
<if test="quotLxrdh != null and quotLxrdh != ''">quotLxrdh = #{quotLxrdh},</if>
|
||||
<if test="totalPrice != null and totalPrice != ''">totalPrice = #{totalPrice},</if>
|
||||
<if test="perc != null and perc != ''">perc = #{perc},</if>
|
||||
<if test="perc2 != null and perc2 != ''">perc2 = #{perc2},</if>
|
||||
<if test="rbDateUid != null and rbDateUid != ''">rbDateUid = #{rbDateUid},</if>
|
||||
<if test="quotApprovalStatus != null and quotApprovalStatus != ''">quotApprovalStatus = #{quotApprovalStatus},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
|
@ -230,6 +236,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="quotLxr" column="quotLxr" />
|
||||
<result property="quotLxrdh" column="quotLxrdh" />
|
||||
<result property="totalPrice" column="totalPrice" />
|
||||
<result property="perc" column="perc" />
|
||||
<result property="perc2" column="perc2" />
|
||||
<result property="rbDateUid" column="rbDateUid" />
|
||||
<result property="quotApprovalStatus" column="quotApprovalStatus" />
|
||||
</resultMap>
|
||||
|
@ -256,7 +264,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectQuotByQuotId" parameterType="String" resultMap="QuotQuotMaterialResult">
|
||||
select a.quot_id, a.quotCode, a.quotCustomer, a.quotProject, a.quotLxr,
|
||||
a.quotLxrdh, a.totalPrice,a.rbDateUid,a.quotApprovalStatus,
|
||||
a.quotLxrdh, a.totalPrice,a.perc,a.perc2,a.rbDateUid,a.quotApprovalStatus,
|
||||
|
||||
b.uid_0,b.quot_product_id, b.name_0, b.name_1,
|
||||
b.spec, b.voltage, b.stu,
|
||||
|
|
|
@ -128,8 +128,8 @@
|
|||
<el-input v-model="form.totalPrice"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设置折扣率" label-width="100px" style="margin-bottom: 10px;">
|
||||
<el-input style="width:65px" v-model="perc" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||
<el-input style="width:65px;margin-left: 5px" v-model="perc2" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||
<el-input style="width:65px" v-model="form.perc" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||
<el-input style="width:65px;margin-left: 5px" v-model="form.perc2" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||
<!--总价:<span style="color:red;font-size: 15px">{{sumSelectedResultData}} 元</span>-->
|
||||
<el-select v-model="form.rbDateUid" style="width: 235px;margin-left: 5px" :disabled="selectedResultData.length==0">
|
||||
<el-option
|
||||
|
@ -353,11 +353,11 @@
|
|||
},
|
||||
|
||||
//折扣率 初始值
|
||||
perc: 0.8,
|
||||
perc2: '',
|
||||
/*perc: 0.8,
|
||||
perc2: '',*/
|
||||
|
||||
//表单
|
||||
form: {totalPrice: ''},
|
||||
form: {totalPrice: '',perc:0.8,perc2: ''},
|
||||
|
||||
//调价日期
|
||||
versionList: [], // 调价版本数据列表
|
||||
|
@ -366,16 +366,17 @@
|
|||
}
|
||||
},
|
||||
created() {
|
||||
this.productList();
|
||||
this.getVersionList();
|
||||
|
||||
const param = this.$route.query;
|
||||
const that = this;
|
||||
this.productList();
|
||||
this.getVersionList().then(function(){
|
||||
if (param.quotId !== undefined && param.quotId !== null) {
|
||||
that.handleRefreshClick();
|
||||
|
||||
if (param.quotId !== undefined && param.quotId !== null) {
|
||||
const row = {'quotId':param.quotId}
|
||||
this.handleQuotInfo(row);
|
||||
}
|
||||
|
||||
const row = {'quotId':param.quotId}
|
||||
that.handleQuotInfo(row);
|
||||
}
|
||||
});
|
||||
},
|
||||
mounted(){
|
||||
/*设置内容高度*/
|
||||
|
@ -391,7 +392,6 @@
|
|||
getQuotDetail(quotId).then(response => {
|
||||
this.form = response.data;
|
||||
this.selectedResultData = response.data.selectedResultData;
|
||||
console.log(this.selectedResultData)
|
||||
})
|
||||
},
|
||||
|
||||
|
@ -606,8 +606,8 @@
|
|||
const voltage = row.voltage;
|
||||
const price = row.price;
|
||||
const stu = row.stu;
|
||||
const per = this.perc;
|
||||
const per2 = this.perc2;
|
||||
const per = this.form.perc;
|
||||
const per2 = this.form.perc2;
|
||||
const count = '1';
|
||||
const setPrice = toDecimal(price * (per?per:1) * (per2?per2:1));
|
||||
const allPrice = toDecimal(count * price * (per?per:1) * (per2?per2:1));
|
||||
|
@ -703,14 +703,14 @@
|
|||
changeData() {
|
||||
// 校验折扣率格式
|
||||
const pattern = /^\d+(\.\d+)?$/;
|
||||
if(this.perc) {
|
||||
if (!pattern.test(this.perc)) {
|
||||
if(this.form.perc) {
|
||||
if (!pattern.test(this.form.perc)) {
|
||||
this.$message.warning("折扣率格式错误!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(this.perc2) {
|
||||
if (!pattern.test(this.perc2)) {
|
||||
if(this.form.perc2) {
|
||||
if (!pattern.test(this.form.perc2)) {
|
||||
this.$message.warning("折扣率格式错误!");
|
||||
return;
|
||||
}
|
||||
|
@ -721,10 +721,10 @@
|
|||
// 进行其他计算
|
||||
this.$set(this.selectedResultData, index, {
|
||||
...row,
|
||||
per: this.perc,
|
||||
per2: this.perc2,
|
||||
setPrice: toDecimal(row.price * (this.perc?this.perc:1) * (this.perc2?this.perc2:1)),
|
||||
allPrice: toDecimal(row.count * row.price * (this.perc?this.perc:1) * (this.perc2?this.perc2:1)),
|
||||
per: this.form.perc,
|
||||
per2: this.form.perc2,
|
||||
setPrice: toDecimal(row.price * (this.form.perc?this.form.perc:1) * (this.form.perc2?this.form.perc2:1)),
|
||||
allPrice: toDecimal(row.count * row.price * (this.form.perc?this.form.perc:1) * (this.form.perc2?this.form.perc2:1)),
|
||||
});
|
||||
})
|
||||
},
|
||||
|
@ -747,8 +747,8 @@
|
|||
this.form.quotLxr = '';
|
||||
this.form.quotLxrdh = '';
|
||||
|
||||
this.perc = '0.8';
|
||||
this.perc2 = '';
|
||||
this.form.perc = '0.8';
|
||||
this.form.perc2 = '';
|
||||
this.form.rbDateUid = this.versionList[0].value
|
||||
this.selectedResultData = [];
|
||||
//this.resetForm("form");
|
||||
|
@ -872,8 +872,8 @@
|
|||
},
|
||||
|
||||
//获取调价日期
|
||||
getVersionList(){
|
||||
versionList(this.queryParams).then(response => {
|
||||
async getVersionList(){
|
||||
await versionList(this.queryParams).then(response => {
|
||||
this.versionList = response.versionList;
|
||||
this.form.rbDateUid = this.versionList[0].value
|
||||
});
|
||||
|
@ -946,10 +946,8 @@
|
|||
let sl = row.count;
|
||||
if(sl){
|
||||
sl = String(sl).trim();
|
||||
if(sl){
|
||||
if (!reg.test(sl)) {
|
||||
this.errSlIndex.push(index+1);
|
||||
}
|
||||
if (!reg.test(sl)) {
|
||||
this.errSlIndex.push(index+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -957,10 +955,8 @@
|
|||
let perc = row.per;
|
||||
if(perc){
|
||||
perc = String(perc).trim();
|
||||
if(perc){
|
||||
if (!reg.test(perc)) {
|
||||
this.errPercIndex.push(index+1);
|
||||
}
|
||||
if (!reg.test(perc)) {
|
||||
this.errPercIndex.push(index+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -968,10 +964,8 @@
|
|||
let perc2 = row.per2;
|
||||
if(perc2){
|
||||
perc2 = String(perc2).trim();
|
||||
if(perc2){
|
||||
if (!reg.test(perc2)) {
|
||||
this.errPerc2Index.push(index+1);
|
||||
}
|
||||
if (!reg.test(perc2)) {
|
||||
this.errPerc2Index.push(index+1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1021,7 +1015,6 @@
|
|||
isColumn1ValuesEqual() {
|
||||
if(this.selectedResultData.length > 0){
|
||||
const uid_0 = this.selectedResultData[0].uid_0;//版本uid
|
||||
console.log(this.selectedResultData)
|
||||
return this.selectedResultData.every(row => row.uid_0 === uid_0);
|
||||
}else{
|
||||
return false;
|
||||
|
|
|
@ -89,8 +89,8 @@
|
|||
<el-input v-model="form.totalPrice"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设置折扣率" label-width="100px">
|
||||
<el-input style="width:65px" v-model="perc" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||
<el-input style="width:65px;margin-left: 5px" v-model="perc2" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||
<el-input style="width:65px" v-model="form.perc" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||
<el-input style="width:65px;margin-left: 5px" v-model="form.perc2" size="small" @blur="changeData" @keyup.enter.native="changeData"></el-input>
|
||||
<!--总价:<span style="color:red;font-size: 15px">{{sumSelectedResultData}} 元</span>-->
|
||||
<el-select v-model="form.rbDateUid" style="margin-left: 20px;width: 235px;" :disabled="selectedResultData.length==0">
|
||||
<el-option
|
||||
|
@ -206,7 +206,7 @@
|
|||
},
|
||||
|
||||
//表单
|
||||
form: {},
|
||||
form: {totalPrice: '',perc:0.8,perc2: ''},
|
||||
// 表单校验
|
||||
rules: {
|
||||
quotCustomer: [
|
||||
|
@ -229,9 +229,9 @@
|
|||
// 列表数据
|
||||
selectedResultData: [],
|
||||
|
||||
//折扣率 初始值
|
||||
/*//折扣率 初始值
|
||||
perc: 0.8,
|
||||
perc2: '',
|
||||
perc2: '',*/
|
||||
selectedResultLoading: false,
|
||||
}
|
||||
},
|
||||
|
@ -240,6 +240,19 @@
|
|||
this.getVersionList();
|
||||
},
|
||||
methods: {
|
||||
// 刷新
|
||||
handleRefreshClick() {
|
||||
this.form.quotCustomer = '';
|
||||
this.form.quotProject = '';
|
||||
this.form.quotLxr = '';
|
||||
this.form.quotLxrdh = '';
|
||||
|
||||
this.form.perc = '0.8';
|
||||
this.form.perc2 = '';
|
||||
this.form.rbDateUid = this.versionList[0].value
|
||||
this.selectedResultData = [];
|
||||
//this.resetForm("form");
|
||||
},
|
||||
/** 查询报价单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
|
@ -250,8 +263,8 @@
|
|||
});
|
||||
},
|
||||
//获取调价日期
|
||||
getVersionList(){
|
||||
versionList(this.queryParams).then(response => {
|
||||
async getVersionList(){
|
||||
await versionList(this.queryParams).then(response => {
|
||||
this.versionList = response.versionList;
|
||||
});
|
||||
},
|
||||
|
@ -272,11 +285,11 @@
|
|||
|
||||
/** 查看详情按钮操作 */
|
||||
handleDetail(row) {
|
||||
this.handleRefreshClick();
|
||||
const quotId = row.quot_id;
|
||||
getQuotDetail(quotId).then(response => {
|
||||
this.form = response.data;
|
||||
this.selectedResultData = response.data.selectedResultData;
|
||||
console.log(this.selectedResultData)
|
||||
this.open = true;
|
||||
this.title = "报价单信息";
|
||||
})
|
||||
|
@ -313,14 +326,14 @@
|
|||
changeData() {
|
||||
// 校验折扣率格式
|
||||
const pattern = /^\d+(\.\d+)?$/;
|
||||
if(this.perc) {
|
||||
if (!pattern.test(this.perc)) {
|
||||
if(this.form.perc) {
|
||||
if (!pattern.test(this.form.perc)) {
|
||||
this.$message.warning("折扣率格式错误!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if(this.perc2) {
|
||||
if (!pattern.test(this.perc2)) {
|
||||
if(this.form.perc2) {
|
||||
if (!pattern.test(this.form.perc2)) {
|
||||
this.$message.warning("折扣率格式错误!");
|
||||
return;
|
||||
}
|
||||
|
@ -331,10 +344,10 @@
|
|||
// 进行其他计算
|
||||
this.$set(this.selectedResultData, index, {
|
||||
...row,
|
||||
per: this.perc,
|
||||
per2: this.perc2,
|
||||
setPrice: toDecimal(row.price * (this.perc?this.perc:1) * (this.perc2?this.perc2:1)),
|
||||
allPrice: toDecimal(row.count * row.price * (this.perc?this.perc:1) * (this.perc2?this.perc2:1)),
|
||||
per: this.form.perc,
|
||||
per2: this.form.perc2,
|
||||
setPrice: toDecimal(row.price * (this.form.perc?this.form.perc:1) * (this.form.perc2?this.form.perc2:1)),
|
||||
allPrice: toDecimal(row.count * row.price * (this.form.perc?this.form.perc:1) * (this.form.perc2?this.form.perc2:1)),
|
||||
});
|
||||
})
|
||||
},
|
||||
|
@ -534,10 +547,8 @@
|
|||
let sl = row.count;
|
||||
if(sl){
|
||||
sl = String(sl).trim();
|
||||
if(sl){
|
||||
if (!reg.test(sl)) {
|
||||
this.errSlIndex.push(index+1);
|
||||
}
|
||||
if (!reg.test(sl)) {
|
||||
this.errSlIndex.push(index+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -545,10 +556,8 @@
|
|||
let perc = row.per;
|
||||
if(perc){
|
||||
perc = String(perc).trim();
|
||||
if(perc){
|
||||
if (!reg.test(perc)) {
|
||||
this.errPercIndex.push(index+1);
|
||||
}
|
||||
if (!reg.test(perc)) {
|
||||
this.errPercIndex.push(index+1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -556,10 +565,8 @@
|
|||
let perc2 = row.per2;
|
||||
if(perc2){
|
||||
perc2 = String(perc2).trim();
|
||||
if(perc2){
|
||||
if (!reg.test(perc2)) {
|
||||
this.errPerc2Index.push(index+1);
|
||||
}
|
||||
if (!reg.test(perc2)) {
|
||||
this.errPerc2Index.push(index+1);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue