|
@@ -153,7 +153,7 @@ import { nextTick, ref, watch } from 'vue'
|
|
import { isNumberReg } from '~uti/tools'
|
|
import { isNumberReg } from '~uti/tools'
|
|
import HcBillBaseModal from './addBillBaseModal.vue'
|
|
import HcBillBaseModal from './addBillBaseModal.vue'
|
|
import qualityRleation from './qualityRleation.vue'
|
|
import qualityRleation from './qualityRleation.vue'
|
|
-import { arrDelKey, arrToId, arrToKey, deepClone, getArrValue, getObjValue, getRandom, getUUID, isArrIndex, isNullES } from 'js-fast-way'
|
|
|
|
|
|
+import { arrDelKey, arrToId, arrToKey, deepClone, getArrValue, getObjValue, getRandom, isArrIndex, isNullES } from 'js-fast-way'
|
|
import BigNumber from 'bignumber.js'
|
|
import BigNumber from 'bignumber.js'
|
|
import { getHeader } from 'hc-vue3-ui'
|
|
import { getHeader } from 'hc-vue3-ui'
|
|
|
|
|
|
@@ -273,11 +273,11 @@ const baseFormRules = {
|
|
},
|
|
},
|
|
}
|
|
}
|
|
const isRelationData = ref(false)//是否管理质检资料
|
|
const isRelationData = ref(false)//是否管理质检资料
|
|
-const tableKey = ref(getUUID())
|
|
|
|
|
|
+const tableKey = ref(getRandom())
|
|
//监听
|
|
//监听
|
|
watch(() => baseForm.value.fileList, (list) => {
|
|
watch(() => baseForm.value.fileList, (list) => {
|
|
console.log(list, 'list')
|
|
console.log(list, 'list')
|
|
- tableKey.value = getUUID()
|
|
|
|
|
|
+ tableKey.value = getRandom()
|
|
// 验证数组中的对象是否包含名为 'selectId' 的字段
|
|
// 验证数组中的对象是否包含名为 'selectId' 的字段
|
|
const fieldName = 'selectId'
|
|
const fieldName = 'selectId'
|
|
|
|
|
|
@@ -320,7 +320,7 @@ const getDataDetail = async () => {
|
|
addTableData.value = getArrValue(res.formList)
|
|
addTableData.value = getArrValue(res.formList)
|
|
selectId.value = arrToKey(res.fileList, 'selectId', ',')
|
|
selectId.value = arrToKey(res.fileList, 'selectId', ',')
|
|
addTableData.value.forEach((ele)=>{
|
|
addTableData.value.forEach((ele)=>{
|
|
- ele.oldupPayRatio = ele.upPayRatio
|
|
|
|
|
|
+ ele.oldupPayRatio = ele.upPayRatio
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -368,7 +368,7 @@ const getNodeDivide = async (nodeId) => {
|
|
const getCurrentNodeAllFormData = async (nodeId) => {
|
|
const getCurrentNodeAllFormData = async (nodeId) => {
|
|
const { data } = await mainApi.getCurrentNodeAllForm({ contractId: cid.value, contractPeriodId:baseForm.value.contractPeriodId, contractUnitId:nodeId })
|
|
const { data } = await mainApi.getCurrentNodeAllForm({ contractId: cid.value, contractPeriodId:baseForm.value.contractPeriodId, contractUnitId:nodeId })
|
|
addTableData.value = getArrValue(data)
|
|
addTableData.value = getArrValue(data)
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
//获取变更令
|
|
//获取变更令
|
|
@@ -519,7 +519,7 @@ const compareRowUnpayRatio = (row, type)=>{
|
|
let result = BigNumber(payRatio).plus(otherPayRatio)//本期支付比例+其他期支付比例
|
|
let result = BigNumber(payRatio).plus(otherPayRatio)//本期支付比例+其他期支付比例
|
|
const isComparedRa = result.comparedTo(upPayRatio)
|
|
const isComparedRa = result.comparedTo(upPayRatio)
|
|
isComparedRaVal.value = isComparedRa
|
|
isComparedRaVal.value = isComparedRa
|
|
-
|
|
|
|
|
|
+
|
|
if (isComparedRa === 1 ) {
|
|
if (isComparedRa === 1 ) {
|
|
isCanSave.value = true
|
|
isCanSave.value = true
|
|
if (type === 1) {
|
|
if (type === 1) {
|
|
@@ -527,10 +527,10 @@ const compareRowUnpayRatio = (row, type)=>{
|
|
} else if (type === 2) {
|
|
} else if (type === 2) {
|
|
return isComparedRa
|
|
return isComparedRa
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
isCanSave.value = false
|
|
isCanSave.value = false
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const unPayRatioBlur = (row)=>{
|
|
const unPayRatioBlur = (row)=>{
|
|
@@ -545,7 +545,7 @@ const unPayRatioBlur = (row)=>{
|
|
// 就去对比:本期支付比例+其他期支付比例
|
|
// 就去对比:本期支付比例+其他期支付比例
|
|
// 是否大于最大支付比例
|
|
// 是否大于最大支付比例
|
|
compareRowUnpayRatio(row, 1)
|
|
compareRowUnpayRatio(row, 1)
|
|
-
|
|
|
|
|
|
+
|
|
//计算总计量金额
|
|
//计算总计量金额
|
|
let meterMoney = 0, table = addTableData.value
|
|
let meterMoney = 0, table = addTableData.value
|
|
for (let i = 0; i < table.length; i++) {
|
|
for (let i = 0; i < table.length; i++) {
|
|
@@ -553,9 +553,9 @@ const unPayRatioBlur = (row)=>{
|
|
}
|
|
}
|
|
baseForm.value.meterMoney = meterMoney
|
|
baseForm.value.meterMoney = meterMoney
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
//判断是否红色
|
|
//判断是否红色
|
|
const isCanSave = ref(false)
|
|
const isCanSave = ref(false)
|
|
@@ -567,13 +567,13 @@ const addTableRowStyle = ({ row }) => {
|
|
const isComparedRa = compareRowUnpayRatio(row, 2)
|
|
const isComparedRa = compareRowUnpayRatio(row, 2)
|
|
if (isComparedRa === 1 ) {
|
|
if (isComparedRa === 1 ) {
|
|
isCanSave.value = true
|
|
isCanSave.value = true
|
|
-
|
|
|
|
|
|
+
|
|
return '--el-table-tr-bg-color: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'
|
|
return '--el-table-tr-bg-color: #fe0000; --el-table-row-hover-bg-color: #fe0000; color: white;'
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
isCanSave.value = false
|
|
isCanSave.value = false
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
// 判断施工图数量是否大于合同数据
|
|
// 判断施工图数量是否大于合同数据
|
|
// 大于:如果超计= 1并且 划分=1
|
|
// 大于:如果超计= 1并且 划分=1
|
|
@@ -640,7 +640,7 @@ const addBillBaseModalClick = () => {
|
|
} else {
|
|
} else {
|
|
window.$message.warning('请选择最底层节点')
|
|
window.$message.warning('请选择最底层节点')
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
addBillBaseModalShow.value = true
|
|
addBillBaseModalShow.value = true
|
|
billBaseIds.value = arrToId(addTableData.value)
|
|
billBaseIds.value = arrToId(addTableData.value)
|
|
}
|
|
}
|
|
@@ -764,7 +764,7 @@ const associateQual = ()=>{
|
|
} else {
|
|
} else {
|
|
window.$message.warning('请选择最底层节点')
|
|
window.$message.warning('请选择最底层节点')
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
const closeQual = ()=>{
|
|
const closeQual = ()=>{
|
|
qualityMoadal.value = false
|
|
qualityMoadal.value = false
|
|
@@ -781,9 +781,9 @@ const finishModal = (rows, cancelcheck)=>{
|
|
}
|
|
}
|
|
fileList.push({
|
|
fileList.push({
|
|
fileName:ele.dataName,
|
|
fileName:ele.dataName,
|
|
- filePdfUrl:ele.evisaPdfUrl ? ele.evisaPdfUrl : ele.pdfUrl,
|
|
|
|
|
|
+ filePdfUrl:ele.evisaPdfUrl ? ele.evisaPdfUrl : ele.pdfUrl,
|
|
fileType:1,
|
|
fileType:1,
|
|
- fileUrl:ele.evisaPdfUrl ? ele.evisaPdfUrl : ele.pdfUrl,
|
|
|
|
|
|
+ fileUrl:ele.evisaPdfUrl ? ele.evisaPdfUrl : ele.pdfUrl,
|
|
selectId:ele.selectId,
|
|
selectId:ele.selectId,
|
|
})
|
|
})
|
|
}
|
|
}
|