diff --git a/api/oa.js b/api/oa.js index 2545cf8..02a964a 100644 --- a/api/oa.js +++ b/api/oa.js @@ -115,6 +115,7 @@ export const deletelink= (data) => oahttp.post('/project_index/delete_link',data + //获取项目任务列表 export const projecttasklist = (data) => oahttp.get('/project_task/index',data) //新增项目任务 @@ -155,7 +156,7 @@ export const appmessageinbox = (data) => oahttp.get('/message_index/inbox',data) //获取审批消息 export const appmessageread = (data) => oahttp.get('/message_index/read',data) //流程审批 -export const appflow_check = (data) => oahttp.post('/oa_approve/flow_check',data) +export const appflow_check = (data) => oahttp.post('/common/flow_check',data) //获取审批消息 export const appapproveview= (data) => oahttp.get('/oa_approve/view',data) @@ -193,6 +194,8 @@ export const topayview = (data) => oahttp.get('/finance_expense/topay',data) //获取报销打款 export const checkedlist = (data) => oahttp.get('/finance_expense/checkedlist',data) +//报销设置打款状态 +export const expenstopay = (data) => oahttp.post('/finance_expense/topay',data) //发票 //我申请的发票 @@ -254,5 +257,13 @@ export const deleteincome = (data) => oahttp.post('/finance_income/delete',data) // 获取未读消息数 export const msgcount = (data) => oahttp.get('/common/msg_count',data) +//删除审批消息 export const deletemessage = (data) => oahttp.post('/message_index/delete',data) +//获取审批审核人员所有审批】 +export const flowusers = (data) => oahttp.post('/common/get_flow_users',data) + + +//获取审批审核人员所有审批】 +export const flownodes = (data) => oahttp.post('/common/get_flow_nodes',data) + diff --git a/api/upload.js b/api/upload.js index dc41137..806bcb7 100644 --- a/api/upload.js +++ b/api/upload.js @@ -8,7 +8,7 @@ let header = HEADER; } function uploads(src, type) { return new Promise((resolve, reject) => { - // console.log('上传', type === 'img' ? '图片' : '视频', ':', src) + // //console.log('上传', type === 'img' ? '图片' : '视频', ':', src) let a = uni.uploadFile({ // url: base.baseUrl + '/upload?token=', url: HTTP_REQUEST_URL_TWO + '/api' + '/upload?token=', @@ -25,7 +25,7 @@ function uploads(src, type) { }, fail: (err) => { reject(err) - console.log('upload-上传失败', err) + //console.log('upload-上传失败', err) } }); }) @@ -33,7 +33,7 @@ function uploads(src, type) { function oaUploads(src, type) { return new Promise((resolve, reject) => { - // console.log('上传', type === 'img' ? '图片' : '视频', ':', src) + // //console.log('上传', type === 'img' ? '图片' : '视频', ':', src) let a = uni.uploadFile({ url: HTTP_REQUEST_URL_THREE + '/api/common/upload', @@ -52,7 +52,7 @@ function oaUploads(src, type) { }, fail: (err) => { reject(err) - console.log('upload-上传失败', err) + //console.log('upload-上传失败', err) } }); }) diff --git a/components/UploadDemo.vue b/components/UploadDemo.vue index 15cde1a..ec0ee9d 100644 --- a/components/UploadDemo.vue +++ b/components/UploadDemo.vue @@ -98,7 +98,7 @@ export default { // }); }, handleUploadCallback(e) { - console.log('UploadCallback', e); + //console.log('UploadCallback', e); if (['choose', 'success'].includes(e.type)) { // 根据接口返回修改对应的response相关的逻辑 const tmpFiles = (e.data || []).map(({ response, tempFilePath, name, fileType }) => { @@ -125,25 +125,25 @@ export default { }, // 自定义上传 handleUploadFile({ url }) { - console.log('UploadFile', url); + //console.log('UploadFile', url); uni.uploadFile({ url: 'http://192.168.31.185:3000/api/upload', filePath: url, name: 'file', success: (res) => { - console.log('handleUpload success', res); + //console.log('handleUpload success', res); const tmpData = JSON.parse(res.data); uni.showToast({ title: tmpData.success ? '上传成功' : '上传失败', icon: 'none' }); }, fail: (err) => { - console.log('handleUpload fail', err); + //console.log('handleUpload fail', err); uni.showToast({ title: '出错啦', icon: 'none' }); }, }); }, // 预览 handlePreview({ url }) { - console.log('PreviewFile', url); + //console.log('PreviewFile', url); const fileType = this.getFileType(url); if (fileType === 'image') { return uni.previewImage({ @@ -156,7 +156,7 @@ export default { return uni.openDocument({ filePath: url, fail: (err) => { - console.log(err); + //console.log(err); uni.showToast({ icon: 'none', title: '文件预览失败' }); }, }); diff --git a/components/return/index.vue b/components/return/index.vue index 50282f4..3baeba8 100644 --- a/components/return/index.vue +++ b/components/return/index.vue @@ -35,7 +35,7 @@ } }, mounted() { - console.log(this.isshow) + //console.log(this.isshow) }, methods: { close(){ @@ -46,7 +46,7 @@ returnbom() { uni.sendHostEvent('closeApp', (ret) => { //发送消息成功回调 - console.log('关闭应用' + JSON.stringify(ret)); + //console.log('关闭应用' + JSON.stringify(ret)); }); } } diff --git a/components/w-picker/date-picker.vue b/components/w-picker/date-picker.vue index c0154d5..81c15e2 100644 --- a/components/w-picker/date-picker.vue +++ b/components/w-picker/date-picker.vue @@ -168,7 +168,7 @@ break; } if(!strReg.test(value)){ - console.log(new Error("请传入与mode、fields匹配的value值,例value="+example+"")) + //console.log(new Error("请传入与mode、fields匹配的value值,例value="+example+"")) } return strReg.test(value); }, diff --git a/components/w-picker/half-picker.vue b/components/w-picker/half-picker.vue index 0fdfb33..2f0500e 100644 --- a/components/w-picker/half-picker.vue +++ b/components/w-picker/half-picker.vue @@ -67,7 +67,7 @@ checkValue(value){ let strReg=/^\d{4}-\d{2}-\d{2} [\u4e00-\u9fa5]{2}$/,example; if(!strReg.test(value)){ - console.log(new Error("请传入与mode、fields匹配的value值,例value="+example+"")) + //console.log(new Error("请传入与mode、fields匹配的value值,例value="+example+"")) } return strReg.test(value); }, diff --git a/components/w-picker/range-picker.vue b/components/w-picker/range-picker.vue index 7dd8b5b..beff484 100644 --- a/components/w-picker/range-picker.vue +++ b/components/w-picker/range-picker.vue @@ -74,7 +74,7 @@ checkValue(value){ let strReg=/^\d{4}-\d{2}-\d{2}$/,example="2020-04-03"; if(!strReg.test(value[0])||!strReg.test(value[1])){ - console.log(new Error("请传入与mode匹配的value值,例["+example+","+example+"]")) + //console.log(new Error("请传入与mode匹配的value值,例["+example+","+example+"]")) } return strReg.test(value[0])&&strReg.test(value[1]); }, diff --git a/components/w-picker/shortterm-picker.vue b/components/w-picker/shortterm-picker.vue index d133cf4..53d164f 100644 --- a/components/w-picker/shortterm-picker.vue +++ b/components/w-picker/shortterm-picker.vue @@ -56,7 +56,7 @@ checkValue(value){ let strReg=/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}(:\d{2})?$/,example="2019-12-12 18:05:00或者2019-12-12 18:05"; if(!strReg.test(value)){ - console.log(new Error("请传入与mode、fields匹配的value值,例value="+example+"")) + //console.log(new Error("请传入与mode、fields匹配的value值,例value="+example+"")) } return strReg.test(value); }, diff --git a/components/w-picker/time-picker.vue b/components/w-picker/time-picker.vue index 2fc57e4..96909bb 100644 --- a/components/w-picker/time-picker.vue +++ b/components/w-picker/time-picker.vue @@ -56,7 +56,7 @@ checkValue(value){ let strReg=/^\d{2}:\d{2}:\d{2}$/,example="18:00:05"; if(!strReg.test(value)){ - console.log(new Error("请传入与mode、fields匹配的value值,例value="+example+"")) + //console.log(new Error("请传入与mode、fields匹配的value值,例value="+example+"")) } return strReg.test(value); }, diff --git a/libs/login.js b/libs/login.js index 9346b8f..f70b5d3 100644 --- a/libs/login.js +++ b/libs/login.js @@ -23,7 +23,7 @@ import { function prePage() { let pages = getCurrentPages(); - console.log(pages) + //console.log(pages) let prePage = pages[pages.length - 2]; // #ifdef H5 return prePage; diff --git a/libs/uniApi.js b/libs/uniApi.js index ffd8def..ca99e9c 100644 --- a/libs/uniApi.js +++ b/libs/uniApi.js @@ -1,7 +1,7 @@ // import uniCopy from '@/js_sdk/xb-copy/uni-copy.js'; // 拷贝功能插件 // import compressImage from './compressImage.js'; // 解决图片旋转90°问题 // const device = uni.getSystemInfoSync(); -// console.log("device:======================== " + JSON.stringify(device)); +// //console.log("device:======================== " + JSON.stringify(device)); /* 参数说明 @url @@ -180,7 +180,7 @@ export function GetUserInfo() { return new Promise((reslove, reject) => { uni.getUserInfo({ success(res) { - console.log(res); + //console.log(res); reslove(res); }, fail(rej) { @@ -258,9 +258,9 @@ export function chooseImage(count) { } // function compressImageHandler(src) { -// // console.log('platform===' + device.platform) +// // //console.log('platform===' + device.platform) // const tempPath = compressImage(src, device.platform); -// // console.log('tempPath-----' + tempPath); +// // //console.log('tempPath-----' + tempPath); // return tempPath // } //序列化对象和数组 diff --git a/pages.json b/pages.json index 9fdb29f..2d0e2bf 100644 --- a/pages.json +++ b/pages.json @@ -5,7 +5,10 @@ "path": "pages/index/index", "style": { "navigationBarTitleText": "首页", - "navigationStyle": "custom" + + "navigationStyle": "custom", + "enablePullDownRefresh": true + } }, { @@ -37,6 +40,13 @@ "navigationBarBackgroundColor": "#3274F9", "navigationBarTextStyle": "white" } + },{ + "path": "pages/oaTask/detail", + "style": { + "navigationBarTitleText": "任务详情", + "navigationBarBackgroundColor": "#3274F9", + "navigationBarTextStyle": "white" + } }, { "path": "pages/employees/index", @@ -46,6 +56,7 @@ "navigationBarTextStyle": "white" } }, + { "path": "pages/structure/index", "style": { @@ -55,7 +66,7 @@ } }, - + { "path": "pages/examine/index", "style": { @@ -68,7 +79,7 @@ "path": "pages/appcenter/index", "style": { "navigationBarTitleText": "应用中心", - "navigationBarBackgroundColor": "#3274F9", + "navigationBarBackgroundColor": "#3274F9", "navigationBarTextStyle": "white" } }, @@ -174,6 +185,13 @@ "navigationBarBackgroundColor": "#3274F9", "navigationBarTextStyle": "white" } + }, { + "path": "pages/project/detail", + "style": { + "navigationBarTitleText": "项目详情", + "navigationBarBackgroundColor": "#3274F9", + "navigationBarTextStyle": "white" + } }, { "path": "pages/addproject/index", diff --git a/pages/addemployees/index.vue b/pages/addemployees/index.vue index bcb6696..7a02461 100644 --- a/pages/addemployees/index.vue +++ b/pages/addemployees/index.vue @@ -233,7 +233,7 @@ }) this.companydetail(option.data) // this.buname= - // console.log(this.columns3[0]) + // //console.log(this.columns3[0]) } this.getDocumentList() @@ -328,7 +328,7 @@ this.flag1 = false }, confirm1(e) { - console.log(e) + //console.log(e) this.merchantData.position_id = e.value[0].id this.companygw = e.value[0].title this.flag2 = false @@ -337,7 +337,7 @@ validateForm: function() { let that = this, value = that.merchantData; - console.log(that.merchantData) + //console.log(that.merchantData) if (!value.thumb) return Toast( '请选择头像' ); @@ -386,7 +386,7 @@ }, async submit() { let that = this - console.log(that.validate) + //console.log(that.validate) if (this.validateForm() && this.validate) { const res = await addcomanyer(this.merchantData) Toast(res.msg); @@ -413,12 +413,12 @@ Toast('上传成功') }).catch(err => { - console.log('err', err); + //console.log('err', err); Toast('上传失败') }) }, fail: function(err) { - console.log('choose失败'); + //console.log('choose失败'); Toast('添加失败') } }); diff --git a/pages/invoice/add.vue b/pages/invoice/add.vue index 486418d..0169ce1 100644 --- a/pages/invoice/add.vue +++ b/pages/invoice/add.vue @@ -9,13 +9,13 @@ - + 开票类型: - + 开票主体: @@ -62,12 +62,12 @@ - + 银行营业网点 : - + 地址: @@ -79,49 +79,67 @@ - + - - - + :instantly="true" @change="changeFile" @uploadEnd='onuploadEnd' @progress='onprogre'> - - - + + 选择审批流程: - + 审核人: + + + + + + 第{{i+1}}级 {{item.flow_type_txt}} + + + + + + + + {{items.name}} + + + + 抄送人: @@ -145,17 +163,17 @@ + @close="flowPathShow=false" @cancel="flowPathShow=false" :closeOnClickOverlay="true" :closeOnClickAction="true"> @@ -176,12 +194,12 @@ Toast } from '../../libs/uniApi' import { - - - + + + flowusers, userdepartment, getemployee, - addinvoice, + addinvoice, invoicecate, appexpenseview, invoiceview, @@ -191,6 +209,9 @@ import { FILE_URL } from '@/api/file.js' + import { + HTTP_REQUEST_URL + } from '@/config/app.js' export default { components: { lsjUpload @@ -221,7 +242,7 @@ columns: [], check_admin_name: '', copy_names: '', - isshow:true, + isshow: true, columns1: [{ name: '增值税专用发票', id: 1, @@ -229,11 +250,11 @@ { name: '普通发票', id: 2, - },{ + }, { name: '专用发票', id: 3 } - + ], list: [{ cate_title: "", @@ -243,11 +264,17 @@ fileOption: {}, files: new Map(), fileArray: [], - dnum: 0 + dnum: 0, + flowShow: true } }, onLoad() { - + + }, + computed: { + httpRequestUrl() { + return HTTP_REQUEST_URL; + } }, onShow() { this.fileOption = { @@ -269,7 +296,20 @@ methods: { + //选择流程id + async flowuser(id) { + let res = await flowusers({ + id: id + }) + if (res.data.flow_data.length > 0) { + this.flowShow = false + this.sprecord = res.data.flow_data + } else { + this.flowShow = true + } + + }, reset() { this.list = [{ name: "", @@ -280,8 +320,8 @@ this.copy_names = '' this.flowPath = '' this.check_admin_name = '' - this.project1='' - this.project2='' + this.project1 = '' + this.project2 = '' }, async getDocumentList1() { let res = await invoicecate() @@ -391,10 +431,10 @@ deliveryWayChangetwo(e) { this.listobj.type = e.detail.value - if(e.detail.value==2){ - this.isshow=false - }else{ - this.isshow=true + if (e.detail.value == 2) { + this.isshow = false + } else { + this.isshow = true } }, //弹窗显示 @@ -415,7 +455,7 @@ branchConfirm1(e) { console.log('confirm', e, e.value[2].name) if (this.listobj.copy_uids) { - this.listobj.copy_uids += e.value[2].id + this.listobj.copy_uids += e.value[2].id+ ',' } else { this.listobj.copy_uids = e.value[2].id } @@ -425,15 +465,15 @@ }, async submiteBtn() { - console.log(this.listobj) - // let fileIds = []; - // this.fileArray.map((item, i) => { - // fileIds.push(item.id) - // }); + // console.log(this.listobj) + let fileIds = []; + this.fileArray.map((item, i) => { + fileIds.push(item.id) + }); - // if (this.fileArray.length > 0) { - // this.listobj.file_ids = fileIds.join(','); - // } + if (this.fileArray.length > 0) { + this.listobj.file_ids = fileIds.join(','); + } this.listobj.flow_id = this.flow_id if (this.listobj.invoice_phone) { const pattern = /^1[3456789]\d{9}$/; @@ -450,6 +490,11 @@ const res = await addinvoice(this.listobj) + if (res.code == 0) { + uni.navigateBack({ + delta: 1 + }) + } Toast('提交成功') @@ -472,7 +517,7 @@ }, - + async getlist1() { const res = await invoiceflow() @@ -483,6 +528,8 @@ flowPathSelect(value) { this.flowPath = value.name this.flow_id = value.id + + this.flowuser(value.id) }, /** 类型 */ @@ -495,7 +542,7 @@ leavaType1(e) { console.log(e) this.project2 = e.name - this.listobj.invoice_subject= e.id + this.listobj.invoice_subject = e.id this.leavaTypeShow1 = false }, leavaType2(e) { @@ -574,10 +621,11 @@ position: relative; padding-bottom: 100px; } -/deep/.u-action-sheet item-wrap{ - overflow: auto; - max-height: 50vh; -} + + /deep/.u-action-sheet__item-wrap { + overflow: auto; + max-height: 50vh; + } .leave_box, .flow_path { @@ -630,9 +678,52 @@ width: 100%; min-height: 87.72rpx; border-bottom: 1px solid #f7f7f7; + input { + width: 460rpx; + - .title { - font-size: 31.58rpx; + } + font-size: 31.58rpx; + } + + .record { + position: relative; + margin-bottom: 14.04rpx; + + .circle { + width: 31.58rpx; + height: 31.58rpx; + background-color: #fff; + border: 2px solid #34A853; + border-radius: 50%; + margin: 5px; + display: flex; + flex-direction: column; + align-items: center; + + &::before { + content: ""; + display: block; + position: absolute; + clear: both; + width: 1px; + height: 100%; + background-color: rgba(204, 204, 204, 0.5); + margin: 31.58rpx; + } + } + + .text { + flex: 1; + margin-left: 7.02rpx; + } + } + + :last-child { + .circle { + &::before { + display: none; + } } } diff --git a/pages/invoice/bianji.vue b/pages/invoice/bianji.vue index 162c9b7..b814548 100644 --- a/pages/invoice/bianji.vue +++ b/pages/invoice/bianji.vue @@ -9,13 +9,13 @@ - + 开票类型: - + 开票主体: @@ -45,7 +45,7 @@ 开票抬头: - + 电话号码: @@ -79,49 +79,69 @@ - + - - + {{ item.name }} - {{ item.filesize | formatBytes }} - 上传人:{{ item.admin_name }} + {{ item.filesize }} + - + - --> - - - - + - - + + 选择审批流程: - + + 审核人: + + + + + 第{{i+1}}级 {{item.flow_type_txt}} + + + + + + + + {{items.name}} + + + + 抄送人: @@ -178,7 +198,7 @@ import { - + flowusers, userdepartment, getemployee, addinvoice, @@ -191,6 +211,9 @@ import { FILE_URL } from '@/api/file.js' + import { + HTTP_REQUEST_URL + } from '@/config/app.js' export default { components: { lsjUpload @@ -222,20 +245,22 @@ columns: [], check_admin_name: '', copy_names: '', - isshow:true, - columns1: [{ - name: '增值税专用发票', - id: 1, - }, - { - name: '普通发票', - id: 2, - },{ - name: '专用发票', - id: 3 - } - - ], + isshow: true, + flowShow: true, + sprecord: [], + columns1: [{ + name: '增值税专用发票', + id: 1, + }, + { + name: '普通发票', + id: 2, + }, { + name: '专用发票', + id: 3 + } + + ], list: [{ cate_title: "", amount: '', @@ -268,8 +293,26 @@ }, - + computed: { + httpRequestUrl() { + return HTTP_REQUEST_URL; + } + }, methods: { + //选择流程id + async flowuser(id) { + let res = await flowusers({ + id: id + }) + if (res.data.flow_data.length > 0) { + + this.flowShow = false + this.sprecord = res.data.flow_data + } else { + this.flowShow = true + } + + }, async detail(id) { let res = await invoiceview({ id: id @@ -279,6 +322,7 @@ this.project1 = this.columns1.find(obj => obj.id === res.data.detail.type).name; this.project2 = this.actions4.find(obj => obj.id === res.data.detail.invoice_subject).name; // this.copy_names = res.data.detail.copy_user + this.listobj.id = res.data.detail.id this.listobj.invoice_account = res.data.detail.invoice_account this.listobj.invoice_address = res.data.detail.invoice_address this.listobj.invoice_bank = res.data.detail.invoice_bank @@ -288,14 +332,14 @@ this.listobj.invoice_tax = res.data.detail.invoice_tax this.listobj.invoice_title = res.data.detail.invoice_title this.listobj.invoice_type = res.data.detail.invoice_type - this.listobj.amount= res.data.detail.amount - this.listobj.type=res.data.detail.type + this.listobj.amount = res.data.detail.amount + this.listobj.type = res.data.detail.type this.selected = res.data.detail.type.toString() // console.log(res.data.detail.type) - if( res.data.detail.type==2){ - this.isshow=false - }else{ - this.isshow=true + if (res.data.detail.type == 2) { + this.isshow = false + } else { + this.isshow = true } }, reset() { @@ -419,12 +463,12 @@ deliveryWayChangetwo(e) { this.listobj.type = e.detail.value - - if(e.detail.value==2){ - this.isshow=false - }else{ - this.isshow=true + + if (e.detail.value == 2) { + this.isshow = false + } else { + this.isshow = true } }, //弹窗显示 @@ -445,7 +489,7 @@ branchConfirm1(e) { console.log('confirm', e, e.value[2].name) if (this.listobj.copy_uids) { - this.listobj.copy_uids += e.value[2].id + this.listobj.copy_uids += e.value[2].id + ',' } else { this.listobj.copy_uids = e.value[2].id } @@ -456,14 +500,14 @@ async submiteBtn() { console.log(this.listobj) - // let fileIds = []; - // this.fileArray.map((item, i) => { - // fileIds.push(item.id) - // }); + let fileIds = []; + this.fileArray.map((item, i) => { + fileIds.push(item.id) + }); - // if (this.fileArray.length > 0) { - // this.listobj.file_ids = fileIds.join(','); - // } + if (this.fileArray.length > 0) { + this.listobj.file_ids = fileIds.join(','); + } this.listobj.flow_id = this.flow_id if (this.listobj.invoice_phone) { const pattern = /^1[3456789]\d{9}$/; @@ -480,6 +524,11 @@ const res = await addinvoice(this.listobj) + if (res.code == 0) { + uni.navigateBack({ + delta: 1 + }) + } Toast('提交成功') @@ -513,7 +562,7 @@ flowPathSelect(value) { this.flowPath = value.name this.flow_id = value.id - + this.flowuser(value.id) }, /** 类型 */ leavaType(e) { @@ -604,10 +653,12 @@ position: relative; padding-bottom: 100px; } -/deep/.u-action-sheet__item-wrap { + + /deep/.u-action-sheet__item-wrap { overflow: auto; max-height: 50vh; } + .leave_box, .flow_path { width: 100%; @@ -659,7 +710,11 @@ width: 100%; min-height: 87.72rpx; border-bottom: 1px solid #f7f7f7; +input { + width: 460rpx; + + } .title { font-size: 31.58rpx; } diff --git a/pages/invoice/detail.vue b/pages/invoice/detail.vue index 92cb919..e12c327 100644 --- a/pages/invoice/detail.vue +++ b/pages/invoice/detail.vue @@ -6,7 +6,7 @@ 开票金额: - + @@ -78,20 +78,20 @@ - + - - + + {{ item.name }} - {{ item.filesize | formatBytes }} - 上传人:{{ item.admin_name }} + {{ item.filesize }} + - + - --> - - - - + - - + - + 撤回意见 -