试运行问题修复

This commit is contained in:
hongchao 2025-05-09 18:03:24 +08:00
parent 062a2c097b
commit 64501c28d6
4 changed files with 171 additions and 55 deletions

View File

@ -25,6 +25,32 @@ export function getPurChaseReportDetailsListApi(query) {
})
}
// 新购入库验收合格报表-弹窗查询
export function getPurChaseReportSuccessListApi(query) {
return request({
url: '/material/bm_report/getPurChaseReportSuccessList',
method: 'get',
params: query
})
}
// 新购入库数量报表-弹窗查询
export function getPurChaseReportInBoundListApi(query) {
return request({
url: '/material/bm_report/getPurChaseReportInBoundList',
method: 'get',
params: query
})
}
// 新购入库数量报表-弹窗查询
export function getPurChaseReportNotInBoundListApi(query) {
return request({
url: '/material/bm_report/getPurChaseReportNotInBoundList',
method: 'get',
params: query
})
}
// 领料出库报表查询
export function getLeaseOutListApi(query) {

View File

@ -38,7 +38,7 @@
noOptionsText="没有数据"
noResultsText="没有搜索结果"
placeholder="请选择领用工程"
@select="projectChange"
/>
</el-form-item>
<el-form-item label="领料人" prop="leasePerson">
@ -136,23 +136,22 @@
:label="item.fullPath"
:value="item.typeId"
:data-key="item.typeId"
@mouseenter.native="showCustomTooltip(item, $event)"
@mouseleave.native="hideCustomTooltip"
>
<!-- <el-tooltip
placement="right"
popper-class="type-tooltip"
:open-delay="300"
>
<div slot="content">
<img src="https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg" style="max-width: 200px; max-height: 150px;" loading="lazy"/>
<p >库存: {{ item.storageNum }}</p>
</div>
<span v-html="highlightText(item.fullPath, searchKeyword)"></span>
</el-tooltip> -->
<!-- <span style="float: right; color: #8492a6; font-size: 13px">库存:{{ item.storageNum }}</span> -->
</el-option>
</el-select>
<div
v-if="currentTooltipItem"
class="custom-tooltip"
:style="{
left: tooltipPosition.x + 'px',
top: tooltipPosition.y + 'px'
}"
>
<img :src="currentTooltipItem.imageUrl || defaultImage" style="max-width: 200px; max-height: 150px;" @load="imageLoaded" @error="imageLoadError"/>
<p>库存: {{ currentTooltipItem.storageNum }}</p>
</div>
</el-col>
<el-col :span="6">
<el-input
@ -358,6 +357,7 @@
</span>
</el-dialog>
</div>
</template>
<script>
@ -548,7 +548,11 @@ export default {
dialogImageUrl: '',
dialogVisible: false,
uploadKey: Date.now(),
uploadUrl: process.env.VUE_APP_BASE_API + '/file/upload' //
uploadUrl: process.env.VUE_APP_BASE_API + '/file/upload', //
currentTooltipItem: null,
tooltipPosition: { x: 0, y: 0 },
defaultImage: 'https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg',
tooltipTimeout: null
}
},
computed: {
@ -603,6 +607,27 @@ export default {
console.log(this.$route.query, 'this.$route.query')
},
methods: {
showCustomTooltip(item, event) {
clearTimeout(this.tooltipTimeout);
this.tooltipTimeout = setTimeout(() => {
this.currentTooltipItem = item;
this.tooltipPosition = {
x: event.clientX + 15,
y: event.clientY + 15
};
}, 300); // 300ms
},
imageLoaded() {
this.shouldShowTooltip = true; //
},
imageLoadError() {
this.shouldShowTooltip = true; //
},
hideCustomTooltip() {
clearTimeout(this.tooltipTimeout);
this.currentTooltipItem = null;
},
// -tree
async getMaTypeNameOpt() {
try {
@ -758,22 +783,22 @@ export default {
this.isFileFbs = false
this.rules['bmFileInfos'][0].required = false
}
setTimeout(() => {
getListProject({ unitId: this.maForm.unitId }).then(response => {
this.projectList = response.data
this.maForm.projectId = null
})
}, 500)
},
projectChange(val) {
this.maForm.projectName = val.name
setTimeout(() => {
// projectId: this.maForm.projectId
getListUnite({}).then(response => {
this.uniteList = response.data
})
}, 500)
// setTimeout(() => {
// getListProject({ unitId: this.maForm.unitId }).then(response => {
// this.projectList = response.data
// this.maForm.projectId = null
// })
// }, 500)
},
// projectChange(val) {
// this.maForm.projectName = val.name
// setTimeout(() => {
// // projectId: this.maForm.projectId
// getListUnite({}).then(response => {
// this.uniteList = response.data
// })
// }, 500)
// },
async standardConfigChange(val) {
console.log('🚀 ~ standardConfigChange ~ val:', val)
const loading = this.$loading()
@ -1004,13 +1029,17 @@ export default {
},
//
async handleConfirm(type) {
await getAgreement({
unitId: this.maForm.unitId,
projectId: this.maForm.projectId
}).then(response => {
this.agreementId = response.data.agreementId
this.maForm.agreementId = this.agreementId
})
// await getAgreement({
// unitId: this.maForm.unitId,
// projectId: this.maForm.projectId
// }).then(response => {
// if(response.msg===""){
// this.maForm.agreementId = null
// }else{
// this.agreementId = response.data.agreementId
// this.maForm.agreementId = this.agreementId
// }
// })
await this.$modal
.confirm(type == 0 ? '是否确认提交' : '是否确认保存')
.then(async () => {
@ -1421,4 +1450,17 @@ export default {
.type-tooltip {
max-width: none !important;
}
.custom-tooltip {
position: fixed;
z-index: 9999;
background: rgb(6, 6, 6);
border: 1px solid #ebeef5;
border-radius: 4px;
padding: 12px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
pointer-events: none;
max-width: 250px;
color: white;
}
</style>

View File

@ -98,6 +98,7 @@ export default {
display: flex;
justify-content: center; /* 水平居中 */
align-items: flex-end; /* 垂直靠下 */
margin-top: 10px;
}
.f-count {
margin: 4px 0;

View File

@ -167,14 +167,14 @@
<el-form-item>
<el-button type="primary"
icon="el-icon-search" size="mini"
@click="handleDialogQuery"
@click="handleAcceptQuery"
>查询</el-button>
</el-form-item>
<el-form-item>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetDialogQuery"
@click="resetAcceptQuery"
>重置</el-button>
</el-form-item>
<el-form-item>
@ -182,7 +182,7 @@
type="warning"
icon="el-icon-download"
size="mini"
@click="handleDialogExport"
@click="handleAcceptExport"
>导出</el-button>
</el-form-item>
</el-form>
@ -193,8 +193,8 @@
<el-table-column label="机具名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
<el-table-column label="验收人" align="center" prop="name1" :show-overflow-tooltip="true"/>
<el-table-column label="验收时间" align="center" prop="name2" :show-overflow-tooltip="true"/>
<el-table-column label="采购价格(含税)" align="center" prop="purchasePrice" :show-overflow-tooltip="true"/>
<el-table-column label="采购价格(不含税)" align="center" prop="purchasePriceNoTax" :show-overflow-tooltip="true"/>
</el-table>
<pagination
v-show="dialogTotal > 0"
@ -218,14 +218,14 @@
<el-form-item>
<el-button type="primary"
icon="el-icon-search" size="mini"
@click="handleDialogQuery"
@click="handleInBoundQuery"
>查询</el-button>
</el-form-item>
<el-form-item>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetDialogQuery"
@click="resetInBoundQuery"
>重置</el-button>
</el-form-item>
<el-form-item>
@ -233,7 +233,7 @@
type="warning"
icon="el-icon-download"
size="mini"
@click="handleDialogExport"
@click="handleInBoundExport"
>导出</el-button>
</el-form-item>
</el-form>
@ -244,8 +244,8 @@
<el-table-column label="机具名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
<el-table-column label="设备编码" align="center" prop="maCode" :show-overflow-tooltip="true"/>
<el-table-column label="入库人" align="center" prop="name1" :show-overflow-tooltip="true"/>
<el-table-column label="入库时间" align="center" prop="name2" :show-overflow-tooltip="true"/>
<el-table-column label="采购价格(含税)" align="center" prop="purchasePrice" :show-overflow-tooltip="true"/>
<el-table-column label="采购价格(不含税)" align="center" prop="purchasePriceNoTax" :show-overflow-tooltip="true"/>
</el-table>
<pagination
v-show="dialogTotal > 0"
@ -269,14 +269,14 @@
<el-form-item>
<el-button type="primary"
icon="el-icon-search" size="mini"
@click="handleDialogQuery"
@click="handleWaitQuery"
>查询</el-button>
</el-form-item>
<el-form-item>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetDialogQuery"
@click="resetWaitQuery"
>重置</el-button>
</el-form-item>
<el-form-item>
@ -284,7 +284,7 @@
type="warning"
icon="el-icon-download"
size="mini"
@click="handleDialogExport"
@click="handleWaitExport"
>导出</el-button>
</el-form-item>
</el-form>
@ -310,7 +310,8 @@
</template>
<script>
import { getPurChaseReportListApi,getPurChaseReportListNoPageApi,getPurChaseReportDetailsListApi } from "@/api/report/report";
import { getPurChaseReportListApi,getPurChaseReportListNoPageApi,getPurChaseReportDetailsListApi,
getPurChaseReportSuccessListApi,getPurChaseReportInBoundListApi,getPurChaseReportNotInBoundListApi } from "@/api/report/report";
export default {
name: "Report",
data() {
@ -487,21 +488,21 @@
},
/** 查询验收合格数量弹框列表 */
getDialogAcceptDataList() {
getPurChaseReportDetailsListApi(this.dialogAcceptQuery).then((response) => {
getPurChaseReportSuccessListApi(this.dialogAcceptQuery).then((response) => {
this.dialogAcceptList = response.data.rows
this.dialogTotal = response.data.total
})
},
/** 查询入库数量弹框列表 */
getDialogInBoundDataList() {
getPurChaseReportDetailsListApi(this.dialogInBoundQuery).then((response) => {
getPurChaseReportInBoundListApi(this.dialogInBoundQuery).then((response) => {
this.dialogInBoundList = response.data.rows
this.dialogTotal = response.data.total
})
},
/** 查询待入库数量弹框列表 */
getDialogWaitDataList() {
getPurChaseReportDetailsListApi(this.dialogWaitQuery).then((response) => {
getPurChaseReportNotInBoundListApi(this.dialogWaitQuery).then((response) => {
this.dialogWaitList = response.data.rows
this.dialogTotal = response.data.total
})
@ -511,11 +512,36 @@
this.dialogQuery.pageNum = 1
this.getDialogDataList()
},
handleAcceptQuery() {
this.dialogAcceptQuery.pageNum = 1
this.getDialogAcceptDataList()
},
handleInBoundQuery() {
this.dialogInBoundQuery.pageNum = 1
this.getDialogInBoundDataList()
},
handleWaitQuery() {
this.dialogWaitQuery.pageNum = 1
this.getDialogWaitDataList()
},
/** 弹框重置操作 */
resetDialogQuery(){
this.dialogQuery.keyWord = "";
this.handleDialogQuery()
},
resetAcceptQuery(){
this.dialogAcceptQuery.keyWord = "";
this.handleAcceptQuery()
},
resetInBoundQuery(){
this.dialogInBoundQuery.keyWord = "";
this.handleInBoundQuery()
},
resetWaitQuery(){
this.dialogWaitQuery.keyWord = "";
this.handleWaitQuery()
},
/** 弹框导出操作 */
handleDialogExport() {
this.download(
@ -524,6 +550,27 @@
`新购入库报表_采购设备_${new Date().getTime()}.xlsx`,
)
},
handleAcceptExport() {
this.download(
'material/bm_report/exportPurChaseReportSuccessList',
{ ...this.dialogAcceptQuery},
`新购入库报表_验收合格设备_${new Date().getTime()}.xlsx`,
)
},
handleInBoundExport() {
this.download(
'material/bm_report/exportPurChaseReportInBoundList',
{ ...this.dialogInBoundQuery},
`新购入库报表_入库设备_${new Date().getTime()}.xlsx`,
)
},
handleWaitExport() {
this.download(
'material/bm_report/exportPurChaseReportNotInBoundList',
{ ...this.dialogWaitQuery},
`新购入库报表_待入库设备_${new Date().getTime()}.xlsx`,
)
},
}
};