From c108a203665ee5f630ddaaa6901cff05e5975d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B3=BD=E8=85=BE?= <1178634255@qq.com> Date: Tue, 22 Aug 2023 14:04:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E8=B4=A8=E5=AF=8C=E6=96=87=E6=9C=AC?= =?UTF-8?q?=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/inout/DialogCreateOrder.vue | 3 + src/views/purchase/cert/supCertAddDialog.vue | 123 ++++++++---------- .../company/supCompanyAduditDialog.vue | 26 ++-- .../purchase/company/supCompanyEditDialog.vue | 48 ++++--- .../supManufacturerAuditDialog.vue | 30 ++--- .../supManufacturerEditDialog.vue | 30 ++--- .../product/supProductAuditDialog.vue | 26 ++-- .../purchase/product/supProductEditDialog.vue | 30 ++--- 8 files changed, 152 insertions(+), 164 deletions(-) diff --git a/src/views/inout/DialogCreateOrder.vue b/src/views/inout/DialogCreateOrder.vue index a406e7d3..6237b236 100644 --- a/src/views/inout/DialogCreateOrder.vue +++ b/src/views/inout/DialogCreateOrder.vue @@ -623,6 +623,7 @@ export default { invCode: null, fromCorp: null, fromCorpName: null, + fromName: null, fromInvCode: null, remark: null, fromType: 2, @@ -1460,6 +1461,8 @@ export default { JSON.parse(JSON.stringify(this.orderFormData)) ); tQuery.billNo = this.orderFormData.billNo; + console.log("tQuery:"); + console.log(tQuery); if (this.orderFormData.billNo == null) { this.$message.error("请先录入单据信息!"); return; diff --git a/src/views/purchase/cert/supCertAddDialog.vue b/src/views/purchase/cert/supCertAddDialog.vue index 3e9f5859..af631e1a 100644 --- a/src/views/purchase/cert/supCertAddDialog.vue +++ b/src/views/purchase/cert/supCertAddDialog.vue @@ -97,49 +97,41 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ 文件: +
+
+ + + + + {{ choiceFile }} + +
只能上传 jpg,png 文件,且不超过 3 MB
+
+ + + + + +
@@ -179,7 +171,6 @@ export default { data() { return { BASE_URL: process.env.VUE_APP_BASE_API, - newFilePath: this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=" + this.formData.filePath, code: "", isCleck:false, formData: { @@ -209,11 +200,12 @@ export default { }; }, components: { - // draggable, - // ElImageViewer + draggable, + ElImageViewer }, methods: { submitUpload() { + this.$refs["dataForm"].validate(valid => { if (valid) { if (this.formData.auditStatus == 1) { @@ -238,25 +230,22 @@ export default { onConfirmSubmit(val) { this.formData.repeatUpload = val; console.log(this.formData) - this.onSubmit(); - // this.formData.repeatUpload = val; - // console.log(this.formData) - // if (this.$isNotBlank(this.formData.filePath)) { - // if (this.$refs.upload.uploadFiles.length > 0) { - // this.$refs.upload.submit(); - // this.onSubmit(); - // } else { - // this.onSubmit(); - // } - // - // } else { - // console.log(this.$refs.upload.uploadFiles.length); - // if (this.$refs.upload.uploadFiles.length > 0) { - // this.$refs.upload.submit(); - // } else { - // this.$message.warning(`请选择文件`); - // } - // } + if (this.$isNotBlank(this.formData.filePath)) { + if (this.$refs.upload.uploadFiles.length > 0) { + this.$refs.upload.submit(); + this.onSubmit(); + } else { + this.onSubmit(); + } + + } else { + console.log(this.$refs.upload.uploadFiles.length); + if (this.$refs.upload.uploadFiles.length > 0) { + this.$refs.upload.submit(); + } else { + this.$message.warning(`请选择文件`); + } + } }, @@ -273,10 +262,8 @@ export default { this.formData.manufacturerIdFk = this.inputQuery.manufacturerIdFk; this.formData.productIdFk = this.inputQuery.productId; } - if (this.formData.auditStatus != 1){ + if (this.formData.auditStatus != 1) this.formData.auditStatus = "6"; - this.formData.filePath = this.$refs.editorRef.html - } if (this.editTye == 1) { insertCompanyCert(this.formData).then(response => { diff --git a/src/views/purchase/company/supCompanyAduditDialog.vue b/src/views/purchase/company/supCompanyAduditDialog.vue index 57a1417c..1ca7e09b 100644 --- a/src/views/purchase/company/supCompanyAduditDialog.vue +++ b/src/views/purchase/company/supCompanyAduditDialog.vue @@ -515,19 +515,19 @@ export default { 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1; }, showImgViewer(row){ - let newWindow = window.open(); - newWindow.document.write(row.filePath) - // this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; - // this.imgList=[]; - // previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => { - // if (response.code === 20000) { - // this.imgList=response.data; - // } - // }); - // this.imgViewerVisible = true; - // const m = (e) => { e.preventDefault() }; - // document.body.style.overflow = 'hidden'; - // document.addEventListener("touchmove", m, false); // 禁止页面滑动 + // let newWindow = window.open(); + // newWindow.document.write(row.filePath) + this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; + this.imgList=[]; + previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => { + if (response.code === 20000) { + this.imgList=response.data; + } + }); + this.imgViewerVisible = true; + const m = (e) => { e.preventDefault() }; + document.body.style.overflow = 'hidden'; + document.addEventListener("touchmove", m, false); // 禁止页面滑动 }, closeImgViewer() { this.imgViewerVisible = false; diff --git a/src/views/purchase/company/supCompanyEditDialog.vue b/src/views/purchase/company/supCompanyEditDialog.vue index 84da9f11..2d643ee3 100644 --- a/src/views/purchase/company/supCompanyEditDialog.vue +++ b/src/views/purchase/company/supCompanyEditDialog.vue @@ -10,13 +10,13 @@ - - {{ item.name }} - + + {{ item.name }} + @@ -417,9 +417,9 @@ export default { } , created() { - if(this.editType == 1){ - this.getCompanyCertList(); - } + if(this.editType == 1){ + this.getCompanyCertList(); + } this.getBasicUnitMaintainsList(); this.headers = { ADMIN_ID: store.getters.adminId, @@ -493,21 +493,19 @@ export default { } , showImgViewer(row) { - let newWindow = window.open(); - newWindow.document.write(row.filePath) - // this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; - // this.imgList = []; - // previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => { - // if (response.code === 20000) { - // this.imgList=response.data; - // } - // }); - // this.imgViewerVisible = true; - // const m = (e) => { - // e.preventDefault() - // }; - // document.body.style.overflow = 'hidden'; - // document.addEventListener("touchmove", m, false); // 禁止页面滑动 + this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; + this.imgList = []; + previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => { + if (response.code === 20000) { + this.imgList=response.data; + } + }); + this.imgViewerVisible = true; + const m = (e) => { + e.preventDefault() + }; + document.body.style.overflow = 'hidden'; + document.addEventListener("touchmove", m, false); // 禁止页面滑动 }, closeImgViewer() { this.imgViewerVisible = false; diff --git a/src/views/purchase/manufacturer/supManufacturerAuditDialog.vue b/src/views/purchase/manufacturer/supManufacturerAuditDialog.vue index c8696b66..383c4b2e 100644 --- a/src/views/purchase/manufacturer/supManufacturerAuditDialog.vue +++ b/src/views/purchase/manufacturer/supManufacturerAuditDialog.vue @@ -550,21 +550,21 @@ export default { 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1; }, showImgViewer(row) { - let newWindow = window.open(); - newWindow.document.write(row.filePath) - // this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; - // this.imgList = []; - // previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => { - // if (response.code === 20000) { - // this.imgList=response.data; - // } - // }); - // this.imgViewerVisible = true; - // const m = (e) => { - // e.preventDefault() - // }; - // document.body.style.overflow = 'hidden'; - // document.addEventListener("touchmove", m, false); // 禁止页面滑动 + // let newWindow = window.open(); + // newWindow.document.write(row.filePath) + this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; + this.imgList = []; + previewImage({imageUrl: row.filePath, certFileUrl: this.certFileUrl}).then(response => { + if (response.code === 20000) { + this.imgList=response.data; + } + }); + this.imgViewerVisible = true; + const m = (e) => { + e.preventDefault() + }; + document.body.style.overflow = 'hidden'; + document.addEventListener("touchmove", m, false); // 禁止页面滑动 }, closeImgViewer() { this.imgViewerVisible = false; diff --git a/src/views/purchase/manufacturer/supManufacturerEditDialog.vue b/src/views/purchase/manufacturer/supManufacturerEditDialog.vue index 27889461..001d2bc8 100644 --- a/src/views/purchase/manufacturer/supManufacturerEditDialog.vue +++ b/src/views/purchase/manufacturer/supManufacturerEditDialog.vue @@ -600,21 +600,21 @@ export default { 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1 }, showImgViewer(row) { - let newWindow = window.open(); - newWindow.document.write(row.filePath) - // this.certFileUrl = this.BASE_URL + '/udiwms/image/register/file/getImage?type=image2&name=' - // this.imgList = [] - // previewImage({ imageUrl: row.filePath, certFileUrl: this.certFileUrl }).then(response => { - // if (response.code === 20000) { - // this.imgList = response.data - // } - // }) - // this.imgViewerVisible = true - // const m = (e) => { - // e.preventDefault() - // } - // document.body.style.overflow = 'hidden' - // document.addEventListener('touchmove', m, false) // 禁止页面滑动 + // let newWindow = window.open(); + // newWindow.document.write(row.filePath) + this.certFileUrl = this.BASE_URL + '/udiwms/image/register/file/getImage?type=image2&name=' + this.imgList = [] + previewImage({ imageUrl: row.filePath, certFileUrl: this.certFileUrl }).then(response => { + if (response.code === 20000) { + this.imgList = response.data + } + }) + this.imgViewerVisible = true + const m = (e) => { + e.preventDefault() + } + document.body.style.overflow = 'hidden' + document.addEventListener('touchmove', m, false) // 禁止页面滑动 }, closeImgViewer() { this.imgViewerVisible = false diff --git a/src/views/purchase/product/supProductAuditDialog.vue b/src/views/purchase/product/supProductAuditDialog.vue index 10040ad6..153b5569 100644 --- a/src/views/purchase/product/supProductAuditDialog.vue +++ b/src/views/purchase/product/supProductAuditDialog.vue @@ -560,19 +560,19 @@ export default { indexOf(ext.toLowerCase()) !== -1; }, showImgViewer(row){ - let newWindow = window.open(); - newWindow.document.write(row.filePath) - // this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; - // this.imgList=[]; - // previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => { - // if (response.code === 20000) { - // this.imgList=response.data; - // } - // }); - // this.imgViewerVisible = true; - // const m = (e) => { e.preventDefault() }; - // document.body.style.overflow = 'hidden'; - // document.addEventListener("touchmove", m, false); // 禁止页面滑动 + // let newWindow = window.open(); + // newWindow.document.write(row.filePath) + this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name="; + this.imgList=[]; + previewImage({imageUrl:row.filePath,certFileUrl:this.certFileUrl}).then(response => { + if (response.code === 20000) { + this.imgList=response.data; + } + }); + this.imgViewerVisible = true; + const m = (e) => { e.preventDefault() }; + document.body.style.overflow = 'hidden'; + document.addEventListener("touchmove", m, false); // 禁止页面滑动 }, closeImgViewer(){ this.imgViewerVisible = false; diff --git a/src/views/purchase/product/supProductEditDialog.vue b/src/views/purchase/product/supProductEditDialog.vue index fa8774d7..c773ad1a 100644 --- a/src/views/purchase/product/supProductEditDialog.vue +++ b/src/views/purchase/product/supProductEditDialog.vue @@ -669,21 +669,21 @@ export default { 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'].indexOf(ext.toLowerCase()) !== -1 }, showImgViewer(row) { - let newWindow = window.open(); - newWindow.document.write(row.filePath) - // this.certFileUrl = this.BASE_URL + '/udiwms/image/register/file/getImage?type=image2&name=' - // this.imgList = [] - // previewImage({ imageUrl: row.filePath, certFileUrl: this.certFileUrl }).then(response => { - // if (response.code === 20000) { - // this.imgList = response.data - // } - // }) - // this.imgViewerVisible = true - // const m = (e) => { - // e.preventDefault() - // } - // document.body.style.overflow = 'hidden' - // document.addEventListener('touchmove', m, false) // 禁止页面滑动 + // let newWindow = window.open(); + // newWindow.document.write(row.filePath) + this.certFileUrl = this.BASE_URL + '/udiwms/image/register/file/getImage?type=image2&name=' + this.imgList = [] + previewImage({ imageUrl: row.filePath, certFileUrl: this.certFileUrl }).then(response => { + if (response.code === 20000) { + this.imgList = response.data + } + }) + this.imgViewerVisible = true + const m = (e) => { + e.preventDefault() + } + document.body.style.overflow = 'hidden' + document.addEventListener('touchmove', m, false) // 禁止页面滑动 }, closeImgViewer() { this.imgViewerVisible = false