This commit is contained in:
jia 2023-11-05 00:11:08 +08:00
parent f08ac296c5
commit 86d52c81ac
684 changed files with 190453 additions and 0 deletions

54
node_modules/crypto-js/mode-ofb.js generated vendored Normal file
View File

@ -0,0 +1,54 @@
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"), require("./cipher-core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core", "./cipher-core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
/**
* Output Feedback block mode.
*/
CryptoJS.mode.OFB = (function () {
var OFB = CryptoJS.lib.BlockCipherMode.extend();
var Encryptor = OFB.Encryptor = OFB.extend({
processBlock: function (words, offset) {
// Shortcuts
var cipher = this._cipher
var blockSize = cipher.blockSize;
var iv = this._iv;
var keystream = this._keystream;
// Generate keystream
if (iv) {
keystream = this._keystream = iv.slice(0);
// Remove IV for subsequent blocks
this._iv = undefined;
}
cipher.encryptBlock(keystream, 0);
// Encrypt
for (var i = 0; i < blockSize; i++) {
words[offset + i] ^= keystream[i];
}
}
});
OFB.Decryptor = Encryptor;
return OFB;
}());
return CryptoJS.mode.OFB;
}));

42
node_modules/crypto-js/package.json generated vendored Normal file
View File

@ -0,0 +1,42 @@
{
"name": "crypto-js",
"version": "4.1.1",
"description": "JavaScript library of crypto standards.",
"license": "MIT",
"author": {
"name": "Evan Vosberg",
"url": "http://github.com/evanvosberg"
},
"homepage": "http://github.com/brix/crypto-js",
"repository": {
"type": "git",
"url": "http://github.com/brix/crypto-js.git"
},
"keywords": [
"security",
"crypto",
"Hash",
"MD5",
"SHA1",
"SHA-1",
"SHA256",
"SHA-256",
"RC4",
"Rabbit",
"AES",
"DES",
"PBKDF2",
"HMAC",
"OFB",
"CFB",
"CTR",
"CBC",
"Base64",
"Base64url"
],
"main": "index.js",
"dependencies": {},
"browser": {
"crypto": false
}
}

49
node_modules/crypto-js/pad-ansix923.js generated vendored Normal file
View File

@ -0,0 +1,49 @@
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"), require("./cipher-core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core", "./cipher-core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
/**
* ANSI X.923 padding strategy.
*/
CryptoJS.pad.AnsiX923 = {
pad: function (data, blockSize) {
// Shortcuts
var dataSigBytes = data.sigBytes;
var blockSizeBytes = blockSize * 4;
// Count padding bytes
var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;
// Compute last byte position
var lastBytePos = dataSigBytes + nPaddingBytes - 1;
// Pad
data.clamp();
data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);
data.sigBytes += nPaddingBytes;
},
unpad: function (data) {
// Get number of padding bytes from last byte
var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
// Remove padding
data.sigBytes -= nPaddingBytes;
}
};
return CryptoJS.pad.Ansix923;
}));

44
node_modules/crypto-js/pad-iso10126.js generated vendored Normal file
View File

@ -0,0 +1,44 @@
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"), require("./cipher-core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core", "./cipher-core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
/**
* ISO 10126 padding strategy.
*/
CryptoJS.pad.Iso10126 = {
pad: function (data, blockSize) {
// Shortcut
var blockSizeBytes = blockSize * 4;
// Count padding bytes
var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
// Pad
data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).
concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));
},
unpad: function (data) {
// Get number of padding bytes from last byte
var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
// Remove padding
data.sigBytes -= nPaddingBytes;
}
};
return CryptoJS.pad.Iso10126;
}));

40
node_modules/crypto-js/pad-iso97971.js generated vendored Normal file
View File

@ -0,0 +1,40 @@
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"), require("./cipher-core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core", "./cipher-core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
/**
* ISO/IEC 9797-1 Padding Method 2.
*/
CryptoJS.pad.Iso97971 = {
pad: function (data, blockSize) {
// Add 0x80 byte
data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));
// Zero pad the rest
CryptoJS.pad.ZeroPadding.pad(data, blockSize);
},
unpad: function (data) {
// Remove zero padding
CryptoJS.pad.ZeroPadding.unpad(data);
// Remove one more byte -- the 0x80 byte
data.sigBytes--;
}
};
return CryptoJS.pad.Iso97971;
}));

30
node_modules/crypto-js/pad-nopadding.js generated vendored Normal file
View File

@ -0,0 +1,30 @@
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"), require("./cipher-core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core", "./cipher-core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
/**
* A noop padding strategy.
*/
CryptoJS.pad.NoPadding = {
pad: function () {
},
unpad: function () {
}
};
return CryptoJS.pad.NoPadding;
}));

436
pages/employees/index.vue Normal file
View File

@ -0,0 +1,436 @@
<template>
<view>
<view class="content-middle">
<view class="content-middle-title">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='搜索关键字' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="search" @click="search">
搜索
</view>
</view>
<view class="content-middle-one">
<view class="middle-one" v-for="(item,j) in list" :key='j'>
<view class="middle-onea">
<view class="middle-onea-title">
<view class="middle-onea-img">
<image :src="`${httpRequestUrl}`+item.thumb" mode=""></image>
</view>
<view class="middle-onea-txt">{{item.name}}</view>
</view>
<view class="middle-onea-time">
{{item.entry_time}}
</view>
</view>
<view class="middle-oneb">
<view class="middle-oneb-a">
<view class="threeb-a-b">
<view class="achor">性别<text>{{item.sex==1?'男':'女'}}</text></view>
<view class="achor">联系方式<text>{{item.mobile}}</text></view>
<view class="achor">邮箱<text>{{item.email}}</text></view>
<view class="achor">职位<text>{{item.position}}</text></view>
<view class="achor">所在部门<text>{{item.department}}</text></view>
<view class="achor">员工类型<text>{{item.status==1?'正式':item.status==2?'试用':'实习'}}</text>
</view>
<view class="achor">账号状态<text>{{item.type==0?'禁止登录':item.type==2?'正常':'离线'}}</text>
</view>
<view class="achor">职位{{item.position}}</view>
<view class="achor">员工简介</view>
<view class="textare-three">
<textarea :value="item.desc" placeholder="" />
</view>
<view class="middle-edit" @click="editpart(item)">
编辑
</view>
<!-- <view class="middle-delete" @click="clickItem(item)">
删除
</view> -->
</view>
</view>
</view>
</view>
</view>
</view>
<view class="content-bootom" @click="adddepart">
<view class="content-bootom-one">
<image src="@/static/images/ja.png" mode=""></image>
</view>
<view class="content-bootom-two">添加企业员工</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
comanyerlist,
leavedelete
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
show: false,
btnList: [{
id: '2',
name: '删除',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
keyword: '',
list: [],
};
},
computed: {
httpRequestUrl() {
return HTTP_REQUEST_URL;
}
},
onLoad() {
},
onShow() {
this.getDocumentList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
//
async getDocumentList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await comanyerlist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
keyword: this.keyword
})
console.log(res.data.data)
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data?.data]
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addemployees/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(data.id)
}
}
})
},
//
async deleteDepartment(id) {
const res = await leavedelete({
id: id
})
if (res.code == 0) {
this.getDocumentList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/addemployees/index?type=' + 1 + "&data=" + item.id
})
},
//
search() {
this.getDocumentList()
},
//
setValue(e) {
this.keyword = e.detail.value
if (this.keyword.length == 0) {
this.getDocumentList()
}
}
}
};
</script>
<style lang="scss" scoped>
page {
position: relative;
}
.content-middle {
.content-middle-title {
width: 100%;
background-color: #FFFFFF;
padding-top: 20rpx;
display: flex;
.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-title {
height: 98rpx;
line-height: 98rpx;
background: #FFFFFF;
font-size: 35rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
padding-left: 28rpx;
}
.content-middle-one {
.middle-one {
background-color: #FFFFFF;
padding: 28rpx 28rpx;
margin: 28rpx 28rpx;
.middle-onea {
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #CCCCCC;
padding-bottom: 20rpx;
.middle-onea-title {
display: flex;
}
.middle-onea-img {
width: 50rpx;
height: 50rpx;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
}
}
}
.middle-oneb {
display: flex;
justify-content: space-between;
margin-top: 10rpx;
.middle-oneb-a {
.threeb-a-b {
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.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;
}
}
}
.middle-oneb-b {
width: 80rpx;
height: 80rpx;
margin-top: 45rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
.content-bootom {
width: 485rpx;
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #3274F9;
border-radius: 60px 60px 60px 60px;
display: flex;
left: 50%;
margin-left: -252.5rpx;
position: absolute;
bottom: 150rpx;
z-index: 9999 !important;
position: fixed;
.content-bootom-one {
margin-left: 92rpx;
margin-top: 5rpx;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
.content-bootom-two {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
}
</style>

402
pages/examine/index.vue Normal file
View File

@ -0,0 +1,402 @@
<template>
<view class="content">
<view class="content-banner">
<view class="" v-for="(item,i ) in list" :key="i" @click="apparent(i)">
<view class="banner-name" :style="{'color':i==num?'#3274F9':''}">{{item.name}}</view>
<view class="banner-xian" v-if='i==num'></view>
</view>
</view>
<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'>
<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.status==1?'#34A853':item.status==2?'#F9AA32':item.status==3?'#F02828':''}">
<text v-if='item.status==1'>已通过</text>
<text v-if='item.status==2'>待审批</text>
<text v-if='item.status==3'>审批拒绝</text>
</view>
</view>
<view class="middle-one-time">类型{{item.flow_type}}</view>
<view class="middle-one-time">开始时间{{item.start_time}}</view>
<view class="middle-one-time">结束时间{{item.end_time}}</view>
</liu-swipe-action>
<!-- <view class="middle-edit" @click="editpart(item)">
编辑
</view> -->
<!--<view class="middle-delete" @click="clickItem(item)">
删除
</view> -->
</view>
</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list2.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
Toast
} from '@/libs/uniApi.js'
import {
approveindex,
approvelist,
approvecopy,
} from '@/api/oa.js'
export default {
data() {
return {
title: 'Hello',
statusBarHeight: 0,
list: [{
name: '我发起的',
value: 8
}, {
name: '我处理的',
value: 8
},
{
name: '抄送给我的',
value: 8
}
],
list2: [],
num: 0,
btnList: [{
id: '1',
name: '编辑',
width: '100rpx',
height: '100rpx',
bgColor: '#5f92f7',
color: '#FFFFFF',
fontSize: '28rpx'
}, {
id: '2',
name: '删除',
height: '100rpx',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
}
},
onLoad() {
},
onShow() {
if (this.num == 0) {
this.initList()
} else if (this.num == 1) {
this.initList1()
} else {
this.initList2()
}
},
onReachBottom() {
if (this.num == 0) {
this.getlist()
} else if (this.num == 1) {
this.getlist1()
} else {
this.getlist2()
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
apparent(index) {
this.num = index
if (index == 0) {
this.initList()
} else if (index == 1) {
this.initList1()
} else {
this.initList2()
}
},
async initList() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list2 = [];
await this.getlist()
},
async initList1() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list2 = [];
await this.getlist1()
},
async initList2() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list3 = [];
await this.getlist2()
},
async getlist() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await approveindex({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
// keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list2 = [...this.list2, ...res.data?.data]
},
async getlist1() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await approvelist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
// keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list2 = [...this.list2, ...res.data?.data]
},
async getlist2() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await approvecopy({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
// keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list2 = [...this.list2, ...res.data?.data]
},
//
clickItem(data) {
console.log(data)
if (data.id == 2) {
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(data.id)
}
}
})
} else {
this.editpart(this.list2[data.index])
}
},
//
async deleteDepartment(id) {
const res = await deleteproject_task({
id: id
})
if (res.code == 0) {
this.loadConfig.status = "loading"
this.initList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/leave_request/bianji??type=' + item.type
})
},
tian(item) {
console.log(item)
if (this.num == 1) {
uni.navigateTo({
url: '/pages/leave_request/index?type=' + item.id
})
}else{
uni.navigateTo({
url: '/pages/leave_request/detail?type=' + item.id
})
}
}
}
}
</script>
<style lang='scss'>
.content-banner {
display: flex;
justify-content: space-between;
padding: 20rpx 40rpx;
.banner-name {
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
.banner-xian {
width: 70rpx;
height: 5rpx;
margin: 10rpx auto;
background-color: #3274F9;
}
}
.content-middle {
.content-middle-one {
.middle-one {
width: 694rpx;
margin: 0 auto;
margin-bottom: 21rpx;
background: #FFFFFF;
padding: 0 25rpx;
padding-bottom: 25rpx;
.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;
}
.middle-one-title {
border-bottom: 1px solid #CCCCCC;
margin-bottom: 10rpx;
display: flex;
line-height: 82rpx;
justify-content: space-between;
.one-titlea {
display: flex;
.name {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.parment {
font-size: 25rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #3274F9;
margin-top: 5rpx;
margin-left: 10rpx;
}
}
.one-titleb {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
}
}
.middle-one-detail {
height: 90rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.middle-one-time {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
}
}
}
</style>

525
pages/finance/index.vue Normal file
View File

@ -0,0 +1,525 @@
<template>
<view class="content">
<view class="content-middle" :style="{'opacity':!screenShow?'0.4':''}">
<view class="content-middle-three" v-if="list.length>0">
<view class="middle-three">
<view class="middle-threeb" v-for="(items,j) in list" :key='j' @click="deleteDepartment(items.id)">
<liu-swipe-action :index="j" @clickItem="clickItem" :btnList='btnList'>
<view class="middle-threeb-title">
<view class="title">
{{items.user}}
</view>
<view class="title-status">
{{items.create_time}}
</view>
</view>
<view class="middle-threeba">
<view class="middle-threeb-a">
<view class="threeb-a-b">
<view class="name">开票人<text>{{items.open_name}}</text></view>
<view class="name">开票银行<text>{{items.invoice_account}}</text></view>
<view class="name">开票金额()<text>{{items.amount}}</text></view>
<!-- <view class="achor">{{items.name2}}</view> -->
<!-- <view class="middle-edit" @click="editpart(items)">
编辑
</view>
<view class="middle-delete" @click="clickItem(items)">
删除
</view> -->
</view>
</view>
<!-- <view class="middle-threeb-b">
{{items.name}}
</view> -->
</view>
</liu-swipe-action>
</view>
</view>
</view>
</view>
<view class="content-middle" :style="{'position':'absolute','top':0+'px','zIndex':999}" v-if="!screenShow">
<view class="content-middle-one">
<view class="middle-one">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='搜索任务状态、优先级、部门等' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="content-middle-sai" @click="screen" style="background-color: #3274F9;">
<view class="content-middle-saia">
<image src="../../static/images/saixuan.png" mode="aspectFit"></image>
</view>
<view class="content-middle-saib" style="color: #fff;">
筛选
</view>
</view>
</view>
<view class="content-middle-search-detail">
<view class="search-detail" v-for="(item,k) in klist" :key='k'>
<view class="search-detail-one">
<view class="name">
{{item.name}}
</view>
</view>
<view class="search-detail-two">
{{item.name1}}
</view>
</view>
</view>
</view>
</view>
<view class="content-middle-two">
<view class="middle-two-img">
<image src="@/static/images/ja2.png" mode="aspectFit"></image>
</view>
<view class="" @click="adddepart">新建发票到账信息</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
incomeflow,
deleteincomeflow
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
show: false,
btnList: [{
id: '1',
name: '编辑',
width: '100rpx',
height: '100rpx',
bgColor: '#5f92f7',
color: '#FFFFFF',
fontSize: '28rpx'
}, {
id: '2',
name: '删除',
height: '100rpx',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
keyword: '',
list: [],
klist: [],
screenShow: true
};
},
computed: {
httpRequestUrl() {
return HTTP_REQUEST_URL;
}
},
onLoad() {
},
onShow() {
this.initList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
async initList() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
await this.getDocumentList();
},
//
async getDocumentList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await incomeflow({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data?.data]
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addfinance/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
if (data.id == 2) {
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(this.list[data.index].id)
}
}
})
} else {
this.editpart(this.list[data.index])
}
},
//
async deleteDepartment(id) {
const res = await deleteincomeflow({
id: id
})
if (res.code == 0) {
this.initList()
}
Toast(res.msg);
},
taskDetail(item) {
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/addfinance/index??type=' + 2 + "&data=" + encodeURIComponent(JSON.stringify(
item))
})
},
//
search() {
this.initList()
},
//
setValue(e) {
this.keyword = e.detail.value
if (this.keyword.length == 0) {
this.initList()
}
}
}
};
</script>
<style lang="scss">
page {
padding-bottom: 88rpx;
}
.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;
background-color: #FFFFFF;
padding: 28rpx 28rpx;
.middle-three {
.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 {
height: 98rpx;
line-height: 98rpx;
border-bottom: 1px solid #CCCCCC;
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
.title {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.title-status {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
}
}
.middle-threeba {
display: flex;
justify-content: space-between;
.middle-threeb-a {
.threeb-a-b {
view {
margin-bottom: 20rpx;
}
.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: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
text {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #CCCCCC;
}
}
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
}
}
.middle-threeb-b {
height: 80rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
}
.content-middle-two {
width: 386rpx;
height: 70rpx;
line-height: 70rpx;
background: #3274F9;
border-radius: 60rpx 60rpx;
z-index: 99999;
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
display: flex;
margin: 0 auto;
margin-top: 25rpx;
.middle-two-img {
width: 23rpx;
height: 23rpx;
margin-left: 52rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
}
</style>

View File

@ -0,0 +1,525 @@
<template>
<view class="content">
<view class="content-middle" :style="{'opacity':!screenShow?'0.4':''}">
<view class="content-middle-three" v-if="list.length>0">
<view class="middle-three">
<view class="middle-threeb" v-for="(items,j) in list" :key='j' @click="deleteDepartment(items.id)">
<liu-swipe-action :index="j" @clickItem="clickItem" :btnList='btnList'>
<view class="middle-threeb-title">
<view class="title">
{{items.name}}
</view>
<view class="title-status">
{{items.create_time}}
</view>
</view>
<view class="middle-threeba">
<view class="middle-threeb-a">
<view class="threeb-a-b">
<view class="name">开票人<text>{{items.open_name}}</text></view>
<view class="name">所属部门<text>{{items.department_name}}</text></view>
<view class="name">开票金额()<text>{{items.amount}}</text></view>
<!-- <view class="achor">{{items.name2}}</view> -->
<view class="middle-edit" @click="editpart(items)">
编辑
</view>
<view class="middle-delete" @click="clickItem(items)">
删除
</view>
</view>
</view>
<!-- <view class="middle-threeb-b">
{{items.name}}
</view> -->
</view>
</liu-swipe-action>
</view>
</view>
</view>
</view>
<view class="content-middle" :style="{'position':'absolute','top':0+'px','zIndex':999}" v-if="!screenShow">
<view class="content-middle-one">
<view class="middle-one">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='搜索任务状态、优先级、部门等' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="content-middle-sai" @click="screen" style="background-color: #3274F9;">
<view class="content-middle-saia">
<image src="../../static/images/saixuan.png" mode="aspectFit"></image>
</view>
<view class="content-middle-saib" style="color: #fff;">
筛选
</view>
</view>
</view>
<view class="content-middle-search-detail">
<view class="search-detail" v-for="(item,k) in klist" :key='k'>
<view class="search-detail-one">
<view class="name">
{{item.name}}
</view>
</view>
<view class="search-detail-two">
{{item.name1}}
</view>
</view>
</view>
</view>
</view>
<view class="content-middle-two">
<view class="middle-two-img">
<image src="@/static/images/ja2.png" mode="aspectFit"></image>
</view>
<view class="" @click="adddepart">新建任务</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
invoicecheckedlist,
tovoid
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
show: false,
btnList: [{
id: '1',
name: '编辑',
width: '100rpx',
height: '100rpx',
bgColor: '#5f92f7',
color: '#FFFFFF',
fontSize: '28rpx'
}, {
id: '2',
name: '作废',
height: '100rpx',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
keyword: '',
list: [],
klist: [],
screenShow: true
};
},
computed: {
httpRequestUrl() {
return HTTP_REQUEST_URL;
}
},
onLoad() {
},
onShow() {
this.initList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
async initList() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
await this.getDocumentList();
},
//
async getDocumentList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await invoicecheckedlist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data?.data]
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addquest/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
if (data.id == 2) {
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(this.list[data.index].id)
}
}
})
} else {
this.editpart(this.list[data.index])
}
},
//
async deleteDepartment(id) {
const res = await tovoid({
id: id
})
if (res.code == 0) {
this.initList()
}
Toast(res.msg);
},
taskDetail(item) {
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/addfinanceincome/index??type=' + 2 + "&data=" + encodeURIComponent(JSON.stringify(
item))
})
},
//
search() {
this.initList()
},
//
setValue(e) {
this.keyword = e.detail.value
if (this.keyword.length == 0) {
this.initList()
}
}
}
};
</script>
<style lang="scss">
page {
padding-bottom: 88rpx;
}
.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;
background-color: #FFFFFF;
padding: 28rpx 28rpx;
.middle-three {
.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 {
height: 98rpx;
line-height: 98rpx;
border-bottom: 1px solid #CCCCCC;
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
.title {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.title-status {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
}
}
.middle-threeba {
display: flex;
justify-content: space-between;
.middle-threeb-a {
.threeb-a-b {
view {
margin-bottom: 20rpx;
}
.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: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
text {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #CCCCCC;
}
}
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
}
}
.middle-threeb-b {
height: 80rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
}
.content-middle-two {
width: 386rpx;
height: 70rpx;
line-height: 70rpx;
background: #3274F9;
border-radius: 60rpx 60rpx;
z-index: 99999;
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
display: flex;
margin: 0 auto;
margin-top: 25rpx;
.middle-two-img {
width: 23rpx;
height: 23rpx;
margin-left: 112rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
}
</style>

View File

@ -0,0 +1,130 @@
<template>
<view class="content">
<view class="content-top" :style="'height:'+statusBarHeight+'px'">
<retuntop :isshow='true' :name='name' :style="'padding-top:'+(statusBarHeight-35)+'px'" />
</view>
<view :style="'height:'+statusBarHeight+'px'">
</view>
<view class="content-middle">
<view class="item">
<text class="item-name">员工类型: </text>
<radio-group class="select_group" @change="deliveryWayChangeone">
<label class="radio_select" v-for="(val, i) in list" :key="val.value"
style="margin-right:25rpx;">
<view style="margin-right:5rpx;">
<radio :value="val.value" />
</view>
<view>{{ val.name }}</view>
</label>
</radio-group>
</view>
</view>
</view>
</view>
</template>
<script>
import retuntop from '@/components/return/index.vue'
import wPicker from "@/components/w-picker/w-picker.vue"
export default {
components: {
retuntop,
wPicker
},
data() {
return {
statusBarHeight: 0,
name: '通用审批',
merchantData: {
},
list: [{
name: '实习',
checked: false,
value: '1',
}, {
name: '试用',
value: '2',
checked: false,
},
{
name: '正式',
value: '3',
checked: false,
}
],
list1: [{
name: '禁止登录',
checked: false,
value: '1',
}, {
name: '正常',
checked: false,
value: '2',
},
{
name: '离职',
checked: false,
value: '3',
}
]
};
},
onLoad() {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 45;
},
methods: {
deliveryWayChangeone(e) {
console.log(e)
},
deliveryWayChangetwo(e) {
console.log(e)
}
}
};
</script>
<style lang="scss">
page {
padding-bottom: 88rpx;
}
.content-top {
width: 100%;
background: #3274F9;
position: fixed;
z-index: 100;
}
.content-middle {
/deep/ uni-checkbox .uni-checkbox-input {
background-color: #34A853 !important;
border-radius: 50%;
}
/deep/ uni-checkbox .uni-checkbox-input.uni-checkbox-input-checked {
background-color: #34A853 !important;
color: #fff !important;
}
}
</style>

791
pages/index/index.vue Normal file
View File

@ -0,0 +1,791 @@
<template>
<view class="content">
<!-- -->
<!-- #ifdef H5 -->
<view class="content-top" :style="'padding-top:30px'">
<!-- #endif -->
<!-- #ifdef APP-PLUS||MP -->
<view class="content-top" :style="'padding-top:'+statusBarHeight+'px'">
<!-- #endif -->
<retuntop class="close" :isshow="false"></retuntop>
<view class="my_msg-con">
<u--image :showLoading="true" :src="`${HTTP_IMG_URL}${oaUserInfo.thumb}`" width="130.28rpx"
height="130.28rpx" shape="circle" v-if="oaUserInfo.thumb">
</u--image>
<u--image :showLoading="true" v-else src="@/static/img/public/avatar.png" width="130.28rpx"
height="130.28rpx" shape="circle">
</u--image>
<view @click="login" class="name_work" v-if="!$store.state.app.token">
<view class="name">
<text class="nickname">立即登录</text>
</view>
<view class="work">
登录后可查看更多
</view>
</view>
<view class="name_work" style="margin-top: 10rpx;" v-else>
<view class="name">
<text class="nickname">姓名:{{ oaUserInfo.nickname }}</text>
</view>
<view class="work">
<view class="wr_item">
<view class="wr_t_left">(技术部):</view>
<view class="wr_t_right">技术专业</view>
</view>
</view>
</view>
</view>
<view class="top_class">
<view class="top_class-one" v-for="(item,i) in list" :key="i" @click="listbiao(item,i)">
<view class="title_value">
{{item.num}}
</view>
<view class="title">
{{item.name}}
</view>
</view>
</view>
</view>
<view class="content-banner">
<view class="content-banner-title">
待办事项
</view>
<view class="content-banner-detail" v-for="(item,k) in list2" :key='k'>
<view class="banner-detail">
<view class="banner-detail-title">
提醒
</view>
<view class="banner-detail-detail">
{{item.detail}}
</view>
</view>
<view class="iconfont icon-xiangyou" style="margin-top: 5rpx;">
</view>
</view>
</view>
<view class="content-sort">
<view class="content-sort-con" v-for="(item,l) in list3" :key="l" @click="appcenter(item,l)">
<view class="sort-img">
<image :src="item.img" mode="aspectFit"></image>
</view>
<view class="name">
{{item.name}}
</view>
</view>
</view>
<view class="content-banner1">
<view class="content-banner-title">
<view class="">
公告
</view>
<view>
更多
<text class="iconfont icon-xiangyou" style="margin-top: 5rpx;margin-right: 20rpx;"></text>
</view>
</view>
<view class="content-banner-detail" v-for="(item,k) in list5" :key='k'>
<view class="banner-detail">
<view class="banner-detail-title">
<view class="">
提醒
</view>
</view>
<view class="banner-detail-detail">
{{item.title}}
</view>
</view>
</view>
</view>
<view class="content-bootom">
<view class="content-bootom-top">
<view class="bootom-top-one">
我的任务
</view>
<view class="bootom-top-two">
<text>更多</text>
<text class="iconfont icon-xiangyou" style="font-size: 25rpx;"></text>
</view>
</view>
<view class="content-bootom-detail">
<view class="bootom-detail" v-for="(item,h) in list4" :key="h">
<view class="bootom-detail-one">
<view class="detail-one-a" v-if='item.priority==4'>
{{item.priority_name}}
</view>
<view class="detail-one-a" v-else style="background-color: #F5F5F5;color: #999999;">
{{item.priority_name}}
</view>
<view class="detail-one-b">
{{item.title}}
</view>
<view class="detail-one-c" v-if="item.flow_status==3">
{{item.flow_name}}
</view>
<view class="detail-one-c" v-else style="background-color: #E4EDFF;color: #3274F9;">
{{item.flow_name}}
</view>
</view>
<view class="bootom-detail-two">
<view class="detail-twoa ">
</view>
<view class="detail-twob">
任务性质{{item.cate_name}} <text style="margin-left: 20rpx;"> 计划完成时间{{item.end_time}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import retuntop from '@/components/return/index.vue'
import {
getdatatotal,
getDocumentListApi,
projecttasklist,
todosubjec,tasksubjec
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
export default {
components: {
retuntop
},
data() {
return {
title: 'Hello',
statusBarHeight: 0,
list: [],
list2: [{
detail: '提醒张三下达的紧急任务待完成'
},
{
detail: '提醒张三下达的紧急任务待完成'
},
],
list3: [{
name: '请假申请',
img: require('@/static/images/s2.png')
}, {
name: '出差申请',
img: require('@/static/images/s4.png')
}, {
name: '请假申请',
img: require('@/static/images/s3.png')
}, {
name: '采购申请',
img: require('@/static/images/s5.png')
}, {
name: '物品维修',
img: require('@/static/images/s8.png')
}, {
name: '用章申请',
img: require('@/static/images/s7.png')
}, {
name: '报销申请',
img: require('@/static/images/s6.png')
}, {
name: '更多',
img: require('@/static/images/s1.png')
}],
list4: [{
name: '紧急',
con: '紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急',
status: '紧急紧',
con1: '紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急',
con2: '紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急',
}, {
name: '紧急',
con: '紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急',
status: '紧急紧',
con1: '紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急',
con2: '紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急',
}, {
name: '紧急',
con: '紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急',
status: '紧急紧',
con1: '紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急',
con2: '紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急紧急',
}],
HTTP_IMG_URL: '',
list5: []
}
},
computed: {
oaUserInfo() {
return this.$store.state.app.userInfo
},
},
onLoad() {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
this.HTTP_IMG_URL = HTTP_REQUEST_URL
this.getList()
this.getDtnote()
this.getDocumentList2()
this.getDtlist()
this.getDtlist1()
},
methods: {
login() {
uni.reLaunch({
url: '/pages/oaLogin/oaLogin'
})
},
//
async getDtnote() {
let res = await getDocumentListApi({
page: 1,
limit: 2
})
// console.log(res.data)
this.list5 = res.data.data
},
async getDtlist() {
let res = await todosubjec()
console.log(res.data)
// this.list5 = res.data.data
},
async getDtlist1() {
let res = await tasksubjec()
console.log(res.data)
// this.list5 = res.data.data
},
//
async getDocumentList2() {
let res = await projecttasklist({
page: 1,
limit: 3,
})
this.list4=res.data.data
},
//
async getList() {
const res = await getdatatotal()
console.log(res.data)
this.list = res.data
},
//
listbiao(item, i) {
switch (item.type) {
case "note":
uni.navigateTo({
url: '/pages/users/user_document/index'
})
break;
case "approve":
uni.switchTab({
url: '/pages/examine/index'
})
break;
case "expense":
uni.navigateTo({
url: '/pages/reimbursement/index'
})
break;
case "invoice":
uni.navigateTo({
url: '/pages/invoice/index'
})
break;
case "customer":
uni.navigateTo({
url: '/pages/personneltransfer/index'
})
break;
case "project":
uni.navigateTo({
url: '/pages/project/index'
})
break;
case "task":
uni.switchTab({
url: '/oaTask/oaTask'
})
break;
case "article":
uni.navigateTo({
url: '/pages/users/article/index'
})
break;
}
},
//
appcenter(item, i) {
switch (i) {
case 0:
uni.navigateTo({
url: '/pages/views/com_approve'
})
break;
case 1:
uni.navigateTo({
url: '/pages/appcenter/index'
})
break;
case 2:
uni.navigateTo({
url: '/pages/appcenter/index'
})
break;
case 3:
uni.navigateTo({
url: '/pages/appcenter/index'
})
break;
case 4:
uni.navigateTo({
url: '/pages/appcenter/index'
})
break;
case 5:
uni.navigateTo({
url: '/pages/appcenter/index'
})
break;
case 6:
uni.navigateTo({
url: '/pages/appcenter/index'
})
break;
case 7:
uni.navigateTo({
url: '/pages/appcenter/index'
})
break;
}
}
}
}
</script>
<style lang="scss">
page {
background: #F3F4F8;
}
.content {
.content-top {
width: 100%;
height: 761rpx;
background: #3274F9;
border-radius: 0px 0px 0px 0px;
opacity: 1;
.close {
position: absolute;
right: 0rpx;
margin-top: 30rpx;
}
.top_detail {
display: flex;
margin-top: 138rpx;
margin-bottom: 46rpx;
margin-left: 28rpx;
.top_detail_one {
width: 112rpx;
height: 112rpx;
background: #FFFFFF;
border-radius: 50%;
opacity: 1;
margin-right: 32rpx;
}
.top_detail_two {
.top_detail_twoa {
margin-bottom: 10rpx;
display: flex;
margin-top: 10rpx;
.name {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin-right: 39rpx;
}
.phone {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
}
.top_detail_twob {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
}
}
.top_class {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 28rpx 28rpx;
.top_class-one {
flex-basis: 25%;
margin-bottom: 42rpx;
text-align: center;
.title {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
.title_value {
font-size: 39rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
margin-bottom: 21rpx;
}
}
}
}
.my_msg-con {
display: flex;
margin-top: 138rpx;
margin-bottom: 46rpx;
margin-left: 28rpx;
.name_work {
margin-left: 31.58rpx;
font-size: 28.07rpx;
.name {
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin-right: 39rpx;
margin-top: 20rpx;
.nickname {
font-size: 32rpx;
font-weight: 500;
margin-right: 30rpx;
}
}
}
.work {
margin-top: 14.04rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #FFFFFF;
margin-right: 39rpx;
.wr_item {
display: flex;
.wr_t_left {
flex-shrink: 0;
margin-right: 12rpx;
}
}
}
.omit {
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 溢出隐藏 */
text-overflow: ellipsis;
/* 使用省略号代表被截断的文本 */
}
}
.content-banner {
width: 694rpx;
height: 221rpx;
background: #FFFFFF;
border-radius: 21rpx 21rpx;
margin: 0 auto;
margin-top: -100rpx;
padding-left: 28rpx;
padding-top: 28rpx;
.content-banner-title {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
}
.content-banner-detail {
display: flex;
justify-content: space-between;
margin-top: 19rpx;
padding-right: 28rpx;
.banner-detail {
display: flex;
.banner-detail-title {
margin-right: 14rpx;
width: 77rpx;
height: 42rpx;
text-align: center;
line-height: 42rpx;
border-radius: 7rpx 7rpx;
opacity: 1;
border: 1px solid #FF8C1A;
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FF8C1A;
}
.banner-detail-detail {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
}
}
}
.content-banner1 {
width: 694rpx;
height: 221rpx;
background: #FFFFFF;
border-radius: 21rpx 21rpx;
margin: 0 auto;
margin-top: 25rpx;
padding-left: 28rpx;
padding-top: 28rpx;
.content-banner-title {
display: flex;
justify-content: space-between;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
}
.content-banner-detail {
display: flex;
justify-content: space-between;
margin-top: 19rpx;
padding-right: 28rpx;
.banner-detail {
display: flex;
.banner-detail-title {
margin-right: 14rpx;
width: 77rpx;
height: 42rpx;
text-align: center;
line-height: 42rpx;
border-radius: 7rpx 7rpx;
opacity: 1;
border: 1px solid #FF8C1A;
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FF8C1A;
}
.banner-detail-detail {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
}
}
}
.content-sort {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width: 694rpx;
height: 361rpx;
background: #FFFFFF;
border-radius: 21rpx 21rpx;
margin: 0 auto;
margin-top: 32rpx;
.content-sort-con {
width: 25%;
text-align: center;
margin-top: 28rpx;
.sort-img {
width: 88rpx;
height: 88rpx;
margin: 0 auto;
image {
width: 100%;
height: 100%;
}
}
}
}
.content-bootom {
width: 694rpx;
background: #FFFFFF;
border-radius: 21rpx 21rpx;
margin: 0 auto;
margin-top: 32rpx;
margin-bottom: 32rpx;
.content-bootom-top {
display: flex;
justify-content: space-between;
padding: 28rpx 28rpx;
.bootom-top-one {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
}
.bootom-top-two {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #000000;
}
}
.content-bootom-detail {
padding: 28rpx 28rpx;
.bootom-detail {
padding-bottom: 21rpx;
padding-top: 21rpx;
border-bottom: 1px solid #CCCCCC;
.bootom-detail-one {
display: flex;
justify-content: space-between;
.detail-one-a {
width: 63rpx;
height: 35rpx;
line-height: 35rpx;
text-align: center;
background: #FFE4E4;
border-radius: 7rpx 7rpx;
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #F24848;
}
.detail-one-b {
width: 450rpx;
overflow: hidden;
font-size: 28rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
}
.detail-one-c {
width: 116rpx;
height: 49rpx;
line-height: 49rpx;
text-align: center;
background: #DFFCDF;
border-radius: 74rpx 74rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #F24848;
}
}
.bootom-detail-two {
.detail-twoa {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin-top: 21rpx;
}
.detail-twob {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
margin-top: 14rpx;
}
}
}
}
}
}
</style>

721
pages/invoice/add.vue Normal file
View File

@ -0,0 +1,721 @@
<template>
<view class="leave_request">
<view class="leave_box">
<view class="cont_cell">
<view class="title">开票金额</view>
<input type="text" v-model="listobj.amount" placeholder="开票金额">
</view>
<view class="leava_type flex_a_c">
<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="title">开票主体</view>
<input type="text" v-model="project2" placeholder="请选择" disabled @click="leavaShow1">
</view>
<view class="cont_cell">
<view class="title">抬头类型</view>
<radio-group class="select_group" @change="deliveryWayChangetwo">
<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"> 个人</view>
</view>
</label>
</radio-group>
</view>
<view class="cont_cell">
<view class="title">开票抬头</view>
<input type="text" v-model="listobj.invoice_title" placeholder="开票抬头">
</view>
<view class="cont_cell">
<view class="title">电话号码</view>
<input type="text" v-model="listobj.invoice_phone" placeholder="电话号码">
</view>
<view class="cont_cell">
<view class="title">纳税人识别号 </view>
<input type="text" v-model="listobj.invoice_tax" placeholder="纳税人识别号">
</view>
<view class="cont_cell">
<view class="title">开户行</view>
<input type="text" v-model="listobj.invoice_bank" placeholder="开户行">
</view>
<view class="cont_cell">
<view class="title">银行账号</view>
<input type="text" v-model="listobj.invoice_account" placeholder="银行账号">
</view>
<view class="cont_cell">
<view class="title">银行营业网点 </view>
<input type="text" v-model="listobj.invoice_banking" placeholder="银行营业网点">
</view>
<view class="cont_cell">
<view class="title">地址</view>
<input type="text" v-model="listobj.invoice_address" placeholder="地址">
</view>
</view>
<!-- <view class="leave_box" style="padding-top: 100rpx;"> -->
<!-- 附件 -->
<!-- <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>
</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'> -->
<!-- <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>
</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="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
<view class="cont_cell" @click="branchShow1 = true">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
</view>
</view>
<view class="bot_btn">
<view class="reset" @click="reset">重置</view>
<view class="submit_btn" @click="submiteBtn">立即提交</view>
</view>
<u-action-sheet :show="leavaTypeShow2" keyName="name" :actions="columns1" title="请选择"
@close="leavaTypeShow2 = false" @select="leavaType2">
</u-action-sheet>
<u-action-sheet :show="leavaTypeShow" keyName="name" :actions="columns" title="请选择"
@close="leavaTypeShow = false" @select="leavaType">
</u-action-sheet>
<u-action-sheet :show="leavaTypeShow1" keyName="name" :actions="actions4" title="请选择"
@close="leavaTypeShow1 = false" @select="leavaType1">
</u-action-sheet>
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@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">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
</u-picker>
<!-- 选择时间 -->
<u-datetime-picker :show="timeShow" mode="datetime" :maxDate="1786778555000" :minDate="timestamp"
closeOnClickOverlay @confirm="timeConfirm($event)" @cancel="timeShow = false"
@close="timeShow = 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>
</view>
</template>
<script>
import {
Toast
} from '../../libs/uniApi'
import {
userdepartment,
getemployee,
addinvoice,
invoicecate,
appexpenseview,
invoiceview,
invoiceflow
} from '@/api/oa.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
} from '@/api/file.js'
export default {
components: {
lsjUpload
},
data() {
return {
defaultIndex: [0, 0, 0],
defaultIndex1: [0, 0, 0],
timestamp: '',
personInfo: {},
company: '',
listobj: {},
project1: '',
project2: '',
timeShow: false,
timeShow1: false,
branchShow: false,
flowPathShow: false,
leavaTypeShow: false,
leavaTypeShow1: false,
leavaTypeShow2: false,
branchColumns: [],
branchColumns1: [],
flowPathSheet: [],
actions4: [],
branchShow1: false,
flowPath: '',
columns: [],
check_admin_name: '',
copy_names: '',
columns1: [{
name: '企业',
id: 1,
},
{
name: '个人',
id: 2,
}
],
list: [{
cate_title: "",
amount: '',
remarks: ''
}],
fileOption: {},
files: new Map(),
fileArray: [],
dnum: 0
}
},
onLoad() {
},
onShow() {
this.fileOption = {
url: FILE_URL,
name: 'file',
header: {
token: this.$store.state.app.token
}
},
//
this.timestamp = Date.parse(new Date());
// this.getlist()
this.getlist1()
this.getDocumentList()
this.getDocumentList1()
},
methods: {
reset() {
this.list = [{
name: "",
num: ''
}],
this.listobj = {}
this.fileArray = []
this.copy_names = ''
this.flowPath = ''
this.check_admin_name = ''
this.project1=''
this.project2=''
},
async getDocumentList1() {
let res = await invoicecate()
this.actions4 = res.data.map((step, index) => {
return {
name: step.title,
id: step.id,
};
});
},
//
async getDocumentList() {
const res = await userdepartment()
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
codelist[0] = res.data.map((item) => { //
return {
id: item.id,
name: item.title
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[1][0].id
})
codelist[2] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
this.$forceUpdate()
this.$nextTick(() => {
this.branchColumns = codelist
this.branchColumns1 = codelist
this.branchColumns2 = codelist
})
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns, 2, newColumn);
}
}
},
//
async columnCode1(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns1[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns1, 2, newColumn);
}
}
},
deliveryWayChangetwo(e) {
this.listobj.type = e.detail.value
},
//
leavaShow(item, i) {
this.dnum = i
this.leavaTypeShow = true
},
leavaShow1() {
this.leavaTypeShow1 = true
},
branchConfirm(e) {
// console.log('confirm', e, e.value[2].name)
this.check_admin_name = e.value[2].name
this.listobj.check_admin_ids = e.value[2].id
this.branchShow = false
},
branchConfirm1(e) {
console.log('confirm', e, e.value[2].name)
if (this.listobj.copy_uids) {
this.listobj.copy_uids += e.value[2].id
} else {
this.listobj.copy_uids = e.value[2].id
}
this.copy_names += e.value[2].name + ','
this.branchShow1 = false
},
async submiteBtn() {
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(',');
// }
this.listobj.flow_id = this.flow_id
if (this.listobj.invoice_phone) {
const pattern = /^1[3456789]\d{9}$/;
if (!pattern.test(this.listobj.invoice_phone)) return Toast('手机号输入错误')
}
if (!this.listobj.invoice_title) return Toast('请输入开票抬头')
if (!this.listobj.type) return Toast('请选择抬头类型')
if (!this.listobj.invoice_subject) return Toast('请输入开票主体')
if (!this.listobj.amount) return Toast('请输入发票金额')
if (!this.listobj.invoice_type) return Toast('请选择开票类型')
const res = await addinvoice(this.listobj)
Toast('提交成功')
},
//
addleava() {
this.list.push({
name: "",
num: ''
})
},
deleteleava(item, index) {
if (this.list.length > 1) {
this.list.splice(0, 1)
} else {
Toast('不能删除')
}
},
async getlist1() {
const res = await invoiceflow()
this.flowPathSheet = res.data
console.log('个人信息2', res.data);
},
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
},
/** 类型 */
leavaType(e) {
this.list[this.dnum].cate_title = e.name
this.list[this.dnum].id = e.id
this.leavaTypeShow = false
},
leavaType1(e) {
console.log(e)
this.project2 = e.name
this.listobj.invoice_subject= e.id
this.leavaTypeShow1 = false
},
leavaType2(e) {
this.project1 = e.name
this.listobj.invoice_type = e.id
this.leavaTypeShow1 = false
},
branchShowclose() {
this.branchShow = false
},
branchShowclose1() {
this.branchShow1 = false
},
/**
* 某文件上传结束回调(成功失败都回调)
* @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.$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(name) {
this.$refs.lsjUpload.upload(name);
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.leave_request {
position: relative;
padding-bottom: 100px;
}
.leave_box,
.flow_path {
width: 100%;
padding: 0 28.07rpx;
background: #fff;
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.bot_btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 87.72rpx;
>view {
width: 50%;
text-align: center;
line-height: 87.72rpx;
}
.reset {
background-color: #fff;
}
.submit_btn {
color: #fff;
height: 87.72rpx;
background: $theme-oa-color;
}
}
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
}
}
.cont_cell {
display: flex;
align-items: center;
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
.audit_process {
.process_item {
position: relative;
height: 100%;
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
color: #fff;
padding: 0 4px;
margin-left: 10.53rpx;
background-color: #3c9cff;
border-radius: 2px;
}
.verifier {
margin: 17.54rpx 0;
}
}
.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 {
padding: 17.54rpx;
background-color: #F7F7F7;
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;
}
}
</style>

744
pages/invoice/bianji.vue Normal file
View File

@ -0,0 +1,744 @@
<template>
<view class="leave_request">
<view class="leave_box">
<view class="cont_cell">
<view class="title">开票金额</view>
<input type="text" v-model="listobj.amount" placeholder="开票金额">
</view>
<view class="leava_type flex_a_c">
<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="title">开票主体</view>
<input type="text" v-model="project2" placeholder="请选择" disabled @click="leavaShow1">
</view>
<view class="cont_cell">
<view class="title">抬头类型</view>
<radio-group class="select_group" @change="deliveryWayChangetwo">
<label class="radio_select" style="margin-right:15rpx;display: flex; margin-bottom: 30rpx;">
<view style="margin-right:5rpx;">
<radio value="1" :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'" />
</view>
<view @click="branchShow = true" style="display: flex;">
<view class="title"> 个人</view>
</view>
</label>
</radio-group>
</view>
<view class="cont_cell">
<view class="title">开票抬头</view>
<input type="text" v-model="listobj.invoice_title" placeholder="开票抬头">
</view>
<view class="cont_cell">
<view class="title">电话号码</view>
<input type="text" v-model="listobj.invoice_phone" placeholder="电话号码">
</view>
<view class="cont_cell">
<view class="title">纳税人识别号 </view>
<input type="text" v-model="listobj.invoice_tax" placeholder="纳税人识别号">
</view>
<view class="cont_cell">
<view class="title">开户行</view>
<input type="text" v-model="listobj.invoice_bank" placeholder="开户行">
</view>
<view class="cont_cell">
<view class="title">银行账号</view>
<input type="text" v-model="listobj.invoice_account" placeholder="银行账号">
</view>
<view class="cont_cell">
<view class="title">银行营业网点 </view>
<input type="text" v-model="listobj.invoice_banking" placeholder="银行营业网点">
</view>
<view class="cont_cell">
<view class="title">地址</view>
<input type="text" v-model="listobj.invoice_address" placeholder="地址">
</view>
</view>
<!-- <view class="leave_box" style="padding-top: 100rpx;"> -->
<!-- 附件 -->
<!-- <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>
</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'> -->
<!-- <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>
</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="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
<view class="cont_cell" @click="branchShow1 = true">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
</view>
</view>
<view class="bot_btn">
<view class="reset" @click="reset">重置</view>
<view class="submit_btn" @click="submiteBtn">立即提交</view>
</view>
<u-action-sheet :show="leavaTypeShow2" keyName="name" :actions="columns1" title="请选择"
@close="leavaTypeShow2 = false" @select="leavaType2">
</u-action-sheet>
<u-action-sheet :show="leavaTypeShow" keyName="name" :actions="columns" title="请选择"
@close="leavaTypeShow = false" @select="leavaType">
</u-action-sheet>
<u-action-sheet :show="leavaTypeShow1" keyName="name" :actions="actions4" title="请选择"
@close="leavaTypeShow1 = false" @select="leavaType1">
</u-action-sheet>
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@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">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
</u-picker>
<!-- 选择时间 -->
<u-datetime-picker :show="timeShow" mode="datetime" :maxDate="1786778555000" :minDate="timestamp"
closeOnClickOverlay @confirm="timeConfirm($event)" @cancel="timeShow = false"
@close="timeShow = 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>
</view>
</template>
<script>
import {
Toast
} from '../../libs/uniApi'
import {
userdepartment,
getemployee,
addinvoice,
invoicecate,
appexpenseview,
invoiceview,
invoiceflow
} from '@/api/oa.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
} from '@/api/file.js'
export default {
components: {
lsjUpload
},
data() {
return {
selected: "2",
defaultIndex: [0, 0, 0],
defaultIndex1: [0, 0, 0],
timestamp: '',
personInfo: {},
company: '',
listobj: {},
project1: '',
project2: '',
timeShow: false,
timeShow1: false,
branchShow: false,
flowPathShow: false,
leavaTypeShow: false,
leavaTypeShow1: false,
leavaTypeShow2: false,
branchColumns: [],
branchColumns1: [],
flowPathSheet: [],
actions4: [],
branchShow1: false,
flowPath: '',
columns: [],
check_admin_name: '',
copy_names: '',
columns1: [{
name: '企业',
id: 1,
},
{
name: '个人',
id: 2,
}
],
list: [{
cate_title: "",
amount: '',
remarks: ''
}],
fileOption: {},
files: new Map(),
fileArray: [],
dnum: 0
}
},
onLoad(option) {
this.detail(option.type)
},
onShow() {
this.fileOption = {
url: FILE_URL,
name: 'file',
header: {
token: this.$store.state.app.token
}
},
//
this.timestamp = Date.parse(new Date());
// this.getlist()
this.getlist1()
this.getDocumentList()
this.getDocumentList1()
},
methods: {
async detail(id) {
let res = await invoiceview({
id: id
})
console.log(res.data.detail.invoice_subject, this.flowPathSheet, '111')
// this.listobj = res.data.detail
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.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
this.listobj.invoice_banking = res.data.detail.invoice_banking
this.listobj.invoice_phone = res.data.detail.invoice_phone
this.listobj.invoice_subject = res.data.detail.invoice_subject
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.selected = res.data.detail.type.toString()
// console.log(res.data.detail.type)
},
reset() {
this.list = [{
name: "",
num: ''
}],
this.listobj = {}
this.fileArray = []
this.copy_names = ''
this.flowPath = ''
this.check_admin_name = ''
this.project1 = ''
this.project2 = ''
},
async getDocumentList1() {
let res = await invoicecate()
this.actions4 = res.data.map((step, index) => {
return {
name: step.title,
id: step.id,
};
});
},
//
async getDocumentList() {
const res = await userdepartment()
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
codelist[0] = res.data.map((item) => { //
return {
id: item.id,
name: item.title
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[1][0].id
})
codelist[2] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
this.$forceUpdate()
this.$nextTick(() => {
this.branchColumns = codelist
this.branchColumns1 = codelist
this.branchColumns2 = codelist
})
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns, 2, newColumn);
}
}
},
//
async columnCode1(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns1[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns1, 2, newColumn);
}
}
},
deliveryWayChangetwo(e) {
this.listobj.type = e.detail.value
},
//
leavaShow(item, i) {
this.dnum = i
this.leavaTypeShow = true
},
leavaShow1() {
this.leavaTypeShow1 = true
},
branchConfirm(e) {
// console.log('confirm', e, e.value[2].name)
this.check_admin_name = e.value[2].name
this.listobj.check_admin_ids = e.value[2].id
this.branchShow = false
},
branchConfirm1(e) {
console.log('confirm', e, e.value[2].name)
if (this.listobj.copy_uids) {
this.listobj.copy_uids += e.value[2].id
} else {
this.listobj.copy_uids = e.value[2].id
}
this.copy_names += e.value[2].name + ','
this.branchShow1 = false
},
async submiteBtn() {
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(',');
// }
this.listobj.flow_id = this.flow_id
if (this.listobj.invoice_phone) {
const pattern = /^1[3456789]\d{9}$/;
if (!pattern.test(this.listobj.invoice_phone)) return Toast('手机号输入错误')
}
if (!this.listobj.invoice_title) return Toast('请输入开票抬头')
if (!this.listobj.type) return Toast('请选择抬头类型')
if (!this.listobj.invoice_subject) return Toast('请输入开票主体')
if (!this.listobj.amount) return Toast('请输入发票金额')
if (!this.listobj.invoice_type) return Toast('请选择开票类型')
const res = await addinvoice(this.listobj)
Toast('提交成功')
},
//
addleava() {
this.list.push({
name: "",
num: ''
})
},
deleteleava(item, index) {
if (this.list.length > 1) {
this.list.splice(0, 1)
} else {
Toast('不能删除')
}
},
async getlist1() {
const res = await invoiceflow()
this.flowPathSheet = res.data
console.log('个人信息2', res.data);
},
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
},
/** 类型 */
leavaType(e) {
this.list[this.dnum].cate_title = e.name
this.list[this.dnum].id = e.id
this.leavaTypeShow = false
},
leavaType1(e) {
console.log(e)
this.project2 = e.name
this.listobj.invoice_subject = e.id
this.leavaTypeShow1 = false
},
leavaType2(e) {
this.project1 = e.name
this.listobj.invoice_type = e.id
this.leavaTypeShow1 = false
},
branchShowclose() {
this.branchShow = false
},
branchShowclose1() {
this.branchShow1 = false
},
/**
* 某文件上传结束回调(成功失败都回调)
* @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.$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(name) {
this.$refs.lsjUpload.upload(name);
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.leave_request {
position: relative;
padding-bottom: 100px;
}
.leave_box,
.flow_path {
width: 100%;
padding: 0 28.07rpx;
background: #fff;
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.bot_btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 87.72rpx;
>view {
width: 50%;
text-align: center;
line-height: 87.72rpx;
}
.reset {
background-color: #fff;
}
.submit_btn {
color: #fff;
height: 87.72rpx;
background: $theme-oa-color;
}
}
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
}
}
.cont_cell {
display: flex;
align-items: center;
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
.audit_process {
.process_item {
position: relative;
height: 100%;
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
color: #fff;
padding: 0 4px;
margin-left: 10.53rpx;
background-color: #3c9cff;
border-radius: 2px;
}
.verifier {
margin: 17.54rpx 0;
}
}
.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 {
padding: 17.54rpx;
background-color: #F7F7F7;
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;
}
}
</style>

801
pages/invoice/detail.vue Normal file
View File

@ -0,0 +1,801 @@
<template>
<view class="leave_request">
<view class="leave_box">
<view class="cont_cell">
<view class="title">开票金额</view>
<input type="text" v-model="listobj.amount" placeholder="开票金额">
</view>
<view class="leava_type flex_a_c">
<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="title">开票主体</view>
<input type="text" v-model="project2" placeholder="请选择" disabled @click="leavaShow1">
</view>
<view class="cont_cell">
<view class="title">抬头类型</view>
<radio-group class="select_group" @change="deliveryWayChangetwo">
<label class="radio_select" style="margin-right:15rpx;display: flex; margin-bottom: 30rpx;">
<view style="margin-right:5rpx;">
<radio value="1" :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'" />
</view>
<view @click="branchShow = true" style="display: flex;">
<view class="title">个人</view>
</view>
</label>
</radio-group>
</view>
<view class="cont_cell">
<view class="title">开票抬头</view>
<input type="text" v-model="listobj.invoice_title" placeholder="开票抬头">
</view>
<view class="cont_cell">
<view class="title">电话号码</view>
<input type="text" v-model="listobj.invoice_phone" placeholder="电话号码">
</view>
<view class="cont_cell">
<view class="title">纳税人识别号 </view>
<input type="text" v-model="listobj.invoice_tax" placeholder="纳税人识别号">
</view>
<view class="cont_cell">
<view class="title">开户行</view>
<input type="text" v-model="listobj.invoice_bank" placeholder="开户行">
</view>
<view class="cont_cell">
<view class="title">银行账号</view>
<input type="text" v-model="listobj.invoice_account" placeholder="银行账号">
</view>
<view class="cont_cell">
<view class="title">银行营业网点 </view>
<input type="text" v-model="listobj.invoice_banking" placeholder="银行营业网点">
</view>
<view class="cont_cell">
<view class="title">地址</view>
<input type="text" v-model="listobj.invoice_address" placeholder="地址">
</view>
</view>
<!-- <view class="leave_box" style="padding-top: 100rpx;"> -->
<!-- 附件 -->
<!-- <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>
</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'> -->
<!-- <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>
</view>
</view>-->
<!-- </view> -->
<view class="flow_path">
<view class="cont_cell" style="padding-top: 20rpx;" v-if="listobj.check_status!= 4&& ktype!=0">
<view class="title" style="width: 200rpx;">撤回意见</view>
<textarea v-model="mscontent" placeholder="请输入撤回意见" />
</view>
<view class="cont_cell">
<view class="title">审批流程</view>
</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="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>
</view>
<view class="cont_cell">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
</view>
</view>
<view class="" v-if="ktype!=0">
<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>
<u-action-sheet :show="leavaTypeShow2" keyName="name" :actions="columns1" title="请选择"
@close="leavaTypeShow2 = false" @select="leavaType2">
</u-action-sheet>
<u-action-sheet :show="leavaTypeShow" keyName="name" :actions="columns" title="请选择"
@close="leavaTypeShow = false" @select="leavaType">
</u-action-sheet>
<u-action-sheet :show="leavaTypeShow1" keyName="name" :actions="actions4" title="请选择"
@close="leavaTypeShow1 = false" @select="leavaType1">
</u-action-sheet>
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@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">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
</u-picker>
<!-- 选择时间 -->
<u-datetime-picker :show="timeShow" mode="datetime" :maxDate="1786778555000" :minDate="timestamp"
closeOnClickOverlay @confirm="timeConfirm($event)" @cancel="timeShow = false"
@close="timeShow = 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>
</view>
</template>
<script>
import {
Toast
} from '../../libs/uniApi'
import {
getPersonInfoApi,
appexpensecate,
appexpenseflow,
userdepartment,
getemployee,
addinvoice,
invoicecate,
appflow_check,
invoiceview,
invoiceflow
} from '@/api/oa.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
} from '@/api/file.js'
export default {
components: {
lsjUpload
},
data() {
return {
selected: "2",
defaultIndex: [0, 0, 0],
defaultIndex1: [0, 0, 0],
timestamp: '',
personInfo: {},
company: '',
listobj: {},
project1: '',
project2: '',
mscontent: '',
timeShow: false,
timeShow1: false,
branchShow: false,
flowPathShow: false,
leavaTypeShow: false,
leavaTypeShow1: false,
leavaTypeShow2: false,
branchColumns: [],
branchColumns1: [],
flowPathSheet: [],
actions4: [],
branchShow1: false,
flowPath: '',
columns: [],
check_admin_name: '',
copy_names: '',
columns1: [{
name: '企业',
id: 1,
},
{
name: '个人',
id: 2,
}
],
list: [{
cate_title: "",
amount: '',
remarks: ''
}],
fileOption: {},
files: new Map(),
fileArray: [],
check_record: [],
dnum: 0,
ktype:1,
}
},
onLoad(option) {
this.detail(option.type)
this.ktype=option.num
},
onShow() {
this.fileOption = {
url: FILE_URL,
name: 'file',
header: {
token: this.$store.state.app.token
}
},
//
this.timestamp = Date.parse(new Date());
// this.getlist()
this.getlist1()
this.getDocumentList()
this.getDocumentList1()
},
methods: {
async detail(id) {
let res = await invoiceview({
id: id
})
this.listobj = res.data.detail
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
this.selected= res.data.detail.type.toString()
},
reset() {
this.list = [{
name: "",
num: ''
}],
this.listobj = {}
this.fileArray = []
this.copy_names = ''
this.flowPath = ''
this.check_admin_name = ''
},
async getDocumentList1() {
let res = await invoicecate()
this.actions4 = res.data.map((step, index) => {
return {
name: step.title,
id: step.id,
};
});
},
//
async getDocumentList() {
const res = await userdepartment()
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
codelist[0] = res.data.map((item) => { //
return {
id: item.id,
name: item.title
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[1][0].id
})
codelist[2] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
this.$forceUpdate()
this.$nextTick(() => {
this.branchColumns = codelist
this.branchColumns1 = codelist
this.branchColumns2 = codelist
})
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns, 2, newColumn);
}
}
},
//
async columnCode1(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns1[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns1, 2, newColumn);
}
}
},
deliveryWayChangetwo(e) {
this.listobj.type = e.detail.value
},
//
leavaShow(item, i) {
this.dnum = i
this.leavaTypeShow = true
},
leavaShow1() {
this.leavaTypeShow1 = true
},
branchConfirm(e) {
// console.log('confirm', e, e.value[2].name)
this.check_admin_name = e.value[2].name
this.listobj.check_admin_ids = e.value[2].id
this.branchShow = false
},
branchConfirm1(e) {
console.log('confirm', e, e.value[2].name)
if (this.listobj.copy_uids) {
this.listobj.copy_uids += e.value[2].id
} else {
this.listobj.copy_uids = e.value[2].id
}
this.copy_names += e.value[2].name + ','
this.branchShow1 = false
},
async submiteBtn() {
console.log(this.list)
let data = {
id: this.listobj.id,
type: 3,
check: 3,
content: this.mscontent,
}
let res = await appflow_check(data)
// console.log(res)
Toast(res.msg)
// const res = await appexpense(this.listobj)
Toast('提交成功')
},
bianjiBtn() {
uni.navigateTo({
url: '/pages/invoice/bianji?type=' + this.listobj.id
})
},
async getlist() {
const res = await appexpensecate()
// this.personInfo = res.data
const reformattedData = res.data.map(item => {
return {
name: item.title,
id: item.id
};
});
this.columns = reformattedData
},
async getlist1() {
const res = await invoiceflow()
this.flowPathSheet = res.data
// console.log('2', res.data);
},
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
},
/** 类型 */
leavaType(e) {
this.list[this.dnum].cate_title = e.name
this.list[this.dnum].id = e.id
this.leavaTypeShow = false
},
leavaType1(e) {
this.project2 = e.name
this.listobj.invoice_subject = e.id
this.leavaTypeShow1 = false
},
leavaType2(e) {
this.project1 = e.name
this.listobj.invoice_type = e.id
this.leavaTypeShow1 = false
},
branchShowclose() {
this.branchShow = false
},
branchShowclose1() {
this.branchShow1 = false
},
/**
* 某文件上传结束回调(成功失败都回调)
* @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.$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(name) {
this.$refs.lsjUpload.upload(name);
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.leave_request {
position: relative;
padding-bottom: 100px;
}
.leave_box,
.flow_path {
width: 100%;
padding: 0 28.07rpx;
background: #fff;
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.bot_btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 87.72rpx;
>view {
width: 100%;
text-align: center;
line-height: 87.72rpx;
}
.reset {
background-color: #fff;
}
.submit_btn {
color: #fff;
height: 87.72rpx;
background: $theme-oa-color;
}
}
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
}
}
.cont_cell {
display: flex;
align-items: center;
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
.audit_process {
.process_item {
position: relative;
height: 100%;
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
color: #fff;
padding: 0 4px;
margin-left: 10.53rpx;
background-color: #3c9cff;
border-radius: 2px;
}
.verifier {
margin: 17.54rpx 0;
}
}
.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 {
padding: 17.54rpx;
background-color: #F7F7F7;
border-radius: 4px;
.title {
font-size: 28.07rpx;
}
.text {
margin-top: 7.02rpx;
font-size: 21.05rpx;
color: #999;
}
}
.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;
}
}
.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;
}
}
</style>

859
pages/invoice/handle.vue Normal file
View File

@ -0,0 +1,859 @@
<template>
<view class="leave_request">
<view class="leave_box">
<view class="cont_cell">
<view class="title">开票金额</view>
<input type="text" v-model="listobj.amount" placeholder="开票金额">
</view>
<view class="leava_type flex_a_c">
<view class="title">开票类型</view>
<input type="text" v-model="project1" placeholder="请选择" disabled>
</view>
<view class="leava_type flex_a_c">
<view class="title">开票主体</view>
<input type="text" v-model="project2" placeholder="请选择" disabled>
</view>
<view class="cont_cell">
<view class="title">抬头类型</view>
<radio-group class="select_group" @change="deliveryWayChangetwo">
<label class="radio_select" style="margin-right:15rpx;display: flex; margin-bottom: 30rpx;">
<view style="margin-right:5rpx;">
<radio value="1" :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'" />
</view>
<view @click="branchShow = true" style="display: flex;">
<view class="title">个人</view>
</view>
</label>
</radio-group>
</view>
<view class="cont_cell">
<view class="title">开票抬头</view>
<input type="text" v-model="listobj.invoice_title" placeholder="开票抬头">
</view>
<view class="cont_cell">
<view class="title">电话号码</view>
<input type="text" v-model="listobj.invoice_phone" placeholder="电话号码">
</view>
<view class="cont_cell">
<view class="title">纳税人识别号 </view>
<input type="text" v-model="listobj.invoice_tax" placeholder="纳税人识别号">
</view>
<view class="cont_cell">
<view class="title">开户行</view>
<input type="text" v-model="listobj.invoice_bank" placeholder="开户行">
</view>
<view class="cont_cell">
<view class="title">银行账号</view>
<input type="text" v-model="listobj.invoice_account" placeholder="银行账号">
</view>
<view class="cont_cell">
<view class="title">银行营业网点 </view>
<input type="text" v-model="listobj.invoice_banking" placeholder="银行营业网点">
</view>
<view class="cont_cell">
<view class="title">地址</view>
<input type="text" v-model="listobj.invoice_address" placeholder="地址">
</view>
</view>
<!-- <view class="leave_box" style="padding-top: 100rpx;"> -->
<!-- 附件 -->
<!-- <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>
</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'> -->
<!-- <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>
</view>
</view>-->
<!-- </view> -->
<view class="flow_path">
<view class="cont_cell">
<view class="title">审批流程</view>
</view>
<view style="padding-bottom: 40rpx;">
<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>
<block>
<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="admin_name" placeholder="请选择" disabled>
</view>
<view class="cont_cell">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
</view>
<view class="" >
<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>
审核结束
</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>
</block>
<view class="cont_cell" style="padding-top: 20rpx;" v-if="listobj.check_status!= 4">
<view class="title" style="width: 200rpx;">审核意见</view>
<textarea v-model="mscontent" placeholder="请输入审核意见" />
</view>
</view>
<view class="bot_btn">
<view class="reset" @click="appflowcheck()">拒绝</view>
<view class="submit_btn" @click=" appflowcheck1()">通过</view>
</view>
<u-action-sheet :show="leavaTypeShow2" keyName="name" :actions="columns1" title="请选择"
@close="leavaTypeShow2 = false" @select="leavaType2">
</u-action-sheet>
<u-action-sheet :show="leavaTypeShow" keyName="name" :actions="columns" title="请选择"
@close="leavaTypeShow = false" @select="leavaType">
</u-action-sheet>
<u-action-sheet :show="leavaTypeShow1" keyName="name" :actions="actions4" title="请选择"
@close="leavaTypeShow1 = false" @select="leavaType1">
</u-action-sheet>
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@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">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
</u-picker>
<!-- 选择时间 -->
<u-datetime-picker :show="timeShow" mode="datetime" :maxDate="1786778555000" :minDate="timestamp"
closeOnClickOverlay @confirm="timeConfirm($event)" @cancel="timeShow = false"
@close="timeShow = 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>
</view>
</template>
<script>
import {
Toast
} from '../../libs/uniApi'
import {
getPersonInfoApi,
appexpensecate,
appexpenseflow,
userdepartment,
getemployee,
addinvoice,
invoicecate,
appflow_check,
invoiceview,
invoiceflow
} from '@/api/oa.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
} from '@/api/file.js'
export default {
components: {
lsjUpload
},
data() {
return {
selected: "2",
defaultIndex: [0, 0, 0],
defaultIndex1: [0, 0, 0],
timestamp: '',
personInfo: {},
company: '',
listobj: {},
project1: '',
project2: '',
mscontent: '',
timeShow: false,
timeShow1: false,
branchShow: false,
flowPathShow: false,
leavaTypeShow: false,
leavaTypeShow1: false,
leavaTypeShow2: false,
branchColumns: [],
branchColumns1: [],
flowPathSheet: [],
actions4: [],
branchShow1: false,
flowPath: '',
columns: [],
check_admin_name: '',
copy_names: '',
columns1: [{
name: '企业',
id: 1,
},
{
name: '个人',
id: 2,
}
],
list: [{
cate_title: "",
amount: '',
remarks: ''
}],
fileOption: {},
files: new Map(),
fileArray: [],
check_record: [],
dnum: 0,
check:'',
admin_name :""
}
},
onLoad(option) {
this.detail(option.type)
},
onShow() {
this.fileOption = {
url: FILE_URL,
name: 'file',
header: {
token: this.$store.state.app.token
}
},
//
this.timestamp = Date.parse(new Date());
// this.getlist()
this.getlist1()
this.getDocumentList()
this.getDocumentList1()
},
methods: {
async detail(id) {
let res = await invoiceview({
id: id
})
this.listobj = res.data.detail
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.admin_name = res.data.detail.check_user
this.copy_names = res.data.detail.copy_user
this.selected = res.data.detail.type.toString()
},
reset() {
this.list = [{
name: "",
num: ''
}],
this.listobj = {}
this.fileArray = []
this.copy_names = ''
this.flowPath = ''
this.check_admin_name = ''
},
async getDocumentList1() {
let res = await invoicecate()
this.actions4 = res.data.map((step, index) => {
return {
name: step.title,
id: step.id,
};
});
},
//
async getDocumentList() {
const res = await userdepartment()
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
codelist[0] = res.data.map((item) => { //
return {
id: item.id,
name: item.title
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[1][0].id
})
codelist[2] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
this.$forceUpdate()
this.$nextTick(() => {
this.branchColumns = codelist
this.branchColumns1 = codelist
this.branchColumns2 = codelist
})
},
//
async appflowcheck() {
let data = {
id: this.listobj.id,
type: 3,
check_node: this.check,
content: this.mscontent,
check: 2,
check_admin_ids: this.listobj.check_admin_ids
}
let res = await appflow_check(data)
Toast(res.msg)
},
async appflowcheck1() {
console.log(this.listobj)
let data = {
id: this.listobj.id,
type: 3,
check_node: this.check,
check: 1,
content: this.mscontent,
check_admin_ids: this.listobj.check_admin_ids
}
let res = await appflow_check(data)
console.log(res)
if(res.code==0){
uni.navigateBack({
delta:1
})
}
Toast(res.msg)
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns, 2, newColumn);
}
}
},
//
async columnCode1(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns1[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns1, 2, newColumn);
}
}
},
//
deliveryWayChangetwo1(e) {
console.log(e)
this.check = e.detail.value
},
deliveryWayChangetwo(e) {
this.listobj.type = e.detail.value
},
//
leavaShow(item, i) {
this.dnum = i
this.leavaTypeShow = true
},
leavaShow1() {
this.leavaTypeShow1 = true
},
branchConfirm(e) {
// console.log('confirm', e, e.value[2].name)
this.check_admin_name = e.value[2].name
this.listobj.check_admin_ids = e.value[2].id
this.branchShow = false
},
branchConfirm1(e) {
console.log('confirm', e, e.value[2].name)
if (this.listobj.copy_uids) {
this.listobj.copy_uids += e.value[2].id
} else {
this.listobj.copy_uids = e.value[2].id
}
this.copy_names += e.value[2].name + ','
this.branchShow1 = false
},
async submiteBtn() {
console.log(this.list)
let data = {
id: this.listobj.id,
type: 3,
check: 3,
content: this.mscontent,
}
let res = await appflow_check(data)
// console.log(res)
Toast(res.msg)
// const res = await appexpense(this.listobj)
Toast('提交成功')
},
bianjiBtn() {
uni.navigateTo({
url: '/pages/invoice/bianji?type=' + this.listobj.id
})
},
async getlist() {
const res = await appexpensecate()
// this.personInfo = res.data
const reformattedData = res.data.map(item => {
return {
name: item.title,
id: item.id
};
});
this.columns = reformattedData
},
async getlist1() {
const res = await invoiceflow()
this.flowPathSheet = res.data
// console.log('2', res.data);
},
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
},
/** 类型 */
leavaType(e) {
this.list[this.dnum].cate_title = e.name
this.list[this.dnum].id = e.id
this.leavaTypeShow = false
},
leavaType1(e) {
this.project2 = e.name
this.listobj.invoice_subject = e.id
this.leavaTypeShow1 = false
},
leavaType2(e) {
this.project1 = e.name
this.listobj.invoice_type = e.id
this.leavaTypeShow1 = false
},
branchShowclose() {
this.branchShow = false
},
branchShowclose1() {
this.branchShow1 = false
},
/**
* 某文件上传结束回调(成功失败都回调)
* @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.$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(name) {
this.$refs.lsjUpload.upload(name);
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.leave_request {
position: relative;
padding-bottom: 100px;
}
.leave_box,
.flow_path {
width: 100%;
padding: 0 28.07rpx;
background: #fff;
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.bot_btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 87.72rpx;
>view {
width: 50%;
text-align: center;
line-height: 87.72rpx;
}
.reset {
background-color: #fff;
}
.submit_btn {
color: #fff;
height: 87.72rpx;
background: $theme-oa-color;
}
}
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
}
}
.cont_cell {
display: flex;
align-items: center;
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
.audit_process {
.process_item {
position: relative;
height: 100%;
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
color: #fff;
padding: 0 4px;
margin-left: 10.53rpx;
background-color: #3c9cff;
border-radius: 2px;
}
.verifier {
margin: 17.54rpx 0;
}
}
.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 {
padding: 17.54rpx;
background-color: #F7F7F7;
border-radius: 4px;
.title {
font-size: 28.07rpx;
}
.text {
margin-top: 7.02rpx;
font-size: 21.05rpx;
color: #999;
}
}
.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;
}
}
.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;
}
}
</style>

404
pages/invoice/index.vue Normal file
View File

@ -0,0 +1,404 @@
<template>
<view class="content">
<view class="content-banner">
<view class="" v-for="(item,i ) in list" :key="i" @click="apparent(i)">
<view class="banner-name" :style="{'color':i==num?'#3274F9':''}">{{item.name}}</view>
<view class="banner-xian" v-if='i==num'></view>
</view>
</view>
<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'>
<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.status==1?'#34A853':item.status==2?'#F9AA32':item.status==3?'#F02828':''}">
<text v-if='item.status==1'>已通过</text>
<text v-if='item.status==2'>待审批</text>
<text v-if='item.status==3'>审批拒绝</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>
</liu-swipe-action>
<!-- <view class="middle-edit" @click="editpart(item)">
编辑
</view> -->
<!--<view class="middle-delete" @click="clickItem(item)">
删除
</view> -->
</view>
</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list2.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
Toast
} from '@/libs/uniApi.js'
import {
invoiceindex,invoicelist,invoicecopy
} from '@/api/oa.js'
export default {
data() {
return {
title: 'Hello',
statusBarHeight: 0,
list: [{
name: '我发起的',
value: 8
}, {
name: '我处理的',
value: 8
},
{
name: '抄送给我的',
value: 8
}
],
list2: [],
num: 0,
btnList: [{
id: '1',
name: '编辑',
width: '100rpx',
height: '100rpx',
bgColor: '#5f92f7',
color: '#FFFFFF',
fontSize: '28rpx'
}, {
id: '2',
name: '删除',
height: '100rpx',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
}
},
onLoad() {
},
onShow() {
if (this.num == 0) {
this.initList()
} else if (this.num == 1) {
this.initList1()
} else {
this.initList2()
}
},
onReachBottom() {
if (this.num == 0) {
this.getlist()
} else if (this.num == 1) {
this.getlist1()
} else {
this.getlist2()
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
apparent(index) {
this.num = index
if (index == 0) {
this.initList()
} else if (index == 1) {
this.initList1()
} else {
this.initList2()
}
},
async initList() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list2 = [];
await this.getlist()
},
async initList1() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list2 = [];
await this.getlist1()
},
async initList2() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list3 = [];
await this.getlist2()
},
async getlist() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await invoiceindex({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
// keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list2 = [...this.list2, ...res.data?.data]
},
async getlist1() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await invoicelist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
// keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list2 = [...this.list2, ...res.data?.data]
},
async getlist2() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await invoicecopy({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
// keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list2 = [...this.list2, ...res.data?.data]
},
//
clickItem(data) {
console.log(data)
if (data.id == 2) {
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(data.id)
}
}
})
} else {
this.editpart(this.list2[data.index])
}
},
//
async deleteDepartment(id) {
const res = await deleteproject_task({
id: id
})
if (res.code == 0) {
this.loadConfig.status = "loading"
this.initList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/invoice/bianji??type=' + item.type
})
},
tian(item) {
// console.log(item)
if (this.num == 1) {
uni.navigateTo({
url: '/pages/invoice/handle?type=' + item.id
})
}else if (this.num == 2){
uni.navigateTo({
url: '/pages/invoice/detail?type=' + item.id +'&num=0'
})
}else{
uni.navigateTo({
url: '/pages/invoice/detail?type=' + item.id
})
}
}
}
}
</script>
<style lang='scss'>
.content-banner {
display: flex;
justify-content: space-between;
padding: 20rpx 40rpx;
.banner-name {
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
.banner-xian {
width: 70rpx;
height: 5rpx;
margin: 10rpx auto;
background-color: #3274F9;
}
}
.content-middle {
.content-middle-one {
.middle-one {
width: 694rpx;
margin: 0 auto;
margin-bottom: 21rpx;
background: #FFFFFF;
padding: 0 25rpx;
padding-bottom: 25rpx;
.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;
}
.middle-one-title {
border-bottom: 1px solid #CCCCCC;
margin-bottom: 10rpx;
display: flex;
line-height: 82rpx;
justify-content: space-between;
.one-titlea {
display: flex;
.name {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.parment {
font-size: 25rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #3274F9;
margin-top: 5rpx;
margin-left: 10rpx;
}
}
.one-titleb {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
}
}
.middle-one-detail {
height: 90rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.middle-one-time {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
}
}
}
</style>

297
pages/jobtitle/index.vue Normal file
View File

@ -0,0 +1,297 @@
<template>
<view>
<view class="content-middle">
<view class="content-middle-one" v-if="list.length>0">
<view class="middle-one" v-for="(items,j) in list" :key='j'>
<liu-swipe-action :index="j" @clickItem="clickItem(items)" :btnList='btnList'>
<view class="middle-oneb">
<view class="middle-oneb-a">
<view class="threeb-a-a">
<image :src="items.img" mode=""></image>
</view>
<view class="threeb-a-b">
<view class="name"> <text>{{items.title}}</text></view>
<view class="achor">{{items.remark}}</view>
</view>
</view>
<view class="middle-oneb-b" @click="editpart(items)">
<image src="@/static/images/bianji.png" mode=""></image>
</view>
</view>
</liu-swipe-action>
</view>
</view>
</view>
<view class="content-bootom" @click="adddepart">
<view class="content-bootom-one">
<image src="@/static/images/ja.png" mode=""></image>
</view>
<view class="content-bootom-two">添加岗位</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
userposition,
deleteuserposition
} from '@/api/oa.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
show: false,
btnList: [{
id: '2',
name: '删除',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
list: [],
};
},
onShow() {
this.getDocumentList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
//
async getDocumentList() {
try {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await userposition({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
})
console.log(res.data)
this.loadConfig.status = "loadmore"
if (res.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res?.data]
} catch (e) {
this.loadConfig.status = "nomore"
}
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addjobtitle/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(data.id)
}
}
})
},
//
async deleteDepartment(id) {
const res = await deleteuserposition({
id: id
})
if (res.code == 0) {
this.getDocumentList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/addjobtitle/index?type=' + 1 + "&data=" + encodeURIComponent(JSON.stringify(
item))
})
},
setValue() {
}
}
};
</script>
<style lang="scss" scoped>
page {
position: relative;
}
.content-middle {
.content-middle-title {
height: 98rpx;
line-height: 98rpx;
background: #FFFFFF;
font-size: 35rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
padding-left: 28rpx;
color: #3274F9;
}
.content-middle-one {
margin-top: 26rpx;
background-color: #FFFFFF;
padding: 28rpx 28rpx;
.middle-one {
.middle-oneb {
display: flex;
justify-content: space-between;
.middle-oneb-a {
display: flex;
.threeb-a-a {
width: 98rpx;
height: 98rpx;
border-radius: 11rpx 11rpx;
margin-right: 25rpx;
image {
width: 100%;
height: 100%;
}
}
.threeb-a-b {
.name {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
text {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #CCCCCC;
}
}
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
}
}
.middle-oneb-b {
width: 80rpx;
height: 80rpx;
margin-top: 45rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
.content-bootom {
width: 485rpx;
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #3274F9;
border-radius: 60px 60px 60px 60px;
display: flex;
left: 50%;
margin-left: -252.5rpx;
position: absolute;
bottom: 150rpx;
z-index: 9999 !important;
position: fixed;
.content-bootom-one {
margin-left: 152rpx;
margin-top: 5rpx;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
.content-bootom-two {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,886 @@
<template>
<view class="leave_request">
<view class="leave_box">
<view class="" v-for='(fieldValue, fieldKey) in dataobj' :key="fieldKey">
<!-- {{fieldKey}} -->
<!-- {{ fieldValue.title }} - {{ fieldValue.type }} -->
<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>
<!-- {{fieldKey}} -->
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择" @click="leixin(fieldKey)">
</view>
<view class="leava_type flex_a_c" v-if="fieldKey=='name'&&typeId!=24">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择" @click="leixiner()">
</view>
<view class=""
v-if="fieldValue.type=='input'&&fieldKey!='end_time'&&fieldKey!='start_time'&&fieldKey!='duration'">
<view class="cont_cell">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" :placeholder="fieldValue.title">
</view>
</view>
<view class="" v-if=" fieldKey=='start_time'">
<view class="cont_cell">
<view class="title">{{ timeData[0].title }}</view>
<input type="text" v-model="timeData[0].time" placeholder="请选择时间" disabled
@click="selectTime(timeData[0])">
</view>
</view>
<view class="" v-if="fieldKey=='end_time'">
<view class="cont_cell">
<view class="title">{{ timeData[1].title }}</view>
<input type="text" v-model="timeData[1].time" placeholder="请选择时间" disabled
@click="selectTime(timeData[1])">
</view>
</view>
<view class="" v-if="fieldKey=='duration'">
<view class="cont_cell">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="manHour" disabled placeholder="请假工时">
</view>
</view>
<view class="" v-if="fieldValue.type=='textarea'">
<view class="cont_cell">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" :placeholder="fieldValue.title">
</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="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>
</block>
<!-- <view class="upload_box flex_a_c_j_sb" @click="seleckImage">
<view>
<view class="title">选择文件并上传</view>
<view class="text">
上传前请规范命名最大只能上传100M的文件<br />
超过请压缩成多个文件上传
</view>
</view>
<u-icon name="plus-circle" color="#333333" size="28"></u-icon>
</view> -->
</view>
<!-- <view class="" v-for="(itemValue, itemKey) in fieldValue.item" :key="itemKey">
{{ itemKey }}: {{ itemValue }}
</view> -->
</view>
</view>
<view class="cont_details">
<view class="examine">审批流程</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="请假工时">
</view>
<view class="cont_cell">
<view class="title">抄送人</view>
<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>
</view>
</block>
<view class="cont_cell" style="padding-top: 20rpx;">
<view class="title" style="width: 200rpx;">撤回意见</view>
<textarea v-model="mscontent" placeholder="请输入撤回意见" />
</view>
</view>
<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>
<u-picker :show="branchShow" :defaultIndex='defaultIndex' ref="branchRef" :columns="branchColumns"
@confirm="branchConfirm" @change="columnCode" :closeOnClickOverlay="true" @close="branchShowclose"
keyName="name">
</u-picker>
</view>
</template>
<script>
import {
oaLeaveData
} from '@/static/server/server.js'
import {
oaUploads
} from '../../api/upload'
import {
Toast
} from '../../libs/uniApi'
import {
appfield,
getemployee,
userdepartment,
appapprove,
appapproveview,
appflow_check
} from '@/api/oa.js'
export default {
data() {
return {
meatelist: {
},
defaultIndex: [0, 0, 0],
defaultIndex1: [0, 0, 0],
defaultIndex2: [0, 0, 0],
dataobj: {},
timestamp: '', //
flowPath: '', //
flow_id: '', // id
check_admin_name: '', //
check_admin_ids: [],
copy_names: '', //
copy_uids: '', // id
manHour: '', //
daysNum: '', //
content: '', //
flowPathShow: false,
flowPathSheet: [],
check: "",
mscontent: "",
timeData: [{
title: '开始时间:',
timeShow: false,
timeVal: '', //
time: '', //
timeDay: '', //
timeHour: '', //
},
{
title: '结束时间:',
timeShow: false,
timeVal: '', //
time: '', //
timeDay: '', //
timeHour: '', //
}
],
leavaTypeShow: false,
leavaTypeVal: '',
leavaTypeId: '',
leavaTypeId1: '',
leavaTypeId2: '',
columns: [],
//
branchShow: false,
branchShow1: false,
branchShow2: false,
branchColumns: [],
branchColumns1: [],
branchColumns2: [],
isflowDate: true,
flowDate: [],
fileArray: [],
typeId: '',
flag1: false,
datatype: '',
dataobj1: {},
check_record: []
}
},
onLoad(option) {
this.typeId = option.type
if (option.type == 8) {
this.timeData[0].title = '借用日期:'
this.timeData[1].title = '拟归还日期:'
}
this.applist(option.type)
this.getDocumentList()
this.getDocumentList2()
},
onShow() {
// this.getFlow()
//
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
}
},
methods: {
async getDocumentList2() {
this.columns3 = []
const res = await userdepartment({
tree: 1
})
const deArr = res.data
this.columns3.push(deArr)
},
confirm(e) {
console.log(e)
this.flag1 = false
},
async applist(type) {
let res = await appapproveview({
id: type
})
// console.log(res.data)
this.dataobj1 = res.data
this.check_record = res.data.check_record
this.applist1(res.data.detail.type)
// this.dataobj = res.data.field
// console.log(this.dataobj)
},
async applist1(type) {
let res = await appfield({
type: type
})
this.dataobj = res.data.field
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 : ''
this.meatelist.mobile = 'mobile' in this.dataobj1.detail ? this.dataobj1.detail.mobile : ''
this.meatelist.department_type = 'department_type' in this.dataobj1.detail ? this.dataobj1.detail
.department_type_title : ''
this.meatelist.detail_type = 'detail_type' in this.dataobj1.detail ? this.dataobj1.detail
.detail_type_title : ''
this.meatelist.other_type = 'other_type' in this.dataobj1.detail ? this.dataobj1.detail
.other_type_title : ''
this.meatelist.remark = 'remark' in this.dataobj1.detail ? this.dataobj1.detail.remark : ''
this.meatelist.remark1 = 'remark1' in this.dataobj1.detail ? this.dataobj1.detail.remark1 : ''
this.meatelist.address = 'address' in this.dataobj1.detail ? this.dataobj1.detail.address : ''
this.meatelist.detail_time = 'detail_time' in this.dataobj1.detail ? this.dataobj1.detail.detail_time :
''
this.meatelist.content = 'content' in this.dataobj1.detail ? this.dataobj1.detail.content : ''
if('fileArray' in this.dataobj1.detail){
this.fileArray = res.data.detail.fileArray.map(function(obj) {
return {
name: obj.name,
filesize: obj.filesize
};
});
}
// this.meatelist.remark1 = 'remark1' in this.dataobj1.detail ? this.dataobj1.detail.remark1 : ''
// this.meatelist.remark1 = 'remark1' in this.dataobj1.detail ? this.dataobj1.detail.remark1 : ''
if ('detail_type' in this.dataobj1.detail) {
const detailTypeOptions = Object.entries(this.dataobj.detail_type.item).map(([id, name]) => ({
id,
name
}));
this.columns = detailTypeOptions
for (let i in this.columns) {
if (this.columns[i].id == this.dataobj1.detail.detail_type) {
this.meatelist.detail_type = this.columns[i].name
}
}
}
},
//
async getDocumentList() {
const res = await userdepartment()
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
codelist[0] = res.data.map((item) => { //
return {
id: item.id,
name: item.title
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[1][0].id
})
codelist[2] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
this.$forceUpdate()
this.$nextTick(() => {
this.branchColumns = codelist
this.branchColumns1 = codelist
this.branchColumns2 = codelist
})
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns, 2, newColumn);
}
}
},
//
async columnCode1(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns1[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns1, 2, newColumn);
}
}
},
async columnCode2(e) {
console.log(e)
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns2[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns2, 2, newColumn);
}
}
},
//
deliveryWayChangetwo(e) {
console.log(e)
this.check = e.detail.value
},
//
async appflowcheck() {
let data = {
id: this.dataobj1.detail.id,
type: 1,
check_node: this.check,
content: this.mscontent,
check: 2,
check_admin_ids: this.check_admin_ids.toString()
}
let res = await appflow_check(data)
Toast(res.msg)
},
async appflowcheck1() {
let data = {
id: this.dataobj1.detail.id,
type: 1,
// check_node: '',
check: 3,
content: this.mscontent,
// check_admin_ids: ''
}
let res = await appflow_check(data)
console.log(res)
Toast(res.msg)
},
leixin(e) {
// console.log(e)
// this.meatelist[e]==1
this.datatype = e
if (e == 'department_type') {
const detailTypeOptions = Object.entries(this.dataobj.department_type.item).map(([id, name]) => ({
id,
name
}));
this.columns = detailTypeOptions
}
if (e == 'detail_type') {
const detailTypeOptions = Object.entries(this.dataobj.detail_type.item).map(([id, name]) => ({
id,
name
}));
this.columns = detailTypeOptions
}
if (e == 'other_type') {
const detailTypeOptions = Object.entries(this.dataobj.other_type.item).map(([id, name]) => ({
id,
name
}));
this.columns = detailTypeOptions
}
// console.log(this.meatelist)
this.leavaTypeShow = true
},
leixiner() {
this.branchShow2 = true
},
branchShowclose() {
this.branchShow = false
},
branchShowclose1() {
this.branchShow1 = false
},
selectTime(item) {
item.timeShow = true
},
async branchHandler(e) {
const {
columnIndex,
value,
values, // values
index,
// pickerref
picker = this.$refs.branchRef
} = e
// ()
if (columnIndex === 0) {
// pickerthis
let res = await getEmployeeAPI({
did: value[0].id
})
if (res.length < 1) {
res[0] = {
name: '无'
}
}
picker.setColumnValues(1, res)
}
},
// columnIndexvaluevalues
branchConfirm(e) {
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)
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)
this.meatelist.uid = e.value[2].id
this.meatelist.name = e.value[2].name
this.branchShow2 = false
},
/** 请假类型 */
leavaType(e) {
console.log(this.meatelist, this.datatype, e)
if (this.datatype == 'department_type') {
this.meatelist.department_type = e.name
this.leavaTypeId = e.id
} else if (this.datatype == 'detail_type') {
this.meatelist.detail_type = e.name
this.leavaTypeId1 = e.id
} else if (this.datatype == 'other_type') {
this.meatelist.other_type = e.name
this.leavaTypeId2 = e.id
}
this.leavaTypeShow = false
},
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
},
async getFlow() {
const flow = await getFlowAPI({
type: 1,
flow_cate: 1
})
this.flowPathSheet = flow
},
timeConfirm(e, i) {
this.timeData[i].time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
this.timeData[i].timeDay = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.timeData[i].timeHour = uni.$u.timeFormat(e.value, 'hh:MM')
this.timeData[i].timeShow = false
},
//
editcheck1(item){
console.log(item)
uni.navigateTo({
url: '/pages/leave_request/bianji??type=' + item.detail.id
})
},
/**
* 计算两个时间戳之间相差的小时数
* */
calculateLeaveDaysAndHours(leaveStartTime, leaveEndTime, hoursPerDay = 8) {
const startDate = new Date(leaveStartTime);
const endDate = new Date(leaveEndTime);
//
const leaveDays = Math.floor((endDate.getTime() - startDate.getTime()) / (24 * 60 * 60 * 1000)) + 1;
//
const leaveHours = leaveDays * hoursPerDay;
//
return {
leaveDays,
leaveHours,
};
}
},
filters: {
// MB
formatBytes(bytes, decimals = 2) {
if (bytes === 0) return '0 MB';
const k = 1024;
const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(decimals)) + ' ' + sizes[i];
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.leave_request {
position: relative;
padding-bottom: 100px;
}
.leave_box,
.flow_path {
width: 100%;
padding: 0 28.07rpx;
background: #fff;
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.bot_btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 87.72rpx;
>view {
width: 100%;
text-align: center;
line-height: 87.72rpx;
}
.reset {
background-color: #fff;
}
.submit_btn {
color: #fff;
height: 87.72rpx;
background: $theme-oa-color;
}
}
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
}
}
.cont_cell {
display: flex;
align-items: center;
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
.cont_details {
padding: 24.56rpx 24.56rpx;
font-size: 28.07rpx;
background-color: #fff;
}
//
.examine {
margin-bottom: 17.54rpx;
}
.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;
}
}
}
//
.audit_process {
.process_item {
position: relative;
height: 100%;
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
color: #fff;
padding: 0 4px;
margin-left: 10.53rpx;
background-color: #3c9cff;
border-radius: 2px;
}
.verifier {
margin: 17.54rpx 0;
}
}
.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 {
padding: 17.54rpx;
background-color: #F7F7F7;
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;
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,968 @@
<template>
<view class="leave_request">
<view class="leave_box">
<view class="" v-for='(fieldValue, fieldKey) in dataobj' :key="fieldKey">
<!-- {{fieldKey}} -->
<!-- {{ fieldValue.title }} - {{ fieldValue.type }} -->
<!-- v-if="fieldValue.type=='select'&& fieldKey!='copy_uids'&&fieldKey!='check_admin_ids'&&fieldKey!='flow_id'&&fieldKey!='name'" -->
<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="请选择" @click="leixin(fieldKey)"
v-if="fieldKey!='name'">
</view>
<view class="leava_type flex_a_c" v-if="fieldKey=='name'&typeId!=6">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" placeholder="请选择" @click="leixiner()">
</view>
<view class=""
v-if="fieldValue.type=='input'&&fieldKey!='end_time'&&fieldKey!='start_time'&&fieldKey!='duration'">
<view class="cont_cell">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" :placeholder="fieldValue.title">
</view>
</view>
<view class="" v-if=" fieldKey=='start_time'">
<view class="cont_cell">
<view class="title">{{ timeData[0].title }}</view>
<input type="text" v-model="timeData[0].time" placeholder="请选择时间" disabled
@click="selectTime(timeData[0])">
</view>
</view>
<view class="" v-if="fieldKey=='end_time'">
<view class="cont_cell">
<view class="title">{{ timeData[1].title }}</view>
<input type="text" v-model="timeData[1].time" placeholder="请选择时间" disabled
@click="selectTime(timeData[1])">
</view>
</view>
<view class="" v-if="fieldKey=='duration'">
<view class="cont_cell">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="manHour" disabled placeholder="请假工时">
</view>
</view>
<view class="" v-if="fieldValue.type=='textarea'">
<view class="cont_cell">
<view class="title">{{fieldValue.title}}</view>
<input type="text" v-model="meatelist[fieldKey]" :placeholder="fieldValue.title">
</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="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>
</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'>
<!-- <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>
</view>
</view>
</view>
<!-- <view class="" v-for="(itemValue, itemKey) in fieldValue.item" :key="itemKey">
{{ itemKey }}: {{ itemValue }}
</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="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
<view class="cont_cell" @click="branchShow1 = true">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
</view>
</view>
<view class="bot_btn">
<view class="reset" @click="reset">重置</view>
<view class="submit_btn" @click="submiteBtn">立即提交</view>
</view>
<!-- <u-picker :show="leavaTypeShow" keyName="name" :columns="columns" @cancel="leavaTypeShow = false"
@confirm="leavaType">
</u-picker> -->
<u-action-sheet :show="leavaTypeShow" keyName="name" :actions="columns" title="请选择工作类别"
@close="leavaTypeShow = false" @select="leavaType">
</u-action-sheet>
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@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">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
</u-picker>
<u-picker :show="branchShow2" :defaultIndex='defaultIndex2' ref="branchRef" :columns="branchColumns2"
@confirm="branchConfirm2" @change="columnCode2" :closeOnClickOverlay="true" @close="branchShowclose2"
keyName="name">
</u-picker>
<u-picker :show="flag1" :columns="columns3" ref="uPicker4" @cancel="flag1 = false" closeOnClickOverlay
@close="flag1 = false" @confirm="confirm" keyName="title" :defaultIndex=[0,0]>
</u-picker>
<!-- 选择时间 -->
<block v-for="(item,i) in timeData" :key="i">
<u-datetime-picker :show="item.timeShow" v-model="item.timeVal" mode="datetime" :maxDate="1786778555000"
:minDate="timestamp" closeOnClickOverlay @confirm="timeConfirm($event,i)"
@cancel="item.timeShow = false" @close="item.timeShow = false"></u-datetime-picker>
</block>
</view>
</template>
<script>
import {
oaLeaveData
} from '@/static/server/server.js'
import {
oaUploads
} from '../../api/upload'
import {
Toast
} from '../../libs/uniApi'
import {
appfield,
getemployee,
userdepartment,
appapprove,
} from '@/api/oa.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 {
meatelist: {
},
defaultIndex: [0, 0, 0],
defaultIndex1: [0, 0, 0],
defaultIndex2: [0, 0, 0],
dataobj: {},
timestamp: '', //
flowPath: '', //
flow_id: '', // id
check_admin_name: '', //
check_admin_ids: '',
copy_names: '', //
copy_uids: '', // id
manHour: '', //
daysNum: '', //
content: '', //
flowPathShow: false,
flowPathSheet: [],
timeData: [{
title: '开始时间:',
timeShow: false,
timeVal: '', //
time: '', //
timeDay: '', //
timeHour: '', //
},
{
title: '结束时间:',
timeShow: false,
timeVal: '', //
time: '', //
timeDay: '', //
timeHour: '', //
}
],
leavaTypeShow: false,
leavaTypeVal: '',
leavaTypeId: '',
leavaTypeId1: '',
leavaTypeId2: '',
leavaTypeId3: '',
columns: [],
//
branchShow: false,
branchShow1: false,
branchShow2: false,
branchColumns: [],
branchColumns1: [],
branchColumns2: [],
columns3: [],
isflowDate: true,
flowDate: [],
fileArray: [],
typeId: '',
flag1: false,
datatype: '',
fileOption: {},
files: new Map(),
}
},
onLoad(option) {
this.fileOption = {
url: FILE_URL,
name: 'file',
header: {
token: this.$store.state.app.token
}
},
this.typeId = option.type
if (option.type == 8) {
this.timeData[0].title = '借用日期:'
this.timeData[1].title = '拟归还日期:'
}
this.applist(option.type)
this.getDocumentList()
this.getDocumentList2()
},
onShow() {
// this.getFlow()
//
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
}
},
methods: {
async getDocumentList2() {
this.columns3 = []
const res = await userdepartment({
tree: 1
})
const deArr = res.data
this.columns3.push(deArr)
},
confirm(e) {
console.log(e)
this.flag1 = false
},
async applist(type) {
let res = await appfield({
type: type
})
this.dataobj = res.data.field
uni.setNavigationBarTitle({
title: res.data.title
})
if (res.data.field.flow_id) {
const detailTypeOptions1 = Object.entries(res.data.field.flow_id.item).map(([id, name]) => ({
id,
name
}));
this.flowPathSheet = detailTypeOptions1
}
},
//
async getDocumentList() {
const res = await userdepartment()
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
codelist[0] = res.data.map((item) => { //
return {
id: item.id,
name: item.title
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[1][0].id
})
codelist[2] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
this.$forceUpdate()
this.$nextTick(() => {
this.branchColumns = codelist
this.branchColumns1 = codelist
this.branchColumns2 = codelist
})
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns, 2, newColumn);
}
}
},
//
async columnCode1(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns1[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns1, 2, newColumn);
}
}
},
async columnCode2(e) {
console.log(e)
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns2[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns2, 2, newColumn);
}
}
},
leixin(e) {
console.log(e)
// this.meatelist[e]==1
this.datatype = e
if (e == 'department_type') {
const detailTypeOptions = Object.entries(this.dataobj.department_type.item).map(([id, name]) => ({
id,
name
}));
this.columns = detailTypeOptions
}
if (e == 'detail_type') {
const detailTypeOptions = Object.entries(this.dataobj.detail_type.item).map(([id, name]) => ({
id,
name
}));
this.columns = detailTypeOptions
}
if (e == 'other_type') {
const detailTypeOptions = Object.entries(this.dataobj.other_type.item).map(([id, name]) => ({
id,
name
}));
this.columns = detailTypeOptions
}
if (e == 'position_type') {
const detailTypeOptions = Object.entries(this.dataobj.position_type.item).map(([id, name]) => ({
id,
name
}));
this.columns = detailTypeOptions
}
// console.log(this.meatelist)
this.leavaTypeShow = true
},
leixiner() {
this.branchShow2 = true
},
branchShowclose() {
this.branchShow = false
},
branchShowclose1() {
this.branchShow1 = false
},
branchShowclose2() {
this.branchShow2 = false
},
selectTime(item) {
item.timeShow = true
},
async branchHandler(e) {
const {
columnIndex,
value,
values, // values
index,
// pickerref
picker = this.$refs.branchRef
} = e
// ()
if (columnIndex === 0) {
// pickerthis
let res = await getEmployeeAPI({
did: value[0].id
})
if (res.length < 1) {
res[0] = {
name: '无'
}
}
picker.setColumnValues(1, res)
}
},
// 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.branchShow = false
},
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.branchShow1 = false
},
branchConfirm2(e) {
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
},
/** 请假类型 */
leavaType(e) {
console.log(this.meatelist, this.datatype, e)
if (this.datatype == 'department_type') {
this.meatelist.department_type = e.name
this.leavaTypeId = e.id
} else if (this.datatype == 'detail_type') {
this.meatelist.detail_type = e.name
this.leavaTypeId1 = e.id
} else if (this.datatype == 'other_type') {
this.meatelist.other_type = e.name
this.leavaTypeId2 = e.id
} else if (this.datatype == 'position_type') {
this.meatelist.position_type = e.name
this.leavaTypeId3 = e.id
}
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
// this.meatelist.detail_type = e.name
// this.meatelist.other_type = e.name
this.leavaTypeShow = false
},
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
},
async getFlow() {
const flow = await getFlowAPI({
type: 1,
flow_cate: 1
})
this.flowPathSheet = flow
},
timeConfirm(e, i) {
this.timeData[i].time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
this.timeData[i].timeDay = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.timeData[i].timeHour = uni.$u.timeFormat(e.value, 'hh:MM')
this.timeData[i].timeShow = false
},
async submiteBtn() {
console.log(this.leavaTypeId2)
let subData;
let subData1;
if (this.typeId == 6 || this.typeId == 7 || this.typeId == 8 || this.typeId == 21) {
let fileIds = [];
this.fileArray.map((item, i) => {
fileIds.push(item.id)
});
subData1 = {
detail_type: this.leavaTypeId1,
content: this.meatelist.content,
check_admin_name: this.check_admin_name,
check_admin_ids: this.check_admin_ids,
flow_id: this.flow_id,
file_ids: fileIds.join(','),
copy_names: this.copy_names,
copy_uids: this.copy_uids,
type: this.typeId,
}
if (this.typeId == 8) {
subData1.start_time = this.timeData[0].timeDay + ' ' + this.timeData[0].timeHour,
subData1.end_time = this.timeData[1].timeDay + ' ' + this.timeData[1].timeHour,
subData1.department_type = this.leavaTypeId
subData1.detail_type = this.leavaTypeId1
subData1.other_type = this.leavaTypeId2
}
if (this.typeId == 21) {
subData1.department_type = this.leavaTypeId
subData1.position_type = this.leavaTypeId3
// console.log(subData1.position_type , this.leavaTypeId3)
}
subData = {
...this.meatelist,
...subData1
}
} else {
let fileIds = [];
this.fileArray.map((item, i) => {
fileIds.push(item.id)
});
subData = {
detail_type: this.leavaTypeId1,
start_time: this.timeData[0].timeDay + ' ' + this.timeData[0].timeHour,
end_time: this.timeData[1].timeDay + ' ' + this.timeData[1].timeHour,
duration: this.manHour,
content: this.meatelist.content,
check_admin_name: this.check_admin_name,
check_admin_ids: this.check_admin_ids,
flow_id: this.flow_id,
file_ids: fileIds.join(','),
copy_names: this.copy_names,
copy_uids: this.copy_uids,
type: this.typeId,
file: ''
}
}
console.log(subData)
try {
const res = await appapprove(subData)
if(res.code==0){
uni.navigateBack({
delta:1
})
}
Toast('提交成功')
} catch (e) {
Toast('提交失败')
}
},
/**
* 某文件上传结束回调(成功失败都回调)
* @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.$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(name) {
this.$refs.lsjUpload.upload(name);
},
reset() {
this.flowPath = ''
this.flowDate = []
this.leavaTypeVal = ''
this.leavaTypeId = ''
this.leavaTypeId1 = ''
this.leavaTypeId2 = ''
this.leavaTypeId3 = ''
this.meatelist = {}
this.daysNum = ''
this.timeData[0].time = ''
this.timeData[0].time = ''
this.timeData[1].time = ''
this.timeData[1].time = ''
this.manHour = ''
this.content = ''
this.flow_id = ''
this.check_admin_name = ''
this.check_admin_ids = ''
this.copy_names = ''
this.copy_uids = ''
},
delImg(i) {
let that = this
uni.showModal({
title: '删除图片',
content: '确定删除图片?',
success: res => {
if (res.confirm) {
that.fileArray.splice((i, 1))
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
},
/**
* 计算两个时间戳之间相差的小时数
* */
calculateLeaveDaysAndHours(leaveStartTime, leaveEndTime, hoursPerDay = 8) {
const startDate = new Date(leaveStartTime);
const endDate = new Date(leaveEndTime);
//
const leaveDays = Math.floor((endDate.getTime() - startDate.getTime()) / (24 * 60 * 60 * 1000)) + 1;
//
const leaveHours = leaveDays * hoursPerDay;
//
return {
leaveDays,
leaveHours,
};
}
},
filters: {
// MB
formatBytes(bytes, decimals = 2) {
if (bytes === 0) return '0 MB';
const k = 1024;
const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(decimals)) + ' ' + sizes[i];
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.leave_request {
position: relative;
padding-bottom: 100px;
}
.leave_box,
.flow_path {
width: 100%;
padding: 0 28.07rpx;
background: #fff;
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.bot_btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 87.72rpx;
>view {
width: 50%;
text-align: center;
line-height: 87.72rpx;
}
.reset {
background-color: #fff;
}
.submit_btn {
color: #fff;
height: 87.72rpx;
background: $theme-oa-color;
}
}
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
}
}
.cont_cell {
display: flex;
align-items: center;
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
.audit_process {
.process_item {
position: relative;
height: 100%;
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
color: #fff;
padding: 0 4px;
margin-left: 10.53rpx;
background-color: #3c9cff;
border-radius: 2px;
}
.verifier {
margin: 17.54rpx 0;
}
}
.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 {
padding: 17.54rpx;
background-color: #F7F7F7;
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;
}
}
</style>

View File

@ -0,0 +1,441 @@
<template>
<view class="content">
<view class="content-top" :style="'height:'+statusBarHeight+'px'" >
<retuntop :isshow='true' :name='name' :style="'padding-top:'+(statusBarHeight-35)+'px'" />
</view>
<view :style="'height:'+statusBarHeight+'px'">
</view>
<view class="content-middle">
<form report-submit='true'>
<view class='merchantsSettled' >
<view class='list'style="padding-bottom: 30rpx;">
<view class="item" style="border-bottom: 1px solid #eee;">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name">请假类型</text>
<picker @change="bindPickerChange1" :value="index1" :range="storeTypeArr"
range-key="type_name">
<input placeholder="请选择请假类型" type="text" disabled readonly
v-model="mer_storeType">
<view v-if="mer_storeType" @tap.stop="mer_storeType=''"
class="iconfont icon-guanbi2"></view>
</picker>
</view>
</view>
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name">开始时间</text>
<input placeholder="请选择开始时间" type="text" disabled readonly v-model="mer_storeType">
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name">结束时间</text>
<input placeholder="请选择结束时间" type="text" disabled readonly v-model="mer_storeType">
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name">请假工时</text>
<input placeholder="请选择请假工时" type="text" disabled readonly v-model="mer_storeType">
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name">请假事由</text>
<input placeholder="请选择请假事由" type="text" disabled readonly v-model="mer_storeType">
</view>
</view>
<view class="item no-border" style="background: #F7F7F7;padding-left: 20rpx;padding-bottom: 50rpx;">
<view class='acea-row row-middle'>
<text class="item-name">上传附件</text>
</view>
</view>
</view>
</view>
</form>
<form report-submit='true' >
<view class='merchantsSettled' style="margin-top: 30rpx;">
<view class='list'style="padding-bottom: 30rpx;">
<view class="item" style="border-bottom: 1px solid #eee;">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name">选择审批流程:</text>
<picker @change="bindPickerChange1" :value="index1" :range="storeTypeArr"
range-key="type_name">
<input placeholder="请选择" type="text" disabled readonly style="width: 200rpx;"
v-model="mer_storeType">
<view v-if="mer_storeType" @tap.stop="mer_storeType=''"
class="iconfont icon-guanbi2"></view>
</picker>
</view>
</view>
</view>
</view>
<view class="item" style="border-bottom: 1px solid #eee;">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name">审核人:</text>
<picker @change="bindPickerChange1" :value="index1" :range="storeTypeArr"
range-key="type_name">
<input placeholder="请选择审核人" type="text" disabled readonly style="width: 200rpx;"
v-model="mer_storeType">
<view v-if="mer_storeType" @tap.stop="mer_storeType=''"
class="iconfont icon-guanbi2"></view>
</picker>
</view>
</view>
</view>
</view>
<view class="item" style="border-bottom: 1px solid #eee;">
<view class="uni-list">
<view class="uni-list-cell">
<view class="uni-list-cell-db acea-row row-middle">
<text class="item-name">抄送人:</text>
<picker @change="bindPickerChange1" :value="index1" :range="storeTypeArr"
range-key="type_name">
<input placeholder="请选择抄送人" type="text" disabled readonly style="width: 200rpx;"
v-model="mer_storeType">
<view v-if="mer_storeType" @tap.stop="mer_storeType=''"
class="iconfont icon-guanbi2"></view>
</picker>
</view>
</view>
</view>
</view>
</view>
</view>
</form>
<view class="content-bottom">
<view class="content-bottom-one">
重置
</view>
<view class="content-bottom-two">
立即提交
</view>
</view>
</view>
<w-picker :visible.sync="visible" mode="date" startYear="2017" endYear="2099" value="2020-04-07" :current="true"
fields="day" @confirm="onConfirm($event,'date')" @cancel="onCancel" :disabled-after="false"
ref="date"></w-picker>
</view>
</template>
<script>
import retuntop from '@/components/return/index.vue'
import wPicker from "@/components/w-picker/w-picker.vue"
export default {
components: {
retuntop,
wPicker
},
data() {
return {
statusBarHeight: 0,
name: '请假申请',
merchantData: {
}
};
},
onLoad() {
this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 45;
},
methods: {
}
};
</script>
<style lang="scss">
page{
padding-bottom: 88rpx;
}
.content-top {
width: 100%;
background: #3274F9;
position: fixed;
z-index: 100;
}
.content-middle {
padding: 28rpx 28rpx;
.merchantsSettled .list {
background-color: #fff;
border-radius: 12px;
}
.application-record {
position: absolute;
display: flex;
align-items: center;
top: 240rpx;
right: 0;
color: #fff;
font-size: 22rpx;
background-color: rgba(0, 0, 0, 0.3);
padding: 8rpx 18rpx;
border-radius: 20px 0px 0px 20px;
}
.merchantsSettled .list .item {
padding: 50rpx 0 20rpx;
position: relative;
margin: 0 20px;
&.no-border {
border-bottom: none;
padding-left: 0;
padding-right: 0;
}
.item-title {
color: #666666;
font-size: 28rpx;
display: block;
}
.item-desc {
color: #B2B2B2;
font-size: 22rpx;
display: block;
margin-top: 9rpx;
line-height: 36rpx;
}
}
.item-name {
margin-right: 30rpx;
}
.acea-row,
.upload {
display: -webkit-box;
display: -moz-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-lines: multiple;
-moz-box-lines: multiple;
-o-box-lines: multiple;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.upload {
margin-top: 20rpx;
}
.acea-row.row-middle {
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
padding-left: 2px;
}
.acea-row.row-column {
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-o-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
}
.acea-row.row-center-wrapper {
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-moz-box-pack: center;
-o-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
.uni-list-cell-db {
position: relative;
}
.merchantsSettled .list .item input {
width: 400rpx;
font-size: 30rpx;
}
.merchantsSettled .list .item .placeholder {
color: #b2b2b2;
}
.merchantsSettled .default {
padding: 0 30rpx;
height: 90rpx;
background-color: #fff;
margin-top: 23rpx;
}
.merchantsSettled .default checkbox {
margin-right: 15rpx;
}
.merchantsSettled .acea-row uni-image {
width: 20px;
height: 20px;
display: block;
}
.merchantsSettled .list .item .codeIput {
width: 125px;
}
.uni-input-input {
display: block;
height: 100%;
background: none;
color: inherit;
opacity: 1;
-webkit-text-fill-color: currentcolor;
font: inherit;
line-height: inherit;
letter-spacing: inherit;
text-align: inherit;
text-indent: inherit;
text-transform: inherit;
text-shadow: inherit;
}
.merchantsSettled .list .item .code {
position: absolute;
width: 93px;
line-height: 27px;
border: 1px solid var(--view-theme);
border-radius: 15px;
color: var(--view-theme);
text-align: center;
bottom: 8px;
right: 0;
font-size: 12px;
}
.merchantsSettled .list .item .code.on {
background-color: #bbb;
color: #fff;
border-color: #bbb;
}
.merchantsSettled .submitBtn {
width: 588rpx;
margin: 0 auto;
height: 86rpx;
border-radius: 25px;
text-align: center;
line-height: 86rpx;
font-size: 15px;
color: #fff;
background: #E3E3E3;
margin-top: 25px;
pointer-events: none;
}
.merchantsSettled .submitBtn.on {
background: var(--view-theme);
pointer-events: all;
}
uni-checkbox-group,
.settleAgree {
display: inline-block;
font-size: 24rpx;
}
uni-checkbox-group {
color: #b2b2b2;
}
.settleAgree {
color: var(--view-theme);
position: relative;
top: 2px;
left: 8px;
}
.merchantsSettled uni-checkbox .uni-checkbox-wrapper {
width: 30rpx;
height: 30rpx;
border: 2rpx solid #C3C3C3;
border-radius: 15px;
}
}
.content-bottom{
width: 100%;
position: absolute;
bottom: 0;
left: 0;
position: fixed;
display: flex;
.content-bottom-one{
width: 50%;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
background: #fff;
}
.content-bottom-two{
width: 50%;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
background: #3274F9;
}
}
</style>

View File

@ -0,0 +1,669 @@
<template>
<view class="leave_request">
<view class="leave_box" v-for='(item,i) in dataobj' :key="i">
{{ item.title }} - {{ item.type }}
<view class="leava_type flex_a_c" >
<view class="title">{{dataobj[i].title}}</view>
<input type="text" v-model="leavaTypeVal" placeholder="请选择" disabled @click="leavaTypeShow = true">
</view>
{{i}}
<view class="cont_cell">
<view class="title">{{ dataobj[i]}}</view>
<input type="text" v-model="item.time" placeholder="请选择时间" disabled @click="selectTime(item)">
</view>
<!-- <block v-for="(item,i) in timeData" :key="i">
<view class="cont_cell">
<view class="title">{{ item.title }}</view>
<input type="text" v-model="item.time" placeholder="请选择时间" disabled @click="selectTime(item)">
</view>
</block> -->
<view class="cont_cell">
<view class="title">请假工时</view>
<input type="text" v-model="manHour" disabled placeholder="请假工时">
</view>
<view class="cont_cell">
<view class="title">请假天数</view>
<input type="text" v-model="daysNum" disabled placeholder="请假天数">
</view>
<view class="cont_cell">
<view class="title">请假事由</view>
<input type="text" v-model="content" placeholder="请输入请假事由">
</view>
<!-- 附件 -->
<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>
<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">
<view>
<view class="title">选择文件并上传</view>
<view class="text">
上传前请规范命名最大只能上传100M的文件<br />
超过请压缩成多个文件上传
</view>
</view>
<u-icon name="plus-circle" color="#333333" size="28"></u-icon>
</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="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
<view class="cont_cell" @click="branchShow1 = true">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
</view>
</view>
<view class="bot_btn">
<view class="reset" @click="reset">重置</view>
<view class="submit_btn" @click="submiteBtn">立即提交</view>
</view>
<!-- <u-picker :show="leavaTypeShow" keyName="name" :columns="columns" @cancel="leavaTypeShow = false"
@confirm="leavaType">
</u-picker> -->
<u-action-sheet :show="leavaTypeShow" keyName="name" :actions="columns" title="请选择工作类别"
@close="leavaTypeShow = false" @select="leavaType">
</u-action-sheet>
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@close="flowPathShow=false" :closeOnClickOverlay="true" :closeOnClickAction="true">
</u-action-sheet>
<!-- 部门选择 -->
<u-picker :show="branchShow" :defaultIndex='defaultIndex' ref="branchRef" :columns="branchColumns"
@confirm="branchConfirm" @change="branchHandler" :closeOnClickOverlay="true" @close="branchShowclose"
keyName="name">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@confirm="branchConfirm1" @change="branchHandler" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
</u-picker>
<!-- 选择时间 -->
<block v-for="(item,i) in timeData" :key="i">
<u-datetime-picker :show="item.timeShow" v-model="item.timeVal" mode="datetime" :maxDate="1786778555000"
:minDate="timestamp" closeOnClickOverlay @confirm="timeConfirm($event,i)"
@cancel="item.timeShow = false" @close="item.timeShow = false"></u-datetime-picker>
</block>
</view>
</template>
<script>
import {
oaLeaveData
} from '@/static/server/server.js'
import {
oaUploads
} from '../../api/upload'
import {
Toast
} from '../../libs/uniApi'
import {
appfield,
getemployee,
userdepartment,
appapprove
} from '@/api/oa.js'
export default {
data() {
return {
defaultIndex: [0, 0, 0],
defaultIndex1: [0, 0, 0],
dataobj: {},
timestamp: '', //
flowPath: '', //
flow_id: '', // id
check_admin_name: '', //
check_admin_ids: '',
copy_names: '', //
copy_uids: '', // id
manHour: '', //
daysNum: '', //
content: '', //
flowPathShow: false,
flowPathSheet: [],
timeData: [{
title: '开始时间:',
timeShow: false,
timeVal: '', //
time: '', //
timeDay: '', //
timeHour: '', //
},
{
title: '结束时间:',
timeShow: false,
timeVal: '', //
time: '', //
timeDay: '', //
timeHour: '', //
}
],
leavaTypeShow: false,
leavaTypeVal: '',
leavaTypeId: '',
columns: [],
//
branchShow: false,
branchShow1: false,
branchColumns: [],
branchColumns1: [],
isflowDate: true,
flowDate: [],
fileArray: []
}
},
onLoad(option) {
this.applist(option.type)
this.getDocumentList()
},
onShow() {
// this.getFlow()
//
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
}
},
methods: {
async applist(type) {
let res = await appfield({
type: type
})
this.dataobj = res.data.field
const detailTypeOptions = Object.entries(res.data.field.detail_type.item).map(([id, name]) => ({
id,
name
}));
const detailTypeOptions1 = Object.entries(res.data.field.flow_id.item).map(([id, name]) => ({
id,
name
}));
this.columns = detailTypeOptions
this.flowPathSheet = detailTypeOptions1
},
//
async getDocumentList() {
const res = await userdepartment()
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
codelist[0] = res.data.map((item) => { //
return {
id: item.id,
name: item.title
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[1][0].id
})
codelist[2] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
this.$forceUpdate()
this.$nextTick(() => {
this.branchColumns = codelist
this.branchColumns1 = codelist
})
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.columns3[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.columns3, 2, newColumn);
}
}
},
//
async columnCode1(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.columns3[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.columns4, 2, newColumn);
}
}
},
branchShowclose(){
this.branchShow = false
},
branchShowclose1(){
this.branchShow1 = false
},
selectTime(item) {
item.timeShow = true
},
async branchHandler(e) {
const {
columnIndex,
value,
values, // values
index,
// pickerref
picker = this.$refs.branchRef
} = e
// ()
if (columnIndex === 0) {
// pickerthis
let res = await getEmployeeAPI({
did: value[0].id
})
if (res.length < 1) {
res[0] = {
name: '无'
}
}
picker.setColumnValues(1, res)
}
},
// 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.branchShow = false
},
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.branchShow1 = false
},
/** 请假类型 */
leavaType(e) {
this.leavaTypeVal = e.name
this.leavaTypeId = e.id
this.leavaTypeShow = false
},
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
this.getFlowUsers(value.id)
},
async getFlow() {
const flow = await getFlowAPI({
type: 1,
flow_cate: 1
})
this.flowPathSheet = flow
},
timeConfirm(e, i) {
this.timeData[i].time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
this.timeData[i].timeDay = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.timeData[i].timeHour = uni.$u.timeFormat(e.value, 'hh:MM')
this.timeData[i].timeShow = false
},
async submiteBtn() {
let fileIds = [];
this.fileArray.map((item, i) => {
fileIds.push(item.id)
});
let subData = {
detail_type: this.leavaTypeId,
start_time:this.timeData[0].timeDay+' '+ this.timeData[0].timeHour,
end_time:this.timeData[1].timeDay+' '+this.timeData[1].timeHour,
duration: this.manHour,
content: this.content,
check_admin_name:this.check_admin_name,
check_admin_ids:this.check_admin_ids,
flow_id: this.flow_id,
file_ids: fileIds.join(','),
copy_names: this.copy_names,
copy_uids: this.copy_uids,
type: '1',
id: 0,
file: ''
}
try {
const res = await appapprove(subData)
Toast('提交成功')
} catch (e) {
Toast('提交失败')
}
},
reset() {
this.flowPath = ''
this.flowDate = []
this.leavaTypeVal = ''
this.leavaTypeId = ''
this.daysNum = ''
this.timeData[0].time = ''
this.timeData[0].time = ''
this.timeData[1].time = ''
this.timeData[1].time = ''
this.manHour = ''
this.content = ''
this.flow_id = ''
this.check_admin_name= ''
this.check_admin_ids= ''
this.copy_names = ''
this.copy_uids = ''
},
seleckImage(i) {
let that = this
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: function(res) {
that.loading = true
let objImg = {}
objImg.filesize = res.tempFiles[0].size
objImg.admin_name = '马开明'
oaUploads(res.tempFilePaths[0], 'img').then(res => {
objImg.name = res.filename
that.fileArray.push(res)
that.loading = false
Toast('上传成功')
}).catch(err => {
Toast('上传失败')
that.loading = false
console.log('上传失败', err)
})
},
fail: function(err) {
Toast('添加失败')
console.log('失败', err)
}
});
},
delImg(i) {
let that = this
uni.showModal({
title: '删除图片',
content: '确定删除图片?',
success: res => {
if (res.confirm) {
that.fileArray.splice((i, 1))
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
},
/**
* 计算两个时间戳之间相差的小时数
* */
calculateLeaveDaysAndHours(leaveStartTime, leaveEndTime, hoursPerDay = 8) {
const startDate = new Date(leaveStartTime);
const endDate = new Date(leaveEndTime);
//
const leaveDays = Math.floor((endDate.getTime() - startDate.getTime()) / (24 * 60 * 60 * 1000)) + 1;
//
const leaveHours = leaveDays * hoursPerDay;
//
return {
leaveDays,
leaveHours,
};
}
},
filters: {
// MB
formatBytes(bytes, decimals = 2) {
if (bytes === 0) return '0 MB';
const k = 1024;
const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(decimals)) + ' ' + sizes[i];
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.leave_request {
position: relative;
padding-bottom: 100px;
}
.leave_box,
.flow_path {
width: 100%;
padding: 0 28.07rpx;
background: #fff;
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.bot_btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 87.72rpx;
>view {
width: 50%;
text-align: center;
line-height: 87.72rpx;
}
.reset {
background-color: #fff;
}
.submit_btn {
color: #fff;
height: 87.72rpx;
background: $theme-oa-color;
}
}
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
}
}
.cont_cell {
display: flex;
align-items: center;
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
.audit_process {
.process_item {
position: relative;
height: 100%;
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
color: #fff;
padding: 0 4px;
margin-left: 10.53rpx;
background-color: #3c9cff;
border-radius: 2px;
}
.verifier {
margin: 17.54rpx 0;
}
}
.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 {
padding: 17.54rpx;
background-color: #F7F7F7;
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;
}
}
</style>

264
pages/oaLogin/editpwd.vue Normal file
View File

@ -0,0 +1,264 @@
<template>
<view class="login">
<!-- <image class="bg-iamge" src="../../static/img/login/login_back_img.png"></image> -->
<hx-lottie :options="options" ref="lottie"
style="width: 100vw;height: 100vh;transform: scale(1.3);background-color: #3274F9;" />
<u-navbar v-if="uniMP" @leftClick="leftClick" bgColor="rgba(0,0,0,0)" leftIconColor=" #fff" :autoBack="false">
</u-navbar>
<!-- #ifdef APP-PLUS||H5 -->
<!-- <view style="height: var(--status-bar-height)"></view> -->
<!-- #endif -->
<view class="body">
<view class="title">欢迎进入OA</view>
<view class="login-card">
<view class="top">
<view class="text item">
<u-tabs :list="tabList" @click="changeTabs" lineColor="#3274F9"
itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;font-size: 32rpx;"></u-tabs>
</view>
<input class="mobile item" v-model="formData.old_pwd" maxlength="26" placeholder="输入旧密码" password
type="safe-password" />
<input class="mobile item" v-model="formData.pwd" maxlength="26" placeholder="输入新密码" password
type="safe-password" />
<input class="mobile item" v-model="formData.pwd_confirm" maxlength="26" placeholder="确认密码" password
type="safe-password" />
</view>
<button class="edit_btn" @click="login">修改密码</button>
</view>
</view>
</view>
</template>
<script>
import {
changePassword,
} from "@/api/oaUser.js"
import {
Toast
} from "../../libs/uniApi";
export default {
data() {
return {
options: {
data: '',
},
uniMP: false,
APP_token: '',
tabList: [{
name: '密码修改'
},
// {name:''},
],
current: 0,
formData: {
pwd_confirm: '',
pwd: '',
old_pwd: '',
},
};
},
onLoad() {
this.APP_token = uni.getStorageSync('APP_token');
},
onShow() {
if (uni.getStorageSync('uniMP')) this.uniMP = true;
},
methods: {
changeTabs(e) {
this.current = e.index;
this.formData.scene = e.index + 1;
},
leftClick(e) {
uni.sendHostEvent('closeApp', e, (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
},
async login() {
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('确认密码不能为空');
if (this.formData.scene == 1 && !this.formData.old_pwd == this.formData.pwd && !this.formData.pwd == this.formData.pwd_confirm &&
!this.formData.old_pwd == this.formData.pwd_confirm) return Toast('密码不一致,请确认后重新输入');
//
uni.showLoading({
title: '正在修改中'
})
let res = await changePassword(this.formData);
// console.log(res, '11111111')
Toast(res.msg)
if(res.code==0){
uni.switchTab({
url:'/pages/user/user'
})
}
uni.hideLoading()
},
},
}
</script>
<style lang="scss">
.login {
width: 100vw;
height: 100vh;
position: relative;
overflow: hidden;
background-color: $theme-oa-color;
/* #ifdef H5 */
// background-image: url("../../static/img/login/login_back_img.png");
background-color: $theme-oa-color;
/* #endif */
// .bg-iamge {
// width: 100vw;
// height: 100vh;
// position: absolute;
// z-index: -99;
// }
.body {
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
.title {
width: 694rpx;
height: 74rpx;
margin-top: 200rpx;
margin-bottom: 51rpx;
font-size: 53rpx;
font-weight: 500;
color: #ffffff;
line-height: 68rpx;
-webkit-background-clip: text;
}
::v-deep uni-input {
min-height: 0 !important;
}
.login-card {
width: 694rpx;
height: 723rpx;
background: #ffffff;
border-radius: 21rpx 21rpx 21rpx 21rpx;
opacity: 1;
box-sizing: border-box;
padding: 38.5rpx 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
.top {
display: flex;
justify-content: space-evenly;
flex-direction: column;
.item {
margin-bottom: 35rpx;
}
.text {
font-size: 32rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
line-height: 35rpx;
}
.mobile,
.code {
width: 613rpx;
height: 112rpx;
background: #f5f5f5;
border-radius: 56rpx 56rpx 56rpx 56rpx;
opacity: 1;
padding: 0 45.56rpx;
box-sizing: border-box;
font-size: 28rpx;
font-weight: 400;
color: #333;
line-height: 35rpx;
}
.code {
display: flex;
justify-content: space-between;
align-items: center;
input {
font-size: 28rpx;
}
.get-code {
color: $theme-oa-color;
}
}
.btn {
display: flex;
justify-content: space-between;
}
}
.submit_btn {
width: 613rpx;
height: 112rpx;
background: $theme-oa-color;
border-radius: 56rpx 56rpx 56rpx 56rpx;
opacity: 1;
text-align: center;
line-height: 112rpx;
color: #ffffff;
font-size: 35rpx;
font-weight: 500;
}
.edit_btn {
width: 613rpx;
height: 112rpx;
background: #f5f5f5;
border-radius: 56rpx 56rpx 56rpx 56rpx;
opacity: 1;
text-align: center;
line-height: 112rpx;
color: #333;
font-size: 35rpx;
font-weight: 500;
}
}
}
}
</style>

338
pages/oaLogin/oaLogin.vue Normal file
View File

@ -0,0 +1,338 @@
<template>
<view class="login">
<!-- <image class="bg-iamge" src="../../static/img/login/login_back_img.png"></image> -->
<hx-lottie :options="options" ref="lottie"
style="width: 100vw;height: 100vh;transform: scale(1.3);background-color: #3274F9;" />
<u-navbar v-if="uniMP" @leftClick="leftClick" bgColor="rgba(0,0,0,0)" leftIconColor=" #fff" :autoBack="false">
</u-navbar>
<!-- #ifdef APP-PLUS||H5 -->
<!-- <view style="height: var(--status-bar-height)"></view> -->
<!-- #endif -->
<view class="body">
<view class="title">欢迎进入OA</view>
<view class="login-card">
<view class="top">
<view class="text item">
<u-tabs :list="tabList" @click="changeTabs" lineColor="#3274F9"
itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;font-size: 32rpx;"></u-tabs>
</view>
<input @click="getId" class="mobile item" v-model="formData.username" type="tel"
placeholder="输入账号" />
<input style="width: 0;height: 0;opacity: 0;margin: 0;padding: 0;" v-model="formData.username"
type="tel" placeholder="输入账号" />
<input @click="getId" class="mobile item" v-model="formData.password" maxlength="26"
placeholder="输入密码" password type="safe-password" />
<!-- <input v-if="current == 1" class="mobile item" v-model="formData.account" placeholder="输入手机号" />
<view v-if="current == 1" class="code item">
<input placeholder="输入验证码" v-model="formData.code" maxlength="6" />
<u-code :seconds="seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-code>
<view class="get-code" @click="getCode">{{ tips }}</view>
</view>
<view class="btn">
</view> -->
</view>
<button class="submit_btn" @click="login">登录</button>
</view>
</view>
</view>
</template>
<script>
import {
loginAccount,
userInfo
} from "@/api/oaUser.js"
import {
Toast
} from "../../libs/uniApi";
import bj from "@/static/animation/bj2.json"
import encrypt from "@/utils/encrypt.js"
export default {
data() {
return {
options: {
data: '',
},
uniMP: false,
APP_token: '',
tabList: [{
name: '账号登录'
},
// {name:''},
],
current: 0,
formData: {
username: '',
password: '',
// code: '',
// terminal: 6, //6APP
// scene: 1,
// register_id: "",
// shop_token: ""
},
tips: '获取验证码',
// refCode: null,
seconds: 60,
};
},
onLoad() {
this.APP_token = uni.getStorageSync('APP_token');
this.options.data = bj;
// this.$refs.lottie.call('play');
this.initTerminal();
},
onShow() {
if (uni.getStorageSync('uniMP')) this.uniMP = true;
},
methods: {
changeTabs(e) {
this.current = e.index;
this.formData.scene = e.index + 1;
},
leftClick(e) {
uni.sendHostEvent('closeApp', e, (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
},
// id
getId() {
// #ifdef APP-PLUS
if (this.formData.register_id) return
// #endif
},
async login() {
if (!this.formData.username) return Toast('账号不能为空');
if (this.formData.scene == 1 && !this.formData.password) return Toast('密码不能为空');
if (this.formData.scene == 2 && !this.formData.code) return Toast('验证码不能为空');
this.formData.shop_token = uni.getStorageSync('APP_token');
let that = this;
uni.showLoading({
title: '正在登录中'
})
let res = await loginAccount(that.formData);
encrypt.encode('ACT', that.formData);
this.$store.commit('SET_USERINFO', {
user: data,
token: res.data.token
})
let {
data
} = await userInfo();
console.log(data,'11111111')
this.$store.commit('setUserInfo', data);
uni.hideLoading()
if (data.id) {
uni.showLoading({
mask: true,
title: '加载中'
})
// #ifdef APP-PLUS
return uni.switchTab({
url: '/pages/index/index',
success: () => {
uni.$emit('initOaTask'); //
uni.hideLoading()
}
})
// #endif
return uni.reLaunch({
url: '/pages/index/index',
success: () => {
uni.$emit('initOaTask'); //
uni.hideLoading()
}
})
} else uni.navigateTo({
url: '/pages/updatePassword/updatePassword'
});
},
initTerminal() {
// #ifndef APP-PLUS
this.formData.terminal = 6;
// #endif
uni.getSystemInfo({
success: (res) => {
const platform = res.platform.toLowerCase();
if (platform === 'ios') {
this.formData.terminal = 5;
} else if (platform === 'windows') {
this.formData.terminal = 4;
} else if (platform === 'mac') {
this.formData.terminal = 4;
}
}
})
// #ifdef H5
this.formData.terminal = 3;
// #endif
// #ifdef MP-WEIXIN
this.formData.terminal = 1;
// #endif
},
codeChange(text) {
this.tips = text;
},
getCode() {
if (this.$refs.uCode.canGetCode) {
//
uni.showLoading({
title: '正在获取验证码'
})
setTimeout(() => {
uni.hideLoading();
// this.start()
uni.$u.toast('验证码已发送');
//
this.$refs.uCode.start();
}, 2000);
} else {
uni.$u.toast('倒计时结束后再发送');
}
},
end() {
// uni.$u.toast('');
},
start() {
// uni.$u.toast('');
},
//
forgetPWD() {
Toast('暂未开放')
}
},
}
</script>
<style lang="scss">
.login {
width: 100vw;
height: 100vh;
position: relative;
overflow: hidden;
background-color: $theme-oa-color;
/* #ifdef H5 */
// background-image: url("../../static/img/login/login_back_img.png");
background-color: $theme-oa-color;
/* #endif */
// .bg-iamge {
// width: 100vw;
// height: 100vh;
// position: absolute;
// z-index: -99;
// }
.body {
position: absolute;
top: 45%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
.title {
width: 694rpx;
height: 74rpx;
margin-top: 200rpx;
margin-bottom: 51rpx;
font-size: 53rpx;
font-weight: 500;
color: #ffffff;
line-height: 68rpx;
-webkit-background-clip: text;
}
::v-deep uni-input {
min-height: 0 !important;
}
.login-card {
width: 694rpx;
height: 643rpx;
background: #ffffff;
border-radius: 21rpx 21rpx 21rpx 21rpx;
opacity: 1;
box-sizing: border-box;
padding: 38.5rpx 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
.top {
display: flex;
justify-content: space-evenly;
flex-direction: column;
.item {
margin-bottom: 35rpx;
}
.text {
font-size: 32rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
line-height: 35rpx;
}
.mobile,
.code {
width: 613rpx;
height: 112rpx;
background: #f5f5f5;
border-radius: 56rpx 56rpx 56rpx 56rpx;
opacity: 1;
padding: 0 45.56rpx;
box-sizing: border-box;
font-size: 28rpx;
font-weight: 400;
color: #333;
line-height: 35rpx;
}
.code {
display: flex;
justify-content: space-between;
align-items: center;
input {
font-size: 28rpx;
}
.get-code {
color: $theme-oa-color;
}
}
.btn {
display: flex;
justify-content: space-between;
}
}
.submit_btn {
width: 613rpx;
height: 112rpx;
background: $theme-oa-color;
border-radius: 56rpx 56rpx 56rpx 56rpx;
opacity: 1;
text-align: center;
line-height: 112rpx;
color: #ffffff;
font-size: 35rpx;
font-weight: 500;
}
}
}
}
</style>

545
pages/oaTask/oaTask.vue Normal file
View File

@ -0,0 +1,545 @@
<template>
<view class="content">
<view class="content-middle" :style="{'opacity':!screenShow?'0.4':''}">
<view class="content-middle-one">
<view class="middle-one">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='搜索关键字' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="search" @click="search">
搜索
</view>
<!-- <view class="content-middle-sai" @click="screen">
<view class="content-middle-saia">
<image src="../../static/images/saixuan1.png" mode="aspectFit"></image>
</view>
<view class="content-middle-saib">
筛选
</view>
</view> -->
</view>
</view>
<view class="content-middle-three" v-if="list.length>0">
<view class="middle-three">
<view class="middle-threeb" v-for="(items,j) in list" :key='j' @click="deleteDepartment(items.id)">
<liu-swipe-action :index="j" @clickItem="clickItem" :btnList='btnList'>
<view class="middle-threeb-title">
<view class="title">
{{items.director_name}}
</view>
<view class="title-status">
{{items.create_time}}
</view>
</view>
<view class="middle-threeba">
<view class="middle-threeb-a">
<view class="threeb-a-b">
<view class="name">任务主题<text>{{items.title}}</text></view>
<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="achor">{{items.name2}}</view> -->
<!-- <view class="middle-edit" @click="editpart(items)">
编辑
</view>
<view class="middle-delete" @click="clickItem(items)">
删除
</view> -->
</view>
</view>
<!-- <view class="middle-threeb-b">
{{items.name}}
</view> -->
</view>
</liu-swipe-action>
</view>
</view>
</view>
</view>
<view class="content-middle" :style="{'position':'absolute','top':0+'px','zIndex':999}" v-if="!screenShow">
<view class="content-middle-one">
<view class="middle-one">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='搜索任务状态、优先级、部门等' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="content-middle-sai" @click="screen" style="background-color: #3274F9;">
<view class="content-middle-saia">
<image src="../../static/images/saixuan.png" mode="aspectFit"></image>
</view>
<view class="content-middle-saib" style="color: #fff;">
筛选
</view>
</view>
</view>
<view class="content-middle-search-detail">
<view class="search-detail" v-for="(item,k) in klist" :key='k'>
<view class="search-detail-one">
<view class="name">
{{item.name}}
</view>
</view>
<view class="search-detail-two">
{{item.name1}}
</view>
</view>
</view>
</view>
</view>
<view class="content-middle-two">
<view class="middle-two-img">
<image src="@/static/images/ja2.png" mode="aspectFit"></image>
</view>
<view class="" @click="adddepart">新建任务</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
projecttasklist,
deleteproject_task
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
show: false,
btnList: [{
id: '1',
name: '编辑',
width: '100rpx',
height: '100rpx',
bgColor: '#5f92f7',
color: '#FFFFFF',
fontSize: '28rpx'
}, {
id: '2',
name: '删除',
height: '100rpx',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
keyword: '',
list: [],
klist: [],
screenShow: true
};
},
computed: {
httpRequestUrl() {
return HTTP_REQUEST_URL;
}
},
onLoad() {
},
onShow() {
this.initList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
async initList() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
await this.getDocumentList();
},
//
async getDocumentList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await projecttasklist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data?.data]
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addquest/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
if (data.id == 2) {
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(this.list[data.index].id)
}
}
})
} else {
this.editpart(this.list[data.index])
}
},
//
async deleteDepartment(id) {
const res = await deleteproject_task({
id: id
})
if (res.code == 0) {
this.initList()
}
Toast(res.msg);
},
taskDetail(item) {
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/addquest/index??type=' + 1 + "&data=" + item.id
})
},
//
search() {
this.initList()
},
//
setValue(e) {
this.keyword = e.detail.value
if (this.keyword.length == 0) {
this.initList()
}
}
}
};
</script>
<style lang="scss">
page {
padding-bottom: 88rpx;
}
.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;
background-color: #FFFFFF;
padding: 28rpx 28rpx;
.middle-three {
.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 {
height: 98rpx;
line-height: 98rpx;
border-bottom: 1px solid #CCCCCC;
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
.title {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.title-status {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
}
}
.middle-threeba {
display: flex;
justify-content: space-between;
.middle-threeb-a {
.threeb-a-b {
view {
margin-bottom: 20rpx;
}
.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: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
text {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #CCCCCC;
}
}
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
}
}
.middle-threeb-b {
height: 80rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
}
.content-middle-two {
width: 386rpx;
height: 70rpx;
line-height: 70rpx;
background: #3274F9;
border-radius: 60rpx 60rpx;
z-index: 99999;
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
display: flex;
margin: 0 auto;
margin-top: 25rpx;
.middle-two-img {
width: 23rpx;
height: 23rpx;
margin-left: 112rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
}
</style>

View File

@ -0,0 +1,384 @@
<template>
<view>
<view class="content-middle">
<view class="content-middle-title">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='搜索关键字' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="search">
搜索
</view>
</view>
<view class="content-middle-one">
<view class="middle-one" v-for="(item,j) in list" :key='j'>
<liu-swipe-action :index="j" @clickItem="clickItem" :btnList='btnList'>
<view class="middle-onea">
<view class="middle-onea-title">
{{item.name}}
</view>
<view class="middle-onea-time">
{{item.move_time}}
</view>
</view>
<view class="middle-oneb">
<view class="middle-oneb-a">
<view class="threeb-a-b">
<view class="achor">调出部门<text>{{item.adepartment}}</text></view>
<view class="achor">调入部门{{item.bdepartment}}</view>
<view class="achor">调动操作人{{item.admin}}</view>
</view>
</view>
</view>
</liu-swipe-action>
</view>
</view>
</view>
<view class="content-bootom" @click="adddepart">
<view class="content-bootom-one">
<image src="@/static/images/ja.png" mode=""></image>
</view>
<view class="content-bootom-two">添加人事调动记录</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
userpersonal,
// deleteuserposition
} from '@/api/oa.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
show: false,
btnList: [{
id: '1',
name: '编辑',
width: '100rpx',
height: '100rpx',
bgColor: '#5f92f7',
color: '#FFFFFF',
fontSize: '28rpx'
}, {
id: '2',
name: '删除',
height: '100rpx',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
keyword: '',
list: [],
};
},
onLoad() {
},
onShow() {
this.initList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
//
// async getDocumentList() {
// const res = await userpersonal({
// keyword: this.keyword
// })
// this.list = res.data.data
// console.log(res.data)
// },
async initList() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
await this.getDocumentList();
},
async getDocumentList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await userpersonal({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data?.data]
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addpersonneltransfer/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
if (data.id == 2) {
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(this.list[data.index].id)
this.initList()
}
}
})
} else {
this.editpart(this.list[data.index])
}
},
//
async deleteDepartment(id) {
const res = await deleteuserposition({
id: id
})
if (res.code == 0) {
this.getDocumentList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/addpersonneltransfer/index?type=' + 1 + "&data=" + encodeURIComponent(JSON
.stringify(
item))
})
},
setValue() {
}
}
};
</script>
<style lang="scss" scoped>
page {
position: relative;
}
.content-middle {
.content-middle-title {
width: 100%;
background-color: #FFFFFF;
padding-top: 20rpx;
display: flex;
.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-title {
height: 98rpx;
line-height: 98rpx;
background: #FFFFFF;
font-size: 35rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
padding-left: 28rpx;
color: #3274F9;
}
.content-middle-one {
margin-top: 26rpx;
.middle-one {
background-color: #FFFFFF;
padding: 28rpx 28rpx;
margin: 28rpx 20rpx;
.middle-onea {
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #CCCCCC;
padding-bottom: 20rpx;
.middle-onea-title {}
.middle-onea-time {}
}
.middle-oneb {
display: flex;
justify-content: space-between;
margin-top: 10rpx;
.middle-oneb-a {
display: flex;
.threeb-a-b {
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
}
}
.middle-oneb-b {
width: 80rpx;
height: 80rpx;
margin-top: 45rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
.content-bootom {
width: 485rpx;
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #3274F9;
border-radius: 60px 60px 60px 60px;
display: flex;
left: 50%;
margin-left: -252.5rpx;
position: absolute;
bottom: 150rpx;
z-index: 9999 !important;
position: fixed;
.content-bootom-one {
margin-left: 92rpx;
margin-top: 5rpx;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
.content-bootom-two {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
}
</style>

450
pages/project/index.vue Normal file
View File

@ -0,0 +1,450 @@
<template>
<view>
<view class="content-middle">
<view class="content-middle-title">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='搜索关键字' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="search" @click="search">
搜索
</view>
</view>
<view class="content-middle-one">
<view class="middle-one" v-for="(item,j) in list" :key='j'>
<liu-swipe-action :index="j" @clickItem="clickItem" :btnList='btnList'>
<view class="middle-onea">
<view class="middle-onea-title">
<!-- <view class="middle-onea-img">
<image :src="`${httpRequestUrl}`+item.thumb" mode=""></image>
</view> -->
<view class="middle-onea-txt">{{item.name}}</view>
</view>
<view class="middle-onea-time">
{{item.plan_time}}
</view>
</view>
<view class="middle-oneb">
<view class="middle-oneb-a">
<view class="threeb-a-b">
<view class="achor">当前阶段及负责人<text>{{item.step}}</text></view>
<!-- <view class="middle-edit" @click="editpart(item)">
编辑
</view>
<view class="middle-delete" @click="clickItem(item)">
删除
</view> -->
</view>
</view>
</view>
</liu-swipe-action>
</view>
</view>
</view>
<view class="content-bootom" @click="adddepart">
<view class="content-bootom-one">
<image src="@/static/images/ja.png" mode=""></image>
</view>
<view class="content-bootom-two">添加项目</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
projectlist,
deleteprojectview
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
show: false,
btnList: [{
id: '1',
name: '编辑',
width: '100rpx',
height: '100rpx',
bgColor: '#5f92f7',
color: '#FFFFFF',
fontSize: '28rpx'
}, {
id: '2',
name: '删除',
height: '100rpx',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
keyword: '',
list: [],
};
},
computed: {
httpRequestUrl() {
return HTTP_REQUEST_URL;
}
},
onLoad() {
},
onShow() {
this.initList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
async initList() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list2 = [];
await this.getDocumentList();
},
//
async getDocumentList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await projectlist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data?.data]
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addproject/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
if (data.id == 2) {
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(this.list[data.index].id)
this.initList()
}
}
})
} else {
this.editpart(this.list[data.index])
}
},
//
async deleteDepartment(id) {
const res = await deleteprojectview({
id: id
})
if (res.code == 0) {
this.initList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/addproject/index??type=' + 1 + "&data=" + item.id
})
},
//
search() {
this.initList()
},
//
setValue(e) {
this.keyword = e.detail.value
if (this.keyword.length == 0) {
this.initList()
}
}
}
};
</script>
<style lang="scss" scoped>
page {
position: relative;
}
.content-middle {
.content-middle-title {
width: 100%;
background-color: #FFFFFF;
padding-top: 20rpx;
display: flex;
.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-title {
height: 98rpx;
line-height: 98rpx;
background: #FFFFFF;
font-size: 35rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
padding-left: 28rpx;
}
.content-middle-one {
.middle-one {
background-color: #FFFFFF;
padding: 28rpx 28rpx;
margin: 28rpx 28rpx;
.middle-onea {
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #CCCCCC;
padding-bottom: 20rpx;
.middle-onea-title {
display: flex;
}
.middle-onea-img {
width: 50rpx;
height: 50rpx;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
}
}
}
.middle-oneb {
display: flex;
justify-content: space-between;
margin-top: 10rpx;
.middle-oneb-a {
.threeb-a-b {
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.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;
}
}
}
.middle-oneb-b {
width: 80rpx;
height: 80rpx;
margin-top: 45rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
.content-bootom {
width: 485rpx;
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #3274F9;
border-radius: 60px 60px 60px 60px;
display: flex;
left: 50%;
margin-left: -252.5rpx;
position: absolute;
bottom: 150rpx;
z-index: 9999 !important;
position: fixed;
.content-bootom-one {
margin-left: 142rpx;
margin-top: 5rpx;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
.content-bootom-two {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
}
</style>

430
pages/quest/index.vue Normal file
View File

@ -0,0 +1,430 @@
<template>
<view>
<view class="content-middle">
<view class="content-middle-title">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='搜索关键字' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="search" @click="search">
搜索
</view>
</view>
<view class="content-middle-one">
<view class="middle-one" v-for="(item,j) in list" :key='j'>
<view class="middle-onea">
<view class="middle-onea-title">
<!-- <view class="middle-onea-img">
<image :src="`${httpRequestUrl}`+item.thumb" mode=""></image>
</view> -->
<view class="middle-onea-txt">{{item.director_name}}</view>
</view>
<view class="middle-onea-time">
{{item.create_time}}
</view>
</view>
<view class="middle-oneb">
<view class="middle-oneb-a">
<view class="threeb-a-b">
<view class="achor">任务主题<text>{{item.title}}</text></view>
<view class="achor">工作类型<text>{{item.cate_name}}</text></view>
<view class="achor">关联项目<text>{{item.project_name}}</text></view>
<view class="achor">预估工时<text>{{item.plan_hours}}</text></view>
<view class="middle-edit" @click="editpart(item)">
编辑
</view>
<view class="middle-delete" @click="clickItem(item)">
删除
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="content-bootom" @click="adddepart">
<view class="content-bootom-one">
<image src="@/static/images/ja.png" mode=""></image>
</view>
<view class="content-bootom-two">添加任务</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
projecttasklist,
deleteproject_task
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
show: false,
btnList: [{
id: '2',
name: '删除',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
keyword: '',
list: [],
};
},
computed: {
httpRequestUrl() {
return HTTP_REQUEST_URL;
}
},
onLoad() {
},
onShow() {
this.initList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
async initList(){
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
await this.getDocumentList();
},
//
async getDocumentList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await projecttasklist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data?.data]
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addquest/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(data.id)
}
}
})
},
//
async deleteDepartment(id) {
const res = await deleteproject_task({
id: id
})
if (res.code == 0) {
this.initList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/addquest/index??type=' + 1 + "&data=" + item.id
})
},
//
search() {
this.getDocumentList()
},
//
setValue(e) {
this.keyword = e.detail.value
if (this.keyword.length == 0) {
this.getDocumentList()
}
}
}
};
</script>
<style lang="scss" scoped>
page {
position: relative;
}
.content-middle {
.content-middle-title {
width: 100%;
background-color: #FFFFFF;
padding-top: 20rpx;
display: flex;
.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-title {
height: 98rpx;
line-height: 98rpx;
background: #FFFFFF;
font-size: 35rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
padding-left: 28rpx;
}
.content-middle-one {
.middle-one {
background-color: #FFFFFF;
padding: 28rpx 28rpx;
margin: 28rpx 28rpx;
.middle-onea {
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #CCCCCC;
padding-bottom: 20rpx;
.middle-onea-title {
display: flex;
}
.middle-onea-img {
width: 50rpx;
height: 50rpx;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
}
}
}
.middle-oneb {
display: flex;
justify-content: space-between;
margin-top: 10rpx;
.middle-oneb-a {
.threeb-a-b {
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.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;
}
}
}
.middle-oneb-b {
width: 80rpx;
height: 80rpx;
margin-top: 45rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
.content-bootom {
width: 485rpx;
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #3274F9;
border-radius: 60px 60px 60px 60px;
display: flex;
left: 50%;
margin-left: -252.5rpx;
position: absolute;
bottom: 150rpx;
z-index: 9999 !important;
position: fixed;
.content-bootom-one {
margin-left: 142rpx;
margin-top: 5rpx;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
.content-bootom-two {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
}
</style>

View File

@ -0,0 +1,408 @@
<template>
<view class="content">
<view class="content-banner">
<view class="" v-for="(item,i ) in list" :key="i" @click="apparent(i)">
<view class="banner-name" :style="{'color':i==num?'#3274F9':''}">{{item.name}}</view>
<view class="banner-xian" v-if='i==num'></view>
</view>
</view>
<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'>
<view class="middle-one-title">
<view class="one-titlea">
<view class="name">
{{item.check_user}}
</view>
<view class="parment">
{{item.code}}
</view>
</view>
<view class="one-titleb"
:style="{'color':item.status==1?'#34A853':item.status==2?'#F9AA32':item.status==3?'#F02828':''}">
<text v-if='item.status==1'>已通过</text>
<text v-if='item.status==2'>待审批</text>
<text v-if='item.status==3'>审批拒绝</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>
</liu-swipe-action>
<!-- <view class="middle-edit" @click="editpart(item)">
编辑
</view>
<view class="middle-delete" @click="clickItem(item)">
删除
</view> -->
</view>
</view>
</view>
</view>
</template>
<script>
import {
Toast
} from '@/libs/uniApi.js'
import {
appexpenseindex,
apexpenselist,
appexpensecopy
} from '@/api/oa.js'
export default {
data() {
return {
title: 'Hello',
statusBarHeight: 0,
list: [{
name: '我发起的',
value: 8
}, {
name: '我处理的',
value: 8
},
{
name: '抄送给我的',
value: 8
}
],
list2: [],
num: 0,
btnList: [{
id: '1',
name: '编辑',
width: '100rpx',
height: '100rpx',
bgColor: '#5f92f7',
color: '#FFFFFF',
fontSize: '28rpx'
}, {
id: '2',
name: '删除',
height: '100rpx',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
}
},
onLoad() {
},
onShow() {
if (this.num == 0) {
this.initList()
} else if (this.num == 1) {
this.initList1()
} else {
this.initList2()
}
},
onReachBottom() {
if (this.num == 0) {
this.getlist()
} else if (this.num == 1) {
this.getlist1()
} else {
this.getlist2()
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
apparent(index) {
this.num = index
if (index == 0) {
this.initList()
} else if (index == 1) {
this.initList1()
} else {
this.initList2()
}
},
async initList() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list2 = [];
await this.getlist()
},
async initList1() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list2 = [];
await this.getlist1()
},
async initList2() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list3 = [];
await this.getlist2()
},
async getlist() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await appexpenseindex({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
// keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list2 = [...this.list2, ...res.data?.data]
console.log(this.list2)
},
async getlist1() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await apexpenselist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
// keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list2 = [...this.list2, ...res.data?.data]
},
async getlist2() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await appexpensecopy({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
// keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list2 = [...this.list2, ...res.data?.data]
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addquest/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
if (data.id == 2) {
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(data.id)
}
}
})
} else {
this.editpart(this.list2[data.index])
}
},
//
async deleteDepartment(id) {
const res = await deleteexpenseflow({
id: id
})
if (res.code == 0) {
this.loadConfig.status = "loading"
this.initList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/reimbursementapplication/index??type=' + item.type
})
},
tian(item) {
if (this.num == 1) {
uni.navigateTo({
url: '/pages/reimbursementapplication/handle?type=' + item.id
})
}else if (this.num == 2){
uni.navigateTo({
url: '/pages/reimbursementapplication/detail?type=' + item.id +'&num=0'
})
}else{
uni.navigateTo({
url: '/pages/reimbursementapplication/detail?type=' + item.id
})
}
}
}
}
</script>
<style lang='scss'>
.content-banner {
display: flex;
justify-content: space-between;
padding: 20rpx 40rpx;
.banner-name {
font-size: 32rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
.banner-xian {
width: 70rpx;
height: 5rpx;
margin: 10rpx auto;
background-color: #3274F9;
}
}
.content-middle {
.content-middle-one {
.middle-one {
width: 694rpx;
margin: 0 auto;
margin-bottom: 21rpx;
background: #FFFFFF;
padding: 0 25rpx;
padding-bottom: 25rpx;
.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;
}
.middle-one-title {
border-bottom: 1px solid #CCCCCC;
margin-bottom: 10rpx;
display: flex;
line-height: 82rpx;
justify-content: space-between;
.one-titlea {
display: flex;
.name {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.parment {
font-size: 25rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #3274F9;
margin-top: 5rpx;
margin-left: 10rpx;
}
}
.one-titleb {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
}
}
.middle-one-detail {
height: 90rpx;
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
.middle-one-time {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
}
}
}
</style>

View File

@ -0,0 +1,725 @@
<template>
<view class="leave_request">
<view class="leave_box">
<view class="cont_cell">
<view class="title">报销人</view>
<input type="text" v-model="personInfo.name" disabled placeholder="报销人">
</view>
<view class="cont_cell">
<view class="title">报销部门</view>
<input type="text" v-model="personInfo.department_name" disabled placeholder="报销部门">
</view>
<view class="cont_cell">
<view class="title">报销凭证编号</view>
<input type="text" v-model="listobj.code" placeholder="报销凭证编号">
</view>
<view class="cont_cell" @click="timeShow=true">
<view class="title">原始单据日期</view>
<input type="text" v-model="listobj.expense_time" disabled placeholder="始单据日期">
</view>
<view class="cont_cell" @click="timeShow1=true">
<view class="title">入账月份</view>
<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>
</view>
<view class="leave_box">
<view class="" v-for="(item,i) in list" :key='i'>
<view class="leava_type flex_a_c">
<view class="title">报销项目</view>
<input type="text" v-model="item.cate_title" placeholder="请选择" disabled @click="leavaShow(item,i)">
</view>
<view class="cont_cell">
<view class="title">报销金额</view>
<input type="text" v-model="item.amount" placeholder="报销金额">
</view>
<view class="cont_cell">
<view class="title">备注</view>
<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>
</view>
</view>
<view class="leave_box" style="padding-top: 100rpx;">
<!-- 附件 -->
<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>
<!-- <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">
<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'>
<!-- <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>
</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="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
<view class="cont_cell" @click="branchShow1 = true">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
</view>
</view>
<view class="bot_btn">
<view class="reset" @click="reset">重置</view>
<view class="submit_btn" @click="submiteBtn">立即提交</view>
</view>
<u-action-sheet :show="leavaTypeShow" keyName="name" :actions="columns" title="请选择"
@close="leavaTypeShow = false" @select="leavaType">
</u-action-sheet>
<u-action-sheet :show="leavaTypeShow1" keyName="name" :actions="actions4" title="请选择"
@close="leavaTypeShow1 = false" @select="leavaType1">
</u-action-sheet>
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@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">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
</u-picker>
<!-- 选择时间 -->
<u-datetime-picker :show="timeShow" mode="datetime" :maxDate="1786778555000" :minDate="timestamp"
closeOnClickOverlay @confirm="timeConfirm($event)" @cancel="timeShow = false"
@close="timeShow = 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>
</view>
</template>
<script>
import {
Toast
} from '../../libs/uniApi'
import {
getPersonInfoApi,
appexpensecate,
appexpenseflow,
userdepartment,
getemployee,
appexpense,
projectlist,
appexpenseview
} from '@/api/oa.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
} from '@/api/file.js'
export default {
components: {
lsjUpload
},
data() {
return {
defaultIndex: [0, 0, 0],
defaultIndex1: [0, 0, 0],
timestamp: '',
personInfo: {},
company: '',
listobj: {},
project: '',
timeShow: false,
timeShow1: false,
branchShow: false,
flowPathShow: false,
leavaTypeShow: false,
leavaTypeShow1: false,
branchColumns: [],
branchColumns1: [],
flowPathSheet: [],
actions4: [],
branchShow1: false,
flowPath: '',
columns: [],
check_admin_name: '',
copy_names: '',
list: [{
cate_title: "",
amount: '',
remarks: ''
}],
fileOption: {},
files: new Map(),
fileArray: [],
dnum: 0
}
},
onLoad(option) {
this.detail(option.type)
},
onShow() {
this.fileOption = {
url: FILE_URL,
name: 'file',
header: {
token: this.$store.state.app.token
}
},
//
this.timestamp = Date.parse(new Date());
this.getPersonInfo()
this.getlist()
this.getlist1()
this.getDocumentList()
this.getDocumentList1()
},
methods: {
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.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.listobj.flow_id = res.data.flows.id
this.listobj.ptid = res.data.detail.ptid
this.fileArray = res.data.detail.fileArray.map(function(obj) {
return {
name: obj.name,
filesize: obj.filesize
};
});
// console.log(this.fileArray,'11111111111', res.data.detail)
},
reset() {
this.list = [{
name: "",
num: ''
}],
this.listobj = {}
this.fileArray = []
this.copy_names = ''
this.flowPath = ''
this.check_admin_name = ''
},
async getDocumentList1() {
let res = await projectlist({
page: 1,
limit: 10000,
})
this.actions4 = res.data.data.map((step, index) => {
return {
name: step.name,
id: step.id,
};
});
console.log(this.actions4)
},
//
async getDocumentList() {
const res = await userdepartment()
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
codelist[0] = res.data.map((item) => { //
return {
id: item.id,
name: item.title
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[1][0].id
})
codelist[2] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
this.$forceUpdate()
this.$nextTick(() => {
this.branchColumns = codelist
this.branchColumns1 = codelist
this.branchColumns2 = codelist
})
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns, 2, newColumn);
}
}
},
//
async columnCode1(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns1[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns1, 2, newColumn);
}
}
},
//
leavaShow(item, i) {
this.dnum = i
this.leavaTypeShow = true
},
leavaShow1() {
this.leavaTypeShow1 = true
},
branchConfirm(e) {
console.log('confirm', e, e.value[2].name)
this.check_admin_name = e.value[2].name
this.listobj.check_admin_ids = e.value[2].id
this.branchShow = false
},
branchConfirm1(e) {
console.log('confirm', e, e.value[2].name)
if (this.listobj.copy_uids) {
this.listobj.copy_uids += e.value[2].id
} else {
this.listobj.copy_uids = e.value[2].id
}
this.copy_names += e.value[2].name + ','
this.branchShow1 = false
},
timeConfirm(e, i) {
this.listobj.expense_time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.timeShow = false
},
timeConfirm1(e, i) {
this.listobj.income_month = uni.$u.timeFormat(e.value, 'yyyy-mm')
this.timeShow1 = false
},
async submiteBtn() {
console.log(this.list)
let fileIds = [];
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.expense_id = this.list.map(item => item.id);
this.listobj.remarks = this.list.map(item => item.remarks);
this.listobj.flow_id = this.flow_id
if (this.fileArray.length > 0) {
this.listobj.file_ids = fileIds.join(',');
}
const res = await appexpense(this.listobj)
Toast('提交成功')
},
//
addleava() {
this.list.push({
name: "",
num: ''
})
},
deleteleava(item, index) {
if (this.list.length > 1) {
this.list.splice(0, 1)
} else {
Toast('不能删除')
}
},
//
async getPersonInfo() {
const res = await getPersonInfoApi()
this.personInfo = res.data
},
async getlist() {
const res = await appexpensecate()
// this.personInfo = res.data
const reformattedData = res.data.map(item => {
return {
name: item.title,
id: item.id
};
});
this.columns = reformattedData
},
async getlist1() {
const res = await appexpenseflow({})
this.flowPathSheet = res.data
console.log('个人信息2', res.data);
},
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
},
/** 类型 */
leavaType(e) {
this.list[this.dnum].cate_title = e.name
this.list[this.dnum].id = e.id
this.leavaTypeShow = false
},
leavaType1(e) {
this.project = e.name
this.listobj.ptid = e.id
this.leavaTypeShow1 = false
},
branchShowclose() {
this.branchShow = false
},
branchShowclose1() {
this.branchShow1 = false
},
/**
* 某文件上传结束回调(成功失败都回调)
* @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.$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(name) {
this.$refs.lsjUpload.upload(name);
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.leave_request {
position: relative;
padding-bottom: 100px;
}
.leave_box,
.flow_path {
width: 100%;
padding: 0 28.07rpx;
background: #fff;
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.bot_btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 87.72rpx;
>view {
width: 50%;
text-align: center;
line-height: 87.72rpx;
}
.reset {
background-color: #fff;
}
.submit_btn {
color: #fff;
height: 87.72rpx;
background: $theme-oa-color;
}
}
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
}
}
.cont_cell {
display: flex;
align-items: center;
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
.audit_process {
.process_item {
position: relative;
height: 100%;
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
color: #fff;
padding: 0 4px;
margin-left: 10.53rpx;
background-color: #3c9cff;
border-radius: 2px;
}
.verifier {
margin: 17.54rpx 0;
}
}
.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 {
padding: 17.54rpx;
background-color: #F7F7F7;
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;
}
}
</style>

View File

@ -0,0 +1,771 @@
<template>
<view class="leave_request">
<view class="leave_box">
<view class="cont_cell">
<view class="title">报销人</view>
<input type="text" v-model="personInfo.name" disabled placeholder="报销人">
</view>
<view class="cont_cell">
<view class="title">报销部门</view>
<input type="text" v-model="personInfo.department_name" disabled placeholder="报销部门">
</view>
<view class="cont_cell">
<view class="title">报销凭证编号</view>
<input type="text" v-model="listobj.code" placeholder="报销凭证编号">
</view>
<view class="cont_cell">
<view class="title">原始单据日期</view>
<input type="text" v-model="listobj.expense_time" disabled placeholder="始单据日期">
</view>
<view class="cont_cell">
<view class="title">入账月份</view>
<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>
</view>
<view class="leave_box">
<view class="" v-for="(item,i) in list" :key='i'>
<view class="leava_type flex_a_c">
<view class="title">报销项目</view>
<input type="text" v-model="item.cate_title" placeholder="请选择" disabled @click="leavaShow(item,i)">
</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>
<input type="text" v-model="item.remarks" placeholder="备注">
</view>
</view>
</view>
<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">
<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="leave_box" style="padding-top: 100rpx;" v-if="listobj.check_status!= 4&& ktype!=0">
<view class="cont_cell" style="padding-top: 20rpx;" >
<view class="title" style="width: 200rpx;">撤回意见</view>
<textarea v-model="mscontent" placeholder="请输入撤回意见" />
</view>
</view>
<view class="flow_path">
<view class="cont_cell">
<view class="title">审批流程</view>
</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="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>
</view>
<view class="cont_cell">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
</view>
</view>
<view class="" v-if="ktype!=0">
<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>
<u-action-sheet :show="leavaTypeShow" keyName="name" :actions="columns" title="请选择"
@close="leavaTypeShow = false" @select="leavaType">
</u-action-sheet>
<u-action-sheet :show="leavaTypeShow1" keyName="name" :actions="actions4" title="请选择"
@close="leavaTypeShow1 = false" @select="leavaType1">
</u-action-sheet>
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@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">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
</u-picker>
<!-- 选择时间 -->
<u-datetime-picker :show="timeShow" mode="datetime" :maxDate="1786778555000" :minDate="timestamp"
closeOnClickOverlay @confirm="timeConfirm($event)" @cancel="timeShow = false"
@close="timeShow = 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>
</view>
</template>
<script>
import {
Toast
} from '../../libs/uniApi'
import {
getPersonInfoApi,
appexpensecate,
appexpenseflow,
userdepartment,
getemployee,
appexpense,
projectlist,
appexpenseview,
appflow_check,
} from '@/api/oa.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
} from '@/api/file.js'
export default {
components: {
lsjUpload
},
data() {
return {
defaultIndex: [0, 0, 0],
defaultIndex1: [0, 0, 0],
timestamp: '',
personInfo: {},
company: '',
mscontent: '',
listobj: {},
project: '',
timeShow: false,
timeShow1: false,
branchShow: false,
flowPathShow: false,
leavaTypeShow: false,
leavaTypeShow1: false,
branchColumns: [],
branchColumns1: [],
flowPathSheet: [],
actions4: [],
branchShow1: false,
flowPath: '',
columns: [],
check_admin_name: '',
copy_names: '',
list: [{
cate_title: "",
amount: '',
remarks: ''
}],
fileOption: {},
files: new Map(),
fileArray: [],
dnum: 0,
check_record: [],
ktype:1
}
},
onLoad(option) {
this.detail(option.type)
this.ktype=option.num
},
onShow() {
this.fileOption = {
url: FILE_URL,
name: 'file',
header: {
token: this.$store.state.app.token
}
},
//
this.timestamp = Date.parse(new Date());
this.getPersonInfo()
this.getlist()
this.getlist1()
this.getDocumentList()
this.getDocumentList1()
},
methods: {
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.list = res.data.detail.list
this.listobj.expense_time = res.data.detail.expense_time
this.listobj.income_month = res.data.detail.income_month
this.check_admin_name = res.data.detail.check_user
this.copy_names = res.data.detail.copy_user
this.project = res.data.detail.ptname
this.listobj.flow_id = res.data.flows.id
this.listobj.ptid = res.data.detail.ptid
this.check_record = res.data.check_record
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
};
});
// console.log(this.fileArray,'11111111111', res.data.detail)
},
reset() {
this.list = [{
name: "",
num: ''
}],
this.listobj = {}
this.fileArray = []
this.copy_names = ''
this.flowPath = ''
this.check_admin_name = ''
},
async getDocumentList1() {
let res = await projectlist({
page: 1,
limit: 10000,
})
this.actions4 = res.data.data.map((step, index) => {
return {
name: step.name,
id: step.id,
};
});
console.log(this.actions4)
},
//
async getDocumentList() {
const res = await userdepartment()
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
codelist[0] = res.data.map((item) => { //
return {
id: item.id,
name: item.title
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[1][0].id
})
codelist[2] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
this.$forceUpdate()
this.$nextTick(() => {
this.branchColumns = codelist
this.branchColumns1 = codelist
this.branchColumns2 = codelist
})
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns, 2, newColumn);
}
}
},
//
async columnCode1(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns1[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns1, 2, newColumn);
}
}
},
bianjiBtn() {
uni.navigateTo({
url: '/pages/reimbursementapplication/bianji??type=' + this.listobj.id
})
},
//
leavaShow(item, i) {
this.dnum = i
this.leavaTypeShow = true
},
leavaShow1() {
this.leavaTypeShow1 = true
},
branchConfirm(e) {
console.log('confirm', e, e.value[2].name)
this.check_admin_name = e.value[2].name
this.listobj.check_admin_ids = e.value[2].id
this.branchShow = false
},
branchConfirm1(e) {
console.log('confirm', e, e.value[2].name)
if (this.listobj.copy_uids) {
this.listobj.copy_uids += e.value[2].id
} else {
this.listobj.copy_uids = e.value[2].id
}
this.copy_names += e.value[2].name + ','
this.branchShow1 = false
},
timeConfirm(e, i) {
this.listobj.expense_time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.timeShow = false
},
timeConfirm1(e, i) {
this.listobj.income_month = uni.$u.timeFormat(e.value, 'yyyy-mm')
this.timeShow1 = false
},
async submiteBtn() {
console.log(this.list)
let data = {
id: this.listobj.id,
type: 2,
// check_node: '',
check: 3,
content: this.mscontent,
// check_admin_ids: ''
}
let res = await appflow_check(data)
// console.log(res)
Toast(res.msg)
// const res = await appexpense(this.listobj)
Toast('提交成功')
},
//
addleava() {
this.list.push({
name: "",
num: ''
})
},
deleteleava(item, index) {
if (this.list.length > 1) {
this.list.splice(0, 1)
} else {
Toast('不能删除')
}
},
//
async getPersonInfo() {
const res = await getPersonInfoApi()
this.personInfo = res.data
},
async getlist() {
const res = await appexpensecate()
// this.personInfo = res.data
const reformattedData = res.data.map(item => {
return {
name: item.title,
id: item.id
};
});
this.columns = reformattedData
},
async getlist1() {
const res = await appexpenseflow({})
this.flowPathSheet = res.data
this.flowPath = res.data[0].name
this.flow_id = res.data[0].id
// console.log('2', res.data);
},
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
},
/** 类型 */
leavaType(e) {
this.list[this.dnum].cate_title = e.name
this.list[this.dnum].id = e.id
this.leavaTypeShow = false
},
leavaType1(e) {
this.project = e.name
this.listobj.ptid = e.id
this.leavaTypeShow1 = false
},
branchShowclose() {
this.branchShow = false
},
branchShowclose1() {
this.branchShow1 = false
},
/**
* 某文件上传结束回调(成功失败都回调)
* @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.$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(name) {
this.$refs.lsjUpload.upload(name);
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.leave_request {
position: relative;
padding-bottom: 100px;
}
.leave_box,
.flow_path {
width: 100%;
padding: 0 28.07rpx;
background: #fff;
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.bot_btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 87.72rpx;
>view {
width: 100%;
text-align: center;
line-height: 87.72rpx;
}
.reset {
background-color: #fff;
}
.submit_btn {
color: #fff;
height: 87.72rpx;
background: $theme-oa-color;
}
}
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
}
}
.cont_cell {
display: flex;
align-items: center;
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
.audit_process {
.process_item {
position: relative;
height: 100%;
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
color: #fff;
padding: 0 4px;
margin-left: 10.53rpx;
background-color: #3c9cff;
border-radius: 2px;
}
.verifier {
margin: 17.54rpx 0;
}
}
.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;
}
}
.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 {
padding: 17.54rpx;
background-color: #F7F7F7;
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;
}
}
</style>

View File

@ -0,0 +1,805 @@
<template>
<view class="leave_request">
<view class="leave_box">
<view class="cont_cell">
<view class="title">报销人</view>
<input type="text" v-model="personInfo.name" disabled placeholder="报销人">
</view>
<view class="cont_cell">
<view class="title">报销部门</view>
<input type="text" v-model="personInfo.department_name" disabled placeholder="报销部门">
</view>
<view class="cont_cell">
<view class="title">报销凭证编号</view>
<input type="text" v-model="listobj.code" placeholder="报销凭证编号">
</view>
<view class="cont_cell">
<view class="title">原始单据日期</view>
<input type="text" v-model="listobj.expense_time" disabled placeholder="始单据日期">
</view>
<view class="cont_cell">
<view class="title">入账月份</view>
<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>
</view>
<view class="leave_box">
<view class="" v-for="(item,i) in list" :key='i'>
<view class="leava_type flex_a_c">
<view class="title">报销项目</view>
<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>
<input type="text" v-model="item.remarks" placeholder="备注">
</view>
</view>
</view>
<view class="leave_box" style="padding-top: 100rpx;">
<!-- 附件 -->
<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 }}</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">
<view class="cont_cell">
<view class="title">审批流程</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'?'审核不通过':'撤销审核'}}
</view>
<view class="cont_cell">
<view class="title">审核人</view>
<input type="text" v-model="admin_name" placeholder="请选择" disabled>
</view>
<view class="cont_cell">
<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="" >
<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>
审核结束
</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">
<view class="title" style="width: 200rpx;">审核意见</view>
<textarea v-model="mscontent" placeholder="请输入审核意见" />
</view>
</view>
<view class="bot_btn">
<view class="reset" @click="appflowcheck()">拒绝</view>
<view class="submit_btn" @click=" appflowcheck1()">通过</view>
</view>
<u-action-sheet :show="leavaTypeShow" keyName="name" :actions="columns" title="请选择"
@close="leavaTypeShow = false" @select="leavaType">
</u-action-sheet>
<u-action-sheet :show="leavaTypeShow1" keyName="name" :actions="actions4" title="请选择"
@close="leavaTypeShow1 = false" @select="leavaType1">
</u-action-sheet>
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@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">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
</u-picker>
<!-- 选择时间 -->
<u-datetime-picker :show="timeShow" mode="datetime" :maxDate="1786778555000" :minDate="timestamp"
closeOnClickOverlay @confirm="timeConfirm($event)" @cancel="timeShow = false"
@close="timeShow = 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>
</view>
</template>
<script>
import {
Toast
} from '../../libs/uniApi'
import {
getPersonInfoApi,
appexpensecate,
appexpenseflow,
userdepartment,
getemployee,
appexpense,
projectlist,
appexpenseview,
appflow_check,
} from '@/api/oa.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
} from '@/api/file.js'
export default {
components: {
lsjUpload
},
data() {
return {
defaultIndex: [0, 0, 0],
defaultIndex1: [0, 0, 0],
timestamp: '',
personInfo: {},
company: '',
mscontent: '',
listobj: {},
project: '',
timeShow: false,
timeShow1: false,
branchShow: false,
flowPathShow: false,
leavaTypeShow: false,
leavaTypeShow1: false,
branchColumns: [],
branchColumns1: [],
flowPathSheet: [],
actions4: [],
branchShow1: false,
flowPath: '',
columns: [],
check_admin_name: '',
admin_name: '',
copy_names: '',
list: [{
cate_title: "",
amount: '',
remarks: ''
}],
fileOption: {},
files: new Map(),
fileArray: [],
dnum: 0,
check_record: [],
check:0,
}
},
onLoad(option) {
this.detail(option.type)
},
onShow() {
this.fileOption = {
url: FILE_URL,
name: 'file',
header: {
token: this.$store.state.app.token
}
},
//
this.timestamp = Date.parse(new Date());
this.getPersonInfo()
this.getlist()
this.getlist1()
this.getDocumentList()
this.getDocumentList1()
},
methods: {
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.list = res.data.detail.list
this.listobj.expense_time = res.data.detail.expense_time
this.listobj.income_month = res.data.detail.income_month
this.admin_name = res.data.detail.check_user
this.copy_names = res.data.detail.copy_user
this.project = res.data.detail.ptname
this.listobj.flow_id = res.data.flows.id
this.listobj.ptid = res.data.detail.ptid
this.check_record = res.data.check_record
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
};
});
// console.log(this.fileArray,'11111111111', res.data.detail)
},
reset() {
this.list = [{
name: "",
num: ''
}],
this.listobj = {}
this.fileArray = []
this.copy_names = ''
this.flowPath = ''
this.check_admin_name = ''
},
async getDocumentList1() {
let res = await projectlist({
page: 1,
limit: 10000,
})
this.actions4 = res.data.data.map((step, index) => {
return {
name: step.name,
id: step.id,
};
});
console.log(this.actions4)
},
//
async getDocumentList() {
const res = await userdepartment()
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
codelist[0] = res.data.map((item) => { //
return {
id: item.id,
name: item.title
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[1][0].id
})
codelist[2] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
this.$forceUpdate()
this.$nextTick(() => {
this.branchColumns = codelist
this.branchColumns1 = codelist
this.branchColumns2 = codelist
})
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns, 2, newColumn);
}
}
},
//
async columnCode1(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns1[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns1, 2, newColumn);
}
}
},
//
async appflowcheck() {
let data = {
id: this.listobj.id,
type: 2,
check_node: this.check,
content: this.mscontent,
check: 2,
check_admin_ids: this.listobj.check_admin_ids
}
let res = await appflow_check(data)
Toast(res.msg)
},
async appflowcheck1() {
console.log(this.listobj)
let data = {
id: this.listobj.id,
type: 2,
check_node: this.check,
check: 1,
content: this.mscontent,
check_admin_ids: this.listobj.check_admin_ids
}
let res = await appflow_check(data)
console.log(res)
if(res.code==0){
uni.navigateBack({
delta:1
})
}
Toast(res.msg)
},
bianjiBtn() {
uni.navigateTo({
url: '/pages/reimbursementapplication/bianji??type=' + this.listobj.id
})
},//
deliveryWayChangetwo1(e) {
console.log(e)
this.check = e.detail.value
},
//
leavaShow(item, i) {
this.dnum = i
this.leavaTypeShow = true
},
leavaShow1() {
this.leavaTypeShow1 = true
},
branchConfirm(e) {
console.log('confirm', e, e.value[2].name)
this.check_admin_name = e.value[2].name
this.listobj.check_admin_ids = e.value[2].id
this.branchShow = false
},
branchConfirm1(e) {
console.log('confirm', e, e.value[2].name)
if (this.listobj.copy_uids) {
this.listobj.copy_uids += e.value[2].id
} else {
this.listobj.copy_uids = e.value[2].id
}
this.copy_names += e.value[2].name + ','
this.branchShow1 = false
},
timeConfirm(e, i) {
this.listobj.expense_time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.timeShow = false
},
timeConfirm1(e, i) {
this.listobj.income_month = uni.$u.timeFormat(e.value, 'yyyy-mm')
this.timeShow1 = false
},
//
addleava() {
this.list.push({
name: "",
num: ''
})
},
deleteleava(item, index) {
if (this.list.length > 1) {
this.list.splice(0, 1)
} else {
Toast('不能删除')
}
},
//
async getPersonInfo() {
const res = await getPersonInfoApi()
this.personInfo = res.data
},
async getlist() {
const res = await appexpensecate()
// this.personInfo = res.data
const reformattedData = res.data.map(item => {
return {
name: item.title,
id: item.id
};
});
this.columns = reformattedData
},
async getlist1() {
const res = await appexpenseflow({})
this.flowPathSheet = res.data
this.flowPath = res.data[0].name
this.flow_id = res.data[0].id
// console.log('2', res.data);
},
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
},
/** 类型 */
leavaType(e) {
this.list[this.dnum].cate_title = e.name
this.list[this.dnum].id = e.id
this.leavaTypeShow = false
},
leavaType1(e) {
this.project = e.name
this.listobj.ptid = e.id
this.leavaTypeShow1 = false
},
branchShowclose() {
this.branchShow = false
},
branchShowclose1() {
this.branchShow1 = false
},
/**
* 某文件上传结束回调(成功失败都回调)
* @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.$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(name) {
this.$refs.lsjUpload.upload(name);
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.leave_request {
position: relative;
padding-bottom: 100px;
}
.leave_box,
.flow_path {
width: 100%;
padding: 0 28.07rpx;
background: #fff;
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.bot_btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 87.72rpx;
>view {
width: 50%;
text-align: center;
line-height: 87.72rpx;
}
.reset {
background-color: #fff;
}
.submit_btn {
color: #fff;
height: 87.72rpx;
background: $theme-oa-color;
}
}
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
}
}
.cont_cell {
display: flex;
align-items: center;
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
.audit_process {
.process_item {
position: relative;
height: 100%;
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
color: #fff;
padding: 0 4px;
margin-left: 10.53rpx;
background-color: #3c9cff;
border-radius: 2px;
}
.verifier {
margin: 17.54rpx 0;
}
}
.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;
}
}
.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 {
padding: 17.54rpx;
background-color: #F7F7F7;
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;
}
}
</style>

View File

@ -0,0 +1,718 @@
<template>
<view class="leave_request">
<view class="leave_box">
<view class="cont_cell">
<view class="title">报销人</view>
<input type="text" v-model="personInfo.name" disabled placeholder="报销人">
</view>
<view class="cont_cell">
<view class="title">报销部门</view>
<input type="text" v-model="personInfo.department_name" disabled placeholder="报销部门">
</view>
<view class="cont_cell">
<view class="title">报销凭证编号</view>
<input type="text" v-model="listobj.code" placeholder="报销凭证编号">
</view>
<view class="cont_cell" @click="timeShow=true">
<view class="title">原始单据日期</view>
<input type="text" v-model="listobj.expense_time" disabled placeholder="始单据日期">
</view>
<view class="cont_cell" @click="timeShow1=true">
<view class="title">入账月份</view>
<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>
</view>
<view class="leave_box">
<view class="" v-for="(item,i) in list" :key='i'>
<view class="leava_type flex_a_c">
<view class="title">报销项目</view>
<input type="text" v-model="item.cate_title" placeholder="请选择" disabled @click="leavaShow(item,i)">
</view>
<view class="cont_cell">
<view class="title">报销金额</view>
<input type="text" v-model="item.amount" placeholder="报销金额">
</view>
<view class="cont_cell">
<view class="title">备注</view>
<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>
</view>
</view>
<view class="leave_box" style="padding-top: 100rpx;">
<!-- 附件 -->
<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>
<!-- <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">
<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'>
<!-- <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>
</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="title">审核人</view>
<input type="text" v-model="check_admin_name" placeholder="请选择" disabled>
</view>
<view class="cont_cell" @click="branchShow1 = true">
<view class="title">抄送人</view>
<input type="text" v-model="copy_names" placeholder="请选择" disabled>
</view>
</view>
<view class="bot_btn">
<view class="reset" @click="reset">重置</view>
<view class="submit_btn" @click="submiteBtn">立即提交</view>
</view>
<u-action-sheet :show="leavaTypeShow" keyName="name" :actions="columns" title="请选择"
@close="leavaTypeShow = false" @select="leavaType">
</u-action-sheet>
<u-action-sheet :show="leavaTypeShow1" keyName="name" :actions="actions4" title="请选择"
@close="leavaTypeShow1 = false" @select="leavaType1">
</u-action-sheet>
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@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">
</u-picker>
<u-picker :show="branchShow1" :defaultIndex='defaultIndex1' ref="branchRef" :columns="branchColumns1"
@confirm="branchConfirm1" @change="columnCode1" :closeOnClickOverlay="true" @close="branchShowclose1"
keyName="name">
</u-picker>
<!-- 选择时间 -->
<u-datetime-picker :show="timeShow" mode="datetime" :maxDate="1786778555000" :minDate="timestamp"
closeOnClickOverlay @confirm="timeConfirm($event)" @cancel="timeShow = false"
@close="timeShow = 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>
</view>
</template>
<script>
import {
Toast
} from '../../libs/uniApi'
import {
getPersonInfoApi,
appexpensecate,
appexpenseflow,
userdepartment,
getemployee,
appexpense,
projectlist,
appexpenseview
} from '@/api/oa.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
} from '@/api/file.js'
export default {
components: {
lsjUpload
},
data() {
return {
defaultIndex: [0, 0, 0],
defaultIndex1: [0, 0, 0],
timestamp: '',
personInfo: {},
company: '',
listobj: {},
project: '',
timeShow: false,
timeShow1: false,
branchShow: false,
flowPathShow: false,
leavaTypeShow: false,
leavaTypeShow1: false,
branchColumns: [],
branchColumns1: [],
flowPathSheet: [],
actions4: [],
branchShow1: false,
flowPath: '',
columns: [],
check_admin_name: '',
copy_names: '',
list: [{
cate_title: "",
amount: '',
remarks: ''
}],
fileOption: {},
files: new Map(),
fileArray: [],
dnum: 0
}
},
onLoad(option) {
this.detail(option.type)
},
onShow() {
this.fileOption = {
url: FILE_URL,
name: 'file',
header: {
token: this.$store.state.app.token
}
},
//
this.timestamp = Date.parse(new Date());
this.getPersonInfo()
this.getlist()
this.getlist1()
this.getDocumentList()
this.getDocumentList1()
},
methods: {
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.list=res.data.detail.list
this.listobj.expense_time= res.data.detail.expense_time
this.listobj.income_month = res.data.detail.income_month
this.check_admin_name= res.data.detail.check_user
this.copy_names= res.data.detail.copy_user
this.project= res.data.detail.ptname
this.listobj.flow_id=res.data.flows.id
this.listobj.ptid= res.data.detail.ptid
},
reset() {
this.list = [{
name: "",
num: ''
}],
this.listobj = {}
this.fileArray = []
this.copy_names = ''
this.flowPath = ''
this.check_admin_name = ''
},
async getDocumentList1() {
let res = await projectlist({
page: 1,
limit: 10000,
})
this.actions4 = res.data.data.map((step, index) => {
return {
name: step.name,
id: step.id,
};
});
console.log(this.actions4)
},
//
async getDocumentList() {
const res = await userdepartment()
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
codelist[0] = res.data.map((item) => { //
return {
id: item.id,
name: item.title
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[1][0].id
})
codelist[2] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
this.$forceUpdate()
this.$nextTick(() => {
this.branchColumns = codelist
this.branchColumns1 = codelist
this.branchColumns2 = codelist
})
},
//
async columnCode(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns, 2, newColumn);
}
}
},
//
async columnCode1(e) {
if (e.columnIndex == 1) {
let arr1 = []
let dat = await getemployee({
did: this.branchColumns1[e.columnIndex][e.index].id
})
if (dat.data.length > 0) {
const newColumn = dat.data.map((item) => {
return {
id: item.id,
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.branchColumns1, 2, newColumn);
}
}
},
//
leavaShow(item, i) {
this.dnum = i
this.leavaTypeShow = true
},
leavaShow1() {
this.leavaTypeShow1 = true
},
branchConfirm(e) {
console.log('confirm', e, e.value[2].name)
this.check_admin_name = e.value[2].name
this.listobj.check_admin_ids = e.value[2].id
this.branchShow = false
},
branchConfirm1(e) {
console.log('confirm', e, e.value[2].name)
if (this.listobj.copy_uids) {
this.listobj.copy_uids += e.value[2].id
} else {
this.listobj.copy_uids = e.value[2].id
}
this.copy_names += e.value[2].name + ','
this.branchShow1 = false
},
timeConfirm(e, i) {
this.listobj.expense_time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.timeShow = false
},
timeConfirm1(e, i) {
this.listobj.income_month = uni.$u.timeFormat(e.value, 'yyyy-mm')
this.timeShow1 = false
},
async submiteBtn() {
console.log(this.list)
let fileIds = [];
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);
this.listobj.flow_id = this.flow_id
if (this.fileArray.length > 0) {
this.listobj.file_ids = fileIds.join(',');
}
const res = await appexpense(this.listobj)
Toast('提交成功')
},
//
addleava() {
this.list.push({
name: "",
num: ''
})
},
deleteleava(item, index) {
if (this.list.length > 1) {
this.list.splice(0, 1)
} else {
Toast('不能删除')
}
},
//
async getPersonInfo() {
const res = await getPersonInfoApi()
this.personInfo = res.data
},
async getlist() {
const res = await appexpensecate()
// this.personInfo = res.data
const reformattedData = res.data.map(item => {
return {
name: item.title,
id: item.id
};
});
this.columns = reformattedData
},
async getlist1() {
const res = await appexpenseflow({})
this.flowPathSheet = res.data
console.log('个人信息2', res.data);
},
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
},
/** 类型 */
leavaType(e) {
this.list[this.dnum].cate_title= e.name
this.list[this.dnum].id = e.id
this.leavaTypeShow = false
},
leavaType1(e) {
this.project = e.name
this.listobj.ptid = e.id
this.leavaTypeShow1 = false
},
branchShowclose() {
this.branchShow = false
},
branchShowclose1() {
this.branchShow1 = false
},
/**
* 某文件上传结束回调(成功失败都回调)
* @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.$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(name) {
this.$refs.lsjUpload.upload(name);
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.leave_request {
position: relative;
padding-bottom: 100px;
}
.leave_box,
.flow_path {
width: 100%;
padding: 0 28.07rpx;
background: #fff;
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.bot_btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 87.72rpx;
>view {
width: 50%;
text-align: center;
line-height: 87.72rpx;
}
.reset {
background-color: #fff;
}
.submit_btn {
color: #fff;
height: 87.72rpx;
background: $theme-oa-color;
}
}
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
}
}
.cont_cell {
display: flex;
align-items: center;
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
.audit_process {
.process_item {
position: relative;
height: 100%;
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
color: #fff;
padding: 0 4px;
margin-left: 10.53rpx;
background-color: #3c9cff;
border-radius: 2px;
}
.verifier {
margin: 17.54rpx 0;
}
}
.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 {
padding: 17.54rpx;
background-color: #F7F7F7;
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;
}
}
</style>

View File

@ -0,0 +1,423 @@
<template>
<view>
<view class="content-middle">
<view class="content-middle-title">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='搜索关键字' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="search" @click="search">
搜索
</view>
</view>
<view class="content-middle-one">
<view class="middle-one" v-for="(item,j) in list" :key='j'>
<view class="middle-onea">
<view class="middle-onea-title">
<view class="middle-onea-txt">{{item.admin_name}}</view>
</view>
<view class="middle-onea-time">
{{item.create_time}}
</view>
</view>
<view class="middle-oneb">
<view class="middle-oneb-a">
<view class="threeb-a-b">
<view class="achor">报销部门<text>{{item.department}}</text></view>
<view class="achor">报销凭证编号<text>{{item.code}}</text></view>
<view class="achor">报销总金额()<text>{{item.amount}}</text></view>
<view class="achor">打款人<text>{{item.pay_name}}</text></view>
<view class="achor">打款时间<text>{{item.pay_time}}</text></view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="content-bootom" @click="adddepart">
<view class="content-bootom-one">
<image src="@/static/images/ja.png" mode=""></image>
</view>
<view class="content-bootom-two">添加任务</view>
</view> -->
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
checkedlist,
deleteproject_task
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
show: false,
btnList: [{
id: '2',
name: '删除',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
keyword: '',
list: [],
};
},
computed: {
httpRequestUrl() {
return HTTP_REQUEST_URL;
}
},
onLoad() {
},
onShow() {
this.initList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
async initList(){
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
await this.getDocumentList();
},
//
async getDocumentList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await checkedlist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
keyword: this.keyword
})
console.log(res.msg.data)
this.loadConfig.status = "loadmore"
if (res.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.msg?.data]
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addquest/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(data.id)
}
}
})
},
//
async deleteDepartment(id) {
const res = await deleteproject_task({
id: id
})
if (res.code == 0) {
this.initList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/addquest/index??type=' + 1 + "&data=" + item.id
})
},
//
search() {
this.getDocumentList()
},
//
setValue(e) {
this.keyword = e.detail.value
if (this.keyword.length == 0) {
this.getDocumentList()
}
}
}
};
</script>
<style lang="scss" scoped>
page {
position: relative;
}
.content-middle {
.content-middle-title {
width: 100%;
background-color: #FFFFFF;
padding-top: 20rpx;
display: flex;
.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-title {
height: 98rpx;
line-height: 98rpx;
background: #FFFFFF;
font-size: 35rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
padding-left: 28rpx;
}
.content-middle-one {
.middle-one {
background-color: #FFFFFF;
padding: 28rpx 28rpx;
margin: 28rpx 28rpx;
.middle-onea {
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #CCCCCC;
padding-bottom: 20rpx;
.middle-onea-title {
display: flex;
}
.middle-onea-img {
width: 50rpx;
height: 50rpx;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
}
}
}
.middle-oneb {
display: flex;
justify-content: space-between;
margin-top: 10rpx;
.middle-oneb-a {
.threeb-a-b {
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.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;
}
}
}
.middle-oneb-b {
width: 80rpx;
height: 80rpx;
margin-top: 45rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
.content-bootom {
width: 485rpx;
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #3274F9;
border-radius: 60px 60px 60px 60px;
display: flex;
left: 50%;
margin-left: -252.5rpx;
position: absolute;
bottom: 150rpx;
z-index: 9999 !important;
position: fixed;
.content-bootom-one {
margin-left: 142rpx;
margin-top: 5rpx;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
.content-bootom-two {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
}
</style>

View File

@ -0,0 +1,400 @@
<template>
<view>
<view class="content-middle">
<view class="content-middle-title">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='搜索关键字' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="search" @click="search">
搜索
</view>
</view>
<view class="content-middle-one">
<view class="middle-one" v-for="(item,j) in list" :key='j'>
<view class="middle-onea">
<view class="middle-onea-title">
{{item.name}}
</view>
<view class="middle-onea-time">
{{item.quit_time}}
</view>
</view>
<view class="middle-oneb">
<view class="middle-oneb-a">
<view class="threeb-a-b">
<view class="achor">所在部门<text>{{item.department}}</text></view>
<view class="achor">职位{{item.position}}</view>
<view class="achor">部门负责人{{item.lead_admin}}</view>
<view class="achor">交接人{{item.connect_names}}</view>
<view class="textare-three">
<textarea :value="item.remark" placeholder="" />
</view>
<view class="middle-edit" @click="editpart(item)">
编辑
</view>
<view class="middle-delete" @click="clickItem(item)">
删除
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="content-bootom" @click="adddepart">
<view class="content-bootom-one">
<image src="@/static/images/ja.png" mode=""></image>
</view>
<view class="content-bootom-two">添加离职档案</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
leaveuserpersonal,
leavedelete
} from '@/api/oa.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
show: false,
btnList: [{
id: '2',
name: '删除',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
keyword: '',
list: [],
};
},
onShow() {
this.getDocumentList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
//
async getDocumentList() {
try {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await leaveuserpersonal({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data?.data]
} catch (e) {
this.loadConfig.status = "nomore"
}
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addresignationprofile/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(data.id)
}
}
})
},
//
async deleteDepartment(id) {
const res = await leavedelete({
id: id
})
if (res.code == 0) {
this.getDocumentList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/addresignationprofile/index?type=' + 1 + "&data=" + encodeURIComponent(JSON
.stringify(
item))
})
},
//
search() {
this.getDocumentList()
},
//
setValue(e) {
this.keyword = e.detail.value
if (this.keyword.length == 0) {
this.getDocumentList()
}
}
}
};
</script>
<style lang="scss" scoped>
page {
position: relative;
}
.content-middle {
.content-middle-title {
width: 100%;
background-color: #FFFFFF;
padding-top: 20rpx;
display: flex;
.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-title {
height: 98rpx;
line-height: 98rpx;
background: #FFFFFF;
font-size: 35rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
padding-left: 28rpx;
}
.content-middle-one {
.middle-one {
background-color: #FFFFFF;
padding: 28rpx 28rpx;
margin: 28rpx 28rpx;
.middle-onea {
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #CCCCCC;
padding-bottom: 20rpx;
}
.middle-oneb {
display: flex;
justify-content: space-between;
margin-top: 10rpx;
.middle-oneb-a {
.threeb-a-b {
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.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;
}
}
}
.middle-oneb-b {
width: 80rpx;
height: 80rpx;
margin-top: 45rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
.content-bootom {
width: 485rpx;
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #3274F9;
border-radius: 60px 60px 60px 60px;
display: flex;
left: 50%;
margin-left: -252.5rpx;
position: absolute;
bottom: 150rpx;
z-index: 9999 !important;
position: fixed;
.content-bootom-one {
margin-left: 92rpx;
margin-top: 5rpx;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
.content-bootom-two {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
}
</style>

515
pages/resources/index.vue Normal file
View File

@ -0,0 +1,515 @@
<template>
<view class="content">
<view class="content-middle" :style="{'opacity':!screenShow?'0.4':''}">
<view class="content-middle-one">
<view class="middle-one">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='点击搜索商品、店铺名称' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="content-middle-sai" @click="screen">
<view class="content-middle-saia">
<image src="../../static/images/saixuan1.png" mode="aspectFit"></image>
</view>
<view class="content-middle-saib">
筛选
</view>
</view>
</view>
</view>
<view class="content-middle-two">
<view class="middle-two" v-for="(item,i) in list" :key='i'>
<view class="middle-twoa">
<image :src="item.img" mode=""></image>
</view>
<view class="middle-twob">
{{item.name}}
</view>
</view>
</view>
<view class="content-middle-three">
<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="item.img" mode=""></image>
</view>
<view class="threeb-a-b">
<view class="name">{{item.department}} <text>({{item.name}})</text></view>
<view class="achor">{{item.position}}</view>
</view>
</view>
<view class="middle-threeb-b" @click="editpart(item)">
<image src="@/static/images/bianji.png" mode=""></image>
</view>
</view>
</liu-swipe-action>
</view>
</view>
</view>
<view class="content-middle" :style="{'position':'absolute','top':0+'px','zIndex':999}" v-if="!screenShow">
<view class="content-middle-one">
<view class="middle-one">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='searchValue' placeholder='点击搜索商品、店铺名称'
placeholder-class='placeholder' @input="setValue"></input>
</view>
<view class="content-middle-sai" @click="screen" style="background-color: #3274F9;">
<view class="content-middle-saia">
<image src="../../static/images/saixuan.png" mode="aspectFit"></image>
</view>
<view class="content-middle-saib" style="color: #fff;">
筛选
</view>
</view>
</view>
<view class="content-middle-search-detail">
<view class="search-detail">
<view class="search-detail-one">
<view class="name">
员工状态
</view>
</view>
<view class="search-detail-two">
正常登陆
</view>
</view>
<view class="search-detail">
<view class="search-detail-one">
<view class="name">
员工状态
</view>
</view>
<view class="search-detail-two">
正常登陆
</view>
</view>
</view>
</view>
</view>
<view class="content-bootom" @click="adddepart">
<view class="content-bootom-one">
<image src="@/static/images/ja.png" mode=""></image>
</view>
<view class="content-bootom-two">添加企业员工</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
comanyerlist,
leavedelete
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
name: '人力资源',
keyword: '',
list: [{
name: '请假申请',
img: require('@/static/images/s2.png')
}, {
name: '出差申请',
img: require('@/static/images/s4.png')
}, {
name: '请假申请',
img: require('@/static/images/s3.png')
}, {
name: '采购申请',
img: require('@/static/images/s5.png')
}],
list2: [],
btnList: [{
id: '2',
name: '删除',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
merchantData: {
},
screenShow: true
};
},
onLoad() {
},
onShow() {
this.initList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
screen() {
this.screenShow = !this.screenShow
},
async initList() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list2 = [];
await this.getDocumentList();
},
//
async getDocumentList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await comanyerlist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
keyword: this.keyword
})
console.log(res.data.data)
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list2 = [...this.list2, ...res.data?.data]
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addemployees/index?type=' + 0
})
},
//
clickItem(data) {
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(data.id)
}
}
})
},
//
async deleteDepartment(id) {
const res = await leavedelete({
id: id
})
if (res.code == 0) {
this.getDocumentList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/addemployees/index?type=' + 1 + "&data=" + item.id
})
},
//
search() {
this.getDocumentList()
},
//
setValue(e) {
this.keyword = e.detail.value
if (this.keyword.length == 0) {
this.getDocumentList()
}
}
}
};
</script>
<style lang="scss">
page {
padding-bottom: 88rpx;
}
.content-middle {
.content-middle-one {
.middle-one {
display: flex;
background-color: #FFFFFF;
padding: 28rpx 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-two {
margin-bottom: 25rpx;
display: flex;
background-color: #FFFFFF;
padding: 28rpx 28rpx;
.middle-two {
width: 25%;
text-align: center;
.middle-twoa {
width: 120rpx;
height: 120rpx;
margin: 0 auto;
image {
width: 100%;
height: 100%;
}
}
.middle-twob {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
}
}
.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;
font-weight: bold;
color: #3274F9;
margin-bottom: 30rpx;
}
.middle-threeb {
display: flex;
justify-content: space-between;
.middle-threeb-a {
display: flex;
.threeb-a-a {
width: 98rpx;
height: 98rpx;
border-radius: 11rpx 11rpx;
margin-right: 25rpx;
image {
width: 100%;
height: 100%;
}
}
.threeb-a-b {
.name {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
text {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #CCCCCC;
}
}
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
}
}
.middle-threeb-b {
width: 80rpx;
height: 80rpx;
margin-top: 45rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
.content-bootom {
width: 485rpx;
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #3274F9;
border-radius: 60px 60px 60px 60px;
display: flex;
left: 50%;
margin-left: -252.5rpx;
position: absolute;
bottom: 150rpx;
z-index: 9999 !important;
position: fixed;
.content-bootom-one {
margin-left: 92rpx;
margin-top: 5rpx;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
.content-bootom-two {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
}
</style>

314
pages/structure/index.vue Normal file
View File

@ -0,0 +1,314 @@
<template>
<view>
<view class="content-middle" v-for="(item,k) in list" :key='k'>
<view class="content-middle-title">
<view class="title">{{item.title}}</view>
</view>
<view class="content-middle-one">
<view class="middle-one">
<view class="" v-for="(items,j) in item.children" :key='j'>
<liu-swipe-action :index="k" @clickItem="clickItem(items)" :btnList='btnList'>
<view class="middle-oneb">
<view class="middle-oneb-a">
<view class="threeb-a-a">
<image :src="items.img" mode=""></image>
</view>
<view class="threeb-a-b">
<view class="name"> <text>{{items.title}}</text></view>
<view class="achor">{{items.remark}}{{item.phone}}</view>
</view>
</view>
<view class="middle-oneb-b" @click="editpart(items)">
<image src="@/static/images/bianji.png" mode=""></image>
</view>
</view>
</liu-swipe-action>
</view>
</view>
</view>
</view>
<view class="content-bootom" @click="adddepart">
<view class="content-bootom-one">
<image src="@/static/images/ja.png" mode=""></image>
</view>
<view class="content-bootom-two">添加部门</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
userdepartment,
deletedepartment
} from '@/api/oa.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
show: false,
btnList: [{
id: '2',
name: '删除',
width: '100rpx',
bgColor: '#ed656d',
color: '#FFFFFF',
fontSize: '28rpx'
}],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
searchValue: '',
list: [],
list2: [{
title: '企业员工',
list: [{
name: '企业员',
img: require('@/static/images/s5.png'),
name1: '企业员',
name2: '人事总监-18864942526',
}]
}, ],
dataobj: {}
};
},
onShow() {
this.initList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
async initList() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list1 = [];
await this.getDocumentList();
},
//
async getDocumentList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await userdepartment({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
})
this.loadConfig.status = "loadmore"
if (res.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res?.data]
},
//
adddepart() {
uni.navigateTo({
url: '/pages/adddepartment/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(data.id)
}
}
})
},
//
async deleteDepartment(id) {
const res = await deletedepartment({
id: id
})
console.log(res, res.msg)
if (res.code == 0) {
this.getDocumentList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/adddepartment/index?type=' + 1 + "&data=" + encodeURIComponent(JSON.stringify(
item))
})
},
setValue() {
}
}
};
</script>
<style lang="scss" scoped>
page {
position: relative;
}
.content-middle {
.content-middle-title {
height: 98rpx;
line-height: 98rpx;
background: #FFFFFF;
font-size: 35rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
padding-left: 28rpx;
color: #3274F9;
}
.content-middle-one {
margin-top: 26rpx;
background-color: #FFFFFF;
padding: 28rpx 28rpx;
.middle-one {
.middle-onea {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #3274F9;
margin-bottom: 30rpx;
}
.middle-oneb {
display: flex;
justify-content: space-between;
.middle-oneb-a {
display: flex;
.threeb-a-a {
width: 98rpx;
height: 98rpx;
border-radius: 11rpx 11rpx;
margin-right: 25rpx;
image {
width: 100%;
height: 100%;
}
}
.threeb-a-b {
.name {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #333333;
text {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #CCCCCC;
}
}
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
}
}
.middle-oneb-b {
width: 80rpx;
height: 80rpx;
margin-top: 45rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
.content-bootom {
width: 485rpx;
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #3274F9;
border-radius: 60px 60px 60px 60px;
display: flex;
left: 50%;
margin-left: -252.5rpx;
position: absolute;
bottom: 150rpx;
z-index: 9999 !important;
position: fixed;
.content-bootom-one {
margin-left: 152rpx;
margin-top: 5rpx;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
.content-bootom-two {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
}
</style>

444
pages/user/user.vue Normal file
View File

@ -0,0 +1,444 @@
<template>
<view class="my">
<view class="head_box" style="position: relative;">
<!-- #ifdef APP-PLUS||H5 -->
<view style="height: var(--status-bar-height)"></view>
<!-- #endif -->
<view class="personage">
<view class="my_msg ">
<view class="my_msg-con">
<u--image :showLoading="true" :src="`${HTTP_IMG_URL}${oaUserInfo.thumb}`" width="130.28rpx"
height="130.28rpx" shape="circle" v-if="oaUserInfo.thumb">
</u--image>
<u--image :showLoading="true" v-else src="@/static/img/public/avatar.png" width="130.28rpx"
height="130.28rpx" shape="circle">
</u--image>
<view @click="login" class="name_work" v-if="!$store.state.app.token">
<view class="name">
<text class="nickname">立即登录</text>
</view>
<view class="work">
登录后可查看更多
</view>
</view>
<view class="name_work" style="margin-top: 10rpx;" v-else>
<view class="name">
<text class="nickname">姓名:{{ oaUserInfo.nickname }}</text>
</view>
<view class="work">
<view class="wr_item">
<view class="wr_t_left">(技术部):</view>
<view class="wr_t_right">技术专业</view>
</view>
</view>
</view>
</view>
<view class="compile" @click="navTo('/pages/users/myInformation/index')">
<view class="iconfont icon-bianji"></view>
<view class="">编辑</view>
</view>
</view>
<!-- <view class="my_class">
<view class="my_class-con" v-for="(item,i) in list" :key="i" @click="navTo(item.paths)">
<view class="name">{{item.value}}</view>
<view class="title">{{item.title}}</view>
</view>
</view> -->
</view>
</view>
<view class="other_guide">
<block v-for="(item,i) in myOaData" :key="i">
<view class="other_item" @click="navTo(item.paths)">
<view class="other_item-con">
<!-- <view class="iconfont2" :class="item.icon"></view> -->
<image :src="item.icon"></image>
<view class="text">{{ item.name }}</view>
</view>
<view class="iconfont icon-xiangyou"></view>
</view>
</block>
</view>
<view class="log_out" v-if="$store.state.app.token" @click="modelShow=true">退出登录</view>
<view class="log_out" v-else @click="login">登录账号</view>
<u-modal :show="modelShow" title="警告" content='确定要退出登录吗' closeOnClickOverlay showCancelButton
@close="modelShow=false" @cancel="modelShow=false" @confirm="logout"></u-modal>
</view>
</template>
<script>
// import bj from "@/static/animation/home.json"
import {
mapActions
} from 'vuex'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
userInfo
} from '@/api/oaUser.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
options: {
data: '',
},
uniMP: false,
myOaData: [{
name: '工资详情',
icon: require('@/static/images/w1.png'),
paths: '/pages/users/salarydetails/index'
}, {
name: '公示文档',
icon: require('@/static/images/w2.png'),
paths: '/pages/users/user_document/index'
},
// {
// 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/oaLogin/editpwd'
}
],
// list: [{
// title: '',
// value: 10,
// paths: '/pages/users/user_document/index'
// },
// {
// title: '',
// value: 1000,
// paths: '/pages/users/user_document/index'
// },
// {
// title: '',
// value: 1000,
// paths: '/pages/users/user_document/index'
// }
// ],
src: 'https://cdn.uviewui.com/uview/album/1.jpg',
modelShow: false,
HTTP_IMG_URL: ''
}
},
onLoad() {
// this.options.data = bj;
this.HTTP_IMG_URL = HTTP_REQUEST_URL
},
onShow() {
if (uni.getStorageSync('uniMP')) this.uniMP = true;
this.getOaUserInfo();
},
onHide() {
this.modelShow = false;
},
computed: {
eyeType() {
return this.$store.state.config.eyeType;
},
oaUserInfo() {
return this.$store.state.app.userInfo
},
},
watch: {
modelShow: function(n, o) {
}
},
methods: {
leftClick(e) {
uni.sendHostEvent('closeApp', e, (ret) => {
//
console.log('关闭应用' + JSON.stringify(ret));
});
},
login() {
uni.reLaunch({
url: '/pages/oaLogin/oaLogin'
})
},
logout() {
let that = this;
uni.reLaunch({
url: '/pages/oaLogin/oaLogin?clear=' + true,
success() {
that.$store.commit('CLEAR');
}
})
},
async getOaUserInfo() {
const res = await userInfo();
this.$store.commit('setUserInfo', res.data);
uni.stopPullDownRefresh()
},
navTo(url) {
if (url) {
uni.showLoading({
title: '加载中',
mask: true
});
uni.navigateTo({
url: url,
success() {
uni.hideLoading()
},
fail(e) {
uni.hideLoading()
console.log(e);
},
})
} else Toast('暂未开放')
},
alterMyInfo() {
uni.navigateTo({
url: '/pages/views/personal_center'
})
}
},
onPullDownRefresh() {
this.getOaUserInfo()
}
}
</script>
<style lang="scss">
.my {
padding-bottom: 160rpx;
.head_box {
position: relative;
width: 100vw;
height: 534rpx;
margin-bottom: 30rpx;
background: #3274F9;
}
}
.my_head {
height: 90.39rpx;
position: relative;
.department {
// padding-top: 38.6rpx;
font-size: 31.58rpx;
color: #fff;
.section {
margin-right: 57.89rpx;
}
}
}
.personage {
// position: relative;
padding-bottom: 28rpx;
border-radius: 12px;
// background-color: #fff;
color: #fff;
width: 694rpx;
margin-left: 50%;
transform: translate(-50%);
.name_work {
margin-left: 31.58rpx;
font-size: 28.07rpx;
.name {
.nickname {
font-size: 32rpx;
font-weight: 500;
margin-right: 30rpx;
}
}
.work {
margin-top: 14.04rpx;
.wr_item {
display: flex;
.wr_t_left {
flex-shrink: 0;
margin-right: 12rpx;
}
}
}
.omit {
white-space: nowrap;
/* 禁止换行 */
overflow: hidden;
/* 溢出隐藏 */
text-overflow: ellipsis;
/* 使用省略号代表被截断的文本 */
}
}
.my_msg {
display: flex;
justify-content: space-between;
padding-top: 150rpx;
.compile {
display: flex;
flex-direction: column;
align-items: center;
margin-right: 30rpx;
}
.my_msg-con {
display: flex;
}
}
.my_class {
width: 694rpx;
height: 170rpx;
background: rgba(255, 255, 255, 0.17);
border-radius: 21rpx 21rpx;
margin-top: 53rpx;
display: flex;
.my_class-con {
width: 33.3%;
text-align: center;
.name {
ont-size: 39px;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
margin-top: 32rpx;
margin-bottom: 21rpx;
margin-left: -10rpx;
}
.title {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
}
}
.assess {
height: 170.18rpx;
}
.ass_cent {
width: 100%;
padding: 31.58rpx 66.67rpx;
position: absolute;
left: 0;
bottom: 0;
height: 170.18rpx;
border-radius: 12px;
background-color: rgba(#fff, 0.18);
justify-content: space-around;
.cent_item {
font-size: 24.56rpx;
color: #fff;
text-align: center;
.num {
font-size: 38.6rpx;
margin-bottom: 21.05rpx;
}
}
}
}
.other_guide {
width: 694.74rpx;
margin: 0 auto;
padding: 28.07rpx;
background-color: #fff;
border-radius: 12px;
.other_item {
display: flex;
justify-content: space-between;
height: 87.72rpx;
line-height: 87.72rpx;
border-bottom: 1px solid #F0F5F7;
.other_item-con {
display: flex;
.text {
font-size: 28.07rpx;
margin-left: 20.56rpx;
}
image {
width: 42rpx;
height: 42rpx;
margin: auto 0;
}
}
.left {
align-items: center;
}
.iconfont2 {
font-size: 42.11rpx;
}
}
}
.log_out {
color: #fff;
border-radius: 100px;
text-align: center;
line-height: 84.21rpx;
margin: 0 auto;
margin-top: 84.21rpx;
width: 694rpx;
height: 84.21rpx;
background: #3274F9;
box-shadow: 0px 9px 26px 1px #E9EFF5;
}
</style>

View File

@ -0,0 +1,58 @@
<template>
<view class="con-detail">
<view class="detail">
<view class="title">
{{detail.title}}
</view>
<view class="content">
<jyf-parser :html="detail.content" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
</view>
</view>
</template>
<script>
import parser from "@/components/jyf-parser/jyf-parser"
export default {
components:{
parser
},
data() {
return {
detail:{},
tagStyle: {
img: 'width:100%;display:block;',
},
};
},
onLoad(options) {
this.detail = JSON.parse(decodeURIComponent(options.data));
},
onShow() {
},
methods:{
}
}
</script>
<style lang="scss">
.con-detail{
.title{
text-align: center;
font-size: 30rpx;
font-weight: 700;
margin-top: 30rpx;
}
.content{
margin:20rpx 20rpx;
}
}
</style>

View File

@ -0,0 +1,276 @@
<template>
<!-- 公司公示文档 -->
<view class="all_box">
<view class="content-middle-title">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='搜索关键字' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="search" @click="search">
搜索
</view>
</view>
<!-- 公司公告详情 -->
<view class="notice_box" v-for="item in list" :key="item.id">
<view class="title">{{item.title}}</view>
<view class="row"></view>
<view class="info">{{item.desc}}
</view>
<view class="notice_bottom">
<view class="n_left">
<!--<text class="chapter">{{item.sections}}</text>
<text>浏览{{item.is_share}}</text> -->
</view>
<view class="n_right">
<view class="btn" @click="detail(item)">详情</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { articleindex ,articleview } from '@/api/oa.js'
export default {
data() {
return {
keyword: '',
list: [],
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
keyword: '',
};
},
onLoad() {
},
onShow() {
this.initList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
//
search() {
this.getDocumentList()
},
//
setValue(e) {
this.keyword = e.detail.value
if (this.keyword.length == 0) {
this.getDocumentList()
}
},
async initList(){
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
await this.getDocumentList();
},
//
async getDocumentList() {
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await articleindex({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data?.data]
},
//
detail(item){
uni.navigateTo({
url:'/pages/users/article/detail?data='+ encodeURIComponent(JSON.stringify(item))
})
}
}
}
</script>
<style lang="scss" scoped>
/deep/.u-search {
width: 527rpx;
}
/deep/.u-search__action--active {
display: none;
}
.content-middle-title {
width: 100%;
background-color: #FFFFFF;
padding-top: 20rpx;
padding-bottom: 20rpx;
display: flex;
padding-left: 20rpx;
.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;
}
}
}
.all_box{
padding-bottom: 21rpx;
}
.nav_box {
width: 750rpx;
height: 98rpx;
background: #FFFFFF;
.task_box {
margin: 0 auto;
width: 750rpx;
height: 98rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 28rpx;
.newly_built {
width: 149rpx;
height: 63rpx;
background: #34A853;
border-radius: 35rpx;
color: #fff;
text-align: center;
line-height: 63rpx;
margin-left: 17.5rpx;
}
}
}
.notice_box {
margin: 0 auto;
margin-top: 21rpx;
width: 694rpx;
// height: 342rpx;
background: #FFFFFF;
border-radius: 7rpx;
padding: 0 24.5rpx;
padding-bottom: 25rpx;
padding-top: 24.5rpx;
.title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 624rpx;
height: 44rpx;
font-size: 32rpx;
}
.row {
margin: 14rpx 0;
width: 646rpx;
height: 0rpx;
opacity: 1;
border-bottom: 1rpx solid #CCCCCC;
}
.info {
width: 645rpx;
color: #999999;
font-size: 25rpx;
}
.notice_bottom {
display: flex;
justify-content: space-between;
align-items: center;
.n_left {
color: #999999;
font-size: 25rpx;
.chapter {
margin-right: 60rpx;
}
}
.n_right {
.btn {
display: inline-block;
width: 158rpx;
height: 53rpx;
line-height: 53rpx;
text-align: center;
background: $theme-oa-color;
border-radius: 4rpx;
color: #fff;
}
.btn_1 {
background: #34A853;
margin-right: 14rpx;
}
}
}
}
</style>

View File

@ -0,0 +1,185 @@
<template>
<!-- 个人中心-修改个人信息 -->
<view class="all_box">
<!-- 头像 -->
<view class="header_box">
<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">
</u--image>
<text @click="seleckImage">修改头像</text>
</view>
<!-- 基本信息 -->
<view class="bases_info">
<view class="name">
<text>姓名</text>
<input type="text" value="" class="n_input" v-model="personInfo.name" placeholder="请输入姓名" />
</view>
<view class="name">
<text>昵称</text>
<input type="text" value="" class="n_input" v-model="personInfo.nickname" placeholder="请输入昵称" />
</view>
<view class="name">
<text>电话</text>
<input type="text" value="" class="n_input" v-model="personInfo.mobile" placeholder="请输入电话" />
</view>
</view>
<view class="btn" @click="savePersonInfo">保存</view>
</view>
</template>
<script>
import {
Toast
} from '@/libs/uniApi.js'
import {
getPersonInfoApi
} from '@/api/oa.js'
import {
PostUserPerSubmitAPI
} from '@/api/oaApi.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
oaUploads,
uploads
} from '@/api/upload.js'
export default {
data() {
return {
fileList5: [],
personInfo: {
thumb: ''
},
changeAvatar: ''
};
},
onShow() {
this.getPersonInfo()
},
methods: {
//
async getPersonInfo() {
const res = await getPersonInfoApi()
this.personInfo = res.data
this.personInfo.img = res.thumb
console.log('个人信息', this.personInfo.thumb);
},
//
async savePersonInfo() {
// //thump
let str1 = this.personInfo.thumb
let str2 = str1.slice(0, 26)
//
if (str2 == 'http://ceshi-oa.lihaink.cn') {
this.personInfo.thumb = str1.substring(26)
}
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}$/;
if (!reg_phone.test(this.personInfo.mobile)) {
throw Error()
}
//
const reg_name = /^[\u4e00-\u9fa5]{2,4}$/;
if(!reg_name.test(this.personInfo.name)){
throw Error()
}
const res = await PostUserPerSubmitAPI(this.personInfo)
Toast('修改成功')
} catch (e) {
//TODO handle the exception
Toast('修改失败,请重试')
}
},
seleckImage(i) {
let that = this
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
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);
Toast('上传失败')
})
},
fail: function(err) {
console.log('choose失败');
Toast('添加失败')
}
});
},
}
}
</script>
<style lang="scss" scoped>
/deep/.u-upload__button {
width: 182rpx !important;
height: 182rpx !important;
// background-color: pink;
margin: 0;
}
/deep/.u-upload__wrap__preview__image {
width: 182rpx !important;
height: 182rpx !important;
}
.all_box {
height: 1623rpx;
background-color: #fff;
padding: 0 28rpx;
padding-top: 74rpx;
}
.header_box {
color: $theme-oa-color;
font-size: 28rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.bases_info {
font-size: 32rpx;
.name {
margin-top: 42.11rpx;
}
.n_input {
padding-left: 20rpx;
margin-top: 17.5rpx;
width: 694.74rpx;
height: 94.74rpx;
background: #F3F4F8;
border-radius: 12px;
}
}
.btn {
margin: 0 auto;
border-radius: 100px;
width: 614.04rpx;
height: 84.21rpx;
text-align: center;
line-height: 84.21rpx;
color: #fff;
background: #3274F9;
box-shadow: 0px 9px 26px 1px #E9EFF5;
margin-top: 84.21rpx
}
</style>

View File

@ -0,0 +1,317 @@
<template>
<view class="">
<view class="content-detail">
<view class="content-detail-one">
<view class="title">
<view class="titlea">
</view>
<view class="titleb">绩效考核</view>
</view>
<view class="detail-con">
<view class="detail-cona">
<view class="cona">1000</view>
<view class="conb">绩效考核</view>
</view>
<view class="detail-conb">-</view>
<view class="detail-conc">
<view class="cona">0</view>
<view class="conb">延期任务扣除</view>
</view>
<view class="detail-cond">*</view>
<view class="detail-cone">
<view class="cona">0</view>
<view class="conb">任务完成率</view>
</view>
<view class="detail-conf">=</view>
<view class="detail-cong">
<view class="cona" style="color:#3274F9 !important">100</view>
</view>
</view>
<view class="detail-botm">
<view class="title">扣除详情:</view>
<view class="detail"></view>
</view>
</view>
<view class="content-detail-two">
<view class="title">
<view class="titlea">
</view>
<view class="titleb">部门奖金</view>
</view>
<view class="detail-con">
<view class="detail-cona">
<view class="cona">1000</view>
<view class="conb">部门奖金</view>
</view>
<view class="detail-conb">-</view>
<view class="detail-conc">
<view class="cona">100%</view>
<view class="conb">项目完成率</view>
</view>
<view class="detail-conf">=</view>
<view class="detail-cong">
<view class="cona" style="color:#3274F9 !important">100</view>
</view>
</view>
<view class="detail-botm">
<view class="title">部门计划完成率必须大于50%</view>
</view>
</view>
<view class="content-detail-three">
<view class="title">
<view class="titlea">
</view>
<view class="titleb">公司奖金</view>
</view>
<view class="detail">
0
</view>
<view class="botm">
公司目标低于百分之百无公司奖金
</view>
</view>
</view>
</view>
</template>
<script>
</script>
<style lang="scss">
.content-detail {
.content-detail-one {
background-color: #fff;
padding-top: 18rpx;
padding-left: 20rpx;
padding-right: 20rpx;
height: 335rpx;
.title {
display: flex;
line-height: 32rpx;
.titlea {
width: 4rpx;
height: 33rpx;
background: #3274F9;
margin-right: 10rpx;
}
.titleb {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
}
.detail-con {
display: flex;
margin-top: 60rpx;
.cona {
width: 148rpx;
height: 81rpx;
line-height: 81rpx;
text-align: center;
background: #F3F4F8;
margin-bottom: 30rpx;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.conb {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
width: 148rpx;
text-align: center;
}
.detail-conb {
font-size: 32px;
margin-top: -10rpx;
}
.detail-cond {
font-size: 32px;
margin-top: 10rpx;
}
.detail-conf {
font-size: 32px;
margin-top: -10rpx;
}
}
.detail-botm {
display: flex;
margin-top: 32rpx;
.title {
width: 158rpx;
height: 44px;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.detail {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
}
}
}
.content-detail-two {
background-color: #fff;
margin-top: 30rpx;
padding-top: 18rpx;
padding-left: 20rpx;
padding-right: 20rpx;
height: 335rpx;
.title {
display: flex;
line-height: 32rpx;
.titlea {
width: 4rpx;
height: 33rpx;
background: #3274F9;
margin-right: 10rpx;
}
.titleb {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
}
.detail-con {
display: flex;
margin-top: 60rpx;
.cona {
width: 212rpx;
height: 81rpx;
line-height: 81rpx;
text-align: center;
background: #F3F4F8;
margin-bottom: 30rpx;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
.conb {
font-size: 25rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
width: 212rpx;
text-align: center;
}
.detail-conb {
font-size: 32px;
margin-top: -10rpx;
}
.detail-cond {
font-size: 32px;
margin-top: 10rpx;
}
.detail-conf {
font-size: 32px;
margin-top: -10rpx;
}
}
.detail-botm {
display: flex;
margin-top: 32rpx;
.title {
height: 44px;
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
}
}
.content-detail-three {
background-color: #fff;
margin-top: 30rpx;
padding-top: 18rpx;
padding-left: 20rpx;
padding-right: 20rpx;
height: 280rpx;
.title {
display: flex;
line-height: 32rpx;
.titlea {
width: 4rpx;
height: 33rpx;
background: #3274F9;
margin-right: 10rpx;
}
.titleb {
font-size: 32rpx;
font-family: PingFang SC-Medium, PingFang SC;
font-weight: 500;
color: #333333;
}
}
.detail{
width: 674rpx;
height: 81rpx;
line-height:81rpx;
margin-top: 60rpx;
margin-bottom: 30rpx;
padding-left: 30rpx;
background: #F3F4F8;
border-radius: 7px 7px 7px 7px;
}
}
}
</style>

View File

@ -0,0 +1,58 @@
<template>
<view class="con-detail">
<view class="detail">
<view class="title">
{{detail.title}}
</view>
<view class="content">
<jyf-parser :html="detail.content" ref="article" :tag-style="tagStyle"></jyf-parser>
</view>
</view>
</view>
</template>
<script>
import parser from "@/components/jyf-parser/jyf-parser"
export default {
components:{
parser
},
data() {
return {
detail:{},
tagStyle: {
img: 'width:100%;display:block;',
},
};
},
onLoad(options) {
this.detail = JSON.parse(decodeURIComponent(options.data));
},
onShow() {
},
methods:{
}
}
</script>
<style lang="scss">
.con-detail{
.title{
text-align: center;
font-size: 30rpx;
font-weight: 700;
margin-top: 30rpx;
}
.content{
margin:20rpx 20rpx;
}
}
</style>

View File

@ -0,0 +1,165 @@
<template>
<!-- 公司公示文档 -->
<view class="all_box">
<!-- 公司公告详情 -->
<view class="notice_box" v-for="item in noticeData" :key="item.id">
<view class="title">{{item.title}}</view>
<view class="row"></view>
<view class="info">{{item.desc}}
</view>
<view class="notice_bottom">
<view class="n_left">
<!--<text class="chapter">{{item.sections}}</text>
<text>浏览{{item.is_share}}</text> -->
</view>
<view class="n_right">
<view class="btn" @click="detail(item)">详情</view>
</view>
</view>
</view>
</view>
</template>
<script>
import { getDocumentListApi } from '@/api/oa.js'
export default {
data() {
return {
keyword: '',
noticeData: [],
};
},
onLoad() {
},
onShow() {
this.getDocumentList()
},
methods:{
//
async getDocumentList(){
const res = await getDocumentListApi()
this.noticeData = res.data.data
},
//
detail(item){
uni.navigateTo({
url:'/pages/users/user_document/detail?data='+ encodeURIComponent(JSON.stringify(item))
})
}
}
}
</script>
<style lang="scss" scoped>
/deep/.u-search {
width: 527rpx;
}
/deep/.u-search__action--active {
display: none;
}
.all_box{
padding-bottom: 21rpx;
}
.nav_box {
width: 750rpx;
height: 98rpx;
background: #FFFFFF;
.task_box {
margin: 0 auto;
width: 750rpx;
height: 98rpx;
background: #FFFFFF;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 28rpx;
.newly_built {
width: 149rpx;
height: 63rpx;
background: #34A853;
border-radius: 35rpx;
color: #fff;
text-align: center;
line-height: 63rpx;
margin-left: 17.5rpx;
}
}
}
.notice_box {
margin: 0 auto;
margin-top: 21rpx;
width: 694rpx;
// height: 342rpx;
background: #FFFFFF;
border-radius: 7rpx;
padding: 0 24.5rpx;
padding-bottom: 25rpx;
padding-top: 24.5rpx;
.title {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
width: 624rpx;
height: 44rpx;
font-size: 32rpx;
}
.row {
margin: 14rpx 0;
width: 646rpx;
height: 0rpx;
opacity: 1;
border-bottom: 1rpx solid #CCCCCC;
}
.info {
width: 645rpx;
color: #999999;
font-size: 25rpx;
}
.notice_bottom {
display: flex;
justify-content: space-between;
align-items: center;
.n_left {
color: #999999;
font-size: 25rpx;
.chapter {
margin-right: 60rpx;
}
}
.n_right {
.btn {
display: inline-block;
width: 158rpx;
height: 53rpx;
line-height: 53rpx;
text-align: center;
background: $theme-oa-color;
border-radius: 4rpx;
color: #fff;
}
.btn_1 {
background: #34A853;
margin-right: 14rpx;
}
}
}
}
</style>

195
pages/views/com_approve.vue Normal file
View File

@ -0,0 +1,195 @@
<template>
<view class="">
<view class="content_card">
<view class="cont_header flex_a_c_j_sb">
<view class="task_name">任务名称</view>
<view class="is_matter">任务审批</view>
</view>
<view class="cont_details">
审批内容
<view class="">审批详细描述</view>
</view>
</view>
<view class="content_card">
<!-- 头部 -->
<view class="cont_header">
<view class="flex_a_c_j_sb">
<view class="approver">当前审批人张三</view>
<view class="audit_store">审核状态<text>已通过</text> </view>
</view>
<view class="make_copy">抄送人李四</view>
</view>
<!-- 内容 -->
<view class="cont_details">
<view class="examine">审批流程</view>
<view class="examine">审批记录</view>
<block v-for="(item,i) in 3" :key="i">
<view class="record flex">
<view class="circle"></view>
<text class="text">2023-03-24 :09:40 张三 提交 了此申请操作意见提交申请</text>
</view>
</block>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
onLoad() {},
onShow() {},
methods: {},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.content_card {
width: 695rpx;
margin: 0 auto;
margin-top: 24.56rpx;
padding: 0 28.07rpx;
background-color: #fff;
border-radius: 4px;
}
.cont_header {
padding: 21.05rpx 0;
font-size: 31.58rpx;
min-height: 82.46rpx;
width: 100%;
border-bottom: 1px solid rgba(204, 204, 204, 0.5);
.task_name {
width: 526.32rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.is_matter {
font-size: 24.56rpx;
border-radius: 4px;
// padding: 3.51rpx 17.54rpx;
color: $theme-oa-color;
// background-color: #E4EDFF;
}
//
.approver {
font-size: 28.07rpx;
}
.audit_store {
font-size: 31.58rpx;
}
.make_copy {
color: #999;
margin-top: 14.04rpx;
font-size: 24.56rpx;
}
}
.cont_details {
padding: 24.56rpx 0;
font-size: 28.07rpx;
//
.finish_time {
font-size: 24.56rpx;
color: #999;
}
text {
display: block;
margin-bottom: 7.02rpx;
}
.upload_box {
padding: 17.54rpx;
background-color: #F7F7F7;
border-radius: 4px;
.title {
font-size: 28.07rpx;
}
.text {
margin-top: 7.02rpx;
font-size: 21.05rpx;
color: #999;
}
}
.file {
padding: 17.54rpx;
border-radius: 4px;
border: 1px solid #F2F2F2;
margin-bottom: 17.54rpx;
.file_size {
margin-top: 7.02rpx;
}
.file_size,
.upload_people {
font-size: 21.05rpx;
color: #999;
}
}
//
.examine {
margin-bottom: 17.54rpx;
}
.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;
}
}
}
}
</style>

View File

@ -0,0 +1,536 @@
<template>
<view class="leave_request">
<view class="leave_box">
<view class="leava_type flex_a_c">
<view class="title">请假类型</view>
<input type="text" v-model="leavaTypeVal" placeholder="请选择" disabled @click="leavaTypeShow = true">
</view>
<block v-for="(item,i) in timeData" :key="item.title">
<view class="cont_cell">
<view class="title">{{ item.title }}</view>
<input type="text" v-model="item.time" placeholder="请选择时间" disabled @click="selectTime(item)">
</view>
</block>
<view class="cont_cell">
<view class="title">请假工时</view>
<input type="text" v-model="manHour" disabled placeholder="请假工时">
</view>
<view class="cont_cell">
<view class="title">请假天数</view>
<input type="text" v-model="daysNum" disabled placeholder="请假天数">
</view>
<view class="cont_cell">
<view class="title">请假事由</view>
<input type="text" v-model="reason" placeholder="请输入请假事由">
</view>
<!-- 附件 -->
<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>
<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">
<view>
<view class="title">选择文件并上传</view>
<view class="text">
上传前请规范命名最大只能上传100M的文件<br />
超过请压缩成多个文件上传
</view>
</view>
<u-icon name="plus-circle" color="#333333" size="28"></u-icon>
</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">
<view class="title">审核人</view>
<input v-if="flowDate === false" type="text" v-model="auditor" placeholder="请选择" disabled
@click="branchShow = true">
<view v-else class="audit_process">
<view v-for="(item,i) in flowDate" :key="i" class="process_item flex">
<view class="circle"></view>
<view class="right">
<view v-if="item.flow_type==1">
{{i+1}}级审批
<view class="verifier">当前部门负责人</view>
</view>
<view v-else-if="item.flow_type==2">
{{i+1}}级审批
<view class="verifier">上级部门负责人</view>
</view>
<view v-else>
<view v-if="item.flow_type==3">
{{i+1}}级审批
<text class="tag">或签</text>
</view>
<view v-if="item.flow_type==4">
{{i+1}}级审批
<text class="tag">会签</text>
</view>
<view v-for="(info,b) in item.user_id_info" :key="b" class="verifier">
{{ info.name }}
</view>
</view>
</view>
</view>
</view>
</view>
<view class="cont_cell">
<view class="title">抄送人</view>
<input type="text" v-model="carbon" placeholder="请选择" disabled>
</view>
</view>
<view class="bot_btn">
<view class="reset" @click="reset">重置</view>
<view class="submit_btn" @click="submiteBtn">立即提交</view>
</view>
<u-picker :show="leavaTypeShow" keyName="name" :columns="columns" @cancel="leavaTypeShow = false"
@confirm="leavaType">
</u-picker>
<!-- 选择审批流程 -->
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@close="flowPathShow=false" :closeOnClickOverlay="true" :closeOnClickAction="true">
</u-action-sheet>
<!-- 部门选择 -->
<u-picker :show="branchShow" :defaultIndex=[0,0] ref="branchRef" :columns="branchColumns" @confirm="branchConfirm"
@change="branchHandler" :closeOnClickOverlay="true" @close="branchShow=false" keyName="name">
</u-picker>
<!-- 选择时间 -->
<block v-for="(item,i) in timeData" :key="i">
<u-datetime-picker :show="item.timeShow" v-model="item.timeVal" mode="datetime" :maxDate="1786778555000"
:minDate="timestamp" closeOnClickOverlay @confirm="timeConfirm($event,i)" @cancel="item.timeShow = false"
@close="item.timeShow = false"></u-datetime-picker>
</block>
</view>
</template>
<script>
import { getFlowAPI, getFlowUsersAPI, getDepartmentTreeAPI, getEmployeeAPI, PostApproveAddAPI } from '@/api/oaApi.js'
import { oaLeaveData } from '@/static/server/server.js'
import { oaUploads } from '../../api/upload'
import { Toast } from '../../libs/uniApi'
export default {
data() {
return {
timestamp: '', //
flowPath: '', //
flow_id: '', // id
auditor: '', //
carbon: '', //
copy_uids: '', // id
manHour: '', //
daysNum: '', //
reason: '', //
flowPathShow: false,
flowPathSheet: [],
timeData: [{
title: '开始时间:',
timeShow: false,
timeVal: '', //
time: '', //
timeDay: '', //
timeHour: '', //
},
{
title: '结束时间:',
timeShow: false,
timeVal: '', //
time: '', //
timeDay: '', //
timeHour: '', //
}
],
leavaTypeShow: false,
leavaTypeVal: '',
leavaTypeId: '',
columns: [oaLeaveData],
//
branchShow: false,
branchColumns: [],
isflowDate: true,
flowDate: [],
fileArray: []
}
},
onLoad() {},
onShow() {
this.getFlow()
//
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
}
},
methods: {
selectTime(item) {
item.timeShow = true
},
async branchHandler(e) {
const {
columnIndex,
value,
values, // values
index,
// pickerref
picker = this.$refs.branchRef
} = e
// ()
if (columnIndex === 0) {
// pickerthis
let res = await getEmployeeAPI({ did: value[0].id })
if (res.length < 1) {
res[0] = { name: '无' }
}
picker.setColumnValues(1, res)
}
},
// columnIndexvaluevalues
branchConfirm(e) {
console.log('confirm', e)
this.auditor = e.value[1].name
this.branchShow = false
},
/** 请假类型 */
leavaType(e) {
this.leavaTypeVal = e.value[0].name
this.leavaTypeId = e.value[0].id
this.leavaTypeShow = false
},
/** 选择审核人 */
async getFlowUsers(id) {
const flowUsers = await getFlowUsersAPI({ id: id })
console.log(flowUsers.data);
this.flowDate = flowUsers.data.flow_data
//
if (!flowUsers.data.flow_data) {
const tree = await getDepartmentTreeAPI()
const picker = this.$refs.branchRef
picker.setColumnValues(0, tree[0].children)
let res = await getEmployeeAPI({ did: tree[0].children[0].id })
picker.setColumnValues(1, res)
this.carbon = ''
} else {
this.carbon = flowUsers.data.copy_unames
this.copy_uids = flowUsers.data.copy_uids
}
},
flowPathSelect(value) {
this.flowPath = value.name
this.flow_id = value.id
this.getFlowUsers(value.id)
},
async getFlow() {
const flow = await getFlowAPI({ type: 1, flow_cate: 1 })
this.flowPathSheet = flow
},
timeConfirm(e, i) {
this.timeData[i].time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
this.timeData[i].timeDay = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.timeData[i].timeHour = uni.$u.timeFormat(e.value, 'hh:MM')
this.timeData[i].timeShow = false
},
async submiteBtn() {
let fileIds = [];
this.fileArray.map((item, i) => {
fileIds.push(item.id)
});
let subData = {
detail_type: this.leavaTypeId,
end_time_a: this.timeData[1].timeDay,
end_time_b: this.timeData[1].timeHour,
start_time_a: this.timeData[0].timeDay,
start_time_b: this.timeData[0].timeHour,
duration: this.manHour,
content: this.reason,
flow_id: this.flow_id,
file_ids: fileIds.join(','),
copy_names: this.carbon,
copy_uids: this.copy_uids,
type: '1',
id: 0
}
try {
const res = await PostApproveAddAPI(subData)
Toast('提交成功')
} catch (e) {
Toast('提交失败')
}
},
reset() {
this.flowPath = ''
this.flowDate = []
this.leavaTypeVal = ''
this.leavaTypeId = ''
this.daysNum = ''
this.timeData[0].time = ''
this.timeData[0].time = ''
this.timeData[1].time = ''
this.timeData[1].time = ''
this.manHour = ''
this.reason = ''
this.flow_id = ''
this.carbon = ''
this.copy_uids = ''
},
seleckImage(i) {
let that = this
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: function(res) {
that.loading = true
let objImg = {}
objImg.filesize = res.tempFiles[0].size
objImg.admin_name = '马开明'
oaUploads(res.tempFilePaths[0], 'img').then(res => {
objImg.name = res.filename
that.fileArray.push(res)
that.loading = false
Toast('上传成功')
}).catch(err => {
Toast('上传失败')
that.loading = false
console.log('上传失败', err)
})
},
fail: function(err) {
Toast('添加失败')
console.log('失败', err)
}
});
},
delImg(i) {
let that = this
uni.showModal({
title: '删除图片',
content: '确定删除图片?',
success: res => {
if (res.confirm) {
that.fileArray.splice((i, 1))
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
},
/**
* 计算两个时间戳之间相差的小时数
* */
calculateLeaveDaysAndHours(leaveStartTime, leaveEndTime, hoursPerDay = 8) {
const startDate = new Date(leaveStartTime);
const endDate = new Date(leaveEndTime);
//
const leaveDays = Math.floor((endDate.getTime() - startDate.getTime()) / (24 * 60 * 60 * 1000)) + 1;
//
const leaveHours = leaveDays * hoursPerDay;
//
return {
leaveDays,
leaveHours,
};
}
},
filters: {
// MB
formatBytes(bytes, decimals = 2) {
if (bytes === 0) return '0 MB';
const k = 1024;
const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(decimals)) + ' ' + sizes[i];
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.leave_request {
position: relative;
padding-bottom: 100px;
}
.leave_box,
.flow_path {
width: 100%;
padding: 0 28.07rpx;
background: #fff;
margin-bottom: 35.09rpx;
padding-bottom: 28.07rpx;
}
.bot_btn {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 87.72rpx;
>view {
width: 50%;
text-align: center;
line-height: 87.72rpx;
}
.reset {
background-color: #fff;
}
.submit_btn {
color: #fff;
height: 87.72rpx;
background: $theme-oa-color;
}
}
.leava_type {
height: 100rpx;
border-bottom: 1px solid #999;
.title {
font-size: 31.58rpx;
}
}
.cont_cell {
display: flex;
align-items: center;
width: 100%;
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
.audit_process {
.process_item {
position: relative;
height: 100%;
margin: 17.54rpx 0;
}
:last-child {
.circle {
&::before {
display: none;
}
}
}
.tag {
font-size: 21.05rpx;
color: #fff;
padding: 0 4px;
margin-left: 10.53rpx;
background-color: #3c9cff;
border-radius: 2px;
}
.verifier {
margin: 17.54rpx 0;
}
}
.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 {
padding: 17.54rpx;
background-color: #F7F7F7;
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;
}
}
</style>

603
pages/views/new_task.vue Normal file
View File

@ -0,0 +1,603 @@
<template>
<!-- 新建任务 -->
<view>
<view class="task_box">
<!-- 主题 -->
<!-- 信息填写表单 -->
<view class="u-page">
<view class="u-demo-block">
<view class="u-demo-block__content">
<u--form labelPosition="left" :model="model1" ref="form1">
<u-form-item label="任务主题:" prop="userInfo.title" borderBottom ref="item">
<u--input v-model="model1.userInfo.title" border="none" placeholder="请输入"></u--input>
</u-form-item>
<u-cell-group>
<view class="cell" v-for="(item, index) in list" :key="index">
<u-cell @click="showPicker(index)" :title="item.title" isLink :value="item.value"
:label="item.value?'':'请选择'">
</u-cell>
</view>
</u-cell-group>
<!-- 指派给 -->
<u-picker :show="flag1" :columns="columns3" ref="uPicker4" @cancel="cancel" closeOnClickOverlay
@close="flag1 = false" @confirm="confirm" @change="changeHandler1" keyName="name" :defaultIndex=[0,0]>
</u-picker>
<!-- 协作人 -->
<u-picker :show="flag2" :columns="columns3" ref="uPicker5" @cancel="cancel" @close="flag2 = false"
@confirm="confirm" @change="changeHandler2" keyName="name" closeOnClickOverlay :defaultIndex=[0,0]>
</u-picker>
<!-- 验收人 -->
<u-picker :show="flag3" :columns="columns3" ref="uPicker6" @cancel="cancel" @close="flag3 = false"
@confirm="confirm" @change="changeHandler3" keyName="name" closeOnClickOverlay :defaultIndex=[0,0]>
</u-picker>
<!-- 任务性质 -->
<u-form-item label="任务性质:" prop="userInfo.isbug" borderBottom @click="show3 = true; hideKeyboard()"
ref="item3">
<u--input v-model="model1.userInfo.isbug" disabled disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
</u-form-item>
<!-- 开始时间 -->
<u-form-item label="任务开始时间:" prop="userInfo.start_time" borderBottom
@click="starttime = true; hideKeyboard()" ref="item8">
<u--input v-model="model1.userInfo.start_time" disabled disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
</u-form-item>
<!-- 预计结束日期 -->
<u-form-item label="预计结束日期:" prop="userInfo.end_time" borderBottom @click="endtime = true; hideKeyboard()"
ref="item4">
<u--input v-model="model1.userInfo.end_time" disabled disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
</u-form-item>
<!-- 月份 -->
<u-form-item label="月份:" prop="userInfo.demo1" borderBottom @click="endmonth = true; hideKeyboard()"
ref="item5">
<u--input v-model="model1.userInfo.demo1" disabled disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
</u-form-item>
<!-- 关联项目 -->
<u-form-item label="关联项目:" prop="userInfo.project" borderBottom @click="show4 = true; hideKeyboard()"
ref="item6">
<u--input v-model="model1.userInfo.project" disabled disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
</u-form-item>
<!-- 优先级 -->
<u-form-item label="优先级:" prop="userInfo.priority_status" borderBottom
@click="show5 = true; hideKeyboard()" ref="item7">
<u--input v-model="model1.userInfo.priority_status" disabled disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
</u-form-item>
<view class="gray"></view>
<!-- 详细描述 -->
<view class="elaborate_box">
<view class="elaborate">详细描述:</view>
<u-form-item prop="userInfo.docContent_markdown_doc" ref="item8">
<u--textarea v-model="model1.userInfo.docContent_markdown_doc" count autoHeight maxlength='200'>
</u--textarea>
</u-form-item>
</view>
</u--form>
</u-action-sheet>
<!-- 任务性质 -->
<u-action-sheet :show="show3" :actions="actions3" title="请选择任务性质" @close="show3 = false" @select="Select3">
</u-action-sheet>
<!-- 关联项目 -->
<u-action-sheet :show="show4" :actions="actions4" title="请选择关联项目" @close="show4 = false" @select="Select4">
</u-action-sheet>
<!-- 优先级 -->
<u-action-sheet :show="show5" :actions="actions5" title="请选择优先级" @close="show5 = false" @select="Select5">
</u-action-sheet>
<!-- 开始时间 -->
<u-datetime-picker :show="starttime" :value="start_time" mode="datetime" closeOnClickOverlay
@confirm="start_timeConfirm" @cancel="start_timeClose" @close="start_timeClose"></u-datetime-picker>
<!-- 结束日期 -->
<u-datetime-picker :show="endtime" :value="end_time" mode="datetime" closeOnClickOverlay
@confirm="end_timeConfirm" @cancel="end_timeClose" @close="end_timeClose"></u-datetime-picker>
<!-- 结束月份 -->
<u-datetime-picker :show="endmonth" :value="demo1" mode="date" closeOnClickOverlay
@confirm="end_monthConfirm" @cancel="end_monthClose" @close="end_monthClose"></u-datetime-picker>
</view>
</view>
</view>
<!-- 信息填写表单 end-->
<!-- 提交按钮 -->
<view class="btn_box">
<u-button type="error" class="btn reset" text="重置" @click="reset"></u-button>
<u-button type="primary" class="btn sub" text="立即提交" @click="submit"></u-button>
</view>
</view>
</view>
</template>
<script>
import {
addNewTaskApi,
getDepartmentApi,
getDepartmentPersonApi
} from '@/api/oa.js'
import { Toast } from '@/libs/uniApi'
// import { data } from '../../../uni_modules/uview-ui/libs/mixin/mixin'
export default {
data() {
return {
index: 0,
loading: false,
columnData: [
],
columns3: [],
model1: {
userInfo: {
title: '', //
director_name: '', //
assist_admin_names: '', //
isbug: '', //
start_time: '', //
end_time: '', //
demo1: '', //
project: '', //
priority_status: '', //
assist_check_names: '', //
docContent_markdown_doc: '', //
},
},
flag1: false, //
flag2: false, //
flag3: false, //
show3: false, //
show4: false, //
show5: false, //
list: [{
title: '指派给:',
value: '',
},
{
title: '协作人:',
value: ''
},
{
title: '验收人:',
value: ''
},
],
starttime: false, //
endtime: false, //
endmonth: false, //
start_time: Number(new Date()), //
end_time: Number(new Date()),
demo1: Number(new Date()),
actions3: [{
name: '部门工作',
index: '0'
}, {
name: '部门协助',
index: '1'
}, ],
actions4: [{
name: '项目1',
id: '78'
}, ],
actions5: [{
name: '一般',
id: '1',
}, {
name: '紧急',
id: '4'
}],
rules: {
},
}
},
onLoad() {
this.getDepartment()
},
onShow() {},
methods: {
groupChange(n) {
// console.log('groupChange', n);
},
navigateBack() {
uni.navigateBack()
},
Select3(e) {
this.model1.userInfo.isbug = e.name
this.model1.userInfo.is_bug = e.index //id
this.$refs.form1.validateField('userInfo.is_bug')
},
Select4(e) {
this.model1.userInfo.project = e.name
this.model1.userInfo.project_id = e.id //id
this.$refs.form1.validateField('userInfo.project')
},
Select5(e) {
this.model1.userInfo.priority_status = e.name
this.model1.userInfo.priority = e.id //id
this.$refs.form1.validateField('userInfo.priority')
},
change(e) {
// console.log(e);
},
//
start_timeClose() {
this.starttime = false
this.$refs.form1.validateField('userInfo.start_time')
},
start_timeConfirm(e) {
this.starttime = false
this.model1.userInfo.start_time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.$refs.form1.validateField('userInfo.start_time')
},
//
end_timeClose() {
this.endtime = false
this.$refs.form1.validateField('userInfo.end_time')
},
end_timeConfirm(e) {
this.endtime = false
this.model1.userInfo.end_time = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM:ss')
this.$refs.form1.validateField('userInfo.end_time')
},
//
end_monthClose() {
this.endmonth = false
this.$refs.form1.validateField('userInfo.demo1')
},
end_monthConfirm(e) {
this.endmonth = false
this.model1.userInfo.demo1 = uni.$u.timeFormat(e.value, 'yyyy-mm')
this.$refs.form1.validateField('userInfo.demo1')
},
//
async addNewTask(data) {
const res = await addNewTaskApi(data)
Toast('slkdff')
},
//
async getDepartment() {
const res = await getDepartmentApi()
const deArr = res[0].children
this.columns3.push(deArr)
let id = deArr[0].id
this.getDepartmentPerson(id)
},
//
async getDepartmentPerson(id) {
const data = {
did: id
}
const res = await getDepartmentPersonApi(data)
const nameArr = []
res.forEach(item => {
let obj = {}
obj.name = item.name
obj.id = item.id
nameArr.push(obj)
})
this.columnData = []
this.columnData = nameArr
// this.columnData = res
if (this.columns3[1]) {
return
} else {
this.columns3.push(nameArr)
// this.columns3.push(res)
}
},
async submit() {
//
var d1 = new Date(this.model1.userInfo.start_time)
const date1 = d1.getTime()
var d2 = new Date(this.model1.userInfo.end_time)
const date2 = d2.getTime()
if (date1 > date2) {
Toast('结束时间不低于开始时间')
this.model1.userInfo.end_time = ''
return
}
this.model1.userInfo.director_name = this.list[0].value
this.model1.userInfo.assist_admin_names = this.list[1].value
this.model1.userInfo.assist_check_names = this.list[2].value
let userInfo = this.model1.userInfo
const arr = Object.values(userInfo)
const bool = arr.every(item => item)
if (bool) {
this.model1.userInfo.director_uid = this.list[0].id + ''
this.model1.userInfo.assist_admin_ids = this.list[1].id + ''
this.model1.userInfo.assist_check_ids = this.list[2].id + ''
this.model1.userInfo.ueditorcontent = this.model1.userInfo.docContent_markdown_doc
// const { msg } = await this.addNewTask(this.model1.userInfo)
console.log(this.model1.userInfo);
const res = await addNewTaskApi(this.model1.userInfo)
if (res.code == 0) {
uni.$u.toast('验收时间不能大于本月月底18点')
return
} else {
//
uni.showToast({
title: '已提交',
});
setTimeout(function() {
uni.navigateBack({
delta: 1
});
}, 1000)
}
} else {
uni.$u.toast('请填写所有信息')
return
}
},
reset() {
this.list.forEach(item => {
item.value = ''
})
for (let i in this.model1.userInfo) {
this.model1.userInfo[i] = ''
}
},
hideKeyboard() {
uni.hideKeyboard()
},
//picker
showPicker(index) {
console.log(index);
this.index = index + 1
this[`show${index + 1}`] = true
},
//
changeHandler1(e) {
this.change(e)
const {
columnIndex,
value,
values,
index,
// pickerref
picker = this.$refs.uPicker4
} = e
let id = e.value[0].id
if (columnIndex === 0) {
this.getDepartmentPerson(id)
this.loading = true
uni.$u.sleep(500).then(() => {
picker.setColumnValues(1, this.columnData)
this.loading = false
})
}
},
changeHandler2(e) {
this.change(e)
const {
columnIndex,
value,
values,
index,
// pickerref
picker = this.$refs.uPicker5
} = e
let id = e.value[0].id
if (columnIndex === 0) {
this.getDepartmentPerson(id)
this.loading = true
uni.$u.sleep(500).then(() => {
picker.setColumnValues(1, this.columnData)
this.loading = false
})
}
},
changeHandler3(e) {
this.change(e)
const {
columnIndex,
value,
values,
index,
// pickerref
picker = this.$refs.uPicker6
} = e
let id = e.value[0].id
if (columnIndex === 0) {
this.getDepartmentPerson(id)
this.loading = true
uni.$u.sleep(500).then(() => {
picker.setColumnValues(1, this.columnData)
this.loading = false
})
}
},
change(e) {
// console.log('change', e);
},
showPicker(index) {
this.index = index + 1
this[`flag${index + 1}`] = true
},
close() {
// console.log('close');
this[`flag${this.index}`] = false
},
confirm(e) {
const num = this.index - 1
const name = e.value[1]
if (name == undefined) {
this.list[num].value = '暂无'
} else {
this.list[num].value = name.name
this.list[num].id = name.id
}
this[`flag${this.index}`] = false
},
cancel() {
// console.log('cancel');
this[`flag${this.index}`] = false
},
},
onReady() {
// setRules
this.$refs.form1.setRules(this.rules)
},
}
</script>
<style lang="scss" scoped>
/deep/.u-form {
background-color: #fff;
}
/deep/.uicon-arrow-right {
display: none;
}
/deep/.u-cell__right-icon-wrap {
display: none !important;
}
/deep/.u-form-item {
padding: 0 28rpx;
}
/deep/.u-form-item__body__left {
width: 220rpx !important;
// background-color: pink;
}
/deep/.input-placeholder,
/deep/.u-input__content,
/deep/.uni-input-wrapper {
font-size: 28rpx !important;
}
/deep/.u-textarea {
padding: 0 !important;
}
/deep/.u-form-item__body__right__message {
margin-left: 220rpx !important;
}
/deep/.u-cell__title {
display: inline-block !important;
flex: none;
}
/deep/.u-cell__body {
padding: 21rpx 0 !important;
}
/deep/.u-line:first-child {
border-bottom: none !important;
}
/deep/.u-cell__value {
color: black !important;
}
/deep/.u-cell__title-text {
display: inline-block !important;
width: 220rpx !important;
}
/deep/.u-cell__label {
font-size: 28rpx !important;
color: #CCCCCC !important;
}
/deep/.u-cell__body__content {
flex: none !important;
}
.cell {
margin: 0 auto;
width: 694rpx;
// background-color: pink;
}
.row {
margin: 0 auto;
margin-top: 21rpx;
width: 694rpx;
height: 0rpx;
border-bottom: 1rpx solid #CCCCCC;
}
.de {
font-size: 28rpx;
.miaoshu {
font-size: 28rpx;
color: #CCCCCC;
}
}
.ch {
color: rgb(192, 196, 204);
}
.gray {
// width: 750rpx;
height: 35rpx;
background-color: #F5F5F5;
}
.elaborate_box {
background-color: #fff;
padding: 35.5rpx 28rpx;
margin-bottom: 200rpx;
overflow: hidden;
.elaborate {
color: #666666;
font-size: 32rpx;
}
.elaborate_info {
width: 100%;
// height: 350rpx;
font-size: 28rpx;
}
}
.btn_box {
z-index: 9999;
position: fixed;
bottom: 0;
width: 750rpx;
background: #FFFFFF;
display: flex;
.btn {
text-align: center;
line-height: 88rpx;
// width: 375rpx;
height: 88rpx;
}
.reset {
border: none;
background-color: #fff;
color: #999999;
}
.sub {
color: #fff;
background-color: $theme-oa-color;
}
}
</style>

View File

@ -0,0 +1,219 @@
<template>
<!-- 个人中心 2 -->
<view>
<!-- 绩效考核 -->
<view class="assessment_box">
<view class="title_box">
<text class="line"></text>
<text>绩效考核</text>
</view>
<view class="detail_box">
<view class="assessment">
<view class="num">{{salaryInfo.cs_salary}}</view>
<view class="tip">绩效考核</view>
</view>
<view class="jian">-</view>
<view class="assessment">
<view class="num">{{salaryInfo.work_deduction_money}}</view>
<view class="tip">延期任务扣除</view>
</view>
<view class="jian">*</view>
<view class="assessment">
<view class="num">{{salaryInfo.rw}}</view>
<view class="tip">任务完成率</view>
</view>
<view class="jian">=</view>
<view class="assessment last_box">
<view class="num last">{{salaryInfo.salary}}</view>
</view>
</view>
<view class="deduction_box">
<text class="deduction_info">扣除详情:</text>
<text></text>
</view>
</view>
<!-- 部门奖金 -->
<view class="assessment_box">
<view class="title_box">
<text class="line"></text>
<text>部门奖金</text>
</view>
<view class="detail_box bonus">
<view class="assessment">
<view class="num1 num">{{salaryInfo.cs_department_money}}</view>
<view class="tip">部门奖金</view>
</view>
<view class="jian">-</view>
<view class="assessment">
<view class="num1 num">{{salaryInfo.project}}</view>
<view class="tip">项目完成率</view>
</view>
<view class="jian">=</view>
<view class="assessment last_box">
<view class="num1 num last">{{salaryInfo.department_money}}</view>
</view>
</view>
<view class="deduction_box">
<text>部门计划完成率必须大于50%</text>
</view>
</view>
<!-- 公司奖金 -->
<view class="com_box">
<view class="company">
<text class="line"></text>
<text>公司奖金</text>
</view>
<view class="company_bonus">
<view class="" class="bonus">{{salaryInfo.company_money}}</view>
<view class="com_tip">公司目标低于百分之百无公司奖金</view>
</view>
</view>
</view>
</template>
<script>
import {
getSalaryDeatilsApi
} from '@/api/oa.js'
export default {
data() {
return {
salaryInfo: {}
};
},
onLoad() {},
onShow() {
this.getSalaryList()
},
methods: {
//
async getSalaryList() {
const res = await getSalaryDeatilsApi()
console.log(res);
this.salaryInfo = res
}
}
}
</script>
<style lang="scss" scoped>
.line {
display: inline-block;
width: 4rpx;
height: 33rpx;
background: #3274F9;
border-radius: 2rpx;
margin-right: 11rpx;
}
.assessment_box {
color: #333333;
font-weight: 500;
font-size: 32rpx;
width: 750rpx;
height: 335rpx;
background: #FFFFFF;
padding: 0 28rpx;
margin-bottom: 28rpx;
.title_box {
width: 100%;
height: 77rpx;
display: flex;
align-items: center;
}
.detail_box {
padding-top: 28rpx;
width: 100%;
.assessment {
display: inline-block;
text-align: center;
.num {
width: 158rpx;
height: 81rpx;
line-height: 81rpx;
background: #F3F4F8;
border-radius: 7rpx;
display: inline-block;
}
.num1 {
width: 212rpx;
}
.tip {
height: 35rpx;
color: #666666;
font-size: 25rpx;
}
}
.jian {
font-weight: 500;
font-size: 32rpx;
display: inline-block;
transform: translateY(-50rpx);
}
.last_box {
color: #3274F9;
display: inline-block;
transform: translateY(-50rpx);
}
}
.deduction_box {
margin-top: 31.54rpx;
font-weight: 500;
font-size: 28rpx;
.deduction_info {
font-size: 32rpx;
}
}
}
.com_box {
width: 750rpx;
height: 280rpx;
.company {
padding: 0 28rpx;
width: 750rpx;
height: 77rpx;
background: #FFFFFF;
display: flex;
align-items: center;
font-size: 32rpx;
}
.company_bonus {
width: 750rpx;
height: 203rpx;
background: #FFFFFF;
padding: 0 28rpx;
padding-top: 28rpx;
.bonus {
width: 694rpx;
height: 81rpx;
line-height: 81rpx;
padding-left: 23rpx;
background: #F3F4F8;
border-radius: 7rpx;
}
.com_tip {
margin-top: 28rpx;
font-size: 28rpx;
}
}
}
</style>

View File

@ -0,0 +1,393 @@
<template>
<view class="task_details">
<view class="content_card">
<!-- 头部 -->
<view class="cont_header flex_a_c_j_sb">
<view class="task_name">{{ detail.title }}</view>
<view class="is_matter">{{ detail.priority_name }}</view>
</view>
<!-- 内容 -->
<view class="cont_details">
<text class="">任务人{{ detail.director_name }}</text>
<text class="">协办人{{ detail.assist_admin_names }}</text>
<text class="">发布人{{ detail.admin_name }}</text>
<text class="">工作性质{{ detail.is_bug }}</text>
<text class="">计划完成日期{{ detail.end_time }}</text>
<text class="">任务状态{{ detail.flow_name }}</text>
<text class="">任务验收截止时间{{ detail.initial_end_time }}</text>
<text class="finish_time">初始完成日期{{ detail.end_time }}</text>
<text class="finish_time">实际完成日期{{ detail.over_time }}</text>
</view>
</view>
<view class="content_card">
<!-- 头部 -->
<view class="cont_header flex_a_c">任务描述</view>
<!-- 内容 -->
<view class="cont_details">
{{ detail.content}}
</view>
</view>
<view class="content_card">
<!-- 头部 -->
<view class="cont_header flex_a_c">文件附件</view>
<!-- 内容 -->
<view class="cont_details">
<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>
<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">
<view>
<view class="title">选择文件并上传</view>
<view class="text">
上传前请规范命名最大只能上传100M的文件<br />
超过请压缩成多个文件上传
</view>
</view>
<u-icon name="plus-circle" color="#333333" size="28"></u-icon>
</view>
</view>
</view>
<view class="content_card">
<!-- 头部 -->
<view class="cont_header">
<view class="flex_a_c_j_sb">
<view class="approver">当前审批人张三</view>
<view class="audit_store">审核状态<text>已通过</text> </view>
</view>
<view class="make_copy">抄送人李四</view>
</view>
<!-- 内容 -->
<view class="cont_details">
<view class="examine">审批流程</view>
<view class="flow_path">
<block v-if="flowNodes[0].user_id_info.length>0">
<block v-for="(item, i) in flowNodes[0].user_id_info">
<view class="flex_a_c">
<u-icon name="plus-circle" color="#34A853" size="20"></u-icon>
<view class="name">{{ item.name }}</view>
<view class="status_tag">创建</view>
<u-icon name="arrow-right" color="#999999" size="16"></u-icon>
</view>
</block>
</block>
</view>
<view class="examine">审批记录</view>
<block v-if="flowNodes[0].check_list.length>0">
<block v-for="(item,i) in flowNodes[0].check_list" :key="i">
<view class="record flex">
<view class="circle"></view>
<text class="text">
<text>{{ item.check_time_str }}</text>
<text>{{ item.name }}</text>
2023-03-24 :09:40 张三 提交 了此申请操作意见
<text>{{ item.content }}</text>
</text>
</view>
</block>
</block>
</view>
</view>
<view class="bott_btn flex_a_c">
<view class="icons flex_a_c">
<u-icon name="chat" size="28"></u-icon>
<u-icon name="order" size="28"></u-icon>
</view>
<view class="turn_down">驳回记录{{detail.count_bohui > 0 ? detail.count_bohui:0 }}</view>
</view>
</view>
</template>
<script>
import { Toast } from '@/libs/uniApi.js'
import { oaUploads, uploads } from '@/api/upload'
import { getTaskDetailsAPI } from '@/api/oaApi.js'
export default {
data() {
return {
taskId: '',
attachment: [],
loading: false,
detail: {},
fileArray: [], //
flowNodes: [{
check_list: [],
user_id_info: []
}] //
}
},
onLoad(e) {
this.taskId = e.id
this.getTaskDetails()
},
onShow() {},
methods: {
async getTaskDetails() {
const { detail, file_array, flow_nodes } = await getTaskDetailsAPI({ id: this.taskId })
this.detail = detail
this.fileArray = file_array
flow_nodes.length > 0 ? this.flowNodes = flow_nodes : ''
},
seleckImage(i) {
let that = this
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: function(res) {
that.loading = true
let objImg = {}
objImg.name = res.tempFiles[0].name
objImg.filesize = res.tempFiles[0].size
objImg.admin_name = '马开明'
oaUploads(res.tempFilePaths[0], 'img').then(res => {
that.fileArray.push(res)
that.loading = false
Toast('上传成功')
}).catch(err => {
Toast('上传失败')
that.loading = false
console.log('上传失败', err)
})
},
fail: function(err) {
Toast('添加失败')
console.log('失败', err)
}
});
},
delImg(i) {
let that = this
uni.showModal({
title: '删除图片',
content: '确定删除图片?',
success: res => {
if (res.confirm) {
that.fileArray.splice(i, 1)
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
},
filters: {
// MB
formatBytes(bytes, decimals = 2) {
if (bytes === 0) return '0 MB';
const k = 1024;
const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(decimals)) + ' ' + sizes[i];
}
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
}
}
</script>
<style lang="scss">
.task_details {
position: relative;
padding: 26.32rpx 0 100rpx 0;
}
.content_card {
width: 695rpx;
margin: 0 auto;
margin-bottom: 24.56rpx;
padding: 0 28.07rpx;
background-color: #fff;
border-radius: 4px;
.cont_header {
padding: 21.05rpx 0;
font-size: 31.58rpx;
min-height: 82.46rpx;
width: 100%;
border-bottom: 1px solid rgba(204, 204, 204, 0.5);
.task_name {
width: 526.32rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.is_matter {
font-size: 24.56rpx;
border-radius: 4px;
padding: 3.51rpx 17.54rpx;
color: $theme-oa-color;
background-color: #E4EDFF;
}
//
.approver {
font-size: 28.07rpx;
}
.audit_store {
font-size: 31.58rpx;
}
.make_copy {
color: #999;
margin-top: 14.04rpx;
font-size: 24.56rpx;
}
}
.cont_details {
padding: 24.56rpx 0;
font-size: 28.07rpx;
//
.finish_time {
font-size: 24.56rpx;
color: #999;
}
text {
display: block;
margin-bottom: 7.02rpx;
}
.upload_box {
padding: 17.54rpx;
background-color: #F7F7F7;
border-radius: 4px;
.title {
font-size: 28.07rpx;
}
.text {
margin-top: 7.02rpx;
font-size: 21.05rpx;
color: #999;
}
}
.file {
padding: 17.54rpx;
border-radius: 4px;
border: 1px solid #F2F2F2;
margin-bottom: 17.54rpx;
.file_size {
margin-top: 7.02rpx;
}
.file_name {
width: 525.7rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.file_size,
.upload_people {
font-size: 21.05rpx;
color: #999;
}
}
//
.examine {
margin-bottom: 17.54rpx;
}
.flow_path {
margin-bottom: 14.04rpx;
.name {
margin: 0 14.04rpx 0 8.77rpx;
}
.status_tag {
color: #999;
margin-right: 8.77rpx;
}
}
.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;
}
}
}
}
}
.bott_btn {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 87.72rpx;
display: flex;
align-items: center;
.icons {
flex: 1;
justify-content: space-around;
height: 87.72rpx;
background-color: #fff;
}
.turn_down {
width: 421.05rpx;
height: 87.72rpx;
text-align: center;
line-height: 87.72rpx;
background: #3274F9;
color: #fff;
}
}
</style>

423
pages/workrecord/index.vue Normal file
View File

@ -0,0 +1,423 @@
<template>
<view>
<view class="content-middle">
<view class="content-middle-title">
<view class="content-middle-search">
<text class='iconfont icon-sousuo2'></text>
<input type='text' :value='keyword' placeholder='搜索关键字' placeholder-class='placeholder'
@input="setValue"></input>
</view>
<view class="search" @click="search">
搜索
</view>
</view>
<view class="content-middle-one">
<view class="middle-one" v-for="(item,j) in list" :key='j'>
<view class="middle-onea">
<view class="middle-onea-title">
<!-- <view class="middle-onea-img">
<image :src="`${httpRequestUrl}`+item.thumb" mode=""></image>
</view> -->
<view class="middle-onea-txt">{{item.department}}</view>
</view>
<view class="middle-onea-time">
{{item.create_time}}
</view>
</view>
<view class="middle-oneb">
<view class="middle-oneb-a">
<view class="threeb-a-b">
<view class="achor">工作类型<text>{{item.labor_type_string}}</text></view>
<view class="achor">工作内容<text>{{item.work_cate}}</text></view>
<view class="achor">关联项目<text>{{item.project}}</text></view>
<view class="middle-edit" @click="editpart(item)">
编辑
</view>
<view class="middle-delete" @click="clickItem(item)">
删除
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="content-bootom" @click="adddepart">
<view class="content-bootom-one">
<image src="@/static/images/ja.png" mode=""></image>
</view>
<view class="content-bootom-two">添加任务工时记录</view>
</view>
<u-empty v-if="loadConfig.status=='nomore'&& list.length==0" text="没有信息"
icon="/static/empty/data.png"></u-empty>
<u-loadmore v-else :status="loadConfig.status" :loading-text="loadConfig.loadingText"
:loadmore-text="loadConfig.loadmoreText" :nomore-text="loadConfig.nomoreText" />
</view>
</template>
<script>
import {
schedulelist,
deleteschedule
} from '@/api/oa.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
import {
Toast
} from '@/libs/uniApi.js'
export default {
data() {
return {
show: false,
loadConfig: {
page: 1,
limit: 5,
loadingText: '努力加载中',
loadmoreText: '轻轻上拉',
nomoreText: '我也是有底线的~~',
status: 'loadmore'
},
keyword: '',
list: [],
};
},
computed: {
httpRequestUrl() {
return HTTP_REQUEST_URL;
}
},
onLoad() {
},
onShow() {
this.getDocumentList()
},
onReachBottom() {
this.getDocumentList()
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
},
methods: {
async initList(){
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list = [];
await this.getDocumentList();
},
//
async getDocumentList() {
console.log(this.loadConfig.status )
if (this.loadConfig.status == "nomore") return;
this.loadConfig.status = "loading"
let res = await schedulelist({
page: this.loadConfig.page,
limit: this.loadConfig.limit,
keyword: this.keyword
})
this.loadConfig.status = "loadmore"
if (res.data.data.length < this.loadConfig.limit) {
this.loadConfig.status = "nomore"
} else {
this.loadConfig.page++;
}
this.list = [...this.list, ...res.data?.data]
},
//
adddepart() {
uni.navigateTo({
url: '/pages/addworkrecord/index?type=' + 0
})
},
//
clickItem(data) {
// console.log(e)
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(data.id)
}
}
})
},
//
async deleteDepartment(id) {
const res = await deleteschedule({
id: id
})
if (res.code == 0) {
this.loadConfig.status = "nomore";
this.getDocumentList()
}
Toast(res.msg);
},
//
editpart(item) {
uni.navigateTo({
url: '/pages/addworkrecord/index??type=' + 1 + "&data=" + encodeURIComponent(JSON.stringify(
item))
})
},
//
search() {
this.getDocumentList()
},
//
setValue(e) {
this.keyword = e.detail.value
if (this.keyword.length == 0) {
this.getDocumentList()
}
}
}
};
</script>
<style lang="scss" scoped>
page {
position: relative;
}
.content-middle {
.content-middle-title {
width: 100%;
background-color: #FFFFFF;
padding-top: 20rpx;
display: flex;
.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-title {
height: 98rpx;
line-height: 98rpx;
background: #FFFFFF;
font-size: 35rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
padding-left: 28rpx;
}
.content-middle-one {
.middle-one {
background-color: #FFFFFF;
padding: 28rpx 28rpx;
margin: 28rpx 28rpx;
.middle-onea {
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #CCCCCC;
padding-bottom: 20rpx;
.middle-onea-title {
display: flex;
}
.middle-onea-img {
width: 50rpx;
height: 50rpx;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
}
}
}
.middle-oneb {
display: flex;
justify-content: space-between;
margin-top: 10rpx;
.middle-oneb-a {
.threeb-a-b {
.achor {
font-size: 28rpx;
font-family: PingFang SC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.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;
}
}
}
.middle-oneb-b {
width: 80rpx;
height: 80rpx;
margin-top: 45rpx;
image {
width: 100%;
height: 100%;
}
}
}
}
}
}
.content-bootom {
width: 485rpx;
height: 88rpx;
text-align: center;
line-height: 88rpx;
background: #3274F9;
border-radius: 60px 60px 60px 60px;
display: flex;
left: 50%;
margin-left: -252.5rpx;
position: absolute;
bottom: 150rpx;
z-index: 9999 !important;
position: fixed;
.content-bootom-one {
margin-left: 82rpx;
margin-top: 5rpx;
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
image {
width: 100%;
height: 100%;
}
}
.content-bootom-two {
font-size: 35rpx;
font-family: PingFang SC-Bold, PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
}
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

427
static/css/base.css Normal file
View File

@ -0,0 +1,427 @@
@charset "UTF-8";
* {
scrollbar-color: #e5e5e5 #f7f7f9;
scrollbar-width: thin;
}
html {
margin: 0 auto;
max-width: 1200px;
}
body {
overflow-x: hidden;
}
.font-color,
.font-color-red {
color: #fc4141 !important
}
.bg-color {
background-color: #e93323
}
.icon-color {
color: #ff3c2b
}
.cart-color {
color: #ff3700 !important;
border: 1px solid #ff3700 !important
}
.padding20 {
padding: 20rpx
}
.pad20 {
padding: 0 20rpx
}
.padding30 {
padding: 30rpx
}
.pad30 {
padding: 0 30rpx
}
.pull-left {
float: left;
}
.pull-right {
float: right;
}
.clearfix:after {
content: '';
display: block;
height: 0;
clear: both
}
.clearfix {
zoom: 1
}
.acea-row {
display: -webkit-box;
display: -moz-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
-webkit-box-lines: multiple;
-moz-box-lines: multiple;
-o-box-lines: multiple;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap
}
.acea-row.row-middle {
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center
}
.acea-row.row-top {
-webkit-box-align: start;
-moz-box-align: start;
-o-box-align: start;
-ms-flex-align: start;
-webkit-align-items: flex-start;
align-items: flex-start
}
.acea-row.row-bottom {
-webkit-box-align: end;
-moz-box-align: end;
-o-box-align: end;
-ms-flex-align: end;
-webkit-align-items: flex-end;
align-items: flex-end
}
.acea-row.row-center {
-webkit-box-pack: center;
-moz-box-pack: center;
-o-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center
}
.acea-row.row-right {
-webkit-box-pack: end;
-moz-box-pack: end;
-o-box-pack: end;
-ms-flex-pack: end;
-webkit-justify-content: flex-end;
justify-content: flex-end
}
.acea-row.row-left {
-webkit-box-pack: start;
-moz-box-pack: start;
-o-box-pack: start;
-ms-flex-pack: start;
-webkit-justify-content: flex-start;
justify-content: flex-start
}
.acea-row.row-between {
-webkit-box-pack: justify;
-moz-box-pack: justify;
-o-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between
}
.acea-row.row-around {
justify-content: space-around;
-webkit-justify-content: space-around
}
.acea-row.row-column-around {
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
justify-content: space-around;
-webkit-justify-content: space-around
}
.acea-row.row-column {
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-o-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column
}
.acea-row.row-column-between {
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-o-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-pack: justify;
-moz-box-pack: justify;
-o-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between
}
.acea-row.row-center-wrapper {
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: center;
-moz-box-pack: center;
-o-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center
}
.acea-row.row-between-wrapper {
-webkit-box-align: center;
-moz-box-align: center;
-o-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
-webkit-box-pack: justify;
-moz-box-pack: justify;
-o-box-pack: justify;
-ms-flex-pack: justify;
-webkit-justify-content: space-between;
justify-content: space-between
}
.start {
width: 122rpx;
height: 30rpx;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHoAAADMCAYAAAC8yreMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4BpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpDMDg0NEE2QTVFNUQxMUU4QUI3RkNGOTgwNDYyRUZDOCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozODU5QzVENDMwRjcxMUU5OTQ0QzlEOTQ5RkE1MTlBRiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozODU5QzVEMzMwRjcxMUU5OTQ0QzlEOTQ5RkE1MTlBRiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpkN2ZhZTM5NC0wNmE4LTkzNGYtODA0OS0zNjBjNTcxOTU2YjAiIHN0UmVmOmRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpmYWI1M2NhMC04MWE1LTE5NGItYmJlYi1jMzI2MjIwNmNhOTYiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4ctYL1AAAHsElEQVR42uycS4gcVRiFq5Mm4yuKihoVlKg7IVlkI4oGFV9R4wPSJChBMW5ECYooKuIbEReCBBGJEDS+BkVJYEIMJgvJIossFATxCW58boRJEDEZz83cDk3TXc/7T9Xt+g783O7p6tP/9Km6dbvp+jpzc3MJmnwt4i0gaETQiKBRM+UWY8OVpt9XXXySakcZ34Xwp/fR3mWO6LWqW/Wilxnte5b+re29TNB3+fEeozfL0r+1vXdGTRmdTmfc9HGGG1Rd1d+qZecc/PGfcVPI2Bc19Kf3uSBHdM+/mNNpqtsD77WW/q3uvTtmDzpPw9kDxm5XW6q6b2jTB7XtrEZXc35vc/rNV7LQ/vQ+2rs75v/Zproux45yhWrniL/vUq1JeZ6lP70XmLpvVr1SYoo5qnrBrQ4ztrP0p/eiizFND9dreHdgOknTr25lqEXCvrwLGgt/ei+xGNOTP9ewUrUn48XclLGi/2J5ZelP7wVX3TJxJ/f3Mjbbpu3+KrOctPSn9+Ifr9ZWfLxOf3rPE7TOF1Mabhg68e/yy/q+1mi7bpn/xNKf3osd0deqTva3f1ZdpenCLeFXq37wfz9ddWXJvdbSn94LBH2bH9/2J/79/hzypV8wvD60XVFZ+tN7xhcmgzrRnQv0AjtHLBgOa9is6eOzCm+WpT+9p32ORpMnfmFC0IigEUEjgkYEjQgaETQiaETQBI0IGhE0ImhE0IigEUGj8oIaEEfvTtPT0ytVF5bxh3gQl/9TqkcWauqGeFCDv47kM5P5y2PP1+0lpkH7K+9v9HfX6/4JIf8ZS/+Ye/dap/pI5U4Nt1gf0RAP6vO/WrVX9YnqjqJPhnjQoN5Tpu0LNPzS6/XcZTmHdH9WdZbu/1kp6ARqQC29Kzw39d+rOqL6V7XY33Y/5n9pYNOtqpdd4BqX+G3dNqck81dgzuQN2l15766gf7zgDHHUN/RcxnaW/jH3fkC1QbVbR+v7Y88Rvd5BDZsGdhA3qzykWqXaP+o5EA8a2LuCe0DDparHFOqhHKvxLaovtO3Wcf4QDxrYuwJ7Q8Nbqu0KckVKyO5Kyu2qF/shl151Qw2ox1/BfaXhbtVrKZs9r7pT234T6uMV1IB6/N3F8N+mPP6dX7BV/xwNNaA+f786n+kvuFT3qzYMPL5n4Euaykc01ID6/N3HuL0K91yNH/odaKnuu3P3Mt1264SbQgUNNaAGfwU55fNxX3e+qXrCLbhUbpH2tF9pO4Dcqdp2cYig+1feb1LNDi1GDqs26+Y1Fc5Dlv4x977azwSX+AXXTwMLNTd7rPOzhfti5vIsM4gHDdIgxllH6XJ3tPrVd9qRf5GGWW33R/9vI78bIeh2iJ8SETQiaETQiKARQSOCRgSNCBoRNEEjgkYEjQgaETQiaETQiKARQSMnYDXheneqApSx9AZWE16lgTKW3sBqAqoqUMbSG1hNWFUCylh6A6sJq0pAGUtvYDUBYDJ+aq0MlLH0BlZTsHdLoAywmmL+1r2bAWUSYDX5/ReqdwugjKl32gv6N8xdcP1OxnTopruNg6yOPG+Whf9C9u6+wNDwrOoZvclfjwnCXfr6pOrRQdZI1vse2htYTYXeQwNlLL2B1VTvPRhQxtIbWE01mEySBATKWHoDq6nWe5IEBMpYegOrqdB7aKCMpTewmmq9BwXKWHrDMCkoU6AMsBpUVfyUiKARQSOCRgSNCBoRNCJoRNCIoAkaETQiaETQiKARQSOCRgSNMtQmholTFQ4IDJOwsva3ZIxY+8MwySNLxoi1PwyTYrJkjFj7wzApIEvGiLU/DJOcU58ZY8TaH4bJ6DfFjANi7Q/DpJi/JWPE2h+GSVKQYWLBAbH2h2FSkmESmgNi7Q/DpKS/JWPE2h+GSXFZMkas/YN5Z7I7xnBAdvsvNvpzzTEOiI66/0p8SWLqnwxxQPwixl1P/IF/vM8B+bhkGJb+wbwnnWGSJLaMEWt/GCY5v2gwY4xY+8MwKSZLxoi1PwyT1H/IkANi7Q/DBFUWPyUiaETQiKARQSOCRgSNCBoRNCJogkYEjQgaETQiaETQiKARQaMMNY1h4tRUDggMk/BqJAck5t4bxzBpMgck5t4bxTDxaiwHJObem8YwcWosByTm3mthmKRMT43mgMTcey0Mk1g5IDH3XhfDJEoOSMy918owiY0DEnPvtTNMYuKAxNx77QyTmDggMffeFIZJFByQmHuvnWHSf34SAQck5t6bwDBJkkg4IDH3XjvDJCYOSMy9N4FhEg0HJObeR56jh5bnGxM/Z6TIfXbeVxKS8b2bDcaxOvR3Z7tFe+2M/6q1Kd5R9Q7DpCXip0QEjQgaETQiaETQiKARQSOCRgRN0IigEUEjgkYEjQgamQhqQDt6L3tEt5IaEHPvhYNuMzUg5t7LHNGtpQbE3HuZoFtLDYi590UFp4/jV977yzmPXXkfcHoy8297790xxlADWkI8gBowYb13oAZAPDj+IT2BGhB975mLMagBk9F73lU31IDIe+/mfEGoAZH3nveIhhoQee95FmNT/nPbDn/OeLh/UbYeW67hVdWnyTwXdL0eO1JwQRPUn95LLsYSqAET0XueczTUgAnoHeJBS8RPiQgaETQiaNRM/S/AAOykxVBJG5QXAAAAAElFTkSuQmCC');
background-repeat: no-repeat;
background-size: 122rpx auto;
}
.start.star5 {
background-position: 0 3rpx;
}
.start.star4 {
background-position: 0 -30rpx;
}
.start.star3 {
background-position: 0 -70rpx;
}
.start.star2 {
background-position: 0 -105rpx;
}
.start.star1 {
background-position: 0 -140rpx;
}
.start.star0 {
background-position: 0 -175rpx;
}
* {
box-sizing: border-box
}
page {
font-size: 28rpx;
background-color: #f5f5f5;
color: #333
}
body,
html {
height: unset
}
button {
padding: 0;
margin: 0;
line-height: normal;
background-color: #fff
}
button::after {
border: 0
}
radio .wx-radio-input {
border-radius: 50%;
width: 38rpx;
height: 38rpx
}
radio .wx-radio-input.wx-radio-input-checked {
border: 1px solid #e93323;
background-color: #e93323;
}
radio .uni-radio-input {
border-radius: 50%;
width: 38rpx;
height: 38rpx
}
radio .uni-radio-input.uni-radio-input-checked {
border: 1px solid #e93323;
background-color: #e93323;
}
.store-list uni-radio .uni-radio-input.uni-radio-input-checked,
.store-list uni-radio .uni-radio-input {
/* border-color: transparent;
background-color: transparent; */
}
.store-list uni-radio .uni-radio-input.uni-radio-input-checked:before {
/* color: #e93323!important; */
}
checkbox .wx-checkbox-input {
width: 38rpx;
height: 38rpx
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
color: #fff !important;
}
checkbox .uni-checkbox-input {
/* border-radius: 50%; */
width: 38rpx;
height: 38rpx
}
checkbox .uni-checkbox-input.uni-checkbox-input-checked,
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border: 1px solid #20A162;
background-color: #20A162;
color: #fff !important;
}
checkbox .uni-checkbox-input.uni-checkbox-input-checked::before {
font-size: 35rpx
}
.line1 {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap
}
.line2 {
word-break: break-all;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
white-space: pre-wrap;
}
.mask {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #000;
opacity: .5;
z-index: 30
}
@keyframes load {
from {
transform: rotate(0)
}
to {
transform: rotate(360deg)
}
}
@-webkit-keyframes load {
from {
transform: rotate(0)
}
to {
transform: rotate(360deg)
}
}
.loadingpic {
animation: load 3s linear 1s infinite;
--webkit-animation: load 3s linear 1s infinite
}
.loading-list {
animation: load linear 1s infinite;
-webkit-animation: load linear 1s infinite;
font-size: 40rpx;
margin-right: 22rpx
}
.loading {
width: 100%;
height: 100rpx;
line-height: 100rpx;
align-items: center;
justify-content: center;
position: relative;
text-align: center
}
.loading .line {
position: absolute;
width: 450rpx;
left: 150rpx;
top: 50rpx;
height: 1px;
border-top: 1px solid #eee
}
.loading .text {
position: relative;
display: inline-block;
padding: 0 20rpx;
background: #fff;
z-index: 2;
color: #777
}
.loadingicon .loading {
animation: load linear 1s infinite;
font-size: 45rpx;
color: #000
}
.loadingicon {
width: 100%;
height: 80rpx;
overflow: hidden
}

1
static/css/global.scss Normal file
View File

@ -0,0 +1 @@
$base-color: #0122c7;

1025
static/css/style.scss Normal file

File diff suppressed because one or more lines are too long

BIN
static/empty/data.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
static/empty/list.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
static/icon_close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

BIN
static/icon_file.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

BIN
static/icon_image.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

BIN
static/icon_upload.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

BIN
static/icon_video.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

2530
static/iconfont/iconfont.css Normal file

File diff suppressed because it is too large Load Diff

BIN
static/images/bianji.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/images/delete.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/images/fb1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

BIN
static/images/fb2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
static/images/ja.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

BIN
static/images/ja2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

BIN
static/images/s1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
static/images/s2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
static/images/s3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/images/s4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/images/s5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/images/s6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/images/s7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/images/s8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
static/images/saixuan.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

BIN
static/images/saixuan1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 971 B

BIN
static/images/w1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

BIN
static/images/w2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

BIN
static/images/w3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
static/images/w4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 B

BIN
static/pdf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

13
static/server/archives.js Normal file
View File

@ -0,0 +1,13 @@
export const comonentList = [{
id: 7,
name: 'plant'
},
{
id: 8,
name: 'store'
},
{
id: 32,
name: 'breeding'
}
]

View File

@ -0,0 +1,4 @@
export const companyContractType = [23, 24, 25, 29] // 公司合同
export const personnerContractType = [19, 20, 21, 22] // 个人合同
export const shareholderContractType = [40] // 股金合同

469
static/server/server.js Normal file
View File

@ -0,0 +1,469 @@
export const avatar = 'https://cdn.uviewui.com/uview/album/1.jpg'
export const defaultAvatar =
'https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132'
export const prefix = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/'
export const urls = [
'https://cdn.uviewui.com/uview/album/1.jpg',
'https://cdn.uviewui.com/uview/album/2.jpg',
'https://cdn.uviewui.com/uview/album/3.jpg',
'https://cdn.uviewui.com/uview/album/4.jpg',
'https://cdn.uviewui.com/uview/album/7.jpg',
'https://cdn.uviewui.com/uview/album/6.jpg',
'https://cdn.uviewui.com/uview/album/5.jpg'
]
export const wenluData = [
'gxsy/fangsahn@2x.png',
'gxsy/laojiao@2x.png',
'gxsy/zbgy@2x.png'
]
export const marketData = [{
title: '江阳区',
text: '醉美泸州 • 中国酒城',
src: 'gxsy/jiangyang@2x.png',
bg: 'gxsy/jiangyang@2x(1).png',
code: '510502'
},
{
title: '龙马潭区',
text: '中国酒城 • 文明泸州',
src: 'gxsy/longmatan@2x.png',
bg: 'gxsy/longmatan@2x(1).png',
code: '510504'
},
{
title: '纳溪区',
text: '山水神韵 • 醇香酒城',
src: 'gxsy/naxiqu@2x.png',
bg: 'gxsy/naxi@2x.png',
code: '510503'
},
{
title: '泸县',
text: '千年古县 • 宋韵龙城',
src: 'gxsy/luxian@2x.png',
bg: 'gxsy/luxian@2x(1).png',
code: '510521'
},
{
title: '叙永县',
text: '康养竹乡 • 画稿叙永',
src: 'gxsy/xuyongxian@2x.png',
bg: 'gxsy/xuyong@2x.png',
code: '510524'
},
{
title: '古蔺县',
text: '梦里郎酒 • 画里古蔺',
src: 'gxsy/gulinxian@2x.png',
bg: 'gxsy/jiangyang@2x(1).png',
code: '510525'
}, {
title: '合江县',
text: '千年荔城 • 甜美合江',
src: 'gxsy/hejaingxian@2x.png',
bg: 'gxsy/hejaing@2x.png',
code: '510522'
}
]
export const shichangData = [{
url: 'img4@2x.png',
title: 'rexiao@2x.png',
text: '农业生产产品'
},
{
url: 'img5@2x.png',
title: 'dangji@2x.png',
text: '村名生活用品'
}
]
export const openList = [{
title: '党建在线',
text: '党建资讯文章',
src: 'djzx@2x.png',
color: '#FF614D',
pid: 295,
navCallBack: (pid, t, id) => {
uni.navigateTo({
url: `/pages/service_hall/party_building?pid=${pid}&title=${t}&village_id=${id}`
})
}
},
{
title: '村务动态',
text: '村务信息公开',
src: 'cwdt@2x.png',
color: '#4DB896',
pid: 300,
navCallBack: (pid, t, id) => {
uni.navigateTo({
url: `/pages/service_hall/party_building?pid=${pid}&title=${t}&village_id=${id}`
})
}
},
{
title: '村镇新闻',
text: '村镇新闻资讯',
src: 'czxw@2x.png',
color: '#FFAA33',
pid: 304,
navCallBack: (pid, t, id) => {
uni.navigateTo({
url: `/pages/service_hall/list?id=${pid}&title=${t}&village_id=${id}`
})
}
},
{
title: '文明实践',
text: '文明创建实践',
src: 'wmsj@2x.png',
color: '#FF7A3D',
pid: '',
navCallBack: (pid, t, id) => {
uni.navigateTo({
url: `/pages/service_hall/opens`
})
}
}
]
export const quickLink = [{
icon: 'scfw',
src: 'scfw.png',
name: '商超服务',
url: '/pages/fast_track/production',
category_id: 25
},
{
icon: 'nfcp',
src: 'nfcp.png',
name: '农副产品',
url: '/pages/fast_track/production',
category_id: 26
}, {
icon: 'sczl',
src: 'sczl.png',
name: '生产资料',
url: '/pages/fast_track/production',
category_id: 22
}, {
icon: 'shfw',
src: 'shfw.png',
name: '生活服务',
// url: '/pages/fast_track/service_life',
url: '/pages/fast_track/production',
category_id: 23
}, {
icon: 'hbxs',
src: 'hbxs.png',
name: '红白喜事',
// url: '/pages/fast_track/red_white_thing',
url: '/pages/fast_track/production',
category_id: 21
}, {
icon: 'wyly',
src: 'wyly.png',
name: '文娱旅游',
// url: '/pages/fast_track/travel'
}, {
icon: 'fwzx',
src: 'fwzx.png',
name: '房屋装修',
// url: '/pages/fast_track/fitment'
}, {
icon: 'jypx',
src: 'jypx.png',
name: '教育资讯',
// url: '/pages/fast_track/education'
}, {
icon: 'msgy',
src: 'msgy.png',
name: '民生资讯',
// url: '/pages/fast_track/public_benefit'
}, {
icon: 'ylbj',
src: 'ylbj.png',
name: '医疗资讯'
}
]
// oaHOme快速入口数据
export const oaHomeData = [{
name: '公司信息',
icon: '../../static/img/home/GSXX.png',
paths: '/subpkg/companyInfo/companyInfo',
admin: true
},
{
name: '人员管理',
icon: '../../static/img/home/RYGL.png',
paths: '/subpkg/personnel/personnel',
admin: true
},
{
name: '固定资产',
icon: '../../static/img/home/GDZC.png',
paths: '/subpkg/property/index',
admin: true
},
{
name: '合同管理',
icon: '../../static/img/home/HTGL.png',
paths: '/subpkg/contract/contract'
},
// {
// name: '公司管理',
// icon: '../../static/img/home/GSXX.png',
// paths: '/subpkg/companyAdmin/companyAdmin',
// admin: true
// },
{
name: '任务管理',
icon: '../../static/img/home/RWGL.png',
paths: '/subpkg/taskAdmin/taskAdmin',
},
{
name: '档案管理',
icon: '../../static/img/home/DAGL.png',
paths: '/subpkg/captain/captain',
admin: true
},
{
name: '档案管理',
icon: '../../static/img/home/DAGL.png',
paths: '/subpkg/archives/archives',
captain: true
},
// {
// name: '片区经理',
// icon: '../../static/img/home/GRCW.png',
// paths: '/pages/oaManager/oaManager',
// admin: true
// },
{
name: '个人财务',
icon: '../../static/img/home/GRCW.png',
paths: '/subpkg/finance/finance'
},
{
name: '待取驿站',
icon: '../../static/img/home/YZ.png',
paths: '/pages/logistics/post',
// captain: true
},
// {
// name: '出差申请',
// icon: prefix + 'oa/ccsq@2x.png'
// },
// {
// name: '外出申请',
// icon: prefix + 'oa/wcsq@2x.png'
// },
// {
// name: '采购申请',
// icon: prefix + 'oa/cgsq@2x.png'
// },
// {
// name: '物品维修',
// icon: prefix + 'oa/bxsq@2x.png'
// },
// {
// name: '用章申请',
// icon: prefix + 'oa/yzsq@2x.png'
// },
// {
// name: '报销申请',
// icon: prefix + 'oa/gengduo@2x.png'
// },
{
name: '更多',
icon: prefix + 'oa/wpwx@2x.png',
paths: '/pages/views/application'
}
]
/**
* oa-应用中心数据
*/
export const appDataList = [{
title: '假勤',
data: [{
name: '请假申请',
src: prefix + 'oa/qjsq@2x.png',
url: '/pages/views/leave_request'
},
{
name: '出差申请',
src: prefix + 'oa/ccsq@2x.png',
url: ''
},
{
name: '外出申请',
src: prefix + 'oa/wcsq@2x.png',
url: ''
}
]
},
{
title: '行政',
data: [{
name: '物品维修',
src: prefix + 'oa/bxsq@2x.png',
url: ''
},
{
name: '用章审批',
src: prefix + 'oa/yzsq@2x.png',
url: ''
},
{
name: '领用审批',
src: prefix + 'oa/lysp@2x.png',
url: ''
}
]
},
{
title: '财务',
data: [{
name: '借款申请',
src: prefix + 'oa/jksq@2x.png',
url: ''
},
{
name: '付款申请',
src: prefix + 'oa/fksq@2x.png',
url: ''
},
{
name: '报销申请',
src: prefix + 'oa/gengduo@2x.png',
url: ''
},
{
name: '采购申请',
src: prefix + 'oa/cgsq@2x.png',
url: ''
},
{
name: '奖励申请',
src: prefix + 'oa/jlsq@2x.png',
url: ''
},
{
name: '活动经费',
src: prefix + 'oa/hdjf@2x.png',
url: ''
}
]
},
{
title: '人事',
data: [{
name: '招聘需求',
src: prefix + 'oa/zpxq@2x.png',
url: ''
}]
},
{
title: '其他',
data: [{
name: '通用审批',
src: prefix + 'oa/tysp@2x.png',
url: '/pages/views/com_approve'
}]
}
]
/**
* oa-个人中心
*/
export const myOaData = [
// {
// name: '流水详情',
// icon: '../../static/icons/runningWater.png',
// url: '/subpkg/orderDetail/orderDetail'
// },
// {
// name: '管理后台',
// icon: '../../static/icons/backstage.png',
// // url: '/pages/views/personal_center_two'
// },
{
name: '片区经理',
icon: '../../static/icons/manager.png',
url: '/pages/oaManager/oaManager'
},
{
name: '安全设置',
icon: '../../static/icons/setting.png',
url: '/pages/updatePassword/updatePassword'
},
// {
// name: '管理后台',
// icon: 'custom-icongongzi',
// // url: '/pages/views/personal_center_two'
// },
// {
// name: '片区经理',
// icon: 'custom-icongongzi',
// url: '/pages/oaManager/oaManager'
// },
// {
// name: '工资详情',
// icon: 'custom-icongongzi',
// url: '/pages/views/personal_center_two'
// },
// {
// name: '公示文档',
// icon: 'custom-iconwendang',
// url: '/pages/views/public_document'
// },
// {
// name: '绑定公众号',
// icon: 'custom-iconweixin'
// },
// {
// name: '意见反馈',
// icon: 'custom-iconyijian'
// }
]
/*
oa-请假类型
*/
export const oaLeaveData = [{
name: '事假',
id: 1
},
{
name: '年假',
id: 2
},
{
name: '调休假',
id: 3
},
{
name: '病假',
id: 4
},
{
name: '婚假',
id: 5
},
{
name: '丧假',
id: 6
},
{
name: '产假',
id: 7
},
{
name: '陪产假',
id: 8
},
{
name: '其他',
id: 9
}
]

BIN
static/tabbar_icon/a-a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
static/tabbar_icon/a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/tabbar_icon/b-b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
static/tabbar_icon/b.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/tabbar_icon/c-c.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
static/tabbar_icon/c.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
static/tabbar_icon/d-d.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
static/tabbar_icon/d.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

13
store/getters.js Normal file
View File

@ -0,0 +1,13 @@
export default {
token: state => state.app.token,
isLogin: state => !!state.app.token,
userInfo: state => state.app.userInfo || {},
eyeType: state => state.config.eyeType || true,
config: state => state.config.config || {}
};
// export default {
// token: state => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJrYWlmYS5jcm1lYi5uZXQiLCJhdWQiOiJrYWlmYS5jcm1lYi5uZXQiLCJpYXQiOjE1NzcwODM1MzQsIm5iZiI6MTU3NzA4MzUzNCwiZXhwIjoxNTc3MDk0MzM0LCJqdGkiOnsiaWQiOjExMCwidHlwZSI6InVzZXIifX0.U-i1pbdRjyXI1gr79Uq2XBPZ89T8f5Ai9jwrR8woTwE',
// isLogin: state => true,
// backgroundColor: state => state.app.backgroundColor,
// userInfo: state => state.app.userInfo || {}
// };

20
store/index.js Normal file
View File

@ -0,0 +1,20 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import Vue from "vue";
import Vuex from "vuex";
import modules from "./modules";
import getters from "./getters";
Vue.use(Vuex);
export default new Vuex.Store({
modules,
getters,
});

83
store/modules/config.js Normal file
View File

@ -0,0 +1,83 @@
import Cache from '@/utils/cache';
import { getConfig } from "@/api/config.js";
const state = {
eyeType: Cache.get('eyeType') || true, // 小眼睛
request: Cache.get('request') || true, // 网络请求
config: JSON.parse(Cache.get('config')||'{}'),
updateFlag: true
};
const mutations = {
SET_EYE_TYPE(state){
state.eyeType=!state.eyeType;
Cache.set('eyeType', state.eyeType);
},
SET_REQUEST(state, data=true){
state.request = data;
Cache.set('request', state.request);
},
SET_CONFIG(state, data){
state.config = {...data};
Cache.set('config', JSON.stringify(state.config));
},
SET_UPDATEFLAG(state, data){
state.updateFlag = data;
},
};
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);
if(uni.getStorageSync('uniMP')||!state.updateFlag) return ;//是小程序环境时不进行更新
let os = uni.getSystemInfoSync();
// uni.showModal({
// title: `当前:${os.appVersion},WGT:${Cache.get('wgt_version')},返回:${res.data.version}`
// })
// #ifdef APP-PLUS
if(data) uni.showLoading({
title: '检查更新中'
})
const wgt_v = uni.getStorageSync('wgt_version')||'1.0.0';
commit('SET_UPDATEFLAG', false);
// 版本更新
if(compareVersions(res.data.version, os.appWgtVersion||wgt_v)==1&&compareVersions(res.data.version, wgt_v)==1){
try{
let info = res.data.version_info||{};
let version = {
title: info.title||'发现新版本',
content: info.content||'修复了部分BUG',
versionName: info.version||'1.0.1',
downUrl: info.dow_url||'',
force: info.force==1?true:false, // 是否强制更新
quiet: info.quiet==1?true:false // 是否静默更新
}
Updater.update(version);;
}catch(e){
console.log(e);
}
if(data) uni.hideLoading();
}else if(data){
uni.hideLoading();
uni.showToast({
title: '已经是最新版本了',
icon: 'none'
})
}
// #endif
}
};
export default {
state,
mutations,
actions
};

Some files were not shown because too many files have changed in this diff Show More