初始化产品库
399
src/pages/workonline/approvalopinion.vue
Normal file
@@ -0,0 +1,399 @@
|
||||
<template>
|
||||
<div class="approvalopinion">
|
||||
<div class="nobtn">
|
||||
<div class="approvalopinion_text">
|
||||
<!-- 拒绝时写固定的意见 -->
|
||||
<div class="list" v-if="type == 0">
|
||||
<div class="textarea_msgfont">
|
||||
<span class="msgfont">
|
||||
<span class="icon">*</span>
|
||||
<span> 审批意见:</span>
|
||||
</span>
|
||||
<textarea :maxlength="150" placeholder="请输入审批意见" v-model="opinion" class="textarea" clearable="false"> </textarea>
|
||||
<div class="clearn" @click="clearn">清空内容</div>
|
||||
<div class="msg_length">
|
||||
<span class="font">{{ opinion.length }}</span>
|
||||
<span>/150</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 同意意见 -->
|
||||
<div v-if="type == 1">
|
||||
<div class="list" v-for="(item, index) in list" :key="index">
|
||||
<div class="textarea_msgfont" v-if="item.fieldDataType == 1">
|
||||
<span class="msgfont">
|
||||
<span class="icon" v-if="item.mustFill == 1">*</span>
|
||||
<span> {{ item.fieldName }}:</span>
|
||||
</span>
|
||||
<textarea :maxlength="150" placeholder="请输入审批意见" v-model="item.fieldValue" class="textarea" clearable="false"> </textarea>
|
||||
<div class="clearn" @click="clearn">清空内容</div>
|
||||
<div class="msg_length">
|
||||
<span class="font">{{ item.fieldValue.length }}</span>
|
||||
<span>/{{ item.fieldLength }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 入户调查时间 -->
|
||||
<!-- v-if="item.fieldType == 3 && item.fieldDataType == 8" .-->
|
||||
<div class="calendar" v-if="item.fieldDataType == 8">
|
||||
<div class="left">
|
||||
<span class="icon" v-if="item.mustFill == 1">*</span>
|
||||
<span> {{ item.fieldName }}:</span>
|
||||
</div>
|
||||
<div class="left">
|
||||
<u-input type="text" @click="timeSelect(index)" class="right" placeholder="请选择" disabled v-model="item.fieldValue"></u-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 附件资料 -->
|
||||
<div class="reply_files">
|
||||
<text class="img">附件资料</text>
|
||||
<text class="img_text">(最多支持9个附件)</text>
|
||||
<!-- 单个文件最大10MB.zip、.rar、.doc、.docx、.xls、.xlsx、.ppt、.pptx、.pdf、.txt、.jpg、.png格式 -->
|
||||
<div class="upload">
|
||||
<div class="info">
|
||||
<ai-uploader multiple @list="(v) => (annex = v)" :limit="9" action="/admin/file/add2" type="file" placeholder="添加文件" preview />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 图片资料 -->
|
||||
<div class="reply_img">
|
||||
<text class="img">图片资料</text>
|
||||
<text class="img_text">(最多9张)</text>
|
||||
<div class="upload">
|
||||
<div class="info">
|
||||
<ai-uploader multiple @list="(v) => (picture = v)" :limit="9" :size="2097152" preview />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn" @click="btn">确定</div>
|
||||
|
||||
<!-- 日期选择器 -->
|
||||
<u-calendar v-model="show" :mode="mode" @change="calendar" />
|
||||
<back />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/AiBack'
|
||||
import AiUploader from '../../components/AiUploader'
|
||||
|
||||
export default {
|
||||
name: '',
|
||||
// 组件
|
||||
components: {
|
||||
back,
|
||||
AiUploader,
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
mode: 'date',
|
||||
show: false,
|
||||
list: [],
|
||||
type: '',
|
||||
picture: [],
|
||||
pass: false,
|
||||
annex: [],
|
||||
stepList: '',
|
||||
filedIndex: 0,
|
||||
fileNameList: [],
|
||||
opinion: '',
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.objid = options.id
|
||||
this.type = options.type
|
||||
|
||||
this.getList()
|
||||
},
|
||||
// 计算
|
||||
computed: {},
|
||||
// 监听
|
||||
watch: {},
|
||||
// 实例创建后
|
||||
onShow() {},
|
||||
// 实例渲染后
|
||||
mounted() {},
|
||||
// 方法
|
||||
methods: {
|
||||
timeSelect(index) {
|
||||
// console.log(index)
|
||||
this.filedIndex = index
|
||||
this.show = true
|
||||
},
|
||||
clearn() {
|
||||
this.opinion = ''
|
||||
this.list.map((item) => {
|
||||
if (item.mustFill == 1 && item.fieldValue) {
|
||||
item.fieldValue = ''
|
||||
}
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
this.$http
|
||||
.post(`/app/approv-alapply-info/approval-popup?type=${this.type}&id=${this.objid}`)
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
res.data.fieldInfos.map((item) => {
|
||||
if (item.fieldDataType == 1) {
|
||||
item.fieldValue = ''
|
||||
}
|
||||
|
||||
if (item.fieldType == 3) {
|
||||
this.list.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
// this.$u.toast(err)
|
||||
})
|
||||
},
|
||||
// 提交确定
|
||||
btn() {
|
||||
if (this.type == 0 && this.opinion == '') {
|
||||
return uni.showToast({
|
||||
title: '请输入审批意见',
|
||||
icon: 'none',
|
||||
})
|
||||
}
|
||||
|
||||
// var isConfirm = true
|
||||
|
||||
if (
|
||||
this.list.some((item) => {
|
||||
if (item.mustFill == 1 && !item.fieldValue) {
|
||||
uni.showToast({
|
||||
title: item.fieldName + '为必填',
|
||||
icon: 'none',
|
||||
})
|
||||
return true
|
||||
}
|
||||
})
|
||||
)
|
||||
return
|
||||
|
||||
// if (!isConfirm) {
|
||||
// return
|
||||
// }
|
||||
|
||||
var file = []
|
||||
this.annex.map((item) => {
|
||||
file.push(item.id)
|
||||
})
|
||||
// console.log(file.join(','))
|
||||
|
||||
var img = []
|
||||
this.picture.map((item) => {
|
||||
img.push(item.id)
|
||||
})
|
||||
var params = {
|
||||
id: this.objid,
|
||||
picture: img.join(','),
|
||||
pass: this.type == 1,
|
||||
annex: file.join(','),
|
||||
fieldInfos: this.list,
|
||||
opinion: this.opinion,
|
||||
}
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
})
|
||||
|
||||
this.$http
|
||||
.post(`/app/approv-alapply-info/approval`, params)
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/workonline/truemsg?flag=1`,
|
||||
})
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/workonline/truemsg?flag=0`,
|
||||
})
|
||||
// this.$u.toast(err)
|
||||
uni.showToast({
|
||||
title: e,
|
||||
icon: 'none',
|
||||
})
|
||||
// this.$u.toast(err || '网络异常')
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
data(e) {
|
||||
this.files.push(e)
|
||||
},
|
||||
change(e) {
|
||||
this.files = e
|
||||
},
|
||||
calendar(e) {
|
||||
this.list[this.filedIndex].fieldValue = e.result
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.approvalopinion {
|
||||
height: 100%;
|
||||
|
||||
.nobtn {
|
||||
padding: 0 0 112px 0;
|
||||
|
||||
.approvalopinion_text {
|
||||
.list {
|
||||
.textarea_msgfont {
|
||||
position: relative;
|
||||
height: 400px;
|
||||
padding: 32px;
|
||||
background-color: #fff;
|
||||
|
||||
.msgfont {
|
||||
font-size: 32px;
|
||||
|
||||
.icon {
|
||||
margin-right: 8px;
|
||||
color: #ff4466;
|
||||
}
|
||||
}
|
||||
|
||||
.textarea {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.clearn {
|
||||
color: #1365dd;
|
||||
}
|
||||
|
||||
.msg_length {
|
||||
position: absolute;
|
||||
bottom: 42px;
|
||||
right: 32px;
|
||||
|
||||
.font {
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.calendar {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 20px;
|
||||
background-color: #fff;
|
||||
padding: 0 32px;
|
||||
|
||||
.left {
|
||||
.icon {
|
||||
color: #ff4466;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
width: 160px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.reply_files {
|
||||
margin-top: 20px;
|
||||
background-color: #fff;
|
||||
padding: 0 20px 0;
|
||||
|
||||
.img {
|
||||
display: inline-block;
|
||||
margin-top: 20px;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.img_text {
|
||||
font-size: 32px;
|
||||
color: #999;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.upload {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
padding: 12px 12px 12px 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
.info {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
::v-deep .info > span {
|
||||
width: 380px;
|
||||
text-align: left;
|
||||
// word-break: break-all;
|
||||
}
|
||||
|
||||
::v-deep .ai-uploader .fileList .default {
|
||||
max-width: 160px;
|
||||
max-height: 160px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.reply_img {
|
||||
margin-top: 20px;
|
||||
background-color: #fff;
|
||||
padding: 0 20px;
|
||||
box-sizing: border-box;
|
||||
|
||||
.img {
|
||||
display: inline-block;
|
||||
margin-top: 20px;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.img_text {
|
||||
font-size: 32px;
|
||||
color: #999;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.upload {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
padding: 12px 12px 12px 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
.info {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
::v-deep .ai-uploader .fileList .default {
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
line-height: 112px;
|
||||
width: 100%;
|
||||
background-color: #1355dd;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/pages/workonline/components/Profile_Picture.png
Normal file
|
After Width: | Height: | Size: 663 B |
BIN
src/pages/workonline/components/agree.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
src/pages/workonline/components/basic.png
Normal file
|
After Width: | Height: | Size: 858 B |
BIN
src/pages/workonline/components/clearn.png
Normal file
|
After Width: | Height: | Size: 217 B |
BIN
src/pages/workonline/components/end.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
src/pages/workonline/components/ing.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/pages/workonline/components/people_status_agree.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
src/pages/workonline/components/reject.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
1413
src/pages/workonline/detail.vue
Normal file
70
src/pages/workonline/truemsg.vue
Normal file
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<div class="closemsg">
|
||||
<img :src="imgSrc" alt="" />
|
||||
<text>{{ text }}</text>
|
||||
<u-button type="primary" :custom-style="{ width: '100%', borderRadius: '4px', marginTop: '48px' }" @click="goBack">{{ btnText }} </u-button>
|
||||
<back></back>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import back from '../../components/AiBack'
|
||||
|
||||
export default {
|
||||
name: 'CloseMsg',
|
||||
components: { back },
|
||||
data() {
|
||||
return {
|
||||
flag: true,
|
||||
}
|
||||
},
|
||||
onLoad(val) {
|
||||
this.flag = val?.flag == 1
|
||||
},
|
||||
methods: {
|
||||
goBack() {
|
||||
uni.navigateTo({
|
||||
// uni.navigateBack({
|
||||
// delta: 3,
|
||||
url: `/pages/workonline/workonline`,
|
||||
})
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
text() {
|
||||
return this.flag ? '提交成功!' : '提交失败'
|
||||
},
|
||||
btnText() {
|
||||
return this.flag ? '确定' : '我知道了'
|
||||
},
|
||||
imgSrc() {
|
||||
return this.flag ? this.imgOtherUrl + 'kztcg.png' : this.imgOtherUrl + 'kztsb.png'
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.closemsg {
|
||||
min-height: 100%;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 96px;
|
||||
|
||||
img {
|
||||
width: 192px;
|
||||
height: 192px;
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 36px;
|
||||
font-weight: 800;
|
||||
color: #333333;
|
||||
line-height: 50px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
213
src/pages/workonline/workonline.vue
Normal file
@@ -0,0 +1,213 @@
|
||||
<template>
|
||||
<div class="workonline">
|
||||
<!-- 顶部搜索 -->
|
||||
<div class="search">
|
||||
<u-search class="serach_content" placeholder="请输入标题" :show-action="false" v-model="keyword" @clear="search" @search="search"></u-search>
|
||||
</div>
|
||||
|
||||
<u-tabs :list="list" :is-scroll="false" :current="currentType" @change="change"></u-tabs>
|
||||
|
||||
<!-- 列表 -->
|
||||
<div style="background: #f5f5f5;">
|
||||
<div class="title" v-for="(item, index) in eventList" :key="index" @click="detail(item)">
|
||||
<u-row>
|
||||
<div>
|
||||
<!-- 审批名称 -->
|
||||
<div class="business">
|
||||
<div class="business_info">{{ item.processName }}</div>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<!-- 审批进度 -->
|
||||
<span class="item_info">审批进度:</span>
|
||||
|
||||
<!-- 申请类型 ing -->
|
||||
<span class="business_status" v-if="item.approvalStatus == 0"> {{ $dict.getLabel('listApprovalStatusHb', item.approvalStatus) }}</span>
|
||||
|
||||
<!-- end -->
|
||||
<span class="business_status_blue" v-if="item.approvalStatus == 1"> {{ $dict.getLabel('listApprovalStatusHb', item.approvalStatus) }}</span>
|
||||
|
||||
<!-- false -->
|
||||
<span class="business_status_gray" v-if="item.approvalStatus == 2">
|
||||
{{ $dict.getLabel('listApprovalStatusHb', item.approvalStatus) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_info">申请类型:</span>
|
||||
<span class="approval_time">{{ item.classificationName }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_info">申请日期:</span>
|
||||
<span class="approval_time">{{ item.createTime }}</span>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="item_info">完成日期:</span>
|
||||
<span class="approval_time">{{ item.overTime }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</u-row>
|
||||
|
||||
<span class="icon">
|
||||
<!-- ing -->
|
||||
<img src="./components/ing.png" alt="" v-if="item.approvalStatus == 0" />
|
||||
<!-- end -->
|
||||
<img src="./components/end.png" alt="" v-if="item.approvalStatus == 1" />
|
||||
<!-- false -->
|
||||
<img src="./components/reject.png" alt="" v-if="item.approvalStatus == 2" />
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'WorkOnline',
|
||||
// 组件
|
||||
components: {},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
{ name: '待我审批', type: 0 },
|
||||
{ name: '我已审批', type: 1 },
|
||||
{ name: '抄送我的', type: 3 },
|
||||
{ name: '超时督办', type: 4 },
|
||||
],
|
||||
currentType: 0, // 0待我审批 1已审批 2抄送我的 3超时
|
||||
keyword: '',
|
||||
eventList: '', // 数据列表
|
||||
// approvalStatus: '', // 审批状态 0审批中 1已完成 2被驳回
|
||||
listType: 0,
|
||||
current: 1,
|
||||
}
|
||||
},
|
||||
// 计算
|
||||
computed: {},
|
||||
// 监听
|
||||
watch: {},
|
||||
// 实例创建后
|
||||
onShow() {
|
||||
// 字典
|
||||
this.$dict.load('listApprovalStatusHb').then(() => {
|
||||
this.dictList = this.$dict.getDict('listApprovalStatusHb')
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
// 实例渲染后
|
||||
mounted() {},
|
||||
// 方法
|
||||
methods: {
|
||||
getList() {
|
||||
this.$http.post(`/app/approv-alapply-info/list?listType=${this.listType}¤t=${this.current}¶m=${this.keyword}`).then((res) => {
|
||||
if (res?.code == 0) {
|
||||
this.eventList = res.data.records
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 跳转页面的id
|
||||
detail(item) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/workonline/detail?id=${item.id}&listType=${this.listType}`,
|
||||
})
|
||||
},
|
||||
change(index) {
|
||||
this.currentType = index
|
||||
this.listType = this.list[index].type
|
||||
this.getListInit()
|
||||
},
|
||||
getListInit() {
|
||||
this.current = 1
|
||||
this.getList()
|
||||
},
|
||||
search(e) {
|
||||
this.keyword = e
|
||||
this.getList()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.workonline {
|
||||
.search {
|
||||
.serach_content {
|
||||
background-color: #fff;
|
||||
height: 104px;
|
||||
line-height: 104px;
|
||||
box-sizing: border-box;
|
||||
padding: 0 32px;
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
position: relative;
|
||||
background: #fff;
|
||||
margin: 32px;
|
||||
padding: 32px;
|
||||
|
||||
.icon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 112px;
|
||||
height: 112px;
|
||||
// background-color: pink;
|
||||
img {
|
||||
width: 112px;
|
||||
height: 112px;
|
||||
}
|
||||
}
|
||||
|
||||
.business {
|
||||
padding: 0 0 10px 0;
|
||||
|
||||
.business_info {
|
||||
// overflow: auto;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
width: 540px;
|
||||
// background-color: pink;
|
||||
font-size: 32px;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 10px 0;
|
||||
|
||||
.item_info {
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.approval_time {
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
color: #343d65;
|
||||
}
|
||||
|
||||
.business_status {
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
color: #ff9b2b;
|
||||
}
|
||||
|
||||
.business_status_blue {
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
color: #3078e1;
|
||||
}
|
||||
|
||||
.business_status_gray {
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||