fix:印章、用车、档案借阅、宣传报道申请页面,专利审批

This commit is contained in:
shijing 2025-10-28 09:49:56 +08:00
parent c098ee8bc5
commit 3e7268802e
6 changed files with 694 additions and 0 deletions

10
App.vue
View File

@ -137,4 +137,14 @@
box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.1);
z-index: 10;
}
.footer_fixed{
position: fixed;
width: 100%;
bottom: 0;
z-index: 1;
height: 60upx;
padding: 12upx;
margin-left: -20upx;
background-color: white;
}
</style>

View File

@ -0,0 +1,108 @@
<!-- 档案借阅 -->
<template>
<view class="container">
<scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;">
<uni-forms v-model="form" label-width="200rpx">
<ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="档案名称" required>
<uni-data-select
v-model="form.borrow_file"
:localdata="fileList"
:disabled="mode=='show'"
@change="mdateChange"
></uni-data-select>
</uni-forms-item>
<uni-forms-item label="申请人电话">
<uni-easyinput v-model="form.contacts" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="借阅时间" required>
<uni-datetime-picker type="date" :clear-icon="false" v-model="form.borrow_date" @change="mdateChange"
v-if="mode!='show'"/>
<span v-else>{{form.start_time}}</span>
</uni-forms-item>
<uni-forms-item label="归还时间" required v-if="form.ticket_?.state_?.name=='档案管理员审批'">
<uni-datetime-picker type="date" :clear-icon="false" v-model="form.return_date" @change="mdateChange"
v-if="mode!='show'"/>
<span v-else>{{form.end_time}}</span>
</uni-forms-item>
<uni-forms-item label="用途">
<uni-data-checkbox multiple v-model="form.remark" :localdata="hobby"></uni-data-checkbox>
</uni-forms-item>
</uni-forms>
</scroll-view>
<view class="footer_fixed">
<ticketd_b :workflow_key="'borrowrecord'" title="档案借阅" :t_id="form.id" :ticket_="form.ticket_"
@success="()=>{uni.navigateBack()} " :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
</view>
</view>
</template>
<script>
import ticketd_b from "../wf/ticketd_b.vue"
import ticketd from "../wf/ticketd.vue"
import {actStateEnum} from "@/utils/enum.js"
export default {
components: { ticketd_b, ticketd },
data(){
return{
form:{
id:null,
borrow_file:"",
contacts:"",
borrow_date:"",
return_date:"",
remark:"",
ticket_:null,
},
hobby:[{
text: '借阅',
value: '借阅',
}, {
text: '复印',
value: '复印',
}, {
text: '查阅',
value: '查阅',
}],
fileList:[],
vehicle_list:[],
}
},
async onLoad(options) {
let that = this;
that.form.id='';
that.mode = options.mode?options.mode:'show';
that.t_id = options.t_id?options.t_id:null;
if(that.mode != "add"){
if(that.t_id) {
that.form = await that.$api.borrowItem(that.t_id);
if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) {
that.mode = "edit";
}else{
that.mode = "show";
}
}else{
// that.form = uni.getStorageSync("currentBooking");
}
}
},
methods:{
//
async submit_b_func(id){
let that = this;
if (that.mode != 'show') {
if(that.form.id) {
await that.$api.borrowUpdate(that.form.id, that.form);
}else{
let res = await that.$api.borrowCreate(that.form);
that.form.id = res.id;
}
}
}
}
}
</script>
<style scoped>
</style>

157
pages/ofm/patent_form.vue Normal file
View File

@ -0,0 +1,157 @@
<!-- 专利申请 -->
<template>
<view class="container">
<scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;">
<uni-forms v-model="form" label-width="150rpx" ref="customForm" :rules="customRules">
<ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="专利名称" required name="filename">
<uni-easyinput v-model="form.filename" placeholder="请输入专利名称" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="发明人" required>
<uni-easyinput v-model="form.filename" placeholder="请输入发明人" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="专利类型">
<uni-data-checkbox multiple v-model="form.seal" :localdata="hobby" @change="sealTypeChange"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item label="提前公开">
<uni-data-checkbox multiple v-model="form.seal" :localdata="hobby2" @change="sealTypeChange"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item label="申请地域">
<uni-data-checkbox multiple v-model="form.seal" :localdata="hobby3" @change="sealTypeChange"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item label="" v-if="(form.seal || '').includes('PCT申请')">
<uni-easyinput v-model="form.seal_other" placeholder="请输入拟申请的国家" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="技术状态">
<uni-data-checkbox multiple v-model="form.seal" :localdata="hobby4" @change="sealTypeChange"></uni-data-checkbox>
<template style="display: flex;flex-direction: column;">
<uni-file-picker v-for="(item,index) in hobby4" v-model="form.file" limit="1" return-type="object" file-mediatype="all" @select="fileSelect" @success="fileSuccess"></uni-file-picker>
</template>
</uni-forms-item>
<uni-forms-item label="技术文件">
<uni-data-checkbox multiple v-model="form.seal" :localdata="hobby5" @change="sealTypeChange"></uni-data-checkbox>
<template style="display: flex;flex-direction: column;">
<uni-number-box v-for="(item,index) in hobby5" v-model="form.file_count" :key="item" :disabled="mode=='show'"></uni-number-box>
</template>
</uni-forms-item>
</uni-forms>
</scroll-view>
<view class="footer_fixed">
<ticketd_b :workflow_key="'seal'" :title="form.filename + '-印章申请'" :t_id="form.id" :ticket_="form.ticket_"
@success="()=>{uni.navigateBack()} " :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
</view>
</view>
</template>
<script>
import ticketd_b from "../wf/ticketd_b.vue"
import ticketd from "../wf/ticketd.vue"
import {actStateEnum} from "@/utils/enum.js"
export default {
components: { ticketd_b, ticketd },
data(){
return{
mode:"add",
t_id: null,
form:{
id:null,
file:"",
filename:"",
file_count:"",
is_lending:false,
contacts:"",
belong_dept:"",
ticket_:null,
},
type:0,
hobby: [
{text: '发明专利',value: '发明专利'},
{text: '实用新型专利',value: '实用新型专利'},
{text: '外观设计专利',value: '外观设计专利'},
],
hobby2:[
{text: '是',value: true},
{text: '否',value: false},
],
hobby3: [
{text: '国内申请',value: '国内申请'},
{text: '国外申请',value: '国外申请'},
{text: 'PCT申请',value: 'PCT申请'},
],
hobby4: [
{text: '是否进行过科技成果鉴定',value: '是否进行过科技成果鉴定'},
{text: '是否发表过文章',value: '是否发表过文章'},
{text: '是否参与过展会展出',value: '是否参与过展会展出'},
{text: '是否参与应用于生产/销售',value: '是否参与应用于生产/销售'},
{text: '是否参与过技术交流',value: '是否参与过技术交流'},
//
],
hobby5: [
//
{text: '技术背景材料',value: ' 技术背景材料'},
{text: '技术交底材料',value: '技术交底材料'},
{text: '查新检索报告',value: '查新检索报告'},
//
{text: '图或者照片',value: '图或者照片'},
],
header:"",
customRules: {
filename: {
rules: [{
required: true,
errorMessage: '姓名不能为空'
}]
},
age: {
rules: [{
required: true,
errorMessage: '年龄不能为空'
}]
},
},
}
},
async onLoad(options) {
let that = this;
that.form.id='';
that.mode = options.mode?options.mode:'show';
that.t_id = options.t_id?options.t_id:null;
if(that.mode != "add"){
if(that.t_id) {
that.form = await that.$api.sealItem(that.t_id);
if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) {
that.mode = "edit";
}else{
that.mode = "show";
}
}else{
that.form = uni.getStorageSync("currentBooking");
}
}
},
methods:{
async submit_b_func(id){
let that = this;
that.$refs.customForm.validate().then(res => {
}).catch(err => {
console.log('err', err);
})
if (that.mode != 'show') {
if(that.form.id) {
await that.$api.patentUpdate(that.form.id, that.form)
}else{
let res = await that.$api.patentCreate(that.form)
that.form.id = res.id;
}
}
},
}
}
</script>
<style scoped>
.uni-data-checklist .checklist-group .checklist-box{
margin: 10px 0!important;
}
</style>

132
pages/ofm/publicityForm.vue Normal file
View File

@ -0,0 +1,132 @@
<!-- 宣传报道 -->
<template>
<view class="container">
<scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;">
<uni-forms v-model="form" label-width="200rpx">
<ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="送审稿件标题" required>
<uni-easyinput v-model="form.title" placeholder="请输入送审稿件标题" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="文件内容" required>
<uni-file-picker v-model="form.pfile" limit="1" return-type="object" file-mediatype="all" @select="fileSelect" @success="fileSuccess" ></uni-file-picker>
</uni-forms-item>
<uni-forms-item label="所有撰稿人" required>
<uni-easyinput v-model="form.participants" placeholder="请输入所有撰稿人" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="部室/研究院" required>
<uni-easyinput v-model="form.pub_dept" placeholder="请输入部室/研究院" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="第一撰稿人涉密等级">
<uni-data-checkbox v-model="form.level" :localdata="hobby1"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item label="稿件内容涉及">
<uni-data-checkbox multiple v-model="form.content" :localdata="hobby2"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item label="" v-if="(form.content || []).includes('其他')">
<uni-easyinput v-model="form.other_content" placeholder="输入稿件名称" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="宣传报道目的" required>
<uni-easyinput v-model="form.report_purpose" placeholder="请输入宣传报道目的" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="宣传渠道">
<uni-data-checkbox multiple v-model="form.channel" :localdata="hobby3"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item label="" v-if="(form.channel || '').includes('其他')">
<uni-easyinput v-model="form.other_channel" placeholder="请输入渠道名称" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="第一撰稿人自审">
<uni-data-checkbox v-model="form.review" :localdata="hobby4"></uni-data-checkbox>
</uni-forms-item>
</uni-forms>
</scroll-view>
<view class="footer_fixed">
<ticketd_b :workflow_key="'publicity'" :title="form.title + '-宣传报道'" :t_id="form.id" :ticket_="form.ticket_"
@success="()=>{uni.navigateBack()} " :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
</view>
</view>
</template>
<script>
import ticketd_b from "../wf/ticketd_b.vue"
import ticketd from "../wf/ticketd.vue"
import {actStateEnum} from "@/utils/enum.js"
export default {
components: { ticketd_b, ticketd },
data(){
return{
form:{
id:null,
title:"",
participants:"",
pub_dept:"",
level:"",
content:"",
other_content:"",
report_purpose:"",
channel:"",
other_channel:"",
review:"",
ticket_:null,
},
hobby1:[
{text: '重要',value: '重要'},
{text: '一般',value: '一般'},
{text: '非涉密',value: '非涉密'},
],
hobby2:[
{text: '武器装备科研生产综合事项',value: '武器装备科研生产综合事项'},
{text: '其他',value: '其他'},
],
hobby3:[
{text: '互联网',value: '互联网'},
{text: '信息平台',value: '信息平台'},
{text: '官微',value: '官微'},
{text: '公开发行物',value: '公开发行物'},
{text: '其他',value: '其他'},
],
hobby4:[
{text: '内容不涉及国家秘密和商业秘密,申请公开',value: '内容不涉及国家秘密和商业秘密,申请公开'},
{text: '内容不涉及国家秘密、但涉及商业秘密,申请受控公开',value: '内容不涉及国家秘密、但涉及商业秘密,申请受控公开'},
{text: '内容涉及国家秘密,申请按涉密渠道发布',value: '内容涉及国家秘密,申请按涉密渠道发布'},
],
vehicle_list:[{text: '市内', value: '市内'},{text: '市外', value: '市外'}],
}
},
async onLoad(options) {
let that = this;
that.form.id='';
that.mode = options.mode?options.mode:'show';
that.t_id = options.t_id?options.t_id:null;
if(that.mode != "add"){
if(that.t_id) {
that.form = await that.$api.publicItem(that.t_id);
if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) {
that.mode = "edit";
}else{
that.mode = "show";
}
}else{
// that.form = uni.getStorageSync("");
}
}
},
methods:{
//
async submit_b_func(id){
let that = this;
if (that.mode != 'show') {
if(that.form.id) {
await that.$api.publicUpdate(that.form.id, that.form);
}else{
let res = await that.$api.publicCreate(that.form);
that.form.id = res.id;
}
}
}
}
}
</script>
<style scoped>
</style>

175
pages/ofm/sealForm.vue Normal file
View File

@ -0,0 +1,175 @@
<!-- 印章申请 -->
<template>
<view class="container">
<scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;">
<uni-forms v-model="form" label-width="200rpx">
<ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="使用类型">
<uni-data-checkbox v-model="type" :localdata="hobby1"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item label="文件名称" required>
<uni-easyinput v-model="form.filename" placeholder="请输入文件名称" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="联系电话">
<uni-easyinput v-model="form.contacts" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="印章类型">
<uni-data-checkbox multiple v-model="form.seal" :localdata="hobby" @change="sealTypeChange"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item label="" v-if="(form.seal || '').includes('其他')">
<uni-easyinput v-model="form.seal_other" placeholder="请输入印章名称" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="借用日期" v-if="type==1">
<uni-datetime-picker v-model="timeRange" type="daterange" @maskClick="maskClick" />
</uni-forms-item>
<uni-forms-item label="借用理由" v-if="type==1">
<uni-easyinput v-model="form.note" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="文件内容" required>
<uni-file-picker v-model="form.file" limit="1" return-type="object" file-mediatype="all" @select="fileSelect" @success="fileSuccess"></uni-file-picker>
</uni-forms-item>
<uni-forms-item label="用印份数" required>
<uni-number-box v-model="form.file_count" :disabled="mode=='show'"></uni-number-box>
</uni-forms-item>
</uni-forms>
</scroll-view>
<view class="footer_fixed">
<ticketd_b :workflow_key="'seal'" :title="form.filename + '-印章申请'" :t_id="form.id" :ticket_="form.ticket_"
@success="()=>{uni.navigateBack()} " :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
</view>
</view>
</template>
<script>
import ticketd_b from "../wf/ticketd_b.vue"
import ticketd from "../wf/ticketd.vue"
import {actStateEnum} from "@/utils/enum.js"
export default {
components: { ticketd_b, ticketd },
data(){
return{
type:"out",
mode:"add",
t_id: null,
timeRange:[],
form:{
id:null,
file:"",
filename:"",
file_count:"",
is_lending:false,
contacts:"",
belong_dept:"",
ticket_:null,
},
type:0,
hobby: [
{text: '公章',value: '公章'},
{text: '法人章',value: '法人章'},
{text: '合同章',value: '合同章'},
{text: '财务章',value: '财务章'},
{text: '其他',value: '其他'},
],
hobby1:[
{text: '内用',value: 0},
{text: '外用',value: 1},
],
header:"",
}
},
async onLoad(options) {
let that = this;
that.form.id='';
that.mode = options.mode?options.mode:'show';
that.t_id = options.t_id?options.t_id:null;
if(that.mode != "add"){
if(that.t_id) {
that.form = await that.$api.sealItem(that.t_id);
if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) {
that.mode = "edit";
}else{
that.mode = "show";
}
}else{
// that.form = uni.getStorageSync("currentBooking");
}
}
that.getHeader();
},
watch: {
timeRange(newval) {
console.log('范围选:', this.timeRange);
},
},
methods:{
getHeader() {
this.header = {
Authorization: "Bearer " + uni.getStorageSync('access')
}
},
maskClick(e){
console.log('maskClick事件:', e);
},
fileSelect(e){
console.log('fileSelect',e);
this.uploadFile(e)
},
fileSuccess(e){
console.log('fileSuccess',e)
},
sealTypeChange(){
console.log('this.form.seal',this.form.seal)
},
uploadFile(e) {
if (e.tempFiles.length === 0) {
uni.showToast({
title: '请先选择文件',
icon: 'none',
});
return;
}
//
const file = e.tempFiles[0];
console.log(this.$api.sealCreate)
let fieldName = 'file';
let filePath = file.url;
//
uni.uploadFile({
url: "http://49.232.14.174:2226/api/file/",
filePath: filePath,
name: fieldName,
formData: {},
header: this.header,
success: (uploadRes) => {
console.log('uploadRes',uploadRes)
//
const data = JSON.parse(uploadRes.data);
console.log('上传返回数据:', data);
if(data){
this.form.file = data.path;
uni.showToast({
title: '上传成功',
icon: 'success',
});
}
},
});
},
//
async submit_b_func(id){
let that = this;
if (that.mode != 'show') {
if(that.form.id) {
await that.$api.sealUpdate(that.form.id, that.form);
}else{
let res = await that.$api.sealCreate(that.form);
that.form.id = res.id;
}
}
}
}
}
</script>
<style scoped>
</style>

112
pages/ofm/vehicleForm.vue Normal file
View File

@ -0,0 +1,112 @@
<!-- 用车管理 -->
<template>
<view class="container">
<scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;">
<uni-forms v-model="form" label-width="200rpx">
<ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="用车事由" required>
<uni-easyinput v-model="form.reason" placeholder="请输入用车事由" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="用车范围" required>
<uni-data-select
v-model="form.is_city"
:localdata="vehicle_list"
:disabled="mode=='show'"
@change="mdateChange"
></uni-data-select>
</uni-forms-item>
<uni-forms-item label="出发地点" required>
<uni-easyinput v-model="form.location" placeholder="请输入出发地点" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="途经地点" required>
<uni-easyinput v-model="form.via" placeholder="请输入途经地点" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="到达地点" required>
<uni-easyinput v-model="form.destination" placeholder="请输入到达地点" :disabled="mode=='show'"/>
</uni-forms-item>
<uni-forms-item label="出发公里数" required>
<uni-number-box v-model="form.start_km" :disabled="mode=='show'"></uni-number-box>
</uni-forms-item>
<uni-forms-item label="归还公里数" required v-if="form.ticket_?.state_?.name=='用车中'">
<uni-number-box v-model="form.end_km" :disabled="mode=='show'"></uni-number-box>
</uni-forms-item>
<uni-forms-item label="出车时间" required>
<uni-datetime-picker type="date" :clear-icon="false" v-model="form.start_time" @change="mdateChange"
v-if="mode!='show'"/>
<span v-else>{{form.start_time}}</span>
</uni-forms-item>
<uni-forms-item label="还车时间" required v-if="form.ticket_?.state_?.name=='用车中'">
<uni-datetime-picker type="date" :clear-icon="false" v-model="form.end_time" @change="mdateChange"
v-if="mode!='show'"/>
<span v-else>{{form.end_time}}</span>
</uni-forms-item>
</uni-forms>
</scroll-view>
<view class="footer_fixed">
<ticketd_b :workflow_key="'vehicle'" title="用车申请" :t_id="form.id" :ticket_="form.ticket_"
@success="()=>{uni.navigateBack()} " :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
</view>
</view>
</template>
<script>
import ticketd_b from "../wf/ticketd_b.vue"
import ticketd from "../wf/ticketd.vue"
import {actStateEnum} from "@/utils/enum.js"
export default {
components: { ticketd_b, ticketd },
data(){
return{
form:{
id:null,
via:"",
reason:"",
is_city:"",
location:"",
destination:"",
start_km:"",
// end_km:"",
start_time:"",
// end_time:"",
ticket_:null,
},
vehicle_list:[{text: '市内', value: true},{text: '市外', value: false}],
}
},
async onLoad(options) {
let that = this;
that.form.id='';
that.mode = options.mode?options.mode:'show';
that.t_id = options.t_id?options.t_id:null;
if(that.mode != "add"){
if(that.t_id) {
that.form = await that.$api.vehicleItem(that.t_id);
if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) {
that.mode = "edit";
}else{
that.mode = "show";
}
}else{
}
}
},
methods:{
//
async submit_b_func(id){
let that = this;
if (that.mode != 'show') {
if(that.form.id) {
await that.$api.vehicleUpdate(that.form.id, that.form);
}else{
let res = await that.$api.vehicleCreate(that.form);
that.form.id = res.id;
}
}
}
}
}
</script>
<style scoped>
</style>