From aa73d0d6a020af1442589ff9034ee89fe2cfcf06 Mon Sep 17 00:00:00 2001 From: jjLv <1981429112@qq.com> Date: Thu, 14 Nov 2024 17:31:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E6=96=99=E5=87=BA=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/lease/out.js | 20 ++++++ src/api/repair/testExamine.js | 7 ++ src/views/material/lease/outBound/index.vue | 72 ++++++++++++++----- .../testExamine/component/queryToolsApply.vue | 38 ++++------ .../material/repair/testExamine/index.vue | 4 +- 5 files changed, 96 insertions(+), 45 deletions(-) diff --git a/src/api/lease/out.js b/src/api/lease/out.js index ab896f20..3a55d032 100644 --- a/src/api/lease/out.js +++ b/src/api/lease/out.js @@ -17,6 +17,26 @@ export function outInfoList(id) { }) } +// 领料出库-编码出库详情信息 +export function getDetailsByTypeId(query) { + return request({ + url: '/material/ma_machine/list', + method: 'get', + params: query, + }) +} + +// 领料出库-编码出库 +export function submitOut(data) { + return request({ + url: '/material/lease_apply_info/leaseOut', + method: 'post', + data: data, + }) +} + + +//-------暂未用到----------- // 领料出库-新增 export function addApplyInfo(data) { return request({ diff --git a/src/api/repair/testExamine.js b/src/api/repair/testExamine.js index e50d69f3..1ce24116 100644 --- a/src/api/repair/testExamine.js +++ b/src/api/repair/testExamine.js @@ -8,6 +8,13 @@ export function getListTestExamineApply(query) { params: query }) } +// 查询修试审核详细列表 +export function getAudit(id) { + return request({ + url: '/material/repair_audit_details/' + id, + method: 'get', + }) +} diff --git a/src/views/material/lease/outBound/index.vue b/src/views/material/lease/outBound/index.vue index 2001d340..4d690bf3 100644 --- a/src/views/material/lease/outBound/index.vue +++ b/src/views/material/lease/outBound/index.vue @@ -182,7 +182,6 @@ style="margin-bottom: 10px" type="normal" @click="handleView(scope.row)" - v-if="scope.row.taskStatus != 3" >查看 - 待出库数量:{{ outNum }} + 待出库数量:{{ outNum }} import { getListLeaseApply } from "@/api/lease/apply"; -import { outInfoList } from "@/api/lease/out"; +import { outInfoList, getDetailsByTypeId, submitOut } from "@/api/lease/out"; export default { dicts: ["lease_task_status"], // components: { vueEasyPrint }, @@ -672,12 +671,14 @@ export default { // 总条数 total: 0, ViewTotal: 0, + outTotal: 0, // 弹出层标题 title: "", typeList: [], //出库数量 getListOutInfo: [], outCodeList: [], + maCodeList: [], // 日期范围 dateRange: [], statusDataRange: [], @@ -713,6 +714,8 @@ export default { printData: {}, printTableData: [], outNum: 0, + outObj: {}, + parentIdTemp: undefined, }; }, created() { @@ -721,7 +724,16 @@ export default { methods: { // 多选框选中数据 handleSelectionChange(selection) { + this.maCodeList = []; this.ids = selection.map((item) => item.id); + selection.forEach((item) => { + this.maCodeList.push({ + typeId: item.typeId, + manageType: 0, + maId: item.maId, + parentId: this.parentIdTemp, + }); + }); this.single = selection.length != 1; this.multiple = !selection.length; }, @@ -756,7 +768,18 @@ export default { this.handleQuery(); }, //出库搜索按钮 - handleQueryOutInfo() {}, + handleQueryOutInfo() { + this.queryOutInfo.pageNum = 1; + this.getDialogList(); + }, + + /** 出库查询列表 */ + getDialogList() { + outInfoList(this.queryOutInfo.id).then((response) => { + this.getListOutInfo = response.data.leaseApplyDetailsList; + // this.loading = false; + }); + }, resetQueryOutInfo() {}, /** 查看按钮操作 */ @@ -768,6 +791,7 @@ export default { handleOut(row) { this.title = "出库"; this.showOutInfo = true; + this.queryOutInfo.id = row.id; outInfoList(row.id).then((response) => { this.getListOutInfo = response.data.leaseApplyDetailsList; // this.loading = false; @@ -783,23 +807,37 @@ export default { this.openCode = true; // this.resetForm("codeOutForm"); // this.resetForm("outQuery"); + this.parentIdTemp = row.parentId; this.outNum = row.outNum; - // this.outQuery.typeId = row.typeId; - // this.outObj = row; - // this.handleCodeOutQuery(); + this.outQuery.typeId = row.typeId; + this.outObj = row; + this.handleOutQuery(); }, getCodeList() { - // getDetailsByTypeId(this.outQuery).then((response) => { - // this.outCodeList = response.data.rows; - // if (response.data.total) { - // this.outTotal = response.data.total; - // } - // }); + getDetailsByTypeId(this.outQuery).then((response) => { + this.outCodeList = response.rows; + if (response.total) { + this.outTotal = response.total; + } + }); }, - handleOutQuery() {}, + handleOutQuery() { + this.outQuery.pageNum = 1; + this.getCodeList(); + }, + resetOutQuery() {}, - saveCodeOut() {}, + + saveCodeOut() { + let param = { leaseOutDetailsList: this.maCodeList }; + submitOut(param).then((response) => { + this.$modal.msgSuccess("出库成功"); + this.openCode = false; + this.handleQueryOutInfo(); + this.handleQuery(); + }); + }, handleCodeOutQuery() {}, // 表单重置 reset() { diff --git a/src/views/material/repair/testExamine/component/queryToolsApply.vue b/src/views/material/repair/testExamine/component/queryToolsApply.vue index 920c4dab..33b03cf4 100644 --- a/src/views/material/repair/testExamine/component/queryToolsApply.vue +++ b/src/views/material/repair/testExamine/component/queryToolsApply.vue @@ -136,12 +136,7 @@ diff --git a/src/views/material/repair/testExamine/index.vue b/src/views/material/repair/testExamine/index.vue index f6b982d0..a33f5a19 100644 --- a/src/views/material/repair/testExamine/index.vue +++ b/src/views/material/repair/testExamine/index.vue @@ -27,13 +27,13 @@ import PageHeaderApply from "@/components/pageHeaderApply"; import Home from "./component/homeApply.vue"; // 主列表 // import AddTools from "./component/addToolsApply.vue"; // 新增机具 和 修改机具 -// import QueryTools from "./component/queryToolsApply.vue"; // 查询机具 和 验收机具 +import QueryTools from "./component/queryToolsApply.vue"; // 查询机具 和 验收机具 export default { components: { Home, PageHeaderApply, // AddTools, - // QueryTools, + QueryTools, }, data() { return {