From 047e21f94042e880a55eef11ca7a62d3224b62b6 Mon Sep 17 00:00:00 2001 From: chenhc <2369838784@qq.com> Date: Mon, 27 May 2024 09:35:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=200527=E5=BC=80=E5=8F=91=E8=AE=BA?= =?UTF-8?q?=E8=AF=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/inout/orderDetailResult.js | 8 + src/api/purchase/purApplyArgument.js | 35 + src/views/dev/js/deviceInfoFull.js | 106 ++- .../purApply/pureApplyDetailDialog.vue | 22 +- .../purApplyArgument/purApplyArgument.vue | 699 ++++++++++++++++++ 5 files changed, 811 insertions(+), 59 deletions(-) create mode 100644 src/api/purchase/purApplyArgument.js create mode 100644 src/views/purchase/purApplyArgument/purApplyArgument.vue diff --git a/src/api/inout/orderDetailResult.js b/src/api/inout/orderDetailResult.js index a4cf8936..26c3de4d 100644 --- a/src/api/inout/orderDetailResult.js +++ b/src/api/inout/orderDetailResult.js @@ -24,6 +24,14 @@ export function verifyTemplateFile(data) { }); } +export function verifyTemplateFileLabel(data) { + return axios({ + url: "/udiwms/pdf/templateLabel/order/result/file", + method: "post", + data: data + }); +} + export function printOrder(data) { return axios({ url: "/udiwms/inout/resultDetail/filterOrderPrint", diff --git a/src/api/purchase/purApplyArgument.js b/src/api/purchase/purApplyArgument.js new file mode 100644 index 00000000..b049fc19 --- /dev/null +++ b/src/api/purchase/purApplyArgument.js @@ -0,0 +1,35 @@ +import axios from "@/utils/request"; +import request from "@/utils/request"; + +export function list(query) { + return axios({ + url: '/purchase/purApplyArgument/list', + method: 'get', + params: query + }) +} + +export function updateArg(data) { + return request({ + url: "/purchase/purApplyArgument/updateArg", + method: 'post', + data: data + }) +} +export function printArg(data) { + return axios({ + url: "/purchase/purApplyArgument/printArg", + method: "post", + headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf + data: data + }); +} + + +export function argAllPass(id) { + return axios({ + url: '/purchase/purApplyArgument/argAllPass/' + id, + method: 'get' + }) +} diff --git a/src/views/dev/js/deviceInfoFull.js b/src/views/dev/js/deviceInfoFull.js index f0970b94..a367d0a8 100644 --- a/src/views/dev/js/deviceInfoFull.js +++ b/src/views/dev/js/deviceInfoFull.js @@ -4,7 +4,7 @@ import {downloadBase64Image} from "@/utils"; import deptDeviceDetail from "@/views/dev/DeptDeviceDetail.vue"; import {updateOrderItem } from "@/api/dev/deviceInfoApi";//保存到info import { - verifyTemplateFile, + verifyTemplateFile,verifyTemplateFileLabel, printDev, excelInoutImport, postExcelInoutImport } from '@/api/inout/orderDetailResult' @@ -168,92 +168,84 @@ export default { this.orderSelection = val; }, optinPrint() { - this.$confirm("是否确定打印选中出入库明细, 是否继续?", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", + this.$confirm('是否确定打印选中科室设备, 是否继续?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' }) .then(() => { if (this.orderSelection == null || this.orderSelection.length <= 0) { - return this.$message.error("请选择打印的明细!"); + return this.$message.error('请选择打印的明细!') } - // let query = {id: 5}; - // verifyTemplateFile(query).then((res) => { - // if (res.code === 20000) { + let query = { id: 5 } + + verifyTemplateFileLabel(query).then((res) => { + if (res.code === 20000) { let printParams = { - deptCode :this.query.deptCode, + deptCode: this.query.deptCode, deviceCode: this.query.deviceCode, productName: this.query.productName, status: this.query.status, - templateId: 4, - list: this.orderSelection - }; + list: this.orderSelection, + templateId: res.data + } printDev(printParams).then((response) => { //将pdf文件转换为url。 - const binaryData = []; - binaryData.push(response); + const binaryData = [] + binaryData.push(response) //获取blob链接。 let url = window.URL.createObjectURL( - new Blob(binaryData, {type: "application/pdf"}) - ); - this.loading = false; - window.open(url);//打开新标签页,预览pdf。 + new Blob(binaryData, { type: 'application/pdf' }) + ) + this.loading = false + window.open(url)//打开新标签页,预览pdf。 }) - // } else { - // return this.$message.error(res.message); - }).catch((error) => { - this.loading = false; - // this.$message.error(error.message); + } else { + return this.$message.error('摸版错误!') + } }) - // }) - // .catch(() => { - // }); - + }).catch((error) => { + this.loading = false + // this.$message.error(error.message); + }) }, selectPrint() { - this.$confirm("是否确定打印所有查询结果数据", "提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", + this.$confirm('是否确定打印所有查询结果数据', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' }) .then(() => { - - // let query = {id: 5}; - // verifyTemplateFile(query).then((res) => { - // if (res.code === 20000) { + let query = { id: 5 } + verifyTemplateFileLabel(query).then((res) => { + if (res.code === 20000) { let printParams = { - templateId: 4, - deptCode :this.query.deptCode, + deptCode: this.query.deptCode, deviceCode: this.query.deviceCode, productName: this.query.productName, status: this.query.status, - - }; + templateId: res.data + } printDev(printParams).then((response) => { //将pdf文件转换为url。 - const binaryData = []; - binaryData.push(response); + const binaryData = [] + binaryData.push(response) //获取blob链接。 let url = window.URL.createObjectURL( - new Blob(binaryData, {type: "application/pdf"}) - ); - this.loading = false; - window.open(url);//打开新标签页,预览pdf。 + new Blob(binaryData, { type: 'application/pdf' }) + ) + this.loading = false + window.open(url)//打开新标签页,预览pdf。 }) - // } else { - // this.$message.error(res.message); - // return - // } - // }).catch((error) => { - // this.loading = false; - // this.$message.error(error.message); + + } else { + return this.$message.error('摸版错误!') + } }) + }) - // }) - // .catch(() => { - // }); - return; + return }, selectExport() { diff --git a/src/views/purchase/purApply/pureApplyDetailDialog.vue b/src/views/purchase/purApply/pureApplyDetailDialog.vue index 15c163e1..ba7a929f 100644 --- a/src/views/purchase/purApply/pureApplyDetailDialog.vue +++ b/src/views/purchase/purApply/pureApplyDetailDialog.vue @@ -185,6 +185,8 @@ import {delApplyDetail, listApplyDetail, auditOrder} from "@/api/purchase/purApp import {filterAllByUser} from "@/api/system/invWarehouse"; import {filterSubByInv} from "@/api/system/invSubWarehouse"; import {getBusChange} from "@/api/basic/busTypeChange"; +import {argAllPass} from "@/api/purchase/purApplyArgument"; + export default { name: "idQuery", @@ -286,8 +288,24 @@ export default { this.approvalFlowDetailVisible = false; }, showApprovalFlowDetail() { - this.idQuery = this.formData - this.approvalFlowDetailVisible = true; + //先确定需要论证的都通过了 + this.formData.id + argAllPass(this.formData.id).then((response) => { + if (response.code === 20000) { + if (response.data == 1){ + this.idQuery = this.formData + this.approvalFlowDetailVisible = true; + }else if (response.data == 0){ + this.$message.warning("单据下有设备未完成论证!"); + }else if (response.data == 2){ + this.$message.warning("单据下有设备论证被拒绝!"); + } + } else { + this.$message.error(response.message); + } + }).catch(() => { + }); + }, //审核界面弹出按钮 saveOrder(status) { diff --git a/src/views/purchase/purApplyArgument/purApplyArgument.vue b/src/views/purchase/purApplyArgument/purApplyArgument.vue new file mode 100644 index 00000000..e93f7f5c --- /dev/null +++ b/src/views/purchase/purApplyArgument/purApplyArgument.vue @@ -0,0 +1,699 @@ + + + +