From d52342dd3eee55140c30e0f87065ad56804b4386 Mon Sep 17 00:00:00 2001 From: wangwei <1610949092@qq.com> Date: Sat, 6 May 2023 15:32:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E5=8F=91=E7=A5=A8=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/auth/authDept.js | 2 +- src/api/purchase/supCompany.js | 221 +++--- src/views/inout/InvoiceCkeck.vue | 692 ++++++++++++++++++ src/views/inout/InvoiceRegistration.vue | 162 ++-- .../inout/InvoiceRegistrationDetermine.vue | 92 ++- 5 files changed, 972 insertions(+), 197 deletions(-) create mode 100644 src/views/inout/InvoiceCkeck.vue diff --git a/src/api/auth/authDept.js b/src/api/auth/authDept.js index 3ceab3b9..ddf44b10 100644 --- a/src/api/auth/authDept.js +++ b/src/api/auth/authDept.js @@ -1,4 +1,4 @@ -import axios from "../../utils/request"; +import axios from "@/utils/request"; export function filterDepts(query) { return axios({ diff --git a/src/api/purchase/supCompany.js b/src/api/purchase/supCompany.js index ce87f3bd..8c026c19 100644 --- a/src/api/purchase/supCompany.js +++ b/src/api/purchase/supCompany.js @@ -1,156 +1,169 @@ import axios from "@/utils/request"; export function getSupComapnys(query) { - return axios( - { - url: "/api/pur/getSupComapnys", - method: "get", - params: query - } - ); + return axios( + { + url: "/api/pur/getSupComapnys", + method: "get", + params: query + } + ); } export function delSupComapnys(query) { - return axios( - { - url: "/api/pur/supCompany/delete", - method: "post", - data: query - } - ); + return axios( + { + url: "/api/pur/supCompany/delete", + method: "post", + data: query + } + ); } export function modifyCompany(query) { - return axios( - { - url: "/api/pur/modifyCompany", - method: "post", - data: query - } - ); + return axios( + { + url: "/api/pur/modifyCompany", + method: "post", + data: query + } + ); } export function auditCompany(query) { - return axios( - { - url: "/api/pur/auditCompany", - method: "post", - data: query - } - ); + return axios( + { + url: "/api/pur/auditCompany", + method: "post", + data: query + } + ); } +export function getRoId(params) { + return axios( + { + url: "/api/pur/supCompany/getRoId", + method: "get", + params: params + } + ); +} + + + export function addCompany(query) { - return axios( - { - url: "/api/pur/addCompany", - method: "post", - data: query - } - ); + return axios( + { + url: "/api/pur/addCompany", + method: "post", + data: query + } + ); } export function getRefid(query) { - return axios( - { - url: "/sale/info/refid", - method: "get", - params: query - } - ); + return axios( + { + url: "/sale/info/refid", + method: "get", + params: query + } + ); } export function checkCompany(query) { - return axios( - { - url: "/salewarehouse/register/checkCompany", - method: "get", - params: query - } - ); + return axios( + { + url: "/salewarehouse/register/checkCompany", + method: "get", + params: query + } + ); } export function getRegisterConfig(query) { - return axios( - { - url: "/salewarehouse/register/getRegisterConfig", - method: "get", - params: query - } - ); + return axios( + { + url: "/salewarehouse/register/getRegisterConfig", + method: "get", + params: query + } + ); } export function getSubCompany(query) { - return axios( - { - url: "/sale/info/getSubCompany", - method: "get", - params: query - } - ); + return axios( + { + url: "/sale/info/getSubCompany", + method: "get", + params: query + } + ); } export function verifyTemplateFile(data) { - return axios({ - url: "/sup/info/verifyTemplateFile", - method: "post", - data: data - }); + return axios({ + url: "/sup/info/verifyTemplateFile", + method: "post", + data: data + }); } export function printSupCert(data) { - return axios({ - url: "/sup/info/printOrder", - method: "post", - headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, - responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf - data: data - }); + return axios({ + url: "/sup/info/printOrder", + method: "post", + headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf + data: data + }); } export function bindCorp(query) { - return axios( - { - url: "/sup/company/selectBind", - method: "post", - data: query - } - ); + return axios( + { + url: "/sup/company/selectBind", + method: "post", + data: query + } + ); } export function filterCompanyCertIdList(query) { - return axios( - { - url: "/sup/info/filterCompanyCertIdList", - method: "post", - data: query - } - ); + return axios( + { + url: "/sup/info/filterCompanyCertIdList", + method: "post", + data: query + } + ); } export function printSupCertManufacturer(data) { - return axios({ - url: "/sup/info/printSupCertManufacturer", - method: "post", - headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, - responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf - data: data - }); + return axios({ + url: "/sup/info/printSupCertManufacturer", + method: "post", + headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf + data: data + }); } export function printSupCertProduction(data) { - return axios({ - url: "/sup/info/printSupCertProduction", - method: "post", - headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, - responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf - data: data - }); + return axios({ + url: "/sup/info/printSupCertProduction", + method: "post", + headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}, + responseType: 'arraybuffer', //一定要设置响应类型,否则页面会是空白pdf + data: data + }); } + export function previewImage(data) { return axios({ url: "/udiwms/image/register/file", @@ -166,3 +179,5 @@ export function previewImage(data) { + + diff --git a/src/views/inout/InvoiceCkeck.vue b/src/views/inout/InvoiceCkeck.vue new file mode 100644 index 00000000..577638fb --- /dev/null +++ b/src/views/inout/InvoiceCkeck.vue @@ -0,0 +1,692 @@ + + + 登记 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ choiceFile }} + + 只能上传 jpg,png,pdf,doc 文件,且不超过 10 MB + + + + + + + + 文件预览 + + + + + + + + + + + + 单据 {{ input.billNo }}-单据详情 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/inout/InvoiceRegistration.vue b/src/views/inout/InvoiceRegistration.vue index 6c557c24..8e6da726 100644 --- a/src/views/inout/InvoiceRegistration.vue +++ b/src/views/inout/InvoiceRegistration.vue @@ -140,6 +140,19 @@ border @row-click="handleSelectionChange"> + + + + 未登记 + + + 未全部登记 + + + 全部登记 + + + @@ -179,22 +192,22 @@ - - - - 未登记 - - - 未全部登记 - - - 全部登记 - - - 确认 + 发票登记 + + 刷新 + @@ -216,6 +229,22 @@ row-key="id" highlight-current-row > + + + + 未登记 + + + 全部登记 + + + + - - - - 未登记 - - - 全部登记 - - - + + - - - - 发票登记 - - - + + + + + + + + + + + + + + + + + { - insertInvoice(row) - .then(response => { - if (response.code === 20000) { - this.closeInvoice(row); - } else { - this.$message.error(response.message); - } - }) - .catch((response) => { - this.$message.error(response.message); - }); - }).catch(() => { - }); - // 加状态 - updateorderBiz(row).then(res =>{ + InvoiceRegister1(row){ + this.inputInv=row; + this.checkInvoice=true; + }, + closecheckInvoice(){ + this.checkInvoice=false; + this.getCodeDetailList(); + this.getBizDetailListInv(); - }) }, onSubmit() { @@ -793,6 +829,7 @@ export default { type: "success", message: "删除成功!", }); + this.getCodeDetailList(); } }) .catch(() => { @@ -806,6 +843,7 @@ export default { handleSelectionChange(val) { this.currentRow.billNo = val.billNo; this.getOrderDetails(); + this.getBizDetailListInv(); }, // 获取单据 业务详情、扫码详情、扫码明细 getOrderDetails() { @@ -945,10 +983,10 @@ export default { this.$message.error("请先选择需要查询的单据!") return; } - this.codeQuery.orderIdFk = this.currentRow.billNo; this.codeDetailLoading = true; - getBizDetailListInv(this.codeQuery).then((res) => { + + filterBizOrderList(this.codeQuery).then((res) => { this.codeDetailLoading = false; if (res.code === 20000) { this.codeDetailList = res.data.list || []; @@ -988,6 +1026,7 @@ export default { if(row != null) { this.bizQuery.batchNo = row.batchNo; this.bizQuery.relId = row.bindRlFk; + this.bizQuery.bizIdFk = row.id; } filterListInvoice(this.bizQuery).then((res) => { this.bizDetailLoading = false; @@ -1044,6 +1083,7 @@ export default { closeAcceptDialog() { this.Upinvoice = false; this.getBizDetailListInv(); + this.getOrderDetails(); }, closeInvoice(row) { diff --git a/src/views/inout/InvoiceRegistrationDetermine.vue b/src/views/inout/InvoiceRegistrationDetermine.vue index c5eb8a2f..02338cdf 100644 --- a/src/views/inout/InvoiceRegistrationDetermine.vue +++ b/src/views/inout/InvoiceRegistrationDetermine.vue @@ -10,31 +10,31 @@ - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + @@ -46,6 +46,16 @@ row-key="id" highlight-current-row > + + + + 未登记 + + + 全部登记 + + + + label="发票编码" + prop="invoiceCodes" + show-overflow-tooltip + > { - this.closeDialog(); - }).catch((error) => { + let index = this.codeDetailList.findIndex(item=>item.regStatus==false) + if(index!=-1){ + this.$confirm("还有未登记的发票, 是否继续提交?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then( ()=>{ + updateOrder(data).then((res) => { + this.closeDialog(); + }).catch((error) => { + }) + }).catch( ()=>{ + + }) + + }else{ + updateOrder(data).then((res) => { + this.closeDialog(); + }).catch((error) => { + }) + } + - }) }, showImgViewer(row) { this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";