|
|
@@ -2,92 +2,72 @@
|
|
2
|
2
|
<div class="container">
|
|
3
|
3
|
<div id="mainRight">
|
|
4
|
4
|
<div class="steps">
|
|
5
|
|
- <!-- :active="stepActive" direction="horizontal"-->
|
|
6
|
|
- <el-steps
|
|
7
|
|
- align-center
|
|
8
|
|
- :active="stepActive"
|
|
9
|
|
- finish-status="success"
|
|
10
|
|
- direction="horizontal"
|
|
11
|
|
- >
|
|
12
|
|
- <!-- v-for="(item, index) in totalData"
|
|
|
5
|
+ <el-steps align-center :active="active" direction="horizontal">
|
|
|
6
|
+ <el-step
|
|
|
7
|
+ id="el_step"
|
|
|
8
|
+ :title="item"
|
|
|
9
|
+ v-for="(item, index) in stepTitle"
|
|
13
|
10
|
:key="index"
|
|
14
|
|
- @click.native="stepClick(index)" -->
|
|
15
|
|
- <el-step id="el_step" title="1/3">
|
|
16
|
|
- <svg-icon class="icon_wai" slot="icon" icon-class="finished" />
|
|
17
|
|
- <!-- <svg-icon
|
|
18
|
|
- class='icon_wai'
|
|
|
11
|
+ >
|
|
|
12
|
+ <i class="el-icon-eleme" v-if="item == '巡查'"></i>
|
|
|
13
|
+
|
|
|
14
|
+ <svg-icon
|
|
|
15
|
+ class="icon_wai"
|
|
|
16
|
+ slot="icon"
|
|
|
17
|
+ icon-class="NotStarted"
|
|
|
18
|
+ v-if="active < index"
|
|
|
19
|
+ />
|
|
|
20
|
+ <svg-icon
|
|
|
21
|
+ class="icon_wai"
|
|
19
|
22
|
slot="icon"
|
|
20
|
23
|
icon-class="current"
|
|
21
|
|
- v-if="stepActive == index"
|
|
|
24
|
+ v-if="active == index"
|
|
22
|
25
|
/>
|
|
23
|
26
|
<svg-icon
|
|
24
|
|
- class='icon_wai'
|
|
|
27
|
+ class="icon_wai"
|
|
25
|
28
|
slot="icon"
|
|
26
|
29
|
icon-class="finished"
|
|
27
|
|
- v-if="stepActive > index"
|
|
28
|
|
- /> -->
|
|
29
|
|
- </el-step>
|
|
30
|
|
- <el-step title="1/2">
|
|
31
|
|
- <svg-icon class="icon_wai" slot="icon" icon-class="current" />
|
|
32
|
|
- </el-step>
|
|
33
|
|
- <el-step title="2/3">
|
|
34
|
|
- <svg-icon class="icon_wai" slot="icon" icon-class="NotStarted" />
|
|
35
|
|
- </el-step>
|
|
36
|
|
- <el-step title="自验收">
|
|
37
|
|
- <svg-icon class="icon_wai" slot="icon" icon-class="NotStarted" />
|
|
38
|
|
- </el-step>
|
|
39
|
|
- <el-step title="质检验收">
|
|
40
|
|
- <svg-icon class="icon_wai" slot="icon" icon-class="NotStarted" />
|
|
|
30
|
+ v-if="active > index"
|
|
|
31
|
+ />
|
|
41
|
32
|
</el-step>
|
|
|
33
|
+ <el-button
|
|
|
34
|
+ type="savebtn"
|
|
|
35
|
+ v-show="checkShow"
|
|
|
36
|
+ class="addcheck"
|
|
|
37
|
+ @click="add"
|
|
|
38
|
+ >添加巡查</el-button
|
|
|
39
|
+ >
|
|
42
|
40
|
</el-steps>
|
|
43
|
41
|
</div>
|
|
44
|
42
|
<div>
|
|
45
|
43
|
<el-table
|
|
46
|
|
- :header-row-class-name="goodsInfo"
|
|
47
|
|
- :cell-class-name="goodsInfo"
|
|
|
44
|
+ :data="personData1"
|
|
48
|
45
|
border
|
|
49
|
|
- :data="personData"
|
|
50
|
|
- highlight-current-row
|
|
51
|
|
- @current-change="handleCurrentChange"
|
|
52
|
|
- style="width: 100%"
|
|
53
|
46
|
:header-cell-style="{ background: '#f8f8f8' }"
|
|
54
|
|
- >
|
|
|
47
|
+ :row-style="{ height: '60px' }"
|
|
|
48
|
+ :cell-style="{ padding: '0' }"
|
|
|
49
|
+ ref="personData1"
|
|
|
50
|
+ >
|
|
55
|
51
|
<el-table-column
|
|
56
|
|
- property="qtypeName"
|
|
|
52
|
+ v-if="type == 1 || type == 2"
|
|
|
53
|
+ prop="checkType"
|
|
57
|
54
|
label="检查类型"
|
|
58
|
55
|
align="center"
|
|
59
|
|
- width='200'
|
|
60
|
|
- ></el-table-column>
|
|
61
|
|
- <el-table-column
|
|
62
|
|
- property="checkTime"
|
|
63
|
|
- style="padding:0;"
|
|
64
|
|
- label="记录时间"
|
|
|
56
|
+ >{{ (checkType = this.stepTitle[this.active]) }}</el-table-column
|
|
|
57
|
+ >
|
|
|
58
|
+ <el-table-column
|
|
|
59
|
+ v-if="type == 3"
|
|
|
60
|
+ prop="checkName"
|
|
|
61
|
+ label="检查类型"
|
|
65
|
62
|
align="center"
|
|
66
|
|
-
|
|
67
|
63
|
>
|
|
68
|
|
- <template>
|
|
69
|
|
- <p
|
|
70
|
|
- style="height:45px;line-height:45px;margin:0 ; padding-top:7px;"
|
|
71
|
|
- >
|
|
72
|
|
- 1
|
|
73
|
|
- </p>
|
|
74
|
|
- <p
|
|
75
|
|
- style="height:45px;line-height:45px;margin:0; padding-top:7px;border-top:1px solid #dfe6ec;border-bottom:1px solid #dfe6ec;"
|
|
76
|
|
- >
|
|
77
|
|
-2
|
|
78
|
|
- </p>
|
|
79
|
|
- <p style="height:45px;line-height:45px;margin:0;padding-top:7px;">
|
|
80
|
|
-3
|
|
81
|
|
- </p>
|
|
82
|
|
- </template>
|
|
83
|
64
|
</el-table-column>
|
|
84
|
65
|
<el-table-column
|
|
85
|
|
- property="ppost"
|
|
86
|
|
- style="padding:0;"
|
|
87
|
|
- label="检查项"
|
|
|
66
|
+ prop="creationTime"
|
|
|
67
|
+ label="记录时间"
|
|
88
|
68
|
align="center"
|
|
89
|
|
-
|
|
90
|
|
- >
|
|
|
69
|
+ ></el-table-column>
|
|
|
70
|
+ <el-table-column label="检查项" align="center" style="padding:0;">
|
|
91
|
71
|
<template>
|
|
92
|
72
|
<p
|
|
93
|
73
|
style="height:45px;line-height:45px;margin:0 ; padding-top:7px;"
|
|
|
@@ -105,133 +85,358 @@
|
|
105
|
85
|
</template>
|
|
106
|
86
|
</el-table-column>
|
|
107
|
87
|
<el-table-column
|
|
108
|
|
-
|
|
109
|
|
- property="operation"
|
|
110
|
88
|
label="选项"
|
|
111
|
89
|
align="center"
|
|
112
|
|
- min-width='250'
|
|
|
90
|
+ style="padding:0;"
|
|
|
91
|
+ min-width="280px"
|
|
113
|
92
|
>
|
|
114
|
|
- <template slot-scope="scope">
|
|
115
|
|
- <!-- <el-radio-group
|
|
116
|
|
- v-model="scope.row.c"
|
|
117
|
|
- @change="radioChange(scope.$index, scope.row)"
|
|
118
|
|
- >
|
|
119
|
|
- <el-radio :label="0">达标.宜存</el-radio>
|
|
120
|
|
- <el-radio :label="1">不达标.宜存</el-radio>
|
|
121
|
|
- <el-radio :label="2">不达标.不宜存</el-radio>
|
|
122
|
|
- </el-radio-group> -->
|
|
|
93
|
+ <template slot-scope="scope">
|
|
123
|
94
|
<p
|
|
124
|
95
|
style="height:45px;line-height:45px;margin:0 ; padding-top:7px;"
|
|
125
|
96
|
>
|
|
126
|
97
|
<el-radio-group
|
|
127
|
|
- v-model="scope.row.c"
|
|
128
|
|
- @change="radioChange(scope.$index, scope.row)"
|
|
129
|
|
- >
|
|
130
|
|
- <el-radio :label="0">达标.宜存</el-radio>
|
|
131
|
|
- <el-radio :label="1">不达标.宜存</el-radio>
|
|
132
|
|
- <el-radio :label="2">不达标.不宜存</el-radio>
|
|
133
|
|
- </el-radio-group>
|
|
|
98
|
+ v-model="scope.row.wquality"
|
|
|
99
|
+ @change="radioChange1(scope.$index, scope.row)"
|
|
|
100
|
+ :disabled="isDetail"
|
|
|
101
|
+ >
|
|
|
102
|
+ <el-radio :label="0">达标.宜存</el-radio>
|
|
|
103
|
+ <el-radio :label="1">不达标.宜存</el-radio>
|
|
|
104
|
+ <el-radio :label="2">不达标.不宜存</el-radio>
|
|
|
105
|
+ </el-radio-group>
|
|
134
|
106
|
</p>
|
|
135
|
107
|
<p
|
|
136
|
108
|
style="height:45px;line-height:45px;margin:0; padding-top:7px;border-top:1px solid #dfe6ec;border-bottom:1px solid #dfe6ec;"
|
|
137
|
109
|
>
|
|
138
|
110
|
<el-radio-group
|
|
139
|
|
- v-model="scope.row.c"
|
|
140
|
|
- @change="radioChange(scope.$index, scope.row)"
|
|
141
|
|
- >
|
|
142
|
|
- <el-radio :label="0">达标.宜存</el-radio>
|
|
143
|
|
- <el-radio :label="1">不达标.宜存</el-radio>
|
|
144
|
|
- <el-radio :label="2">不达标.不宜存</el-radio>
|
|
145
|
|
- </el-radio-group>
|
|
|
111
|
+ v-model="scope.row.wcharacter"
|
|
|
112
|
+ @change="radioChange1(scope.$index, scope.row)"
|
|
|
113
|
+ :disabled="isDetail"
|
|
|
114
|
+ >
|
|
|
115
|
+ <el-radio :label="0">达标.宜存</el-radio>
|
|
|
116
|
+ <el-radio :label="1">不达标.宜存</el-radio>
|
|
|
117
|
+ <el-radio :label="2">不达标.不宜存</el-radio>
|
|
|
118
|
+ </el-radio-group>
|
|
146
|
119
|
</p>
|
|
147
|
120
|
<p style="height:45px;line-height:45px;margin:0;padding-top:7px;">
|
|
148
|
121
|
<el-radio-group
|
|
149
|
|
- v-model="scope.row.c"
|
|
150
|
|
- @change="radioChange(scope.$index, scope.row)"
|
|
151
|
|
- >
|
|
152
|
|
- <el-radio :label="0">达标.宜存</el-radio>
|
|
153
|
|
- <el-radio :label="1">不达标.宜存</el-radio>
|
|
154
|
|
- <el-radio :label="2">不达标.不宜存</el-radio>
|
|
155
|
|
- </el-radio-group>
|
|
|
122
|
+ v-model="scope.row.toxinIndex"
|
|
|
123
|
+ @change="radioChange1(scope.$index, scope.row)"
|
|
|
124
|
+ :disabled="isDetail"
|
|
|
125
|
+ >
|
|
|
126
|
+ <el-radio :label="0">达标.宜存</el-radio>
|
|
|
127
|
+ <el-radio :label="1">不达标.宜存</el-radio>
|
|
|
128
|
+ <el-radio :label="2">不达标.不宜存</el-radio>
|
|
|
129
|
+ </el-radio-group>
|
|
156
|
130
|
</p>
|
|
157
|
131
|
</template>
|
|
158
|
132
|
</el-table-column>
|
|
159
|
133
|
</el-table>
|
|
160
|
134
|
</div>
|
|
|
135
|
+ <div class="btns">
|
|
|
136
|
+ <el-button type="danger" v-show="isShow">删除</el-button>
|
|
|
137
|
+ <el-button type="cancel" @click="goBack()">返回</el-button>
|
|
|
138
|
+ <el-button
|
|
|
139
|
+ class="saveBtn"
|
|
|
140
|
+ type="savebtn"
|
|
|
141
|
+ @click="save()"
|
|
|
142
|
+ :loading="loading"
|
|
|
143
|
+ v-if="type == 1"
|
|
|
144
|
+ >新增</el-button
|
|
|
145
|
+ >
|
|
|
146
|
+ <el-button
|
|
|
147
|
+ class="saveBtn"
|
|
|
148
|
+ type="savebtn"
|
|
|
149
|
+ @click="edit()"
|
|
|
150
|
+ :loading="loading"
|
|
|
151
|
+ v-if="type == 2"
|
|
|
152
|
+ >修改</el-button
|
|
|
153
|
+ >
|
|
|
154
|
+ </div>
|
|
161
|
155
|
</div>
|
|
162
|
156
|
</div>
|
|
163
|
157
|
</template>
|
|
164
|
158
|
<script>
|
|
165
|
|
-import { getkccknew } from "@/api/countQuality/index"
|
|
|
159
|
+import { getNowFormatDateone } from "@/utils"
|
|
|
160
|
+import {
|
|
|
161
|
+ /* getkccknew, */ saveInQuality,
|
|
|
162
|
+ updateInQuality
|
|
|
163
|
+} from "@/api/countQuality/index"
|
|
166
|
164
|
export default {
|
|
167
|
165
|
data() {
|
|
168
|
166
|
return {
|
|
169
|
|
- query: {
|
|
170
|
|
- roleId: ""
|
|
171
|
|
- },
|
|
172
|
|
- personData: [
|
|
173
|
|
- {
|
|
174
|
|
- createTime: "",
|
|
175
|
|
- d: "质量",
|
|
176
|
|
- c: ""
|
|
177
|
|
- },
|
|
178
|
|
- {
|
|
179
|
|
- createTime: "",
|
|
180
|
|
- d: "品质",
|
|
181
|
|
- c: ""
|
|
182
|
|
- },
|
|
|
167
|
+ type: null, // 1:新增, 2:修改,3:查看
|
|
|
168
|
+ loading: false,
|
|
|
169
|
+ isShow: false,
|
|
|
170
|
+ isDetail: false, //查看是选项不能被选择
|
|
|
171
|
+ active: 0,
|
|
|
172
|
+ indexInfoList: [],
|
|
|
173
|
+ stepTitle: ["1/3", "1/2", "2/3", "自验收", "质检中心验收"],
|
|
|
174
|
+ // stepTitle1: [],
|
|
|
175
|
+
|
|
|
176
|
+ checkType: "1/3",
|
|
|
177
|
+ creationTime: "", // 时间转换中介
|
|
|
178
|
+ personData1: [
|
|
183
|
179
|
{
|
|
184
|
|
- createTime: "",
|
|
185
|
|
- d: "毒素指标",
|
|
186
|
|
- c: ""
|
|
|
180
|
+ checkType: "",
|
|
|
181
|
+ creationTime: "",
|
|
|
182
|
+ wquality: null, //质量(0达标易存,1不达标易存,2不达标不易存
|
|
|
183
|
+ wcharacter: null, //品质(0达标易存,1不达标易存,2不达标不易存
|
|
|
184
|
+ toxinIndex: null //毒素指标(0达标易存,1不达标易存,2不达标不易存
|
|
187
|
185
|
}
|
|
188
|
186
|
],
|
|
|
187
|
+ model: {
|
|
|
188
|
+ checkName: "", //检测名称当前处于类型
|
|
|
189
|
+ checkType: null, // 检测类型(0:1/3,1:1/2,2:2/3,3:自验收,5:质检中心验收
|
|
|
190
|
+ childrenId: null,
|
|
|
191
|
+ creationTime: "", //创建时间
|
|
|
192
|
+ depotId: this.$store.state.depotId, //库id
|
|
|
193
|
+ depotName: this.$store.state.depotName, //库名称
|
|
|
194
|
+ endTime: "", //结束时间
|
|
|
195
|
+ id: null, //
|
|
|
196
|
+ qualityState: null, //0:进行中,1:完成
|
|
|
197
|
+ saveType: null, //标识是否第一次新增,0代表第一次,1代表n次
|
|
|
198
|
+ toxinIndex: null, //毒素指标(0达标易存,1不达标易存,2不达标不易存
|
|
|
199
|
+ wCharacter: null, //品质(0达标易存,1不达标易存,2不达标不易存
|
|
|
200
|
+ wIndex: null, //内置序列号
|
|
|
201
|
+ wQuality: null, //质量(0达标易存,1不达标易存,2不达标不易存
|
|
|
202
|
+ warehouseId: Number(this.$store.state.houseId), //仓房id
|
|
|
203
|
+ warehouseName: this.$store.state.houseName, //仓房名称
|
|
|
204
|
+ warehouseingId: null //入库质量表id
|
|
|
205
|
+ },
|
|
|
206
|
+ // stepActive:true,
|
|
189
|
207
|
depotId: "",
|
|
190
|
208
|
depotName: "",
|
|
191
|
|
- loading: false,
|
|
192
|
|
- model: {
|
|
193
|
|
- ccharacter: "",
|
|
194
|
|
- cquality: "",
|
|
195
|
|
- ctoxinIndex: "",
|
|
196
|
|
- depotId: "",
|
|
197
|
|
- depotYpte: 1,
|
|
198
|
|
- qid: "",
|
|
199
|
|
- qtype: "",
|
|
200
|
|
- warehouseId: "",
|
|
201
|
|
- saveState: ""
|
|
202
|
|
- }
|
|
|
209
|
+ isok: false
|
|
|
210
|
+ // checkShow:(this.active == 0 || this.stepTitle.length-1)?false:true,
|
|
|
211
|
+ // checkShow:false //新增巡查按钮显示控制
|
|
|
212
|
+ }
|
|
|
213
|
+ },
|
|
|
214
|
+ computed: {
|
|
|
215
|
+ // 监听
|
|
|
216
|
+ checkShow: function() {
|
|
|
217
|
+ return this.active == 0 || this.active == this.stepTitle.length - 1
|
|
|
218
|
+ ? false
|
|
|
219
|
+ : true
|
|
203
|
220
|
}
|
|
204
|
|
- /* personData: [],
|
|
205
|
|
- total: 0,
|
|
206
|
|
- id: "",
|
|
207
|
|
- depotId: "",
|
|
208
|
|
- warehouseId: "",
|
|
209
|
|
- depotYpte: 1 */
|
|
210
|
|
-
|
|
211
|
221
|
},
|
|
212
|
222
|
created() {
|
|
213
|
223
|
// this.depotId = JSON.parse(getUser()).depotId
|
|
214
|
224
|
// this.warehouseId = this.$store.state.houseId
|
|
215
|
|
- this.getList()
|
|
|
225
|
+ // this.getList()
|
|
|
226
|
+ },
|
|
|
227
|
+ mounted() {
|
|
|
228
|
+ let routeParams = this.$route.query
|
|
|
229
|
+ this.type = routeParams.type
|
|
|
230
|
+ // 1:新增, 2:修改,3:查看
|
|
|
231
|
+ if (this.type == 1) {
|
|
|
232
|
+ // 新增
|
|
|
233
|
+ this.model.saveType = 0 //0代表第一次新增,1代表n次
|
|
|
234
|
+ } else if (this.type == 2) {
|
|
|
235
|
+ // 修改
|
|
|
236
|
+ let editData = routeParams.data.qualityChildrens
|
|
|
237
|
+ this.active = routeParams.data.qualityChildrens.length - 1
|
|
|
238
|
+ this.model.saveType = 1 //0代表第一次新增,1代表n次
|
|
|
239
|
+ this.model.checkName = editData[editData.length - 1].checkName
|
|
|
240
|
+ this.model.id = routeParams.data.id
|
|
|
241
|
+ this.model.childrenId =
|
|
|
242
|
+ routeParams.data.qualityChildrens[this.active].childrenId
|
|
|
243
|
+ this.personData1[0].wquality =
|
|
|
244
|
+ routeParams.data.qualityChildrens[this.active].wquality
|
|
|
245
|
+ this.personData1[0].toxinIndex =
|
|
|
246
|
+ routeParams.data.qualityChildrens[this.active].toxinIndex
|
|
|
247
|
+ this.personData1[0].wcharacter =
|
|
|
248
|
+ routeParams.data.qualityChildrens[this.active].wcharacter
|
|
|
249
|
+ this.personData1[0].creationTime =
|
|
|
250
|
+ routeParams.data.qualityChildrens[this.active].creationTime
|
|
|
251
|
+ this.stepTitle = JSON.parse(JSON.stringify(routeParams.data.stepTitle))
|
|
|
252
|
+ } else if (this.type == 3) {
|
|
|
253
|
+ // 查看
|
|
|
254
|
+ this.personData1 = routeParams.data.qualityChildrens
|
|
|
255
|
+ let editData = routeParams.data.qualityChildrens
|
|
|
256
|
+ this.active = editData[editData.length - 1].checkType + 1
|
|
|
257
|
+ this.isDetail = true //单选项设为不能选择
|
|
|
258
|
+ this.stepTitle = routeParams.data.stepTitle
|
|
|
259
|
+ this.active = routeParams.data.qualityChildrens.length - 1
|
|
|
260
|
+
|
|
|
261
|
+ console.log(this.personData1, "查看步骤")
|
|
|
262
|
+ }
|
|
216
|
263
|
},
|
|
217
|
264
|
methods: {
|
|
218
|
|
- radioChange(index, row) {
|
|
219
|
|
- this.personData[index].createTime = getNowFormatDateone()
|
|
220
|
|
- if (row.d == "质量") {
|
|
221
|
|
- this.model.cquality = row.c
|
|
222
|
|
- } else if (row.d == "品质") {
|
|
223
|
|
- this.model.ccharacter = row.c
|
|
224
|
|
- } else if (row.d == "毒素指标") {
|
|
225
|
|
- this.model.ctoxinIndex = row.c
|
|
|
265
|
+ // 合并行
|
|
|
266
|
+ objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
267
|
+ if (columnIndex === 0 || columnIndex === 1) {
|
|
|
268
|
+ if (rowIndex % 3 === 0) {
|
|
|
269
|
+ return {
|
|
|
270
|
+ rowspan: 3,
|
|
|
271
|
+ colspan: 1
|
|
|
272
|
+ }
|
|
|
273
|
+ } else {
|
|
|
274
|
+ return {
|
|
|
275
|
+ rowspan: 0,
|
|
|
276
|
+ colspan: 0
|
|
|
277
|
+ }
|
|
|
278
|
+ }
|
|
226
|
279
|
}
|
|
227
|
280
|
},
|
|
|
281
|
+ //单选
|
|
|
282
|
+ radioChange1(index, row) {
|
|
|
283
|
+ this.personData1[index].creationTime = getNowFormatDateone()
|
|
|
284
|
+ this.creationTime = this.getISOString()
|
|
|
285
|
+ this.isok = true // 该步骤操作过,设置可以保存
|
|
|
286
|
+ },
|
|
|
287
|
+
|
|
|
288
|
+ getISOString() {
|
|
|
289
|
+ var t = new Date()
|
|
|
290
|
+ return t.toISOString()
|
|
|
291
|
+ },
|
|
|
292
|
+ // 修改
|
|
|
293
|
+ edit() {
|
|
|
294
|
+ this.model.creationTime = this.creationTime
|
|
|
295
|
+ // this.model.saveType = 0 //0代表第一次新增,1代表n次
|
|
|
296
|
+ this.model.wQuality = this.personData1[0].wquality
|
|
|
297
|
+ this.model.wCharacter = this.personData1[0].wcharacter
|
|
|
298
|
+ this.model.toxinIndex = this.personData1[0].toxinIndex
|
|
|
299
|
+ // 转换checkType 与checkName
|
|
|
300
|
+
|
|
|
301
|
+ let checktype = this.stepTitle[this.active]
|
|
|
302
|
+ switch (checktype) {
|
|
|
303
|
+ case "1/3":
|
|
|
304
|
+ this.model.checkType = 0
|
|
|
305
|
+ break
|
|
|
306
|
+ case "1/2":
|
|
|
307
|
+ this.model.checkType = 1
|
|
|
308
|
+ break
|
|
|
309
|
+ case "2/3":
|
|
|
310
|
+ this.model.checkType = 2
|
|
|
311
|
+ break
|
|
|
312
|
+ case "自验收":
|
|
|
313
|
+ this.model.checkType = 3
|
|
|
314
|
+ break
|
|
|
315
|
+ case "质检中心验收":
|
|
|
316
|
+ this.model.checkType = 4
|
|
|
317
|
+ break
|
|
|
318
|
+ case "巡查":
|
|
|
319
|
+ this.model.checkType = 5
|
|
|
320
|
+ break
|
|
|
321
|
+ }
|
|
|
322
|
+ // 判断状态
|
|
|
323
|
+ if (this.active < this.stepTitle.length - 1) {
|
|
|
324
|
+ this.model.qualityState = 0 //状态为进行中
|
|
|
325
|
+ } else if (this.active == this.stepTitle.length - 1) {
|
|
|
326
|
+ this.model.qualityState = 1 //状态为已完成
|
|
|
327
|
+ }
|
|
|
328
|
+ updateInQuality(this.model)
|
|
|
329
|
+ .then(res => {
|
|
|
330
|
+ console.log(res, "更新数据返回")
|
|
|
331
|
+ })
|
|
|
332
|
+ .catch(err => {
|
|
|
333
|
+ console.loh(err, "错误信息返回")
|
|
|
334
|
+ })
|
|
|
335
|
+ },
|
|
|
336
|
+ // 新增保存
|
|
|
337
|
+ save() {
|
|
|
338
|
+ this.loading = true
|
|
|
339
|
+ // 通过checkName判断checkType
|
|
|
340
|
+ let checktype = this.stepTitle[this.active]
|
|
|
341
|
+ switch (checktype) {
|
|
|
342
|
+ case "1/3":
|
|
|
343
|
+ this.model.checkType = 0
|
|
|
344
|
+ break
|
|
|
345
|
+ case "1/2":
|
|
|
346
|
+ this.model.checkType = 1
|
|
|
347
|
+ break
|
|
|
348
|
+ case "2/3":
|
|
|
349
|
+ this.model.checkType = 2
|
|
|
350
|
+ break
|
|
|
351
|
+ case "自验收":
|
|
|
352
|
+ this.model.checkType = 3
|
|
|
353
|
+ break
|
|
|
354
|
+ case "质检中心验收":
|
|
|
355
|
+ this.model.checkType = 4
|
|
|
356
|
+ break
|
|
|
357
|
+ case "巡查":
|
|
|
358
|
+ this.model.checkType = 5
|
|
|
359
|
+ break
|
|
|
360
|
+ }
|
|
|
361
|
+ // 新增
|
|
|
362
|
+ if (this.type == 1) {
|
|
|
363
|
+ if (this.active < this.stepTitle.length - 1) {
|
|
|
364
|
+ this.model.qualityState = 0 //状态为进行中
|
|
|
365
|
+ } else if (this.active == this.stepTitle.length - 1) {
|
|
|
366
|
+ this.model.qualityState = 1 //状态为已完成
|
|
|
367
|
+ }
|
|
|
368
|
+ // if(this.stepTitle[this.active] )
|
|
|
369
|
+ this.model.checkName = this.stepTitle[this.active]
|
|
|
370
|
+ // this.model.checkType = this.stepTitle[this.active]
|
|
|
371
|
+ this.model.creationTime = this.creationTime
|
|
|
372
|
+ // this.model.saveType = 0 //0代表第一次新增,1代表n次
|
|
|
373
|
+ this.model.wQuality = this.personData1[0].wquality
|
|
|
374
|
+ this.model.wCharacter = this.personData1[0].wcharacter
|
|
|
375
|
+ this.model.toxinIndex = this.personData1[0].toxinIndex
|
|
|
376
|
+
|
|
|
377
|
+ if (this.isok) {
|
|
|
378
|
+ saveInQuality(this.model)
|
|
|
379
|
+ .then(res => {
|
|
|
380
|
+ if (res.code == 200) {
|
|
|
381
|
+ this.loading = false
|
|
|
382
|
+ this.next() // 该步骤新增成功后步骤+1
|
|
|
383
|
+ this.model.id = res.data.id
|
|
|
384
|
+ this.model.saveType = 1 // 下一步需要将此字段改为第n次新增
|
|
|
385
|
+
|
|
|
386
|
+ this.personData1[0].wquality = null
|
|
|
387
|
+ this.personData1[0].wcharacter = null
|
|
|
388
|
+ this.personData1[0].toxinIndex = null
|
|
|
389
|
+ this.personData1[0].creationTime = ""
|
|
|
390
|
+ }
|
|
|
391
|
+ })
|
|
|
392
|
+ .catch(res => {
|
|
|
393
|
+ this.$message("新增失败!")
|
|
|
394
|
+ this.loading = false
|
|
|
395
|
+ })
|
|
|
396
|
+ } else {
|
|
|
397
|
+ this.loading = false
|
|
|
398
|
+ this.$message({
|
|
|
399
|
+ message: "不能保存空的步骤,请记录后再进行保存!",
|
|
|
400
|
+ type: "warning"
|
|
|
401
|
+ })
|
|
|
402
|
+ }
|
|
|
403
|
+ } else if (this.type == 2) {
|
|
|
404
|
+ // 修改
|
|
|
405
|
+ } else if (this.type == 3) {
|
|
|
406
|
+ }
|
|
|
407
|
+ },
|
|
|
408
|
+ // 查看
|
|
|
409
|
+ query() {},
|
|
|
410
|
+ // 删除
|
|
|
411
|
+ delete() {},
|
|
|
412
|
+ // 下一步
|
|
|
413
|
+ next() {
|
|
|
414
|
+ // console.log(this.active, "active")
|
|
|
415
|
+ if (this.active++ >= this.stepTitle.length - 1) {
|
|
|
416
|
+ // this.active = 0
|
|
|
417
|
+ this.$router.push({
|
|
|
418
|
+ path: "/countQuality/warehousingQuality/StorageQuality"
|
|
|
419
|
+ })
|
|
|
420
|
+ }
|
|
|
421
|
+ // this.stepTitle1 = this.stepTitle;
|
|
|
422
|
+ },
|
|
|
423
|
+ // 添加巡查
|
|
|
424
|
+ add() {
|
|
|
425
|
+ this.stepTitle.splice(this.active, 0, "巡查")
|
|
|
426
|
+ },
|
|
|
427
|
+ //点击返回按钮
|
|
|
428
|
+ goBack() {
|
|
|
429
|
+ this.$router.push({
|
|
|
430
|
+ path: "/countQuality/warehousingQuality/StorageQuality"
|
|
|
431
|
+ })
|
|
|
432
|
+ },
|
|
228
|
433
|
goodsInfo(row) {
|
|
229
|
434
|
if (row.columnIndex == 3 || row.columnIndex == 2) {
|
|
230
|
435
|
return "goodsInfo"
|
|
231
|
436
|
}
|
|
232
|
437
|
},
|
|
233
|
438
|
|
|
234
|
|
- getList() {
|
|
|
439
|
+ /* getList() {
|
|
235
|
440
|
getkccknew(this.depotId, "1").then(res => {
|
|
236
|
441
|
this.personData = res.data
|
|
237
|
442
|
this.total = res.data.total
|
|
|
@@ -256,7 +461,7 @@ export default {
|
|
256
|
461
|
state: "more"
|
|
257
|
462
|
}
|
|
258
|
463
|
})
|
|
259
|
|
- },
|
|
|
464
|
+ }, */
|
|
260
|
465
|
handleCurrentChange() {}
|
|
261
|
466
|
}
|
|
262
|
467
|
}
|
|
|
@@ -265,7 +470,7 @@ export default {
|
|
265
|
470
|
.goodsInfo {
|
|
266
|
471
|
padding: 0 !important;
|
|
267
|
472
|
}
|
|
268
|
|
-.goodsInfo .cell {
|
|
|
473
|
+.el-table .cell {
|
|
269
|
474
|
padding: 0;
|
|
270
|
475
|
overflow: unset;
|
|
271
|
476
|
}
|
|
|
@@ -273,16 +478,26 @@ export default {
|
|
273
|
478
|
width: 45px;
|
|
274
|
479
|
height: 45px;
|
|
275
|
480
|
}
|
|
|
481
|
+.el-step.is-horizontal .el-step__line {
|
|
|
482
|
+ top: 21px !important;
|
|
|
483
|
+}
|
|
276
|
484
|
</style>
|
|
277
|
485
|
<style lang="scss" scoped>
|
|
278
|
486
|
.container {
|
|
279
|
|
- height: 100%;
|
|
|
487
|
+ height: calc(100vh - 165px);
|
|
|
488
|
+ overflow-y: scroll;
|
|
|
489
|
+ overflow-x: hidden;
|
|
280
|
490
|
display: flex;
|
|
|
491
|
+ // margin-right: 13px;
|
|
281
|
492
|
#mainLeft {
|
|
282
|
493
|
width: 300px;
|
|
283
|
|
- height: calc(100vh - 200px);
|
|
|
494
|
+
|
|
284
|
495
|
border: 1px solid #e6e6e6;
|
|
285
|
496
|
}
|
|
|
497
|
+ .content {
|
|
|
498
|
+ height: 100%;
|
|
|
499
|
+ // overflow-y: auto;
|
|
|
500
|
+ }
|
|
286
|
501
|
#mainRight {
|
|
287
|
502
|
margin-left: 20px;
|
|
288
|
503
|
width: calc(99%);
|
|
|
@@ -312,7 +527,6 @@ export default {
|
|
312
|
527
|
.steps {
|
|
313
|
528
|
min-height: 80px;
|
|
314
|
529
|
margin: 10px 0;
|
|
315
|
|
- // line-height:80px;
|
|
316
|
530
|
.iconfont {
|
|
317
|
531
|
font-size: 55px;
|
|
318
|
532
|
}
|
|
|
@@ -323,40 +537,6 @@ export default {
|
|
323
|
537
|
width: 40px;
|
|
324
|
538
|
height: 40px;
|
|
325
|
539
|
}
|
|
326
|
|
- .el-step__head.is-process {
|
|
327
|
|
- border-color: #dedede;
|
|
328
|
|
- }
|
|
329
|
|
- .el-step__head.is-finish {
|
|
330
|
|
- border-color: #285edf;
|
|
331
|
|
- }
|
|
332
|
|
- .el-step__title.is-process {
|
|
333
|
|
- color: #037d41;
|
|
334
|
|
- }
|
|
335
|
|
- .el-step__title.is-wait {
|
|
336
|
|
- color: #16261e;
|
|
337
|
|
- }
|
|
338
|
|
- .el-step__title.is-finish {
|
|
339
|
|
- color: #037d41;
|
|
340
|
|
- }
|
|
341
|
|
- .el-step__description.is-process {
|
|
342
|
|
- color: #2d2f33;
|
|
343
|
|
- }
|
|
344
|
|
-
|
|
345
|
|
- .el-step__description.is-wait {
|
|
346
|
|
- color: #b4bccc;
|
|
347
|
|
- }
|
|
348
|
|
-
|
|
349
|
|
- .el-step__description.is-success {
|
|
350
|
|
- color: #409167;
|
|
351
|
|
- }
|
|
352
|
|
-
|
|
353
|
|
- .el-step__description.is-error {
|
|
354
|
|
- color: #b3450e;
|
|
355
|
|
- }
|
|
356
|
|
-
|
|
357
|
|
- .el-step__description.is-finish {
|
|
358
|
|
- color: #262729;
|
|
359
|
|
- }
|
|
360
|
540
|
}
|
|
361
|
541
|
|
|
362
|
542
|
.icon_wai {
|
|
|
@@ -373,4 +553,15 @@ export default {
|
|
373
|
553
|
margin-right: 20px;
|
|
374
|
554
|
text-align: right;
|
|
375
|
555
|
}
|
|
|
556
|
+.btns {
|
|
|
557
|
+ /* position: relative;
|
|
|
558
|
+ bottom: 150px;
|
|
|
559
|
+ right: 50px; */
|
|
|
560
|
+ text-align: right;
|
|
|
561
|
+ margin: 40px 10px 0 0;
|
|
|
562
|
+}
|
|
|
563
|
+.addcheck {
|
|
|
564
|
+ margin-right: 15px;
|
|
|
565
|
+ margin-top: 15px;
|
|
|
566
|
+}
|
|
376
|
567
|
</style>
|