Merge branch 'main' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_mp
This commit is contained in:
		
						commit
						59c26054d9
					
				
							
								
								
									
										11
									
								
								App.vue
								
								
								
								
							
							
						
						
									
										11
									
								
								App.vue
								
								
								
								
							| 
						 | 
					@ -69,6 +69,7 @@
 | 
				
			||||||
	.container {
 | 
						.container {
 | 
				
			||||||
		color: #333;
 | 
							color: #333;
 | 
				
			||||||
		padding: 0rpx 12rpx;
 | 
							padding: 0rpx 12rpx;
 | 
				
			||||||
 | 
							background-color: #fff;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	.uni-forms-item {
 | 
						.uni-forms-item {
 | 
				
			||||||
		margin-bottom: 8rpx !important;
 | 
							margin-bottom: 8rpx !important;
 | 
				
			||||||
| 
						 | 
					@ -136,4 +137,14 @@
 | 
				
			||||||
		box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.1);
 | 
							box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.1);
 | 
				
			||||||
		z-index: 10;
 | 
							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>
 | 
					</style>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										41
									
								
								pages.json
								
								
								
								
							
							
						
						
									
										41
									
								
								pages.json
								
								
								
								
							| 
						 | 
					@ -32,13 +32,50 @@
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				"navigationBarTitleText" : "会议室预约"
 | 
									"navigationBarTitleText" : "会议室预约"
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		},{
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"path" : "pages/ofm/sealForm",
 | 
				
			||||||
 | 
								"style" : 
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"navigationBarTitleText" : "印章申请"
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"path" : "pages/ofm/vehicleForm",
 | 
				
			||||||
 | 
								"style" : 
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"navigationBarTitleText" : "用车申请"
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"path" : "pages/ofm/borrowfile_form",
 | 
				
			||||||
 | 
								"style" : 
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"navigationBarTitleText" : "档案借阅"
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"path" : "pages/ofm/publicityForm",
 | 
				
			||||||
 | 
								"style" : 
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"navigationBarTitleText" : "宣传报道"
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"path" : "pages/ofm/patent_form",
 | 
				
			||||||
 | 
								"style" : 
 | 
				
			||||||
 | 
								{
 | 
				
			||||||
 | 
									"navigationBarTitleText" : "专利审批"
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
			"path" : "pages/ofm/mroom",
 | 
								"path" : "pages/ofm/mroom",
 | 
				
			||||||
			"style" : 
 | 
								"style" : 
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				"navigationBarTitleText" : "会议室"
 | 
									"navigationBarTitleText" : "会议室"
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		},{
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
			"path" : "pages/ofm/booking",
 | 
								"path" : "pages/ofm/booking",
 | 
				
			||||||
			"style" : 
 | 
								"style" : 
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<view class="container">
 | 
						<view class="container container1">
 | 
				
			||||||
		<image src="/static/banner_c.png" mode="widthFix" style="width:100%"></image>
 | 
							<image src="/static/banner_c.png" mode="widthFix" style="width:100%"></image>
 | 
				
			||||||
		<uni-section :title="welTitle" type="circle" titleFontSize="15px" titleColor="#0000CD"
 | 
							<uni-section :title="welTitle" type="circle" titleFontSize="15px" titleColor="#0000CD"
 | 
				
			||||||
		 @click="goUserInfo">
 | 
							 @click="goUserInfo">
 | 
				
			||||||
| 
						 | 
					@ -34,22 +34,8 @@
 | 
				
			||||||
						</view>
 | 
											</view>
 | 
				
			||||||
					</view>
 | 
										</view>
 | 
				
			||||||
				</uni-grid-item>
 | 
									</uni-grid-item>
 | 
				
			||||||
			<uni-grid-item>
 | 
					 | 
				
			||||||
				<view class="grid-item-box" @click="cameraClick">
 | 
					 | 
				
			||||||
					<image class="image" src="/static/yuding.png" mode="aspectFill" />
 | 
					 | 
				
			||||||
					<text class="text">拍照</text>
 | 
					 | 
				
			||||||
				</view>
 | 
					 | 
				
			||||||
			</uni-grid-item>
 | 
					 | 
				
			||||||
			</uni-grid>
 | 
								</uni-grid>
 | 
				
			||||||
		</uni-section>
 | 
							</uni-section>
 | 
				
			||||||
	
 | 
					 | 
				
			||||||
	<!-- <uni-section title="列表信息" type="line">
 | 
					 | 
				
			||||||
		<uni-list>
 | 
					 | 
				
			||||||
			<uni-list-item v-for="(item ,index) in moduleList" :index="index" :key="index" :title="item.text">
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			</uni-list-item>
 | 
					 | 
				
			||||||
		</uni-list>
 | 
					 | 
				
			||||||
	</uni-section> -->
 | 
					 | 
				
			||||||
	</view>
 | 
						</view>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -61,22 +47,41 @@
 | 
				
			||||||
				welTitle: "",
 | 
									welTitle: "",
 | 
				
			||||||
				imageSrc:"",
 | 
									imageSrc:"",
 | 
				
			||||||
				currentDate: tool.getTodayDate(),
 | 
									currentDate: tool.getTodayDate(),
 | 
				
			||||||
				moduleList: [{
 | 
									moduleList: [
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
						navigate:'/pages/ofm/booking_form?mode=add',
 | 
											navigate:'/pages/ofm/booking_form?mode=add',
 | 
				
			||||||
						url: '/static/yuding.png',
 | 
											url: '/static/yuding.png',
 | 
				
			||||||
						text: '会议预定',
 | 
											text: '会议预定',
 | 
				
			||||||
						type: "primary",
 | 
											type: "primary",
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						navigate:'/pages/ofm/booking',
 | 
											navigate:'/pages/ofm/sealForm?mode=add',
 | 
				
			||||||
						url: '/static/meetingRecord.png',
 | 
											url: '/static/meetingRecord.png',
 | 
				
			||||||
						text: '预定记录',
 | 
											text: '印章申请',
 | 
				
			||||||
						type: "success"
 | 
											type: "success"
 | 
				
			||||||
					},
 | 
										},
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
						navigate:'/pages/ofm/mroom',
 | 
											navigate:'/pages/ofm/vehicleForm?mode=add',
 | 
				
			||||||
 | 
											url: '/static/meetingRecord.png',
 | 
				
			||||||
 | 
											text: '用车申请',
 | 
				
			||||||
 | 
											type: "success"
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											navigate:'/pages/ofm/borrowfile_form?mode=add',
 | 
				
			||||||
 | 
											url: '/static/meetingRecord.png',
 | 
				
			||||||
 | 
											text: '档案借阅',
 | 
				
			||||||
 | 
											type: "success"
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											navigate:'/pages/ofm/publicityForm?mode=add',
 | 
				
			||||||
						url: '/static/huiyishi.png',
 | 
											url: '/static/huiyishi.png',
 | 
				
			||||||
						text: '会议室',
 | 
											text: '宣传报道',
 | 
				
			||||||
 | 
											type: "warning"
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										{
 | 
				
			||||||
 | 
											navigate:'/pages/ofm/patent_form?mode=add',
 | 
				
			||||||
 | 
											url: '/static/huiyishi.png',
 | 
				
			||||||
 | 
											text: '专利审批',
 | 
				
			||||||
						type: "warning"
 | 
											type: "warning"
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				]
 | 
									]
 | 
				
			||||||
| 
						 | 
					@ -84,7 +89,6 @@
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		mounted() {
 | 
							mounted() {
 | 
				
			||||||
			this.initWelTitle();				
 | 
								this.initWelTitle();				
 | 
				
			||||||
					
 | 
					 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		onShow() {
 | 
							onShow() {
 | 
				
			||||||
			// #ifdef MP-WEIXIN
 | 
								// #ifdef MP-WEIXIN
 | 
				
			||||||
| 
						 | 
					@ -124,6 +128,9 @@
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss">
 | 
					<style lang="scss">
 | 
				
			||||||
 | 
						.container1{
 | 
				
			||||||
 | 
							background-color: rgba(255,255,255,0);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	.image {
 | 
						.image {
 | 
				
			||||||
		width: 60upx;
 | 
							width: 60upx;
 | 
				
			||||||
		height: 60upx;
 | 
							height: 60upx;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,6 +19,7 @@
 | 
				
			||||||
				page:1,
 | 
									page:1,
 | 
				
			||||||
				page_size:10,
 | 
									page_size:10,
 | 
				
			||||||
				dataList:[],
 | 
									dataList:[],
 | 
				
			||||||
 | 
									status: 'more',
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		mounted() {
 | 
							mounted() {
 | 
				
			||||||
| 
						 | 
					@ -28,6 +29,12 @@
 | 
				
			||||||
			this.page = 1;
 | 
								this.page = 1;
 | 
				
			||||||
			this.getlistData()
 | 
								this.getlistData()
 | 
				
			||||||
		},	
 | 
							},	
 | 
				
			||||||
 | 
							onReachBottom() {
 | 
				
			||||||
 | 
								if (this.status === 'more') {
 | 
				
			||||||
 | 
									this.page++;
 | 
				
			||||||
 | 
									this.getTicket()
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		methods:{
 | 
							methods:{
 | 
				
			||||||
			itemClick(item){
 | 
								itemClick(item){
 | 
				
			||||||
				uni.setStorageSync("currentBooking", item)
 | 
									uni.setStorageSync("currentBooking", item)
 | 
				
			||||||
| 
						 | 
					@ -37,9 +44,24 @@
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			getlistData(){
 | 
								getlistData(){
 | 
				
			||||||
				let that = this;
 | 
									let that = this;
 | 
				
			||||||
 | 
									that.status = 'loading';
 | 
				
			||||||
				that.$api.bookingList({page:that.page,page_size:that.page_size}).then(res=>{
 | 
									that.$api.bookingList({page:that.page,page_size:that.page_size}).then(res=>{
 | 
				
			||||||
 | 
										if(res.results.length < that.pageSize){
 | 
				
			||||||
 | 
											that.status = 'noMore';
 | 
				
			||||||
 | 
										}else{
 | 
				
			||||||
 | 
											that.status = 'more';
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
										if(that.page == 1){
 | 
				
			||||||
						that.dataList = res.results;
 | 
											that.dataList = res.results;
 | 
				
			||||||
				})
 | 
											uni.pageScrollTo({
 | 
				
			||||||
 | 
												scrollTop: 0, 
 | 
				
			||||||
 | 
												duration: 300
 | 
				
			||||||
 | 
											});
 | 
				
			||||||
 | 
										}else{
 | 
				
			||||||
 | 
											that.dataList = that.dataList.concat(res.results)
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
										uni.stopPullDownRefresh()
 | 
				
			||||||
 | 
									}).catch(e=>{uni.stopPullDownRefresh()})
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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>
 | 
				
			||||||
| 
						 | 
					@ -38,6 +38,12 @@
 | 
				
			||||||
			this.page = 1;
 | 
								this.page = 1;
 | 
				
			||||||
			this.getmRooms();
 | 
								this.getmRooms();
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
							onReachBottom() {
 | 
				
			||||||
 | 
								if (this.status === 'more') {
 | 
				
			||||||
 | 
									this.page++;
 | 
				
			||||||
 | 
									this.getmRooms()
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		methods:{
 | 
							methods:{
 | 
				
			||||||
			getmRooms(){
 | 
								getmRooms(){
 | 
				
			||||||
				let that = this;
 | 
									let that = this;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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>
 | 
				
			||||||
| 
						 | 
					@ -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>
 | 
				
			||||||
| 
						 | 
					@ -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>
 | 
				
			||||||
| 
						 | 
					@ -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>
 | 
				
			||||||
							
								
								
									
										32
									
								
								utils/api.js
								
								
								
								
							
							
						
						
									
										32
									
								
								utils/api.js
								
								
								
								
							| 
						 | 
					@ -12,6 +12,7 @@ export default {
 | 
				
			||||||
	wxmpLogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录
 | 
						wxmpLogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录
 | 
				
			||||||
	wxmpClogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录(自动创建账号)
 | 
						wxmpClogin: (data) => http('/auth/login_wxmp/', 'POST', data, true, false), //微信小程序登录(自动创建账号)
 | 
				
			||||||
	apkCheck: ()=>http('/system/apk/'), //apk检查
 | 
						apkCheck: ()=>http('/system/apk/'), //apk检查
 | 
				
			||||||
 | 
						uploadFile:(data ) => http('/file/', 'POST', data),//上传文件
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	getTicket:(data) => http('/wf/ticket/', 'GET', data),
 | 
						getTicket:(data) => http('/wf/ticket/', 'GET', data),
 | 
				
			||||||
	getTicketItem:(id) => http(`/wf/ticket/${id}/`, 'GET'),
 | 
						getTicketItem:(id) => http(`/wf/ticket/${id}/`, 'GET'),
 | 
				
			||||||
| 
						 | 
					@ -23,10 +24,41 @@ export default {
 | 
				
			||||||
	workflowInitkey:(key) => http(`/wf/workflow/${key}/init_key/`, 'GET'),
 | 
						workflowInitkey:(key) => http(`/wf/workflow/${key}/init_key/`, 'GET'),
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	getMroom:(data) => http('/ofm/mroom/', 'GET', data),
 | 
						getMroom:(data) => http('/ofm/mroom/', 'GET', data),
 | 
				
			||||||
 | 
						//会议室预定
 | 
				
			||||||
	bookingList:(data) => http('/ofm/mroombooking/', 'GET', data),
 | 
						bookingList:(data) => http('/ofm/mroombooking/', 'GET', data),
 | 
				
			||||||
	bookingItem:(id,data) => http(`/ofm/mroombooking/${id}/`, 'GET', data),
 | 
						bookingItem:(id,data) => http(`/ofm/mroombooking/${id}/`, 'GET', data),
 | 
				
			||||||
	bookingCreate:(data) => http(`/ofm/mroombooking/`, 'POST', data),
 | 
						bookingCreate:(data) => http(`/ofm/mroombooking/`, 'POST', data),
 | 
				
			||||||
	bookingUpdate:(id,data) => http(`/ofm/mroombooking/${id}/`, 'PUT', data),
 | 
						bookingUpdate:(id,data) => http(`/ofm/mroombooking/${id}/`, 'PUT', data),
 | 
				
			||||||
	bookingDelete:(id) => http(`/ofm/mroombooking/${id}/`, 'DELETE'),
 | 
						bookingDelete:(id) => http(`/ofm/mroombooking/${id}/`, 'DELETE'),
 | 
				
			||||||
	bookingSlot:(data) => http(`/ofm/mroomslot/`, 'GET' , data),
 | 
						bookingSlot:(data) => http(`/ofm/mroomslot/`, 'GET' , data),
 | 
				
			||||||
 | 
						//印章外出
 | 
				
			||||||
 | 
						sealList:(data) => http(`/ofm/lendingseal/`, 'GET' , data),
 | 
				
			||||||
 | 
						sealCreate:(data) => http(`/ofm/lendingseal/`, 'POST' , data),
 | 
				
			||||||
 | 
						sealItem:(id,data) => http(`/ofm/lendingseal/${id}/`, 'GET', data),
 | 
				
			||||||
 | 
						sealUpdate:(id,data) => http(`/ofm/lendingseal/${id}/`, 'PUT', data),
 | 
				
			||||||
 | 
						sealDelete:(id) => http(`/ofm/lendingseal/${id}/`, 'DELETE'),
 | 
				
			||||||
 | 
						//文件借阅
 | 
				
			||||||
 | 
						borrowList:(data) => http(`/ofm/fileborrow/`, 'GET' , data),
 | 
				
			||||||
 | 
						borrowCreate:(data) => http(`/ofm/fileborrow/`, 'POST' , data),
 | 
				
			||||||
 | 
						borrowItem:(id,data) => http(`/ofm/fileborrow/${id}/`, 'GET', data),
 | 
				
			||||||
 | 
						borrowUpdate:(id,data) => http(`/ofm/fileborrow/${id}/`, 'PUT', data),
 | 
				
			||||||
 | 
						borrowDelete:(id) => http(`/ofm/fileborrow/${id}/`, 'DELETE'),
 | 
				
			||||||
 | 
						//专利
 | 
				
			||||||
 | 
						patentList:(data) => http(`/ofm/patentinfo/`, 'GET' , data),
 | 
				
			||||||
 | 
						patentCreate:(data) => http(`/ofm/patentinfo/`, 'POST' , data),
 | 
				
			||||||
 | 
						patentItem:(id,data) => http(`/ofm/patentinfo/${id}/`, 'GET', data),
 | 
				
			||||||
 | 
						patentUpdate:(id,data) => http(`/ofm/patentinfo/${id}/`, 'PUT', data),
 | 
				
			||||||
 | 
						patentDelete:(id) => http(`/ofm/patentinfo/${id}/`, 'DELETE'),
 | 
				
			||||||
 | 
						//公告
 | 
				
			||||||
 | 
						publicList:(data) => http(`/ofm/publicity/`, 'GET' , data),
 | 
				
			||||||
 | 
						publicCreate:(data) => http(`/ofm/publicity/`, 'POST' , data),
 | 
				
			||||||
 | 
						publicItem:(id,data) => http(`/ofm/publicity/${id}/`, 'GET', data),
 | 
				
			||||||
 | 
						publicUpdate:(id,data) => http(`/ofm/publicity/${id}/`, 'PUT', data),
 | 
				
			||||||
 | 
						publicDelete:(id) => http(`/ofm/publicity/${id}/`, 'DELETE'),
 | 
				
			||||||
 | 
						//车辆
 | 
				
			||||||
 | 
						vehicleList:(data) => http(`/ofm/vehicle/`, 'GET' , data),
 | 
				
			||||||
 | 
						vehicleCreate:(data) => http(`/ofm/vehicle/`, 'POST' , data),
 | 
				
			||||||
 | 
						vehicleItem:(id,data) => http(`/ofm/vehicle/${id}/`, 'GET', data),
 | 
				
			||||||
 | 
						vehicleUpdate:(id,data) => http(`/ofm/vehicle/${id}/`, 'PUT', data),
 | 
				
			||||||
 | 
						vehicleDelete:(id) => http(`/ofm/vehicle/${id}/`, 'DELETE'),
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue