|
@@ -92,7 +92,7 @@
|
|
<div style="height: 400px;">
|
|
<div style="height: 400px;">
|
|
<hc-table :column="tableColumn" :datas="tableData" is-new :index-style="{ width: 60 }" :row-style="tableRowStyle" :is-stripe="false">
|
|
<hc-table :column="tableColumn" :datas="tableData" is-new :index-style="{ width: 60 }" :row-style="tableRowStyle" :is-stripe="false">
|
|
<template #poseNum="{ row }">
|
|
<template #poseNum="{ row }">
|
|
- <hc-table-input v-model="row.poseNum" />
|
|
|
|
|
|
+ <hc-table-input v-model="row.poseNum" @change="changePoseNum(row)" />
|
|
</template>
|
|
</template>
|
|
<template #action="{ row, index }">
|
|
<template #action="{ row, index }">
|
|
<el-link type="danger" @click="delRow(row, index)">删除</el-link>
|
|
<el-link type="danger" @click="delRow(row, index)">删除</el-link>
|
|
@@ -146,9 +146,19 @@ const tableData = ref([])
|
|
//设置某一行的样式
|
|
//设置某一行的样式
|
|
const tableRowStyle = ({ row, rowIndex }) => {
|
|
const tableRowStyle = ({ row, rowIndex }) => {
|
|
if (row.poseNum > row.contractTotal) {
|
|
if (row.poseNum > row.contractTotal) {
|
|
|
|
+ isCanSave.value = true
|
|
return '--el-table-tr-bg-color: #fe0000;color:white '
|
|
return '--el-table-tr-bg-color: #fe0000;color:white '
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+const isCanSave = ref(false)
|
|
|
|
+const changePoseNum = (row)=>{
|
|
|
|
+ row.residueNum = row.changeTotal - row.poseNum
|
|
|
|
+ if (row.poseNum > row.contractTotal) {
|
|
|
|
+ isCanSave.value = true
|
|
|
|
+ } else {
|
|
|
|
+ isCanSave.value = false
|
|
|
|
+ }
|
|
|
|
+}
|
|
//获节点类型
|
|
//获节点类型
|
|
const nodeOptions = ref([])
|
|
const nodeOptions = ref([])
|
|
const getNodeType = async (id) => {
|
|
const getNodeType = async (id) => {
|
|
@@ -218,7 +228,13 @@ const tableColumn = ref([
|
|
// { key1: '101-1-a' },
|
|
// { key1: '101-1-a' },
|
|
// ])
|
|
// ])
|
|
const addNodeLoading = ref(false)
|
|
const addNodeLoading = ref(false)
|
|
|
|
+
|
|
const modalSave = async () => {
|
|
const modalSave = async () => {
|
|
|
|
+ console.log(isCanSave.value, 'const isCanSave = ref(false)')
|
|
|
|
+ if (isCanSave.value) {
|
|
|
|
+ window.$message.warning('累计分解量 > 合同变更后量,不允许修改')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
addNodeLoading.value = true
|
|
addNodeLoading.value = true
|
|
const { error, code, msg } = await unitApi.updateForm({
|
|
const { error, code, msg } = await unitApi.updateForm({
|
|
...formModel.value,
|
|
...formModel.value,
|