Browse Source

fix:入库确认单

yangchengfei 4 months ago
parent
commit
b45080ca5d

+ 606 - 0
src/page/qualityAssurance/components/acceptanceQualityControlEdit.vue

@@ -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>

+ 166 - 0
src/page/qualityAssurance/components/acceptanceQualityControlTable.vue

@@ -0,0 +1,166 @@
1
+<template>
2
+  <div>
3
+    <div class="act_header">
4
+      <div>{{ title }}</div>
5
+      <div v-if="!readonly" class="row">
6
+        <el-button @click="add">添加</el-button>
7
+      </div>
8
+    </div>
9
+    <el-table
10
+      :data="acTableData"
11
+      border
12
+      stripe
13
+      highlight-current-row
14
+      v-loading="listLoading"
15
+      style="width: 100%; margin-top: 10px"
16
+    >
17
+      <el-table-column
18
+        align="center"
19
+        type="index"
20
+        width="60"
21
+        label="序号"
22
+      ></el-table-column>
23
+      <el-table-column align="center" prop="someField" label="检验项目">
24
+        <template v-slot="scope">
25
+          <el-form-item label-width="0">
26
+            <common-select
27
+              v-model="scope.row.inspectionItemId"
28
+              :type="enumId"
29
+              :item-by-enum-id="true"
30
+              :remote="true"
31
+              :readonly="readonly"
32
+            ></common-select>
33
+          </el-form-item>
34
+        </template>
35
+      </el-table-column>
36
+      <el-table-column align="center" label="检验值">
37
+        <template v-slot="scope">
38
+          <el-form-item label-width="0">
39
+            <el-input
40
+              v-model="scope.row.inspectionValue"
41
+              :readonly="readonly"
42
+            />
43
+          </el-form-item>
44
+        </template>
45
+      </el-table-column>
46
+      <el-table-column align="center" prop="someField" label="单项结论">
47
+        <template v-slot="scope">
48
+          <el-form-item label-width="0">
49
+            <common-select
50
+              v-model="scope.row.singleConclusion"
51
+              type="YES_NO_7"
52
+              :readonly="readonly"
53
+            ></common-select>
54
+          </el-form-item>
55
+        </template>
56
+      </el-table-column>
57
+      <el-table-column align="center" prop="someField" label="检验方法">
58
+        <template v-slot="scope">
59
+          <el-form-item label-width="0">
60
+            <el-input
61
+              v-model="scope.row.inspectionMethod"
62
+              :readonly="readonly"
63
+            />
64
+          </el-form-item>
65
+        </template>
66
+      </el-table-column>
67
+      <el-table-column v-if="!readonly" align="center" label="操作">
68
+        <template v-slot="scope">
69
+          <el-button
70
+            type="primary"
71
+            @click="del(scope.row)"
72
+            size="small"
73
+            icon="el-icon-view"
74
+            >删除</el-button
75
+          >
76
+        </template>
77
+      </el-table-column>
78
+    </el-table>
79
+  </div>
80
+</template>
81
+
82
+<script>
83
+import CommonSelect from "@/components/common/commonSelect/index.vue";
84
+
85
+export default {
86
+  components: { CommonSelect },
87
+  props: {
88
+    title: {
89
+      type: String,
90
+      required: false,
91
+      default: "",
92
+    },
93
+    dataList: {
94
+      type: Array,
95
+      required: false,
96
+      default: () => {
97
+        return [];
98
+      },
99
+    },
100
+    readonly: {
101
+      type: Boolean,
102
+      required: false,
103
+      default: false,
104
+    },
105
+    enumId: {
106
+      type: String,
107
+      required: true,
108
+    },
109
+  },
110
+  data() {
111
+    return {
112
+      listLoading: false,
113
+      acTableData: this.dataList,
114
+    };
115
+  },
116
+  mounted() {
117
+    this.acTableData = this.dataList;
118
+  },
119
+  watch: {
120
+    dataList(n) {
121
+      this.acTableData = this.dataList;
122
+    },
123
+  },
124
+  methods: {
125
+    add() {
126
+      // inspectionItemId	integer($int32)
127
+      // inspectionMethod	string
128
+      // inspectionValue	string
129
+      // qcQualityInspectionId	integer($int32)
130
+      // singleConclusion	string
131
+      const d = {
132
+        inspectionItemId: null, // 检测项目 ids
133
+        inspectionMethod: null, // 检验方法
134
+        inspectionValue: null, // 值
135
+        singleConclusion: null, // 符合/不符合
136
+        key: this.$systemUtils.genKey("aqct"),
137
+      };
138
+
139
+      this.acTableData.push(d);
140
+    },
141
+    del(data) {
142
+      this.acTableData = this.acTableData.filter((d) => d.key !== data.key);
143
+    },
144
+    getTableData() {
145
+      const list = this.$systemUtils.clone(this.acTableData);
146
+      list.forEach((d) => delete d.key);
147
+      return list;
148
+    },
149
+    clear() {
150
+      this.acTableData = [];
151
+    },
152
+  },
153
+};
154
+</script>
155
+
156
+<style scoped lang="scss">
157
+.act_header {
158
+  display: flex;
159
+  flex-direction: column;
160
+  justify-content: center;
161
+  align-items: center;
162
+}
163
+.row {
164
+  margin-top: 10px;
165
+}
166
+</style>

+ 203 - 0
src/page/qualityAssurance/qualityAssurance.vue

@@ -0,0 +1,203 @@
1
+<template>
2
+  <div class="content-main">
3
+    <div class="search-bm-boder">
4
+      <el-row>
5
+        <el-form
6
+          :model="form"
7
+          label-width="80px"
8
+          ref="searchForm"
9
+          :inline="true"
10
+          class="demo-form-inline search-form"
11
+        >
12
+          <el-form-item>
13
+            <el-button
14
+              type="primary"
15
+              size="small"
16
+              icon="el-icon-plus"
17
+              @click="add"
18
+              >新增</el-button
19
+            >
20
+            <el-divider direction="vertical"></el-divider>
21
+          </el-form-item>
22
+          <el-form-item label="仓房名称:" prop="storehouseName">
23
+            <el-input v-model="form.storehouseName" />
24
+          </el-form-item>
25
+          <div class="search-button">
26
+            <span class="search-line"></span>
27
+            <el-button
28
+              type="primary"
29
+              @click="search"
30
+              size="small"
31
+              class="iconfont iconchaxun"
32
+              >查询</el-button
33
+            >
34
+            <el-button
35
+              type="primary"
36
+              @click="reset('searchForm')"
37
+              size="small"
38
+              class="iconfont iconzhongzhi"
39
+              >重置</el-button
40
+            >
41
+          </div>
42
+        </el-form>
43
+      </el-row>
44
+    </div>
45
+
46
+    <el-table
47
+      :data="tableData"
48
+      border
49
+      stripe
50
+      highlight-current-row
51
+      v-loading="listLoading"
52
+      style="width: 100%"
53
+    >
54
+      <el-table-column
55
+        align="center"
56
+        type="index"
57
+        width="60"
58
+        label="序号"
59
+      ></el-table-column>
60
+      <el-table-column
61
+        align="center"
62
+        prop="orgName"
63
+        label="库区名称"
64
+      ></el-table-column>
65
+      <el-table-column
66
+        align="center"
67
+        prop="storeHouseName"
68
+        label="仓房名称"
69
+      ></el-table-column>
70
+      <el-table-column
71
+        align="center"
72
+        prop="warehouseName"
73
+        label="货位名称"
74
+      ></el-table-column>
75
+      <el-table-column
76
+        align="center"
77
+        prop="grainVarietyName"
78
+        label="品种"
79
+      ></el-table-column>
80
+      <el-table-column
81
+        align="center"
82
+        prop="grainNatureName"
83
+        label="性质"
84
+      ></el-table-column>
85
+      <el-table-column
86
+        align="center"
87
+        prop="jysj"
88
+        label="检验时间"
89
+      ></el-table-column>
90
+      <el-table-column align="center" prop="jylb" label="检验类别">
91
+        <template v-slot="scope">
92
+          {{ staticName("JYLB", scope.row.jylb) }}
93
+        </template>
94
+      </el-table-column>
95
+      <el-table-column label="操作" align="center" width="320">
96
+        <template v-slot="scope">
97
+          <el-button
98
+            type="primary"
99
+            @click="view(scope.row)"
100
+            size="small"
101
+            icon="el-icon-view"
102
+            >查看</el-button
103
+          >
104
+          <el-button
105
+            type="primary"
106
+            @click="edit(scope.row)"
107
+            size="small"
108
+            icon="el-icon-edit"
109
+            >编辑</el-button
110
+          >
111
+          <el-popconfirm
112
+            title="确定删除吗?"
113
+            icon="el-icon-info"
114
+            icon-color="red"
115
+            @confirm="del(scope.row)"
116
+          >
117
+            <el-button
118
+              type="primary"
119
+              size="small"
120
+              slot="reference"
121
+              icon="el-icon-delete"
122
+              >删除</el-button
123
+            >
124
+          </el-popconfirm>
125
+        </template>
126
+      </el-table-column>
127
+    </el-table>
128
+    <!-- 分页开始 -->
129
+    <div class="pag-right clearFix">
130
+      <el-pagination
131
+        class="right"
132
+        :current-page.sync="limit.page"
133
+        :page-size="limit.size"
134
+        :page-sizes="[10, 20, 30, 40]"
135
+        :total="limit.total"
136
+        @current-change="handleCurrentChangeTask"
137
+        @size-change="handleSizeChangeTask"
138
+        layout="total, sizes, prev, pager, next, jumper"
139
+        v-if="paginationShow"
140
+      ></el-pagination>
141
+    </div>
142
+
143
+    <edit
144
+      :visible.sync="addShow"
145
+      :action="action"
146
+      :edit-data="editData"
147
+      @on-save="getList"
148
+    />
149
+  </div>
150
+</template>
151
+
152
+<script>
153
+import {
154
+  simpleList,
155
+  hasHouseName,
156
+  hasWareName,
157
+  hasOrgName,
158
+  houseAndWareQuery,
159
+} from "@/components/simpleList";
160
+import edit from "./components/acceptanceQualityControlEdit.vue";
161
+import {
162
+  list,
163
+  remove,
164
+} from "@/api/qualityControlManagement/acceptanceQualityControl";
165
+
166
+export default {
167
+  name: "acceptanceQualityControl",
168
+  mixins: [simpleList],
169
+  components: { edit },
170
+  data() {
171
+    return {
172
+      form: {
173
+        storehouseName: null,
174
+      },
175
+    };
176
+  },
177
+  computed: {},
178
+  methods: {
179
+    setUp() {
180
+      // this.addBeforeHook(() => {
181
+      // })
182
+    },
183
+    getDelParams(data) {
184
+      return { id: data.id, orgId: data.orgId };
185
+    },
186
+    getDelFun() {
187
+      return remove;
188
+    },
189
+    // getConstantsQuery() {
190
+    //   return {
191
+    //     orgId: this.orgId,
192
+    //     orgName: this.orgName,
193
+    //   }
194
+    // },
195
+    getListFun() {
196
+      return list;
197
+    },
198
+  },
199
+};
200
+</script>
201
+
202
+<style scoped lang="scss">
203
+</style>

+ 4 - 4
src/page/receiptConfirmation/receiptConfirmationDetail/index.vue

@@ -253,7 +253,7 @@
253 253
           </el-form-item>
254 254
         </el-col>
255 255
       </el-row>
256
-      <h1 style="font-size: 20px; margin-bottom: 20px">贷款支付情况</h1>
256
+      <!-- <h1 style="font-size: 20px; margin-bottom: 20px">贷款支付情况</h1>
257 257
       <el-row>
258 258
         <el-col :span="8">
259 259
           <el-form-item
@@ -309,7 +309,7 @@
309 309
             /> </el-form-item
310 310
         ></el-col>
311 311
         <el-col :span="8"></el-col>
312
-      </el-row>
312
+      </el-row> -->
313 313
       <h1 style="font-size: 20px; margin-bottom: 20px">发票情况</h1>
314 314
       <el-row>
315 315
         <el-col :span="8">
@@ -357,7 +357,7 @@
357 357
           </el-form-item>
358 358
         </el-col>
359 359
       </el-row>
360
-      <h1 style="font-size: 20px; margin-bottom: 20px">入库费用维护</h1>
360
+      <!-- <h1 style="font-size: 20px; margin-bottom: 20px">入库费用维护</h1>
361 361
       <el-row>
362 362
         <el-col :span="8">
363 363
           <el-form-item prop="wcmCostMainUnit" label="对方单位">
@@ -429,7 +429,7 @@
429 429
             />
430 430
           </el-form-item>
431 431
         </el-col>
432
-      </el-row>
432
+      </el-row> -->
433 433
     </el-form>
434 434
     <div class="floor-btn">
435 435
       <el-button style="margin-right: 28px" @click="goBack()">取消</el-button>

+ 2 - 0
src/router/index.js

@@ -90,6 +90,7 @@ import ProcurementAnd from './system/ProcurementAnd.js'
90 90
 import storageForewarningModule from './system/storageForewarningModule.js'
91 91
 import financeModule from './system/financeModule'
92 92
 // import ADDprocessed from './system/ADDprocessed.js'
93
+import qualityAssurance from './system/qualityAssurance.js'
93 94
 Vue.use(Router)
94 95
 
95 96
 export default new Router({
@@ -228,6 +229,7 @@ export default new Router({
228 229
         ACCinventory,
229 230
         storehouseViewModule,
230 231
         storehouseAnalyzeModule,
232
+        qualityAssurance
231 233
       ],
232 234
     },
233 235
   ],

+ 29 - 0
src/router/system/qualityAssurance.js

@@ -0,0 +1,29 @@
1
+export default {
2
+    path: "/qualityAssurance",
3
+    name: "qualityAssurance",
4
+    meta: {
5
+        title: "质量管理"
6
+    },
7
+    component: () => import("@/page/Layout/layout.vue"),
8
+    children: [
9
+        {
10
+            path: "/qualityAssurance",
11
+            name: "qualityAssurance",
12
+            component: {
13
+                render(c) {
14
+                    return c("router-view");
15
+                }
16
+            },
17
+            children: [
18
+                {
19
+                    path: "/qualityAssurance/qualityAssurance",
20
+                    name: "customerArchives",
21
+                    component: () => import("@/page/qualityAssurance/qualityAssurance"),
22
+                    meta: {
23
+                        title: "质量管理"
24
+                    }
25
+                }
26
+            ]
27
+        }
28
+    ]
29
+}

+ 6 - 1
src/style/theme.scss

@@ -15,7 +15,6 @@ $subMenuActiveText: #ffffff;
15 15
     blueColor: $blueColor;
16 16
 }
17 17
 
18
-
19 18
 .menuList-wrap {
20 19
     background: url(./../assets/theme/leftbg.png);
21 20
 
@@ -24,11 +23,17 @@ $subMenuActiveText: #ffffff;
24 23
         color: $menuActiveText !important;
25 24
     }
26 25
 
26
+    // .el-scrollbar__wrap {
27
+    //     overflow-x: hidden !important;
28
+    // }
29
+
27 30
     .router-link-active .el-menu-item {
28 31
         color: $blueColor !important;
29 32
         background-color: $whiteColor !important;
30 33
     }
31 34
 
35
+
36
+
32 37
     .navbar {
33 38
         color: $whiteColor;
34 39
     }