|
@@ -0,0 +1,606 @@
|
|
1
|
+<template>
|
|
2
|
+ <el-dialog :visible.sync="show" width="90%" append-to-body>
|
|
3
|
+ <div v-loading="loading">
|
|
4
|
+ <el-divider>验收检验</el-divider>
|
|
5
|
+ <el-form ref="editForm" :model="form" :rules="rules" label-width="150px">
|
|
6
|
+ <el-row type="flex" align="middle" justify="center" class="row">
|
|
7
|
+ <el-col :span="8">
|
|
8
|
+ <el-form-item label="质检报告单号" prop="zjbgdh">
|
|
9
|
+ <el-input :value="form.zjbgdh" placeholder="保存后自动生成" readonly />
|
|
10
|
+ </el-form-item>
|
|
11
|
+ </el-col>
|
|
12
|
+ <el-col :span="8">
|
|
13
|
+ <el-form-item label="库区名称" prop="orgName">
|
|
14
|
+ <el-input :value="form.orgName" readonly />
|
|
15
|
+ </el-form-item>
|
|
16
|
+ </el-col>
|
|
17
|
+ <el-col :span="8">
|
|
18
|
+ <el-form-item label="库区地址">
|
|
19
|
+ <el-input :value="$store.state.user.orgInfo.registeredAddress" :readonly="readonly" />
|
|
20
|
+ </el-form-item>
|
|
21
|
+ </el-col>
|
|
22
|
+ </el-row>
|
|
23
|
+
|
|
24
|
+ <el-row type="flex" align="middle" justify="center" class="row">
|
|
25
|
+ <el-col :span="8">
|
|
26
|
+ <el-form-item label="检验类别" prop="jylb">
|
|
27
|
+ <common-select v-model="form.jylb" type="JYLB" :readonly="readonly" />
|
|
28
|
+ </el-form-item>
|
|
29
|
+ </el-col>
|
|
30
|
+ <el-col :span="8">
|
|
31
|
+ <el-form-item label="仓房名称" prop="basicStorehouseId">
|
|
32
|
+ <el-select v-model.number="form.basicStorehouseId" clearable placeholder="请选择" :disabled="readonly" @change="houseChanged">
|
|
33
|
+ <el-option
|
|
34
|
+ v-for="item in houseOptions"
|
|
35
|
+ :key="item.value"
|
|
36
|
+ :label="item.label"
|
|
37
|
+ :value="item.value">
|
|
38
|
+ </el-option>
|
|
39
|
+ </el-select>
|
|
40
|
+ </el-form-item>
|
|
41
|
+ </el-col>
|
|
42
|
+ <el-col :span="8">
|
|
43
|
+ <el-form-item label="货位名称" prop="warehouseId">
|
|
44
|
+ <el-select v-model.number="form.warehouseId" clearable placeholder="请选择" :disabled="readonly" @change="wareChanged">
|
|
45
|
+ <el-option
|
|
46
|
+ v-for="item in wareOptions"
|
|
47
|
+ :key="item.value"
|
|
48
|
+ :label="item.label"
|
|
49
|
+ :value="item.value">
|
|
50
|
+ </el-option>
|
|
51
|
+ </el-select>
|
|
52
|
+ </el-form-item>
|
|
53
|
+ </el-col>
|
|
54
|
+ </el-row>
|
|
55
|
+
|
|
56
|
+ <el-row type="flex" align="middle" justify="center" class="row">
|
|
57
|
+ <el-col :span="8">
|
|
58
|
+ <el-form-item label="品种" prop="grainVarietyId">
|
|
59
|
+ <el-input :value="$enumUtils.getNameById(form.grainVarietyId).name" readonly />
|
|
60
|
+<!-- <common-select v-model.number="form.grainVarietyId" type="lsmxpz" :remote="true" :readonly="readonly" @native-change="pzChange" />-->
|
|
61
|
+ </el-form-item>
|
|
62
|
+ </el-col>
|
|
63
|
+ <el-col :span="8">
|
|
64
|
+ <el-form-item label="粮食等级" prop="grainGradeId">
|
|
65
|
+ <el-input :value="$enumUtils.getNameById(form.grainGradeId).name" readonly />
|
|
66
|
+<!-- <common-select v-model.number="form.grainGradeId" type="lsdj" :remote="true" :readonly="readonly" />-->
|
|
67
|
+ </el-form-item>
|
|
68
|
+ </el-col>
|
|
69
|
+ <el-col :span="8">
|
|
70
|
+ <el-form-item label="粮食性质" prop="grainNatureId">
|
|
71
|
+ <el-input :value="$enumUtils.getNameById(form.grainNatureId).name" readonly />
|
|
72
|
+<!-- <cascader-select root-enum-code="lsxz" v-model.number="form.grainNatureId" :readonly="readonly" @native-change="xzChange"/>-->
|
|
73
|
+ </el-form-item>
|
|
74
|
+ </el-col>
|
|
75
|
+ </el-row>
|
|
76
|
+
|
|
77
|
+ <el-row type="flex" align="middle" justify="center" class="row">
|
|
78
|
+ <el-col :span="8">
|
|
79
|
+ <el-form-item label="入库日期" prop="rkrq">
|
|
80
|
+ <el-input :value="$systemUtils.dateISOBJ(form.rkrq)" readonly />
|
|
81
|
+<!-- <el-date-picker v-model="form.rkrq" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" :readonly="readonly"></el-date-picker>-->
|
|
82
|
+ </el-form-item>
|
|
83
|
+ </el-col>
|
|
84
|
+ <el-col :span="8">
|
|
85
|
+ <el-form-item label="收获年度" prop="receiveYear">
|
|
86
|
+ <el-input v-model="form.receiveYear" readonly />
|
|
87
|
+<!-- <el-date-picker v-model="form.receiveYear" type="year" value-format="yyyy" :readonly="readonly"></el-date-picker>-->
|
|
88
|
+ </el-form-item>
|
|
89
|
+ </el-col>
|
|
90
|
+ <el-col :span="8">
|
|
91
|
+ <el-form-item label="产地" prop="produceArea">
|
|
92
|
+ <el-input :value="$enumUtils.getNameById(form.produceArea).name" readonly />
|
|
93
|
+ </el-form-item>
|
|
94
|
+ </el-col>
|
|
95
|
+ </el-row>
|
|
96
|
+
|
|
97
|
+ <el-row type="flex" align="middle" justify="center" class="row">
|
|
98
|
+ <el-col :span="8">
|
|
99
|
+ <el-form-item label="检验单位" prop="jydw">
|
|
100
|
+ <el-input v-model="form.jydw" :readonly="readonly" />
|
|
101
|
+ </el-form-item>
|
|
102
|
+ </el-col>
|
|
103
|
+ <el-col :span="8">
|
|
104
|
+ <el-form-item label="检验依据" prop="jyyj">
|
|
105
|
+ <common-select v-model="form.jyyj" type="JYYJ" :readonly="readonly" />
|
|
106
|
+ </el-form-item>
|
|
107
|
+ </el-col>
|
|
108
|
+ <el-col :span="8">
|
|
109
|
+ <el-form-item label="检验结果" prop="checkResult">
|
|
110
|
+ <common-select v-model="form.checkResult" type="GREAT_OR_NOT_2" :readonly="readonly"/>
|
|
111
|
+ </el-form-item>
|
|
112
|
+ </el-col>
|
|
113
|
+ </el-row>
|
|
114
|
+
|
|
115
|
+ <el-row type="flex" align="middle" justify="center" class="row">
|
|
116
|
+ <el-col :span="8">
|
|
117
|
+ <el-form-item label="检验日期" prop="jysj">
|
|
118
|
+ <el-date-picker v-model="form.jysj" type="date" value-format="yyyy-MM-dd 00:00:00" :readonly="readonly"></el-date-picker>
|
|
119
|
+ </el-form-item>
|
|
120
|
+ </el-col>
|
|
121
|
+ <el-col :span="8">
|
|
122
|
+ <el-form-item label="检验人" prop="jyr">
|
|
123
|
+ <el-input v-model="form.jyr" :readonly="readonly" />
|
|
124
|
+ </el-form-item>
|
|
125
|
+ </el-col>
|
|
126
|
+ <el-col :span="8">
|
|
127
|
+ <el-form-item label="报告出具时间" prop="bgcjsj">
|
|
128
|
+ <el-date-picker v-model="form.bgcjsj" type="date" value-format="yyyy-MM-dd 00:00:00" :readonly="readonly"></el-date-picker>
|
|
129
|
+ </el-form-item>
|
|
130
|
+ </el-col>
|
|
131
|
+ </el-row>
|
|
132
|
+
|
|
133
|
+ <el-row type="flex" align="middle" justify="center" class="row">
|
|
134
|
+ <el-col :span="8">
|
|
135
|
+ <el-form-item label="签发日期" prop="qfrq">
|
|
136
|
+ <el-date-picker v-model="form.qfrq" type="date" value-format="yyyy-MM-dd" :readonly="readonly"></el-date-picker>
|
|
137
|
+ </el-form-item>
|
|
138
|
+ </el-col>
|
|
139
|
+ <el-col :span="8">
|
|
140
|
+ <el-form-item label="审核人姓名" prop="shrxm">
|
|
141
|
+ <el-input v-model="form.shrxm" :readonly="readonly" />
|
|
142
|
+ </el-form-item>
|
|
143
|
+ </el-col>
|
|
144
|
+ <el-col :span="8">
|
|
145
|
+ <el-form-item label="食品安全指标是否合格" prop="spaqzbsfhg">
|
|
146
|
+ <common-select v-model="form.spaqzbsfhg" type="SPAQZBSFHG" :readonly="readonly" />
|
|
147
|
+ </el-form-item>
|
|
148
|
+ </el-col>
|
|
149
|
+ </el-row>
|
|
150
|
+
|
|
151
|
+ <el-row type="flex" align="middle" justify="center" class="row">
|
|
152
|
+ <el-col :span="8">
|
|
153
|
+ <el-form-item label="指标类别" prop="zblbArr">
|
|
154
|
+ <el-select v-model="form.zblbArr" multiple placeholder="请选择" :disabled="readonly">
|
|
155
|
+ <el-option
|
|
156
|
+ v-for="item in zblbOptions"
|
|
157
|
+ :key="item.value"
|
|
158
|
+ :label="item.label"
|
|
159
|
+ :value="item.value">
|
|
160
|
+ </el-option>
|
|
161
|
+ </el-select>
|
|
162
|
+ </el-form-item>
|
|
163
|
+ </el-col>
|
|
164
|
+ <el-col :span="8">
|
|
165
|
+ <el-form-item label="指标判定结果" prop="zbjgpd">
|
|
166
|
+ <el-cascader
|
|
167
|
+ v-model="form.zbjgpd"
|
|
168
|
+ clearable
|
|
169
|
+
|
|
170
|
+ placeholder="请选择"
|
|
171
|
+ :props="{ expandTrigger: 'hover', emitPath: false, multiple: true}"
|
|
172
|
+ :disabled="readonly"
|
|
173
|
+ :options="pdjgOptions"
|
|
174
|
+ >
|
|
175
|
+ </el-cascader>
|
|
176
|
+ </el-form-item>
|
|
177
|
+ </el-col>
|
|
178
|
+ <el-col :span="8">
|
|
179
|
+ <el-form-item label="是否正常存储年限" prop="sfzcccnx">
|
|
180
|
+ <common-select v-model="form.sfzcccnx" type="YES_NO_REV" :readonly="readonly" />
|
|
181
|
+ </el-form-item>
|
|
182
|
+ </el-col>
|
|
183
|
+ </el-row>
|
|
184
|
+ <el-divider>样品信息</el-divider>
|
|
185
|
+ <el-row type="flex" align="middle" justify="center" class="row">
|
|
186
|
+ <el-col :span="8">
|
|
187
|
+ <el-form-item label="抽样日期" prop="qysj">
|
|
188
|
+ <el-date-picker v-model="form.qysj" type="date" value-format="yyyy-MM-dd 00:00:00" :readonly="readonly"></el-date-picker>
|
|
189
|
+ </el-form-item>
|
|
190
|
+ </el-col>
|
|
191
|
+ <el-col :span="8">
|
|
192
|
+ <el-form-item label="抽样单编号" prop="qydbh">
|
|
193
|
+ <el-input v-model="form.qydbh" :readonly="readonly" />
|
|
194
|
+ </el-form-item>
|
|
195
|
+ </el-col>
|
|
196
|
+ <el-col :span="8">
|
|
197
|
+ <el-form-item label="抽样人员" prop="qyrxm">
|
|
198
|
+ <el-input v-model="form.qyrxm" :readonly="readonly" />
|
|
199
|
+ </el-form-item>
|
|
200
|
+ </el-col>
|
|
201
|
+ </el-row>
|
|
202
|
+
|
|
203
|
+ <el-row type="flex" align="middle" justify="center" class="row">
|
|
204
|
+ <el-col :span="8">
|
|
205
|
+ <el-form-item label="扦样区域" prop="qyqy">
|
|
206
|
+ <el-input v-model="form.qyqy" :readonly="readonly" />
|
|
207
|
+ </el-form-item>
|
|
208
|
+ </el-col>
|
|
209
|
+ <el-col :span="8">
|
|
210
|
+ <el-form-item label="监督人姓名" prop="jdrxm">
|
|
211
|
+ <el-input v-model="form.jdrxm" :readonly="readonly" />
|
|
212
|
+ </el-form-item>
|
|
213
|
+ </el-col>
|
|
214
|
+ <el-col :span="8">
|
|
215
|
+ <el-form-item label="样品编号" prop="ypbh">
|
|
216
|
+ <el-input v-model="form.ypbh" :readonly="readonly" />
|
|
217
|
+ </el-form-item>
|
|
218
|
+ </el-col>
|
|
219
|
+ </el-row>
|
|
220
|
+
|
|
221
|
+ <el-row type="flex" align="middle" justify="center" class="row">
|
|
222
|
+ <el-col :span="8">
|
|
223
|
+ <el-form-item label="样品数量" prop="ypsl">
|
|
224
|
+ <el-input v-model.trim="form.ypsl" :readonly="readonly" />
|
|
225
|
+ </el-form-item>
|
|
226
|
+ </el-col>
|
|
227
|
+ <el-col :span="8">
|
|
228
|
+ <el-form-item label="代表数量" prop="dbsl">
|
|
229
|
+ <el-input v-model.trim="form.dbsl" :readonly="readonly" />
|
|
230
|
+ </el-form-item>
|
|
231
|
+ </el-col>
|
|
232
|
+ <el-col :span="8">
|
|
233
|
+ <el-form-item label="样品等级" prop="ypdj">
|
|
234
|
+ <el-input v-model="form.ypdj" :readonly="readonly" />
|
|
235
|
+ </el-form-item>
|
|
236
|
+ </el-col>
|
|
237
|
+ </el-row>
|
|
238
|
+
|
|
239
|
+ <el-row type="flex" align="middle" justify="center" class="row">
|
|
240
|
+ <el-col :span="8">
|
|
241
|
+ <el-form-item label="样品状态" prop="sampleStatus">
|
|
242
|
+ <el-input v-model="form.sampleStatus" :readonly="readonly" />
|
|
243
|
+ </el-form-item>
|
|
244
|
+ </el-col>
|
|
245
|
+ <el-col :span="8">
|
|
246
|
+ <el-form-item label="样品包装型号" prop="samplePackageModel">
|
|
247
|
+ <el-input v-model="form.samplePackageModel" :readonly="readonly" />
|
|
248
|
+ </el-form-item>
|
|
249
|
+ </el-col>
|
|
250
|
+ <el-col :span="8" /></el-row>
|
|
251
|
+ <el-divider>检验项目及依据</el-divider>
|
|
252
|
+ <aq-table ref="t_7602" v-show="form.zblbArr && form.zblbArr.includes('7602')" enum-id="7587" title="质量指标检验" :data-list="tableList_7602" :readonly="readonly" />
|
|
253
|
+ <aq-table ref="t_7603" v-show="form.zblbArr && form.zblbArr.includes('7603')" enum-id="7587" title="储存品质检验" :data-list="tableList_7603" :readonly="readonly" />
|
|
254
|
+ <aq-table ref="t_7604" v-show="form.zblbArr && form.zblbArr.includes('7604')" enum-id="7587" title="食品安全检验" :data-list="tableList_7604" :readonly="readonly" />
|
|
255
|
+ </el-form>
|
|
256
|
+ </div>
|
|
257
|
+ <span slot="footer" class="dialog-footer">
|
|
258
|
+ <el-button
|
|
259
|
+ v-if="!readonly"
|
|
260
|
+ type="primary"
|
|
261
|
+ @click="save"
|
|
262
|
+ :disabled="!canSave"
|
|
263
|
+ >确 定</el-button
|
|
264
|
+ >
|
|
265
|
+ <el-button @click="show = false">取 消</el-button>
|
|
266
|
+ </span>
|
|
267
|
+ </el-dialog>
|
|
268
|
+</template>
|
|
269
|
+
|
|
270
|
+<script>
|
|
271
|
+import { simpleEdit } from "@/components/simpleList/simpleEdit";
|
|
272
|
+import { houseAndWareQuery } from "@/components/simpleList";
|
|
273
|
+import {getByStoreAndWarehouse , save, update, getByMasterId } from "@/api/qualityControlManagement/acceptanceQualityControl";
|
|
274
|
+import {
|
|
275
|
+ simple_required,
|
|
276
|
+ number_required,
|
|
277
|
+ min_max_required,
|
|
278
|
+ positive_integer,
|
|
279
|
+ positive_integer_required,
|
|
280
|
+ number_data,
|
|
281
|
+ required_array,
|
|
282
|
+ required_data,
|
|
283
|
+ number_length_data
|
|
284
|
+} from "@/utils/ruleDatas";
|
|
285
|
+import cascaderSelect from "@/components/common/cascaderSelect/index.vue";
|
|
286
|
+import aqTable from "./acceptanceQualityControlTable.vue";
|
|
287
|
+import {dateISOBJ} from "@/utils/systemUtils";
|
|
288
|
+
|
|
289
|
+export default {
|
|
290
|
+ mixins: [simpleEdit, houseAndWareQuery, ],
|
|
291
|
+ components: { cascaderSelect , aqTable, },
|
|
292
|
+
|
|
293
|
+ data() {
|
|
294
|
+ return {
|
|
295
|
+ pdjgOptions: [
|
|
296
|
+ {
|
|
297
|
+ label: '质量指标',
|
|
298
|
+ children: [
|
|
299
|
+ {
|
|
300
|
+ label: '达标',
|
|
301
|
+ value: '达标'
|
|
302
|
+ },
|
|
303
|
+ {
|
|
304
|
+ label: '不达标',
|
|
305
|
+ value: '不达标'
|
|
306
|
+ },
|
|
307
|
+ ]
|
|
308
|
+ },
|
|
309
|
+ {
|
|
310
|
+ label: '存储品质',
|
|
311
|
+ children: [
|
|
312
|
+ {
|
|
313
|
+ label: '宜存',
|
|
314
|
+ value: '宜存'
|
|
315
|
+ },
|
|
316
|
+ {
|
|
317
|
+ label: '轻度不宜存',
|
|
318
|
+ value: '轻度不宜存'
|
|
319
|
+ },
|
|
320
|
+ {
|
|
321
|
+ label: '重度不宜存',
|
|
322
|
+ value: '重度不宜存'
|
|
323
|
+ },
|
|
324
|
+ ]
|
|
325
|
+ },
|
|
326
|
+ {
|
|
327
|
+ label: '食品安全指标',
|
|
328
|
+ children: [
|
|
329
|
+ {
|
|
330
|
+ label: '合格',
|
|
331
|
+ value: '合格'
|
|
332
|
+ },
|
|
333
|
+ {
|
|
334
|
+ label: '不合格',
|
|
335
|
+ value: '不合格'
|
|
336
|
+ },
|
|
337
|
+ ]
|
|
338
|
+ },
|
|
339
|
+ ],
|
|
340
|
+ zblbOptions: [],
|
|
341
|
+ tableList_7602: [],
|
|
342
|
+ tableList_7603: [],
|
|
343
|
+ tableList_7604: [],
|
|
344
|
+ defaultForm: {
|
|
345
|
+ zblbArr: [],
|
|
346
|
+
|
|
347
|
+ grainNatureId: null, // Integer, 注释: 粮食性质 id
|
|
348
|
+ grainNatureName: null, // String, 注释: 粮食性质
|
|
349
|
+ orgName: null, // String, 注释: 库区名称
|
|
350
|
+ storeHouseName: null, // String, 注释: 仓房
|
|
351
|
+ warehouseName: null, // String, 注释: 货位
|
|
352
|
+ grainVarietyName: null, // String, 注释: 品种
|
|
353
|
+ zjbgdh: null, // String, 注释: 质检报告单号,由检验类别+检验日期(yyyyMMdd)+4位顺序号组成 @return zjbgdh 质检报告单号,由检验类别+检验日期(yyyyMMdd)+4位顺序号组成 /
|
|
354
|
+ jylb: null, // String, 注释: 检验类别,01:入仓验收;02:出仓检验;03:3 月末普检;04:9 月末普检;05:入仓初检;06:月度检查;07:3 月末库内普查;08:9 月末库内普查;09: 定检 @return jylb 检验类别,01:入仓验收;02:出仓检验;03:3 月末普检;04:9 月末普检;05:入仓初检;06:月度检查;07:3 月末库内普查;08:9 月末库内普查; /
|
|
355
|
+ basicStorehouseId: null, // Integer, 注释: basic_storehouse的id;仓房id @return basic_storehouse_id basic_storehouse的id;仓房id /
|
|
356
|
+ warehouseId: null, // Integer, 注释: basic_warehouse的id;货位id; @return warehouse_id basic_warehouse的id;货位id; /
|
|
357
|
+ grainVarietyId: null, // Integer, 注释: 粮食品种;basic_enum的id; @return grain_variety_id 粮食品种;basic_enum的id; /
|
|
358
|
+ grainGradeId: null, // Integer, 注释: 粮食等级;basic_enum的id; @return grain_grade_id 粮食等级;basic_enum的id; /
|
|
359
|
+ rkrq: null, // Date, 注释: 入库日期,格式:yyyy-MM-dd @return rkrq 入库日期,格式:yyyy-MM-dd /
|
|
360
|
+ receiveYear: null, // String, 注释: 收获年度 @return receive_year 收获年度 /
|
|
361
|
+ produceArea: null, // String, 注释: 产地 @return produce_area 产地 /
|
|
362
|
+ jysj: null, // Date, 注释: 检验时间,格式:yyyy-MM-dd HH:mm:ss @return jysj 检验时间,格式:yyyy-MM-dd HH:mm:ss /
|
|
363
|
+ checkResult: null, // Integer, 注释: 检验结果 0:不合格;1:合格; @return check_result 检验结果 0:不合格;1:合格; /
|
|
364
|
+ jydw: null, // String, 注释: 检验单位 @return jydw 检验单位 /
|
|
365
|
+ jyr: null, // String, 注释: 检验人,检验人员姓名,若有多个保管员,则用“|”进行分隔 @return jyr 检验人,检验人员姓名,若有多个保管员,则用“|”进行分隔 /
|
|
366
|
+ jyyj: null, // String, 注释: 检验依据,1:国标, 0:其他 @return jyyj 检验依据,1:国标, 0:其他 /
|
|
367
|
+ zblb: null, // String, 注释: 指标类别,1: 质量指标检验, 2:储存品质检验, 3:食品安全检验 @return zblb 指标类别,1: 质量指标检验, 2:储存品质检验, 3:食品安全检验 /
|
|
368
|
+ spaqzbsfhg: null, // String, 注释: 食品安全指标是否合格,0:不合格, 1:合格 @return spaqzbsfhg 食品安全指标是否合格,0:不合格, 1:合格 /
|
|
369
|
+ qfrq: null, // String, 注释: 签发日期,格式:yyyy-MM-dd @return qfrq 签发日期,格式:yyyy-MM-dd /
|
|
370
|
+ bgcjsj: null, // Date, 注释: 报告出具时间,格式:yyyy-MM-dd HH:mm:ss @return bgcjsj 报告出具时间,格式:yyyy-MM-dd HH:mm:ss /
|
|
371
|
+ shrxm: null, // String, 注释: 审核人姓名 @return shrxm 审核人姓名 /
|
|
372
|
+ sfzcccnx: null, // String, 注释: 是否正常存储年限,0:否, 1:是 @return sfzcccnx 是否正常存储年限,0:否, 1:是 /
|
|
373
|
+ zbjgpd: [], // String, 注释: 指标结果判定,与指标类别对应,例如:达标|综合判定#宜存#合格 @return zbjgpd 指标结果判定,与指标类别对应,例如:达标|综合判定#宜存#合格 /
|
|
374
|
+ qysj: null, // Date, 注释: 抽样日期;扦样时间,格式:yyyy-MM-dd HH:mm:ss @return qysj 抽样日期;扦样时间,格式:yyyy-MM-dd HH:mm:ss /
|
|
375
|
+ qydbh: null, // String, 注释: 抽样单编号;扦样单编号; @return qydbh 抽样单编号;扦样单编号; /
|
|
376
|
+ qyrxm: null, // String, 注释: 抽样人员;扦样人姓名 @return qyrxm 抽样人员;扦样人姓名 /
|
|
377
|
+ qyqy: null, // String, 注释: 扦样区域 @return qyqy 扦样区域 /
|
|
378
|
+ jdrxm: null, // String, 注释: 监督人姓名 @return jdrxm 监督人姓名 /
|
|
379
|
+ ypbh: null, // String, 注释: 样品编号 @return ypbh 样品编号 /
|
|
380
|
+ ypsl: null, // BigDecimal, 注释: 样品数量,单位:公斤 @return ypsl 样品数量,单位:公斤 /
|
|
381
|
+ dbsl: null, // BigDecimal, 注释: 代表数量,单位:公斤 @return dbsl 代表数量,单位:公斤 /
|
|
382
|
+ ypdj: null, // String, 注释: 样品等级,参考LS/T 1713-2015 库存粮食识别代码 表3 @return ypdj 样品等级,参考LS/T 1713-2015 库存粮食识别代码 表3 /
|
|
383
|
+ sampleStatus: null, // String, 注释: 样品状态 @return sample_status 样品状态 /
|
|
384
|
+ samplePackageModel: null, // String, 注释: 样品包装型号 @return sample_package_model 样品包装型号 /
|
|
385
|
+ bz: null, // String, 注释: 备注 @return bz 备注 /
|
|
386
|
+
|
|
387
|
+ },
|
|
388
|
+ rules: {
|
|
389
|
+ orgName: simple_required, jylb: simple_required, basicStorehouseId: simple_required, warehouseId: simple_required,
|
|
390
|
+ grainVarietyId: simple_required, grainGradeId: simple_required, grainNatureId: simple_required, rkrq: simple_required,
|
|
391
|
+ produceArea: simple_required, jydw: simple_required, jyyj: simple_required, shrxm: simple_required, spaqzbsfhg: simple_required,
|
|
392
|
+ zblbArr: required_array, zbjgpd: simple_required, sfzcccnx: simple_required, qysj: simple_required, jysj: simple_required,
|
|
393
|
+ qydbh: simple_required,
|
|
394
|
+ ypsl: number_required, dbsl: number_required,
|
|
395
|
+ ypdj: [required_data, number_length_data(1)],
|
|
396
|
+ },
|
|
397
|
+ };
|
|
398
|
+ },
|
|
399
|
+ computed: {
|
|
400
|
+
|
|
401
|
+ },
|
|
402
|
+ methods: {
|
|
403
|
+ setUp() {
|
|
404
|
+ this.$nextTick(() => {
|
|
405
|
+ this.$refs.t_7604.clear()
|
|
406
|
+ this.$refs.t_7603.clear()
|
|
407
|
+ this.$refs.t_7602.clear()
|
|
408
|
+ })
|
|
409
|
+
|
|
410
|
+ this.addBeforeHook(() => {
|
|
411
|
+ return this.$enumUtils.getEnumListByEnumCodeAsync('quality_zblb').then(data => {
|
|
412
|
+ if(data && data.length > 0) {
|
|
413
|
+ this.zblbOptions = data.map(item => {
|
|
414
|
+ return {
|
|
415
|
+ raw: item,
|
|
416
|
+ value: item.enumid + '',
|
|
417
|
+ label: item.enumname
|
|
418
|
+ }
|
|
419
|
+ })
|
|
420
|
+ }
|
|
421
|
+ })
|
|
422
|
+ })
|
|
423
|
+
|
|
424
|
+ this.addAfterHook(() => {
|
|
425
|
+ if(! this.isAdd) {
|
|
426
|
+ this.wareOptions = []
|
|
427
|
+ console.log('仓房 id', this.form.basicStorehouseId)
|
|
428
|
+ return this.$systemUtils.getHouseOption(this.orgId).then(map => this.houseOptions = map)
|
|
429
|
+ }
|
|
430
|
+ return Promise.resolve()
|
|
431
|
+ })
|
|
432
|
+
|
|
433
|
+ this.addAfterHook(() => {
|
|
434
|
+ if(! this.isAdd) {
|
|
435
|
+ this.wareOptions = []
|
|
436
|
+ console.log('仓房 id', this.form.basicStorehouseId)
|
|
437
|
+ return this.$systemUtils.getWarehouseOption(this.orgId, this.form.basicStorehouseId).then(map => this.wareOptions = map)
|
|
438
|
+ }
|
|
439
|
+ return Promise.resolve()
|
|
440
|
+ })
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+ this.initHouseAndWareOptions('form.basicStorehouseId', 'form.warehouseId');
|
|
444
|
+ // this.initHouseAndWareOptionsHouseByCode('form.basicStorehouseId', 'form.warehouseId');
|
|
445
|
+ },
|
|
446
|
+ afterReset() {
|
|
447
|
+ if(this.isAdd ) {
|
|
448
|
+ this.form.orgName = this.orgName
|
|
449
|
+ }
|
|
450
|
+ },
|
|
451
|
+ parseResp(resp) {
|
|
452
|
+ if(resp && resp.data) {
|
|
453
|
+ const data = resp.data
|
|
454
|
+ if(! data.orgName) {
|
|
455
|
+ data.orgName = this.orgName
|
|
456
|
+ }
|
|
457
|
+ if(data.zbjgpd) {
|
|
458
|
+ data.zbjgpd = data.zbjgpd.split('|')
|
|
459
|
+ }
|
|
460
|
+ if(data.zblb) {
|
|
461
|
+ data.zblbArr = data.zblb.split(',')
|
|
462
|
+ for(let id of data.zblbArr) {
|
|
463
|
+ const list = data.item.filter(d => d.parentInspectionItemId == id)
|
|
464
|
+ this[`tableList_${id}`] = list
|
|
465
|
+ }
|
|
466
|
+ }
|
|
467
|
+ delete data.item
|
|
468
|
+ // if(data.zblb == 7602) {
|
|
469
|
+ // this.tableList1 = data.item
|
|
470
|
+ // }else if(data.zblb == 7603) {
|
|
471
|
+ // this.tableList2 = data.item
|
|
472
|
+ // }else if(data.zblb == 7604) {
|
|
473
|
+ // this.tableList3 = data.item
|
|
474
|
+ // }
|
|
475
|
+ return data
|
|
476
|
+ }
|
|
477
|
+ throw new Error('无法解析结果')
|
|
478
|
+ },
|
|
479
|
+ getDataFun() {
|
|
480
|
+ return getByMasterId;
|
|
481
|
+ },
|
|
482
|
+ houseChangedOtherLogic(n) {
|
|
483
|
+ if(n) {
|
|
484
|
+ const h = this.getHouseByHouseId_simpleList(n)
|
|
485
|
+ this.form.storeHouseName = h.storehouseName
|
|
486
|
+ }else {
|
|
487
|
+ this.form.storeHouseName = null
|
|
488
|
+ }
|
|
489
|
+ },
|
|
490
|
+ wareChanged(n) {
|
|
491
|
+ if(n) {
|
|
492
|
+ const w = this.getWareByWareIdFrom_simpleList(n)
|
|
493
|
+ this.form.warehouseName = w.warehouseName
|
|
494
|
+ getByStoreAndWarehouse({
|
|
495
|
+ // orgId: 15,
|
|
496
|
+ // storehouseId: 325,
|
|
497
|
+ // warehouseId: 1002
|
|
498
|
+ orgId: this.orgId,
|
|
499
|
+ storehouseId: this.form.basicStorehouseId,
|
|
500
|
+ warehouseId: this.form.warehouseId
|
|
501
|
+ }).then(resp => {
|
|
502
|
+ if(!resp) return
|
|
503
|
+ if(! resp.data) return
|
|
504
|
+ if(resp.retCode != '200') return
|
|
505
|
+ const d = resp.data
|
|
506
|
+ this.form.grainVarietyId = parseInt(d.pz)
|
|
507
|
+ this.form.grainVarietyName = d.pzName
|
|
508
|
+ this.form.grainGradeId = parseInt(d.dj)
|
|
509
|
+ this.form.grainGradeName = d.djName
|
|
510
|
+ this.form.grainNatureId = parseInt(d.hwxz)
|
|
511
|
+ this.form.grainNatureName = d.hwxzName
|
|
512
|
+ this.form.rkrq = this.$systemUtils.dateISOBJ(d.rq, 'yyyy-MM-dd HH:mm:ss')
|
|
513
|
+ this.form.produceArea = d.gb
|
|
514
|
+ this.form.receiveYear = d.scnfName
|
|
515
|
+ })
|
|
516
|
+ }else {
|
|
517
|
+ this.form.warehouseName = null
|
|
518
|
+ }
|
|
519
|
+ },
|
|
520
|
+ pzChange(n, o) {
|
|
521
|
+ if(n) {
|
|
522
|
+ this.form.grainVarietyName = o.raw.enumname
|
|
523
|
+ } else {
|
|
524
|
+ this.form.grainVarietyName = null
|
|
525
|
+ }
|
|
526
|
+ },
|
|
527
|
+ xzChange(n, o) {
|
|
528
|
+ console.log(o)
|
|
529
|
+ if(n) {
|
|
530
|
+ this.form.grainNatureName = o.raw.enumname
|
|
531
|
+ }else {
|
|
532
|
+ this.form.grainNatureName = null
|
|
533
|
+ }
|
|
534
|
+ },
|
|
535
|
+ checkZbjgpd() {
|
|
536
|
+ if(this.form.zbjgpd) {
|
|
537
|
+ if(this.form.zbjgpd.length > 0) {
|
|
538
|
+ const arr = this.form.zbjgpd
|
|
539
|
+ const exclusivePairs = [];
|
|
540
|
+ for(const d of this.pdjgOptions) {
|
|
541
|
+ const arr = d.children.map(d => d.value)
|
|
542
|
+ exclusivePairs.push([... arr])
|
|
543
|
+ }
|
|
544
|
+ // 检查每一组互斥的项
|
|
545
|
+ for (const group of exclusivePairs) {
|
|
546
|
+ // 计算数组中这一组互斥项出现的次数
|
|
547
|
+ const count = group.reduce((acc, item) => acc + (arr.includes(item) ? 1 : 0), 0);
|
|
548
|
+ // 如果互斥项出现多于一次,返回 false
|
|
549
|
+ if (count > 1) {
|
|
550
|
+ return false;
|
|
551
|
+ }
|
|
552
|
+ }
|
|
553
|
+ // 如果所有互斥项都没有冲突,返回 true
|
|
554
|
+ return true;
|
|
555
|
+ }
|
|
556
|
+ }
|
|
557
|
+ },
|
|
558
|
+ getLocalData() {
|
|
559
|
+ const d = {
|
|
560
|
+ ...this.form,
|
|
561
|
+ orgId: this.orgId,
|
|
562
|
+ }
|
|
563
|
+ if(d.zbjgpd) {
|
|
564
|
+ if(d.zbjgpd.length > 0) {
|
|
565
|
+ d.zbjgpd = d.zbjgpd.join('|')
|
|
566
|
+ }
|
|
567
|
+ }else {
|
|
568
|
+ d.zbjgpd = null
|
|
569
|
+ }
|
|
570
|
+ d.item = []
|
|
571
|
+ // const ref = this.tabRef
|
|
572
|
+ // if(ref) {
|
|
573
|
+ // d.item = ref.getTableData()
|
|
574
|
+ // }
|
|
575
|
+ if(d.zblbArr && d.zblbArr.length > 0) {
|
|
576
|
+ for(let id of d.zblbArr) {
|
|
577
|
+ const list = this.$refs[`t_${id}`].getTableData()
|
|
578
|
+ list.forEach(dd => dd.parentInspectionItemId = parseInt(id))
|
|
579
|
+ d.item.push(... list)
|
|
580
|
+ }
|
|
581
|
+ d.zblb = d.zblbArr.join(',')
|
|
582
|
+ }
|
|
583
|
+ console.log(d)
|
|
584
|
+ this.$systemUtils.deleteField(d, ['zblbArr'])
|
|
585
|
+ this.$systemUtils.parseField2Float(d, ['ypsl', 'dbsl'])
|
|
586
|
+ return d
|
|
587
|
+ },
|
|
588
|
+ beforeSaveCheck() {
|
|
589
|
+ const ret = this.checkZbjgpd()
|
|
590
|
+ if(ret) return Promise.resolve()
|
|
591
|
+ this.$message.error('指标结果判定 存在冲突选择 请重新检查')
|
|
592
|
+ return Promise.reject()
|
|
593
|
+ },
|
|
594
|
+ getSaveFun() {
|
|
595
|
+ if(this.isEdit) return update
|
|
596
|
+ return save;
|
|
597
|
+ },
|
|
598
|
+ },
|
|
599
|
+};
|
|
600
|
+</script>
|
|
601
|
+
|
|
602
|
+<style scoped lang="scss">
|
|
603
|
+.row {
|
|
604
|
+ margin-top: 10px;
|
|
605
|
+}
|
|
606
|
+</style>
|