'123'
This commit is contained in:
parent
22a44adc04
commit
4f1c94e861
|
@ -1,5 +1,5 @@
|
||||||
#for tests only !
|
#for tests only !
|
||||||
#Mon May 20 09:55:44 CST 2024
|
#Mon May 20 13:09:39 CST 2024
|
||||||
jco.destination.pool_capacity=10
|
jco.destination.pool_capacity=10
|
||||||
jco.client.lang=ZH
|
jco.client.lang=ZH
|
||||||
jco.client.ashost=172.19.0.120
|
jco.client.ashost=172.19.0.120
|
||||||
|
@ -7,5 +7,5 @@ jco.client.saprouter=
|
||||||
jco.client.user=RFC
|
jco.client.user=RFC
|
||||||
jco.client.sysnr=00
|
jco.client.sysnr=00
|
||||||
jco.destination.peak_limit=10
|
jco.destination.peak_limit=10
|
||||||
jco.client.passwd=g`M`]ixGphtxcJ7cLz3bg5/RJZR#xvA_i#ndU1#hGjtXf7rR
|
jco.client.passwd=dZ:kRfA{dgU`sub#+3T]H6aOCHVj9d94]yQ__F^^y$n+#PX/
|
||||||
jco.client.client=300
|
jco.client.client=300
|
||||||
|
|
|
@ -21,23 +21,18 @@ public class QuotHj extends BaseEntity
|
||||||
private String quotHjId;
|
private String quotHjId;
|
||||||
|
|
||||||
/** 核价单号 */
|
/** 核价单号 */
|
||||||
@Excel(name = "核价单号")
|
|
||||||
private String quotHjCode;
|
private String quotHjCode;
|
||||||
|
|
||||||
/** 核价类型 */
|
/** 核价类型 */
|
||||||
@Excel(name = "核价类型")
|
|
||||||
private String quotHjPricingType;
|
private String quotHjPricingType;
|
||||||
|
|
||||||
/** 核价日期 */
|
/** 核价日期 */
|
||||||
@Excel(name = "核价日期",dateFormat = "yyyy-MM-dd hh:MM:ss")
|
|
||||||
private Date quotHjPricingDate;
|
private Date quotHjPricingDate;
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
@Excel(name = "备注")
|
|
||||||
private String quotHjRemark;
|
private String quotHjRemark;
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
@Excel(name = "核价协助状态")
|
|
||||||
private String quotHjApprovalStatus;
|
private String quotHjApprovalStatus;
|
||||||
|
|
||||||
/** 创建人 */
|
/** 创建人 */
|
||||||
|
|
|
@ -61,6 +61,10 @@ public class Quot extends BaseEntity
|
||||||
@Excel(name = "报价日期",dateFormat = "yyyy-MM-dd hh:MM:ss")
|
@Excel(name = "报价日期",dateFormat = "yyyy-MM-dd hh:MM:ss")
|
||||||
private Date quotQuotationDate;
|
private Date quotQuotationDate;
|
||||||
|
|
||||||
|
/** 数量 */
|
||||||
|
@Excel(name = "数量")
|
||||||
|
private String quotQuantity;
|
||||||
|
|
||||||
/** 报价来源 */
|
/** 报价来源 */
|
||||||
private String quotQuotationFrom;
|
private String quotQuotationFrom;
|
||||||
|
|
||||||
|
@ -72,12 +76,7 @@ public class Quot extends BaseEntity
|
||||||
@Excel(name = "反馈说明")
|
@Excel(name = "反馈说明")
|
||||||
private String quotFeedbackExplanation;
|
private String quotFeedbackExplanation;
|
||||||
|
|
||||||
/** 数量 */
|
|
||||||
@Excel(name = "数量")
|
|
||||||
private String quotQuantity;
|
|
||||||
|
|
||||||
/** 总价 */
|
/** 总价 */
|
||||||
@Excel(name = "总价")
|
|
||||||
private String quotTotalPrice;
|
private String quotTotalPrice;
|
||||||
|
|
||||||
/** 审核人账号 */
|
/** 审核人账号 */
|
||||||
|
@ -92,7 +91,6 @@ public class Quot extends BaseEntity
|
||||||
private String quotApprovalStatus;
|
private String quotApprovalStatus;
|
||||||
|
|
||||||
/** 创建人 */
|
/** 创建人 */
|
||||||
@Excel(name = "创建人")
|
|
||||||
private String createName;
|
private String createName;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 报价单-产品对象 quot_material
|
* 报价单-产品对象 quot_material
|
||||||
*
|
*
|
||||||
|
@ -31,7 +33,7 @@ public class QuotMaterial extends BaseEntity
|
||||||
private String matDanw;
|
private String matDanw;
|
||||||
|
|
||||||
/** 数量 */
|
/** 数量 */
|
||||||
private Long matSl;
|
private BigDecimal matSl;
|
||||||
|
|
||||||
/** */
|
/** */
|
||||||
private String quotId;
|
private String quotId;
|
||||||
|
@ -81,12 +83,12 @@ public class QuotMaterial extends BaseEntity
|
||||||
{
|
{
|
||||||
return matDanw;
|
return matDanw;
|
||||||
}
|
}
|
||||||
public void setMatSl(Long matSl)
|
public void setMatSl(BigDecimal matSl)
|
||||||
{
|
{
|
||||||
this.matSl = matSl;
|
this.matSl = matSl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getMatSl()
|
public BigDecimal getMatSl()
|
||||||
{
|
{
|
||||||
return matSl;
|
return matSl;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,11 +19,9 @@ public class QuotJsqr extends BaseEntity
|
||||||
private String quotJsqrId;
|
private String quotJsqrId;
|
||||||
|
|
||||||
/** 技术确认单编号 */
|
/** 技术确认单编号 */
|
||||||
@Excel(name = "技术确认单编号")
|
|
||||||
private String quotJsqrCode;
|
private String quotJsqrCode;
|
||||||
|
|
||||||
/** 特缆协助状态 */
|
/** 特缆协助状态 */
|
||||||
@Excel(name = "特缆协助状态")
|
|
||||||
private String quotJsqrTlApprovalStatus;
|
private String quotJsqrTlApprovalStatus;
|
||||||
|
|
||||||
/** 特缆操作人 */
|
/** 特缆操作人 */
|
||||||
|
@ -63,7 +61,6 @@ public class QuotJsqr extends BaseEntity
|
||||||
private String quotJsqrTlLeaderRemark;
|
private String quotJsqrTlLeaderRemark;
|
||||||
|
|
||||||
/** 低压协助状态 */
|
/** 低压协助状态 */
|
||||||
@Excel(name = "低压协助状态")
|
|
||||||
private String quotJsqrDyApprovalStatus;
|
private String quotJsqrDyApprovalStatus;
|
||||||
|
|
||||||
/** 低压操作人 */
|
/** 低压操作人 */
|
||||||
|
@ -103,7 +100,6 @@ public class QuotJsqr extends BaseEntity
|
||||||
private String quotJsqrDyLeaderRemark;
|
private String quotJsqrDyLeaderRemark;
|
||||||
|
|
||||||
/** 中压协助状态 */
|
/** 中压协助状态 */
|
||||||
@Excel(name = "中压协助状态")
|
|
||||||
private String quotJsqrZyApprovalStatus;
|
private String quotJsqrZyApprovalStatus;
|
||||||
|
|
||||||
/** 中压操作人 */
|
/** 中压操作人 */
|
||||||
|
@ -143,7 +139,6 @@ public class QuotJsqr extends BaseEntity
|
||||||
private String quotJsqrZyLeaderRemark;
|
private String quotJsqrZyLeaderRemark;
|
||||||
|
|
||||||
/** 其他协助状态 */
|
/** 其他协助状态 */
|
||||||
@Excel(name = "其他协助状态")
|
|
||||||
private String quotJsqrQtApprovalStatus;
|
private String quotJsqrQtApprovalStatus;
|
||||||
|
|
||||||
/** 其他操作人 */
|
/** 其他操作人 */
|
||||||
|
|
|
@ -285,7 +285,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<insert id="batchQuotMaterial">
|
<insert id="batchQuotMaterial">
|
||||||
insert into quot_material( mat_id, mat_xingh, mat_guig, mat_diany, mat_danw, mat_sl, quot_id) values
|
insert into quot_material( mat_id, mat_xingh, mat_guig, mat_diany, mat_danw, mat_sl, quot_id) values
|
||||||
<foreach item="item" index="index" collection="list" separator=",">
|
<foreach item="item" index="index" collection="list" separator=",">
|
||||||
( #{item.matId}, #{item.matXingh}, #{item.matGuig}, #{item.matDiany}, #{item.matDanw}, #{item.matSl}, #{item.quotId})
|
( #{item.matId}, #{item.matXingh}, #{item.matGuig}, #{item.matDiany}, #{item.matDanw}, cast(#{item.matSl,jdbcType=DECIMAL} as decimal(18,3)), #{item.quotId})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
/** 加法 */
|
||||||
|
export function NumberAdd(arg1, arg2) {
|
||||||
|
let r1, r2, m, n;
|
||||||
|
try {
|
||||||
|
r1 = arg1.toString().split(".")[1].length
|
||||||
|
} catch (e) {
|
||||||
|
r1 = 0
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
r2 = arg2.toString().split(".")[1].length
|
||||||
|
} catch (e) {
|
||||||
|
r2 = 0
|
||||||
|
}
|
||||||
|
m = Math.pow(10, Math.max(r1, r2))
|
||||||
|
n = (r1 >= r2) ? r1 : r2
|
||||||
|
return ((arg1 * m + arg2 * m) / m).toFixed(n)
|
||||||
|
}
|
||||||
|
/** 减法 */
|
||||||
|
export function NumberSub(arg1, arg2) {
|
||||||
|
let re1, re2, m, n;
|
||||||
|
try {
|
||||||
|
re1 = arg1.toString().split(".")[1].length
|
||||||
|
} catch (e) {
|
||||||
|
re1 = 0;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
re2 = arg2.toString().split(".")[1].length
|
||||||
|
} catch (e) {
|
||||||
|
re2 = 0
|
||||||
|
}
|
||||||
|
m = Math.pow(10, Math.max(re1, re2));
|
||||||
|
n = (re1 >= re2) ? re1 : re2;
|
||||||
|
return ((arg1 * m - arg2 * m) / m).toFixed(n)
|
||||||
|
}
|
||||||
|
/** 乘法 */
|
||||||
|
export function NumberMul(arg1, arg2) {
|
||||||
|
let m = 0;
|
||||||
|
const s1 = arg1.toString();
|
||||||
|
const s2 = arg2.toString();
|
||||||
|
try {
|
||||||
|
m += s1.split('.')[1].length
|
||||||
|
} catch (e) {}
|
||||||
|
try {
|
||||||
|
m += s2.split('.')[1].length
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
|
return Number(s1.replace('.', '')) * Number(s2.replace('.', '')) / Math.pow(10, m)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 除法 */
|
||||||
|
export function NumberDiv(arg1,arg2,digit){
|
||||||
|
let t1 = 0, t2 = 0, r1, r2;
|
||||||
|
try{t1=arg1.toString().split(".")[1].length}catch(e){}
|
||||||
|
try{t2=arg2.toString().split(".")[1].length}catch(e){}
|
||||||
|
r1=Number(arg1.toString().replace(".",""))
|
||||||
|
r2=Number(arg2.toString().replace(".",""))
|
||||||
|
//获取小数点后的计算值
|
||||||
|
var result= ((r1/r2)*Math.pow(10,t2-t1)).toString()
|
||||||
|
var result2=result.split(".")[1]
|
||||||
|
result2=result2.substring(0,digit>result2.length?result2.length:digit)
|
||||||
|
return Number(result.split(".")[0]+"."+result2)
|
||||||
|
}
|
||||||
|
|
|
@ -114,6 +114,7 @@
|
||||||
<span>{{ parseTime(scope.row.quotQuotationDate) }}</span>
|
<span>{{ parseTime(scope.row.quotQuotationDate) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="数量" align="center" prop="quotQuantity" width="100"/>
|
||||||
<el-table-column label="反馈说明" align="center" prop="quotFeedbackExplanation" width="150px"/>
|
<el-table-column label="反馈说明" align="center" prop="quotFeedbackExplanation" width="150px"/>
|
||||||
<el-table-column label="技术协助状态" align="center" prop="quotJsxzApprovalStatus" width="150px">
|
<el-table-column label="技术协助状态" align="center" prop="quotJsxzApprovalStatus" width="150px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -245,8 +246,8 @@
|
||||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null">删除</el-button>
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteQuotMaterial" v-if="this.form.quotApprovalStatus == '0' || this.form.quotApprovalStatus == null">删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :data="quotMaterialList" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial" height="300px">
|
<el-table :data="quotMaterialList" show-summary :summary-method="getSummaries" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial">
|
||||||
<el-table-column type="selection" width="50" align="center" />
|
<el-table-column type="selection" width="80" align="center" />
|
||||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||||
<el-table-column label="型号" prop="matXingh">
|
<el-table-column label="型号" prop="matXingh">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
@ -720,6 +721,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
import { NumberAdd } from '@/utils/number';// 数值计算
|
||||||
import { listQuot, getQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, feedbackQuot, rejectQuot } from "@/api/quot/quot";
|
import { listQuot, getQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, feedbackQuot, rejectQuot } from "@/api/quot/quot";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
import { checkPermi } from '@/utils/permission';// 权限判断函数
|
import { checkPermi } from '@/utils/permission';// 权限判断函数
|
||||||
|
@ -1116,6 +1118,36 @@ export default {
|
||||||
}, `quot_${new Date().getTime()}.xlsx`)
|
}, `quot_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 对列进行合算
|
||||||
|
getSummaries(param) {
|
||||||
|
const { columns, data } = param;
|
||||||
|
const sums = [];
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
sums[index] = '合计';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const values = data.map(item => Number(item[column.property]));
|
||||||
|
// 只对amount这一列进行总计核算。
|
||||||
|
if (column.property === 'matSl') {
|
||||||
|
if (!values.every(value => isNaN(value))) {
|
||||||
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr);
|
||||||
|
if (!isNaN(value)) {
|
||||||
|
return NumberAdd(prev,curr);
|
||||||
|
}else {
|
||||||
|
return prev;
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
} else {
|
||||||
|
sums[index] = '---'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.form.quotQuantity = sums[6];
|
||||||
|
return sums;
|
||||||
|
},
|
||||||
|
|
||||||
/*********************************附件上传*****************************************/
|
/*********************************附件上传*****************************************/
|
||||||
//获取报价单-询价附件列表
|
//获取报价单-询价附件列表
|
||||||
getQuotXjFileList(){
|
getQuotXjFileList(){
|
||||||
|
|
|
@ -668,7 +668,7 @@
|
||||||
// 报价单保存修改
|
// 报价单保存修改
|
||||||
handleSaveClick() {
|
handleSaveClick() {
|
||||||
const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0);
|
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;
|
this.form.selectedResultData = this.selectedResultData;
|
||||||
saveQuot(this.form).then(response => {
|
saveQuot(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("保存报价单成功,单号:"+response.data.quotCode);
|
this.$modal.msgSuccess("保存报价单成功,单号:"+response.data.quotCode);
|
||||||
|
@ -780,7 +780,7 @@
|
||||||
// 已选择结果数据汇总
|
// 已选择结果数据汇总
|
||||||
sumSelectedResultData() {
|
sumSelectedResultData() {
|
||||||
const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0);
|
const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0);
|
||||||
return allPrice.toFixed(2);
|
return toDecimal(allPrice);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue