|
@@ -9,8 +9,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, watch } from 'vue'
|
|
|
-import { arrToId, getArrValue } from 'js-fast-way'
|
|
|
+import {ref, watch} from 'vue'
|
|
|
+import {arrToId, getArrValue} from 'js-fast-way'
|
|
|
import middlepayApi from '~api/debit-pay/admin/middlepay'
|
|
|
import mainApi from '~api/tasks/hc-data'
|
|
|
|
|
@@ -61,7 +61,7 @@ watch(() => [
|
|
|
tableIds.value = ids
|
|
|
projectId.value = pid
|
|
|
contractId.value = cid
|
|
|
-}, { immediate: true, deep: true })
|
|
|
+}, {immediate: true, deep: true})
|
|
|
|
|
|
//监听数据
|
|
|
watch(() => [
|
|
@@ -70,7 +70,7 @@ watch(() => [
|
|
|
], ([table, row]) => {
|
|
|
tableInfo.value = table
|
|
|
taskInfo.value = row
|
|
|
-}, { deep: true })
|
|
|
+}, {deep: true})
|
|
|
|
|
|
//监听
|
|
|
watch(isShow, (val) => {
|
|
@@ -82,24 +82,25 @@ watch(isShow, (val) => {
|
|
|
//表格数据
|
|
|
const tableLoading = ref(false)
|
|
|
const tableColumn = [
|
|
|
- { key: 'formNumber', name: '清单编号' },
|
|
|
- { key: 'formName', name: '清单名称' },
|
|
|
- { key: 'currentPrice', name: '单价(元)' },
|
|
|
- { key: 'contractTotal', name: '合同数量' },
|
|
|
- { key: 'changeTotal', name: '合同变更后数量' },
|
|
|
- { key: 'buildChangeTotal', name: '施工图变更后数量' },
|
|
|
- { key: 'resolveResidueTotal', name: '分解剩余量' },
|
|
|
+ {key: 'formNumber', name: '清单编号'},
|
|
|
+ {key: 'formName', name: '清单名称'},
|
|
|
+ {key: 'currentPrice', name: '单价(元)'},
|
|
|
+ {key: 'contractTotal', name: '合同数量'},
|
|
|
+ {key: 'changeTotal', name: '合同变更后数量'},
|
|
|
+ {key: 'buildChangeTotal', name: '施工图变更后数量'},
|
|
|
+ {key: 'resolveResidueTotal', name: '分解剩余量'},
|
|
|
]
|
|
|
const tableData = ref([])
|
|
|
const getTableData = async () => {
|
|
|
tableData.value = []
|
|
|
tableLoading.value = true
|
|
|
- const { contractPeriodId, contractUnitId } = tableInfo.value
|
|
|
- const { data } = await middlepayApi.addFormList({
|
|
|
+ const {contractPeriodId, taskId, contractUnitId} = tableInfo.value
|
|
|
+ const {data} = await middlepayApi.addFormList({
|
|
|
contractPeriodId: contractPeriodId,
|
|
|
contractId: contractId.value,
|
|
|
ids: tableIds.value,
|
|
|
nodeId: contractUnitId,
|
|
|
+ taskId: taskId ?? '',
|
|
|
})
|
|
|
tableData.value = getArrValue(data)
|
|
|
tableLoading.value = false
|
|
@@ -119,8 +120,8 @@ const modalSave = async () => {
|
|
|
return false
|
|
|
}
|
|
|
const rowIds = arrToId(rows)
|
|
|
- const { contractPeriodId, contractUnitId, id } = tableInfo.value
|
|
|
- const { data } = await mainApi.tableFormApplyTaskSave({
|
|
|
+ const {contractPeriodId, contractUnitId, id} = tableInfo.value
|
|
|
+ const {data} = await mainApi.tableFormApplyTaskSave({
|
|
|
contractPeriodId: contractPeriodId,
|
|
|
projectId: projectId.value,
|
|
|
contractId: contractId.value,
|