From 41d44e93d471d8779b81b55f6d8e150039cd1f04 Mon Sep 17 00:00:00 2001 From: zhoulinf <2507241354@qq.com> Date: Tue, 5 Nov 2024 16:01:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=8D=95=E6=89=B9=E6=AC=A1=EF=BC=8C?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E6=89=B9=E6=AC=A1=E8=AF=A6=E6=83=85=EF=BC=8C?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=8F=91=E7=A5=A8=EF=BC=8C=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mine.js | 41 ++ src/assets/icon_upload.png | Bin 0 -> 524 bytes src/router/index.js | 17 + src/utils/http.js | 15 +- src/views/index/invoicingDetail.vue | 1 + src/views/index/invoicingNotify.vue | 9 +- src/views/index/showInvoice.vue | 144 +++++++ src/views/index/uploadInvoice.vue | 569 ++++++++++++++++++++++++++++ 8 files changed, 789 insertions(+), 7 deletions(-) create mode 100644 src/assets/icon_upload.png create mode 100644 src/views/index/showInvoice.vue create mode 100644 src/views/index/uploadInvoice.vue diff --git a/src/api/mine.js b/src/api/mine.js index 276e46bd..468756f2 100644 --- a/src/api/mine.js +++ b/src/api/mine.js @@ -222,6 +222,47 @@ export function uploadImage(data){ }) } +// 发票上传 +export function uploadInvoice(data){ + return request({ + url:'/order/taskInvoiceBatch/saveInvoiceImagesAndIdentify', + method:'POST', + contentType:'multipart/form-data', + data + }) +} + +// 删除发票 +export function deleteInvoice(data) { + return request({ + url:'/order/taskInvoiceBatch/deleteInfo', + method:'POST', + contentType:'multipart/form-data', + data + }) +} + +// 生成财务批次 +export function createBatch(data) { + return request({ + url:'/order/taskInvoiceBatch/supplierCreateFinanceBatch', + method:'POST', + contentType:'application/x-www-form-urlencoded', + data, + testFlag: true + }) +} + +// 获取服务商发票信息 +export function getBillingInfo(url, data) { + return request({ + url: url, + method:'POST', + contentType:'multipart/form-data', + data + }) +} + // ocr 识别 export function ocrHandler(data){ return request({ diff --git a/src/assets/icon_upload.png b/src/assets/icon_upload.png new file mode 100644 index 0000000000000000000000000000000000000000..2e12947f00cc7625a0a0405e2dc220e88f9ef37e GIT binary patch literal 524 zcmV+n0`vWeP)Px$#z{m$R7gwR)jdlbQ544U|AQoAASu#_onOJmCJ5PJmr87cs0gvJNf3)bKoc~D z*oY*Jg$v>vHkRo^6l9w;Y4QPLqomnl1;s4kIA@uKaWcCzv+G(o)o^Fd{oS{7u82Hl zHVeD~dZO(uyk7!eB(2qBRev$F7r-{)ZNC9)0q_uy?+@e0B^}lqF|#LtH}nBTNee9^ zwJiaOcGkJNS z4M`tjm1GH+&LU-nc7b=2Zd401^E_Pf3^g4FMK3jGRd)zj1=wf95WXEYM#PN%RkFn#M| literal 0 HcmV?d00001 diff --git a/src/router/index.js b/src/router/index.js index 31e2c509..6babee8c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -104,6 +104,23 @@ const routes = [ title: '工单批次详情' } }, + { + path: "/uploadInvoice", + name: 'uploadInvoice', + component: () => import('@/views/index/uploadInvoice.vue'), + meta: { + title: '上传发票', + cache: true + } + }, + { + path: "/showInvoice", + name: 'showInvoice', + component: () => import('@/views/index/showInvoice.vue'), + meta: { + title: '查看发票' + } + }, { path: "/vehicleManage", name: 'vehicleManage', diff --git a/src/utils/http.js b/src/utils/http.js index bf50a91d..1f055eca 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -15,22 +15,27 @@ let token = urlParams.get('token') ; localStorage.setItem('token', token); service.interceptors.request.use( config => { - let reqUrl=config.url + // let reqUrl=config.url // console.log("reqUrl",reqUrl) config.data = config.contentType ? config.data : qs.stringify(config.data) - config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded' + if (config.testFlag) { + config.data = qs.stringify(config.data, {arrayFormat: 'indices', allowDots: true}) + } + config.headers['Content-Type'] = config.contentType || 'application/x-www-form-urlencoded' let token = localStorage.getItem('token'); // let token='4099761587129c46b03c9316c9e866c9' // let token='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJzb25nIiwiYXVkIjpbInN1cHBsaWVyLWFwcCJdLCJuYmYiOjE3MTI0NTQ5NTMsInVzZXJfaW5mbyI6eyJ1c2VySWQiOjU0NjU0LCJwaG9uZSI6IjE3NjMwMDM1NjU4IiwibmFtZSI6InNvbmciLCJzdXBwbGllck5hbWUiOiJDLeS4iua1t-a1i-ivleacjeWKoeWVhiIsInN1cHBsaWVySWQiOjMzMDQxLCJzdXBwbGllclR5cGUiOjIsInVzZXJuYW1lIjoic29uZyIsInVzZXJUeXBlIjoicmVzY3VlQXBwIiwiZGV2aWNlSWQiOiIyMmI0OWNhMjBmOWI4MzMwZDk4NzIxNzNmMzllYTY4YmMiLCJhdXRob3JpdGllcyI6W119LCJzY29wZSI6WyJhbGwiXSwiaXNzIjoiaHR0cHM6Ly9zaW5vYXNzaXN0LmNvbSIsImV4cCI6MTcxMjU0MTM1MywiaWF0IjoxNzEyNDU0OTUzfQ.sPU9_OD_TOWcTwqmlawEGyo4mCPrEaRYw2R02gnvYJw' - if (reqUrl.includes("/driverApp")) { + config.headers['token'] = `${token}`; + config.headers['Authorization'] = `${token}`; + /*if (reqUrl.includes("/driverApp")) { // console.log("司机app") config.headers['token'] = `${token}`; - } else if(reqUrl.includes("/supplierApp") || reqUrl.includes("/supplierKPI") || reqUrl.includes('/supplier/select') || reqUrl.includes('/order')){ + } else if(reqUrl.includes("/supplierApp") || reqUrl.includes("/supplierKPI") || reqUrl.includes('/supplier/select') || reqUrl.includes('/order') || reqUrl.includes('/order/taskInvoiceBatch') || reqUrl.includes('/supplier') ){ // console.log("调度app,服务商kpi") config.headers['Authorization'] = `${token}`; }else{ config.headers['token'] = `${token}`; - } + }*/ return config }, error => { diff --git a/src/views/index/invoicingDetail.vue b/src/views/index/invoicingDetail.vue index 7be4f9fe..a8ded9f0 100644 --- a/src/views/index/invoicingDetail.vue +++ b/src/views/index/invoicingDetail.vue @@ -171,6 +171,7 @@ export default { background-color: #fff; width: 100%; padding: 15px 15px; + box-sizing: border-box; .tab_title { font-size: 14px; font-weight: bold; diff --git a/src/views/index/invoicingNotify.vue b/src/views/index/invoicingNotify.vue index 766bb277..7ba8d977 100644 --- a/src/views/index/invoicingNotify.vue +++ b/src/views/index/invoicingNotify.vue @@ -77,7 +77,7 @@ 开票总金额 ¥{{totalCount}} -
去开票
+
去开票
@@ -106,6 +106,7 @@ export default { batchCode: '', finished: false, checkList: [], + supplierId: '', } }, computed: { @@ -118,9 +119,13 @@ export default { }, }, mounted() { - // this.getNotifyList() + this.supplierId = this.$route.query?.supplierId; }, methods:{ + goUploadPage() { + localStorage.setItem('list', JSON.stringify(this.checkList)); + this.goPage('uploadInvoice', { supplierId : this.supplierId }) + }, async onSearch() { this.pageNum=1 await this.getNotifyList() diff --git a/src/views/index/showInvoice.vue b/src/views/index/showInvoice.vue new file mode 100644 index 00000000..268d5a44 --- /dev/null +++ b/src/views/index/showInvoice.vue @@ -0,0 +1,144 @@ + + + + + diff --git a/src/views/index/uploadInvoice.vue b/src/views/index/uploadInvoice.vue new file mode 100644 index 00000000..13907101 --- /dev/null +++ b/src/views/index/uploadInvoice.vue @@ -0,0 +1,569 @@ + + + + +