'123'
This commit is contained in:
parent
22a44adc04
commit
4f1c94e861
|
@ -1,5 +1,5 @@
|
|||
#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.client.lang=ZH
|
||||
jco.client.ashost=172.19.0.120
|
||||
|
@ -7,5 +7,5 @@ jco.client.saprouter=
|
|||
jco.client.user=RFC
|
||||
jco.client.sysnr=00
|
||||
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
|
||||
|
|
|
@ -21,23 +21,18 @@ public class QuotHj extends BaseEntity
|
|||
private String quotHjId;
|
||||
|
||||
/** 核价单号 */
|
||||
@Excel(name = "核价单号")
|
||||
private String quotHjCode;
|
||||
|
||||
/** 核价类型 */
|
||||
@Excel(name = "核价类型")
|
||||
private String quotHjPricingType;
|
||||
|
||||
/** 核价日期 */
|
||||
@Excel(name = "核价日期",dateFormat = "yyyy-MM-dd hh:MM:ss")
|
||||
private Date quotHjPricingDate;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
private String quotHjRemark;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "核价协助状态")
|
||||
private String quotHjApprovalStatus;
|
||||
|
||||
/** 创建人 */
|
||||
|
|
|
@ -61,6 +61,10 @@ public class Quot extends BaseEntity
|
|||
@Excel(name = "报价日期",dateFormat = "yyyy-MM-dd hh:MM:ss")
|
||||
private Date quotQuotationDate;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private String quotQuantity;
|
||||
|
||||
/** 报价来源 */
|
||||
private String quotQuotationFrom;
|
||||
|
||||
|
@ -72,12 +76,7 @@ public class Quot extends BaseEntity
|
|||
@Excel(name = "反馈说明")
|
||||
private String quotFeedbackExplanation;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private String quotQuantity;
|
||||
|
||||
/** 总价 */
|
||||
@Excel(name = "总价")
|
||||
private String quotTotalPrice;
|
||||
|
||||
/** 审核人账号 */
|
||||
|
@ -92,7 +91,6 @@ public class Quot extends BaseEntity
|
|||
private String quotApprovalStatus;
|
||||
|
||||
/** 创建人 */
|
||||
@Excel(name = "创建人")
|
||||
private String createName;
|
||||
|
||||
|
||||
|
|
|
@ -5,9 +5,11 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 报价单-产品对象 quot_material
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-04-01
|
||||
*/
|
||||
|
@ -31,71 +33,71 @@ public class QuotMaterial extends BaseEntity
|
|||
private String matDanw;
|
||||
|
||||
/** 数量 */
|
||||
private Long matSl;
|
||||
private BigDecimal matSl;
|
||||
|
||||
/** */
|
||||
private String quotId;
|
||||
|
||||
public void setMatId(String matId)
|
||||
public void setMatId(String matId)
|
||||
{
|
||||
this.matId = matId;
|
||||
}
|
||||
|
||||
public String getMatId()
|
||||
public String getMatId()
|
||||
{
|
||||
return matId;
|
||||
}
|
||||
public void setMatXingh(String matXingh)
|
||||
public void setMatXingh(String matXingh)
|
||||
{
|
||||
this.matXingh = matXingh;
|
||||
}
|
||||
|
||||
public String getMatXingh()
|
||||
public String getMatXingh()
|
||||
{
|
||||
return matXingh;
|
||||
}
|
||||
public void setMatGuig(String matGuig)
|
||||
public void setMatGuig(String matGuig)
|
||||
{
|
||||
this.matGuig = matGuig;
|
||||
}
|
||||
|
||||
public String getMatGuig()
|
||||
public String getMatGuig()
|
||||
{
|
||||
return matGuig;
|
||||
}
|
||||
public void setMatDiany(String matDiany)
|
||||
public void setMatDiany(String matDiany)
|
||||
{
|
||||
this.matDiany = matDiany;
|
||||
}
|
||||
|
||||
public String getMatDiany()
|
||||
public String getMatDiany()
|
||||
{
|
||||
return matDiany;
|
||||
}
|
||||
public void setMatDanw(String matDanw)
|
||||
public void setMatDanw(String matDanw)
|
||||
{
|
||||
this.matDanw = matDanw;
|
||||
}
|
||||
|
||||
public String getMatDanw()
|
||||
public String getMatDanw()
|
||||
{
|
||||
return matDanw;
|
||||
}
|
||||
public void setMatSl(Long matSl)
|
||||
public void setMatSl(BigDecimal matSl)
|
||||
{
|
||||
this.matSl = matSl;
|
||||
}
|
||||
|
||||
public Long getMatSl()
|
||||
public BigDecimal getMatSl()
|
||||
{
|
||||
return matSl;
|
||||
}
|
||||
public void setQuotId(String quotId)
|
||||
public void setQuotId(String quotId)
|
||||
{
|
||||
this.quotId = quotId;
|
||||
}
|
||||
|
||||
public String getQuotId()
|
||||
public String getQuotId()
|
||||
{
|
||||
return quotId;
|
||||
}
|
||||
|
|
|
@ -19,11 +19,9 @@ public class QuotJsqr extends BaseEntity
|
|||
private String quotJsqrId;
|
||||
|
||||
/** 技术确认单编号 */
|
||||
@Excel(name = "技术确认单编号")
|
||||
private String quotJsqrCode;
|
||||
|
||||
/** 特缆协助状态 */
|
||||
@Excel(name = "特缆协助状态")
|
||||
private String quotJsqrTlApprovalStatus;
|
||||
|
||||
/** 特缆操作人 */
|
||||
|
@ -63,7 +61,6 @@ public class QuotJsqr extends BaseEntity
|
|||
private String quotJsqrTlLeaderRemark;
|
||||
|
||||
/** 低压协助状态 */
|
||||
@Excel(name = "低压协助状态")
|
||||
private String quotJsqrDyApprovalStatus;
|
||||
|
||||
/** 低压操作人 */
|
||||
|
@ -103,7 +100,6 @@ public class QuotJsqr extends BaseEntity
|
|||
private String quotJsqrDyLeaderRemark;
|
||||
|
||||
/** 中压协助状态 */
|
||||
@Excel(name = "中压协助状态")
|
||||
private String quotJsqrZyApprovalStatus;
|
||||
|
||||
/** 中压操作人 */
|
||||
|
@ -143,7 +139,6 @@ public class QuotJsqr extends BaseEntity
|
|||
private String quotJsqrZyLeaderRemark;
|
||||
|
||||
/** 其他协助状态 */
|
||||
@Excel(name = "其他协助状态")
|
||||
private String quotJsqrQtApprovalStatus;
|
||||
|
||||
/** 其他操作人 */
|
||||
|
|
|
@ -285,7 +285,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<insert id="batchQuotMaterial">
|
||||
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=",">
|
||||
( #{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>
|
||||
</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>
|
||||
</template>
|
||||
</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="quotJsxzApprovalStatus" width="150px">
|
||||
<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-col>
|
||||
</el-row>
|
||||
<el-table :data="quotMaterialList" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial" height="300px">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table :data="quotMaterialList" show-summary :summary-method="getSummaries" :row-class-name="rowQuotMaterialIndex" @selection-change="handleQuotMaterialSelectionChange" ref="quotMaterial">
|
||||
<el-table-column type="selection" width="80" align="center" />
|
||||
<el-table-column label="序号" align="center" prop="index" width="50"/>
|
||||
<el-table-column label="型号" prop="matXingh">
|
||||
<template slot-scope="scope">
|
||||
|
@ -720,6 +721,7 @@
|
|||
}
|
||||
</style>
|
||||
<script>
|
||||
import { NumberAdd } from '@/utils/number';// 数值计算
|
||||
import { listQuot, getQuot, delQuot, addQuot, updateQuot, quotFileList, quotFileDelete, commitQuot, commitJsQuot, commitHjQuot, feedbackQuot, rejectQuot } from "@/api/quot/quot";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { checkPermi } from '@/utils/permission';// 权限判断函数
|
||||
|
@ -1116,7 +1118,37 @@ export default {
|
|||
}, `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(){
|
||||
const param = {relationId:this.form.quotId,fileType:'quotXjFile'}
|
||||
|
|
|
@ -668,7 +668,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("保存报价单成功,单号:"+response.data.quotCode);
|
||||
|
@ -780,7 +780,7 @@
|
|||
// 已选择结果数据汇总
|
||||
sumSelectedResultData() {
|
||||
const allPrice = this.selectedResultData.reduce((sum, row) => sum + parseFloat(row.allPrice), 0);
|
||||
return allPrice.toFixed(2);
|
||||
return toDecimal(allPrice);
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue