This commit is contained in:
jia 2023-11-20 18:25:05 +08:00
parent b51981f093
commit 98eb66418f
26 changed files with 661 additions and 379 deletions

View File

@ -22,8 +22,23 @@
<view class="item">
<view class="acea-row row-middle">
<text class="item-name">上级部门:</text>
<input placeholder="上级部门" type="text" readonly v-model="buname" @click="showck">
<input placeholder="作为顶级部门" type="text" readonly v-model="buname" @click="showck">
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name">分管领导:</text>
<input placeholder="分管领导" type="text" readonly v-model="buname2" @click="showck1('1')">
</view>
</view>
<view class="item">
<view class="acea-row row-middle">
<text class="item-name">部门负责人:</text>
<input placeholder="部门负责人" type="text" readonly v-model="buname3" @click="showck1('2')">
</view>
</view>
@ -53,7 +68,9 @@
@close="flag1 = false" @confirm="confirm" keyName="title" :defaultIndex=[0,0]>
</u-picker>
<u-picker :show="flag2" :columns="columns4" ref="uPicker5" @cancel="flag2 = false" closeOnClickOverlay
@close="flag2 = false" @confirm="confirm1" keyName="name" :defaultIndex=[0]>
</u-picker>
<view class="content-bottom">
<view class="content-bottom-two" @click="submit">
立即提交
@ -67,7 +84,8 @@
<script>
import {
userdepartment,
adddepartment
adddepartment,
getemployee
} from '@/api/oa.js'
import {
Toast
@ -76,11 +94,14 @@
data() {
return {
validate: false,
columns3: [],
columns4: [],
flag1: false,
flag2: false,
buname: "",
buname2: "",
buname3: "",
merchantData: {
sort: '',
phone: '',
@ -88,28 +109,62 @@
pid: ''
},
dou: 1,
type: ''
};
},
onLoad(option) {
this.type=option.type
if (this.type==1) {
this.type = option.type
if (this.type == 1) {
uni.setNavigationBarTitle({
title: '编辑部门'
})
this.merchantData = JSON.parse(decodeURIComponent(option.data));
// this.buname=
// console.log(this.columns3[0])
let arr1 = JSON.parse(decodeURIComponent(option.data));
this.merchantData.id = arr1.id
this.merchantData.leader_id = arr1.leader_id
this.merchantData.manager_id= arr1.manager_id
this.merchantData.phone = arr1.phone
this.merchantData.pid = arr1.pid
this.merchantData.title = arr1.title
this.merchantData.sort = arr1.sort
}
this.getDocumentList()
this.getDocumentList1()
},
methods: {
//
async getDocumentList1() {
this.columns4 = []
const res = await getemployee()
// this.columns4 = res.data
this.columns4.push(res.data)
if (this.type == 1) {
res.data.map((item, index) => {
if (item.id == this.merchantData.leader_id) {
this.buname2 = item.name
}
if (item.id == this.merchantData.manager_id) {
this.buname3 = item.name
}
})
}
},
showck1(val) {
this.dou = val
this.flag2 = true
},
//
async getDocumentList() {
this.columns3 = []
@ -118,10 +173,10 @@
})
const deArr = res.data
this.columns3.push(deArr)
if(this.type==1){
res.data.map((item,index)=>{
if(item.id==this.merchantData.id){
this.buname=item.title
if (this.type == 1) {
res.data.map((item, index) => {
if (item.id == this.merchantData.id) {
this.buname = item.title
}
})
}
@ -129,12 +184,12 @@
validateForm: function() {
let that = this,
value = that.merchantData;
console.log(this.merchantData)
//console.log(this.merchantData)
if (!value.sort) return Toast(
'请输入排序'
);
if (!value.title) return Toast('请输入部门名称');
if (value.pid.length==0) return Toast('请选择顶级部门');
if (value.pid.length == 0) return Toast('请选择顶级部门');
// if (!value.phone) return Toast('');
// if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(value.phone)) return Toast(
// ''
@ -148,21 +203,35 @@
this.flag1 = true
},
confirm(e) {
console.log(e)
this.merchantData.pid = e.value[0].id
//console.log(e)
this.merchantData.pid = e.value[0].id
this.buname = e.value[0].title
this.flag1 = false
},
confirm1(e) {
//console.log(e)
if (this.dou == 1) {
this.merchantData.leader_id = e.value[0].id
this.buname2 = e.value[0].name
} else {
this.merchantData.manager_id = e.value[0].id
this.buname3 = e.value[0].name
}
// this.merchantData.pid = e.value[0].id
// this.buname = e.value[0].title
this.flag2 = false
},
async submit() {
let that = this
console.log(that.validate)
//console.log(that.validate)
if (this.validateForm() && this.validate) {
const res = await adddepartment(this.merchantData)
Toast(res.msg);
if(res.code==0){
if (res.code == 0) {
uni.redirectTo({
url:'/pages/structure/index'
url: '/pages/structure/index'
})
}
}
@ -245,7 +314,7 @@
}
.item-name {
width: 140rpx;
width: 160rpx;
margin-right: 10rpx;
}

View File

@ -123,14 +123,14 @@
page: 1,
limit: 1000
});
console.log(res)
//console.log(res)
const detailTypeOptions = res.data.data.map((step, index) => {
return {
name: step.name +','+ step.amount,
id: step.id,
};
});
// console.log(detailTypeOptions)
// //console.log(detailTypeOptions)
this.actions4=detailTypeOptions
},
//
@ -151,13 +151,13 @@
},
Select3(e) {
// console.log(e)
// //console.log(e)
this.merchantData.enter_type = e.id
this.uidtype = e.id
this.name = e.name
},
Select4(e) {
// console.log(e)
// //console.log(e)
this.merchantData.inid = e.id
this.typename = e.name
@ -169,7 +169,7 @@
this.merchantData.remarks.push(this.remarks)
let that = this,
value = that.merchantData;
// console.log(this.merchantData)
// //console.log(this.merchantData)
if (!value.enter_type) return Toast(
'请选择到账类型'
);
@ -183,7 +183,7 @@
async submit() {
let that = this
console.log(that.validate)
//console.log(that.validate)
if (this.validateForm() && this.validate) {
const res = await addincome(this.merchantData)
Toast(res.msg);

View File

@ -81,7 +81,7 @@
this.merchantData.open_time=data1.open_time
this.merchantData.code=data1.code
this.merchantData.id=data1.id
console.log(this.merchantData)
//console.log(this.merchantData)
}else{
let data1 = JSON.parse(decodeURIComponent(option.data));
this.merchantData.id=data1.id
@ -106,7 +106,7 @@
validateForm: function() {
let that = this,
value = that.merchantData;
console.log(this.merchantData)
//console.log(this.merchantData)
if (!value.open_time) return Toast(
'请输入开票日期'
);
@ -119,7 +119,7 @@
async submit() {
let that = this
console.log(that.validate)
//console.log(that.validate)
if (this.validateForm() && this.validate) {
const res = await financeopen(this.merchantData)
Toast(res.msg);

View File

@ -101,7 +101,7 @@
})
this.merchantData = JSON.parse(decodeURIComponent(option.data));
// this.buname=
// console.log(this.columns3[0])
// //console.log(this.columns3[0])
}
this.getDocumentList()
@ -115,7 +115,7 @@
const res = await userpositiongroup()
const deArr = res.data
this.columns3.push(deArr)
console.log( this.columns3)
//console.log( this.columns3)
if(this.type==1){
res.data.map((item,index)=>{
if(item.id==this.merchantData.id){
@ -127,7 +127,7 @@
validateForm: function() {
let that = this,
value = that.merchantData;
console.log(this.merchantData)
//console.log(this.merchantData)
if (!value.work_price) return Toast(
'请输入岗位工时单价'
);
@ -145,14 +145,14 @@
this.flag1 = true
},
confirm(e) {
// console.log(e)
// //console.log(e)
this.merchantData.group_id.push(e.value[0].id)
this.buname =this.buname+e.value[0].title
this.flag1 = false
},
async submit() {
let that = this
console.log(that.validate)
//console.log(that.validate)
if (this.validateForm() && this.validate) {
const res = await adduserposition(this.merchantData)
Toast(res.msg);

View File

@ -198,7 +198,7 @@
})
const deArr = res.data
this.columns5.push(deArr)
console.log(deArr)
//console.log(deArr)
},
//
showck() {
@ -220,21 +220,21 @@
},
//
confirm(e) {
console.log(e)
//console.log(e)
this.merchantData.from_did = e.value[0].id
this.companyname1 = e.value[0].title
this.getemployeelist(e.value[0].pid)
this.flag1 = false
},
confirm1(e) {
console.log(e)
//console.log(e)
this.merchantData.to_did = e.value[0].id
this.companyname2 = e.value[0].title
this.flag2 = false
},
confirm2(e) {
console.log(e)
//console.log(e)
this.merchantData.uid = e.value[0].id
this.buname = e.value[0].name
this.flag3 = false
@ -242,7 +242,7 @@
async submit() {
let that = this
console.log(this.merchantData)
//console.log(this.merchantData)
if (this.validateForm() && this.validate) {
const res = await adduserpersonal(this.merchantData)
Toast(res.msg);

View File

@ -47,7 +47,7 @@
<view class="" v-for="(phase, index) in phases" :key="index">
<view class="item">
<view class="acea-row row-middle">
<view class="acea-row row-middle" @click="PathShow(index)">
<text class="item-name">阶段名称:</text>
<input placeholder="请输入阶段名称" type="text" disabled readonly v-model="phase.name">
</view>
@ -81,6 +81,12 @@
<input placeholder="请输入阶段成员" type="text" disabled readonly v-model="phase.role">
</view>
</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"></u-icon>
</view>
@ -174,9 +180,11 @@
@close="flag2 = false" @confirm="confirm1" @change="columnCode1" keyName="name"
:defaultIndex='defaultIndex'>
</u-picker>
<u-action-sheet :actions="flowPathSheet" @select="flowPathSelect" title="选择审批流程" :show="flowPathShow"
@close="flowPathShow=false" :closeOnClickOverlay="true" :closeOnClickAction="true">
</u-action-sheet>
<!-- <u-datetime-picker :show="porject1month" mode="date" closeOnClickOverlay @confirm="porject1_monthConfirm"
<!-- <u-datetime-picker :show="porject1month" mode="date" closeOnClickOverlay @confirm="porject1_monthConfirm"
@cancel="porject1_monthClose" @close="porject1_monthClose"></u-datetime-picker>
<u-datetime-picker :show="porject2month" mode="date" closeOnClickOverlay @confirm="porject2_monthConfirm"
@cancel="porject2_monthClose" @close="porject2_monthClose"></u-datetime-picker>
@ -195,7 +203,6 @@
@close="start_monthClose"></u-calendar>
<view class="content-bottom">
<view class="content-bottom-two" @click="submit">
立即提交
@ -267,32 +274,51 @@
file_name: '',
module: 'project'
},
flowPathShow: false,
flowPathSheet: [{
name: '立项阶段',
id: 1,
},
{
name: '实施阶段',
id: 2,
},
{
name: '验收阶段',
id: 3,
},
{
name: '交付阶段',
id: 4,
}
],
buname: "",
phases: [{
start_time: '',
end_time: '',
name: '立项阶段',
companyrole: '',
role: ''
},
{
name: '实施阶段',
companyrole: '',
start_time: '',
end_time: ''
}, //
{
name: '验收阶段',
companyrole: '',
start_time: '',
end_time: ''
}, //
{
name: '交付阶段',
companyrole: '',
start_time: '',
end_time: ''
} //
// {
// name: '',
// companyrole: '',
// start_time: '',
// end_time: ''
// }, //
// {
// name: '',
// companyrole: '',
// start_time: '',
// end_time: ''
// }, //
// {
// name: '',
// companyrole: '',
// start_time: '',
// end_time: ''
// } //
],
endmonth: false,
startmonth: false,
@ -335,7 +361,7 @@
})
// this.buname=
// console.log(this.columns3[0])
// //console.log(this.columns3[0])
this.projectdetail(option.data)
}
@ -351,7 +377,7 @@
* @param {Object} item 当前上传完成的文件
*/
onuploadEnd(item) {
console.log(`${item.name}已上传结束,上传状态=${item.type}`);
//console.log(`${item.name}=${item.type}`);
if (item['responseText']) {
this.files.get(item.name).responseText = JSON.parse(item.responseText);
}
@ -374,7 +400,7 @@
*/
onprogre(item) {
console.log('打印对象', JSON.stringify(this.files.get(item.name)));
//console.log('', JSON.stringify(this.files.get(item.name)));
//
this.files.set(item.name, item);
//
@ -385,10 +411,10 @@
* @param {Object} files 已选择的所有文件Map集合
*/
changeFile(files) {
console.log('当前选择的文件列表:', JSON.stringify([...files.values()]));
//console.log('', JSON.stringify([...files.values()]));
//
this.files = files
console.log(files.values())
//console.log(files.values())
//
this.$forceUpdate();
},
@ -418,13 +444,34 @@
Toast(res.msg);
this.projectdetail(this.merchantData.id)
},
PathShow(index) {
this.knum = index
this.flowPathShow = true
},
//
async seleckImage(data) {
let res = await addfile(data)
console.log(res)
//console.log(res)
Toast(res.msg);
this.projectdetail(this.merchantData.id)
},
addleava() {
this.phases.push({
start_time: '',
end_time: '',
name: '',
companyrole: '',
role: ''
})
},
deleteleava(i) {
if (this.phases.length > 1) {
this.phases.splice(1, 1)
} else {
Toast('不能再删除了')
}
},
//
async projectdetail(id) {
this.merchantData = {}; // this.merchantData
@ -464,7 +511,7 @@
});
this.merchantData.charge_ids = this.phases.map(item => item.flow_uid);
// console.log(this.phases)
// //console.log(this.phases)
});
@ -487,15 +534,15 @@
let res = await addlink(this.add_link)
Toast(res.msg);
this.projectdetail(this.merchantData.id)
// console.log(res)
// //console.log(res)
},
//
async getDocumentList() {
const res = await userdepartment()
const res = await userdepartment({tree:1})
const deArr = res.data
let codelist = [
[], //
[], //
[] //
]
@ -506,18 +553,13 @@
}
})
codelist[1] = res.data[0].children.map((item) => { //
return {
id: item.id,
name: item.title
}
})
let dat = await getemployee({
did: codelist[0][0].id
})
codelist[2] = dat.data.map((item) => {
codelist[1] = dat.data.map((item) => {
return {
id: item.id,
name: item.name
@ -535,8 +577,11 @@
},
async columnCode(e) {
if (e.columnIndex == 1) {
if (e.columnIndex == 0) {
let arr1 = []
let dat = await getemployee({
did: this.columns3[e.columnIndex][e.index].id
})
@ -550,15 +595,17 @@
})
// 使 Vue.set this.$set columns3
this.$set(this.columns3, 2, newColumn);
this.$set(this.columns3, 1, newColumn);
}else{
this.$set(this.columns3, 1, []);
}
}
},
async columnCode1(e) {
if (e.columnIndex == 1) {
if (e.columnIndex == 0) {
let arr1 = []
let dat = await getemployee({
did: this.columns3[e.columnIndex][e.index].id
@ -573,15 +620,18 @@
})
// 使 Vue.set this.$set columns3
this.$set(this.columns4, 2, newColumn);
this.$set(this.columns4, 1, newColumn);
}else{
this.$set(this.columns4, 1, []);
}
}
},
async columnCode2(e) {
if (e.columnIndex == 1) {
if (e.columnIndex == 0) {
let arr1 = []
let dat = await getemployee({
did: this.columns3[e.columnIndex][e.index].id
@ -596,15 +646,17 @@
})
// 使 Vue.set this.$set columns3
this.$set(this.columns5, 2, newColumn);
this.$set(this.columns5, 1, newColumn);
}else{
this.$set(this.columns4, 5, []);
}
}
},
async columnCode3(e) {
if (e.columnIndex == 1) {
if (e.columnIndex == 0) {
let arr1 = []
let dat = await getemployee({
did: this.columns3[e.columnIndex][e.index].id
@ -617,17 +669,18 @@
name: item.name
}
})
// 使 Vue.set this.$set columns3
this.$set(this.columns6, 2, newColumn);
this.$set(this.columns6, 1, newColumn);
}else{
this.$set(this.columns6, 1, []);
}
}
},
async columnCode4(e) {
if (e.columnIndex == 1) {
if (e.columnIndex == 0) {
let arr1 = []
let dat = await getemployee({
did: this.columns3[e.columnIndex][e.index].id
@ -640,8 +693,10 @@
}
})
// 使 Vue.set this.$set columns3
this.$set(this.columns6, 2, newColumn);
this.$set(this.columns2, 1, newColumn);
}else{
this.$set(this.columns2, 1, []);
}
}
@ -685,7 +740,9 @@
this.porject2month = false
},
flowPathSelect(e) {
this.phases[this.knum].name = e.name
},
//
end_monthClose() {
@ -715,7 +772,7 @@
Toast('项目时间范围不合法')
}
const phase = this.phases[index]
// console.log(phase.start_time, this.merchantData.start_time)
// //console.log(phase.start_time, this.merchantData.start_time)
//
if (new Date(phase.start_time) < new Date(this.merchantData.start_time) || new Date(
phase.end_time) >
@ -726,6 +783,15 @@
Toast('阶段时间超出项目时间范围')
return
}
// //console.log(new Date(this.phases[index].start_time),new Date(this.phases[index].end_time),index)
if(new Date(this.phases[index].end_time)-new Date(this.phases[index].start_time)<0){
Toast('阶段时间不合法')
this.phases[index].end_time=''
this.phases[index].start_time=''
return
}
//
for (let i = 0; i < this.phases.length; i++) {
@ -752,6 +818,8 @@
Toast('阶段时间与其他阶段重叠')
return
}
}
//
@ -774,7 +842,7 @@
this.merchantData.flow_name = this.phases.map(item => item.name);
this.merchantData.cycle_date = this.phases.map(item =>
`${item.start_time}${item.end_time}`);
// console.log(this.merchantData)
// //console.log(this.merchantData)
let that = this,
value = that.merchantData;
@ -787,7 +855,7 @@
if (!value.name) return Toast(
'请输入项目名称'
);
console.log(value.charge_ids.length)
//console.log(value.charge_ids.length)
if (value.charge_ids.length == 0) return Toast(
'请选择项目阶段负责人'
);
@ -804,10 +872,6 @@
'请选择项目阶段成员'
);
that.validate = true;
return true;
},
@ -817,7 +881,7 @@
})
const deArr = res.data
// this.columns5.push(deArr)
console.log(deArr)
//console.log(deArr)
},
//
showckfive() {
@ -839,26 +903,26 @@
},
//
confirm4(e) {
console.log(e)
this.merchantData.director_uid = e.value[2].id
this.buname = e.value[2].name
//console.log(e)
this.merchantData.director_uid = e.value[1].id
this.buname = e.value[1].name
this.flag = false
},
confirm(e) {
this.merchantData.charge_ids.push(e.value[2].id)
this.phases[this.num].companyrole = e.value[2].name
this.merchantData.charge_ids.push(e.value[1].id)
this.phases[this.num].companyrole = e.value[1].name
this.flag1 = false
},
confirm1(e) {
// console.log(e)
this.merchantData.membe_ids.push(e.value[2].id)
this.phases[this.num].role += " " + e.value[2].name;
// //console.log(e)
this.merchantData.membe_ids.push(e.value[1].id)
this.phases[this.num].role = this.phases[this.num].role + e.value[1].name + ',';
this.flag2 = false
},
async submit() {
let that = this
// console.log(that.validate)
// //console.log(that.validate)
if (this.validateForm() && this.validate) {
const res = await addproject(this.merchantData)
Toast(res.msg);

View File

@ -25,7 +25,7 @@
closeOnClickOverlay @close="flag1 = false" @change="columnCode" @confirm="confirm"
keyName="name" :defaultIndex='defaultIndex'>
</u-picker>
<!-- 协作人 -->
<u-picker :show="flag2" :columns="columns4" ref="uPicker5" @cancel="cancel"
@close="flag2 = false" @confirm="confirm1" @change="columnCode1" keyName="name"
@ -56,10 +56,9 @@
placeholder="请选择" border="none"></u--input>
</u-form-item>
<!-- 月份 -->
<u-form-item label="预估工时:" prop="userInfo.plan_hours" borderBottom
ref="item5">
<u--input v-model="model1.userInfo.plan_hours" disabledColor="#ffffff"
placeholder="请选择" border="none"></u--input>
<u-form-item label="预估工时:" prop="userInfo.plan_hours" borderBottom ref="item5">
<u--input v-model="model1.userInfo.plan_hours" disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
</u-form-item>
<!-- 关联项目 -->
<u-form-item label="关联项目:" prop="userInfo.project" borderBottom
@ -114,8 +113,8 @@
<!-- <u-datetime-picker :show="endtime" :value="end_time" mode="datetime" closeOnClickOverlay
@confirm="end_timeConfirm" @cancel="end_timeClose"
@close="end_timeClose"></u-datetime-picker> -->
<u-calendar :show="endtime"
color="#f56c6c" mode='single' @close="end_timeClose" @confirm="end_timeConfirm" @cancel="end_timeClose"></u-calendar>
<u-calendar :show="endtime" color="#f56c6c" mode='single' @close="end_timeClose"
@confirm="end_timeConfirm" @cancel="end_timeClose"></u-calendar>
<!-- 结束月份 -->
<u-datetime-picker :show="endmonth" :value="plan_hours" mode="date" closeOnClickOverlay
@confirm="end_monthConfirm" @cancel="end_monthClose"
@ -160,8 +159,8 @@
defaultIndex1: [0, 0, 0],
defaultIndex2: [0, 0, 0],
columns3: [],
columns4: [],
columns5: [],
columns4: [],
columns5: [],
director_name: '', //
assist_admin_names: '', //
priority_status: '', //
@ -259,6 +258,9 @@
},
actions6: [{
name: '待办的',
id: '1',
},{
name: '进行中',
id: '2',
}, {
@ -286,7 +288,7 @@
})
// this.buname=
// console.log(this.columns3[0])
// //console.log(this.columns3[0])
this.getDeatil(option.data)
}
@ -380,7 +382,7 @@
this.$nextTick(() => {
this.columns3 = codelist
this.columns4 = codelist
})
@ -455,13 +457,13 @@
},
groupChange(n) {
// console.log('groupChange', n);
// //console.log('groupChange', n);
},
navigateBack() {
uni.navigateBack()
},
Select3(e) {
console.log(e)
//console.log(e)
this.cate = e.name
this.model1.userInfo.cate = e.index //id
this.$refs.form1.validateField('userInfo.cate')
@ -482,7 +484,7 @@
this.$refs.form1.validateField('userInfo.flow_status')
},
change(e) {
// console.log(e);
// //console.log(e);
},
//
start_timeClose() {
@ -501,7 +503,7 @@
},
end_timeConfirm(e) {
this.endtime = false
console.log(e)
//console.log(e)
this.model1.userInfo.end_time = e[0]
// this.$refs.form1.validateField('userInfo.end_time')
},
@ -569,7 +571,7 @@
let userInfo = this.model1.userInfo
const arr = Object.values(userInfo)
const bool = arr.every(item => item)
console.log(bool, this.model1.userInfo)
//console.log(bool, this.model1.userInfo)
if (bool) {
// this.model1.userInfo.director_uid = this.list[0].id + ''
@ -577,7 +579,7 @@
// this.model1.userInfo.assist_check_ids = this.list[2].id + ''
// this.model1.userInfo.ueditorcontent = this.model1.userInfo.content
// const { msg } = await this.addNewTask(this.model1.userInfo)
console.log(this.model1.userInfo);
//console.log(this.model1.userInfo);
this.model1.userInfo.assist_admin_ids = this.model1.userInfo.assist_admin_ids.toString()
const res = await addprojecttask(this.model1.userInfo)
if (res.code == 0) {
@ -618,20 +620,20 @@
},
//picker
showPicker(index) {
console.log(index);
//console.log(index);
this.index = index + 1
this[`show${index + 1}`] = true
},
change(e) {
// console.log('change', e);
// //console.log('change', e);
},
showPicker(index) {
this.index = index + 1
this[`flag${index + 1}`] = true
},
close() {
// console.log('close');
// //console.log('close');
this[`flag${this.index}`] = false
},
confirm(e) {
@ -665,7 +667,7 @@
this[`flag${this.index}`] = false
},
cancel() {
// console.log('cancel');
// //console.log('cancel');
this[`flag${this.index}`] = false
},

View File

@ -179,7 +179,7 @@
validateForm: function() {
let that = this,
value = that.merchantData;
console.log(value.connect_uids.length,that.merchantData)
//console.log(value.connect_uids.length,that.merchantData)
if (value.uid.length == 0) return Toast(
'请选择离职人'
);
@ -207,7 +207,7 @@
this.columns4.push(deArr)
this.columns5.push(deArr)
this.columns6.push(deArr)
// console.log(deArr)
// //console.log(deArr)
},
//
showck() {
@ -240,34 +240,34 @@
this.columns4 = []
this.columns5 = []
this.columns6 = []
// console.log(e)
// //console.log(e)
// this.merchantData.from_did = e.value[0].id
this.companyname1 = e.value[0].title
this.getemployeelist(e.value[0].pid)
this.flag1 = false
},
confirm1(e) {
console.log(e)
//console.log(e)
this.merchantData.lead_admin_id = e.value[0].id
this.companyname2 = e.value[0].name
this.flag2 = false
},
confirm2(e) {
console.log(e)
//console.log(e)
this.merchantData.uid = e.value[0].id
this.buname = e.value[0].name
this.flag3 = false
},
confirm3(e) {
console.log(e)
//console.log(e)
this.merchantData.connect_uids = e.value[0].id
this.buname1 = e.value[0].name
this.flag4 = false
},
async submit() {
let that = this
console.log(that.validate)
//console.log(that.validate)
if (this.validateForm() && this.validate) {
const res = await leaveadd(this.merchantData)
Toast(res.msg);

View File

@ -254,11 +254,11 @@
})
// this.buname=
// console.log(this.columns3[0])
// //console.log(this.columns3[0])
let data = JSON.parse(decodeURIComponent(option.data));
console.log(data)
//console.log(data)
this.model1.userInfo.id = data.id
this.start_time=data.start_time_a+'-'+data.start_time_b
this.end_time=data.end_time_a+'-'+data.end_time_b
@ -440,7 +440,7 @@
},
groupChange(n) {
// console.log('groupChange', n);
// //console.log('groupChange', n);
},
navigateBack() {
uni.navigateBack()
@ -468,7 +468,7 @@
this.$refs.form1.validateField('userInfo.flow_status')
},
change(e) {
// console.log(e);
// //console.log(e);
},
//
start_timeClose() {
@ -558,11 +558,11 @@
let userInfo = this.model1.userInfo
const arr = Object.values(userInfo)
const bool = arr.every(item => item)
console.log(bool, this.model1.userInfo)
//console.log(bool, this.model1.userInfo)
if (bool) {
console.log(this.model1.userInfo);
//console.log(this.model1.userInfo);
const res = await addschedule(this.model1.userInfo)
if (res.code == 0) {
@ -603,20 +603,20 @@
},
//picker
showPicker(index) {
console.log(index);
//console.log(index);
this.index = index + 1
this[`show${index + 1}`] = true
},
change(e) {
// console.log('change', e);
// //console.log('change', e);
},
showPicker(index) {
this.index = index + 1
this[`flag${index + 1}`] = true
},
close() {
// console.log('close');
// //console.log('close');
this[`flag${this.index}`] = false
},
confirm(e) {
@ -646,7 +646,7 @@
this[`flag${this.index}`] = false
},
cancel() {
// console.log('cancel');
// //console.log('cancel');
this[`flag${this.index}`] = false
},

View File

@ -28,7 +28,7 @@
import {
oaapprove,
} from '@/api/oa.js'
export default {
data() {
@ -37,13 +37,7 @@
src: 'https://cdn.uviewui.com/uview/album/1.jpg'
}
},
onReady() {
uni.setNavigationBarColor({
frontColor: '#ffffff',
backgroundColor: '#0122c7'
})
},
onLoad() {
this.getList()
},
@ -64,30 +58,38 @@
result[type].data.push(item);
return result;
}, {});
this.appDataList=groupedData
this.appDataList = groupedData
},
lineCentClick(item) {
if(item.id=='9998'){
if (item.id == '9998') {
uni.navigateTo({
url: '/pages/resources/index'
})
}else if(item.id=='9999'){
} else if (item.id == '9999') {
uni.navigateTo({
url: '/pages/finance/index'
})
}else{
} else if (item.id == '9997') {
uni.navigateTo({
url: '/pages/leaveapplication/index?type='+item.id
url: '/pages/invoice/add'
})
} else if (item.id == '9996') {
uni.navigateTo({
url: '/pages/reimbursementapplication/index'
})
} else {
uni.navigateTo({
url: '/pages/leaveapplication/index?type=' + item.id
})
}
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()

View File

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

View File

@ -32,8 +32,8 @@
</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>
<view class="middle-one-time">时间:{{item.create_time}}</view>
<!-- <view class="middle-one-time">结束时间{{item.end_time}}</view> -->
</liu-swipe-action>
<!-- <view class="middle-edit" @click="editpart(item)">
编辑
@ -146,7 +146,7 @@
async initList2() {
this.loadConfig.page = 1;
this.loadConfig.status = "loadmore";
this.list3 = [];
this.list2= [];
await this.getlist2()
},
async getlist() {
@ -207,7 +207,7 @@
//
clickItem(data) {
console.log(data)
//console.log(data)
if (data.id == 2) {
uni.showModal({
content: '确定要删除吗',
@ -254,7 +254,7 @@
})
},
tian(item) {
// console.log(item)
// //console.log(item)
if (this.num == 1) {
uni.navigateTo({
url: '/pages/leave_request/index?type=' + item.id

View File

@ -1,7 +1,7 @@
<template>
<view class="content">
<view class="content-middle" :style="{'opacity':!screenShow?'0.4':''}">
<view class="content-middle">
<view class="content-middle-three" v-if="list.length>0">
<view class="middle-three">
@ -38,38 +38,7 @@
</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>
@ -182,20 +151,20 @@
},
//
async clickItem(data) {
// console.log(e)
// //console.log(e)
if (data.id == 2) {
let res = await incomeview({
let res = await incomeview({
id: this.list[data.index].id
})
let data1=res.data
let data1 = res.data
uni.showModal({
content: '确定要删除吗',
success: (e) => {
if (e.confirm) {
this.deleteDepartment(this.list[data.index].id,data1.income[0].inid)
this.deleteDepartment(this.list[data.index].id, data1.income[0].inid)
}
}
})
@ -206,11 +175,11 @@
},
//
async deleteDepartment(id,inid) {
async deleteDepartment(id, inid) {
const res = await deleteincome({
id: id,
inid:inid
inid: inid
})
if (res.code == 0) {
@ -362,8 +331,7 @@
.content-middle-three {
margin-top: 26rpx;
background-color: #FFFFFF;
padding: 28rpx 28rpx;
.middle-three {
.middle-threea {
@ -375,7 +343,9 @@
}
.middle-threeb {
background-color: #FFFFFF;
padding: 28rpx 28rpx;
margin-bottom: 20rpx;
.middle-threeb-title {
height: 98rpx;

View File

@ -291,7 +291,7 @@
},
//
clickItem(data) {
console.log(data)
//console.log(data)
if (data.id == 2) {
uni.showModal({
content: '确定要作废发票吗',

View File

@ -88,12 +88,12 @@
},
methods: {
deliveryWayChangeone(e) {
console.log(e)
//console.log(e)
},
deliveryWayChangetwo(e) {
console.log(e)
//console.log(e)
}
}
};

View File

@ -47,8 +47,9 @@
</view>
</view>
</view>
<view class="content-banner">
<view class="content-banner-title" style="display: flex;justify-content: space-between;" @click="daiban">
<view class="content-banner" v-if="list2.length>0">
<view class="content-banner-title" style="display: flex;justify-content: space-between;"
@click="daiban">
<view class="">
待办事项
</view>
@ -121,7 +122,7 @@
</view>
</view>
</view>
<view class="content-banner1">
<view class="content-banner1" v-if="list5.length>0">
<view class="content-banner-title">
<view class="">
公告
@ -281,6 +282,14 @@
this.getDtlist()
this.getDtlist1()
},
onPullDownRefresh() {
this.getList()
this.getDtnote()
this.getDocumentList2()
this.getDtlist()
this.getDtlist1()
uni.stopPullDownRefresh()
},
methods: {
login() {
uni.reLaunch({
@ -306,10 +315,10 @@
let res = await tasksubjec()
this.list2 = res.data
},
spclickItem(item){
console.log(item)
spclickItem(item) {
//console.log(item)
uni.navigateTo({
url:'/pages/leave_request/index?type='+item.id
url: '/pages/leave_request/index?type=' + item.id
})
},
//
@ -324,11 +333,11 @@
this.list4 = res.data.data
},
//
daiban(){
daiban() {
uni.navigateTo({
url:'/pages/waitlist/index'
url: '/pages/waitlist/index'
})
},
@ -523,7 +532,6 @@
.top_class {
display: flex;
flex-wrap: wrap;
padding: 28rpx 28rpx;
.top_class-one {
@ -619,7 +627,7 @@
.my_msg-con {
display: flex;
margin-top: 138rpx;
margin-bottom: 46rpx;
margin-bottom: 16rpx;
margin-left: 28rpx;
.name_work {
@ -671,13 +679,15 @@
.content-banner {
width: 694rpx;
height: 221rpx;
background: #FFFFFF;
border-radius: 21rpx 21rpx;
margin: 0 auto;
margin-top: -100rpx;
padding-left: 28rpx;
padding-top: 28rpx;
padding-bottom: 28rpx;
.content-banner-title {
@ -725,13 +735,14 @@
.content-banner1 {
width: 694rpx;
height: 221rpx;
background: #FFFFFF;
border-radius: 21rpx 21rpx;
margin: 0 auto;
margin-top: 25rpx;
padding-left: 28rpx;
padding-top: 28rpx;
padding-bottom: 28rpx;
.content-banner-title {
display: flex;

View File

@ -14,7 +14,7 @@
</view>
<view class="cont_cell">
<view class="title">报销凭证编号</view>
<input type="text" v-model="listobj.code" placeholder="报销凭证编号">
<input type="text" v-model="listobj.code" disabled placeholder="报销凭证编号">
</view>
<view class="cont_cell">
@ -26,9 +26,9 @@
<input type="text" v-model="listobj.income_month" disabled placeholder="入账月份">
</view>
<view class="leava_type flex_a_c">
<view class="title">报销项目</view>
<input type="text" v-model="project" placeholder="请选择" disabled @click="leavaShow1">
<view class="cont_cell">
<view class="title">关联项目</view>
<input type="text" v-model="project" placeholder="请选择" disabled>
</view>
@ -37,18 +37,18 @@
<view class="leave_box">
<view class="" v-for="(item,i) in list" :key='i'>
<view class="leava_type flex_a_c">
<view class="cont_cell">
<view class="title">报销项目</view>
<input type="text" v-model="item.cate_title" placeholder="请选择" disabled @click="leavaShow(item,i)">
<input type="text" v-model="item.cate_title" disabled placeholder="请选择" disabled>
</view>
<view class="cont_cell">
<view class="title">报销金额</view>
<input type="number" v-model="item.amount" placeholder="报销金额">
<input type="number" v-model="item.amount" disabled placeholder="报销金额">
</view>
<view class="cont_cell">
<view class="title">备注</view>
<input type="text" v-model="item.remarks" placeholder="备注">
<input type="text" v-model="item.remarks" disabled placeholder="备注">
</view>
</view>
@ -59,96 +59,228 @@
<!-- <view class="leave_box" style="padding-top: 100rpx;" v-if="fileArray.length>0"> -->
<!-- 附件 -->
<view class="" style="background-color: #fff;">
<block v-for="(item, i) in fileArray" :key="i">
<view class="" style="background-color: #fff;" v-if="fileArray.length>0">
<block v-for="(item, i) in fileArray" :key="i" @click="downloadFile(item)">
<view class="file flex_a_c_j_sb">
<view class="l_file">
<view class="file_name">{{ item.name }}</view>
<view class="file_size">{{ item.filesize }}</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&& listobj.check_status!= 2&&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 class="leave_box" style="padding-top: 20rpx;" v-if="listobj.check_status== 3&&is_create_admin==1">
<view class="cont_cell" style="padding-top: 20rpx;">
<view class="title" style="width: 200rpx;">撤回意见</view>
<textarea v-model="mscontent" placeholder="请输入撤回意见"
style="padding-top: 20rpx;padding-left: 20rpx;border:1px solid#f1f1f1;padding :20rpx;20rpx;" />
</view>
</view>
<view class="flow_path">
<view class="cont_cell">
<view class="title">审批流程</view>
</view>
<view class="" style="border-bottom: 1px solid #f7f7f7;border-top: 1px solid #f7f7f7;">
<view class="record" style="display: flex;">
<view class="circle"></view>
<view class="text">{{nodelist.create_user}}创建</view>
</view>
<view class="" v-for="(itemh,m) in nodelist.flows" :key='m'>
<view class="record" style="display: flex;">
<view class="circle"></view>
<view class="" v-if='itemh.flow_type==1||itemh.flow_type==2' style="display: flex;">
<view class="text">{{itemh.flow_type==1?'部门负责人':'上级部门负责人'}}</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length>0">
<view class="text" v-if="itemh.check_list[0].status == 1">通过</view>
<view class="text" v-else-if="itemh.check_list[0].status == 2">拒绝</view>
</view>
<view class="" v-else>
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==7||itemh.flow_type== 6' style="display: flex;">
<view class="text">{{itemh.flow_type==7?'部门分管领导':'上级部门分管领导'}}</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length>0">
<view class="text" v-if="itemh.check_list[0].status == 1">通过</view>
<view class="text" v-else-if="itemh.check_list[0].status == 2">拒绝</view>
</view>
<view class="" v-else>
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==0'>
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.check_list.length<=0">
<view class="text">待审核</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==3' style="display: flex;">
<view class="text">指定人或签</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info.length>0">
<view class=""
v-if="itemh.user_id_info[0].status!=1&&itemh.user_id_info[0].status!=2">
<view class="text">待审核</view>
</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info" :key='o'>
<view class="text" v-if="itemk.status == 1">通过</view>
<view class="text" v-else-if="itemk.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==4' style="display: flex;">
<view class="text">指定人员(会签)</view>
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info[0].status!=0&&itemh.user_id_info[0].status!=2">
<view class="text">通过</view>
</view>
<view class="" v-if="itemh.user_id_info.length>0">
<view class="text" v-for="(itemj, j) in itemh.user_id_info" :key='j'>
<view class="text" v-if="itemj.status == 0">待审核</view>
<view class="text" v-else-if="itemj.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
<view class="" v-else-if='itemh.flow_type==5' style="display: flex;">
<view class="text" v-for="(itemk, o) in itemh.user_id_info">
{{itemk.name}}
</view>
<view class="" v-if="check_step_sort==itemh.sort">
<view class="text">当前审核</view>
</view>
<view class="" v-else>
<view class="" v-if="itemh.user_id_info.length>0">
<view class=""
v-if="itemh.user_id_info[0].status!=0&&itemh.user_id_info[0].status!=2">
<view class="text">通过</view>
</view>
<view class="text" v-for="(itemj, j) in itemh.user_id_info" :key='j'>
<view class="text" v-if="itemj.status == 0">待审核</view>
<view class="text" v-else-if="itemj.status == 2">拒绝</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view style=" border-bottom: 1px solid #f7f7f7;" v-if="check_record.length>0">
<block v-for="(item,i) in check_record" :key="i">
<view class="record" style="display: flex;">
<view class="circle"></view>
<text class="text">{{item.check_time_str}} {{item.name}} {{item.status_str}}
了此申请操作意见{{item.content}}</text>
</view>
</block>
</view>
<view class="cont_cell">
<view class="title">审核状态</view>
{{listobj.check_status=='0'?'待审核':listobj.check_status=='1'?'审核中':listobj.check_status=='2'?'审核通过':listobj.check_status=='3'?'审核不通过':listobj.check_status=='4'?'撤销审核':'已开具'}}
</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>
</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'?'审核不通过':listobj.check_status=='4'?'撤销审核':'已开具'}}
</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=" listobj.check_status!= 2&&ktype!=0">
<view class="bot_btn" v-if="listobj.check_status!= 4">
<view class="bot_btn" v-if="listobj.check_status== 3&&is_create_admin==1">
<!-- <view class="reset" @click="reset">重置</view> -->
<view class="submit_btn" @click="submiteBtn">撤回</view>
</view>
<view class="bot_btn" v-else>
<view class="bot_btn" v-if="listobj.check_status== 4&&is_create_admin==1">
<!-- <view class="reset" @click="reset">重置</view> -->
<view class="submit_btn" @click="bianjiBtn">重新编辑</view>
</view>
<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>
<!-- 选择时间 -->
</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>
<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>
@ -168,11 +300,15 @@
projectlist,
appexpenseview,
appflow_check,
flownodes
} from '@/api/oa.js'
import lsjUpload from '@/uni_modules/lsj-upload/components/lsj-upload/lsj-upload.vue'
import {
FILE_URL
} from '@/api/file.js'
import {
HTTP_REQUEST_URL
} from '@/config/app.js'
export default {
components: {
lsjUpload
@ -212,7 +348,10 @@
fileArray: [],
dnum: 0,
check_record: [],
ktype: 1
ktype: 1,
nodelist: {},
check_step_sort: '',
is_create_admin: 0
}
},
onLoad(option) {
@ -229,7 +368,7 @@
},
//
this.timestamp = Date.parse(new Date());
this.getPersonInfo()
// this.getPersonInfo()
this.getlist()
this.getlist1()
this.getDocumentList()
@ -238,12 +377,25 @@
methods: {
//
async flownodes(val) {
let res = await flownodes({
id: val,
type: 2
})
this.nodelist = res.data
// console.log(res)
},
async detail(id) {
let res = await appexpenseview({
id: id
})
// console.log(res,'111')
this.flownodes(id)
this.listobj.code = res.data.detail.code
this.check_step_sort = res.data.detail.check_step_sort
this.is_create_admin = res.data.detail.is_create_admin
this.listobj.id = id
this.list = res.data.detail.list
this.listobj.expense_time = res.data.detail.expense_time
@ -254,18 +406,21 @@
this.listobj.flow_id = res.data.flows.id
this.listobj.ptid = res.data.detail.ptid
this.check_record = res.data.check_record
this.personInfo.name = res.data.detail.create_user
this.personInfo.department_name = res.data.detail.department
this.listobj.check_status = res.data.detail.check_status
if ( res.data && res.data.detail && res.data.detail.fileArray) {
if (res.data && res.data.detail && res.data.detail.fileArray) {
this.fileArray = res.data.detail.fileArray.map(function(obj) {
return {
name: obj.name,
filepath: obj.filepath,
fileext: obj.fileext,
filesize: obj.filesize
};
});
}
// console.log(this.fileArray,'11111111111', res.data.detail)
},
@ -395,6 +550,35 @@
url: '/pages/reimbursementapplication/bianji??type=' + this.listobj.id
})
},
downloadFile(item) {
uni.downloadFile({
url: HTTP_REQUEST_URL + item.filepath,
success: function(res) {
if (res.statusCode === 200) {
const tempFilePath = res.tempFilePath;
if (item.fileext == 'png' || item.fileext == 'jpg') {
uni.previewImage({
urls: [tempFilePath]
});
} else {
uni.showModal({
title: '提示',
content: '暂时不支持查看,请登录后台查看',
success: function(res) {
if (res.confirm) {
// console.log('');
} else if (res.cancel) {
// console.log('');
}
}
});
}
}
}
});
},
//
leavaShow(item, i) {
this.dnum = i
@ -414,7 +598,7 @@
branchConfirm1(e) {
console.log('confirm', e, e.value[2].name)
if (this.listobj.copy_uids) {
this.listobj.copy_uids += e.value[2].id
this.listobj.copy_uids += e.value[2].id + ','
} else {
this.listobj.copy_uids = e.value[2].id
}
@ -444,6 +628,12 @@
}
let res = await appflow_check(data)
// console.log(res)
if (res.code == 0) {
uni.navigateBack({
delta: 1
})
}
Toast(res.msg)
// const res = await appexpense(this.listobj)
@ -589,6 +779,13 @@
padding-bottom: 100px;
}
.cont_cell {
input {
width: 450rpx;
}
}
.leave_box,
.flow_path {
width: 100%;
@ -641,9 +838,9 @@
min-height: 87.72rpx;
border-bottom: 1px solid #f7f7f7;
.title {
font-size: 31.58rpx;
}
}
//
@ -681,6 +878,7 @@
.record {
position: relative;
margin-bottom: 14.04rpx;
margin-top: 14.04rpx;
.circle {
width: 31.58rpx;
@ -688,51 +886,19 @@
background-color: #fff;
border: 2px solid #34A853;
border-radius: 50%;
margin: 5px;
margin: 3px;
display: flex;
flex-direction: column;
align-items: center;
&::before {
content: "";
display: block;
position: absolute;
clear: both;
width: 1px;
height: 100%;
background-color: rgba(204, 204, 204, 0.5);
margin: 31.58rpx;
}
}
.text {
flex: 1;
margin-left: 7.02rpx;
}
}
.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 {

View File

@ -6,7 +6,7 @@
</view>
<view class="liu-slide-right">
<view class="btn-item" v-for="(item,index) in btnList" :key="index"
:style="'width:'+item.width+';height:'+100+'rpx;line-height:'+100+'rpx;margin-top:'+height/3+'rpx; background-color:'+item.bgColor+';color:'+item.color+';font-size:'+item.fontSize"
:style="'width:'+item.width+';height:'+100+'rpx;line-height:'+100+'rpx; background-color:'+item.bgColor+';color:'+item.color+';font-size:'+item.fontSize"
@click.stop="clickItem(item)">
<!-- <view class="liu-slide-right-img">
<image src="@/static/images/delete.png" mode="aspectFit"></image>
@ -152,12 +152,11 @@
.liu-slide-right {
position: absolute;
top: 0rpx;
top: 35%;
right: 0;
z-index: 1;
display: flex;
/* justify-content: flex-end; */
}

View File

@ -33,8 +33,8 @@
methods: {
//点击操作回调事件
clickItem(e) {
console.log('所点击的列表索引:' + e.index)
console.log('所点击的按钮id' + e.id)
//console.log('所点击的列表索引:' + e.index)
//console.log('所点击的按钮id' + e.id)
}
}
}

View File

@ -12,7 +12,6 @@
],
"repository": "",
"engines": {
"HBuilderX": "^3.4.9"
},
"dcloudext": {
"sale": {

View File

@ -110,7 +110,7 @@
item.height = uni.$u.addUnit(rowHeight)
rows.push(item)
}
// console.log(rows);
// //console.log(rows);
return rows
},
uTitleWidth() {

View File

@ -12,7 +12,7 @@ const encode = (key, data='')=>{
uni.setStorageSync(key, str)
return true;
}catch(e){
console.log(e);
//console.log(e);
return false;
}
}
@ -25,7 +25,7 @@ const decode = (key)=>{
isJSON(str) ? str = JSON.parse(str) : null;
return str;
}catch(e){
console.log(e);
//console.log(e);
return undefined;
}
}

View File

@ -47,7 +47,7 @@ function baseRequestTwo(url, method, data, {
data: data || {},
success: (res) => {
// #ifdef APP-PLUS
console.log('app', Url + '/api/' + url, res.data);
//console.log('app', Url + '/api/' + url, res.data);
// #endif
if (noVerify)
// reslove(res.data, res);
@ -73,7 +73,7 @@ function baseRequestTwo(url, method, data, {
},
fail: (message) => {
console.log('message', message);
//console.log('message', message);
reject('请求失败');
}
})

View File

@ -1,6 +1,6 @@
// 引用方式
var jpushModule = uni.requireNativePlugin("JG-JPush");
// console.log('【sk】【引用方式】【jpushModule】【requireNativePlugin】')
// //console.log('【sk】【引用方式】【jpushModule】【requireNativePlugin】')
// 开启 debug 模式,默认是关闭
function openDebug() {
@ -17,7 +17,7 @@ function getRegistrationID(skBack) {
jpushModule.getRegistrationID(result => {
// code number 状态码 0 - 成功, 1011 - iOS模拟器调用会报此错误
// registerID string 返回的 registrationID
console.log('【sk】获取 RegistrationID=>', result)
//console.log('【sk】获取 RegistrationID=>', result)
skBack(result.registerID)
})
}
@ -26,13 +26,13 @@ function getRegistrationID(skBack) {
function openSettingsForNotification() {
jpushModule.openSettingsForNotification((result) => {
// code number 0 - 成功 1 - 失败
console.log('【sk】跳转至系统设置页面result=>', result.code)
//console.log('【sk】跳转至系统设置页面result=>', result.code)
})
}
// 初始化SDK iOS 说明:如果在mainfest.json里 将JPUSH_DEFAULTINITJPUSH_IOS值配置为"true"插件内部将默认初始化JPush用户则不需要调用该初始化方法。
function initJPushService() {
console.log(jpushModule)
//console.log(jpushModule)
jpushModule.initJPushService()
}
@ -40,7 +40,7 @@ function initJPushService() {
function addConnectEventListener(skBack) {
jpushModule.addConnectEventListener(result => {
// connectEnable boolean true - 已连接, false - 未连接
console.log('【sk】连接状态回调=>', result.connectEnable)
//console.log('【sk】连接状态回调=>', result.connectEnable)
skBack(result.connectEnable);
})
}
@ -57,7 +57,7 @@ function addNotificationListener(skBack) {
// iOS dictionary 对应原生返回的通知内容,如需要更多字段请查看该字段内容
// android dictionary 对应原生返回的通知内容,如需要更多字段请查看该字段内容
// notificationEventType string 分为notificationArrived和notificationOpened两种
console.log('【sk】通知事件回调result=>', result)
//console.log('【sk】通知事件回调result=>', result)
skBack(result);
})
}
@ -68,7 +68,7 @@ function addCustomMessageListener(skBack) {
// messageID string 唯一标识通知消息的 ID
// content string 对应 Portal 推送通知界面上的“通知内容”字段
// extras dictionary 对应 Portal 推送消息界面上的“可选设置”里的附加字段
console.log('【sk】自定义消息事件回调result=>', result)
//console.log('【sk】自定义消息事件回调result=>', result)
skBack(result);
})
}
@ -79,7 +79,7 @@ function addInMessageListener(skBack) {
// eventType string show - 应用内消息展示 disappear - 应用内消息已消失 click - 应用内消息点击
// messageType string 消息类型, eventType 不为 disappear时返回, inMessageNoti - 通知类型的inMessage
// content dictionary 应用内消息内容, eventType 不为 disappear 时返回
console.log('【sk】应用内消息回调result=>', result)
//console.log('【sk】应用内消息回调result=>', result)
skBack(result);
})
}
@ -91,7 +91,7 @@ function addLocalNotificationListener(skBack) {
// title string 对应“通知标题”字段
// content string 对应“通知内容”字段
// extras dictionary 对应“附加内容”字段
console.log('【sk】本地通知事件回调result=>', result)
//console.log('【sk】本地通知事件回调result=>', result)
skBack(result);
})
}
@ -130,7 +130,7 @@ function addTagAliasListener(skBack) {
// tag string 执行查询指定tag(queryTag)操作时会返回
// tagEnable boolean 执行查询指定tag(queryTag)操作时会返回是否可用
// alias string 对alias进行操作时返回
console.log('【sk】标签别名事件回调result=>', result)
//console.log('【sk】标签别名事件回调result=>', result)
skBack(result);
})
}
@ -183,7 +183,7 @@ function getAllTags(e) {
// 设置别名
function setAlias(e) {
console.log('设置别名', e)
//console.log('设置别名', e)
jpushModule.setAlias({
'alias': e.alias ? e.alias : '', // string 有效的别名组成:字母(区分大小写)、数字、下划线、汉字、特殊字符@!#$&*+=.|
'sequence': e.sequence ? e.sequence : 1 // number 请求时传入的序列号,会在回调时原样返回
@ -237,7 +237,7 @@ function addMobileNumberListener(skBack) {
jpushModule.addMobileNumberListener(result => {
// code number 状态码 0 - 成功
// sequence number 请求时传入的序列号,会在回调时原样返回
console.log('【sk】设置手机号码回调result=>', result)
//console.log('【sk】设置手机号码回调result=>', result)
skBack(result);
})
}

View File

@ -20,7 +20,7 @@ function baseRequest(url, method, data, {
noAuth = false,
noVerify = false
}) {
console.log('当前环境', process.env.NODE_ENV);
//console.log('当前环境', process.env.NODE_ENV);
let Url = HTTP_REQUEST_URL,
header = HEADER;
@ -45,7 +45,7 @@ function baseRequest(url, method, data, {
data: data || {},
success: (res) => {
// #ifdef APP-PLUS
console.log('app', Url + '/api/' + url, res.data);
//console.log('app', Url + '/api/' + url, res.data);
// #endif
if (noVerify)
reslove(res.data, res);

View File

@ -49,7 +49,7 @@ function connect(url) {
});
socket.onOpen(() => {
console.log('WebSocket 连接已打开');
//console.log('WebSocket 连接已打开');
});
socket.onError((error) => {
@ -57,11 +57,11 @@ function connect(url) {
});
socket.onClose((e) => {
console.log('WebSocket 连接已关闭', e);
//console.log('WebSocket 连接已关闭', e);
});
socket.onMessage((event) => {
console.log('收到服务器消息', event.data);
//console.log('收到服务器消息', event.data);
// 处理收到的消息
});
}