|
@@ -8,17 +8,15 @@
|
|
|
<hc-info-table-td>
|
|
|
<el-form-item prop="key1">
|
|
|
<el-select v-model="formModel.key1" placeholder="选择计量期" filterable block>
|
|
|
- <el-option label="第一期" value="1" />
|
|
|
- <el-option label="第二期" value="2" />
|
|
|
+ <el-option v-for="item in measurement" :key="item.id" :label="item.periodName" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</hc-info-table-td>
|
|
|
<hc-info-table-td is-title width="10%">调差期:</hc-info-table-td>
|
|
|
<hc-info-table-td>
|
|
|
- <el-form-item prop="key2">
|
|
|
- <el-select v-model="formModel.key2" placeholder="选择调差期" filterable block>
|
|
|
- <el-option label="第一期" value="1" />
|
|
|
- <el-option label="第二期" value="2" />
|
|
|
+ <el-form-item prop="contractPeriodId">
|
|
|
+ <el-select v-model="formModel.contractPeriodId" placeholder="选择调差期" filterable block>
|
|
|
+ <el-option v-for="item in adjustment" :key="item.id" :label="item.periodNumber" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</hc-info-table-td>
|
|
@@ -27,15 +25,14 @@
|
|
|
<hc-info-table-td is-title width="10%">调差月份:</hc-info-table-td>
|
|
|
<hc-info-table-td>
|
|
|
<el-form-item>
|
|
|
- <el-date-picker v-model="formModel.key3" class="block" type="month" format="YYYY-MM" value-format="YYYY-MM" />
|
|
|
+ <el-date-picker v-model="formModel.adjustMonth" class="block" type="month" format="YYYY-MM" value-format="YYYY-MM" />
|
|
|
</el-form-item>
|
|
|
</hc-info-table-td>
|
|
|
<hc-info-table-td is-title width="10%">材料名称:</hc-info-table-td>
|
|
|
<hc-info-table-td>
|
|
|
- <el-form-item prop="key4">
|
|
|
- <el-select v-model="formModel.key4" placeholder="选择材料名称" filterable block>
|
|
|
- <el-option label="钢筋" value="1" />
|
|
|
- <el-option label="粗砂" value="2" />
|
|
|
+ <el-form-item prop="contractMaterialId">
|
|
|
+ <el-select v-model="formModel.contractMaterialId" placeholder="选择材料名称" filterable block>
|
|
|
+ <el-option v-for="item in materialName" :key="item.id" :label="item.materialName" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</hc-info-table-td>
|
|
@@ -44,15 +41,15 @@
|
|
|
<hc-info-table-td is-title width="10%">材料基准价格:</hc-info-table-td>
|
|
|
<hc-info-table-td>
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="formModel.key5" disabled>
|
|
|
+ <el-input v-model="formModel.materialPrice" disabled>
|
|
|
<template #suffix>元</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</hc-info-table-td>
|
|
|
<hc-info-table-td is-title width="10%">施工期市场价格:</hc-info-table-td>
|
|
|
<hc-info-table-td>
|
|
|
- <el-form-item prop="key6">
|
|
|
- <el-input v-model="formModel.key6" disabled>
|
|
|
+ <el-form-item prop="currentPrice">
|
|
|
+ <el-input v-model="formModel.currentPrice" disabled>
|
|
|
<template #suffix>元</template>
|
|
|
<template #append>
|
|
|
<el-button type="primary" @click="realTimePriceClick">
|
|
@@ -68,13 +65,15 @@
|
|
|
<hc-info-table-td is-title width="10%">价差幅度:</hc-info-table-td>
|
|
|
<hc-info-table-td>
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="formModel.key7" disabled />
|
|
|
+ <el-input v-model="formModel.rangePriceRatio" disabled>
|
|
|
+ <template #suffix>%</template>
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</hc-info-table-td>
|
|
|
<hc-info-table-td is-title width="10%">材料数量:</hc-info-table-td>
|
|
|
<hc-info-table-td>
|
|
|
- <el-form-item prop="key8">
|
|
|
- <el-input v-model="formModel.key8" />
|
|
|
+ <el-form-item prop="materialTotal">
|
|
|
+ <el-input v-model="formModel.materialTotal" />
|
|
|
</el-form-item>
|
|
|
</hc-info-table-td>
|
|
|
</tr>
|
|
@@ -82,7 +81,7 @@
|
|
|
<hc-info-table-td is-title width="10%">调差金额:</hc-info-table-td>
|
|
|
<hc-info-table-td width="auto" colspan="3">
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="formModel.key9" disabled />
|
|
|
+ <el-input v-model="formModel.adjustMoney" disabled />
|
|
|
</el-form-item>
|
|
|
</hc-info-table-td>
|
|
|
</tr>
|
|
@@ -90,7 +89,7 @@
|
|
|
<hc-info-table-td is-title width="10%">材料调差计算式:</hc-info-table-td>
|
|
|
<hc-info-table-td width="auto" colspan="3">
|
|
|
<el-form-item>
|
|
|
- <el-input v-model="formModel.key10" type="textarea" :rows="4" resize="none" />
|
|
|
+ <el-input v-model="formModel.adjustCalculation" type="textarea" :rows="4" resize="none" disabled />
|
|
|
</el-form-item>
|
|
|
</hc-info-table-td>
|
|
|
</tr>
|
|
@@ -101,7 +100,7 @@
|
|
|
<el-divider border-style="dashed">
|
|
|
<el-segmented v-model="tab_key" :options="['材料明细', '上传附件']" />
|
|
|
</el-divider>
|
|
|
- <div v-if="tab_key === '材料明细'" class="loop-refresh-icon">
|
|
|
+ <div v-if="tab_key === '材料明细'" class="loop-refresh-icon" @click="getMaterialDetail">
|
|
|
<hc-icon name="loop-left" />
|
|
|
</div>
|
|
|
<div v-if="tab_key === '材料明细'" class="table-body">
|
|
@@ -205,13 +204,63 @@ const tab_key = ref('材料明细')
|
|
|
//表单数据
|
|
|
const formRef = ref(null)
|
|
|
const formModel = ref({})
|
|
|
-const formRules = {}
|
|
|
+const formRules = {
|
|
|
+ key1: {
|
|
|
+ required: true,
|
|
|
+ trigger: 'blur',
|
|
|
+ message: '请选择计量期',
|
|
|
+ },
|
|
|
+ contractPeriodId: {
|
|
|
+ required: true,
|
|
|
+ trigger: 'blur',
|
|
|
+ message: '请选择调差期',
|
|
|
+ },
|
|
|
+ contractMaterialId: {
|
|
|
+ required: true,
|
|
|
+ trigger: 'blur',
|
|
|
+ message: '请选择材料名称',
|
|
|
+ },
|
|
|
+ currentPrice: {
|
|
|
+ required: true,
|
|
|
+ trigger: 'blur',
|
|
|
+ message: '请选择实时价格',
|
|
|
+ },
|
|
|
+ materialTotal: {
|
|
|
+ required: true,
|
|
|
+ trigger: 'blur',
|
|
|
+ message: '请填写材料数量',
|
|
|
+ },
|
|
|
+}
|
|
|
|
|
|
//处理数据
|
|
|
const detailsModalShow = () => {
|
|
|
+ getPeriodMeasurement()
|
|
|
+ getPeriodAdjustment()
|
|
|
+ getMaterialName()
|
|
|
console.log(dataId.value)
|
|
|
}
|
|
|
|
|
|
+//获取计量期
|
|
|
+const measurement = ref([])
|
|
|
+const getPeriodMeasurement = async () => {
|
|
|
+ const { data } = await mainApi.periodMeasurement(contractId.value)
|
|
|
+ measurement.value = getArrValue(data)
|
|
|
+}
|
|
|
+
|
|
|
+//获取调差期
|
|
|
+const adjustment = ref([])
|
|
|
+const getPeriodAdjustment = async () => {
|
|
|
+ const { data } = await mainApi.periodAdjustment(contractId.value)
|
|
|
+ adjustment.value = getArrValue(data)
|
|
|
+}
|
|
|
+
|
|
|
+//获取材料名称
|
|
|
+const materialName = ref([])
|
|
|
+const getMaterialName = async () => {
|
|
|
+ const { data } = await mainApi.materialName(contractId.value)
|
|
|
+ materialName.value = getArrValue(data)
|
|
|
+}
|
|
|
+
|
|
|
//材料实时发布价格表格
|
|
|
const tableColumn3 = [
|
|
|
{ key: 'key1', name: '有效时间' },
|
|
@@ -248,11 +297,26 @@ const tableColumn1 = [
|
|
|
{ key: 'key7', name: '调差系数', width: 120, align: 'center' },
|
|
|
{ key: 'key8', name: '调差数量', width: 120, align: 'center' },
|
|
|
]
|
|
|
-const tableData1 = ref([
|
|
|
- {},
|
|
|
-])
|
|
|
+const tableData1 = ref([])
|
|
|
const tableLoading1 = ref(false)
|
|
|
-
|
|
|
+const getMaterialDetail = async () => {
|
|
|
+ const { contractPeriodId, contractMaterialId } = formModel.value
|
|
|
+ if (isNullES(contractPeriodId) || isNullES(contractMaterialId)) {
|
|
|
+ window.$message.warning('请先选择调差期和材料名称')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ //获取数据
|
|
|
+ const { code, msg, data } = await mainApi.getMaterialDetail({
|
|
|
+ contractMaterialId: contractMaterialId,
|
|
|
+ contractPeriodId: contractPeriodId,
|
|
|
+ projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+ })
|
|
|
+ tableData1.value = getArrValue(data)
|
|
|
+ if (code !== 200 && msg) {
|
|
|
+ window.$message.error(msg)
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
//上传附件
|
|
|
const tableColumn2 = [
|