|
@@ -20,16 +20,29 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-upload>
|
|
|
- <el-button type="danger" @click="uploadEqptExcel()">
|
|
|
+ <el-button type="primary" @click="uploadEqptExcel()">
|
|
|
确认上传
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" @click="addEqptDataDialog = true">
|
|
|
+ 单条新增
|
|
|
+ </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>
|
|
|
- <el-button type="primary" style="float:left" @click="batchSetDialog = true">批量赋值</el-button>
|
|
|
+ <el-button v-if="activeName === 'all'" type="success" style="float:left" @click="saveBatch()"><el-icon>
|
|
|
+ <DocumentChecked />
|
|
|
+ </el-icon>保存</el-button>
|
|
|
+ <el-button v-if="activeName === 'imported'" type="success" style="float:left" @click="saveBatchImp()"><el-icon>
|
|
|
+ <DocumentChecked />
|
|
|
+ </el-icon>保存</el-button>
|
|
|
+ <el-button v-if="activeName === 'nonStandard'" type="success" style="float:left" @click="saveBatchNonS()"><el-icon>
|
|
|
+ <DocumentChecked />
|
|
|
+ </el-icon>保存</el-button>
|
|
|
+ <el-button type="warning" style="float:left" @click="generateEquipmentCalculate()"><el-icon>
|
|
|
+ <DocumentAdd />
|
|
|
+ </el-icon>生成</el-button>
|
|
|
+ <el-button type="primary" style="float:left" @click="batchSetDialog = true"><el-icon>
|
|
|
+ <Edit />
|
|
|
+ </el-icon>批量赋值</el-button>
|
|
|
<div class="search">
|
|
|
<el-input type="number" v-model="eqptDataQuery.sortId" placeholder="请输入序号" clearable style="width: 200px;" />
|
|
|
<el-input v-model="eqptDataQuery.equipmentName" placeholder="请输入设备名称" clearable style="width: 200px;margin-left: 10px;" />
|
|
@@ -39,27 +52,63 @@
|
|
|
<el-option label="进口设备" value="进口设备"></el-option>
|
|
|
</el-select>
|
|
|
<el-button v-if="activeName === 'all'" type="danger" @click="getEqptDataPage()" style="margin-left: 10px;">
|
|
|
+ <el-icon>
|
|
|
+ <Search />
|
|
|
+ </el-icon>
|
|
|
搜索
|
|
|
</el-button>
|
|
|
<el-button v-if="activeName === 'imported'" type="danger" @click="getImpEqptDataPage()" style="margin-left: 10px;">
|
|
|
+ <el-icon>
|
|
|
+ <Search />
|
|
|
+ </el-icon>
|
|
|
搜索
|
|
|
</el-button>
|
|
|
<el-button v-if="activeName === 'nonStandard'" type="danger" @click="getNonSEqptDataPage()" style="margin-left: 10px;">
|
|
|
+ <el-icon>
|
|
|
+ <Search />
|
|
|
+ </el-icon>
|
|
|
搜索
|
|
|
</el-button>
|
|
|
</div>
|
|
|
- <vxe-table style="margin-top:42px" v-show="activeName === 'all'" border show-overflow show-header-overflow show-footer-overflow ref="allTableRef" height="700" :loading="loading" :column-config="{ resizable: true }" :edit-config="editConfig" :scroll-y="{ enabled: true, gt: 0 }">
|
|
|
+ <div>
|
|
|
+ <vxe-toolbar v-show="activeName === 'all'" ref="toolAllTableRef" custom style="padding: 0px;"></vxe-toolbar>
|
|
|
+ <vxe-toolbar v-show="activeName === 'imported'" ref="toolImportedTableRef" custom style="padding: 0px;"></vxe-toolbar>
|
|
|
+ <vxe-toolbar v-show="activeName === 'nonStandard'" ref="toolNonStandardTableRef" custom style="padding: 0px;"></vxe-toolbar>
|
|
|
+ </div>
|
|
|
+ <vxe-table style="margin-top:8px" v-show="activeName === 'all'" border show-overflow show-header-overflow show-footer-overflow ref="allTableRef" height="700" :loading="loading" :column-config="{ resizable: true }" :edit-config="editConfig" :scroll-y="{ enabled: true, gt: 0 }">
|
|
|
<vxe-column field="sortId" title="序号" width="160" :edit-render="{ name: 'VxeNumberInput' }"></vxe-column>
|
|
|
<vxe-column field="equipmentName" title="设备名称" width="160" :edit-render="{ name: 'VxeInput' }">
|
|
|
<template #header>
|
|
|
<span>设备名称</span>
|
|
|
<el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
<el-checkbox-group v-model="eqptNameFilterArr" style="overflow: auto;height: 300px">
|
|
|
- <el-input size="small" v-model="equipmentName" placeholder="输入后回车搜索" @change="getEqptTableFilter('equipmentName', null)" style="margin-bottom:5px" />
|
|
|
- <el-checkbox v-for="item in equipmentNameFilters" style="display:block;" :label="item.filter + ' (' +item.count + ')'" :value="item.count" size="small" />
|
|
|
+ <el-input size="small" v-model="equipmentName" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmentNameFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ </el-checkbox-group>
|
|
|
+ <div style="text-align: center; margin: 0">
|
|
|
+ <el-button size="small" text @click="equipmentName = null, eqptNameFilterArr = [], eqptDataQuery.eqptNameFilters = null, getEqptDataPage()">重置</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="getEqptDataPage()">筛选</el-button>
|
|
|
+ </div>
|
|
|
+ <template #reference>
|
|
|
+ <div style="display: inline-block">
|
|
|
+ <el-button link><el-icon>
|
|
|
+ <ArrowDown />
|
|
|
+ </el-icon></el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="manufacturer" title="生产厂家" width="160" :edit-render="{ name: 'VxeInput' }">
|
|
|
+ <template #header>
|
|
|
+ <span>生产厂家</span>
|
|
|
+ <el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
+ <el-checkbox-group v-model="eqptManufacturerFilterArr" style="overflow: auto;height: 300px">
|
|
|
+ <el-input size="small" v-model="manufacturer" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmentManufacturerFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
</el-checkbox-group>
|
|
|
<div style="text-align: center; margin: 0">
|
|
|
- <el-button size="small" text @click="eqptNameFilterArr = [], eqptDataQuery.eqptNameFilters = null">重置</el-button>
|
|
|
+ <el-button size="small" text @click="manufacturer = null, eqptManufacturerFilterArr = [], eqptDataQuery.manufacturerFilters = null, getEqptDataPage()">重置</el-button>
|
|
|
<el-button size="small" type="primary" @click="getEqptDataPage()">筛选</el-button>
|
|
|
</div>
|
|
|
<template #reference>
|
|
@@ -72,17 +121,16 @@
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
- <vxe-column field="manufacturer" title="生产厂家" width="160" :edit-render="{ name: 'VxeInput' }"></vxe-column>
|
|
|
<vxe-column field="model" title="型号规格" width="160" :edit-render="{ name: 'VxeInput' }">
|
|
|
<template #header>
|
|
|
<span>型号规格</span>
|
|
|
<el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
<el-checkbox-group v-model="eqptModelFilterArr" style="overflow: auto;height: 300px">
|
|
|
- <el-input size="small" v-model="equipmentModel" placeholder="输入后回车搜索" @change="getEqptTableFilter('model', null)" style="margin-bottom:5px" />
|
|
|
- <el-checkbox v-for="item in equipmentModelFilters" style="display:block;" :label="item.filter + ' (' +item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ <el-input size="small" v-model="equipmentModel" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmentModelFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
</el-checkbox-group>
|
|
|
<div style="text-align: center; margin: 0">
|
|
|
- <el-button size="small" text @click="eqptModelFilterArr = [], eqptDataQuery.modelFilters = null">重置</el-button>
|
|
|
+ <el-button size="small" text @click="equipmentModel = null, eqptModelFilterArr = [], eqptDataQuery.modelFilters = null, getEqptDataPage()">重置</el-button>
|
|
|
<el-button size="small" type="primary" @click="getEqptDataPage()">筛选</el-button>
|
|
|
</div>
|
|
|
<template #reference>
|
|
@@ -100,11 +148,11 @@
|
|
|
<span>购买日期</span>
|
|
|
<el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
<el-checkbox-group v-model="eqptPurchaseDateFilterArr" style="overflow: auto;height: 300px">
|
|
|
- <el-input size="small" v-model="equipmentPurchaseDate" placeholder="输入后回车搜索" @change="getEqptTableFilter('purchaseDate', null)" style="margin-bottom:5px" />
|
|
|
- <el-checkbox v-for="item in equipmenPurchaseDateFilters" style="display:block;" :label="item.filter + ' (' +item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ <el-input size="small" v-model="equipmentPurchaseDate" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmenPurchaseDateFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
</el-checkbox-group>
|
|
|
<div style="text-align: center; margin: 0">
|
|
|
- <el-button size="small" text @click="eqptPurchaseDateFilterArr = [], eqptDataQuery.purchaseDateFilters = null">重置</el-button>
|
|
|
+ <el-button size="small" text @click="equipmentPurchaseDate = null, eqptPurchaseDateFilterArr = [], eqptDataQuery.purchaseDateFilters = null, getEqptDataPage()">重置</el-button>
|
|
|
<el-button size="small" type="primary" @click="getEqptDataPage()">筛选</el-button>
|
|
|
</div>
|
|
|
<template #reference>
|
|
@@ -122,11 +170,11 @@
|
|
|
<span>启用日期</span>
|
|
|
<el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
<el-checkbox-group v-model="eqptActivationDateFilterArr" style="overflow: auto;height: 300px">
|
|
|
- <el-input size="small" v-model="equipmentActivationDate" placeholder="输入后回车搜索" @change="getEqptTableFilter('activationDate', null)" style="margin-bottom:5px" />
|
|
|
- <el-checkbox v-for="item in equipmentActivationDateFilters" style="display:block;" :label="item.filter + ' (' +item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ <el-input size="small" v-model="equipmentActivationDate" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmentActivationDateFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
</el-checkbox-group>
|
|
|
<div style="text-align: center; margin: 0">
|
|
|
- <el-button size="small" text @click="eqptActivationDateFilterArr = [], eqptDataQuery.activationDateFilters = null">重置</el-button>
|
|
|
+ <el-button size="small" text @click="equipmentActivationDate = null, eqptActivationDateFilterArr = [], eqptDataQuery.activationDateFilters = null, getEqptDataPage()">重置</el-button>
|
|
|
<el-button size="small" type="primary" @click="getEqptDataPage()">筛选</el-button>
|
|
|
</div>
|
|
|
<template #reference>
|
|
@@ -258,13 +306,13 @@
|
|
|
<el-option v-for="item in group.eqptPPI" :label="'(' + item.id + ')' + item.ppiName + '年:' + item.ppi" :value="'(' + item.id + ')' + item.ppiName + '年:' + item.ppi" />
|
|
|
</el-option-group>
|
|
|
</el-select>
|
|
|
- <el-input style="width:220px" v-if="row.valuationMethod !== '物价指数调整法'" v-model="row.inquiryBasis" />
|
|
|
- <el-upload v-if="row.valuationMethod !== '物价指数调整法'" v-model:file-list="imageList" action="/pp/file/upload/image" accept=".gif,.jpg,.jpeg,.jpg2,.png,.tif,.tiff,.bmp,.svg,.svgz,.webp" :limit="1" :show-file-list="false" :on-success="(response, file, fileList) => {
|
|
|
+ <el-input v-if="row.valuationMethod !== '物价指数调整法'" v-model="row.inquiryBasis" placeholder="可粘贴图片(生成图片链接)" @paste.native="(e) => { return imagePaste(e, row, 'inquiryBasis'); }" />
|
|
|
+ <!-- <el-upload v-if="row.valuationMethod !== '物价指数调整法'" v-model:file-list="imageList" action="/pp/file/upload/image" accept=".gif,.jpg,.jpeg,.jpg2,.png,.tif,.tiff,.bmp,.svg,.svgz,.webp" :limit="1" :show-file-list="false" :on-success="(response, file, fileList) => {
|
|
|
return imageSuccess(response, file, fileList, row);
|
|
|
}
|
|
|
- " style="width: 50px;display: inline-block;margin-left:5px">
|
|
|
- <el-button type="danger" size="small">图片</el-button>
|
|
|
- </el-upload>
|
|
|
+ " style="width: 10%;display: inline-block;margin-left:5px">
|
|
|
+ <el-button type="danger" size="small">上传</el-button>
|
|
|
+ </el-upload> -->
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<vxe-column field="inquiryLocation" title="询价地点" width="160" :edit-render="{ name: 'VxeInput' }"></vxe-column>
|
|
@@ -325,18 +373,18 @@
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
</vxe-table>
|
|
|
- <vxe-table style="margin-top:42px" v-show="activeName === 'imported'" border show-overflow show-header-overflow show-footer-overflow ref="importedTableRef" height="700" :loading="loading" :column-config="{ resizable: true }" :edit-config="editConfig" :scroll-y="{ enabled: true, gt: 0 }">
|
|
|
+ <vxe-table style="margin-top:8px" v-show="activeName === 'imported'" border show-overflow show-header-overflow show-footer-overflow ref="importedTableRef" height="700" :loading="loading" :column-config="{ resizable: true }" :edit-config="editConfig" :scroll-y="{ enabled: true, gt: 0 }">
|
|
|
<vxe-column field="sortId" title="序号" width="160"></vxe-column>
|
|
|
<vxe-column field="equipmentName" title="设备名称" width="160">
|
|
|
<template #header>
|
|
|
<span>设备名称</span>
|
|
|
<el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
<el-checkbox-group v-model="eqptNameFilterArr" style="overflow: auto;height: 300px">
|
|
|
- <el-input size="small" v-model="equipmentName" placeholder="输入后回车搜索" @change="getEqptTableFilter('equipmentName', '进口设备')" style="margin-bottom:5px" />
|
|
|
- <el-checkbox v-for="item in equipmentNameFilters" style="display:block;" :label="item.filter + ' (' +item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ <el-input size="small" v-model="equipmentName" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmentNameFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
</el-checkbox-group>
|
|
|
<div style="text-align: center; margin: 0">
|
|
|
- <el-button size="small" text @click="eqptNameFilterArr = [], eqptDataQuery.eqptNameFilters = null">重置</el-button>
|
|
|
+ <el-button size="small" text @click="equipmentName = null, eqptNameFilterArr = [], eqptDataQuery.eqptNameFilters = null, getImpEqptDataPage()">重置</el-button>
|
|
|
<el-button size="small" type="primary" @click="getImpEqptDataPage()">筛选</el-button>
|
|
|
</div>
|
|
|
<template #reference>
|
|
@@ -354,11 +402,33 @@
|
|
|
<span>规格型号</span>
|
|
|
<el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
<el-checkbox-group v-model="eqptModelFilterArr" style="overflow: auto;height: 300px">
|
|
|
- <el-input size="small" v-model="equipmentModel" placeholder="输入后回车搜索" @change="getEqptTableFilter('model', '进口设备')" style="margin-bottom:5px" />
|
|
|
- <el-checkbox v-for="item in equipmentModelFilters" style="display:block;" :label="item.filter + ' (' +item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ <el-input size="small" v-model="equipmentModel" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmentModelFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
</el-checkbox-group>
|
|
|
<div style="text-align: center; margin: 0">
|
|
|
- <el-button size="small" text @click="eqptModelFilterArr = [], eqptDataQuery.modelFilters = null">重置</el-button>
|
|
|
+ <el-button size="small" text @click="equipmentModel = null, eqptModelFilterArr = [], eqptDataQuery.modelFilters = null, getImpEqptDataPage()">重置</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="getImpEqptDataPage()">筛选</el-button>
|
|
|
+ </div>
|
|
|
+ <template #reference>
|
|
|
+ <div style="display: inline-block">
|
|
|
+ <el-button link><el-icon>
|
|
|
+ <ArrowDown />
|
|
|
+ </el-icon></el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="manufacturer" title="生产厂家" width="160">
|
|
|
+ <template #header>
|
|
|
+ <span>生产厂家</span>
|
|
|
+ <el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
+ <el-checkbox-group v-model="eqptManufacturerFilterArr" style="overflow: auto;height: 300px">
|
|
|
+ <el-input size="small" v-model="manufacturer" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmentManufacturerFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ </el-checkbox-group>
|
|
|
+ <div style="text-align: center; margin: 0">
|
|
|
+ <el-button size="small" text @click="manufacturer = null, eqptManufacturerFilterArr = [], eqptDataQuery.manufacturerFilters = null, getImpEqptDataPage()">重置</el-button>
|
|
|
<el-button size="small" type="primary" @click="getImpEqptDataPage()">筛选</el-button>
|
|
|
</div>
|
|
|
<template #reference>
|
|
@@ -371,7 +441,6 @@
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
- <vxe-column field="manufacturer" title="生产厂家" width="160"></vxe-column>
|
|
|
<vxe-column field="unitOfMeasurement" title="计量单位" width="160"></vxe-column>
|
|
|
<vxe-column field="quantity" title="数量" width="160"></vxe-column>
|
|
|
<vxe-column field="purchaseDate" title="购置日期" width="160">
|
|
@@ -379,11 +448,11 @@
|
|
|
<span>购置日期</span>
|
|
|
<el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
<el-checkbox-group v-model="eqptPurchaseDateFilterArr" style="overflow: auto;height: 300px">
|
|
|
- <el-input size="small" v-model="equipmentPurchaseDate" placeholder="输入后回车搜索" @change="getEqptTableFilter('purchaseDate', '进口设备')" style="margin-bottom:5px" />
|
|
|
- <el-checkbox v-for="item in equipmenPurchaseDateFilters" style="display:block;" :label="item.filter + ' (' +item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ <el-input size="small" v-model="equipmentPurchaseDate" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmenPurchaseDateFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
</el-checkbox-group>
|
|
|
<div style="text-align: center; margin: 0">
|
|
|
- <el-button size="small" text @click="eqptPurchaseDateFilterArr = [], eqptDataQuery.purchaseDateFilters = null">重置</el-button>
|
|
|
+ <el-button size="small" text @click="equipmentPurchaseDate = null, eqptPurchaseDateFilterArr = [], eqptDataQuery.purchaseDateFilters = null, getImpEqptDataPage()">重置</el-button>
|
|
|
<el-button size="small" type="primary" @click="getImpEqptDataPage()">筛选</el-button>
|
|
|
</div>
|
|
|
<template #reference>
|
|
@@ -401,11 +470,11 @@
|
|
|
<span>启用日期</span>
|
|
|
<el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
<el-checkbox-group v-model="eqptActivationDateFilterArr" style="overflow: auto;height: 300px">
|
|
|
- <el-input size="small" v-model="equipmentActivationDate" placeholder="输入后回车搜索" @change="getEqptTableFilter('activationDate', '进口设备')" style="margin-bottom:5px" />
|
|
|
- <el-checkbox v-for="item in equipmentActivationDateFilters" style="display:block;" :label="item.filter + ' (' +item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ <el-input size="small" v-model="equipmentActivationDate" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmentActivationDateFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
</el-checkbox-group>
|
|
|
<div style="text-align: center; margin: 0">
|
|
|
- <el-button size="small" text @click="eqptActivationDateFilterArr = [], eqptDataQuery.activationDateFilters = null">重置</el-button>
|
|
|
+ <el-button size="small" text @click="equipmentActivationDate = null, eqptActivationDateFilterArr = [], eqptDataQuery.activationDateFilters = null, getImpEqptDataPage()">重置</el-button>
|
|
|
<el-button size="small" type="primary" @click="getImpEqptDataPage()">筛选</el-button>
|
|
|
</div>
|
|
|
<template #reference>
|
|
@@ -452,13 +521,13 @@
|
|
|
<vxe-column field="tariffRate" title="关税税率%" width="160" :edit-render="{ name: 'VxeNumberInput' }"></vxe-column>
|
|
|
<vxe-column field="tariffRatePicture" title="关税税率截图" width="160" :edit-render="{}">
|
|
|
<template #edit="{ row, $rowIndex }">
|
|
|
- <el-input v-model="row.tariffRatePicture" placeholder="关税税率截图" style="width:220px" />
|
|
|
- <el-upload v-model:file-list="imageList" action="/pp/file/upload/image" accept=".gif,.jpg,.jpeg,.jpg2,.png,.tif,.tiff,.bmp,.svg,.svgz,.webp" :limit="1" :show-file-list="false" :on-success="(response, file, fileList) => {
|
|
|
+ <el-input v-model="row.tariffRatePicture" placeholder="粘贴关税税率截图" @paste.native="(e) => { return imagePaste(e, row, 'tariffRatePicture'); }" />
|
|
|
+ <!-- <el-upload v-model:file-list="imageList" action="/pp/file/upload/image" accept=".gif,.jpg,.jpeg,.jpg2,.png,.tif,.tiff,.bmp,.svg,.svgz,.webp" :limit="1" :show-file-list="false" :on-success="(response, file, fileList) => {
|
|
|
return tariffRatePictureSuccess(response, file, fileList, $rowIndex);
|
|
|
}
|
|
|
" style="width: 50px;display: inline-block;margin-left:5px">
|
|
|
<el-button type="danger" size="small">图片</el-button>
|
|
|
- </el-upload>
|
|
|
+ </el-upload> -->
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<vxe-column field="tariff" title="关税(元)" width="160">
|
|
@@ -505,7 +574,7 @@
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
</vxe-table>
|
|
|
- <vxe-table style="margin-top:42px" v-show="activeName === 'nonStandard'" border show-overflow show-header-overflow show-footer-overflow ref="nonStandardTableRef" height="700" :loading="loading" :column-config="{ resizable: true }" :edit-config="editConfig" :scroll-y="{ enabled: true, gt: 0 }">
|
|
|
+ <vxe-table style="margin-top:8px" v-show="activeName === 'nonStandard'" border show-overflow show-header-overflow show-footer-overflow ref="nonStandardTableRef" height="700" :loading="loading" :column-config="{ resizable: true }" :edit-config="editConfig" :scroll-y="{ enabled: true, gt: 0 }">
|
|
|
<vxe-column field="sortId" title="序号" width="160"></vxe-column>
|
|
|
<vxe-column field="eqptCode" title="设备编号" width="160" :edit-render="{ name: 'VxeInput' }"></vxe-column>
|
|
|
<vxe-column field="equipmentName" title="设备名称" width="160">
|
|
@@ -513,11 +582,11 @@
|
|
|
<span>设备名称</span>
|
|
|
<el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
<el-checkbox-group v-model="eqptNameFilterArr" style="overflow: auto;height: 300px">
|
|
|
- <el-input size="small" v-model="equipmentName" placeholder="输入后回车搜索" @change="getEqptTableFilter('equipmentName', '非标设备')" style="margin-bottom:5px" />
|
|
|
- <el-checkbox v-for="item in equipmentNameFilters" style="display:block;" :label="item.filter + ' (' +item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ <el-input size="small" v-model="equipmentName" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmentNameFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
</el-checkbox-group>
|
|
|
<div style="text-align: center; margin: 0">
|
|
|
- <el-button size="small" text @click="eqptNameFilterArr = [], eqptDataQuery.eqptNameFilters = null">重置</el-button>
|
|
|
+ <el-button size="small" text @click="equipmentName = null, eqptNameFilterArr = [], eqptDataQuery.eqptNameFilters = null, getNonSEqptDataPage()">重置</el-button>
|
|
|
<el-button size="small" type="primary" @click="getNonSEqptDataPage()">筛选</el-button>
|
|
|
</div>
|
|
|
<template #reference>
|
|
@@ -535,11 +604,33 @@
|
|
|
<span>规格型号</span>
|
|
|
<el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
<el-checkbox-group v-model="eqptModelFilterArr" style="overflow: auto;height: 300px">
|
|
|
- <el-input size="small" v-model="equipmentModel" placeholder="输入后回车搜索" @change="getEqptTableFilter('model', '非标设备')" style="margin-bottom:5px" />
|
|
|
- <el-checkbox v-for="item in equipmentModelFilters" style="display:block;" :label="item.filter + ' (' +item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ <el-input size="small" v-model="equipmentModel" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmentModelFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
</el-checkbox-group>
|
|
|
<div style="text-align: center; margin: 0">
|
|
|
- <el-button size="small" text @click="eqptModelFilterArr = [], eqptDataQuery.modelFilters = null">重置</el-button>
|
|
|
+ <el-button size="small" text @click="equipmentModel = null, eqptModelFilterArr = [], eqptDataQuery.modelFilters = null, getNonSEqptDataPage()">重置</el-button>
|
|
|
+ <el-button size="small" type="primary" @click="getNonSEqptDataPage()">筛选</el-button>
|
|
|
+ </div>
|
|
|
+ <template #reference>
|
|
|
+ <div style="display: inline-block">
|
|
|
+ <el-button link><el-icon>
|
|
|
+ <ArrowDown />
|
|
|
+ </el-icon></el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column field="manufacturer" title="生产厂家" width="160">
|
|
|
+ <template #header>
|
|
|
+ <span>生产厂家</span>
|
|
|
+ <el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
+ <el-checkbox-group v-model="eqptManufacturerFilterArr" style="overflow: auto;height: 300px">
|
|
|
+ <el-input size="small" v-model="manufacturer" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmentManufacturerFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ </el-checkbox-group>
|
|
|
+ <div style="text-align: center; margin: 0">
|
|
|
+ <el-button size="small" text @click="manufacturer = null, eqptManufacturerFilterArr = [], eqptDataQuery.manufacturerFilters = null, getNonSEqptDataPage()">重置</el-button>
|
|
|
<el-button size="small" type="primary" @click="getNonSEqptDataPage()">筛选</el-button>
|
|
|
</div>
|
|
|
<template #reference>
|
|
@@ -552,7 +643,6 @@
|
|
|
</el-popover>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
- <vxe-column field="manufacturer" title="生产厂家" width="160"></vxe-column>
|
|
|
<vxe-column field="affiliatedSystem" title="所属系统/生产线名称" width="160" :edit-render="{ name: 'VxeInput' }"></vxe-column>
|
|
|
<vxe-column field="unitOfMeasurement" title="计量单位" width="160" :edit-render="{ name: 'VxeInput' }"></vxe-column>
|
|
|
<vxe-column field="quantity" title="数量" width="160"></vxe-column>
|
|
@@ -561,11 +651,11 @@
|
|
|
<span>购置日期</span>
|
|
|
<el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
<el-checkbox-group v-model="eqptPurchaseDateFilterArr" style="overflow: auto;height: 300px">
|
|
|
- <el-input size="small" v-model="equipmentPurchaseDate" placeholder="输入后回车搜索" @change="getEqptTableFilter('purchaseDate', '非标设备')" style="margin-bottom:5px" />
|
|
|
- <el-checkbox v-for="item in equipmenPurchaseDateFilters" style="display:block;" :label="item.filter + ' (' +item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ <el-input size="small" v-model="equipmentPurchaseDate" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmenPurchaseDateFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
</el-checkbox-group>
|
|
|
<div style="text-align: center; margin: 0">
|
|
|
- <el-button size="small" text @click="eqptPurchaseDateFilterArr = [], eqptDataQuery.purchaseDateFilters = null">重置</el-button>
|
|
|
+ <el-button size="small" text @click="equipmentPurchaseDate = null, eqptPurchaseDateFilterArr = [], eqptDataQuery.purchaseDateFilters = null, getNonSEqptDataPage()">重置</el-button>
|
|
|
<el-button size="small" type="primary" @click="getNonSEqptDataPage()">筛选</el-button>
|
|
|
</div>
|
|
|
<template #reference>
|
|
@@ -583,11 +673,11 @@
|
|
|
<span>启用日期</span>
|
|
|
<el-popover trigger="click" placement="top" :width="300" :hide-after="0">
|
|
|
<el-checkbox-group v-model="eqptActivationDateFilterArr" style="overflow: auto;height: 300px">
|
|
|
- <el-input size="small" v-model="equipmentActivationDate" placeholder="输入后回车搜索" @change="getEqptTableFilter('activationDate', '非标设备')" style="margin-bottom:5px" />
|
|
|
- <el-checkbox v-for="item in equipmentActivationDateFilters" style="display:block;" :label="item.filter + ' (' +item.count + ')'" :value="item.filter" size="small" />
|
|
|
+ <el-input size="small" v-model="equipmentActivationDate" placeholder="输入后回车搜索" style="margin-bottom:5px" />
|
|
|
+ <el-checkbox v-for="item in equipmentActivationDateFilterOptions" style="display:block;" :label="item.filter + ' (' + item.count + ')'" :value="item.filter" size="small" />
|
|
|
</el-checkbox-group>
|
|
|
<div style="text-align: center; margin: 0">
|
|
|
- <el-button size="small" text @click="eqptActivationDateFilterArr = [], eqptDataQuery.activationDateFilters = null">重置</el-button>
|
|
|
+ <el-button size="small" text @click="equipmentActivationDate = null, eqptActivationDateFilterArr = [], eqptDataQuery.activationDateFilters = null, getNonSEqptDataPage()">重置</el-button>
|
|
|
<el-button size="small" type="primary" @click="getNonSEqptDataPage()">筛选</el-button>
|
|
|
</div>
|
|
|
<template #reference>
|
|
@@ -724,6 +814,54 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog v-model="addEqptDataDialog" width="600" title="单条新增机器设备信息">
|
|
|
+ <el-form :model="eqptDataForm" label-width="auto" style="max-width: 600px">
|
|
|
+ <el-form-item label="序号:" style="margin-bottom:20px">
|
|
|
+ <el-input type="number" v-model="eqptDataForm.sortId" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="设备名称:" style="margin-bottom:20px">
|
|
|
+ <el-input v-model="eqptDataForm.equipmentName" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="生产厂家:" style="margin-bottom:20px">
|
|
|
+ <el-input v-model="eqptDataForm.manufacturer" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="型号规格:" style="margin-bottom:20px">
|
|
|
+ <el-input v-model="eqptDataForm.model" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="购买日期:" style="margin-bottom:20px">
|
|
|
+ <el-date-picker v-model="eqptDataForm.purchaseDate" type="date" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="启用日期:" style="margin-bottom:20px">
|
|
|
+ <el-date-picker v-model="eqptDataForm.activationDate" type="date" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="存放地点:" style="margin-bottom:20px">
|
|
|
+ <el-input v-model="eqptDataForm.storageLocation" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="数量:" style="margin-bottom:20px">
|
|
|
+ <el-input type="number" v-model="eqptDataForm.quantity" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="计量单位:" style="margin-bottom:20px">
|
|
|
+ <el-input v-model="eqptDataForm.unitOfMeasurement" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="账面原值:" style="margin-bottom:20px">
|
|
|
+ <el-input type="number" v-model="eqptDataForm.bookOriginalValue" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="账面净值:" style="margin-bottom:20px">
|
|
|
+ <el-input type="number" v-model="eqptDataForm.bookNetValue" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="设备类型:" style="margin-bottom:20px">
|
|
|
+ <el-select v-model="eqptDataForm.equipmentType">
|
|
|
+ <el-option label="国产设备" value="国产设备"></el-option>
|
|
|
+ <el-option label="非标设备" value="非标设备"></el-option>
|
|
|
+ <el-option label="进口设备" value="进口设备"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="备注:" style="margin-bottom:20px">
|
|
|
+ <el-input v-model="eqptDataForm.remark" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-button type="primary" @click="addEqptData()">新增</el-button>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -731,11 +869,13 @@
|
|
|
import { mapStores } from 'pinia';
|
|
|
import { assetsProjectInfo } from '@/stores/assetsProjectStore';
|
|
|
import { importEqptExcelData, getCalculateBaseInfo, getValuationBasisDate, generateEquipmentCalculate } from '@/api/assetsCalculate';
|
|
|
-import { getDataPage, updateData, updateBatch, getImpDataPage, updateImpData, updateBatchImpData, getNonSDataPage, updateNonSData, updateBatchNonSData, getEqptTableFilterVO } from '@/api/assetsCalculateEqptData';
|
|
|
+import { addEqptData, getDataPage, updateData, updateBatch, getImpDataPage, updateImpData, updateBatchImpData, getNonSDataPage, updateNonSData, updateBatchNonSData, getEqptTableFilterVO } from '@/api/assetsCalculateEqptData';
|
|
|
import { getDaysBetween } from '@/utils/date';
|
|
|
import { eqptLifeIfrRefsList } from '@/api/eqptLifeIfrRefs';
|
|
|
import { getPPIDownData, getPPIByNameType } from '@/api/eqptPPI';
|
|
|
import { eqptGnEvpList } from '@/api/eqptGnEvp';
|
|
|
+import { imagePasteHandler } from '@/utils/handlerPaste';
|
|
|
+import { uploadImage } from '@/api/fileUpload';
|
|
|
|
|
|
import { VxeUI, VxeTableInstance, VxeTablePropTypes } from 'vxe-table'
|
|
|
|
|
@@ -756,6 +896,7 @@ export default {
|
|
|
dateEditRender,
|
|
|
activeName: 'all',
|
|
|
batchSetDialog: false,
|
|
|
+ addEqptDataDialog: false,
|
|
|
// 批量赋值
|
|
|
batchAssignment: {},
|
|
|
fileList: [],
|
|
@@ -768,7 +909,8 @@ export default {
|
|
|
eqptNameFilters: null,
|
|
|
modelFilters: null,
|
|
|
purchaseDateFilters: null,
|
|
|
- activationDateFilters: null
|
|
|
+ activationDateFilters: null,
|
|
|
+ manufacturerFilters: null
|
|
|
},
|
|
|
eqptPageData: [],
|
|
|
eqptImpPageData: [],
|
|
@@ -786,6 +928,9 @@ export default {
|
|
|
// 设备购置日期过滤条件
|
|
|
equipmenPurchaseDateFilters: [],
|
|
|
equipmentPurchaseDate: null,
|
|
|
+ // 生产厂家过滤条件
|
|
|
+ equipmentManufacturerFilters: [],
|
|
|
+ manufacturer: null,
|
|
|
// 设备启用日期过滤条件
|
|
|
equipmentActivationDateFilters: [],
|
|
|
equipmentActivationDate: null,
|
|
@@ -796,17 +941,64 @@ export default {
|
|
|
// 设备购置日期查询条件
|
|
|
eqptPurchaseDateFilterArr: [],
|
|
|
// 设备启用日期查询条件
|
|
|
- eqptActivationDateFilterArr: []
|
|
|
+ eqptActivationDateFilterArr: [],
|
|
|
+ // 生产厂家查询条件
|
|
|
+ eqptManufacturerFilterArr: [],
|
|
|
+ // 机器设备表单
|
|
|
+ eqptDataForm: {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ const $allTableRef = this.$refs.allTableRef
|
|
|
+ const $toolAllTableRef = this.$refs.toolAllTableRef
|
|
|
+ if ($allTableRef && $toolAllTableRef) {
|
|
|
+ $allTableRef.connect($toolAllTableRef)
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
...mapStores(assetsProjectInfo),
|
|
|
+
|
|
|
+ // 机器设备筛选条件
|
|
|
+ equipmentNameFilterOptions() {
|
|
|
+ if(this.equipmentName) {
|
|
|
+ return this.equipmentNameFilters.filter((option) => option.filter.includes(this.equipmentName));
|
|
|
+ } else {
|
|
|
+ return this.equipmentNameFilters;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ equipmentModelFilterOptions() {
|
|
|
+ if(this.equipmentModel) {
|
|
|
+ return this.equipmentModelFilters.filter((option) => option.filter.includes(this.equipmentName));
|
|
|
+ } else {
|
|
|
+ return this.equipmentModelFilters;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ equipmenPurchaseDateFilterOptions() {
|
|
|
+ if(this.equipmentPurchaseDate) {
|
|
|
+ return this.equipmenPurchaseDateFilters.filter((option) => option.filter.includes(this.equipmentPurchaseDate));
|
|
|
+ } else {
|
|
|
+ return this.equipmenPurchaseDateFilters;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ equipmentManufacturerFilterOptions() {
|
|
|
+ if(this.manufacturer) {
|
|
|
+ return this.equipmentManufacturerFilters.filter((option) => option.filter.includes(this.manufacturer));
|
|
|
+ } else {
|
|
|
+ return this.equipmentManufacturerFilters;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ equipmentActivationDateFilterOptions() {
|
|
|
+ if(this.equipmentActivationDate) {
|
|
|
+ return this.equipmentActivationDateFilters.filter((option) => option.filter.includes(this.equipmentActivationDate));
|
|
|
+ } else {
|
|
|
+ return this.equipmentActivationDateFilters;
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
created() {
|
|
|
this.getBaseInfo();
|
|
|
this.getEqptDataPage();
|
|
|
this.getPPI();
|
|
|
- this.getEqptTableFilter('all', null);
|
|
|
},
|
|
|
methods: {
|
|
|
getDaysBetween,
|
|
@@ -819,7 +1011,8 @@ export default {
|
|
|
eqptNameFilters: null,
|
|
|
modelFilters: null,
|
|
|
purchaseDateFilters: null,
|
|
|
- activationDateFilters: null
|
|
|
+ activationDateFilters: null,
|
|
|
+ manufacturerFilters: null
|
|
|
}
|
|
|
this.equipmentNameFilters = [];
|
|
|
this.equipmentName = null;
|
|
@@ -834,18 +1027,39 @@ export default {
|
|
|
this.eqptPurchaseDateFilterArr = [];
|
|
|
this.eqptActivationDateFilterArr = [];
|
|
|
if (this.activeName === 'all') {
|
|
|
- this.getEqptTableFilter('all', null);
|
|
|
this.getEqptDataPage();
|
|
|
}
|
|
|
if (this.activeName === 'imported') {
|
|
|
- this.getEqptTableFilter('all', '进口设备');
|
|
|
this.getImpEqptDataPage();
|
|
|
}
|
|
|
if (this.activeName === 'nonStandard') {
|
|
|
- this.getEqptTableFilter('all', '非标设备');
|
|
|
this.getNonSEqptDataPage();
|
|
|
}
|
|
|
},
|
|
|
+ // 新增机器设备信息
|
|
|
+ addEqptData() {
|
|
|
+ this.eqptDataForm.assetsCalculateId = this.projectStore.calculateProgress.id;
|
|
|
+ addEqptData(this.eqptDataForm).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ ElMessage({
|
|
|
+ showClose: true,
|
|
|
+ message: res.message,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.eqptDataForm = {};
|
|
|
+ this.addEqptDataDialog = false;
|
|
|
+ if (this.activeName === 'all') {
|
|
|
+ this.getEqptDataPage();
|
|
|
+ }
|
|
|
+ if (this.activeName === 'imported') {
|
|
|
+ this.getImpEqptDataPage();
|
|
|
+ }
|
|
|
+ if (this.activeName === 'nonStandard') {
|
|
|
+ this.getNonSEqptDataPage();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
uploadEqptExcel() {
|
|
|
if (this.eqptPageData && this.eqptPageData.length > 0) {
|
|
|
ElMessageBox.confirm('上传新的申报信息将会覆盖旧数据', '确认上传', {
|
|
@@ -922,20 +1136,22 @@ export default {
|
|
|
this.eqptDataQuery.modelFilters = this.eqptModelFilterArr.join();
|
|
|
this.eqptDataQuery.purchaseDateFilters = this.eqptPurchaseDateFilterArr.join();
|
|
|
this.eqptDataQuery.activationDateFilters = this.eqptActivationDateFilterArr.join();
|
|
|
+ this.eqptDataQuery.manufacturerFilters = this.eqptManufacturerFilterArr.join();
|
|
|
this.eqptDataQuery.calculateId = this.projectStore.calculateProgress.id;
|
|
|
getDataPage(this.eqptDataQuery).then(res => {
|
|
|
this.eqptPageData = res.data;
|
|
|
const $table = this.$refs.allTableRef as VxeTableInstance
|
|
|
if ($table) {
|
|
|
- const startTime = Date.now()
|
|
|
$table.loadData(this.eqptPageData).then(() => {
|
|
|
- VxeUI.modal.message({
|
|
|
- content: `加载时间 ${Date.now() - startTime} 毫秒`,
|
|
|
- status: 'success'
|
|
|
+ ElMessage({
|
|
|
+ showClose: true,
|
|
|
+ message: '数据载入成功!',
|
|
|
+ type: 'success'
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
this.getEqptLifeIfrRefs();
|
|
|
+ this.getEqptTableFilter(this.eqptPageData);
|
|
|
})
|
|
|
},
|
|
|
// 分页查询进口设备信息
|
|
@@ -944,20 +1160,22 @@ export default {
|
|
|
this.eqptDataQuery.modelFilters = this.eqptModelFilterArr.join();
|
|
|
this.eqptDataQuery.purchaseDateFilters = this.eqptPurchaseDateFilterArr.join();
|
|
|
this.eqptDataQuery.activationDateFilters = this.eqptActivationDateFilterArr.join();
|
|
|
+ this.eqptDataQuery.manufacturerFilters = this.eqptManufacturerFilterArr.join();
|
|
|
this.eqptDataQuery.calculateId = this.projectStore.calculateProgress.id;
|
|
|
this.eqptDataQuery.equipmentType = '进口设备';
|
|
|
getImpDataPage(this.eqptDataQuery).then(res => {
|
|
|
this.eqptImpPageData = res.data;
|
|
|
const $table = this.$refs.importedTableRef as VxeTableInstance
|
|
|
if ($table) {
|
|
|
- const startTime = Date.now()
|
|
|
$table.loadData(this.eqptImpPageData).then(() => {
|
|
|
- VxeUI.modal.message({
|
|
|
- content: `加载时间 ${Date.now() - startTime} 毫秒`,
|
|
|
- status: 'success'
|
|
|
+ ElMessage({
|
|
|
+ showClose: true,
|
|
|
+ message: '数据载入成功!',
|
|
|
+ type: 'success'
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
+ this.getEqptTableFilter(this.eqptImpPageData);
|
|
|
})
|
|
|
},
|
|
|
// 分页查询非标设备信息
|
|
@@ -966,21 +1184,23 @@ export default {
|
|
|
this.eqptDataQuery.modelFilters = this.eqptModelFilterArr.join();
|
|
|
this.eqptDataQuery.purchaseDateFilters = this.eqptPurchaseDateFilterArr.join();
|
|
|
this.eqptDataQuery.activationDateFilters = this.eqptActivationDateFilterArr.join();
|
|
|
+ this.eqptDataQuery.manufacturerFilters = this.eqptManufacturerFilterArr.join();
|
|
|
this.eqptDataQuery.calculateId = this.projectStore.calculateProgress.id;
|
|
|
this.eqptDataQuery.equipmentType = '非标设备';
|
|
|
getNonSDataPage(this.eqptDataQuery).then(res => {
|
|
|
this.eqptNonSPageData = res.data;
|
|
|
const $table = this.$refs.nonStandardTableRef as VxeTableInstance
|
|
|
if ($table) {
|
|
|
- const startTime = Date.now()
|
|
|
$table.loadData(this.eqptNonSPageData).then(() => {
|
|
|
- VxeUI.modal.message({
|
|
|
- content: `加载时间 ${Date.now() - startTime} 毫秒`,
|
|
|
- status: 'success'
|
|
|
+ ElMessage({
|
|
|
+ showClose: true,
|
|
|
+ message: '数据载入成功!',
|
|
|
+ type: 'success'
|
|
|
})
|
|
|
})
|
|
|
}
|
|
|
this.getEqptGnEvpList();
|
|
|
+ this.getEqptTableFilter(this.eqptNonSPageData);
|
|
|
})
|
|
|
},
|
|
|
// 获取测算表基础信息
|
|
@@ -1116,11 +1336,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 翻页时自动保存
|
|
|
- autoSave() {
|
|
|
- this.saveBatch();
|
|
|
- this.getEqptDataPage();
|
|
|
- },
|
|
|
// 通过设备名称判断参考数据中是否有符合的参考信息并设置
|
|
|
mostSimilar() {
|
|
|
for (let index = 0; index < this.eqptPageData.length; index++) {
|
|
@@ -1237,11 +1452,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 进口设备翻页自动保存
|
|
|
- autoSaveImp() {
|
|
|
- this.saveBatchImp();
|
|
|
- this.getImpEqptDataPage();
|
|
|
- },
|
|
|
// 更新非标设备测算
|
|
|
saveNonS(row) {
|
|
|
updateNonSData(row).then(res => {
|
|
@@ -1268,44 +1478,27 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 进口设备翻页自动保存
|
|
|
- autoSaveNonS() {
|
|
|
- this.saveBatchNonS();
|
|
|
- this.getNonSEqptDataPage();
|
|
|
- },
|
|
|
// 获取表格过滤条件
|
|
|
- getEqptTableFilter(queryType, eqptType) {
|
|
|
- let params = {
|
|
|
- calculateId: this.projectStore.calculateProgress.id,
|
|
|
- equipmentName: this.equipmentName,
|
|
|
- model: this.equipmentModel,
|
|
|
- purchaseDate: this.equipmentPurchaseDate,
|
|
|
- activationDate: this.equipmentActivationDate,
|
|
|
- queryType: queryType,
|
|
|
- eqptType: eqptType
|
|
|
- }
|
|
|
- getEqptTableFilterVO(params).then(res => {
|
|
|
- if (res.data.equipmentNameFilters) {
|
|
|
- this.equipmentNameFilters = res.data.equipmentNameFilters;
|
|
|
- this.eqptNameFilterArr = [];
|
|
|
- this.eqptDataQuery.eqptNameFilters = null
|
|
|
- }
|
|
|
- if (res.data.modelFilters) {
|
|
|
- this.equipmentModelFilters = res.data.modelFilters;
|
|
|
- this.eqptModelFilterArr = [];
|
|
|
- this.eqptDataQuery.modelFilters = null
|
|
|
- }
|
|
|
- if (res.data.purchaseDateFilters) {
|
|
|
- this.equipmenPurchaseDateFilters = res.data.purchaseDateFilters;
|
|
|
- this.eqptPurchaseDateFilterArr = [];
|
|
|
- this.eqptDataQuery.purchaseDateFilters = null
|
|
|
- }
|
|
|
- if (res.data.activationDateFilters) {
|
|
|
- this.equipmentActivationDateFilters = res.data.activationDateFilters;
|
|
|
- this.eqptActivationDateFilterArr = [];
|
|
|
- this.eqptDataQuery.activationDateFilters = null
|
|
|
- }
|
|
|
- })
|
|
|
+ getEqptTableFilter(eqptData) {
|
|
|
+ // 设备名称
|
|
|
+ this.equipmentNameFilters = this.uniqueProperties(eqptData, 'equipmentName');
|
|
|
+ this.eqptDataQuery.eqptNameFilters = null
|
|
|
+
|
|
|
+ // 设备型号
|
|
|
+ this.equipmentModelFilters = this.uniqueProperties(eqptData, 'model');
|
|
|
+ this.eqptDataQuery.modelFilters = null
|
|
|
+
|
|
|
+ // 购买日期
|
|
|
+ this.equipmenPurchaseDateFilters = this.uniqueProperties(eqptData, 'purchaseDate');
|
|
|
+ this.eqptDataQuery.purchaseDateFilters = null
|
|
|
+
|
|
|
+ // 启用日期
|
|
|
+ this.equipmentActivationDateFilters = this.uniqueProperties(eqptData, 'activationDate');
|
|
|
+ this.eqptDataQuery.activationDateFilters = null
|
|
|
+
|
|
|
+ // 生产厂家
|
|
|
+ this.equipmentManufacturerFilters = this.uniqueProperties(eqptData, 'manufacturer');
|
|
|
+ this.eqptDataQuery.manufacturerFilters = null
|
|
|
},
|
|
|
// 给表格列进行统一赋值
|
|
|
bathchSetTableValue(propName, value) {
|
|
@@ -1328,6 +1521,34 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ },
|
|
|
+ // 粘贴上传图片
|
|
|
+ imagePaste(e, row, columnName) {
|
|
|
+ let file = imagePasteHandler(e);
|
|
|
+ if (file) {
|
|
|
+ let fileData = new FormData();
|
|
|
+ fileData.append("file", file);
|
|
|
+ uploadImage(fileData).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ row[columnName] = res.data;
|
|
|
+ ElMessage({
|
|
|
+ showClose: true,
|
|
|
+ message: res.message,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 指定字段名进行数组去重并统计值数量
|
|
|
+ uniqueProperties(data, columnName) {
|
|
|
+ const uniqueMap = new Map();
|
|
|
+ data.forEach(item => {
|
|
|
+ if (!uniqueMap.has(item[columnName])) {
|
|
|
+ uniqueMap.set(item[columnName], data.filter(obj => obj[columnName] === item[columnName]).length);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return Array.from(uniqueMap, ([key, value]) => ({ filter: key, count: value }))
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -1384,7 +1605,8 @@ export default {
|
|
|
|
|
|
.search {
|
|
|
margin-bottom: 8px;
|
|
|
- float: right;
|
|
|
+ float: left;
|
|
|
+ margin-left: 10px;
|
|
|
}
|
|
|
|
|
|
.el-form-item {
|