This commit is contained in:
jia 2023-11-20 18:23:46 +08:00
parent 35db378ced
commit b51981f093
49 changed files with 5720 additions and 953 deletions

View File

@ -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)

View File

@ -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)
}
});
})

View File

@ -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: '文件预览失败' });
},
});

View File

@ -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));
});
}
}

View File

@ -168,7 +168,7 @@
break;
}
if(!strReg.test(value)){
console.log(new Error("请传入与mode、fields匹配的value值例value="+example+""))
//console.log(new Error("modefieldsvaluevalue="+example+""))
}
return strReg.test(value);
},

View File

@ -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("modefieldsvaluevalue="+example+""))
}
return strReg.test(value);
},

View File

@ -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("modevalue["+example+","+example+"]"))
}
return strReg.test(value[0])&&strReg.test(value[1]);
},

View File

@ -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("modefieldsvaluevalue="+example+""))
}
return strReg.test(value);
},

View File

@ -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("modefieldsvaluevalue="+example+""))
}
return strReg.test(value);
},

View File

@ -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;

View File

@ -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
// }
//序列化对象和数组

View File

@ -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",

View File

@ -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('添加失败')
}
});

View File

@ -9,13 +9,13 @@
<input type="text" v-model="listobj.amount" placeholder="开票金额">
</view>
<view class="leava_type flex_a_c">
<view class="cont_cell">
<view class="title">开票类型</view>
<input type="text" v-model="project1" placeholder="请选择" disabled @click="leavaTypeShow2=true">
</view>
<view class="leava_type flex_a_c">
<view class="cont_cell">
<view class="title">开票主体</view>
<input type="text" v-model="project2" placeholder="请选择" disabled @click="leavaShow1">
</view>
@ -62,12 +62,12 @@
<input type="text" v-model="listobj.invoice_account" placeholder="银行账号">
</view>
<view class="cont_cell" v-if="isshow">
<view class="cont_cell" v-if="isshow">
<view class="title">银行营业网点 </view>
<input type="text" v-model="listobj.invoice_banking" placeholder="银行营业网点">
</view>
<view class="cont_cell" v-if="isshow">
<view class="cont_cell" v-if="isshow">
<view class="title">地址</view>
<input type="text" v-model="listobj.invoice_address" placeholder="地址">
</view>
@ -79,49 +79,67 @@
</view>
<!-- <view class="leave_box" style="padding-top: 100rpx;"> -->
<view class="leave_box" style="padding-top: 30rpx;">
<!-- 附件 -->
<!-- <block v-for="(item, i) in fileArray" :key="i">
<block v-for="(item, i) in fileArray" :key="i" >
<view class="file flex_a_c_j_sb">
<view class="l_file">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize | formatBytes }}</view>
<view class="file_size">{{ item.filesize }}</view>
<view class="upload_people">上传人{{ item.admin_name }}</view>
</view>
</view>
</block> -->
<!-- <view class="upload_box flex_a_c_j_sb">
</block>
<view class="upload_box flex_a_c_j_sb">
<view>
<view class="title">选择文件并上传</view>
<view class="text">
上传前请规范命名最大只能上传100M的文件<br />
超过请压缩成多个文件上传
</view>
</view> -->
<!-- <view class="" style="margin-top: 60rpx;">
</view>
<view class="" style="margin-top: 60rpx;">
<lsjUpload ref="lsjUpload" childId="upload1" :size="10" :option="fileOption" height="200rpx"
style="margin-top: 28rpx;" :debug="false"
:formats="'pdf,txt,zip,rar,jpg,png,mp3,avi,mov,mp4,gif'" :multiple="false" :count="3"
:instantly="true" @change="changeFile" @uploadEnd='onuploadEnd' @progress='onprogre'> -->
:instantly="true" @change="changeFile" @uploadEnd='onuploadEnd' @progress='onprogre'>
<!-- <view class="change-file">请选择PDF类型的发票</view> -->
<!-- <u-icon name="plus-circle" color="#333333" size="28"
<!-- <u-icon name="plus-circle" color="#333333" size="28"
style="margin-top: 40rpx; margin-left: 60rpx;"></u-icon> -->
<!-- <u-icon name="plus-circle" color="#333333" size="28"></u-icon>
<u-icon name="plus-circle" color="#333333" size="28"></u-icon>
</lsjUpload>
</view>
</view>-->
<!-- </view> -->
</view>
</view>
<view class="flow_path">
<view class="cont_cell">
<view class="title">选择审批流程</view>
<input type="text" v-model="flowPath" placeholder="请选择" disabled @click="flowPathShow = true">
</view>
<view class="cont_cell" @click="branchShow = true">
<view class="cont_cell" @click="branchShow = true" v-if="flowShow">
<view class="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
<view v-else>
<block v-for="(item,i) in sprecord" :key="i">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{i+1}} {{item.flow_type_txt}}
</text>
</view>
<view class="" v-if="item.user_id_info.length>0&&item.user_id_info" style='padding-left: 20rpx;padding-right: 20rpx;margin-bottom: 20rpx;'>
<view class="" v-for="(items,k) in item.user_id_info" style="display: flex;margin-right: 20rpx;">
<view class="" style="width: 30rpx;height: 30rpx;border-radius: 50%; margin-left: 20rpx;margin-right: 10rpx;">
<image :src="`${httpRequestUrl}`+items.thumb" mode="" style="width: 30rpx;height: 30rpx;border-radius: 50%;margin-top: 5rpx;"></image>
</view>
<view class=""> {{items.name}}</view>
</view>
</view>
</block>
</view>
<view class="cont_cell" @click="branchShow1 = true">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
@ -145,17 +163,17 @@
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@close="flowPathShow=false" :closeOnClickOverlay="true" :closeOnClickAction="true">
@close="flowPathShow=false" @cancel="flowPathShow=false" :closeOnClickOverlay="true" :closeOnClickAction="true">
</u-action-sheet>
<!-- 部门选择 -->
<u-picker :show="branchShow" :defaultIndex='defaultIndex' ref="branchRef" :columns="branchColumns"
@confirm="branchConfirm" @change="columnCode" :closeOnClickOverlay="true" @close="branchShowclose"
@confirm="branchConfirm" @change="columnCode" @cancel="branchShowclose" :closeOnClickOverlay="true" @close="branchShowclose"
keyName="name">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1" @cancel="branchShowclose1"
keyName="name">
</u-picker>
<!-- 选择时间 -->
@ -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;
}
}
}

View File

@ -9,13 +9,13 @@
<input type="text" v-model="listobj.amount" placeholder="开票金额">
</view>
<view class="leava_type flex_a_c">
<view class="cont_cell">
<view class="title">开票类型</view>
<input type="text" v-model="project1" placeholder="请选择" disabled @click="leavaTypeShow2=true">
</view>
<view class="leava_type flex_a_c">
<view class="cont_cell">
<view class="title">开票主体</view>
<input type="text" v-model="project2" placeholder="请选择" disabled @click="leavaShow1">
</view>
@ -45,7 +45,7 @@
<view class="title">开票抬头</view>
<input type="text" v-model="listobj.invoice_title" placeholder="开票抬头">
</view>
<view class="cont_cell" >
<view class="cont_cell">
<view class="title">电话号码</view>
<input type="text" v-model="listobj.invoice_phone" placeholder="电话号码">
</view>
@ -79,49 +79,69 @@
</view>
<!-- <view class="leave_box" style="padding-top: 100rpx;"> -->
<view class="leave_box" style="padding-top: 100rpx;">
<!-- 附件 -->
<!-- <block v-for="(item, i) in fileArray" :key="i">
<!-- 附件 -->
<block v-for="(item, i) in fileArray" :key="i">
<view class="file flex_a_c_j_sb">
<view class="l_file">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize | formatBytes }}</view>
<view class="upload_people">上传人{{ item.admin_name }}</view>
<view class="file_size">{{ item.filesize }}</view>
</view>
</view>
</block> -->
<!-- <view class="upload_box flex_a_c_j_sb">
</block>
<view class="upload_box flex_a_c_j_sb">
<view>
<view class="title">选择文件并上传</view>
<view class="text">
上传前请规范命名最大只能上传100M的文件<br />
超过请压缩成多个文件上传
</view>
</view> -->
<!-- <view class="" style="margin-top: 60rpx;">
</view>
<view class="" style="margin-top: 60rpx;">
<lsjUpload ref="lsjUpload" childId="upload1" :size="10" :option="fileOption" height="200rpx"
style="margin-top: 28rpx;" :debug="false"
:formats="'pdf,txt,zip,rar,jpg,png,mp3,avi,mov,mp4,gif'" :multiple="false" :count="3"
:instantly="true" @change="changeFile" @uploadEnd='onuploadEnd' @progress='onprogre'> -->
<!-- <view class="change-file">请选择PDF类型的发票</view> -->
<!-- <u-icon name="plus-circle" color="#333333" size="28"
:instantly="true" @change="changeFile" @uploadEnd='onuploadEnd' @progress='onprogre'>
<!-- <view class="change-file">请选择PDF类型的发票</view> -->
<!-- <u-icon name="plus-circle" color="#333333" size="28"
style="margin-top: 40rpx; margin-left: 60rpx;"></u-icon> -->
<!-- <u-icon name="plus-circle" color="#333333" size="28"></u-icon>
</lsjUpload>
<u-icon name="plus-circle" color="#333333" size="28"></u-icon>
</lsjUpload>
</view>
</view>-->
<!-- </view> -->
</view>
</view>
<view class="flow_path">
<view class="cont_cell">
<view class="title">选择审批流程</view>
<input type="text" v-model="flowPath" placeholder="请选择" disabled @click="flowPathShow = true">
</view>
<view class="cont_cell" @click="branchShow = true">
<view class="cont_cell" @click="branchShow = true" v-if="flowShow">
<view class="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
<view v-else>
<block v-for="(item,i) in sprecord" :key="i">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{i+1}} {{item.flow_type_txt}}
</text>
</view>
<view class="" v-if="item.user_id_info.length>0&&item.user_id_info" style='padding-left: 20rpx;padding-right: 20rpx;margin-bottom: 20rpx;'>
<view class="" v-for="(items,k) in item.user_id_info" style="display: flex;margin-right: 20rpx;">
<view class=""
style="width: 30rpx;height: 30rpx;border-radius: 50%; margin-left: 20rpx;margin-right: 10rpx;">
<image :src="`${httpRequestUrl}`+items.thumb" mode=""
style="width: 30rpx;height: 30rpx;border-radius: 50%;margin-top: 5rpx;"></image>
</view>
<view class=""> {{items.name}}</view>
</view>
</view>
</block>
</view>
<view class="cont_cell" @click="branchShow1 = true">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
@ -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;
}

View File

@ -6,7 +6,7 @@
<view class="cont_cell">
<view class="title">开票金额</view>
<input type="text" v-model="listobj.amount" placeholder="开票金额">
<input type="text" v-model="listobj.amount" disabled placeholder="开票金额">
</view>
<view class="leava_type flex_a_c">
@ -78,20 +78,20 @@
</view>
<!-- <view class="leave_box" style="padding-top: 100rpx;"> -->
<view class="leave_box" style="padding-top: 100rpx;" v-if="fileArray.length>0">
<!-- 附件 -->
<!-- <block v-for="(item, i) in fileArray" :key="i">
<view class="file flex_a_c_j_sb">
<!-- 附件 -->
<block v-for="(item, i) in fileArray" :key="i">
<view class="file flex_a_c_j_sb" @click="downloadFile(item)">
<view class="l_file">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize | formatBytes }}</view>
<view class="upload_people">上传人{{ item.admin_name }}</view>
<view class="file_size">{{ item.filesize }}</view>
</view>
</view>
</block> -->
<!-- <view class="upload_box flex_a_c_j_sb">
</block>
<!-- <view class="upload_box flex_a_c_j_sb">
<view>
<view class="title">选择文件并上传</view>
<view class="text">
@ -99,42 +99,176 @@
超过请压缩成多个文件上传
</view>
</view> -->
<!-- <view class="" style="margin-top: 60rpx;">
<!-- <view class="" style="margin-top: 60rpx;">
<lsjUpload ref="lsjUpload" childId="upload1" :size="10" :option="fileOption" height="200rpx"
style="margin-top: 28rpx;" :debug="false"
:formats="'pdf,txt,zip,rar,jpg,png,mp3,avi,mov,mp4,gif'" :multiple="false" :count="3"
:instantly="true" @change="changeFile" @uploadEnd='onuploadEnd' @progress='onprogre'> -->
<!-- <view class="change-file">请选择PDF类型的发票</view> -->
<!-- <u-icon name="plus-circle" color="#333333" size="28"
<!-- <view class="change-file">请选择PDF类型的发票</view> -->
<!-- <u-icon name="plus-circle" color="#333333" size="28"
style="margin-top: 40rpx; margin-left: 60rpx;"></u-icon> -->
<!-- <u-icon name="plus-circle" color="#333333" size="28"></u-icon>
<!-- <u-icon name="plus-circle" color="#333333" size="28"></u-icon>
</lsjUpload>
</view>
</view>-->
<!-- </view> -->
</view>
<view class="flow_path" v-if="listobj.check_status!= 5&&listobj.check_status!= 2&& ktype!=0">
<view class="cont_cell" style="padding-top: 20rpx;" v-if="listobj.check_status!= 4">
<view class="cont_cell" style="padding-top: 20rpx;" v-if="listobj.check_status== 3&&is_create_admin==1">
<view class="title" style="width: 200rpx;">撤回意见</view>
<textarea v-model="mscontent" placeholder="请输入撤回意见" />
<textarea v-model="mscontent" placeholder="请输入撤回意见"
style="padding-top: 20rpx;padding-left: 20rpx;border:1px solid#f1f1f1;padding :20rpx;20rpx;" />
</view>
<view class="cont_cell">
<view class="title">审批流程</view>
</view>
<block v-for="(item,i) in check_record" :key="i">
<view class="" style="border-bottom: 1px solid #f7f7f7;border-top: 1px solid #f7f7f7;">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{item.check_time_str}} {{item.name}} {{item.status_str}}
了此申请操作意见{{item.content}}</text>
<view class="text">{{nodelist.create_user}}创建</view>
</view>
</block>
<view class="" v-for="(itemh,m) in nodelist.flows" :key='m'>
<view class="record" style="display: flex;">
<view class="circle"></view>
<view class="" v-if='itemh.flow_type==1||itemh.flow_type==2' style="display: flex;">
<view class="text">{{itemh.flow_type==1?'部门负责人':'上级部门负责人'}}</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length>0">
<view class="text" v-if="itemh.check_list[0].status == 1">通过</view>
<view class="text" v-else-if="itemh.check_list[0].status == 2">拒绝</view>
</view>
<view class="" v-else>
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==7||itemh.flow_type== 6' style="display: flex;">
<view class="text">{{itemh.flow_type==7?'部门分管领导':'上级部门分管领导'}}</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length>0">
<view class="text" v-if="itemh.check_list[0].status == 1">通过</view>
<view class="text" v-else-if="itemh.check_list[0].status == 2">拒绝</view>
</view>
<view class="" v-else>
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==0'>
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length<=0">
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==3' style="display: flex;">
<view class="text">指定人或签</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info.length>0">
<view class=""
v-if="itemh.user_id_info[0].status!=1&&itemh.user_id_info[0].status!=2">
<view class="text">待审核</view>
</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info" :key='o'>
<view class="text" v-if="itemk.status == 1">通过</view>
<view class="text" v-else-if="itemk.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==4' style="display: flex;">
<view class="text">指定人员(会签)</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info[0].status!=0&&itemh.user_id_info[0].status!=2">
<view class="text">通过</view>
</view>
<view class="" v-if="itemh.user_id_info.length>0">
<view class="text" v-for="(itemj, j) in itemh.user_id_info" :key='j'>
<view class="text" v-if="itemj.status == 0">待审核</view>
<view class="text" v-else-if="itemj.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==5' style="display: flex;">
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info.length>0">
<view class=""
v-if="itemh.user_id_info[0].status!=0&&itemh.user_id_info[0].status!=2">
<view class="text">通过</view>
</view>
<view class="text" v-for="(itemj, j) in itemh.user_id_info" :key='j'>
<view class="text" v-if="itemj.status == 0">待审核</view>
<view class="text" v-else-if="itemj.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view style="padding-bottom: 40px; border-bottom: 1px solid #f7f7f7;" v-if="check_record.length>0">
<block v-for="(item,i) in check_record" :key="i">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{item.check_time_str}} {{item.name}} {{item.status_str}}了此申请操作意见{{item.content}}</text>
</view>
</block>
</view>
<view class="cont_cell">
<view class="title">审核状态</view>
{{listobj.check_status=='0'?'待审核':listobj.check_status=='1'?'审核中':listobj.check_status=='2'?'审核通过':listobj.check_status=='3'?'审核不通过':'撤销审核'}}
</view>
<view class="cont_cell">
<view class="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
@ -145,19 +279,20 @@
</view>
</view>
<view class="" v-if="ktype!=0&&listobj.check_status!= 5&&listobj.check_status!= 2 ">
<view class="bot_btn" v-if="listobj.check_status!= 4">
<!-- <view class="reset" @click="reset">重置</view> -->
<view class="submit_btn" @click="submiteBtn">撤回</view>
</view>
<view class="bot_btn" v-else>
<!-- <view class="reset" @click="reset">重置</view> -->
<view class="submit_btn" @click="bianjiBtn">重新编辑</view>
</view>
<view class="bot_btn" v-if="listobj.check_status== 3&&is_create_admin==1">
<!-- <view class="reset" @click="reset">重置</view> -->
<view class="submit_btn" @click="submiteBtn">撤回</view>
</view>
<view class="bot_btn" v-if="listobj.check_status== 4&&is_create_admin==1">
<!-- <view class="reset" @click="reset">重置</view> -->
<view class="submit_btn" @click="bianjiBtn">重新编辑</view>
</view>
</view>
@ -220,12 +355,16 @@
invoicecate,
appflow_check,
invoiceview,
invoiceflow
invoiceflow,
flownodes
} from '@/api/oa.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
} from '@/api/file.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
export default {
components: {
lsjUpload
@ -258,7 +397,7 @@
columns: [],
check_admin_name: '',
copy_names: '',
isshow:true,
isshow: true,
columns1: [{
name: '增值税专用发票',
id: 1,
@ -266,11 +405,11 @@
{
name: '普通发票',
id: 2,
},{
}, {
name: '专用发票',
id: 3
}
],
list: [{
cate_title: "",
@ -282,12 +421,15 @@
fileArray: [],
check_record: [],
dnum: 0,
ktype:1,
ktype: 1,
nodelist: {},
check_step_sort: '',
is_create_admin:0,
}
},
onLoad(option) {
this.detail(option.type)
this.ktype=option.num
this.ktype = option.num
},
onShow() {
this.fileOption = {
@ -309,30 +451,46 @@
methods: {
//
async flownodes(val) {
let res = await flownodes({
id: val,
type: 3
})
this.nodelist = res.data
// console.log(res)
},
async detail(id) {
let res = await invoiceview({
id: id
})
this.flownodes(id)
this.listobj = res.data.detail
this.check_step_sort = res.data.detail.check_step_sort
this.is_create_admin= res.data.detail.is_create_admin
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.check_record = res.data.check_record
this.check_admin_name = res.data.detail.check_user
this.copy_names = res.data.detail.copy_user
if( res.data.detail.type==2){
this.isshow=false
}else{
this.isshow=true
if (res.data && res.data.detail && res.data.detail.fileArray) {
this.fileArray = res.data.detail.fileArray.map(function(obj) {
return {
name: obj.name,
filepath: obj.filepath,
fileext: obj.fileext,
filesize: obj.filesize
};
});
}
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() {
this.list = [{
@ -401,6 +559,36 @@
},
downloadFile(item) {
uni.downloadFile({
url: HTTP_REQUEST_URL + item.filepath,
success: function(res) {
if (res.statusCode === 200) {
const tempFilePath = res.tempFilePath;
if (item.fileext == 'png' || item.fileext == 'jpg') {
uni.previewImage({
urls: [tempFilePath]
});
} else {
uni.showModal({
title: '提示',
content: '暂时不支持查看,请登录后台查看',
success: function(res) {
if (res.confirm) {
// console.log('');
} else if (res.cancel) {
// console.log('');
}
}
});
}
}
}
});
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
@ -454,10 +642,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
}
},
//
@ -499,7 +687,11 @@
let res = await appflow_check(data)
// console.log(res)
Toast(res.msg)
if (res.code == 0) {
uni.navigateBack({
delta: 1
})
}
// const res = await appexpense(this.listobj)
Toast('提交成功')
@ -626,7 +818,7 @@
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.leave_request {
position: relative;
padding-bottom: 100px;
@ -681,12 +873,16 @@
display: flex;
align-items: center;
width: 100%;
input {
width: 450rpx;
}
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
@ -698,13 +894,7 @@
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
@ -722,28 +912,7 @@
.circle {
width: 31.58rpx;
height: 31.58rpx;
background-color: #fff;
border: 2px solid #34A853;
border-radius: 50%;
margin: 0 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;
}
}
//
.upload_box {
@ -765,34 +934,24 @@
.record {
position: relative;
margin-bottom: 14.04rpx;
margin-top: 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;
// .circle {
// width: 31.58rpx;
// height: 31.58rpx;
// background-color: #fff;
// border: 2px solid #34A853;
// border-radius: 50%;
// margin: 3px;
// 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;
}
// .text {
// margin-left: 7.02rpx;
// }
}
.file_name {

View File

@ -6,7 +6,7 @@
<view class="cont_cell">
<view class="title">开票金额</view>
<input type="text" v-model="listobj.amount" placeholder="开票金额">
<input type="text" v-model="listobj.amount" placeholder="开票金额" disabled>
</view>
<view class="leava_type flex_a_c">
@ -22,16 +22,16 @@
<view class="cont_cell">
<view class="title">抬头类型</view>
<radio-group class="select_group" @change="deliveryWayChangetwo">
<radio-group class="select_group">
<label class="radio_select" style="margin-right:15rpx;display: flex; margin-bottom: 30rpx;">
<view style="margin-right:5rpx;">
<radio value="1" :checked="selected === '1'" />
<radio value="1" disabled :checked="selected === '1'" />
</view>
企业
</label>
<label class="radio_select" style="margin-right:15rpx;display: flex;">
<view style="margin-right:5rpx;">
<radio value="2" :checked="selected === '2'" />
<radio value="2" disabled :checked="selected === '2'" />
</view>
<view @click="branchShow = true" style="display: flex;">
<view class="title">个人</view>
@ -42,33 +42,33 @@
<view class="cont_cell">
<view class="title">开票抬头</view>
<input type="text" v-model="listobj.invoice_title" placeholder="开票抬头">
<input type="text" v-model="listobj.invoice_title" disabled placeholder="开票抬头">
</view>
<view class="cont_cell">
<view class="title">电话号码</view>
<input type="text" v-model="listobj.invoice_phone" placeholder="电话号码">
<input type="text" v-model="listobj.invoice_phone" disabled placeholder="电话号码">
</view>
<view class="cont_cell" v-if="isshow">
<view class="title">纳税人识别号 </view>
<input type="text" v-model="listobj.invoice_tax" placeholder="纳税人识别号">
<input type="text" v-model="listobj.invoice_tax" disabled placeholder="纳税人识别号">
</view>
<view class="cont_cell" v-if="isshow">
<view class="title">开户行</view>
<input type="text" v-model="listobj.invoice_bank" placeholder="开户行">
<input type="text" v-model="listobj.invoice_bank" disabled placeholder="开户行">
</view>
<view class="cont_cell" v-if="isshow">
<view class="title">银行账号</view>
<input type="text" v-model="listobj.invoice_account" placeholder="银行账号">
<input type="text" v-model="listobj.invoice_account" disabled placeholder="银行账号">
</view>
<view class="cont_cell" v-if="isshow">
<view class="title">银行营业网点 </view>
<input type="text" v-model="listobj.invoice_banking" placeholder="银行营业网点">
<input type="text" v-model="listobj.invoice_banking" disabled placeholder="银行营业网点">
</view>
<view class="cont_cell" v-if="isshow">
<view class="title">地址</view>
<input type="text" v-model="listobj.invoice_address" placeholder="地址">
<input type="text" v-model="listobj.invoice_address" disabled placeholder="地址">
</view>
@ -78,20 +78,20 @@
</view>
<!-- <view class="leave_box" style="padding-top: 100rpx;"> -->
<view class="leave_box" style="padding-top: 30rpx;" v-if="fileArray.length>0">
<!-- 附件 -->
<!-- <block v-for="(item, i) in fileArray" :key="i">
<view class="file flex_a_c_j_sb">
<!-- 附件 -->
<block v-for="(item, i) in fileArray" :key="i">
<view class="file flex_a_c_j_sb" @click="downloadFile(item)">
<view class="l_file">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize | formatBytes }}</view>
<view class="upload_people">上传人{{ item.admin_name }}</view>
<view class="file_size">{{ item.filesize }}</view>
</view>
</view>
</block> -->
<!-- <view class="upload_box flex_a_c_j_sb">
</block>
<!-- <view class="upload_box flex_a_c_j_sb">
<view>
<view class="title">选择文件并上传</view>
<view class="text">
@ -99,31 +99,165 @@
超过请压缩成多个文件上传
</view>
</view> -->
<!-- <view class="" style="margin-top: 60rpx;">
<!-- <view class="" style="margin-top: 60rpx;">
<lsjUpload ref="lsjUpload" childId="upload1" :size="10" :option="fileOption" height="200rpx"
style="margin-top: 28rpx;" :debug="false"
:formats="'pdf,txt,zip,rar,jpg,png,mp3,avi,mov,mp4,gif'" :multiple="false" :count="3"
:instantly="true" @change="changeFile" @uploadEnd='onuploadEnd' @progress='onprogre'> -->
<!-- <view class="change-file">请选择PDF类型的发票</view> -->
<!-- <u-icon name="plus-circle" color="#333333" size="28"
<!-- <view class="change-file">请选择PDF类型的发票</view> -->
<!-- <u-icon name="plus-circle" color="#333333" size="28"
style="margin-top: 40rpx; margin-left: 60rpx;"></u-icon> -->
<!-- <u-icon name="plus-circle" color="#333333" size="28"></u-icon>
<!-- <u-icon name="plus-circle" color="#333333" size="28"></u-icon>
</lsjUpload>
</view>
</view>-->
<!-- </view> -->
</view>
<view class="flow_path">
<view class="cont_cell">
<view class="title">审批流程</view>
</view>
<view style="padding-bottom: 40rpx;">
<view class="" style="border-bottom: 1px solid #f7f7f7;border-top: 1px solid #f7f7f7;">
<view class="record" style="display: flex;">
<view class="circle"></view>
<view class="text">{{nodelist.create_user}}创建</view>
</view>
<view class="" v-for="(itemh,m) in nodelist.flows" :key='m'>
<view class="record" style="display: flex;">
<view class="circle"></view>
<view class="" v-if='itemh.flow_type==1||itemh.flow_type==2' style="display: flex;">
<view class="text">{{itemh.flow_type==1?'部门负责人':'上级部门负责人'}}</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length>0">
<view class="text" v-if="itemh.check_list[0].status == 1">通过</view>
<view class="text" v-else-if="itemh.check_list[0].status == 2">拒绝</view>
</view>
<view class="" v-else>
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==7||itemh.flow_type== 6' style="display: flex;">
<view class="text">{{itemh.flow_type==7?'部门分管领导':'上级部门分管领导'}}</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length>0">
<view class="text" v-if="itemh.check_list[0].status == 1">通过</view>
<view class="text" v-else-if="itemh.check_list[0].status == 2">拒绝</view>
</view>
<view class="" v-else>
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==0' style="display: flex;">
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length>0">
<view class="text" v-if="itemh.check_list[0].status == 1">通过</view>
<view class="text" v-else-if="itemh.check_list[0].status == 2">拒绝</view>
</view>
<view class="" v-else>
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==3' style="display: flex;">
<view class="text">指定人或签</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info.length>0">
<view class=""
v-if="itemh.user_id_info[0].status!=1&&itemh.user_id_info[0].status!=2">
<view class="text">待审核</view>
</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info" :key='o'>
<view class="text" v-if="itemk.status == 1">通过</view>
<view class="text" v-else-if="itemk.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==4' style="display: flex;">
<view class="text">指定人员(会签)</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info[0].status!=0&&itemh.user_id_info[0].status!=2">
<view class="text">通过</view>
</view>
<view class="" v-if="itemh.user_id_info.length>0">
<view class="text" v-for="(itemj, j) in itemh.user_id_info" :key='j'>
<view class="text" v-if="itemj.status == 0">待审核</view>
<view class="text" v-else-if="itemj.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==5' style="display: flex;">
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info.length>0">
<view class="text" v-for="(itemj, j) in itemh.user_id_info" :key='j'>
<view class="text" v-if="itemj.status == 0">待审核</view>
<view class="text" v-else-if="itemj.status == 2">拒绝</view>
</view>
</view>
<view class="" v-else>
<view class="text">通过</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view style="padding-bottom: 40rpx; border-bottom: 1px solid #f7f7f7;" v-if="check_record.length>0">
<block v-for="(item,i) in check_record" :key="i">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{item.check_time_str}} {{item.name}} {{item.status_str}}
了此申请操作意见{{item.content}}</text>
<text class="text">{{item.check_time_str}} {{item.name}} {{item.status_str}}了此申请
操作意见{{item.content}}</text>
</view>
</block>
</view>
@ -142,9 +276,10 @@
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
</view>
<view class="" v-if="listobj.check_status!= 5&&listobj.check_status!= 2">
<view class="title" style="margin-bottom: 30rpx;">审核节点</view>
<radio-group class="select_group" @change="deliveryWayChangetwo1">
<view class="" v-if="is_check_admin==1&&listobj.check_status==1&&flow_type==0">
<view class="title" style="margin-bottom: 10rpx;margin-top: 30rpx;">审核节点</view>
<radio-group class="select_group" @change="deliveryWayChangetwo1"
style="font-size: 30rpx; padding: 10px;">
<label class="radio_select" style="margin-right:15rpx;display: flex; margin-bottom: 30rpx;">
<view style="margin-right:5rpx;">
<radio value="1" />
@ -156,22 +291,25 @@
<radio value="2" />
</view>
<view @click="branchShow = true" style="display: flex;">
<view class="title"> 下一位审批人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
<view class="title" style="width: 250rpx;"> 下一位审批人</view>
<input type="text" v-model="check_admin_name" style="margin-top: -5rpx;"
placeholder="请选择" disabled>
</view>
</label>
</radio-group>
</view>
</block>
<view class="cont_cell" style="padding-top: 20rpx;"
v-if="listobj.check_status!= 4&&listobj.check_status!= 5&&listobj.check_status!= 2">
v-if="listobj.check_status!= 4&&listobj.check_status!= 5&&listobj.check_status!= 2&&listobj.check_status!= 3&&listobj.check_status!= 4&&is_check_admin==1">
<view class="title" style="width: 200rpx;">审核意见</view>
<textarea v-model="mscontent" placeholder="请输入审核意见" />
<textarea v-model="mscontent" placeholder="请输入审核意见"
style="padding-top: 20rpx;padding-left: 20rpx;border:1px solid#f1f1f1;padding :20rpx;20rpx;" />
</view>
</view>
<view class="bot_btn" v-if="listobj.check_status!= 5&&listobj.check_status!= 2">
<view class="reset" @click="appflowcheck()">拒绝</view>
<view class="bot_btn"
v-if="listobj.check_status!= 5&&listobj.check_status!= 2&&listobj.check_status!= 3&&listobj.check_status!= 4&&is_check_admin==1">
<view class="reset" @click="appflowcheck()">{{flow_type==5?'回退':'拒绝'}}</view>
<view class="submit_btn" @click=" appflowcheck1()">通过</view>
</view>
@ -198,18 +336,19 @@
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@close="flowPathShow=false" :closeOnClickOverlay="true" :closeOnClickAction="true">
@cancel="flowPathShow=false" @close="flowPathShow=false" :closeOnClickOverlay="true"
:closeOnClickAction="true">
</u-action-sheet>
<!-- 部门选择 -->
<u-picker :show="branchShow" :defaultIndex='defaultIndex' ref="branchRef" :columns="branchColumns"
@confirm="branchConfirm" @change="columnCode" :closeOnClickOverlay="true" @close="branchShowclose"
keyName="name">
@cancel="branchShowclose" keyName="name">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
@cancel="branchShowclose1" keyName="name">
</u-picker>
<!-- 选择时间 -->
@ -238,12 +377,16 @@
invoicecate,
appflow_check,
invoiceview,
invoiceflow
invoiceflow,
flownodes
} from '@/api/oa.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
} from '@/api/file.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
export default {
components: {
lsjUpload
@ -301,7 +444,11 @@
check_record: [],
dnum: 0,
check: '',
admin_name: ""
admin_name: "",
nodelist: {},
flow_type: '',
check_step_sort: '',
is_check_admin: 0
}
},
onLoad(option) {
@ -327,18 +474,42 @@
methods: {
//
async flownodes(val) {
let res = await flownodes({
id: val,
type: 3
})
this.nodelist = res.data
// console.log(res)
},
async detail(id) {
let res = await invoiceview({
id: id
})
this.flownodes(id)
this.listobj = res.data.detail
this.is_check_admin = res.data.is_check_admin
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.check_record = res.data.check_record
this.flow_type = res.data.flows.flow_type
this.check_step_sort = res.data.detail.check_step_sort
this.admin_name = res.data.detail.check_user
this.copy_names = res.data.detail.copy_user
this.selected = res.data.detail.type.toString()
if (res.data && res.data.detail && res.data.detail.fileArray) {
this.fileArray = res.data.detail.fileArray.map(function(obj) {
return {
name: obj.name,
filepath: obj.filepath,
fileext: obj.fileext,
filesize: obj.filesize
};
});
}
if (res.data.detail.type == 2) {
this.isshow = false
} else {
@ -497,6 +668,34 @@
}
},
downloadFile(item) {
uni.downloadFile({
url: HTTP_REQUEST_URL + item.filepath,
success: function(res) {
if (res.statusCode === 200) {
const tempFilePath = res.tempFilePath;
if (item.fileext == 'png' || item.fileext == 'jpg') {
uni.previewImage({
urls: [tempFilePath]
});
} else {
uni.showModal({
title: '提示',
content: '暂时不支持查看,请登录后台查看',
success: function(res) {
if (res.confirm) {
// console.log('');
} else if (res.cancel) {
// console.log('');
}
}
});
}
}
}
});
},
//
deliveryWayChangetwo1(e) {
console.log(e)
@ -524,7 +723,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
}
@ -545,7 +744,11 @@
let res = await appflow_check(data)
// console.log(res)
Toast(res.msg)
if (res.code == 0) {
uni.navigateBack({
delta: 1
})
}
// const res = await appexpense(this.listobj)
Toast('提交成功')
@ -731,9 +934,12 @@
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
input {
width: 400rpx;
border: 1px solid;
}
font-size: 31.58rpx;
}
//
@ -837,7 +1043,7 @@
}
.text {
flex: 1;
margin-left: 7.02rpx;
}
}

View File

@ -9,9 +9,9 @@
</view>
<view class="content-middle">
<view class="content-middle-one">
<view class="middle-one" v-for="(item,k) in list2" @click="tian(item)">
<view class="middle-one" v-for="(item,k) in list2" @click="tian(item)">
<liu-swipe-action :index="k" @clickItem="clickItem" :btnList='btnList3' v-if="item.check_status==5">
<liu-swipe-action :index="k" @clickItem="clickItem" :btnList='btnList3' v-if="item.check_status==5&&num!=0&&num!=2">
<view class="middle-one-title">
<view class="one-titlea">
<view class="name">
@ -34,12 +34,44 @@
</view>
</view>
<view class="middle-one-time">类型{{item.flow_type}}</view>
<view class="middle-one-time">
类型{{item.invoice_type==1?'增值税专用发票':item.invoice_type==2?'普通发票':'专用发票'}}</view>
<view class="middle-one-time">开票金额:{{item.amount}}</view>
<view class="middle-one-time">审核人:{{item.check_user}}</view>
</liu-swipe-action>
<liu-swipe-action :index="k" @clickItem="clickItem" :btnList='btnList2'
v-else-if="item.check_status==10&&num!=0&&num!=2">
<view class="middle-one-title">
<view class="one-titlea">
<view class="name">
{{item.name}}
</view>
<view class="parment">
{{item.name1}}
</view>
</view>
<view class="one-titleb"
:style="{'color':item.check_status==0?'#000':item.check_status==1?'#dddddd':item.check_status==2?'#34A853':item.check_status==3?'#F9AA32':'#F02828'}">
<text v-if='item.check_status==0'>待审核</text>
<text v-if='item.check_status==1'>审核中</text>
<text v-if='item.check_status==2'>审核通过</text>
<text v-if='item.check_status==3'>审核不通过</text>
<text v-if='item.check_status==4'>撤销审核</text>
<text v-if='item.check_status==5'>已开具</text>
<text v-if='item.check_status==10'>已作废</text>
</view>
</view>
<view class="middle-one-time">
类型{{item.invoice_type==1?'增值税专用发票':item.invoice_type==2?'普通发票':'专用发票'}}</view>
<view class="middle-one-time">开票金额:{{item.amount}}</view>
<view class="middle-one-time">审核人{{item.check_user}}</view>
</liu-swipe-action>
<liu-swipe-action :index="k" @clickItem="clickItem" :btnList='btnList2' v-else-if="item.check_status==10">
<liu-swipe-action :index="k" @clickItem="clickItem" :btnList='btnList1'
v-else-if="item.check_status==2&&num!=0&&num!=2">
<view class="middle-one-title">
<view class="one-titlea">
<view class="name">
@ -62,42 +94,17 @@
</view>
</view>
<view class="middle-one-time">类型{{item.flow_type}}</view>
<view class="middle-one-time">
类型{{item.invoice_type==1?'增值税专用发票':item.invoice_type==2?'普通发票':'专用发票'}}</view>
<view class="middle-one-time">开票金额:{{item.amount}}</view>
<view class="middle-one-time">审核人{{item.check_user}}</view>
</liu-swipe-action>
<liu-swipe-action :index="k" @clickItem="clickItem" :btnList='btnList1' v-else-if="item.check_status==2">
<view class="middle-one-title">
<view class="one-titlea">
<view class="name">
{{item.name}}
</view>
<view class="parment">
{{item.name1}}
</view>
</view>
<view class="one-titleb"
:style="{'color':item.check_status==0?'#000':item.check_status==1?'#dddddd':item.check_status==2?'#34A853':item.check_status==3?'#F9AA32':'#F02828'}">
<text v-if='item.check_status==0'>待审核</text>
<text v-if='item.check_status==1'>审核中</text>
<text v-if='item.check_status==2'>审核通过</text>
<text v-if='item.check_status==3'>审核不通过</text>
<text v-if='item.check_status==4'>撤销审核</text>
<text v-if='item.check_status==5'>已开具</text>
<text v-if='item.check_status==10'>已作废</text>
</view>
</view>
<view class="middle-one-time">类型{{item.flow_type}}</view>
<view class="middle-one-time">开票金额:{{item.amount}}</view>
<view class="middle-one-time">审核人{{item.check_user}}</view>
<view class="middle-one-time">审核人:{{item.check_user}}</view>
</liu-swipe-action>
<liu-swipe-action :index="k" @clickItem="clickItem" :btnList='btnList' v-else>
<view class="middle-one-title">
<view class="one-titlea">
<view class="name">
{{item.name}}
</view>
<view class="parment">
@ -117,9 +124,10 @@
</view>
</view>
<view class="middle-one-time">类型{{item.flow_type}}</view>
<view class="middle-one-time">
类型{{item.invoice_type==1?'增值税专用发票':item.invoice_type==2?'普通发票':'专用发票'}}</view>
<view class="middle-one-time">开票金额:{{item.amount}}</view>
<view class="middle-one-time">审核人{{item.check_user}}</view>
<view class="middle-one-time">审核人:{{item.check_user}}</view>
</liu-swipe-action>
@ -148,9 +156,11 @@
tovoid,
novoid
} from '@/api/oa.js'
import liuswipeaction from '@/uni_modules/liu-swipe-action/components/liu-swipe-action/liu-swipe-action.vue'
export default {
components: {
'liu-swipe-action': liuswipeaction
},
data() {
return {
title: 'Hello',
@ -274,7 +284,7 @@
async initList2() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list3 = [];
this.list2 = [];
await this.getlist2()
},
async getlist() {
@ -372,13 +382,13 @@
if (res.code == 0) {
if (this.num == 0) {
this.initList()
} else if (this.num == 1) {
this.initList1()
} else {
this.initList2()
}
if (this.num == 0) {
this.initList()
} else if (this.num == 1) {
this.initList1()
} else {
this.initList2()
}
}
Toast(res.msg);
@ -393,19 +403,19 @@
if (res.code == 0) {
if (this.num == 0) {
this.initList()
} else if (this.num == 1) {
this.initList1()
} else {
this.initList2()
}
if (this.num == 0) {
this.initList()
} else if (this.num == 1) {
this.initList1()
} else {
this.initList2()
}
}
Toast(res.msg);
},
//
editpart(item, type) {
uni.navigateTo({
@ -458,7 +468,7 @@
.content-middle {
.content-middle-one {
.middle-one {
width: 694rpx;
@ -466,7 +476,7 @@
margin-bottom: 21rpx;
background: #FFFFFF;
padding: 0 25rpx;
padding-bottom: 25rpx;

View File

@ -106,7 +106,7 @@
limit: this.loadConfig.limit,
})
console.log(res.data)
//console.log(res.data)
this.loadConfig.status = "loadmore"
if (res.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
@ -124,7 +124,7 @@
},
//
clickItem(data) {
// console.log(e)
// //console.log(e)
uni.showModal({
content: '确定要删除吗',
success: (e) => {

View File

@ -23,7 +23,7 @@
</view>
<view class=""
v-if="fieldValue.type=='input'&&fieldKey!='end_time'&&fieldKey!='start_time'&&fieldKey!='duration'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" :placeholder="fieldValue.title">
</view>
@ -31,7 +31,7 @@
<view class="" v-if=" fieldKey=='start_time'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择时间" disabled
@click="selectTime1">
@ -40,7 +40,7 @@
</view>
<view class="" v-if="fieldKey=='end_time'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择时间" disabled
@click="selectTime2">
@ -49,7 +49,7 @@
</view>
<view class="" v-if="fieldKey=='detail_time'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择时间" disabled
@click="selectTime3(fieldKey)">
@ -58,13 +58,13 @@
</view>
<view class="" v-if="fieldKey=='duration'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="manHour" disabled placeholder="请假工时">
<input type="text" v-model="meatelist[fieldKey]" placeholder="请假工时">
</view>
</view>
<view class="" v-if="fieldValue.type=='textarea'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" :placeholder="fieldValue.title">
</view>
@ -87,7 +87,7 @@
<view class="l_file">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize | formatBytes }}</view>
<view class="upload_people">上传人{{ item.admin_name }}</view>
</view>
<u-icon @click="delImg(i)" name="close-circle" color="#333333" size="28"></u-icon>
</view>
@ -119,10 +119,27 @@
<view class="title">选择审批流程</view>
<input type="text" v-model="flowPath" placeholder="请选择" disabled @click="flowPathShow = true">
</view>
<view class="cont_cell" @click="branchShow = true">
<view class="cont_cell" @click="branchShow = true" v-if="flowShow">
<view class="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
<view v-else style=" border-bottom: 1px solid #f7f7f7;">
<block v-for="(item,i) in sprecord" :key="i">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{i+1}} {{item.flow_type_txt}}
</text>
</view>
<view class="" v-if="item.user_id_info.length>0&&item.user_id_info" style='padding-left: 20rpx;padding-right: 20rpx;margin-bottom: 20rpx;'>
<view class="" v-for="(items,k) in item.user_id_info" style="display: flex;margin-right: 20rpx;">
<view class="" style="width: 30rpx;height: 30rpx;border-radius: 50%; margin-left: 20rpx;margin-right: 10rpx;">
<image :src="`${httpRequestUrl}`+items.thumb" mode="" style="width: 30rpx;height: 30rpx;border-radius: 50%;margin-top: 5rpx;"></image>
</view>
<view class=""> {{items.name}}</view>
</view>
</view>
</block>
</view>
<view class="cont_cell" @click="branchShow1 = true">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
@ -192,6 +209,9 @@
appapprove,
appapproveview
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
FILE_URL
} from '@/api/file.js'
@ -224,6 +244,7 @@
timeShow: false,
timeShow1: false,
timeShow2: false,
timeData: [{
title: '开始时间:',
timeShow: false,
@ -248,6 +269,7 @@
leavaTypeId2: '',
leavaTypeId3: '',
columns: [],
sprecord: [],
//
branchShow: false,
branchShow1: false,
@ -289,23 +311,27 @@
//
this.timestamp = Date.parse(new Date());
},
watch: {
timeData: {
handler(newVal, oldVal) {
if (newVal[0].time.length > 0 && newVal[1].time.length > 0) {
const {
leaveDays,
leaveHours
} = this.calculateLeaveDaysAndHours(this.timeData[0].time, this.timeData[1]
.time)
this.manHour = leaveHours + '小时'
this.daysNum = leaveDays + '天'
}
},
deep: true
computed: {
httpRequestUrl() {
return HTTP_REQUEST_URL;
}
},
watch: {
// timeData: {
// handler(newVal, oldVal) {
// if (newVal[0].time.length > 0 && newVal[1].time.length > 0) {
// const {
// leaveDays,
// leaveHours
// } = this.calculateLeaveDaysAndHours(this.timeData[0].time, this.timeData[1]
// .time)
// this.meatelist.duration= leaveHours + ''
// this.daysNum = leaveDays + ''
// }
// },
// deep: true
// }
},
methods: {
async getDocumentList2() {
this.columns3 = []
@ -316,6 +342,25 @@
this.columns3.push(deArr)
},
async flowuser(id) {
let res = await flowusers({
id: id
})
// flowPathShow = true
// console.log(res.data.flow_data == false)
if (res.data.flow_data.length > 0) {
this.flowShow = false
this.sprecord = res.data.flow_data
} else {
this.flowShow = true
}
// this.flowShow = false
// this.sprecord = res.data.flow_data
// this.flowShow=!res.data.flow_data
// console.log(res.data.flow_data)
},
confirm(e) {
console.log(e)
@ -345,6 +390,7 @@
this.dataobj = res.data.field
this.meatelist.type= this.dataobj1.detail.type
this.meatelist.id=this.dataobj1.detail.id
if ('name' in res.data.field) {
this.meatelist.name = 'name' in this.dataobj1.detail ? this.dataobj1.detail.name : ''
@ -376,7 +422,9 @@
.detail_time :
''
}
if ('duration' in res.data.field) {
this.meatelist.duration= 'duration' in this.dataobj1.detail ? this.dataobj1.detail.duration : ''
}
if ('content' in res.data.field) {
@ -738,6 +786,7 @@
this.meatelist.name = e.value[2].name
this.branchShow2 = false
},
/** 请假类型 */
leavaType(e) {
@ -771,6 +820,7 @@
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
// this.flowuser(value.id)
},
@ -951,18 +1001,30 @@
calculateLeaveDaysAndHours(leaveStartTime, leaveEndTime, hoursPerDay = 8) {
const startDate = new Date(leaveStartTime);
const endDate = new Date(leaveEndTime);
const timeDifference = endDate.getTime() - startDate.getTime();
//
const leaveDays = Math.floor((endDate.getTime() - startDate.getTime()) / (24 * 60 * 60 * 1000)) + 1;
//
const leaveHours = leaveDays * hoursPerDay;
//
return {
leaveDays,
leaveHours,
};
// console.log(timeDifference)
//
// const leaveHours = timeDifference / (1000 * 60 * 60); //
if (timeDifference <= 0) {
Toast('时间日期不合法,请重新输入')
this.meatelist.start_time = ''
this.meatelist.end_time = ''
this.timeData[0].time = ''
this.timeData[1].time = ''
this.meatelist.duration = ''
} else {
//
return {
leaveDays,
leaveHours,
};
}
}
},
filters: {
@ -998,7 +1060,46 @@
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.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;
}
}
}
.bot_btn {
position: fixed;
bottom: 0;
@ -1028,11 +1129,15 @@
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
border-bottom: 1px solid #f7f7f7;
.title{
width: 180rpx;
}
input{
width: 480rpx;
}
}
.cont_cell {

View File

@ -11,73 +11,87 @@
v-if="fieldValue.type=='select'&&fieldKey!='copy_uids'&&fieldKey!='check_admin_ids'&&fieldKey!='flow_id'&&fieldKey!='name'">
<view class="title">{{fieldValue.title}}</view>
<!-- {{fieldKey}} -->
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择" @click="leixin(fieldKey)">
<!-- <input type="text" v-model="meatelist[fieldKey]" placeholder="请选择" disabled
@click="leixin(fieldKey)"> -->
<view class="">
{{meatelist[fieldKey]}}
</view>
</view>
<view class="leava_type flex_a_c" v-if="fieldKey=='name'&fieldValue.type=='select'">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择" @click="leixiner()">
<!-- <input type="text" v-model="meatelist[fieldKey]" placeholder="请选择" disabled @click="leixiner()">
-->
<view class="">
{{meatelist[fieldKey]}}
</view>
</view>
<view class=""
v-if="fieldValue.type=='input'&&fieldKey!='end_time'&&fieldKey!='start_time'&&fieldKey!='duration'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" :placeholder="fieldValue.title">
<!-- <input type="text" v-model="meatelist[fieldKey]" :placeholder="fieldValue.title"> -->
<view class="">
{{meatelist[fieldKey]}}
</view>
</view>
</view>
<view class="" v-if=" fieldKey=='start_time'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择时间" disabled
>
@click="selectTime1">
</view>
</view>
<view class="" v-if="fieldKey=='end_time'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择时间" disabled
>
@click="selectTime2">
</view>
</view>
<view class="" v-if="fieldKey=='detail_time'">
<view class="cont_cell">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择时间" disabled
@click="selectTime3(fieldKey)">
</view>
</view>
<view class="" v-if="fieldKey=='duration'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="manHour" disabled placeholder="请假工时">
<!-- <input type="text" v-model="meatelist[fieldKey]" disabled placeholder="请假工时"> -->
<view class="">
{{meatelist[fieldKey]}}
</view>
</view>
</view>
<view class="" v-if="fieldValue.type=='textarea'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" :placeholder="fieldValue.title">
<!-- <input type="text" v-model="meatelist[fieldKey]" disabled :placeholder="fieldValue.title"> -->
<view class="">
{{meatelist[fieldKey]}}
</view>
</view>
</view>
<view class="" v-if="fieldValue.type=='file'">
<block v-for="(item, i) in fileArray" :key="i">
<view class="file flex_a_c_j_sb">
<view class="l_file">
<view class="l_file" @click="downloadFile(item)">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize | formatBytes }}</view>
<view class="file_size">{{ item.filesize }}</view>
<view class="upload_people">上传人{{ item.admin_name }}</view>
</view>
<u-icon @click="delImg(i)" name="close-circle" color="#333333" size="28"></u-icon>
<!-- <u-icon @click="delImg(i)" name="close-circle" color="#333333" size="28"></u-icon> -->
</view>
</block>
<!-- <view class="upload_box flex_a_c_j_sb" @click="seleckImage">
@ -99,54 +113,189 @@
</view>
<view class="" style="background-color: #fff;margin-bottom: 30rpx;">
<view class="cont_cell" style="padding-top: 20rpx;" v-if="ktype!=0 &&dataobj1.detail.check_status!=2">
<view class="" v-if='dataobj1.detail.check_status<2&&is_create_admin==1' style="background-color: #fff;margin-bottom: 30rpx;">
<view class="cont_cell" style="padding-top: 20rpx;padding-bottom: 20rpx;"
>
<view class="title" style="width: 200rpx;">撤回意见</view>
<textarea v-model="mscontent" placeholder="请输入撤回意见" />
<textarea v-model="mscontent" placeholder="请输入撤回意见"
style="padding-top: 20rpx;padding-left: 20rpx;border:1px solid#f1f1f1;padding :20rpx;20rpx;" />
</view>
</view>
<view class="cont_details">
<view class="examine">审批流程</view>
<view class="" style="border-bottom: 1px solid #f7f7f7;border-top: 1px solid #f7f7f7;">
<view class="record" style="display: flex;">
<view class="circle"></view>
<view class="text">{{nodelist.create_user}}创建</view>
</view>
<view class="" v-for="(itemh,m) in nodelist.flows" :key='m'>
<view class="record" style="display: flex;">
<view class="circle"></view>
<view class="" v-if='itemh.flow_type==1||itemh.flow_type==2' style="display: flex;">
<view class="text">{{itemh.flow_type==1?'部门负责人':'上级部门负责人'}}</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length>0">
<view class="text" v-if="itemh.check_list[0].status == 1">通过</view>
<view class="text" v-else-if="itemh.check_list[0].status == 2">拒绝</view>
</view>
<view class="" v-else>
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==7||itemh.flow_type== 6' style="display: flex;">
<view class="text">{{itemh.flow_type==7?'部门分管领导':'上级部门分管领导'}}</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length>0">
<view class="text" v-if="itemh.check_list[0].status == 1">通过</view>
<view class="text" v-else-if="itemh.check_list[0].status == 2">拒绝</view>
</view>
<view class="" v-else>
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==0' style="display: flex;">
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length<=0">
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==3' style="display: flex;">
<view class="text">指定人或签</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info.length>0">
<view class=""
v-if="itemh.user_id_info[0].status!=1&&itemh.user_id_info[0].status!=2">
<view class="text">待审核</view>
</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info" :key='o'>
<view class="text" v-if="itemk.status == 1">通过</view>
<view class="text" v-else-if="itemk.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==4' style="display: flex;">
<view class="text">指定人员(会签)</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info[0].status!=0&&itemh.user_id_info[0].status!=2">
<view class="text">通过</view>
</view>
<view class="" v-if="itemh.user_id_info.length>0">
<view class="text" v-for="(itemj, j) in itemh.user_id_info" :key='j'>
<view class="text" v-if="itemj.status == 0">待审核</view>
<view class="text" v-else-if="itemj.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==5' style="display: flex;">
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info.length>0">
<view class=""
v-if="itemh.user_id_info[0].status!=0&&itemh.user_id_info[0].status!=2">
<view class="text">通过</view>
</view>
<view class="text" v-for="(itemj, j) in itemh.user_id_info" :key='j'>
<view class="text" v-if="itemj.status == 0">待审核</view>
<view class="text" v-else-if="itemj.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="cont_cell">
<view class="title">审核状态</view>
{{dataobj1.detail.check_status=='0'?'待审核':dataobj1.detail.check_status=='1'?'审核中':dataobj1.detail.check_status=='2'?'审核通过':dataobj1.detail.check_status=='3'?'审核不通过':'撤销审核'}}
</view>
<view class="cont_cell">
<view class="title">当前审核人</view>
<input type="text" v-model="dataobj1.detail.check_user" disabled placeholder="请假工时">
<input type="text" v-model="dataobj1.detail.check_user" disabled placeholder="当前审核">
</view>
<view class="cont_cell">
<view class="title">抄送人</view>
<input type="text" v-model="dataobj1.detail.copy_user" disabled placeholder="请假工时">
<input type="text" v-model="dataobj1.detail.copy_user" disabled placeholder="抄送人">
</view>
<view class="examine">审批记录</view>
<block v-for="(item,i) in check_record" :key="i">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{item.check_time_str}} {{item.name}} {{item.status_str}}
了此申请操作意见{{item.content}}</text>
<text class="text">{{item.check_time_str}}{{item.name}}{{item.status_str}}了此申请
操作意见{{item.content}}</text>
</view>
</block>
</view>
<view class="" v-if="ktype!=0&&dataobj1.detail.check_status!=2">
<view class="bot_btn" v-if='dataobj1.detail.check_status!=4'>
<!-- <view class="reset" @click="appflowcheck()">拒绝</view>
<view class="submit_btn" @click=" appflowcheck1()">通过</view> -->
<view class="submit_btn" @click="appflowcheck1()">撤回</view>
</view>
<view class="bot_btn" v-else>
<view class="submit_btn" @click="editcheck1(dataobj1)">重新编辑</view>
</view>
</view>
<view class="bot_btn" v-if='dataobj1.detail.check_status<2&&is_create_admin==1'>
<view class="submit_btn" @click="appflowcheck1()">撤回</view>
</view>
<view class="bot_btn" v-if='dataobj1.detail.check_status>2&&is_create_admin==1'>
<view class="submit_btn" @click="editcheck1(dataobj1)">重新编辑</view>
</view>
<u-picker :show="branchShow" :defaultIndex='defaultIndex' ref="branchRef" :columns="branchColumns"
@confirm="branchConfirm" @change="columnCode" :closeOnClickOverlay="true" @close="branchShowclose"
keyName="name">
@ -161,13 +310,17 @@
import {
Toast
} from '../../libs/uniApi'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
appfield,
getemployee,
userdepartment,
appapprove,
appapproveview,
appflow_check
appflow_check,
flownodes
} from '@/api/oa.js'
export default {
data() {
@ -226,13 +379,15 @@
isflowDate: true,
flowDate: [],
fileArray: [],
nodelist: {},
typeId: '',
flag1: false,
datatype: '',
dataobj1: {},
check_record: [],
ktype: 1
ktype: 1,
check_step_sort: '',
is_create_admin: 0
}
},
onLoad(option) {
@ -278,6 +433,45 @@
this.columns3.push(deArr)
},
//
async flownodes(val) {
let res = await flownodes({
id: val,
type: 1
})
this.nodelist = res.data
// console.log(res)
},
downloadFile(item) {
uni.downloadFile({
url: HTTP_REQUEST_URL + item.filepath,
success: function(res) {
if (res.statusCode === 200) {
console.log(item)
const tempFilePath = res.tempFilePath;
if (item.fileext == 'png' || item.fileext == 'jpg') {
uni.previewImage({
urls: [tempFilePath]
});
} else {
uni.showModal({
title: '提示',
content: '暂时不支持查看,请登录后台查看',
success: function(res) {
if (res.confirm) {
// console.log('');
} else if (res.cancel) {
// console.log('');
}
}
});
}
}
}
});
},
confirm(e) {
console.log(e)
@ -290,8 +484,11 @@
})
// console.log(res.data)
this.dataobj1 = res.data
this.check_step_sort = res.data.detail.check_step_sort
this.check_record = res.data.check_record
this.is_create_admin = res.data.is_create_admin
this.applist1(res.data.detail.type)
this.flownodes(res.data.detail.id)
// this.dataobj = res.data.field
@ -308,7 +505,8 @@
})
this.dataobj = res.data.field
this.meatelist=this.dataobj1.detail
this.meatelist = this.dataobj1.detail
// this.meatelist.name = 'name' in this.dataobj1.detail ? this.dataobj1.detail.name : ''
// this.timeData[0].time = 'start_time' in this.dataobj1.detail ? this.dataobj1.detail.start_time : ''
// this.timeData[1].time = 'end_time' in this.dataobj1.detail ? this.dataobj1.detail.end_time : ''
@ -420,6 +618,8 @@
this.fileArray = this.dataobj1.detail.fileArray.map(function(obj) {
return {
name: obj.name,
filepath: obj.filepath,
fileext: obj.fileext,
filesize: obj.filesize
};
});
@ -774,6 +974,18 @@
padding-bottom: 28.07rpx;
}
.leave_box {
.cont_cell {
.title {
font-size: 31.58rpx;
flex: 1
}
}
}
.bot_btn {
position: fixed;
bottom: 0;
@ -803,11 +1015,17 @@
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
width: 180rpx;
}
input {
width: 480rpx;
}
}
.cont_cell {
@ -817,8 +1035,9 @@
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
font-size: 31.58rpx;
input{
width: 480rpx;
}
}
@ -836,6 +1055,7 @@
.record {
position: relative;
margin-bottom: 14.04rpx;
margin-top:14.04rpx;
.circle {
width: 31.58rpx;
@ -843,7 +1063,7 @@
background-color: #fff;
border: 2px solid #34A853;
border-radius: 50%;
margin: 5px;
margin: 3rpx;
display: flex;
flex-direction: column;
align-items: center;
@ -861,7 +1081,7 @@
}
.text {
flex: 1;
margin-left: 7.02rpx;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -65,7 +65,7 @@
<view class="file flex_a_c_j_sb">
<view class="l_file">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize | formatBytes }}</view>
<view class="file_size">{{ item.filesize }}</view>
<view class="upload_people">上传人{{ item.admin_name }}</view>
</view>
<u-icon @click="delImg(i)" name="close-circle" color="#333333" size="28"></u-icon>
@ -289,7 +289,7 @@
},
confirm(e) {
console.log(e)
//console.log(e)
this.flag1 = false
},
@ -304,7 +304,7 @@
// this.dataobj = res.data.field
// console.log(this.dataobj)
// //console.log(this.dataobj)
@ -361,7 +361,7 @@
this.meatelist.detail_type = this.columns[i].name
this.leavaTypeId1= this.columns[i].id
}
// console.log(this.meatelist.detail_type,this.leavaTypeId1)
// //console.log(this.meatelist.detail_type,this.leavaTypeId1)
}
@ -380,7 +380,7 @@
this.meatelist.department_type= this.columns[i].name
this.leavaTypeId = this.columns[i].id
}
// console.log(this.meatelist.detail_type)
// //console.log(this.meatelist.detail_type)
}
@ -399,7 +399,7 @@
this.meatelist.other_type = this.columns[i].name
this.leavaTypeId2= this.columns[i].id
}
// console.log(this.meatelist.detail_type)
// //console.log(this.meatelist.detail_type)
}
@ -418,7 +418,7 @@
this.meatelist.position_type = this.columns[i].name
this.leavaTypeId3= this.columns[i].id
}
// console.log(this.meatelist.detail_type)
// //console.log(this.meatelist.detail_type)
}
@ -469,7 +469,7 @@
this.branchColumns1 = codelist
this.branchColumns2 = codelist
console.log(this.branchColumns)
//console.log(this.branchColumns)
})
@ -523,7 +523,7 @@
},
async columnCode2(e) {
console.log(e)
//console.log(e)
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
@ -549,7 +549,7 @@
//
deliveryWayChangetwo(e) {
// console.log(e)
// //console.log(e)
this.check = e.detail.value
},
//
@ -577,11 +577,11 @@
check_admin_ids: this.check_admin_ids.toString()
}
let res = await appflow_check(data)
console.log(res)
//console.log(res)
Toast(res.msg)
},
leixin(e) {
// console.log(e)
// //console.log(e)
// this.meatelist[e]==1
this.datatype = e
if (e == 'department_type') {
@ -606,7 +606,7 @@
}));
this.columns = detailTypeOptions
}
// console.log(this.meatelist)
// //console.log(this.meatelist)
this.leavaTypeShow = true
},
leixiner() {
@ -614,7 +614,7 @@
},
leixiner1() {
this.branchShow = true
console.log('111111111',this.branchShow)
//console.log('111111111',this.branchShow)
},
branchShowclose() {
@ -629,19 +629,19 @@
// columnIndexvaluevalues
branchConfirm(e) {
console.log('confirm', e, e.value[2].name)
//console.log('confirm', e, e.value[2].name)
this.check_admin_name = e.value[2].name
this.check_admin_ids.push(e.value[2].id)
this.branchShow = false
},
branchConfirm1(e) {
console.log('confirm', e, e.value[2].name)
//console.log('confirm', e, e.value[2].name)
this.copy_uids += e.value[2].id
this.copy_names += e.value[2].name + ','
this.branchShow1 = false
},
branchConfirm2(e) {
console.log('confirm', e, e.value[2].name)
//console.log('confirm', e, e.value[2].name)
this.meatelist.uid = e.value[2].id
this.meatelist.name = e.value[2].name
this.branchShow2 = false
@ -649,7 +649,7 @@
/** 请假类型 */
leavaType(e) {
console.log(this.meatelist, this.datatype, e)
//console.log(this.meatelist, this.datatype, e)
if (this.datatype == 'department_type') {
this.meatelist.department_type = e.name
this.leavaTypeId = e.id
@ -661,8 +661,8 @@
this.meatelist.other_type = e.name
this.leavaTypeId2 = e.id
}
console.log(this.leavaTypeId2)
// console.log(this.meatelist,this.datatype, e.name)
//console.log(this.leavaTypeId2)
// //console.log(this.meatelist,this.datatype, e.name)
// this.meatelist.detail_type = e.name
// // this.leavaTypeVal = e.name
// this.meatelist.department_type = e.name
@ -692,7 +692,7 @@
this.timeData[i].timeShow = false
},
async submiteBtn() {
console.log(this.leavaTypeId2)
//console.log(this.leavaTypeId2)
let subData;
let subData1;
if (this.typeId == 6 || this.typeId == 7 || this.typeId == 8) {
@ -759,7 +759,7 @@
console.log(subData)
//console.log(subData)
try {
const res = await appapprove(subData)

File diff suppressed because it is too large Load Diff

View File

@ -15,9 +15,9 @@
<view class="leava_type flex_a_c"
v-if="fieldValue.type=='select'&& fieldKey!='copy_uids'&&fieldKey!='check_admin_ids'&&fieldKey!='flow_id'&&fieldKey!='name'">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择" disabled @click="leixin(fieldKey)"
v-if="fieldKey!='name'">
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择" disabled
@click="leixin(fieldKey)" v-if="fieldKey!='name'">
</view>
<view class="leava_type flex_a_c" v-if="fieldKey=='name'&fieldValue.type=='select'">
@ -34,7 +34,7 @@
<view class="" v-if=" fieldKey=='start_time'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择时间" disabled
@click="selectTime1">
@ -43,7 +43,7 @@
</view>
<view class="" v-if="fieldKey=='end_time'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择时间" disabled
@click="selectTime2">
@ -52,7 +52,7 @@
</view>
<view class="" v-if="fieldKey=='detail_time'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择时间" disabled
@click="selectTime3(fieldKey)">
@ -62,13 +62,13 @@
<view class="" v-if="fieldKey=='duration'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="manHour" disabled placeholder="请假工时">
<input type="text" v-model="meatelist[fieldKey]" placeholder="请假工时">
</view>
</view>
<view class="" v-if="fieldValue.type=='textarea'">
<view class="cont_cell">
<view class="leava_type flex_a_c">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" :placeholder="fieldValue.title">
</view>
@ -77,12 +77,12 @@
<view class="" v-if="fieldValue.type=='file'">
<block v-for="(item, i) in fileArray" :key="i">
<block v-for="(item, i) in fileArray" :key="i" @click="downloadFile(item)">
<view class="file flex_a_c_j_sb">
<view class="l_file">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize | formatBytes }}</view>
<view class="upload_people">上传人{{ item.admin_name }}</view>
</view>
<u-icon @click="delImg(i)" name="close-circle" color="#333333" size="28"></u-icon>
</view>
@ -123,10 +123,33 @@
<view class="title">选择审批流程</view>
<input type="text" v-model="flowPath" placeholder="请选择" disabled @click="flowPathShow = true">
</view>
<view class="cont_cell" @click="branchShow = true">
<view class="cont_cell" @click="branchShow = true" v-if="flowShow">
<view class="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
<view v-else style=" border-bottom: 1px solid #f7f7f7;">
<block v-for="(item,i) in sprecord" :key="i">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{i+1}} {{item.flow_type_txt}}
</text>
</view>
<view class="" v-if="item.user_id_info.length>0&&item.user_id_info"
style='padding-left: 20rpx;padding-right: 20rpx;margin-bottom: 20rpx;'>
<view class="" v-for="(items,k) in item.user_id_info"
style="display: flex;margin-right: 20rpx;">
<view class=""
style="width: 30rpx;height: 30rpx;border-radius: 50%; margin-left: 20rpx;margin-right: 10rpx;">
<image :src="`${httpRequestUrl}`+items.thumb" mode=""
style="width: 30rpx;height: 30rpx;border-radius: 50%;margin-top: 5rpx;"></image>
</view>
<view class=""> {{items.name}}</view>
</view>
</view>
</block>
</view>
<view class="cont_cell" @click="branchShow1 = true">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
@ -173,11 +196,13 @@
<!-- 选择时间 -->
<u-datetime-picker :show="timeShow1" mode="datetime" :maxDate="1786778555000" closeOnClickOverlay
@confirm="timeConfirm1($event)" @cancel="timeShow1 = false" @close="timeShow1 = false"></u-datetime-picker>
<u-datetime-picker :show="timeShow1" mode="datetime" :maxDate="1786778555000" :minDate="timestamp"
closeOnClickOverlay @confirm="timeConfirm1($event)" @cancel="timeShow1 = false"
@close="timeShow1 = false"></u-datetime-picker>
<u-datetime-picker :show="timeShow2" mode="datetime" :maxDate="1786778555000" closeOnClickOverlay
@confirm="timeConfirm2($event)" @cancel="timeShow2 = false" @close="timeShow2 = false"></u-datetime-picker>
@confirm="timeConfirm2($event)" :minDate="timestamp" @cancel="timeShow2 = false"
@close="timeShow2 = false"></u-datetime-picker>
<u-datetime-picker :show="timeShow" mode="datetime" :maxDate="1786778555000" :minDate="timestamp"
closeOnClickOverlay @confirm="timeConfirm3($event)" @cancel="timeShow = false"
@close="timeShow = false"></u-datetime-picker>
@ -198,11 +223,14 @@
getemployee,
userdepartment,
appapprove,
flowusers
} from '@/api/oa.js'
import {
FILE_URL
} from '@/api/file.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
export default {
components: {
@ -275,6 +303,9 @@
datatype: '',
fileOption: {},
files: new Map(),
flowShow: true,
sprecord: []
}
},
onLoad(option) {
@ -295,6 +326,11 @@
this.getDocumentList()
this.getDocumentList2()
},
computed: {
httpRequestUrl() {
return HTTP_REQUEST_URL;
}
},
onShow() {
// this.getFlow()
//
@ -302,21 +338,21 @@
},
watch: {
timeData: {
handler(newVal, oldVal) {
if (newVal[0].time.length > 0 && newVal[1].time.length > 0) {
const {
leaveDays,
leaveHours
} = this.calculateLeaveDaysAndHours(this.timeData[0].time, this.timeData[1]
.time)
console.log(leaveHours, leaveDays)
this.manHour = leaveHours + '小时'
this.daysNum = leaveDays + '天'
}
},
deep: true
}
// timeData: {
// handler(newVal, oldVal) {
// if (newVal[0].time.length > 0 && newVal[1].time.length > 0) {
// const {
// leaveDays,
// leaveHours
// } = this.calculateLeaveDaysAndHours(this.timeData[0].time, this.timeData[1]
// .time)
// console.log(leaveHours, leaveDays)
// this.meatelist.duration = leaveHours
// this.daysNum = leaveDays + ''
// }
// },
// deep: true
// }
},
methods: {
async getDocumentList2() {
@ -329,6 +365,26 @@
},
async flowuser(id) {
let res = await flowusers({
id: id
})
// flowPathShow = true
// console.log(res.data.flow_data == false)
if (res.data.flow_data.length > 0) {
this.flowShow = false
this.sprecord = res.data.flow_data
} else {
this.flowShow = true
}
// this.flowShow = false
// this.sprecord = res.data.flow_data
// this.flowShow=!res.data.flow_data
// console.log(res.data.flow_data)
},
confirm(e) {
console.log(e)
@ -357,11 +413,13 @@
},
//
async getDocumentList() {
const res = await userdepartment()
const res = await userdepartment({
tree: 1
})
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
@ -372,20 +430,14 @@
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[1][0].id
did: codelist[0][0].id
})
codelist[2] = dat.data.map((item) => {
codelist[1] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
@ -403,7 +455,7 @@
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
if (e.columnIndex == 0) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns[e.columnIndex][e.index].id
@ -418,8 +470,10 @@
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns, 2, newColumn);
this.$set(this.branchColumns, 1, newColumn);
} else {
this.$set(this.branchColumns, 1, []);
}
}
@ -427,7 +481,7 @@
},
//
async columnCode1(e) {
if (e.columnIndex == 1) {
if (e.columnIndex == 0) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns1[e.columnIndex][e.index].id
@ -442,16 +496,19 @@
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns1, 2, newColumn);
this.$set(this.branchColumns1, 1, newColumn);
} else {
this.$set(this.branchColumns1, 1, []);
}
}
},
async columnCode2(e) {
console.log(e)
if (e.columnIndex == 1) {
if (e.columnIndex == 0) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns2[e.columnIndex][e.index].id
@ -466,8 +523,10 @@
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns2, 2, newColumn);
this.$set(this.branchColumns2, 1, newColumn);
} else {
this.$set(this.branchColumns2, 1, []);
}
}
@ -572,22 +631,24 @@
},
// columnIndexvaluevalues
branchConfirm(e) {
console.log('confirm', e, e.value[2].name)
this.check_admin_name = e.value[2].name
this.check_admin_ids = e.value[2].id
this.check_admin_name = e.value[1].name
this.check_admin_ids = e.value[1].id
this.branchShow = false
console.log('confirm', this.check_admin_ids, e, e.value[1].name)
},
branchConfirm1(e) {
console.log('confirm', e, e.value[2].name)
this.copy_uids += e.value[2].id
this.copy_names += e.value[2].name + ','
this.copy_uids += e.value[1].id + ','
this.copy_names += e.value[1].name + ','
this.branchShow1 = false
console.log(this.copy_uids, e, e.value[1].name)
},
branchConfirm2(e) {
console.log('confirm', e, e.value[2].name)
this.meatelist.uid = e.value[2].id
this.meatelist.name = e.value[2].name
console.log('confirm', e, e.value[1].name)
this.meatelist.uid = e.value[1].id
this.meatelist.name = e.value[1].name
this.branchShow2 = false
},
/** 请假类型 */
@ -629,6 +690,7 @@
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
this.flowuser(value.id)
},
async getFlow() {
@ -696,21 +758,21 @@
subData1.num = this.leavaTypeId4
}
if (this.meatelist.hasOwnProperty('num1') && this.typeId == 20) {
subData1.num1 = this.leavaTypeId5
subData1.num1 = this.leavaTypeId5
}
subData = {
...this.meatelist,
...subData1
}
console.log(subData)
// console.log(subData)
try {
const res = await appapprove(subData)
if(res.code==0){
uni.navigateBack({
delta:1
})
if (res.code == 0) {
uni.navigateBack({
delta: 1
})
}
Toast('提交成功')
} catch (e) {
@ -808,25 +870,34 @@
/**
* 计算两个时间戳之间相差的小时数
* */
calculateLeaveDaysAndHours(leaveStartTime, leaveEndTime) {
calculateLeaveDaysAndHours(leaveStartTime, leaveEndTime, hoursPerDay = 8) {
const startDate = new Date(leaveStartTime);
const endDate = new Date(leaveEndTime);
const timeDifference = endDate.getTime() - startDate.getTime();
//
const leaveDays = Math.floor((endDate.getTime() - startDate.getTime()) / (24 * 60 * 60 * 1000)) + 1;
//
// const leaveHours = leaveDays * hoursPerDay;
const timeDifference = endDate.getTime() - startDate.getTime();
const leaveHours = leaveDays * hoursPerDay;
//
const leaveHours = timeDifference / (1000 * 60 * 60); //
// console.log(leaveHours)
//
return {
leaveDays,
leaveHours,
};
// const leaveHours = timeDifference / (1000 * 60 * 60); //
if (timeDifference <= 0) {
Toast('时间日期不合法,请重新输入')
this.meatelist.start_time = ''
this.meatelist.end_time = ''
this.timeData[0].time = ''
this.timeData[1].time = ''
this.meatelist.duration = ''
} else {
//
return {
leaveDays,
leaveHours,
};
}
}
},
filters: {
@ -851,6 +922,10 @@
padding-bottom: 100px;
}
.leave_box .title {
width: 180rpx;
}
.leave_box,
.flow_path {
width: 100%;
@ -859,10 +934,12 @@
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
/deep/.u-action-sheet__item-wrap {
/deep/.u-action-sheet__item-wrap {
overflow: auto;
max-height: 50vh;
}
.bot_btn {
position: fixed;
bottom: 0;
@ -892,10 +969,63 @@
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
width: 180rpx;
}
input {
width: 480rpx;
}
}
.cont_cell{
input {
width: 480rpx;
}
}
.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 {
margin-left: 7.02rpx;
}
}
:last-child {
.circle {
&::before {
display: none;
}
}
}

View File

@ -29,8 +29,8 @@
<view class="file flex_a_c_j_sb">
<view class="l_file">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize | formatBytes }}</view>
<view class="upload_people">上传人{{ item.admin_name }}</view>
<view class="file_size">{{ item.filesize }}</view>
</view>
<u-icon @click="delImg(i)" name="close-circle" color="#333333" size="28"></u-icon>
</view>
@ -339,14 +339,14 @@
},
// columnIndexvaluevalues
branchConfirm(e) {
console.log('confirm', e, e.value[2].name)
//console.log('confirm', e, e.value[2].name)
this.check_admin_name = e.value[2].name
this.check_admin_ids = e.value[2].id
this.branchShow = false
},
branchConfirm1(e) {
console.log('confirm', e, e.value[2].name)
//console.log('confirm', e, e.value[2].name)
this.copy_uids += e.value[2].id
this.copy_names+= e.value[2].name+','
this.branchShow1 = false
@ -441,12 +441,12 @@
}).catch(err => {
Toast('上传失败')
that.loading = false
console.log('上传失败', err)
//console.log('', err)
})
},
fail: function(err) {
Toast('添加失败')
console.log('失败', err)
//console.log('', err)
}
});
},
@ -459,7 +459,7 @@
if (res.confirm) {
that.fileArray.splice((i, 1))
} else if (res.cancel) {
console.log('用户点击取消');
//console.log('');
}
}
})

View File

@ -9,14 +9,14 @@
<view class="middle-threeb" style="margin-bottom: 20rpx;">
<view class="middle-threeb-title">
<view class="title">
<!-- <view class="middle-threeb-title">
<!-- <view class="title">
{{list.send_time}}
</view>
</view> -->
<!-- <view class="title-status">
{{list.send_time}}
</view> -->
</view>
<!-- </view> -->
<view class="middle-threeba">
<view class="middle-threeb-a">
@ -298,17 +298,17 @@
}
.name {
font-size: 35rpx;
font-size: 25rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
// font-weight: bold;
color: #333333;
text {
font-size: 25rpx;
font-size: 35rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #CCCCCC;
color: #333333;
}
}

View File

@ -173,7 +173,7 @@
uni.navigateTo({
url: '/pages/message/detail??type=' + id
})
// console.log(res)
// //console.log(res)
},
taskDetail(item) {

View File

@ -86,12 +86,12 @@
leftClick(e) {
uni.sendHostEvent('closeApp', e, (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
//console.log('' + JSON.stringify(ret));
});
},
async login() {
console.log(this.formData)
//console.log(this.formData)
if (this.formData.scene == 1 && !this.formData.old_pwd) return Toast('旧密码不能为空');
if (this.formData.scene == 1 && !this.formData.pwd) return Toast('新密码不能为空');
if (this.formData.scene == 1 && !this.formData.pwd_confirm) return Toast('确认密码不能为空');
@ -106,7 +106,7 @@
})
let res = await changePassword(this.formData);
// console.log(res, '11111111')
// //console.log(res, '11111111')
Toast(res.msg)
if(res.code==0){
uni.switchTab({

628
pages/oaTask/detail.vue Normal file
View File

@ -0,0 +1,628 @@
<template>
<view class="content">
<view class="content-middle">
<view class="content-middle-three">
<view class="middle-three">
<view class="middle-threeb">
<view class="middle-threeb-title">
<view class="title">
{{detail.title}}
</view>
<view class="title-status" @click="show5=true">
{{detail.flow_status==1?"待办的":detail.flow_status==2?"进行中":detail.flow_status==3?"已完成":detail.flow_status==4?"已拒绝":"已关闭"}}
</view>
</view>
<view class="middle-threeba">
<view class="middle-threeb-a">
<view class="threeb-a-b">
<view class="name">负责人<text>{{detail.director_name}}</text></view>
<view class="name">协办人<text>{{detail.assist_admin_names}}</text></view>
<!-- <view class="name">发布人<text>{{detail.title}}</text></view> -->
<view class="name">工作性质<text>{{detail.cate_name}}</text></view>
<view class="name">计划完成日期<text>{{detail.end_time}}</text></view>
<!-- <view class="name">任务验收截止时间<text>{{detail.project_name}}</text></view> -->
<view class="name">预估工时<text>{{detail.plan_hours}}</text></view>
</view>
</view>
</view>
</view>
</view>
<view class="middle-three" style="margin-top: 30rpx;">
<view class="middle-threeb">
<view class="middle-threeb-title">
<view class="title">
任务描述
</view>
</view>
<view class="middle-threeba">
<view class="middle-threeb-a">
<view class="threeb-a-b1">
<!-- <text>{{detail.content}}</text> -->
<jyf-parser :html="detail.content" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
</view>
</view>
</view>
</view>
<view class="" style="background-color: #fff;">
<block v-for="(item, i) in fileArray" :key="i">
<view class="file flex_a_c_j_sb" style="z-index: 0;">
<view class="l_file">
<view class="file_name" @click="downloadFile(item)">{{ item.name }}</view>
<view class="file_size">{{ item.filesize }}</view>
<!-- -->
</view>
<u-icon @click="delImg(item,i)" name="close-circle" color="#333333" size="28"
style="z-index: 999;"></u-icon>
</view>
</block>
<view class="upload_box flex_a_c_j_sb">
<view>
<view class="title">选择文件并上传</view>
<view class="text">
上传前请规范命名最大只能上传100M的文件<br />
超过请压缩成多个文件上传
</view>
</view>
<view class="" style="margin-top: 60rpx;">
<lsjUpload ref="lsjUpload" childId="upload1" :size="10" :option="fileOption" height="200rpx"
style="margin-top: 28rpx;" :debug="false"
:formats="'pdf,txt,zip,rar,jpg,png,mp3,avi,mov,mp4,gif'" :multiple="false" :count="3"
:instantly="true" @change="changeFile" @uploadEnd='onuploadEnd' @progress='onprogre'>
<u-icon name="plus-circle" color="#333333" size="28"></u-icon>
</lsjUpload>
</view>
</view>
</view>
</view>
</view>
<u-empty v-if="Object.keys(detail).length==0" text="没有信息" icon="/static/empty/data.png"></u-empty>
<u-action-sheet :show="show5" :actions="actions5" title="请选择任务状态" @close="show5 = false" @select="Select5">
</u-action-sheet>
</view>
</template>
<script>
import {
projecttaskview,
addprojecttask,
addfile,
deletefile
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
Toast
} from '@/libs/uniApi.js'
import {
FILE_URL
} from '@/api/file.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
export default {
components: {
lsjUpload
},
data() {
return {
show5: false,
type: '',
detail: {},
actions5: [{
name: '待办的',
id: '1',
}, {
name: '进行中',
id: '2',
}, {
name: '已完成',
id: '3'
}, {
name: '已拒绝',
id: '4'
}, {
name: '已关闭',
id: '5'
}],
fileArray: [],
fileOption: {},
tagStyle: {
img: 'width:100%;display:block;',
},
files: new Map(),
};
},
onLoad(data) {
this.fileOption = {
url: FILE_URL,
name: 'file',
header: {
token: this.$store.state.app.token
}
},
this.type = data.data
this.getDeatil(data.data)
},
onShow() {
},
methods: {
async getDeatil(id) {
let res = await projecttaskview({
id: id
})
this.detail = res.data.detail
this.fileArray = res.data.file_array.map(function(obj) {
return {
name: obj.name,
filepath: obj.filepath,
fileext: obj.fileext,
filesize: obj.filesize,
id: obj.id
};
});
},
Select5(e) {
this.detail.flow_status = e.id
// con
this.zhuangtai()
},
downloadFile(item) {
uni.downloadFile({
url: HTTP_REQUEST_URL + item.filepath,
success: function(res) {
if (res.statusCode === 200) {
const tempFilePath = res.tempFilePath;
if (item.fileext == 'png'||item.fileext == 'jpg') {
uni.previewImage({
urls: [tempFilePath]
});
} else {
uni.showModal({
title: '提示',
content: '暂时不支持查看,请登录后台查看',
success: function(res) {
if (res.confirm) {
// console.log('');
} else if (res.cancel) {
// console.log('');
}
}
});
}
}
}
});
},
async zhuangtai() {
let res = await addprojecttask({
id: this.type,
flow_status: this.detail.flow_status
})
if (res.code == 0) {
uni.navigateBack({
delta: 1
})
}
Toast(res.msg)
},
async addfile1(val) {
let data = {
topic_id: this.detail.id,
file_id: val.id,
file_name: val.name,
module: 'task',
}
let res = await addfile(data)
if (res.code == 0) {
this.getDeatil(this.type)
}
Toast(res.msg)
// console.log(res)
},
/**
* 某文件上传结束回调(成功失败都回调)
* @param {Object} item 当前上传完成的文件
*/
onuploadEnd(item) {
console.log(`${item.name}已上传结束,上传状态=${item.type}`);
if (item['responseText']) {
this.files.get(item.name).responseText = JSON.parse(item.responseText);
}
//
this.files.set(item.name, item);
let arr1 = this.files.get(item.name).responseText
this.fileArray.push(arr1.data)
this.addfile1(arr1.data)
//
this.$forceUpdate();
},
/**
* 上传进度回调
* 如果网页上md文档没有渲染出事件名称onprogre请复制代码的小伙伴自行添加上哈没有哪个事件是只(item)
* @param {Object} item 当前正在上传的文件
*/
onprogre(item) {
console.log('打印对象', JSON.stringify(this.files.get(item.name)));
//
this.files.set(item.name, item);
//
this.$forceUpdate();
},
/**
* 文件选择回调
* @param {Object} files 已选择的所有文件Map集合
*/
changeFile(files) {
console.log('当前选择的文件列表:', JSON.stringify([...files.values()]));
//
this.files = files
console.log(files.values())
//
this.$forceUpdate();
},
/**
* 指定上传某个文件
* @param {Object} name 带后缀名的文件名称
*/
resetUpload() {
this.$refs.lsjUpload.upload(name);
},
async delImg(item, i) {
console.log(item)
let res = await deletefile({
id: item.id
})
if (res.code == 0) {
this.fileArray.splice(i, 1)
}
Toast(res.msg)
}
}
};
</script>
<style lang="scss">
page {
padding: 0 28rpx;
}
//
.upload_box {
padding: 17.54rpx;
background-color: #fff;
border-radius: 4px;
.title {
font-size: 28.07rpx;
}
.text {
margin-top: 7.02rpx;
font-size: 21.05rpx;
color: #999;
}
}
.file_name {
width: 526.32rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.file {
padding: 17.54rpx;
border-radius: 4px;
border: 1px solid #F2F2F2;
margin: 17.54rpx 0;
.file_size {
margin-top: 7.02rpx;
}
.file_size,
.upload_people {
font-size: 21.05rpx;
color: #999;
}
}
.content-middle {
.content-middle-one {
.middle-one {
display: flex;
background-color: #FFFFFF;
padding: 28rpx 18rpx;
.search {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
width: 149rpx;
line-height: 63rpx;
height: 63rpx;
background: #FFFFFF;
text-align: center;
border-radius: 35rpx 35rpx;
border: 2rpx solid #E6E5E5;
margin-left: 18rpx;
}
.content-middle-search {
display: flex;
width: 527rpx;
height: 63rpx;
line-height: 63rpx;
padding-left: 30rpx;
background: #F7F7F7;
border-radius: 35rpx 35rpx;
font-size: 25rpx;
input {
width: 527rpx;
height: 63rpx;
line-height: 63rpx;
padding-left: 30rpx;
}
.placeholder {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
padding-left: 30rpx;
}
}
.content-middle-sai {
display: flex;
width: 149rpx;
height: 63rpx;
line-height: 63rpx;
background: #FFFFFF;
border-radius: 35rpx 35rpx;
border: 2rpx solid #E6E5E5;
margin-left: 18rpx;
.content-middle-saia {
width: 29rpx;
height: 28rpx;
margin-left: 25rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
.content-middle-saib {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
}
}
}
.content-middle-search-detail {
background-color: #FFFFFF;
:nth-last-child(1) {
border: none !important;
}
.search-detail {
display: flex;
justify-content: space-between;
padding-right: 195rpx;
padding: 18rpx 53rpx;
border-bottom: 2rpx solid #E6E6E6;
;
.search-detail-one {}
}
}
}
.content-middle-three {
margin-top: 26rpx;
.middle-three {
background-color: #FFFFFF;
padding: 28rpx 28rpx;
.middle-threea {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #3274F9;
margin-bottom: 30rpx;
}
.middle-threeb {
.middle-threeb-title {
display: flex;
justify-content: space-between;
margin-bottom: 10px;
.title {
width: 540rpx;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.title-status {
font-size: 25rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #3274F9;
background: #E4EDFF;
height: 42rpx;
line-height: 42rpx;
padding: 0 10rpx;
border-radius: 7rpx 7rpx;
}
}
.middle-threeba {
display: flex;
justify-content: space-between;
.middle-threeb-a {
.threeb-a-b {
.middle-edit {
width: 645rpx;
height: 63rpx;
line-height: 63rpx;
background: #e6e5d9;
text-align: center;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #000;
margin-bottom: 20rpx;
}
.middle-delete {
width: 645rpx;
height: 63rpx;
line-height: 63rpx;
background: #F02828;
text-align: center;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
.name {
font-size: 28rpx;
font-family: PingFang SC-Bold, PingFang SC;
color: #333333;
text {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
}
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
}
.threeb-a-b1 {
width: 350px;
padding: 20rpx 20rpx;
word-wrap: break-word;
overflow: hidden;
}
}
.middle-threeb-b {
height: 80rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
}
</style>

View File

@ -28,7 +28,7 @@
<view class="middle-three">
<view class="middle-threeb" v-for="(items,j) in list" :key='j'>
<view class="middle-threeb" v-for="(items,j) in list" :key='j' @click="detail(items)">
<liu-swipe-action :index="j" @clickItem="clickItem" :btnList='btnList'>
<view class="middle-threeb-title">
<view class="title">
@ -47,6 +47,10 @@
<view class="name">工作类型<text>{{items.cate_name}}</text></view>
<view class="name">关联项目<text>{{items.project_name}}</text></view>
<view class="name">预估工时<text>{{items.plan_hours}}</text></view>
<view class="name">
状态<text>{{items.flow_status==1?"待办的":items.flow_status==2?"进行中":items.flow_status==3?"已完成":items.flow_status==4?"已拒绝":"已关闭"}}</text>
</view>
<!-- <view class="achor">{{items.name2}}</view> -->
<!-- <view class="middle-edit" @click="editpart(items)">
编辑
@ -101,6 +105,7 @@
</view>
</view>
</view>
<view class="content-middle-two">
<view class="middle-two-img">
<image src="@/static/images/ja2.png" mode="aspectFit"></image>
@ -218,7 +223,7 @@
},
//
clickItem(data) {
// console.log(e)
// //console.log(e)
if (data.id == 2) {
uni.showModal({
@ -260,6 +265,12 @@
url: '/pages/addquest/index??type=' + 1 + "&data=" + item.id
})
},
//
detail(item) {
uni.navigateTo({
url: '/pages/oaTask/detail??type=' + 1 + "&data=" + item.id
})
},
//
search() {
this.initList()
@ -390,10 +401,11 @@
.content-middle-three {
margin-top: 26rpx;
background-color: #FFFFFF;
padding: 28rpx 28rpx;
.middle-three {
.middle-threea {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
@ -403,7 +415,9 @@
}
.middle-threeb {
padding: 28rpx 28rpx;
margin-bottom: 20px;
background-color: #FFFFFF;
.middle-threeb-title {
height: 98rpx;
@ -469,15 +483,16 @@
.name {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
ont-family: PingFang SC-Regular, PingFang SC;
text {
font-size: 25rpx;
// font-size: 25rpx;
font-size: 35rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #CCCCCC;
font-weight: bold;
color: #333333;
}
}
@ -524,8 +539,12 @@
font-weight: 400;
color: #FFFFFF;
display: flex;
margin: 0 auto;
margin-top: 25rpx;
position: absolute;
bottom: 90px;
left: 50%;
position: fixed;
margin-left: -198rpx;
.middle-two-img {

View File

@ -121,7 +121,7 @@
// keyword: this.keyword
// })
// this.list = res.data.data
// console.log(res.data)
// //console.log(res.data)
// },
async initList() {
this.loadConfig.page = 1;
@ -157,7 +157,7 @@
},
//
clickItem(data) {
// console.log(e)
// //console.log(e)
if (data.id == 2) {
uni.showModal({
content: '确定要删除吗',

1217
pages/project/detail.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@
</view>
<view class="content-middle-one">
<view class="middle-one" v-for="(item,j) in list" :key='j'>
<view class="middle-one" v-for="(item,j) in list" :key='j' @click="tian(item)">
<liu-swipe-action :index="j" @clickItem="clickItem" :btnList='btnList'>
<view class="middle-onea">
<view class="middle-onea-title">
@ -178,7 +178,7 @@
},
//
clickItem(data) {
// console.log(e)
// //console.log(e)
if (data.id == 2) {
uni.showModal({
@ -217,6 +217,12 @@
url: '/pages/addproject/index??type=' + 1 + "&data=" + item.id
})
},
//
tian(item){
uni.navigateTo({
url: '/pages/project/detail??type=' + 1 + "&data=" + item.id
})
},
//
search() {
this.initList()

View File

@ -163,7 +163,7 @@
},
//
clickItem(data) {
// console.log(e)
// //console.log(e)
uni.showModal({
content: '确定要删除吗',
success: (e) => {

View File

@ -10,13 +10,13 @@
<view class="content-middle">
<view class="content-middle-one">
<view class="middle-one" v-for="(item,k) in list2" @click="tian(item)">
<liu-swipe-action :index="k" @clickItem="clickItem" :btnList='btnList'>
<liu-swipe-action :index="k" @clickItem="clickItem" :btnList='btnList1' v-if='item.check_status==2&&num!=2&&num!=0'>
<view class="middle-one-title">
<view class="one-titlea">
<view class="name">
{{item.check_user}}
{{item.admin_name}}
</view>
<view class="parment">
{{item.code}}
@ -30,19 +30,40 @@
<text v-if='item.check_status==2'>审核通过</text>
<text v-if='item.check_status==3'>审核不通过</text>
<text v-if='item.check_status==4'>撤销审核</text>
<text v-if='item.check_status==5'>开具</text>
<text v-if='item.check_status==5'>打款</text>
</view>
</view>
<view class="middle-one-time">报销部门{{item.department}}</view>
<view class="middle-one-time">入账月份{{item.income_month}}</view>
<view class="middle-one-time">报销人审核人{{item.admin_name}}</view>
<view class="middle-one-time">报销人审核人{{item.check_user}}</view>
</liu-swipe-action>
<liu-swipe-action :index="k" @clickItem="clickItem" :btnList='btnList' v-else>
<view class="middle-one-title">
<view class="one-titlea">
<view class="name">
{{item.admin_name}}
</view>
<view class="parment">
{{item.code}}
</view>
</view>
<view class="one-titleb"
:style="{'color':item.check_status==0?'#000':item.check_status==1?'#dddddd':item.check_status==2?'#34A853':item.check_status==3?'#F9AA32':'#F02828'}">
<text v-if='item.check_status==0'>待审核</text>
<text v-if='item.check_status==1'>审核中</text>
<text v-if='item.check_status==2'>审核通过</text>
<text v-if='item.check_status==3'>审核不通过</text>
<text v-if='item.check_status==4'>撤销审核</text>
<text v-if='item.check_status==5'>已打款</text>
</view>
</view>
<view class="middle-one-time">报销部门{{item.department}}</view>
<view class="middle-one-time">入账月份{{item.income_month}}</view>
<view class="middle-one-time">报销人审核人{{item.check_user}}</view>
</liu-swipe-action>
<!-- <view class="middle-edit" @click="editpart(item)">
编辑
</view>
<view class="middle-delete" @click="clickItem(item)">
删除
</view> -->
</view>
</view>
</view>
@ -59,14 +80,18 @@
} from '@/libs/uniApi.js'
import {
expenstopay,
appexpenseindex,
apexpenselist,
appexpensecopy
} from '@/api/oa.js'
import liuswipeaction from '@/uni_modules/liu-swipe-action/components/liu-swipe-action/liu-swipe-action.vue'
export default {
components: {
'liu-swipe-action': liuswipeaction
},
data() {
return {
@ -87,6 +112,14 @@
list2: [],
num: 0,
btnList: [],
btnList1: [{
id: '2',
name: '开票',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
@ -168,7 +201,6 @@
}
this.list2 = [...this.list2, ...res.data?.data]
console.log(this.list2)
},
async getlist1() {
@ -215,14 +247,14 @@
},
//
clickItem(data) {
// console.log(e)
// //console.log(e)
if (data.id == 2) {
uni.showModal({
content: '确定要删除吗',
content: '是否设置为已打款状态',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(data.id)
this.deleteDepartment(this.list2[data.index].id)
}
}
})
@ -235,13 +267,12 @@
//
async deleteDepartment(id) {
const res = await deleteexpenseflow({
const res = await expenstopay({
id: id
})
//console.log(res,id)
if (res.code == 0) {
if (this.num == 0) {
this.initList()
} else if (this.num == 1) {

View File

@ -27,7 +27,7 @@
</view>
<view class="leava_type flex_a_c">
<view class="title">报销项目</view>
<view class="title">关联项目</view>
<input type="text" v-model="project" placeholder="请选择" disabled @click="leavaShow1">
</view>
@ -67,8 +67,8 @@
<view class="file flex_a_c_j_sb">
<view class="l_file">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize | formatBytes }}</view>
<view class="upload_people">上传人{{ item.admin_name }}</view>
<view class="file_size">{{ item.filesize }}</view>
</view>
<!-- <u-icon @click="delImg(i)" name="close-circle" color="#333333" size="28"></u-icon> -->
</view>
@ -99,10 +99,32 @@
<view class="title">选择审批流程</view>
<input type="text" v-model="flowPath" placeholder="请选择" disabled @click="flowPathShow = true">
</view>
<view class="cont_cell" @click="branchShow = true">
<view class="cont_cell" @click="branchShow = true" v-if="flowShow">
<view class="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
<view v-else>
<block v-for="(item,i) in sprecord" :key="i">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{i+1}} {{item.flow_type_txt}}
</text>
</view>
<view class="" v-if="item.user_id_info.length>0&&item.user_id_info"
style='padding-left: 20rpx;padding-right: 20rpx;margin-bottom: 20rpx;'>
<view class="" v-for="(items,k) in item.user_id_info"
style="display: flex;margin-right: 20rpx;">
<view class=""
style="width: 30rpx;height: 30rpx;border-radius: 50%; margin-left: 20rpx;margin-right: 10rpx;">
<image :src="`${httpRequestUrl}`+items.thumb" mode=""
style="width: 30rpx;height: 30rpx;border-radius: 50%;margin-top: 5rpx;"></image>
</view>
<view class=""> {{items.name}}</view>
</view>
</view>
</block>
</view>
<view class="cont_cell" @click="branchShow1 = true">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
@ -161,8 +183,12 @@
getemployee,
appexpense,
projectlist,
appexpenseview
appexpenseview,
flowusers
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
@ -195,6 +221,9 @@
columns: [],
check_admin_name: '',
copy_names: '',
flowShow: true,
sprecord: [],
list: [{
cate_title: "",
amount: '',
@ -219,35 +248,60 @@
},
//
this.timestamp = Date.parse(new Date());
this.getPersonInfo()
// this.getPersonInfo()
this.getlist()
this.getlist1()
this.getDocumentList()
this.getDocumentList1()
},
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 appexpenseview({
id: id
})
// console.log(res,'111')
this.listobj.code = res.data.detail.code
this.listobj.id = id
this.listobj.id = res.data.detail.id
this.list = res.data.detail.list
this.listobj.expense_time = res.data.detail.expense_time
this.listobj.income_month = res.data.detail.income_month
this.project = res.data.detail.ptname
this.project = res.data.detail.ptname
this.listobj.flow_id = res.data.flows.id
this.listobj.ptid = res.data.detail.ptid
this.personInfo.name = res.data.detail.create_user
this.personInfo.department_name = res.data.detail.department
this.fileArray = res.data.detail.fileArray.map(function(obj) {
return {
name: obj.name,
filepath: obj.filepath,
fileext: obj.fileext,
filesize: obj.filesize
};
});
// console.log(this.fileArray,'11111111111', res.data.detail)
// console.log(this.fileArray,'11111111111', res.data.detail)
},
reset() {
@ -390,7 +444,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
}
@ -426,9 +480,9 @@
const res = await appexpense(this.listobj)
if(res.code==0){
if (res.code == 0) {
uni.navigateBack({
delta:1
delta: 1
})
}
Toast('提交成功')
@ -488,6 +542,7 @@
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
this.flowuser(value.id)
},
/** 类型 */

View File

@ -14,7 +14,7 @@
</view>
<view class="cont_cell">
<view class="title">报销凭证编号</view>
<input type="text" v-model="listobj.code" placeholder="报销凭证编号">
<input type="text" v-model="listobj.code" disabled placeholder="报销凭证编号">
</view>
<view class="cont_cell">
@ -26,9 +26,9 @@
<input type="text" v-model="listobj.income_month" disabled placeholder="入账月份">
</view>
<view class="leava_type flex_a_c">
<view class="title">报销项目</view>
<input type="text" v-model="project" placeholder="请选择" disabled @click="leavaShow1">
<view class="cont_cell">
<view class="title">关联项目</view>
<input type="text" v-model="project" placeholder="请选择" disabled>
</view>
@ -37,14 +37,14 @@
<view class="leave_box">
<view class="" v-for="(item,i) in list" :key='i'>
<view class="leava_type flex_a_c">
<view class="cont_cell">
<view class="title">报销项目</view>
<input type="text" v-model="item.cate_title" placeholder="请选择" disabled >
<input type="text" v-model="item.cate_title" placeholder="请选择" disabled>
</view>
<view class="cont_cell">
<view class="title">报销金额</view>
<input type="number" v-model="item.amount" placeholder="报销金额">
</view>
<view class="cont_cell">
<view class="title">备注</view>
@ -56,21 +56,21 @@
</view>
<view class="leave_box" style="padding-top: 100rpx; background-color: #fff;">
<view class="leave_box" style="padding-top: 30rpx; background-color: #fff;" v-if="fileArray.length>0">
<!-- 附件 -->
<block v-for="(item, i) in fileArray" :key="i">
<block v-for="(item, i) in fileArray" :key="i" @click="downloadFile()">
<view class="file flex_a_c_j_sb">
<view class="l_file">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize }}</view>
<view class="upload_people">上传人{{ item.admin_name }}</view>
</view>
<!-- <u-icon @click="delImg(i)" name="close-circle" color="#333333" size="28"></u-icon> -->
</view>
</block>
</view>
<view class="flow_path">
@ -78,10 +78,147 @@
<view class="title">审批流程</view>
</view>
<view class="" style="border-bottom: 1px solid #f7f7f7;border-top: 1px solid #f7f7f7;padding-bottom: 20px;">
<view class="record" style="display: flex;">
<view class="circle"></view>
<view class="text">{{nodelist.create_user}}创建</view>
</view>
<view class="" v-for="(itemh,m) in nodelist.flows" :key='m'>
<view class="record" style="display: flex;">
<view class="circle"></view>
<view class="" v-if='itemh.flow_type==1||itemh.flow_type==2' style="display: flex;">
<view class="text">{{itemh.flow_type==1?'部门负责人':'上级部门负责人'}}</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length>0">
<view class="text" v-if="itemh.check_list[0].status == 1">通过</view>
<view class="text" v-else-if="itemh.check_list[0].status == 2">拒绝</view>
</view>
<view class="" v-else>
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==7||itemh.flow_type== 6' style="display: flex;">
<view class="text">{{itemh.flow_type==7?'部门分管领导':'上级部门分管领导'}}</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length>0">
<view class="text" v-if="itemh.check_list[0].status == 1">通过</view>
<view class="text" v-else-if="itemh.check_list[0].status == 2">拒绝</view>
</view>
<view class="" v-else>
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==0' style="display: flex;">
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length>0">
<view class="text" v-if="itemh.check_list[0].status == 1">通过</view>
<view class="text" v-else-if="itemh.check_list[0].status == 2">拒绝</view>
</view>
<view class="" v-else>
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==3' style="display: flex;">
<view class="text">指定人或签</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info.length>0">
<view class=""
v-if="itemh.user_id_info[0].status!=1&&itemh.user_id_info[0].status!=2">
<view class="text">待审核</view>
</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info" :key='o'>
<view class="text" v-if="itemk.status == 1">通过</view>
<view class="text" v-else-if="itemk.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==4' style="display: flex;">
<view class="text">指定人员(会签)</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info[0].status!=0&&itemh.user_id_info[0].status!=2">
<view class="text">通过</view>
</view>
<view class="" v-if="itemh.user_id_info.length>0">
<view class="text" v-for="(itemj, j) in itemh.user_id_info" :key='j'>
<view class="text" v-if="itemj.status == 0">待审核</view>
<view class="text" v-else-if="itemj.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==5' style="display: flex;">
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info.length>0">
<view class=""
v-if="itemh.user_id_info[0].status!=0&&itemh.user_id_info[0].status!=2">
<view class="text">通过</view>
</view>
<view class="text" v-for="(itemj, j) in itemh.user_id_info" :key='j'>
<view class="text" v-if="itemj.status == 0">待审核</view>
<view class="text" v-else-if="itemj.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="cont_cell">
<view class="title">审核状态</view>
{{listobj.check_status=='0'?'待审核':listobj.check_status=='1'?'审核中':listobj.check_status=='2'?'审核通过':listobj.check_status=='3'?'审核不通过':listobj.check_status=='4'?'审核不通过':'已打款'}}
{{listobj.check_status=='0'?'待审核':listobj.check_status=='1'?'审核中':listobj.check_status=='2'?'审核通过':listobj.check_status=='3'?'审核不通过':listobj.check_status=='4'?'撤销审核':'已打款'}}
</view>
<view class="cont_cell">
<view class="title">审核人</view>
@ -91,43 +228,52 @@
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
</view>
<block v-for="(item,i) in check_record" :key="i">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{item.check_time_str}} {{item.name}} {{item.status_str}}
了此申请操作意见{{item.content}}</text>
</view>
</block>
<view class="" v-if='listobj.check_status!=2'>
<view class="title" style="margin-bottom: 30rpx;">审核节点</view>
<radio-group class="select_group" @change="deliveryWayChangetwo1" >
<label class="radio_select" style="margin-right:15rpx;display: flex; margin-bottom: 30rpx;">
<view style="margin-right:5rpx;">
<radio value="1" />
<view style="padding-bottom: 20px;border-bottom: 1px solid #f7f7f7;" v-if="check_record.length>0">
<block v-for="(item,i) in check_record" :key="i">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{item.check_time_str}} {{item.name}} {{item.status_str}}了此申请
操作意见{{item.content}}</text>
</view>
审核结束
</label>
<label class="radio_select" style="margin-right:15rpx;display: flex;">
<view style="margin-right:5rpx;">
<radio value="2" />
</view>
<view @click="branchShow = true" style="display: flex;">
<view class="title"> 下一位审批人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
</label>
</radio-group>
</view>
<view class="cont_cell" style="padding-top: 20rpx;" v-if="listobj.check_status!= 4&&listobj.check_status!=2">
</block>
</view>
<view class=""
v-if='is_check_admin==1&&listobj.check_status==1&&flow_type==0'
style="border-bottom: 1px solid #f7f7f7;">
<view class="title" style="margin-bottom: 10rpx;margin-top: 30rpx;">审核节点</view>
<radio-group class="select_group" @change="deliveryWayChangetwo1"
style="font-size: 30rpx; padding: 10px;">
<label class="radio_select" style="margin-right:15rpx;display: flex; margin-bottom: 30rpx;">
<view style="margin-right:5rpx;">
<radio value="1" />
</view>
审核结束
</label>
<label class="radio_select" style="margin-right:15rpx;display: flex;">
<view style="margin-right:5rpx;">
<radio value="2" />
</view>
<view @click="branchShow = true" style="display: flex;">
<view class="title" style="width: 250rpx;"> 下一位审批人</view>
<input type="text" v-model="check_admin_name" style="margin-top: -5rpx;" placeholder="请选择"
disabled>
</view>
</label>
</radio-group>
</view>
<view class="cont_cell" style="padding-top: 20rpx;"
v-if="listobj.check_status!= 3&&listobj.check_status!=2&&is_check_admin==1">
<view class="title" style="width: 200rpx;">审核意见</view>
<textarea v-model="mscontent" placeholder="请输入审核意见" />
<textarea v-model="mscontent" placeholder="请输入审核意见"
style="padding-top: 20rpx;padding-left: 20rpx;border:1px solid#f1f1f1;padding :20rpx;20rpx;" />
</view>
</view>
<view class="bot_btn" v-if='listobj.check_status!=2'>
<view class="reset" @click="appflowcheck()">拒绝</view>
<view class="bot_btn" v-if='listobj.check_status!=2&&listobj.check_status!=3&&is_check_admin==1'>
<view class="reset" @click="appflowcheck()">{{flow_type==5?'回退':'拒绝'}}</view>
<view class="submit_btn" @click=" appflowcheck1()">通过</view>
</view>
<u-action-sheet :show="leavaTypeShow" keyName="name" :actions="columns" title="请选择"
@ -151,6 +297,8 @@
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
</u-picker>
<!-- 选择时间 -->
<u-datetime-picker :show="timeShow" mode="datetime" :maxDate="1786778555000" :minDate="timestamp"
@ -178,11 +326,15 @@
projectlist,
appexpenseview,
appflow_check,
flownodes
} from '@/api/oa.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
} from '@/api/file.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
export default {
components: {
lsjUpload
@ -223,7 +375,11 @@
fileArray: [],
dnum: 0,
check_record: [],
check:0,
check: 0,
nodelist: {},
flow_type: '',
check_step_sort: '',
is_check_admin: 0
}
},
onLoad(option) {
@ -239,7 +395,7 @@
},
//
this.timestamp = Date.parse(new Date());
this.getPersonInfo()
// this.getPersonInfo()
this.getlist()
this.getlist1()
this.getDocumentList()
@ -248,13 +404,27 @@
methods: {
//
async flownodes(val) {
let res = await flownodes({
id: val,
type: 2
})
this.nodelist = res.data
// console.log(res)
},
async detail(id) {
let res = await appexpenseview({
id: id
})
// console.log(res,'111')
this.flow_type = res.data.flows.flow_type
this.is_check_admin = res.data.is_check_admin
this.check_step_sort = res.data.detail.check_step_sort
this.listobj.code = res.data.detail.code
this.listobj.id = id
this.flownodes(id)
this.list = res.data.detail.list
this.listobj.expense_time = res.data.detail.expense_time
this.listobj.income_month = res.data.detail.income_month
@ -264,14 +434,20 @@
this.listobj.flow_id = res.data.flows.id
this.listobj.ptid = res.data.detail.ptid
this.check_record = res.data.check_record
this.personInfo.name = res.data.detail.create_user
this.personInfo.department_name = res.data.detail.department
this.listobj.check_status = res.data.detail.check_status
this.fileArray = res.data.detail.fileArray.map(function(obj) {
return {
name: obj.name,
filesize: obj.filesize
};
});
if (res.data && res.data.detail && res.data.detail.fileArray) {
this.fileArray = res.data.detail.fileArray.map(function(obj) {
return {
name: obj.name,
filepath: obj.filepath,
fileext: obj.fileext,
filesize: obj.filesize
};
});
}
// console.log(this.fileArray,'11111111111', res.data.detail)
},
@ -396,6 +572,35 @@
}
},
downloadFile(item) {
uni.downloadFile({
url: HTTP_REQUEST_URL + item.filepath,
success: function(res) {
if (res.statusCode === 200) {
const tempFilePath = res.tempFilePath;
if (item.fileext == 'png'||item.fileext == 'jpg') {
uni.previewImage({
urls: [tempFilePath]
});
} else {
uni.showModal({
title: '提示',
content: '暂时不支持查看,请登录后台查看',
success: function(res) {
if (res.confirm) {
// console.log('');
} else if (res.cancel) {
// console.log('');
}
}
});
}
}
}
});
},
//
async appflowcheck() {
let data = {
@ -406,10 +611,16 @@
check: 2,
check_admin_ids: this.listobj.check_admin_ids
}
let res = await appflow_check(data)
if (res.code == 0) {
uni.navigateBack({
delta: 1
})
}
Toast(res.msg)
},
async appflowcheck1() {
@ -422,12 +633,12 @@
content: this.mscontent,
check_admin_ids: this.listobj.check_admin_ids
}
let res = await appflow_check(data)
console.log(res)
if(res.code==0){
if (res.code == 0) {
uni.navigateBack({
delta:1
delta: 1
})
}
Toast(res.msg)
@ -436,7 +647,7 @@
uni.navigateTo({
url: '/pages/reimbursementapplication/bianji??type=' + this.listobj.id
})
},//
}, //
deliveryWayChangetwo1(e) {
console.log(e)
this.check = e.detail.value
@ -460,7 +671,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
}
@ -477,7 +688,7 @@
this.listobj.income_month = uni.$u.timeFormat(e.value, 'yyyy-mm')
this.timeShow1 = false
},
//
addleava() {
this.list.push({
@ -668,7 +879,11 @@
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
input {
width: 480rpx;
}
.title {
font-size: 31.58rpx;
}
@ -734,7 +949,7 @@
}
.text {
flex: 1;
margin-left: 7.02rpx;
}
}

View File

@ -26,8 +26,8 @@
<input type="text" v-model="listobj.income_month" disabled placeholder="入账月份">
</view>
<view class="leava_type flex_a_c">
<view class="title">报销项目</view>
<view class="cont_cell">
<view class="title">关联项目</view>
<input type="text" v-model="project" placeholder="请选择" disabled @click="leavaShow1">
</view>
@ -37,7 +37,7 @@
<view class="leave_box">
<view class="" v-for="(item,i) in list" :key='i'>
<view class="leava_type flex_a_c">
<view class="cont_cell">
<view class="title">报销项目</view>
<input type="text" v-model="item.cate_title" placeholder="请选择" disabled @click="leavaShow(item,i)">
</view>
@ -50,11 +50,11 @@
<input type="text" v-model="item.remarks" placeholder="备注">
</view>
</view>
<view class="" style="display: flex; justify-content: space-around;padding-top: 20rpx;">
<u-icon name="plus-circle" color="#333333" size="28" @click="addleava"></u-icon>
<u-icon name="minus-circle" color="#333333" size="28" @click="deleteleava(item,index)"></u-icon>
<u-icon name="minus-circle" color="#333333" size="28" @click="deleteleava"></u-icon>
</view>
</view>
@ -65,8 +65,8 @@
<view class="file flex_a_c_j_sb">
<view class="l_file">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize | formatBytes }}</view>
<view class="upload_people">上传人{{ item.admin_name }}</view>
<view class="file_size">{{ item.filesize }}</view>
</view>
<!-- <u-icon @click="delImg(i)" name="close-circle" color="#333333" size="28"></u-icon> -->
</view>
@ -97,10 +97,30 @@
<view class="title">选择审批流程</view>
<input type="text" v-model="flowPath" placeholder="请选择" disabled @click="flowPathShow = true">
</view>
<view class="cont_cell" @click="branchShow = true">
<view class="cont_cell" @click="branchShow = true" v-if="flowShow">
<view class="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
<view v-else>
<block v-for="(item,i) in sprecord" :key="i">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{i+1}} {{item.flow_type_txt}}
</text>
</view>
<view class="" v-if="item.user_id_info.length>0&&item.user_id_info" style='padding-left: 20rpx;padding-right: 20rpx;margin-bottom: 20rpx;'>
<view class="" v-for="(items,k) in item.user_id_info" style="display: flex;margin-right: 20rpx;">
<view class=""
style="width: 30rpx;height: 30rpx;border-radius: 50%; margin-left: 20rpx;margin-right: 10rpx;">
<image :src="`${httpRequestUrl}`+items.thumb" mode=""
style="width: 30rpx;height: 30rpx;border-radius: 50%;margin-top: 5rpx;"></image>
</view>
<view class=""> {{items.name}}</view>
</view>
</view>
</block>
</view>
<view class="cont_cell" @click="branchShow1 = true">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
@ -125,14 +145,14 @@
</u-action-sheet>
<!-- 部门选择 -->
<u-picker :show="branchShow" :defaultIndex='defaultIndex' ref="branchRef" :columns="branchColumns" @cancel='branchShowclose'
@confirm="branchConfirm" @change="columnCode" :closeOnClickOverlay="true" @close="branchShowclose"
keyName="name">
<u-picker :show="branchShow" :defaultIndex='defaultIndex' ref="branchRef" :columns="branchColumns"
@cancel='branchShowclose' @confirm="branchConfirm" @change="columnCode" :closeOnClickOverlay="true"
@close="branchShowclose" keyName="name">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1" @cancel='branchShowclose1'
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@cancel='branchShowclose1' @confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true"
@close="branchShowclose1" keyName="name">
</u-picker>
<!-- 选择时间 -->
@ -159,8 +179,12 @@
getemployee,
appexpense,
projectlist,
appexpenseview
appexpenseview,
flowusers
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
@ -201,7 +225,8 @@
fileOption: {},
files: new Map(),
fileArray: [],
dnum: 0
dnum: 0,
flowShow: true
}
},
onLoad(option) {
@ -223,10 +248,14 @@
this.getDocumentList()
this.getDocumentList1()
},
computed: {
httpRequestUrl() {
return HTTP_REQUEST_URL;
}
},
methods: {
reset() {
this.list = [{
name: "",
@ -323,7 +352,19 @@
}
},
//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 columnCode1(e) {
if (e.columnIndex == 1) {
@ -367,7 +408,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
}
@ -390,7 +431,7 @@
this.fileArray.map((item, i) => {
fileIds.push(item.id)
});
this.listobj.amount = this.list.map(item => item.amount);
this.listobj.cate_id = this.list.map(item => item.id);
this.listobj.remarks = this.list.map(item => item.remarks);
@ -402,9 +443,9 @@
const res = await appexpense(this.listobj)
if(res.code==0){
if (res.code == 0) {
uni.navigateBack({
delta:1
delta: 1
})
}
Toast('提交成功')
@ -420,7 +461,7 @@
num: ''
})
},
deleteleava(item, index) {
deleteleava() {
if (this.list.length > 1) {
this.list.splice(0, 1)
} else {
@ -464,12 +505,13 @@
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
this.flowuser(value.id)
},
/** 类型 */
leavaType(e) {
this.list[this.dnum].cate_title= e.name
this.list[this.dnum].cate_title = e.name
this.list[this.dnum].id = e.id
this.leavaTypeShow = false
},
@ -559,6 +601,47 @@
padding-bottom: 28.07rpx;
}
.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;
}
}
}
.bot_btn {
position: fixed;
bottom: 0;
@ -601,10 +684,13 @@
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
input{
width: 480rpx;
}
font-size: 31.58rpx;
}
//

View File

@ -137,7 +137,7 @@
limit: this.loadConfig.limit,
keyword: this.keyword
})
console.log(res.msg.data)
//console.log(res.msg.data)
this.loadConfig.status = "loadmore"
if (res.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
@ -156,7 +156,7 @@ console.log(res.msg.data)
},
//
clickItem(data) {
// console.log(e)
// //console.log(e)
uni.showModal({
content: '确定要删除吗',
success: (e) => {

View File

@ -79,8 +79,11 @@
import {
Toast
} from '@/libs/uniApi.js'
import liuswipeaction from '@/uni_modules/liu-swipe-action/components/liu-swipe-action/liu-swipe-action.vue'
export default {
components: {
'liu-swipe-action': liuswipeaction
},
data() {
return {
show: false,
@ -164,7 +167,7 @@
},
//
clickItem(data) {
// console.log(e)
// //console.log(e)
if (data.id == 2) {
uni.showModal({
content: '确定要删除吗',

View File

@ -31,15 +31,17 @@
</view>
</view>
<view class="content-middle-three" v-if="list2.length>0">
<view class="middle-three-title">企业员工</view>
<view class="middle-three" v-for="(item,k) in list2" :key='k'>
<view class="middle-threea">企业员工</view>
<liu-swipe-action :index="k" @clickItem="clickItem(item)" :btnList='btnList'>
<view class="middle-threeb">
<view class="middle-threeb-a">
<view class="threeb-a-a">
<image src="@/static/images/gw.png" mode=""></image>
</view>
<view class="threeb-a-b">
<view class="name">{{item.department}} <text>({{item.name}})</text></view>
@ -114,8 +116,11 @@
Toast
} from '@/libs/uniApi.js'
import liuswipeaction from '@/uni_modules/liu-swipe-action/components/liu-swipe-action/liu-swipe-action.vue'
export default {
components: {
'liu-swipe-action': liuswipeaction
},
data() {
return {
@ -198,7 +203,7 @@
},
methods: {
arryitem(item) {
console.log(item.id)
//console.log(item.id)
switch (item.id) {
case 1:
@ -245,7 +250,7 @@
status: this.status,
keyword: this.keyword,
})
console.log(res.data.data)
// //console.log(res.data.data)
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
@ -451,18 +456,22 @@
background-color: #FFFFFF;
padding: 28rpx 28rpx;
.middle-three-title {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #3274F9;
margin-bottom: 30rpx;
}
.middle-three {
.middle-threea {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #3274F9;
margin-bottom: 30rpx;
}
.middle-threeb {
display: flex;
justify-content: space-between;
// margin-bottom: 20rpx;
padding: 20rpx 20rpx;
.middle-threeb-a {
@ -509,7 +518,7 @@
.middle-threeb-b {
width: 80rpx;
height: 80rpx;
margin-top: 45rpx;
margin-top: 25rpx;
image {
@ -535,7 +544,7 @@
left: 50%;
margin-left: -252.5rpx;
position: absolute;
bottom: 150rpx;
bottom: 50rpx;
z-index: 9999 !important;
position: fixed;

View File

@ -57,7 +57,11 @@
import {
Toast
} from '@/libs/uniApi.js'
import liuswipeaction from '@/uni_modules/liu-swipe-action/components/liu-swipe-action/liu-swipe-action.vue'
export default {
components: {
'liu-swipe-action': liuswipeaction
},
data() {
return {
@ -139,7 +143,7 @@
},
//
clickItem(data) {
// console.log(e)
// //console.log(e)
uni.showModal({
content: '确定要删除吗',
success: (e) => {
@ -157,7 +161,7 @@
const res = await deletedepartment({
id: id
})
console.log(res, res.msg)
//console.log(res, res.msg)
if (res.code == 0) {
this.getDocumentList()
}
@ -217,7 +221,7 @@
.middle-oneb {
display: flex;
justify-content: space-between;
margin-bottom: 25rpx;
padding: 20rpx 20rpx;
.middle-oneb-a {
display: flex;
@ -264,7 +268,7 @@
width: 80rpx;
height: 80rpx;
margin-top: 25rpx;
image {
width: 100%;

View File

@ -119,7 +119,7 @@
// },
{
name: '公示文档',
name: '公',
icon: require('@/static/images/w2.png'),
paths: '/pages/users/user_document/index'
@ -128,11 +128,11 @@
// name: '',
// icon: require('@/static/images/w3.png')
// },
{
name: '文章',
icon: require('@/static/images/w4.png'),
paths: '/pages/users/article/index'
},
// {
// name: '',
// icon: require('@/static/images/w4.png'),
// paths: '/pages/users/article/index'
// },
{
name: '修改密码',
icon: require('@/static/images/w4.png'),
@ -205,7 +205,7 @@
leftClick(e) {
uni.sendHostEvent('closeApp', e, (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
//console.log('' + JSON.stringify(ret));
});
},
login() {
@ -245,7 +245,7 @@
},
fail(e) {
uni.hideLoading()
console.log(e);
//console.log(e);
},
})
} else Toast('暂未开放')
@ -269,7 +269,7 @@
.head_box {
position: relative;
width: 100vw;
height: 534rpx;
height: 400rpx;
margin-bottom: 30rpx;
background: #3274F9;
}

View File

@ -3,7 +3,7 @@
<view class="all_box">
<!-- 头像 -->
<view class="header_box">
<u--image v-if="changeAvatar!==''" :showLoading="true" :src="changeAvatar" width="182rpx" height="182rpx"
<u--image v-if="changeAvatar!=''" :showLoading="true" :src="changeAvatar" width="182rpx" height="182rpx"
shape="circle">
</u--image>
<u--image v-else :showLoading="true" :src="personInfo.img" width="182rpx" height="182rpx" shape="circle">
@ -64,8 +64,12 @@
async getPersonInfo() {
const res = await getPersonInfoApi()
this.personInfo = res.data
this.personInfo.img = res.thumb
console.log('个人信息', this.personInfo.thumb);
if (res.data.thumb.length > 0) {
this.personInfo.img = HTTP_REQUEST_URL + res.data.thumb
}
},
//
async savePersonInfo() {
@ -76,7 +80,7 @@
if (str2 == 'http://ceshi-oa.lihaink.cn') {
this.personInfo.thumb = str1.substring(26)
}
console.log('提交', this.personInfo.thumb);
//console.log('', this.personInfo.thumb);
try {
//
const reg_phone = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
@ -85,7 +89,7 @@
}
//
const reg_name = /^[\u4e00-\u9fa5]{2,4}$/;
if(!reg_name.test(this.personInfo.name)){
if (!reg_name.test(this.personInfo.name)) {
throw Error()
}
const res = await PostUserPerSubmitAPI(this.personInfo)
@ -103,18 +107,18 @@
sourceType: ['album', 'camera'],
success: function(res) {
oaUploads(res.tempFilePaths[0], 'img').then(res => {
that.personInfo.thumb = res.filepath
that.changeAvatar = HTTP_REQUEST_URL + res.filepath
Toast('上传成功')
}).catch(err => {
console.log('err', err);
//console.log('err', err);
Toast('上传失败')
})
},
fail: function(err) {
console.log('choose失败');
//console.log('choose');
Toast('添加失败')
}
});

View File

@ -233,6 +233,7 @@
let res = await approvelist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
status:1
// keyword: this.keyword
})
@ -244,7 +245,7 @@
}
this.list2 = [...this.list2, ...res.data?.data]
console.log(this.list2)
//console.log(this.list2)
},
async getlist1() {
@ -253,6 +254,7 @@
let res = await apexpenselist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
status:1
// keyword: this.keyword
})
@ -272,6 +274,7 @@
let res = await invoicelist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
status:1
// keyword: this.keyword
})
@ -291,7 +294,7 @@
},
//
clickItem(data) {
// console.log(e)
// //console.log(e)
if (data.id == 2) {
uni.showModal({

View File

@ -130,7 +130,7 @@
},
//
async getDocumentList() {
console.log(this.loadConfig.status )
//console.log(this.loadConfig.status )
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await schedulelist({
@ -157,7 +157,7 @@
},
//
clickItem(data) {
// console.log(e)
// //console.log(e)
uni.showModal({
content: '确定要删除吗',
success: (e) => {

View File

@ -91,7 +91,7 @@ const actions = {
// #endif
}
loginMobile(data).then(res => {
console.log('手机号登录', res);
//console.log('手机号登录', res);
})
},
async getWxLogin({ state, commit }, force) {

View File

@ -35,7 +35,7 @@ const actions = {
async initConfig({ state, commit }, data = false) {
let res = await getConfig();
commit('SET_CONFIG', res.data);
// console.log(compareVersions(res.data.version, '1.0.0')==1&&compareVersions(res.data.version, Cache.get('wgt_version'))==1);
// //console.log(compareVersions(res.data.version, '1.0.0')==1&&compareVersions(res.data.version, Cache.get('wgt_version'))==1);
if(uni.getStorageSync('uniMP')||!state.updateFlag) return ;//是小程序环境时不进行更新
let os = uni.getSystemInfoSync();
// uni.showModal({
@ -61,7 +61,7 @@ const actions = {
}
Updater.update(version);;
}catch(e){
console.log(e);
//console.log(e);
}
if(data) uni.hideLoading();
}else if(data){