fix:光芯审批部分流程完善更新

This commit is contained in:
shijing 2025-12-16 13:29:59 +08:00
parent b8121dbb45
commit f129612d40
11 changed files with 662 additions and 338 deletions

View File

@ -0,0 +1,50 @@
<!-- 印章申请 -->
<template>
<view class="previewTestStyle" @click="preview">{{fileName}}</view>
</template>
<script setup>
import config from '@/utils/config.js'
import { ref, onMounted } from 'vue';
const props = defineProps({
url:{ type: String, default: "" },
name:{ type: String, default: "" },
filePath:{ type: String, default: "" },
})
const fileName = ref("");
onMounted(() => {
console.log('props.url',props.url)
console.log('props.name',props.name)
console.log('props.filePath',props.filePath)
let arrs = props.filePath.length>0? props.filePath.split("/"):[];
fileName.value =props.name!=""?props.name:arrs[arrs.length-1];
console.log('fileName.value',fileName.value)
})
const preview=()=>{
let baseUrl = config.baseUrl.split('/api')[0];
let url0 = props.url!=""?props.url : baseUrl + props.filePath;
let urls = [];
urls.push(url0)
console.log('url0',url0)
if (url0.indexOf('jpg')>-1||url0.indexOf('png')>-1||url0.indexOf('jpeg')>-1) {
uni.previewImage({
urls: urls,
fail: function(err) {
uni.showToast({
title: "预览失败",
icon: "none"
})
}
})
} else {
window.open(url0, '_blank');
}
}
</script>
<style scoped>
.previewTestStyle{
color: blue;
width: 100%;
display: inline-block;
}
</style>

View File

@ -2,41 +2,37 @@
<template> <template>
<view class="container"> <view class="container">
<scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;"> <scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;">
<uni-forms v-model="form" label-width="180rpx" ref="customForm" :rules="customRules"> <uni-forms v-model="form" label-width="150rpx" ref="customForm" :rules="customRules">
<ticketd :ticket_="form.ticket_"></ticketd> <ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="姓名"> <uni-forms-item label="姓名">
<uni-easyinput v-model="form.employee_name" placeholder="请输入姓名" :disabled="true"/> <uni-easyinput v-model="form.employee_name" placeholder="请输入姓名" :disabled="true" v-if="mode!='show'"/>
<span v-else>{{form.employee_name}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="部门"> <uni-forms-item label="部门">
<uni-easyinput v-model="form.belong_dept_name" placeholder="请输入岗位" :disabled="true"/> <uni-easyinput v-model="form.belong_dept_name" placeholder="请输入岗位" :disabled="true" v-if="mode!='show'"/>
<span v-else>{{form.belong_dept_name}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="岗位"> <uni-forms-item label="岗位">
<uni-easyinput v-model="form.post_name" placeholder="请输入岗位" :disabled="true"/> <uni-easyinput v-model="form.post_name" placeholder="请输入岗位" :disabled="true" v-if="mode!='show'"/>
<span v-else>{{form.post_name}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="离职时间" required> <uni-forms-item label="离职时间" required>
<uni-datetime-picker type="date" :clear-icon="false" v-model="form.end_date" v-if="mode!='show'"/> <uni-datetime-picker type="date" :clear-icon="false" v-model="form.end_date" v-if="mode!='show'"/>
<span v-else>{{form.end_date}}</span> <span v-else>{{form.end_date}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="离职原因:" label-width="750" required> <uni-forms-item label="离职原因" required>
<textarea placeholder-style="color:#efefef" v-model="form.reason" placeholder="离职原因" v-if="mode!='show'" style="width:100%; border: 2upx solid #e5e5e5;padding: 10upx;"/>
<span v-else>{{form.reason}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label-width="100"> <uni-forms-item label="办理离职交接日期" required v-if="form.ticket_?.state_?.name=='部门负责人'">
<textarea placeholder-style="color:#efefef" v-model="form.reason" placeholder="离职原因" style="width:100%; border: 2upx solid #e5e5e5;padding: 10upx;"/>
</uni-forms-item>
<uni-forms-item label="办理离职交接日期" required>
<uni-datetime-picker type="date" v-model="ticket_data.handle_date" v-if="form.ticket_?.state_?.name=='部门负责人'"/> <uni-datetime-picker type="date" v-model="ticket_data.handle_date" v-if="form.ticket_?.state_?.name=='部门负责人'"/>
<span v-else>{{form.handle_date}}</span> <span v-else>{{form.handle_date}}</span>
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
</scroll-view> </scroll-view>
<view class="footer_fixed"> <view class="footer_fixed">
<button v-if="mode=='edit'" size="mini" @click="handleDel" :loading="saveLoading" :disabled="saveLoading" type="warn"> <ticketd_b :workflow_key="'wf_resignation'" :title="form.employee_name + '-离职审批'" :t_id="form.id" :ticket_="form.ticket_"
删除 @success="submitSuccess" :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
</button>
<ticketd_b v-if="form.ticket_" :t_id="form.id" :ticket_="form.ticket_"
:ticket_data="ticket_data" @success="()=>{uni.navigateBack()}" ref="ticketd_b"></ticketd_b>
<button v-else size="mini" @click="handleSave" :loading="saveLoading" :disabled="saveLoading" type="primary">
提交审批
</button>
</view> </view>
</view> </view>
</template> </template>
@ -108,20 +104,16 @@ import {actStateEnum} from "@/utils/enum.js"
this.form.employee = res.id; this.form.employee = res.id;
this.mode = "add"; this.mode = "add";
}, },
async handleDel(){ async submit_b_func(id){
let that = this; let that = this;
await that.$api.resignationDelete(that.form.id) if (that.mode != 'show') {
uni.navigateBack() if(that.form.id) {
}, await that.$api.resignationUpdate(that.form.id, that.form);
async handleSave(){ }else{
let that = this; let res = await that.$api.resignationCreate(that.form);
that.$refs.customForm.validate().then(res => { that.form.id = res.id;
}
}).catch(err => { }
console.log('err', err);
})
await that.$api.resignationCreate(that.form)
uni.navigateBack()
}, },
} }
} }

View File

@ -6,26 +6,36 @@
<ticketd :ticket_="form.ticket_"></ticketd> <ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="档案名称" required> <uni-forms-item label="档案名称" required>
<uni-data-select <uni-data-select
v-if="mode!='show'"
multiple multiple
v-model="form.borrow_file" v-model="form.borrow_file"
:localdata="fileList" :localdata="fileList"
:disabled="mode=='show'" :disabled="mode=='show'"
@change="mdateChange" @change="mdateChange"
></uni-data-select> ></uni-data-select>
<span v-else>
<text v-for="(item,index) in form.file_name">{{item}}
<span v-if="index<(form.file_name.length-1)"></span>
</text>
</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="申请人电话"> <uni-forms-item label="申请人电话">
<uni-easyinput v-model="form.contacts" :disabled="mode=='show'"/> <uni-easyinput v-model="form.contacts" v-if="mode!='show'"/>
<span v-else>{{form.contacts}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="借阅时间" required> <uni-forms-item label="借阅时间" required>
<uni-datetime-picker type="date" :clear-icon="false" v-model="form.borrow_date" @change="mdateChange" <uni-datetime-picker type="date" v-if="mode!='show'" :clear-icon="false" v-model="form.borrow_date"/>
v-if="mode!='show'"/>
<span v-else>{{form.borrow_date}}</span> <span v-else>{{form.borrow_date}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="用途"> <uni-forms-item label="借阅数量" required>
<uni-data-checkbox multiple v-model="form.remark" :localdata="hobby"></uni-data-checkbox> <uni-number-box v-model="form.count" v-if="mode!='show'"></uni-number-box>
<span v-else>{{form.count}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="归还时间" required v-if="form.ticket_&&form.ticket_.state_"> <uni-forms-item label="用途">
<uni-datetime-picker v-if="form.ticket_?.state_?.name=='档案管理员审批'" type="date" :clear-icon="false" v-model="ticket_data.return_date" @change="mdateChange" /> <uni-data-checkbox multiple v-model="form.remark" :localdata="hobby" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item label="归还时间" required v-if="form.ticket_?.state_">
<uni-datetime-picker type="date" v-if="form.ticket_?.state_?.name=='档案管理员审批'" :clear-icon="false" v-model="ticket_data.return_date"/>
<span v-else>{{form.ticket_.ticket_data.return_date}}</span> <span v-else>{{form.ticket_.ticket_data.return_date}}</span>
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>

View File

@ -2,41 +2,75 @@
<template> <template>
<view class="container"> <view class="container">
<scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;"> <scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;">
<uni-forms v-model="form" label-width="200rpx"> <uni-forms v-model="form" label-width="200upx">
<ticketd :ticket_="form.ticket_"></ticketd> <ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="送审稿件标题" required> <uni-forms-item label="送审稿件标题" required>
<uni-easyinput v-model="form.title" placeholder="请输入送审稿件标题" :disabled="mode=='show'"/> <uni-easyinput v-model="form.title" placeholder="请输入送审稿件标题" v-if="mode!='show'"/>
<span v-else>{{form.title}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="文件内容" required> <uni-forms-item label="文件内容" required>
<xtUpload v-model="form.pfile" xtype="path" :disabled="mode=='show'"></xtUpload> <xtUpload v-model="form.pfile" xtype="path" v-if="mode!='show'"></xtUpload>
<view v-else style="color:blue" @click="preview(form.pfile)">{{ form.pfile}}</view>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="所有撰稿人" required> <uni-forms-item label="所有撰稿人" required>
<uni-easyinput v-model="form.participants" placeholder="请输入所有撰稿人" :disabled="mode=='show'"/> <uni-easyinput v-model="form.participants" placeholder="请输入所有撰稿人" v-if="mode!='show'"/>
<span v-else>{{form.participants}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="部室/研究院" required> <uni-forms-item label="部室/研究院" required>
<uni-easyinput v-model="form.pub_dept" placeholder="请输入部室/研究院" :disabled="mode=='show'"/> <uni-easyinput v-model="form.pub_dept" placeholder="请输入部室/研究院" v-if="mode!='show'"/>
<span v-else>{{form.pub_dept}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="第一撰稿人涉密等级"> <uni-forms-item label="第一撰稿人涉密等级">
<uni-data-checkbox v-model="form.level" :localdata="hobby1"></uni-data-checkbox> <uni-data-checkbox v-model="form.level" :localdata="hobby1" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="稿件内容涉及"> <uni-forms-item label="稿件内容涉及">
<uni-data-checkbox multiple v-model="form.content" :localdata="hobby2"></uni-data-checkbox> <uni-data-checkbox multiple v-model="form.content" :localdata="hobby2" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="" v-if="(form.content || []).includes('其他')"> <uni-forms-item label="" v-if="(form.content || []).includes('其他')">
<uni-easyinput v-model="form.other_content" placeholder="输入稿件名称" :disabled="mode=='show'"/> <uni-easyinput v-model="form.other_content" placeholder="输入稿件名称" v-if="mode!='show'"/>
<span v-else>{{form.other_content}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="宣传报道目的" required> <uni-forms-item label="宣传报道目的" required>
<uni-easyinput v-model="form.report_purpose" placeholder="请输入宣传报道目的" :disabled="mode=='show'"/> <uni-easyinput v-model="form.report_purpose" placeholder="请输入宣传报道目的" v-if="mode!='show'"/>
<span v-else>{{form.report_purpose}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="宣传渠道"> <uni-forms-item label="宣传渠道">
<uni-data-checkbox multiple v-model="form.channel" :localdata="hobby3"></uni-data-checkbox> <uni-data-checkbox multiple v-model="form.channel" :localdata="hobby3" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="" v-if="(form.channel || '').includes('其他')"> <uni-forms-item label="" v-if="form.channel=='其他'">
<uni-easyinput v-model="form.other_channel" placeholder="请输入渠道名称" :disabled="mode=='show'"/> <uni-easyinput v-model="form.other_content" placeholder="请输入渠道名称" v-if="mode!='show'"/>
<span v-else>{{form.other_content}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="第一撰稿人自审"> <uni-forms-item label="第一撰稿人自审">
<uni-data-checkbox v-model="form.review" :localdata="hobby4"></uni-data-checkbox> <uni-data-checkbox v-model="form.review" :localdata="hobby4" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<view v-if="['部门领导审批', '总经理审批', '结束'].includes(form.ticket_?.state_?.name)">
<uni-forms-item label="所在部室定密意见">
<uni-data-checkbox v-model="form.dept_opinion" :localdata="hobby5" :disabled="mode=='show'&&form.ticket_.state_.name=='总经理审批'"></uni-data-checkbox>
</uni-forms-item>
<view label="" v-if="form.dept_opinion === '不符合定密要求'" class="formText">
<text style="display: inline-block;margin-right: 30upx;">应做 </text>
<uni-data-checkbox v-model="form.publicity_opinion" :localdata="hobby50" style="display: inline-block;" :disabled="mode=='show'&&form.ticket_.state_.name=='总经理审批'"></uni-data-checkbox>
<text>处理</text>
</view>
<uni-forms-item label="" v-if="form.dept_opinion === '同意内容为涉密事项'">
<text>涉密等级为</text>
<uni-data-checkbox v-model="form.secret_level" :localdata="hobby51" :disabled="mode=='show'&&form.ticket_.state_.name=='总经理审批'"></uni-data-checkbox>
</uni-forms-item>
<view v-if="form.dept_opinion === '同意内容为涉密事项'" class="formText">
<text>保密期限解密时间或解密条件</text>
<uni-easyinput v-model="form.secret_period" placeholder="请输入期限" class="formInput" :disabled="mode=='show'"/>
<text>请按总院管理要求做好保密管理</text>
</view>
<uni-forms-item label="综合管理部审查意见">
<uni-data-checkbox v-model="form.dept_opinion_review" :localdata="hobby6" :disabled="mode=='show'&&form.ticket_.state_.name=='总经理审批'"></uni-data-checkbox>
</uni-forms-item>
</view>
<uni-forms-item label="总经理审查意见" v-if="['总经理审批', '结束'].includes(form.ticket_?.state_?.name)">
<uni-data-checkbox v-model="form.publicity_opinion" :localdata="hobby7" ></uni-data-checkbox>
</uni-forms-item>
</uni-forms> </uni-forms>
</scroll-view> </scroll-view>
<view class="footer_fixed"> <view class="footer_fixed">
@ -51,6 +85,7 @@ import ticketd_b from "../wf/ticketd_b.vue"
import ticketd from "../wf/ticketd.vue" import ticketd from "../wf/ticketd.vue"
import {actStateEnum} from "@/utils/enum.js" import {actStateEnum} from "@/utils/enum.js"
import xtUpload from "@/components/xtUpload.vue" import xtUpload from "@/components/xtUpload.vue"
import config from './../../utils/config.js'
export default { export default {
components: { ticketd_b, ticketd,xtUpload }, components: { ticketd_b, ticketd,xtUpload },
data(){ data(){
@ -90,6 +125,29 @@ import xtUpload from "@/components/xtUpload.vue"
{text: '内容不涉及国家秘密、但涉及商业秘密,申请受控公开',value: '内容不涉及国家秘密、但涉及商业秘密,申请受控公开'}, {text: '内容不涉及国家秘密、但涉及商业秘密,申请受控公开',value: '内容不涉及国家秘密、但涉及商业秘密,申请受控公开'},
{text: '内容涉及国家秘密,申请按涉密渠道发布',value: '内容涉及国家秘密,申请按涉密渠道发布'}, {text: '内容涉及国家秘密,申请按涉密渠道发布',value: '内容涉及国家秘密,申请按涉密渠道发布'},
], ],
hobby5:[
{text: '不符合定密要求',value: '不符合定密要求'},
{text: '同意内容为涉密事项',value: '同意内容为涉密事项'}
],
hobby50:[
{text: '公开',value: '公开'},
{text: '受控',value: '受控'}
],
hobby51:[
{text: '机密',value: '机密'},
{text: '秘密',value: '秘密'}
],
hobby6:[
{text: '内容不涉及国家秘密和商业秘密,同意公开',value: '内容不涉及国家秘密和商业秘密,同意公开'},
{text: '内容不涉及国家秘密、但涉及商业秘密,同意受控公开',value: '内容不涉及国家秘密、但涉及商业秘密,同意受控公开'},
{text: '内容涉及国家秘密,同意按涉密渠道发布',value: '内容涉及国家秘密,同意按涉密渠道发布'},
],
hobby7:[
{text: '同意公开宣传报道',value: '同意公开宣传报道'},
{text: '同意受控报道',value: '同意受控报道'},
{text: '同意按涉密渠道宣传报道',value: '同意按涉密渠道宣传报道'},
{text: '不同意任何渠道的宣传报道',value: '不同意任何渠道的宣传报道'},
],
vehicle_list:[{text: '市内', value: '市内'},{text: '市外', value: '市外'}], vehicle_list:[{text: '市内', value: '市内'},{text: '市外', value: '市外'}],
} }
}, },
@ -127,10 +185,38 @@ import xtUpload from "@/components/xtUpload.vue"
url: "/pages/index/index" url: "/pages/index/index"
}) })
}, },
preview(pfile){
let baseUrl = config.baseUrl.split('/api')[0];
let url = baseUrl+pfile;
let urls = [];
urls.push(url)
if (pfile.indexOf('jpg')>-1||pfile.indexOf('png')>-1||pfile.indexOf('jpeg')>-1) {
uni.previewImage({
urls: urls,
fail: function(err) {
uni.showToast({
title: "预览失败",
icon: "none"
})
}
})
} else {
window.open(url, '_blank');
}
}
} }
} }
</script> </script>
<style scoped> <style scoped>
.formText{
color: #666;
font-size: 14px;
padding-left: 200upx;
}
.formInput{
width:170upx;
display: inline-block;
}
</style> </style>

View File

@ -5,31 +5,43 @@
<uni-forms v-model="form" label-width="170upx"> <uni-forms v-model="form" label-width="170upx">
<ticketd :ticket_="form.ticket_"></ticketd> <ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="使用类型"> <uni-forms-item label="使用类型">
<uni-data-checkbox v-model="type" :localdata="hobby1"></uni-data-checkbox> <uni-data-checkbox v-model="form.is_lending" :localdata="hobby1" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="文件名称" required> <uni-forms-item label="文件名称" required>
<uni-easyinput v-model="form.filename" placeholder="请输入文件名称" :disabled="mode=='show'"/> <uni-easyinput v-model="form.filename" placeholder="请输入文件名称" v-if="mode!='show'"/>
<span v-else>{{form.filename}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="联系电话"> <uni-forms-item label="联系电话">
<uni-easyinput v-model="form.contacts" :disabled="mode=='show'"/> <uni-easyinput v-model="form.contacts" v-if="mode!='show'"/>
<span v-else>{{form.contacts}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="印章类型"> <uni-forms-item label="印章类型">
<uni-data-checkbox multiple v-model="form.seal" :localdata="hobby" @change="sealTypeChange"></uni-data-checkbox> <uni-data-checkbox multiple v-model="form.seal" :localdata="hobby" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="" v-if="(form.seal || '').includes('其他')"> <uni-forms-item label="" v-if="form.seal=='其他'">
<uni-easyinput v-model="form.seal_other" placeholder="请输入印章名称" :disabled="mode=='show'"/> <uni-easyinput v-model="form.seal_other" placeholder="请输入印章名称" v-if="mode!='show'"/>
<span v-else>{{form.seal_other}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="借用日期" v-if="type==1"> <uni-forms-item label="借出时间" v-if="form.is_lending">
<uni-datetime-picker v-model="timeRange" type="daterange" @maskClick="maskClick" /> <uni-datetime-picker v-model="timeRange" type="daterange" @change="timeRangeChange(timeRange)" v-if="mode!='show'"/>
<span v-else>{{form.lending_date}}-{{form.return_date}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="借用理由" v-if="type==1"> <uni-forms-item label="借用理由" v-if="form.is_lending">
<uni-easyinput v-model="form.note" :disabled="mode=='show'"/> <uni-easyinput v-model="form.note" v-if="mode!='show'"/>
<span v-else>{{form.note}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="文件内容" required> <uni-forms-item label="文件内容" required>
<xtUpload v-model="form.file" xtype="path" :disabled="mode=='show'"></xtUpload> <xtUpload v-model="form.file" xtype="path" v-if="mode!='show'"></xtUpload>
<!-- <view v-else style="color:blue" @click="preview(form.file)">{{ form.file}}</view> -->
<filePreview v-else :filePath="form.file" style="padding-left:145upx;width: 100%;height: 30upx;"></filePreview>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="用印份数" required> <uni-forms-item label="用印份数" required>
<uni-number-box v-model="form.file_count" :disabled="mode=='show'"></uni-number-box> <uni-number-box v-model="form.file_count" v-if="mode!='show'"></uni-number-box>
<span v-else>{{form.file_count}}</span>
</uni-forms-item>
<uni-forms-item label="实际归还日期" v-if="form.ticket_&&form.ticket_.state_&&(form.ticket_.state_.name=='借用中'||form.ticket_.state_.name=='结束')">
<uni-datetime-picker v-model="ticket_data.actual_return_date" type="date" v-if="form.ticket_?.state_?.name=='借用中'"/>
<span v-else>{{form.actual_return_date}}</span>
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
</scroll-view> </scroll-view>
@ -43,11 +55,12 @@
<script> <script>
import ticketd_b from "../wf/ticketd_b.vue" import ticketd_b from "../wf/ticketd_b.vue"
import ticketd from "../wf/ticketd.vue" import ticketd from "../wf/ticketd.vue"
import config from '/utils/config';
import {actStateEnum} from "@/utils/enum.js" import {actStateEnum} from "@/utils/enum.js"
import xtUpload from "@/components/xtUpload.vue" import xtUpload from "@/components/xtUpload.vue"
import filePreview from "@/components/filePreview.vue"
import config from './../../utils/config.js'
export default { export default {
components: { ticketd_b, ticketd,xtUpload }, components: { ticketd_b, ticketd,xtUpload,filePreview },
data(){ data(){
return{ return{
type:"out", type:"out",
@ -57,12 +70,14 @@ import xtUpload from "@/components/xtUpload.vue"
form:{ form:{
id:null, id:null,
file:"", file:"",
note:"",
filename:"", filename:"",
contacts:"",
file_count:"", file_count:"",
is_lending:false, is_lending:false,
contacts:"", },
belong_dept:"", ticket_data:{
ticket_:null, actual_return_date:"",
}, },
type:0, type:0,
hobby: [ hobby: [
@ -73,10 +88,9 @@ import xtUpload from "@/components/xtUpload.vue"
{text: '其他',value: '其他'}, {text: '其他',value: '其他'},
], ],
hobby1:[ hobby1:[
{text: '内用',value: 0}, {text: '内用',value: false},
{text: '外用',value: 1}, {text: '外用',value: true},
], ]
header:"",
} }
}, },
async onLoad(options) { async onLoad(options) {
@ -87,6 +101,10 @@ import xtUpload from "@/components/xtUpload.vue"
if(that.mode != "add"){ if(that.mode != "add"){
if(that.t_id) { if(that.t_id) {
that.form = await that.$api.sealItem(that.t_id); that.form = await that.$api.sealItem(that.t_id);
if(that.form.lending_date&&that.form.lending_date!==null){
that.timeRange[0]=that.form.lending_date;
that.timeRange[1]=that.form.return_date;
}
if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) { if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) {
that.mode = "edit"; that.mode = "edit";
}else{ }else{
@ -94,7 +112,6 @@ import xtUpload from "@/components/xtUpload.vue"
} }
} }
} }
that.getHeader();
}, },
watch: { watch: {
timeRange(newval) { timeRange(newval) {
@ -102,17 +119,6 @@ import xtUpload from "@/components/xtUpload.vue"
}, },
}, },
methods:{ methods:{
getHeader() {
this.header = {
Authorization: "Bearer " + uni.getStorageSync('access')
}
},
maskClick(e){
console.log('maskClick事件:', e);
},
sealTypeChange(){
console.log('this.form.seal',this.form.seal)
},
// //
async submit_b_func(id){ async submit_b_func(id){
let that = this; let that = this;
@ -130,6 +136,10 @@ import xtUpload from "@/components/xtUpload.vue"
url: "/pages/index/index" url: "/pages/index/index"
}) })
}, },
timeRangeChange(val){
this.form.lending_date = val?.[0] || null
this.form.return_date = val?.[1] || null
},
} }
} }
</script> </script>

View File

@ -5,45 +5,78 @@
<uni-forms v-model="form" label-width="180upx"> <uni-forms v-model="form" label-width="180upx">
<ticketd :ticket_="form.ticket_"></ticketd> <ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="用车事由" required> <uni-forms-item label="用车事由" required>
<uni-easyinput v-model="form.reason" placeholder="请输入用车事由" :disabled="mode=='show'"/> <uni-easyinput v-model="form.reason" placeholder="请输入用车事由" v-if="mode!='show'"/>
<span v-else>{{form.location}}</span>
</uni-forms-item>
<uni-forms-item label="使用车辆" required>
<uni-data-select
v-if="mode!='show'"
v-model="form.vehreg"
:localdata="vehRegList"
:disabled="mode=='show'"
@change="vehregChange"
></uni-data-select>
<span v-else>{{form.vehreg_name}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="用车范围" required> <uni-forms-item label="用车范围" required>
<uni-data-select <uni-data-checkbox v-model="form.is_city" :localdata="hobby" :disabled="mode=='show'"></uni-data-checkbox>
v-model="form.is_city"
:localdata="vehicle_list"
:disabled="mode=='show'"
@change="mdateChange"
></uni-data-select>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="出发地点" required> <uni-forms-item label="出发地点" required>
<uni-easyinput v-model="form.location" placeholder="请输入出发地点" :disabled="mode=='show'"/> <uni-easyinput v-model="form.location" placeholder="请输入出发地点" v-if="mode!='show'"/>
</uni-forms-item> <span v-else>{{form.location}}</span>
<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>
<uni-forms-item label="出发公里数" required> <uni-forms-item label="出发公里数" required>
<uni-number-box v-model="form.start_km" :disabled="mode=='show'"></uni-number-box> <uni-number-box v-model="form.start_km" v-if="mode!='show'"></uni-number-box>
<span v-else>{{form.start_km}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="出车时间" required> <uni-forms-item label="归还公里数" required v-if="form.ticket_&&form.ticket_.state_&&(form.ticket_.state_.name=='用车中'||form.ticket_.state_.type==2)">
<uni-datetime-picker type="datetime" :clear-icon="false" v-model="form.start_time" @change="mdateChange" <uni-number-box v-if="form.ticket_?.state_?.name=='用车中'" v-model="ticket_data.end_km"></uni-number-box>
v-if="mode!='show'"/>
<span v-else>{{form.start_time}}</span>
</uni-forms-item>
<uni-forms-item label="归还公里数" required v-if="form.ticket_&&form.ticket_.state_">
<uni-number-box v-if="form.ticket_?.state_?.name=='用车中'" v-model="ticket_data.end_km" :disabled="mode=='show'"></uni-number-box>
<span v-else>{{form.ticket_.ticket_data.end_km}}</span> <span v-else>{{form.ticket_.ticket_data.end_km}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="还车时间" required v-if="form.ticket_&&form.ticket_.state_"> <uni-forms-item label="途经地点" required>
<uni-datetime-picker type="datetime" v-if="form.ticket_?.state_?.name=='用车中'" :clear-icon="false" v-model="ticket_data.end_time" @change="mdateChange"/> <uni-easyinput v-model="form.via" placeholder="请输入途经地点" v-if="mode!='show'"/>
<span v-else>{{form.ticket_.ticket_data.end_time}}</span> <span v-else>{{form.via}}</span>
</uni-forms-item>
<uni-forms-item label="到达地点" required>
<uni-easyinput v-model="form.destination" placeholder="请输入到达地点" v-if="mode!='show'"/>
<span v-else>{{form.destination}}</span>
</uni-forms-item>
<uni-forms-item label="接待人员" required>
<uni-easyinput v-model="form.reception" placeholder="请输入接待人员" v-if="mode!='show'"/>
<span v-else>{{form.reception}}</span>
</uni-forms-item>
<uni-forms-item label="使用日期" required>
<uni-datetime-picker type="date" :clear-icon="false" v-model="form.vdate" @change="vdateChange"
v-if="mode!='show'"/>
<span v-else>{{form.vdate}}</span>
</uni-forms-item>
<uni-forms-item label="用车时间段" v-if="mode=='show'">
<span v-for="(time,index1) in form.time_ranges">
{{time}}
<span v-if="index1<(form.time_ranges.length-1)"></span>
</span>
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
<view class="timeView" v-if="mode!='show'">
<view style="height: 70upx;line-height: 70upx;">
<text>凌晨</text>
<view class="iconsWrap" @click="showAmChange">
<uni-icons v-if="showAm" type="up" size="20" color="#ffffff"></uni-icons>
<uni-icons v-else type="down" size="20" color="#ffffff"></uni-icons>
</view>
</view>
<view :class="{'amBlockHide':!showAm,'amBlock': showAm}">
<view v-for="(item,index) in timesListAm" :key="item.value" class="timeBlock ">
<view :class="{'isSelected':item.isSelect,'isSloted':item.sloted,'timeItem': true}" @click="timeItemClickAm(index)">{{item.label}}</view>
</view>
</view>
<view v-for="(item,index) in timesListPm" :key="item.value" class="timeBlock">
<view :class="{'isSelected':item.isSelect,'isSloted':item.sloted,'timeItem': true}" @click="timeItemClickPm(index)">{{item.label}}</view>
</view>
</view>
</scroll-view> </scroll-view>
<view class="footer_fixed"> <view class="footer_fixed">
<ticketd_b :workflow_key="'wf_vehicle'" title="用车申请" :t_id="form.id" :ticket_="form.ticket_" :ticket_data="ticket_data" <ticketd_b :workflow_key="'wf_vehicle'" :title="'用车申请'" :t_id="form.id" :ticket_="form.ticket_" :ticket_data="ticket_data"
@success="submitSuccess" :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b> @success="submitSuccess" :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
</view> </view>
</view> </view>
@ -60,18 +93,75 @@ import {actStateEnum} from "@/utils/enum.js"
form:{ form:{
id:null, id:null,
via:"", via:"",
vdate:"",
vehreg:"",
reason:"", reason:"",
is_city:"", is_city:"",
location:"", location:"",
reception:"",
destination:"", destination:"",
start_km:"", start_km:"",
start_time:"", slots:[],
}, },
ticket_data:{ ticket_data:{
end_km:"", end_km:0,
end_time:"",
}, },
vehicle_list:[{text: '市内', value: true},{text: '市外', value: false}], showAm:false,
vehRegList:[],
hobby:[{text: '市内', value: true},{text: '市外', value: false}],
//0-6
timesListAm:[
{value:0,label:'00:00-00:30',isSelect:false,sloted:false},
{value:1,label:'00:30-01:00',isSelect:false,sloted:false},
{value:2,label:'01:00-01:30',isSelect:false,sloted:false},
{value:3,label:'01:30-02:00',isSelect:false,sloted:false},
{value:4,label:'02:00-02:30',isSelect:false,sloted:false},
{value:5,label:'02:30-03:00',isSelect:false,sloted:false},
{value:6,label:'03:00-03:30',isSelect:false,sloted:false},
{value:7,label:'03:30-04:00',isSelect:false,sloted:false},
{value:8,label:'04:00-04:30',isSelect:false,sloted:false},
{value:9,label:'04:30-05:00',isSelect:false,sloted:false},
{value:10,label:'05:00-05:30',isSelect:false,sloted:false},
{value:11,label:'05:30-06:00',isSelect:false,sloted:false}
],
timesListPm:[
{value:12,label:'06:00-06:30',isSelect:false,sloted:false},
{value:13,label:'06:30-07:00',isSelect:false,sloted:false},
{value:14,label:'07:00-07:30',isSelect:false,sloted:false},
{value:15,label:'07:30-08:00',isSelect:false,sloted:false},
{value:16,label:'08:00-08:30',isSelect:false,sloted:false},
{value:17,label:'08:30-09:00',isSelect:false,sloted:false},
{value:18,label:'09:00-09:30',isSelect:false,sloted:false},
{value:19,label:'09:30-10:00',isSelect:false,sloted:false},
{value:20,label:'10:00-10:30',isSelect:false,sloted:false},
{value:21,label:'10:30-11:00',isSelect:false,sloted:false},
{value:22,label:'11:00-11:30',isSelect:false,sloted:false},
{value:23,label:'11:30-12:00',isSelect:false,sloted:false},
{value:24,label:'12:00-12:30',isSelect:false,sloted:false},
{value:25,label:'12:30-13:00',isSelect:false,sloted:false},
{value:26,label:'13:00-13:30',isSelect:false,sloted:false},
{value:27,label:'13:30-14:00',isSelect:false,sloted:false},
{value:28,label:'14:00-14:30',isSelect:false,sloted:false},
{value:29,label:'14:30-15:00',isSelect:false,sloted:false},
{value:30,label:'15:00-15:30',isSelect:false,sloted:false},
{value:31,label:'15:30-16:00',isSelect:false,sloted:false},
{value:32,label:'16:00-16:30',isSelect:false,sloted:false},
{value:33,label:'16:30-17:00',isSelect:false,sloted:false},
{value:34,label:'17:00-17:30',isSelect:false,sloted:false},
{value:35,label:'17:30-18:00',isSelect:false,sloted:false},
{value:36,label:'18:00-18:30',isSelect:false,sloted:false},
{value:37,label:'18:30-19:00',isSelect:false,sloted:false},
{value:38,label:'19:00-19:30',isSelect:false,sloted:false},
{value:39,label:'19:30-20:00',isSelect:false,sloted:false},
{value:40,label:'20:00-20:30',isSelect:false,sloted:false},
{value:41,label:'20:30-21:00',isSelect:false,sloted:false},
{value:42,label:'21:00-21:30',isSelect:false,sloted:false},
{value:43,label:'21:30-22:00',isSelect:false,sloted:false},
{value:44,label:'22:00-22:30',isSelect:false,sloted:false},
{value:45,label:'22:30-23:00',isSelect:false,sloted:false},
{value:46,label:'23:00-23:30',isSelect:false,sloted:false},
{value:47,label:'23:30-24:00',isSelect:false,sloted:false}
]
} }
}, },
async onLoad(options) { async onLoad(options) {
@ -82,6 +172,13 @@ import {actStateEnum} from "@/utils/enum.js"
if(that.mode != "add"){ if(that.mode != "add"){
if(that.t_id) { if(that.t_id) {
that.form = await that.$api.vehicleItem(that.t_id); that.form = await that.$api.vehicleItem(that.t_id);
that.form.slots.forEach(slot=>{
if(slot<12){
that.timesListAm[slot].sloted = true;
}else{
that.timesListPm[slot].sloted = true;
}
})
if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) { if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) {
that.mode = "edit"; that.mode = "edit";
}else{ }else{
@ -91,7 +188,111 @@ import {actStateEnum} from "@/utils/enum.js"
} }
} }
}, },
mounted() {
this.form.belong_dept = uni.getStorageSync("userInfo").belong_dept;
this.getVehRegList();
},
methods:{ methods:{
showAmChange(){
this.showAm = !this.showAm;
},
getVehRegList(){
let that = this;
that.$api.vehRegList({page:0}).then(res=>{
res.forEach(item=>{
item.text = item.name;
item.value = item.id;
})
that.vehRegList = res;
})
},
vehregChange(){
let that = this;
that.vehRegList.forEach(item=>{
if(item.id == that.form.vehreg){
that.mroomName = item.name;
that.bookingTitle = item.name+"预定";
if(that.form.vdate!==''&&that.form.vdate!==null){
that.getmVehicleSlot();
}
}
})
},
vdateChange(){
let that = this;
if(that.form.vehreg!==''&&that.form.vehreg!==null){
that.getmVehicleSlot();
}
},
getmVehicleSlot(){
let that = this;
let form = {};
form.page = 0;
form.vehreg = that.form.vehreg;
form.vdate = that.form.vdate;
console.log('that.form',that.form)
that.timesListAm.forEach(slot=>{
slot.sloted = false;
})
that.timesListPm.forEach(slot=>{
slot.sloted = false;
})
that.$api.vehicleSlot(form).then(res=>{
res.forEach(item=>{
if(item.slot<12){
if(item.booking == that.form.id) {
that.timesListAm[item.slot].isSelect = true;
}else{
that.timesListAm[item.slot].sloted = true;
}
}else{
if(item.booking == that.form.id) {
that.timesListPm[item.slot-12].isSelect = true;
}else{
that.timesListPm[item.slot-12].sloted = true;
}
}
})
})
},
timeItemClickAm(index){
if(this.timesListPm[index].sloted){
}else{
this.timesListAm[index].isSelect = !this.timesListAm[index].isSelect;
this.clickItems();
}
},
timeItemClickPm(index){
if(this.timesListPm[index].sloted){
}else{
this.timesListPm[index].isSelect = !this.timesListPm[index].isSelect;
this.clickItems();
}
},
clickItems(){
let that = this;
that.selectList = [];
let lists = [],slots=[];
that.timesListAm.forEach(item=>{
if(item.isSelect){
lists.push(item)
slots.push(item.value);
}
})
that.timesListPm.forEach(item2=>{
if(item2.isSelect){
lists.push(item2)
slots.push(item2.value);
}
})
setTimeout(()=>{
that.totalCount = slots.length*0.5;
that.selectList = lists;
that.form.slots = slots;
},500)
},
// //
async submit_b_func(id){ async submit_b_func(id){
let that = this; let that = this;
@ -114,5 +315,50 @@ import {actStateEnum} from "@/utils/enum.js"
</script> </script>
<style scoped> <style scoped>
.iconsWrap{
width: 40upx;
height: 40upx;
display: inline-block;
line-height: 40upx;
border-radius: 25upx;
text-align: center;
background-color: #74ddfc;
border: 1px solid #74ddfc;
}
.timeView{
width: 100%;
padding: 10upx;
box-sizing: border-box;
}
.amBlock{
display: block;
}
.amBlockHide{
display: none;
}
.timeBlock{
width: 25%;
padding: 6upx;
height: 70upx;
margin: 10upx 0;
font-size: 28upx;
line-height: 70upx;
display: inline-block;
box-sizing: border-box;
}
.timeItem{
color: #666666;
text-align: center;
border-radius: 10upx;
background-color: #b9f0cb;
border: 1upx solid #eeeeee;
}
.timeItem.isSelected{
background-color: #00a870;
color: #fff;
}
.timeItem.isSloted{
background-color: #fac275!important;
color: #fff;
}
</style> </style>

View File

@ -5,31 +5,38 @@
<uni-forms v-model="form" label-width="150rpx" ref="customForm" :rules="customRules"> <uni-forms v-model="form" label-width="150rpx" ref="customForm" :rules="customRules">
<ticketd :ticket_="form.ticket_"></ticketd> <ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="供应商名称" required> <uni-forms-item label="供应商名称" required>
<uni-easyinput v-model="form.name" placeholder="请输入供应商名称" :disabled="mode=='show'"/> <uni-easyinput v-model="form.name" placeholder="请输入供应商名称" v-if="mode!='show'"/>
<span v-else>{{form.name}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="物料分类" required> <uni-forms-item label="物料分类" required>
<uni-easyinput v-model="form.material_cate" placeholder="请输入物料分类" :disabled="mode=='show'"/> <uni-easyinput v-model="form.material_cate" placeholder="请输入物料分类" v-if="mode!='show'"/>
<span v-else>{{form.material_cate}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="物料名称" required> <uni-forms-item label="物料名称" required>
<uni-easyinput v-model="form.material_name" placeholder="请输入物料名称" :disabled="mode=='show'"/> <uni-easyinput v-model="form.material_name" placeholder="请输入物料名称" v-if="mode!='show'"/>
<span v-else>{{form.material_name}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="调查表" required> <uni-forms-item label="调查表">
<xtUpload v-model="form.survery_form" v-model:obj="form.survery_form_" xtype="id" :disabled="mode=='show'"></xtUpload> <xtUpload v-model="form.survery_form" v-model:obj="form.survery_form_" xtype="id" v-if="mode!='show'"></xtUpload>
<view v-else>
<filePreview v-if="form.survery_form_" :url="form.survery_form_.file" :name="form.survery_form_.name" style="width: 100%;height: 30upx;"></filePreview>
<text v-else></text>
</view>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="营业执照" required> <uni-forms-item label="营业执照">
<xtUpload v-model="form.business_license" v-model:obj="form.business_license_" xtype="id" :disabled="mode=='show'"></xtUpload> <xtUpload v-model="form.business_license" v-model:obj="form.business_license_" xtype="id" v-if="mode!='show'"></xtUpload>
<filePreview v-if="mode=='show'&&form.business_license_" :url="form.business_license_.file" :name="form.business_license_.name" style="width: 100%;height: 30upx;"></filePreview>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="质量证书" required> <uni-forms-item label="质量证书">
<xtUpload v-model="form.quality_certificate" v-model:obj="form.quality_certificate_" xtype="id" :disabled="mode=='show'"></xtUpload> <xtUpload v-model="form.quality_certificate" v-model:obj="form.quality_certificate_" xtype="id" v-if="mode!='show'"></xtUpload>
<filePreview v-if="mode=='show'&&form.quality_certificate_" :url="form.quality_certificate_.file" :name="form.quality_certificate_.name" style="width: 100%;height: 30upx;"></filePreview>
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
</scroll-view> </scroll-view>
<view class="footer_fixed"> <view class="footer_fixed">
<ticketd_b v-if="form.ticket_" :t_id="form.id" :ticket_="form.ticket_" <ticketd_b :workflow_key="'wf_supplieraudit'" :title="'供应商'+form.name + '审批'" :t_id="form.id" :ticket_="form.ticket_"
:ticket_data="ticket_data" @success="()=>{uni.navigateBack()}" ref="ticketd_b"></ticketd_b> @success="submitSuccess" :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
<button v-else size="mini" @click="handleSave" :loading="saveLoading" :disabled="saveLoading" type="primary">
提交审批
</button>
</view> </view>
</view> </view>
</template> </template>
@ -39,8 +46,9 @@ import ticketd_b from "../wf/ticketd_b.vue"
import ticketd from "../wf/ticketd.vue" import ticketd from "../wf/ticketd.vue"
import {actStateEnum} from "@/utils/enum.js" import {actStateEnum} from "@/utils/enum.js"
import xtUpload from "@/components/xtUpload.vue" import xtUpload from "@/components/xtUpload.vue"
import filePreview from "@/components/filePreview.vue"
export default { export default {
components: { ticketd_b, ticketd, xtUpload }, components: { ticketd_b, ticketd, xtUpload,filePreview },
data(){ data(){
return{ return{
saveLoading: false, saveLoading: false,
@ -48,10 +56,16 @@ import xtUpload from "@/components/xtUpload.vue"
t_id: null, t_id: null,
form:{ form:{
name:"", name:"",
material_type:"", material_cate:"",
material_name:"", material_name:"",
survery_form:"",
business_license:"",
quality_certificate:"",
}, },
userInfo:{}, userInfo:{},
survery_form:{},
business_license:{},
quality_certificate:{},
type:0, type:0,
header:"", header:"",
customRules: { customRules: {
@ -86,24 +100,20 @@ import xtUpload from "@/components/xtUpload.vue"
} }
}, },
methods:{ methods:{
handleSave(){ async submit_b_func(id){
let that = this; let that = this;
that.$refs.customForm.validate().then(res => { if (that.mode != 'show') {
that.saveLoading = true; if(that.form.id) {
that.$api.supplierauditCreate(that.form).then(res => { await that.$api.supplierauditUpdate(that.form.id, that.form);
that.saveLoading = false; }else{
uni.showToast({ let res = await that.$api.supplierauditCreate(that.form);
title: '提交成功', that.form.id = res.id;
icon: 'success' }
}); }
uni.navigateBack() },
}).catch(e=>{ submitSuccess(){
that.saveLoading = false; uni.navigateTo({
console.log('err', err); url: "/pages/index/index"
})
}).catch(err => {
console.log('err', err);
}) })
}, },
} }

View File

@ -2,47 +2,52 @@
<template> <template>
<view class="container"> <view class="container">
<scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;"> <scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;">
<uni-forms v-model="form" label-width="150upx" ref="customForm" :rules="customRules"> <uni-forms v-model="form" label-width="180upx" ref="customForm" :rules="customRules">
<ticketd :ticket_="form.ticket_"></ticketd> <ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="论文名称" required name="name"> <uni-forms-item label="拟发表论文名称" required name="name">
<uni-easyinput v-model="form.paper_name" placeholder="请输入论文名称" :disabled="mode=='show'"/> <uni-easyinput v-model="form.paper_name" placeholder="请输入拟发表论文名称" v-if="mode!='show'"/>
<text v-else>{{form.paper_name}}</text>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="期刊名称" required name="publication_name"> <uni-forms-item label="申请部门" required name="organization">
<uni-easyinput v-model="form.publication_name" placeholder="请输入期刊名称" :disabled="mode=='show'"/> <uni-easyinput v-model="form.organization" placeholder="请输入申请部门" v-if="mode!='show'"/>
<text v-else>{{form.organization}}</text>
</uni-forms-item>
<uni-forms-item label="拟投期刊名称" required name="publication_name">
<uni-easyinput v-model="form.publication_name" placeholder="请输入拟投期刊名称" v-if="mode!='show'"/>
<text v-else>{{form.publication_name}}</text>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="作者" required> <uni-forms-item label="作者" required>
<uni-easyinput v-model="form.author" placeholder="作者" :disabled="mode=='show'"/> <uni-easyinput v-model="form.author" placeholder="作者" v-if="mode!='show'"/>
<text v-else>{{form.author}}</text>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="文章类型"> <uni-forms-item label="拟发表文章类型">
<uni-data-checkbox v-model="form.paper_type" :localdata="hobby" @change="sealTypeChange"></uni-data-checkbox> <uni-data-checkbox v-model="form.paper_type" :localdata="hobby" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="中文核心"> <uni-forms-item label="是否为中文核心">
<uni-data-checkbox v-model="form.is_chinese_core" :localdata="hobby2" @change="sealTypeChange"></uni-data-checkbox> <uni-data-checkbox v-model="form.is_chinese_core" :localdata="hobby2" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="SCI/EI收录"> <uni-forms-item label="是否被SCI/EI收录">
<uni-data-checkbox v-model="form.is_sci" :localdata="hobby3" @change="sealTypeChange"></uni-data-checkbox> <uni-data-checkbox v-model="form.is_sci" :localdata="hobby3" :disabled="mode=='show'"></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>
<uni-forms-item label="技术状态"></uni-forms-item> <uni-forms-item label="技术状态"></uni-forms-item>
<template v-for="(item,index) in hobby4"> <template v-for="(item,index) in hobby4">
<uni-data-checkbox multiple v-model="item[0].status" :localdata="item" @change="checkChange" style="padding-left:150upx;"></uni-data-checkbox> <uni-data-checkbox multiple v-model="item[0].status" :localdata="item" :disabled="mode=='show'" style="padding-left:180upx;"></uni-data-checkbox>
<template v-if="item[0].status.length>0" style="display: flex;justify-content: flex-end;width:80%"> <template v-if="item[0].status.length>0" style="display: flex;justify-content: flex-end;width:80%">
<xtUpload v-model="item[0].file" v-model:obj="item[0].file_" xtype="id" :disabled="mode=='show'" style="padding-left:145upx;width:80%"></xtUpload> <xtUpload v-if="mode!='show'" v-model="item[0].file" xtype="path" style="padding-left:175upx;width:80%"></xtUpload>
<filePreview v-else :filePath="item[0].file" style="padding-left:175upx;width: 100%;height: 30upx;"></filePreview>
</template> </template>
</template> </template>
<uni-forms-item label="技术文件"></uni-forms-item> <uni-forms-item label="技术文件"></uni-forms-item>
<template v-for="item in hobby5"> <template v-for="item in hobby5">
<view style="display: flex;margin-bottom: 20upx;"> <view style="display: flex;margin-bottom: 20upx;">
<uni-data-checkbox multiple v-model="item[0].name" :localdata="item" @change="checkChange" style="padding-left:150upx;flex: none"></uni-data-checkbox> <uni-data-checkbox multiple v-model="item[0].name" :localdata="item" :disabled="mode=='show'" style="padding-left:180upx;flex: none"></uni-data-checkbox>
<uni-number-box v-model="item[0].pages" :disabled="mode=='show'||item[0].name.length<1"></uni-number-box> <uni-number-box v-model="item[0].pages" :disabled="mode=='show'||item[0].name.length<1"></uni-number-box>
</view> </view>
</template> </template>
</uni-forms> </uni-forms>
</scroll-view> </scroll-view>
<view class="footer_fixed"> <view class="footer_fixed">
<ticketd_b :workflow_key="'wf_paperse'" :title="form.name + '-论文申密'" :t_id="form.id" :ticket_="form.ticket_" <ticketd_b :workflow_key="'wf_paperse'" :title="'论文申密'" :t_id="form.id" :ticket_="form.ticket_"
@success="submitSuccess" :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b> @success="submitSuccess" :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
</view> </view>
</view> </view>
@ -54,20 +59,21 @@ import ticketd from "../wf/ticketd.vue"
import config from '/utils/config'; import config from '/utils/config';
import {actStateEnum} from "@/utils/enum.js" import {actStateEnum} from "@/utils/enum.js"
import xtUpload from "@/components/xtUpload.vue" import xtUpload from "@/components/xtUpload.vue"
import filePreview from "@/components/filePreview.vue"
export default { export default {
components: { ticketd_b, ticketd,xtUpload }, components: { ticketd_b, ticketd,xtUpload,filePreview },
data(){ data(){
return{ return{
mode:"add", mode:"add",
t_id: null, t_id: null,
form:{ form:{
name:"", paper_name:"",
author:"", author:"",
type:"", organization:"",
is_public:false, publication_name:"",
area:"", paper_type:"",
other_area:"", is_chinese_core:false,
belong_dept:"", is_sci:false,
tech_status:[], tech_status:[],
tech_file:[], tech_file:[],
}, },
@ -131,12 +137,9 @@ import xtUpload from "@/components/xtUpload.vue"
else if(item.name=='是否参与应用于生产/销售'){index=3} else if(item.name=='是否参与应用于生产/销售'){index=3}
else if(item.name=='是否参与过技术交流'){index=4} else if(item.name=='是否参与过技术交流'){index=4}
that.hobby4[index][0].file = item.file; that.hobby4[index][0].file = item.file;
that.hobby4[index][0].checked = item.checked;
that.hobby4[index][0].status = [];
if(item.status=='是'){ if(item.status=='是'){
that.hobby4[index][0].status.push(item.status) that.hobby4[index][0].status.push(item.status)
let obj = {name:item.file,path:item.file}; let obj = {name:item.file,path:item.file};
that.hobby4[index][0].file =obj;
that.hobby4[index][0].files.push(obj) that.hobby4[index][0].files.push(obj)
} }
}) })
@ -151,7 +154,7 @@ import xtUpload from "@/components/xtUpload.vue"
that.hobby5[index2][0].name.push(item2.name); that.hobby5[index2][0].name.push(item2.name);
} }
}) })
if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) { if(that.form.ticket_&&that.form.ticket_.state_&&that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) {
that.mode = "edit"; that.mode = "edit";
}else{ }else{
that.mode = "show"; that.mode = "show";
@ -159,75 +162,25 @@ import xtUpload from "@/components/xtUpload.vue"
} }
} }
}, },
// mounted() {
// this.form.belong_dept = uni.getStorageSync("userInfo").belong_dept;
// },
methods:{ methods:{
checkChange(e){
console.log('e',e)
},
sealChange(){
console.log('seal1',this.seal1)
},
fileSelect(e,index){
console.log('fileSelect',e)
console.log('fileSelectindex',index)
this.uploadFile(e,index)
},
fileSuccess(e){
console.log('fileSuccess',e)
},
uploadFile(e,index) {
let that = this;
if (e.tempFiles.length === 0) {
uni.showToast({
title: '请先选择文件',
icon: 'none',
});
return;
}
//
const file = e.tempFiles[0];
let fieldName = 'file';
let filePath = file.url;
//
uni.uploadFile({
url: `${config.baseUrl}/file/`,
filePath: filePath,
name: fieldName,
formData: {},
header: that.header,
success: (uploadRes) => {
//
const data = JSON.parse(uploadRes.data);
if(data){
that.hobby4[index][0].file ={name:data.name,path:data.path} ;
uni.showToast({
title: '上传成功',
icon: 'success',
});
}
},
});
},
async submit_b_func(id){ async submit_b_func(id){
let that = this; let that = this;
console.log('that.form',that.form) console.log('that.form',that.form)
let tech_file = [],tech_status=[]; let tech_file = [],tech_status=[];
that.hobby4.forEach(item4=>{ that.hobby4.forEach(item4=>{
let obj4 = {}; let obj4 = {};
if(item4[0].status.length>0){
obj4.name = item4[0].text; obj4.name = item4[0].text;
obj4.status = '是'; obj4.file = item4[0].file?item4[0].file:"";
obj4.file = item4[0].file.path; obj4.status = item4[0].status.length>0?"是":"";
}else{
obj4.name = item4[0].text;
obj4.status = '否';
obj4.file = "";
}
tech_status.push(obj4) tech_status.push(obj4)
}) })
that.hobby5.forEach(item5=>{ that.hobby5.forEach(item5=>{
let obj5 = {}; let obj5 = {};
obj5.name = item5[0].text; obj5.name = item5[0].text;
obj5.pages = item5[0].pages; obj5.pages = item5[0].name.length>0?item5[0].pages:"";
obj5.checked = item5[0].name.length>0?true:false; obj5.checked = item5[0].name.length>0?true:false;
tech_file.push(obj5) tech_file.push(obj5)
}) })

View File

@ -5,34 +5,42 @@
<uni-forms v-model="form" label-width="150upx" ref="customForm" :rules="customRules"> <uni-forms v-model="form" label-width="150upx" ref="customForm" :rules="customRules">
<ticketd :ticket_="form.ticket_"></ticketd> <ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="专利名称" required name="name"> <uni-forms-item label="专利名称" required name="name">
<uni-easyinput v-model="form.name" placeholder="请输入专利名称" :disabled="mode=='show'"/> <uni-easyinput v-model="form.name" placeholder="请输入专利名称" v-if="mode!='show'"/>
<span v-else>{{form.name}}</span>
</uni-forms-item>
<uni-forms-item label="申请部门" required name="organization">
<uni-easyinput v-model="form.organization" placeholder="请输入申请部门" v-if="mode!='show'"/>
<span v-else>{{form.organization}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="发明人" required> <uni-forms-item label="发明人" required>
<uni-easyinput v-model="form.author" placeholder="请输入发明人" :disabled="mode=='show'"/> <uni-easyinput v-model="form.author" placeholder="请输入发明人" v-if="mode!='show'"/>
<span v-else>{{form.author}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="专利类型" required> <uni-forms-item label="专利类型" required>
<uni-data-checkbox v-model="form.type" :localdata="hobby"></uni-data-checkbox> <uni-data-checkbox v-model="form.type" :localdata="hobby" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="是否公开" required> <uni-forms-item label="是否公开" required>
<uni-data-checkbox v-model="form.is_public" :localdata="hobby2"></uni-data-checkbox> <uni-data-checkbox v-model="form.is_public" :localdata="hobby2" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="申请地域" required> <uni-forms-item label="申请地域" required>
<uni-data-checkbox v-model="form.area" :localdata="hobby3"></uni-data-checkbox> <uni-data-checkbox v-model="form.area" :localdata="hobby3" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="" v-if="form.area.includes('Foreign')||form.area.includes('PCT')"> <uni-forms-item label="" v-if="form.area=='Foreign'|| form.area=='PCT'">
<uni-easyinput v-model="form.other_area" placeholder="请输入申请的国家" :disabled="mode=='show'"/> <uni-easyinput v-model="form.other_area" placeholder="请输入申请的国家" v-if="mode!='show'"/>
<span v-else>{{form.other_area}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="技术状态"></uni-forms-item> <uni-forms-item label="技术状态"></uni-forms-item>
<template v-for="(item,index) in hobby4"> <template v-for="(item,index) in hobby4">
<uni-data-checkbox multiple v-model="item[0].status" :localdata="item" @change="checkChange" style="padding-left:150upx;"></uni-data-checkbox> <uni-data-checkbox multiple v-model="item[0].status" :localdata="item" @change="checkChange" :disabled="mode=='show'" style="padding-left:150upx;"></uni-data-checkbox>
<template v-if="item[0].status.length>0" style="display: flex;justify-content: flex-end;width:80%"> <template v-if="item[0].status.length>0" style="display: flex;justify-content: flex-end;width:80%">
<xtUpload v-model="item[0].file" v-model:obj="item[0].file_" xtype="id" :disabled="mode=='show'" style="padding-left:145upx;width:80%"></xtUpload> <xtUpload v-if="mode!='show'" v-model="item[0].file" xtype="path" style="padding-left:145upx;width:80%"></xtUpload>
<filePreview v-else :filePath="item[0].file" style="padding-left:145upx;width: 100%;height: 30upx;"></filePreview>
</template> </template>
</template> </template>
<uni-forms-item label="技术文件"></uni-forms-item> <uni-forms-item label="技术文件"></uni-forms-item>
<template v-for="item in hobby5"> <template v-for="item in hobby5">
<view style="display: flex;margin-bottom: 20upx;"> <view style="display: flex;margin-bottom: 20upx;">
<uni-data-checkbox multiple v-model="item[0].name" :localdata="item" @change="checkChange" style="padding-left:150upx;flex: none"></uni-data-checkbox> <uni-data-checkbox multiple v-model="item[0].name" :localdata="item" @change="checkChange" :disabled="mode=='show'" style="padding-left:150upx;flex: none"></uni-data-checkbox>
<uni-number-box v-model="item[0].pages" :disabled="mode=='show'||item[0].name.length<1"></uni-number-box> <uni-number-box v-model="item[0].pages" :disabled="mode=='show'||item[0].name.length<1"></uni-number-box>
</view> </view>
</template> </template>
@ -51,8 +59,9 @@ import ticketd from "../wf/ticketd.vue"
import config from '/utils/config'; import config from '/utils/config';
import {actStateEnum} from "@/utils/enum.js" import {actStateEnum} from "@/utils/enum.js"
import xtUpload from "@/components/xtUpload.vue" import xtUpload from "@/components/xtUpload.vue"
import filePreview from "@/components/filePreview.vue"
export default { export default {
components: { ticketd_b, ticketd,xtUpload }, components: { ticketd_b, ticketd,xtUpload,filePreview },
data(){ data(){
return{ return{
mode:"add", mode:"add",
@ -159,6 +168,9 @@ import xtUpload from "@/components/xtUpload.vue"
} }
} }
}, },
mounted() {
this.form.belong_dept = uni.getStorageSync("userInfo").belong_dept;
},
methods:{ methods:{
checkChange(e){ checkChange(e){
console.log('e',e) console.log('e',e)
@ -166,68 +178,21 @@ import xtUpload from "@/components/xtUpload.vue"
sealChange(){ sealChange(){
console.log('seal1',this.seal1) console.log('seal1',this.seal1)
}, },
fileSelect(e,index){
console.log('fileSelect',e)
console.log('fileSelectindex',index)
this.uploadFile(e,index)
},
fileSuccess(e){
console.log('fileSuccess',e)
},
uploadFile(e,index) {
let that = this;
if (e.tempFiles.length === 0) {
uni.showToast({
title: '请先选择文件',
icon: 'none',
});
return;
}
//
const file = e.tempFiles[0];
let fieldName = 'file';
let filePath = file.url;
//
uni.uploadFile({
url: `${config.baseUrl}/file/`,
filePath: filePath,
name: fieldName,
formData: {},
header: that.header,
success: (uploadRes) => {
//
const data = JSON.parse(uploadRes.data);
if(data){
that.hobby4[index][0].file ={name:data.name,path:data.path} ;
uni.showToast({
title: '上传成功',
icon: 'success',
});
}
},
});
},
async submit_b_func(id){ async submit_b_func(id){
let that = this; let that = this;
console.log('that.form',that.form) console.log('that.form',that.form)
let tech_file = [],tech_status=[]; let tech_file = [],tech_status=[];
that.hobby4.forEach(item4=>{ that.hobby4.forEach(item4=>{
let obj4 = {}; let obj4 = {};
if(item4[0].status.length>0){
obj4.name = item4[0].text; obj4.name = item4[0].text;
obj4.status = '是'; obj4.file = item4[0].file?item4[0].file:"";
obj4.file = item4[0].file.path; obj4.status = item4[0].status.length>0?"是":"";
}else{
obj4.name = item4[0].text;
obj4.status = '否';
obj4.file = "";
}
tech_status.push(obj4) tech_status.push(obj4)
}) })
that.hobby5.forEach(item5=>{ that.hobby5.forEach(item5=>{
let obj5 = {}; let obj5 = {};
obj5.name = item5[0].text; obj5.name = item5[0].text;
obj5.pages = item5[0].pages; obj5.pages = item5[0].name.length>0?item5[0].pages:"";
obj5.checked = item5[0].name.length>0?true:false; obj5.checked = item5[0].name.length>0?true:false;
tech_file.push(obj5) tech_file.push(obj5)
}) })

View File

@ -4,38 +4,42 @@
<scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;"> <scroll-view scroll-y style="padding-bottom: 180rpx;background-color: #fff;">
<uni-forms v-model="form" label-width="150rpx" ref="customForm" :rules="customRules"> <uni-forms v-model="form" label-width="150rpx" ref="customForm" :rules="customRules">
<ticketd :ticket_="form.ticket_"></ticketd> <ticketd :ticket_="form.ticket_"></ticketd>
<uni-forms-item label="名称" required>
<uni-easyinput v-model="form.name" placeholder="请输入名称" v-if="mode!='show'"/>
<span v-else>{{form.name}}</span>
</uni-forms-item>
<uni-forms-item label="日期" required> <uni-forms-item label="日期" required>
<uni-datetime-picker type="date" :clear-icon="false" v-model="form.p_date" :disabled="mode=='show'"/> <uni-datetime-picker type="date" :clear-icon="false" v-model="form.p_date" v-if="mode!='show'"/>
<span v-else>{{form.p_date}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="归口部门" required> <uni-forms-item label="归口部门" required>
<uni-data-select <uni-easyinput v-model="form.p_dept" placeholder="请输入归口部门" v-if="mode!='show'"/>
v-model="form.p_dept" <span v-else>{{form.p_dept}}</span>
:localdata="deptList"
:disabled="mode=='show'"
@change="mdateChange"
></uni-data-select>
</uni-forms-item>
<uni-forms-item label="负责人" required>
<uni-easyinput v-model="form.charge" placeholder="请输入负责人" :disabled="mode=='show'"/>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="建设期" required> <uni-forms-item label="建设期" required>
<uni-easyinput v-model="form.const" placeholder="请输入建设期" :disabled="mode=='show'"/> <uni-easyinput v-model="form.const" placeholder="请输入建设期" v-if="mode!='show'"/>
<span v-else>{{form.const}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="省级平台"> <uni-forms-item label="省级平台">
<uni-data-checkbox v-model="form.province_p" :localdata="hobby" @change="typeChange"></uni-data-checkbox> <uni-data-checkbox v-model="form.province_p" :localdata="hobby" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="市级平台"> <uni-forms-item label="市级平台">
<uni-data-checkbox v-model="form.city_p" :localdata="hobby" @change="typeChange"></uni-data-checkbox> <uni-data-checkbox v-model="form.city_p" :localdata="hobby" :disabled="mode=='show'"></uni-data-checkbox>
</uni-forms-item>
<uni-forms-item label="负责人" required>
<uni-easyinput v-model="form.charge" placeholder="请输入负责人" v-if="mode!='show'"/>
<span v-else>{{form.charge}}</span>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="平台基本情况与目标绩效" label-width="750" required> <uni-forms-item label="平台基本情况与目标绩效" label-width="750" required>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label-width="100"> <uni-forms-item label-width="100">
<textarea v-model="form.condition" placeholder-style="color:#efefef" placeholder="平台基本情况与目标绩效" style="width:100%; border: 2upx solid #e5e5e5;padding: 10upx;"/> <textarea v-model="form.condition" v-if="mode!='show'" placeholder-style="color:#efefef" placeholder="平台基本情况与目标绩效" style="width:100%; border: 2upx solid #e5e5e5;padding: 10upx;"/>
<span v-else>{{form.condition}}</span>
</uni-forms-item> </uni-forms-item>
</uni-forms> </uni-forms>
</scroll-view> </scroll-view>
<view class="footer_fixed"> <view class="footer_fixed">
<ticketd_b :workflow_key="'wf_patent'" :title="form.filename + '-印章申请'" :t_id="form.id" :ticket_="form.ticket_" <ticketd_b :workflow_key="'wf_plat'" :title="form.name + '-平台申请'" :t_id="form.id" :ticket_="form.ticket_"
@success="submitSuccess" :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b> @success="submitSuccess" :submit_b_func="submit_b_func" ref="ticketd_b_start"></ticketd_b>
</view> </view>
</view> </view>
@ -52,19 +56,19 @@ import {actStateEnum} from "@/utils/enum.js"
mode:"add", mode:"add",
t_id: null, t_id: null,
form:{ form:{
id:null, name:"",
file:"", p_date:"",
filename:"", condition:"",
file_count:"", p_dept:"",
is_lending:false, const:"",
contacts:"", charge:"",
belong_dept:"", city_p:false,
ticket_:null, province_p:false,
}, },
type:0, type:0,
hobby: [ hobby: [
{text: '是',value: 'true'}, {text: '是',value:true},
{text: '否',value: 'false'}, {text: '否',value: false},
], ],
deptList:[], deptList:[],
header:"", header:"",
@ -91,7 +95,7 @@ import {actStateEnum} from "@/utils/enum.js"
that.t_id = options.t_id?options.t_id:null; that.t_id = options.t_id?options.t_id:null;
if(that.mode != "add"){ if(that.mode != "add"){
if(that.t_id) { if(that.t_id) {
that.form = await that.$api.sealItem(that.t_id); that.form = await that.$api.pfItem(that.t_id);
if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) { if(that.form.ticket_.state_.type == 1 && that.form.create_by == uni.getStorageSync("userInfo").id ) {
that.mode = "edit"; that.mode = "edit";
}else{ }else{
@ -118,9 +122,9 @@ import {actStateEnum} from "@/utils/enum.js"
}) })
if (that.mode != 'show') { if (that.mode != 'show') {
if(that.form.id) { if(that.form.id) {
await that.$api.patentUpdate(that.form.id, that.form) await that.$api.pfUpdate(that.form.id, that.form)
}else{ }else{
let res = await that.$api.patentCreate(that.form) let res = await that.$api.pfCreate(that.form)
that.form.id = res.id; that.form.id = res.id;
} }
} }

View File

@ -53,9 +53,10 @@ export default {
publicItem:(id,data) => http(`/ofm/publicity/${id}/`, 'GET', data), publicItem:(id,data) => http(`/ofm/publicity/${id}/`, 'GET', data),
publicDelete:(id) => http(`/ofm/publicity/${id}/`, 'DELETE'), publicDelete:(id) => http(`/ofm/publicity/${id}/`, 'DELETE'),
//用车申请 //用车申请
vehicleList:(data) => http(`/ofm/vehicle/`, 'GET' , data), vehicleSlot:(data) => http(`/ofm/vsolt/`, 'GET' , data),
vehicleCreate:(data) => http(`/ofm/vehicle/`, 'POST' , data), vehRegList:(data) => http(`/ofm/vehicle/`, 'GET' , data),
vehicleItem:(id,data) => http(`/ofm/vehicle/${id}/`, 'GET', data), vehicleCreate:(data) => http(`/ofm/vehicle-use/`, 'POST' , data),
vehicleItem:(id,data) => http(`/ofm/vehicle-use/${id}/`, 'GET', data),
vehicleDelete:(id) => http(`/ofm/vehicle/${id}/`, 'DELETE'), vehicleDelete:(id) => http(`/ofm/vehicle/${id}/`, 'DELETE'),
//专利审批 //专利审批
patentList:(data) => http(`/srm/patentinfo/`, 'GET' , data), patentList:(data) => http(`/srm/patentinfo/`, 'GET' , data),
@ -70,6 +71,7 @@ export default {
//平台审批 //平台审批
pfList:(data) => http(`/srm/pf/`, 'GET' , data), pfList:(data) => http(`/srm/pf/`, 'GET' , data),
pfCreate:(data) => http(`/srm/pf/`, 'POST' , data), pfCreate:(data) => http(`/srm/pf/`, 'POST' , data),
pfUpdate:(id,data) => http(`/srm/pf/${id}/`, 'PUT', data),
pfItem:(id,data) => http(`/srm/pf/${id}/`, 'GET', data), pfItem:(id,data) => http(`/srm/pf/${id}/`, 'GET', data),
pfDelete:(id) => http(`/srm/pf/${id}/`, 'DELETE'), pfDelete:(id) => http(`/srm/pf/${id}/`, 'DELETE'),
//离职申请 //离职申请
@ -77,12 +79,8 @@ export default {
resignationCreate:(data) => http(`/hrm/resignation/`, 'POST' , data), resignationCreate:(data) => http(`/hrm/resignation/`, 'POST' , data),
resignationItem:(id,data) => http(`/hrm/resignation/${id}/`, 'GET', data), resignationItem:(id,data) => http(`/hrm/resignation/${id}/`, 'GET', data),
resignationDelete:(id) => http(`/hrm/resignation/${id}/`, 'DELETE'), resignationDelete:(id) => http(`/hrm/resignation/${id}/`, 'DELETE'),
//供应商申请
resignationList:(data) => http(`/hrm/resignation/`, 'GET' , data),
resignationCreate:(data) => http(`/hrm/resignation/`, 'POST' , data),
resignationItem:(id,data) => http(`/hrm/resignation/${id}/`, 'GET', data),
resignationDelete:(id) => http(`/hrm/resignation/${id}/`, 'DELETE'),
//供应商审核 //供应商审核
supplierauditCreate:(data) => http(`/pum/supplieraudit/`, 'POST' , data), supplierauditCreate:(data) => http(`/pum/supplieraudit/`, 'POST' , data),
supplierauditItem:(id,data) => http(`/pum/supplieraudit/${id}/`, 'GET', data), supplierauditItem:(id,data) => http(`/pum/supplieraudit/${id}/`, 'GET', data),
supplierauditUpdate:(id,data) => http(`/pum/supplieraudit/${id}/`, 'PUT', data),
} }