Blame view

pages/workFlow/workFlowForm/receiptProcessing/index.vue 3.53 KB
290144e9   易尊强   第一次
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
  <template>
  	<view class="ncc-wrap ncc-wrap-workflow">
  		<u-form :model="dataForm" :rules="rules" ref="dataForm" :errorType="['toast']" label-position="left"
  			label-width="150" label-align="left">
  			<u-form-item label="流程标题" prop="flowTitle" v-if="judgeShow('flowTitle')" required>
  				<u-input v-model="dataForm.flowTitle" placeholder="流程标题" :disabled="judgeWrite('flowTitle')"></u-input>
  			</u-form-item>
  			<u-form-item label="流程编码" prop="billNo" v-if="judgeShow('billNo')" required>
  				<u-input v-model="dataForm.billNo" placeholder="流程编码" disabled></u-input>
  			</u-form-item>
  			<u-form-item label="紧急程度" prop="flowUrgent" v-if="judgeShow('flowUrgent')" required>
  				<ncc-select v-model="dataForm.flowUrgent" placeholder="请选择紧急程度" :options="flowUrgentOptions"
  					:disabled="judgeWrite('flowUrgent')">
  				</ncc-select>
  			</u-form-item>
  
  			<view class="ncc-card">
  				<u-form-item label="文件标题" prop="fileTitle" v-if="judgeShow('fileTitle')">
  					<u-input v-model="dataForm.fileTitle" placeholder="请输入文件标题" :disabled="judgeWrite('fileTitle')">
  					</u-input>
  				</u-form-item>
  				<u-form-item label="来文单位" prop="communicationUnit" v-if="judgeShow('communicationUnit')">
  					<u-input v-model="dataForm.communicationUnit" placeholder="请输入来文单位"
  						:disabled="judgeWrite('communicationUnit')"></u-input>
  				</u-form-item>
  				<u-form-item label="来文字号" prop="letterNum" v-if="judgeShow('letterNum')">
  					<u-input v-model="dataForm.letterNum" placeholder="请输入来文字号" :disabled="judgeWrite('letterNum')">
  					</u-input>
  				</u-form-item>
  				<u-form-item label="收文日期" prop="receiptDate" v-if="judgeShow('receiptDate')" required>
  					<ncc-date-time type="datetime" v-model="dataForm.receiptDate" placeholder="请输入收文日期"
  						:disabled="judgeWrite('receiptDate')"></ncc-date-time>
  				</u-form-item>
  				<u-form-item label="相关附件" prop="fileJson" v-if="judgeShow('fileJson')">
  					<ncc-file :list="fileList" :disabled="judgeWrite('fileJson')" />
  				</u-form-item>
  			</view>
  		</u-form>
  	</view>
  </template>
  
  <script>
  	import comMixin from '../mixin'
  	export default {
  		name: 'ReceiptProcessing',
  		mixins: [comMixin],
  		data() {
  			return {
  				billEnCode: 'WF_ReceiptProcessingNo',
  				dataForm: {
  					flowTitle: '',
  					billNo: '',
  					flowUrgent: 1,
  					communicationUnit: '',
  					letterNum: '',
  					fileTitle: '',
  					receiptDate: '',
  					fileJson: ''
  				},
  				rules: {
  					flowTitle: [{
  						required: true,
  						message: '流程标题不能为空',
  						trigger: 'blur'
  					}],
  					flowUrgent: [{
  						required: true,
  						message: '紧急程度不能为空',
  						trigger: 'change',
  						type: 'number'
  					}],
  					billNo: [{
  						required: true,
  						message: '流程编码不能为空',
  						trigger: 'change',
  					}],
  					receiptDate: [{
  						required: true,
  						message: '收文日期不能为空',
  						trigger: 'change',
  						type: 'number'
  					}],
  				},
  			}
  		},
  		methods: {
  			selfInit(data) {
  				this.dataForm.applyDate = new Date().getTime()
  				this.dataForm.flowTitle = this.userInfo.userName + "的收文处理表"
  				this.dataForm.applyUser = this.userInfo.userName + '/' + this.userInfo.userAccount
  				this.dataForm.applyDept = this.userInfo.departmentName
  				if (this.userInfo.positionIds && this.userInfo.positionIds.length) {
  					let list = this.userInfo.positionIds.map(o => o.name)
  					this.dataForm.position = list.join(',')
  				}
  			},
  		}
  	}
  </script>
  
  <style>
  
  </style>