|
@@ -26,9 +26,9 @@
|
|
|
<el-button type="danger" @click="uploadEqptExcel()">
|
|
|
确认上传
|
|
|
</el-button>
|
|
|
- <el-button type="danger" @click="generateEquipmentCalculate()">生成测算表</el-button>
|
|
|
</div>
|
|
|
<div id="evaluateDiv" class="evaluateDiv">
|
|
|
+ <el-button type="primary" style="float:left" @click="generateEquipmentCalculate()">生成测算表</el-button>
|
|
|
<el-button v-if="activeName === 'all'" type="primary" style="float:left" @click="saveBatch()">批量保存</el-button>
|
|
|
<el-button v-if="activeName === 'imported'" type="primary" style="float:left" @click="saveBatchImp()">批量保存</el-button>
|
|
|
<el-button v-if="activeName === 'nonStandard'" type="primary" style="float:left" @click="saveBatchNonS()">批量保存</el-button>
|
|
@@ -56,7 +56,7 @@
|
|
|
搜索
|
|
|
</el-button>
|
|
|
</div>
|
|
|
- <el-table :data="eqptPageData" border stripe v-show="activeName === 'all'">
|
|
|
+ <el-table :data="eqptPageData" border height="585" stripe v-show="activeName === 'all'">
|
|
|
<el-table-column fixed prop="sortId" label="序号" width="80" align="center">
|
|
|
<template #default="{ row }">
|
|
|
<el-form-item prop="sortId">
|
|
@@ -201,6 +201,7 @@
|
|
|
<el-input v-model="row.activationDate" placeholder="启用日期" />
|
|
|
</el-form>
|
|
|
</el-form-item>
|
|
|
+ <p v-if="new Date(row.activationDate) < new Date(row.purchaseDate)" style="color: red;font-size: 9px;position: absolute;left: 12px;top: 32px;">启用日期在购买之前</p>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="storageLocation" label="存放地点" width="250" align="center">
|
|
@@ -1308,17 +1309,17 @@
|
|
|
<el-pagination v-if="activeName === 'all'" background layout="sizes, prev, pager, next"
|
|
|
:page-sizes="[10, 15, 20, 50]" style="--el-color-primary: #ff6154;margin-top: 20px; float: right;"
|
|
|
v-model:page-count="eqptDataQuery.pages" v-model:page-size="eqptDataQuery.size"
|
|
|
- v-model:current-page="eqptDataQuery.current" @current-change="getEqptDataPage" @size-change="getEqptDataPage" />
|
|
|
+ v-model:current-page="eqptDataQuery.current" @current-change="autoSave" @size-change="autoSave"/>
|
|
|
<el-pagination v-if="activeName === 'imported'" background layout="sizes, prev, pager, next"
|
|
|
:page-sizes="[10, 15, 20, 100]" style="--el-color-primary: #ff6154;margin-top: 20px; float: right;"
|
|
|
v-model:page-count="eqptDataQuery.pages" v-model:page-size="eqptDataQuery.size"
|
|
|
- v-model:current-page="eqptDataQuery.current" @current-change="getImpEqptDataPage"
|
|
|
- @size-change="getImpEqptDataPage" />
|
|
|
+ v-model:current-page="eqptDataQuery.current" @current-change="autoSaveImp"
|
|
|
+ @size-change="autoSaveImp"/>
|
|
|
<el-pagination v-if="activeName === 'nonStandard'" background layout="sizes, prev, pager, next"
|
|
|
:page-sizes="[10, 15, 50, 100]" style="--el-color-primary: #ff6154;margin-top: 20px; float: right;"
|
|
|
v-model:page-count="eqptDataQuery.pages" v-model:page-size="eqptDataQuery.size"
|
|
|
- v-model:current-page="eqptDataQuery.current" @current-change="getNonSEqptDataPage"
|
|
|
- @size-change="getNonSEqptDataPage" />
|
|
|
+ v-model:current-page="eqptDataQuery.current" @current-change="autoSaveNonS"
|
|
|
+ @size-change="autoSaveNonS"/>
|
|
|
<el-tabs v-model="activeName" tab-position="bottom" @tab-change="tabChange()"
|
|
|
style="display:inline-block;margin-left: 308px">
|
|
|
<el-tab-pane label="所有设备测算" name="all">
|
|
@@ -1584,7 +1585,6 @@ export default {
|
|
|
// 进口设备税率截图上传成功回调
|
|
|
tariffRatePictureSuccess(res, file, fileList, $index) {
|
|
|
this.imageList = [];
|
|
|
- console.log(this.eqptImpPageData[$index])
|
|
|
this.eqptImpPageData[$index].tariffRatePicture = res.data;
|
|
|
ElMessage({
|
|
|
showClose: true,
|
|
@@ -1738,7 +1738,7 @@ export default {
|
|
|
const parts = row.inquiryBasis.split(':');
|
|
|
if (parts.length > 1) {
|
|
|
let ppi = parts[1].trim();
|
|
|
- this.eqptPageData[index].price = row.unTaxedUnitPrice * ppi;
|
|
|
+ this.eqptPageData[index].price = (row.unTaxedUnitPrice * ppi).toFixed(2);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -1766,6 +1766,11 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 翻页时自动保存
|
|
|
+ autoSave() {
|
|
|
+ this.saveBatch();
|
|
|
+ this.getEqptDataPage();
|
|
|
+ },
|
|
|
// 通过设备名称判断参考数据中是否有符合的参考信息并设置
|
|
|
mostSimilar() {
|
|
|
for (let index = 0; index < this.eqptPageData.length; index++) {
|
|
@@ -1802,7 +1807,7 @@ export default {
|
|
|
// 设置默认物价指数给询价依据
|
|
|
setPPItoInquiryBasis(row, $index) {
|
|
|
if (row.valuationMethod === '物价指数调整法') {
|
|
|
- const date = new Date(this.calculateBaseInfo.valuationBasisDate);
|
|
|
+ const date = new Date(row.purchaseDate);
|
|
|
let year = date.getFullYear().toString();
|
|
|
const params = { ppiName: null, ppiType: null };
|
|
|
params.ppiName = year;
|
|
@@ -1882,6 +1887,11 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 进口设备翻页自动保存
|
|
|
+ autoSaveImp() {
|
|
|
+ this.saveBatchImp();
|
|
|
+ this.getImpEqptDataPage();
|
|
|
+ },
|
|
|
// 更新非标设备测算
|
|
|
saveNonS(row) {
|
|
|
updateNonSData(row).then(res => {
|
|
@@ -1908,6 +1918,11 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 进口设备翻页自动保存
|
|
|
+ autoSaveNonS() {
|
|
|
+ this.saveBatchNonS();
|
|
|
+ this.getNonSEqptDataPage();
|
|
|
+ },
|
|
|
// 获取表格过滤条件
|
|
|
getEqptTableFilter(queryType, eqptType) {
|
|
|
let params = {
|