|
|
1
|
+<template>
|
|
|
2
|
+ <el-row>
|
|
|
3
|
+ <el-card style="background-color: #F5F7FA">
|
|
|
4
|
+ <!-- 搜索区域-->
|
|
|
5
|
+ <el-row :gutter="10" class="toolbar">
|
|
|
6
|
+ <el-col :span="7">
|
|
|
7
|
+ <el-input v-model="queryInfo.waybill" prefix-icon="el-icon-search" size="small" style="width: 280px"
|
|
|
8
|
+ placeholder="货物单号" clearable>
|
|
|
9
|
+ <template slot="prepend">货物单号</template>
|
|
|
10
|
+ </el-input>
|
|
|
11
|
+ </el-col>
|
|
|
12
|
+ <el-col :span="6">
|
|
|
13
|
+ <el-button type="primary" icon="el-icon-search" size="small" @click="getList()">
|
|
|
14
|
+ 查询
|
|
|
15
|
+ </el-button>
|
|
|
16
|
+ <el-button type="success" icon="el-icon-edit" size="small" @click="applyAdd()">新增</el-button>
|
|
|
17
|
+ </el-col>
|
|
|
18
|
+ </el-row>
|
|
|
19
|
+ <!-- 列表区域-->
|
|
|
20
|
+ <el-row>
|
|
|
21
|
+ <template>
|
|
|
22
|
+ <el-table
|
|
|
23
|
+ :data="tableData"
|
|
|
24
|
+ border
|
|
|
25
|
+ :cell-style="{textAlign:'center'}"
|
|
|
26
|
+ style="border-radius: 10px 10px 0px 0px;line-height: 25px"
|
|
|
27
|
+ :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" size="small"
|
|
|
28
|
+ >
|
|
|
29
|
+ <el-table-column
|
|
|
30
|
+ fixed
|
|
|
31
|
+ prop="waybill"
|
|
|
32
|
+ label="货物单号"
|
|
|
33
|
+ width="120">
|
|
|
34
|
+ </el-table-column>
|
|
|
35
|
+ <el-table-column
|
|
|
36
|
+ prop="vol"
|
|
|
37
|
+ label="体积"
|
|
|
38
|
+ width="60">
|
|
|
39
|
+ </el-table-column>
|
|
|
40
|
+ <el-table-column
|
|
|
41
|
+ prop="weight"
|
|
|
42
|
+ label="重量"
|
|
|
43
|
+ width="60">
|
|
|
44
|
+ </el-table-column>
|
|
|
45
|
+ <el-table-column
|
|
|
46
|
+ prop="pcs"
|
|
|
47
|
+ label="件数"
|
|
|
48
|
+ width="60">
|
|
|
49
|
+ </el-table-column>
|
|
|
50
|
+ <el-table-column
|
|
|
51
|
+ prop="billweight"
|
|
|
52
|
+ label="计费重量"
|
|
|
53
|
+ width="70">
|
|
|
54
|
+ </el-table-column>
|
|
|
55
|
+ <el-table-column
|
|
|
56
|
+ prop="area"
|
|
|
57
|
+ label="库区"
|
|
|
58
|
+ width="60">
|
|
|
59
|
+ </el-table-column>
|
|
|
60
|
+ <el-table-column
|
|
|
61
|
+ prop="location"
|
|
|
62
|
+ label="库位"
|
|
|
63
|
+ width="60">
|
|
|
64
|
+ </el-table-column>
|
|
|
65
|
+ <el-table-column
|
|
|
66
|
+ prop="serialnumber"
|
|
|
67
|
+ label="流水号"
|
|
|
68
|
+ width="120">
|
|
|
69
|
+ </el-table-column>
|
|
|
70
|
+ <el-table-column
|
|
|
71
|
+ prop="station"
|
|
|
72
|
+ label="出入库场站"
|
|
|
73
|
+ width="100">
|
|
|
74
|
+ </el-table-column>
|
|
|
75
|
+ <el-table-column
|
|
|
76
|
+ prop="status"
|
|
|
77
|
+ label="状态"
|
|
|
78
|
+ width="80">
|
|
|
79
|
+ <template slot-scope="scope">
|
|
|
80
|
+ <span v-if="scope.row.status ==='0'">失败</span>
|
|
|
81
|
+ <span v-if="scope.row.status ==='1'">成功</span>
|
|
|
82
|
+ </template>
|
|
|
83
|
+ </el-table-column>
|
|
|
84
|
+ <el-table-column
|
|
|
85
|
+ prop="transcar"
|
|
|
86
|
+ label="运输车辆信息"
|
|
|
87
|
+ width="100">
|
|
|
88
|
+ </el-table-column>
|
|
|
89
|
+ <el-table-column
|
|
|
90
|
+ prop="transtype"
|
|
|
91
|
+ label="交易类型"
|
|
|
92
|
+ width="100">
|
|
|
93
|
+ </el-table-column>
|
|
|
94
|
+ <el-table-column
|
|
|
95
|
+ prop="custel"
|
|
|
96
|
+ label="客户联系电话"
|
|
|
97
|
+ width="140">
|
|
|
98
|
+ </el-table-column>
|
|
|
99
|
+ <el-table-column
|
|
|
100
|
+ prop="customer"
|
|
|
101
|
+ label="联系人姓名"
|
|
|
102
|
+ width="100">
|
|
|
103
|
+ </el-table-column>
|
|
|
104
|
+ <el-table-column
|
|
|
105
|
+ prop="customername"
|
|
|
106
|
+ label="客户名称"
|
|
|
107
|
+ width="80">
|
|
|
108
|
+ </el-table-column>
|
|
|
109
|
+ <el-table-column
|
|
|
110
|
+ prop="goodstype"
|
|
|
111
|
+ label="货物类型"
|
|
|
112
|
+ width="80">
|
|
|
113
|
+ </el-table-column>
|
|
|
114
|
+ <el-table-column
|
|
|
115
|
+ prop="house"
|
|
|
116
|
+ label="出入库仓库"
|
|
|
117
|
+ width="100">
|
|
|
118
|
+ </el-table-column>
|
|
|
119
|
+ <el-table-column
|
|
|
120
|
+ prop="ietype"
|
|
|
121
|
+ label="类型"
|
|
|
122
|
+ width="60">
|
|
|
123
|
+ <template slot-scope="scope">
|
|
|
124
|
+ <span v-if="scope.row.ietype ==='I'">进</span>
|
|
|
125
|
+ <span v-if="scope.row.ietype ==='E'">出</span>
|
|
|
126
|
+ </template>
|
|
|
127
|
+ </el-table-column>
|
|
|
128
|
+ <el-table-column
|
|
|
129
|
+ prop="opter"
|
|
|
130
|
+ label="出入库经办人"
|
|
|
131
|
+ width="100">
|
|
|
132
|
+ </el-table-column>
|
|
|
133
|
+ <el-table-column
|
|
|
134
|
+ prop="opttime"
|
|
|
135
|
+ label="出入库时间"
|
|
|
136
|
+ width="140">
|
|
|
137
|
+ </el-table-column>
|
|
|
138
|
+ <el-table-column
|
|
|
139
|
+ fixed="right"
|
|
|
140
|
+ label="操作"
|
|
|
141
|
+ width="160">
|
|
|
142
|
+ <template slot-scope="scope">
|
|
|
143
|
+ <el-button type="success" size="mini" @click="applyEdit(scope.row)">编辑</el-button>
|
|
|
144
|
+ <el-button type="danger" size="mini" @click="applyDel(scope.$index,scope.row)">删除</el-button>
|
|
|
145
|
+ </template>
|
|
|
146
|
+ </el-table-column>
|
|
|
147
|
+ </el-table>
|
|
|
148
|
+ </template>
|
|
|
149
|
+ </el-row>
|
|
|
150
|
+ <el-row style="margin-top: 10px" class="toolbar">
|
|
|
151
|
+ <el-pagination
|
|
|
152
|
+ @size-change="handleSizeChange"
|
|
|
153
|
+ @current-change="handleCurrentChange"
|
|
|
154
|
+ :current-page="queryInfo.pageNum"
|
|
|
155
|
+ :page-size="queryInfo.pageSize"
|
|
|
156
|
+ :page-sizes="[10, 50, 100, 500]"
|
|
|
157
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
158
|
+ :total="total">
|
|
|
159
|
+ </el-pagination>
|
|
|
160
|
+ </el-row>
|
|
|
161
|
+ <el-row>
|
|
|
162
|
+ <el-dialog :title="dialogMap[dialogApply]" :visible.sync="apply_dialog.addDialog" width="80%" >
|
|
|
163
|
+ <el-form :model="addForm" :rules="rules" ref="addForm" style="margin-top: 40px">
|
|
|
164
|
+ <el-row>
|
|
|
165
|
+ <el-col :span="7">
|
|
|
166
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="waybill">
|
|
|
167
|
+ <el-input v-model="addForm.waybill" autocomplete="off" size="small" style="width: 300px">
|
|
|
168
|
+ <template slot="prepend">货物单号</template>
|
|
|
169
|
+ </el-input>
|
|
|
170
|
+ </el-form-item>
|
|
|
171
|
+ </el-col>
|
|
|
172
|
+ <el-col :span="8">
|
|
|
173
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="weight">
|
|
|
174
|
+ <el-input v-model="addForm.weight" autocomplete="off" size="small" style="width: 300px">
|
|
|
175
|
+ <template slot="prepend">重  量</template>
|
|
|
176
|
+ </el-input>
|
|
|
177
|
+ </el-form-item>
|
|
|
178
|
+ </el-col>
|
|
|
179
|
+ <el-col :span="8">
|
|
|
180
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="vol">
|
|
|
181
|
+ <el-input v-model="addForm.vol" autocomplete="off" size="small" style="width: 300px">
|
|
|
182
|
+ <template slot="prepend">体  积</template>
|
|
|
183
|
+ </el-input>
|
|
|
184
|
+ </el-form-item>
|
|
|
185
|
+ </el-col>
|
|
|
186
|
+ </el-row>
|
|
|
187
|
+ <el-row>
|
|
|
188
|
+ <el-col :span="7">
|
|
|
189
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="pcs">
|
|
|
190
|
+ <el-input v-model="addForm.pcs" autocomplete="off" size="small" style="width: 300px">
|
|
|
191
|
+ <template slot="prepend">件  数</template>
|
|
|
192
|
+ </el-input>
|
|
|
193
|
+ </el-form-item>
|
|
|
194
|
+ </el-col>
|
|
|
195
|
+ <el-col :span="8">
|
|
|
196
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="billweight">
|
|
|
197
|
+ <el-input v-model="addForm.billweight" autocomplete="off" size="small" style="width: 300px">
|
|
|
198
|
+ <template slot="prepend">计费重量</template>
|
|
|
199
|
+ </el-input>
|
|
|
200
|
+ </el-form-item>
|
|
|
201
|
+ </el-col>
|
|
|
202
|
+ <el-col :span="8">
|
|
|
203
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="area">
|
|
|
204
|
+ <el-input v-model="addForm.area" autocomplete="off" size="small" style="width: 300px">
|
|
|
205
|
+ <template slot="prepend">库  区</template>
|
|
|
206
|
+ </el-input>
|
|
|
207
|
+ </el-form-item>
|
|
|
208
|
+ </el-col>
|
|
|
209
|
+ </el-row>
|
|
|
210
|
+ <el-row>
|
|
|
211
|
+ <el-col :span="7">
|
|
|
212
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="location">
|
|
|
213
|
+ <el-input v-model="addForm.location" autocomplete="off" size="small" style="width: 300px">
|
|
|
214
|
+ <template slot="prepend">库  位</template>
|
|
|
215
|
+ </el-input>
|
|
|
216
|
+ </el-form-item>
|
|
|
217
|
+ </el-col>
|
|
|
218
|
+ <el-col :span="8">
|
|
|
219
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="serialnumber">
|
|
|
220
|
+ <el-input v-model="addForm.serialnumber" autocomplete="off" size="small" style="width: 300px">
|
|
|
221
|
+ <template slot="prepend">流水 号</template>
|
|
|
222
|
+ </el-input>
|
|
|
223
|
+ </el-form-item>
|
|
|
224
|
+ </el-col>
|
|
|
225
|
+ <el-col :span="8">
|
|
|
226
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="transtype">
|
|
|
227
|
+<!-- <el-input v-model="addForm.transtype" autocomplete="off" size="small" style="width: 300px">-->
|
|
|
228
|
+<!-- <template slot="prepend">交易类型</template>-->
|
|
|
229
|
+<!-- </el-input>-->
|
|
|
230
|
+ <el-select v-model="addForm.transtype" placeholder="请选择交易类型" autocomplete="off" size="small" style="width: 300px">
|
|
|
231
|
+ <el-option
|
|
|
232
|
+ v-for="item in options1"
|
|
|
233
|
+ :key="item.value"
|
|
|
234
|
+ :label="item.label"
|
|
|
235
|
+ :value="item.value">
|
|
|
236
|
+ </el-option>
|
|
|
237
|
+ </el-select>
|
|
|
238
|
+ </el-form-item>
|
|
|
239
|
+ </el-col>
|
|
|
240
|
+ </el-row>
|
|
|
241
|
+ <el-row>
|
|
|
242
|
+ <el-col :span="7">
|
|
|
243
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="house">
|
|
|
244
|
+ <el-input v-model="addForm.house" autocomplete="off" size="small" style="width: 300px">
|
|
|
245
|
+ <template slot="prepend">出入库仓库</template>
|
|
|
246
|
+ </el-input>
|
|
|
247
|
+ </el-form-item>
|
|
|
248
|
+ </el-col>
|
|
|
249
|
+ <el-col :span="8">
|
|
|
250
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="opttime">
|
|
|
251
|
+<!-- <el-input v-model="addForm.opttime" autocomplete="off" size="small" style="width: 300px">-->
|
|
|
252
|
+<!-- <template slot="prepend">出入库时间</template>-->
|
|
|
253
|
+<!-- </el-input>-->
|
|
|
254
|
+ <el-date-picker
|
|
|
255
|
+ v-model="addForm.opttime"
|
|
|
256
|
+ type="datetime" size="mini"
|
|
|
257
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
258
|
+ format="yyyy-MM-dd HH:mm:ss"
|
|
|
259
|
+ style="width:300px"
|
|
|
260
|
+ placeholder="选择出入库时间">
|
|
|
261
|
+ </el-date-picker>
|
|
|
262
|
+ </el-form-item>
|
|
|
263
|
+ </el-col>
|
|
|
264
|
+
|
|
|
265
|
+ <el-col :span="8">
|
|
|
266
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="station">
|
|
|
267
|
+ <el-input v-model="addForm.station" autocomplete="off" size="small" style="width: 300px">
|
|
|
268
|
+ <template slot="prepend">出入库场站</template>
|
|
|
269
|
+ </el-input>
|
|
|
270
|
+ </el-form-item>
|
|
|
271
|
+ </el-col>
|
|
|
272
|
+ </el-row>
|
|
|
273
|
+ <el-row>
|
|
|
274
|
+ <el-col :span="7">
|
|
|
275
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="transcar">
|
|
|
276
|
+ <el-input v-model="addForm.transcar" autocomplete="off" size="small" style="width: 300px">
|
|
|
277
|
+ <template slot="prepend">运输车辆信息</template>
|
|
|
278
|
+ </el-input>
|
|
|
279
|
+ </el-form-item>
|
|
|
280
|
+ </el-col>
|
|
|
281
|
+ <el-col :span="8">
|
|
|
282
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="opter">
|
|
|
283
|
+ <el-input v-model="addForm.opter" autocomplete="off" size="small" style="width: 300px">
|
|
|
284
|
+ <template slot="prepend">出入库经办人</template>
|
|
|
285
|
+ </el-input>
|
|
|
286
|
+ </el-form-item>
|
|
|
287
|
+ </el-col>
|
|
|
288
|
+ <el-col :span="8">
|
|
|
289
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="customername">
|
|
|
290
|
+ <el-input v-model="addForm.customername" autocomplete="off" size="small" style="width: 300px">
|
|
|
291
|
+ <template slot="prepend">出入库客户名称</template>
|
|
|
292
|
+ </el-input>
|
|
|
293
|
+ </el-form-item>
|
|
|
294
|
+ </el-col>
|
|
|
295
|
+ </el-row>
|
|
|
296
|
+ <el-row>
|
|
|
297
|
+ <el-col :span="7">
|
|
|
298
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="goodstype">
|
|
|
299
|
+ <!-- <el-input v-model="addForm.goodstype" autocomplete="off" size="small" style="width: 300px">-->
|
|
|
300
|
+ <!-- <template slot="prepend">出入库货物类型</template>-->
|
|
|
301
|
+ <!-- </el-input>-->
|
|
|
302
|
+ <el-select v-model="addForm.goodstype" placeholder="请选择出入库货物类型" autocomplete="off" size="small" style="width: 300px">
|
|
|
303
|
+ <el-option
|
|
|
304
|
+ v-for="item in options"
|
|
|
305
|
+ :key="item.value"
|
|
|
306
|
+ :label="item.label"
|
|
|
307
|
+ :value="item.value">
|
|
|
308
|
+ </el-option>
|
|
|
309
|
+ </el-select>
|
|
|
310
|
+ </el-form-item>
|
|
|
311
|
+ </el-col>
|
|
|
312
|
+ <el-col :span="8">
|
|
|
313
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="ietype">
|
|
|
314
|
+ <el-select v-model="addForm.ietype" placeholder="出入库类型" size="mini" style="width: 300px">
|
|
|
315
|
+ <el-option label="出入库类型-进" value="I"></el-option>
|
|
|
316
|
+ <el-option label="出入库类型-出" value="E"></el-option>
|
|
|
317
|
+ </el-select>
|
|
|
318
|
+ </el-form-item>
|
|
|
319
|
+ </el-col>
|
|
|
320
|
+ <el-col :span="8">
|
|
|
321
|
+ <!-- <el-form-item label="" :label-width="formLabelWidth" prop="status">-->
|
|
|
322
|
+ <!-- <el-input v-model="addForm.status" autocomplete="off" size="small" style="width: 300px">-->
|
|
|
323
|
+ <!-- <template slot="prepend">状  态</template>-->
|
|
|
324
|
+ <!-- </el-input>-->
|
|
|
325
|
+ <!-- </el-form-item>-->
|
|
|
326
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="status">
|
|
|
327
|
+ <el-select v-model="addForm.status" placeholder="请选择状态" size="mini" style="width: 300px">
|
|
|
328
|
+ <el-option label="状态-失败" value="0"></el-option>
|
|
|
329
|
+ <el-option label="状态-成功" value="1"></el-option>
|
|
|
330
|
+ </el-select>
|
|
|
331
|
+ </el-form-item>
|
|
|
332
|
+ </el-col>
|
|
|
333
|
+ </el-row>
|
|
|
334
|
+ <el-row>
|
|
|
335
|
+ <el-col :span="7">
|
|
|
336
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="custel">
|
|
|
337
|
+ <el-input v-model="addForm.custel" autocomplete="off" size="small" style="width: 300px">
|
|
|
338
|
+ <template slot="prepend">出入库客户联系电话</template>
|
|
|
339
|
+ </el-input>
|
|
|
340
|
+ </el-form-item>
|
|
|
341
|
+ </el-col>
|
|
|
342
|
+ <el-col :span="10">
|
|
|
343
|
+ <el-form-item label="" :label-width="formLabelWidth" prop="customer">
|
|
|
344
|
+ <el-input v-model="addForm.customer" autocomplete="off" size="small" style="width: 300px">
|
|
|
345
|
+ <template slot="prepend">出入库客户联系人姓名</template>
|
|
|
346
|
+ </el-input>
|
|
|
347
|
+ </el-form-item>
|
|
|
348
|
+ </el-col>
|
|
|
349
|
+ </el-row>
|
|
|
350
|
+ </el-form>
|
|
|
351
|
+ <div slot="footer" class="dialog-footer">
|
|
|
352
|
+ <el-button @click="apply_dialog.addDialog = false" size="small">取 消</el-button>
|
|
|
353
|
+ <el-button type="primary" @click="dialogApply==='create'?add():edit()" size="small">提 交</el-button>
|
|
|
354
|
+ </div>
|
|
|
355
|
+ </el-dialog>
|
|
|
356
|
+ </el-row>
|
|
|
357
|
+ </el-card>
|
|
|
358
|
+ </el-row>
|
|
|
359
|
+</template>
|
|
|
360
|
+
|
|
|
361
|
+<script>
|
|
|
362
|
+ import {selectInventroyrecords,delInventoryrecord,addInventoryrecord,ediInventroyrecord} from '../../api/consigner/station';
|
|
|
363
|
+
|
|
|
364
|
+ export default {
|
|
|
365
|
+ name: "inventroyrecord",
|
|
|
366
|
+ data() {
|
|
|
367
|
+ return {
|
|
|
368
|
+ queryInfo: {
|
|
|
369
|
+ waybill:'',
|
|
|
370
|
+ // 当前页数
|
|
|
371
|
+ pageNum: 1,
|
|
|
372
|
+ // 每页大小
|
|
|
373
|
+ pageSize: 10,
|
|
|
374
|
+ },
|
|
|
375
|
+ total: 0,
|
|
|
376
|
+ tableData:[],
|
|
|
377
|
+ dialogMap: {
|
|
|
378
|
+ update: '编辑',
|
|
|
379
|
+ create: '新增'
|
|
|
380
|
+ },
|
|
|
381
|
+ dialogApply: 'create',
|
|
|
382
|
+ apply_dialog: {
|
|
|
383
|
+ // 添加对话框
|
|
|
384
|
+ addDialog: false,
|
|
|
385
|
+ // 编辑对话框
|
|
|
386
|
+ editDialog: false
|
|
|
387
|
+ },
|
|
|
388
|
+ addForm: {
|
|
|
389
|
+ area: '',
|
|
|
390
|
+ billweight: '',
|
|
|
391
|
+ custel: '',
|
|
|
392
|
+ customer: '',
|
|
|
393
|
+ customername: '',
|
|
|
394
|
+ goodstype: '',
|
|
|
395
|
+ house:'',
|
|
|
396
|
+ ietype:'',
|
|
|
397
|
+ location:'',
|
|
|
398
|
+ opter:'',
|
|
|
399
|
+ opttime: '',
|
|
|
400
|
+ pcs: '',
|
|
|
401
|
+ serialnumber: '',
|
|
|
402
|
+ station: '',
|
|
|
403
|
+ status: '',
|
|
|
404
|
+ transcar: '',
|
|
|
405
|
+ transtype:'',
|
|
|
406
|
+ vol:'',
|
|
|
407
|
+ waybill:'',
|
|
|
408
|
+ weight:'',
|
|
|
409
|
+ remark:'',
|
|
|
410
|
+ remark1:'',
|
|
|
411
|
+ remark2:'',
|
|
|
412
|
+ remark3:'',
|
|
|
413
|
+ remark4:'',
|
|
|
414
|
+ remark5:'',
|
|
|
415
|
+ },
|
|
|
416
|
+ options: [{
|
|
|
417
|
+ value: '板箱',
|
|
|
418
|
+ label: '货物类型-板箱'
|
|
|
419
|
+ }, {
|
|
|
420
|
+ value: '运单',
|
|
|
421
|
+ label: '货物类型-运单'
|
|
|
422
|
+ }, {
|
|
|
423
|
+ value: '托盘',
|
|
|
424
|
+ label: '货物类型-托盘'
|
|
|
425
|
+ }],
|
|
|
426
|
+ options1: [{
|
|
|
427
|
+ value: '采购入库',
|
|
|
428
|
+ label: '交易类型-采购入库'
|
|
|
429
|
+ }, {
|
|
|
430
|
+ value: '生产入库',
|
|
|
431
|
+ label: '交易类型-生产入库'
|
|
|
432
|
+ }, {
|
|
|
433
|
+ value: '销售入库',
|
|
|
434
|
+ label: '交易类型-销售入库'
|
|
|
435
|
+ }],
|
|
|
436
|
+ formLabelWidth: '80px',
|
|
|
437
|
+ rules: {
|
|
|
438
|
+ userName: [
|
|
|
439
|
+ // { required: true, message: '请输入申请人', trigger: 'blur' },
|
|
|
440
|
+ // // { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
|
|
|
441
|
+ // ],
|
|
|
442
|
+ // applyTime: [
|
|
|
443
|
+ // { required: true, message: '请选择时间', trigger: 'change' }
|
|
|
444
|
+ // ],
|
|
|
445
|
+ // needCount: [
|
|
|
446
|
+ // { required: true, message: '请输入需要车辆数量', trigger: 'blur' },
|
|
|
447
|
+ // ],
|
|
|
448
|
+ // orginStation: [
|
|
|
449
|
+ // { required: true, message: '请输入起始场站', trigger: 'blur' },
|
|
|
450
|
+ // ],
|
|
|
451
|
+ // endStation: [
|
|
|
452
|
+ // { required: true, message: '请输入目的场站', trigger: 'blur' },
|
|
|
453
|
+ // ],
|
|
|
454
|
+ ],
|
|
|
455
|
+ },
|
|
|
456
|
+ }
|
|
|
457
|
+ },
|
|
|
458
|
+ methods: {
|
|
|
459
|
+ handleSizeChange(val) {
|
|
|
460
|
+ this.queryInfo.pageSize = val
|
|
|
461
|
+ this.getList()
|
|
|
462
|
+ },
|
|
|
463
|
+ handleCurrentChange(val) {
|
|
|
464
|
+ this.queryInfo.pageNum = val
|
|
|
465
|
+ this.getList()
|
|
|
466
|
+ },
|
|
|
467
|
+ getList() {
|
|
|
468
|
+ const _this = this
|
|
|
469
|
+ selectInventroyrecords(this.queryInfo).then((response) => {
|
|
|
470
|
+ const res = response.data
|
|
|
471
|
+ console.log(response.data)
|
|
|
472
|
+ if (res.code !== '200') {
|
|
|
473
|
+ return _this.$message.error('获取消息收发记录,失败!')
|
|
|
474
|
+ }
|
|
|
475
|
+ // 获取列表数据
|
|
|
476
|
+ _this.tableData = res.data.list
|
|
|
477
|
+ // 获取列表的总记录数
|
|
|
478
|
+ _this.total = res.data.total
|
|
|
479
|
+ _this.$message.success('获取消息收发记录,成功!')
|
|
|
480
|
+ }).catch(error => {
|
|
|
481
|
+ // 关闭加载
|
|
|
482
|
+ _this.$message.error(error.toString())
|
|
|
483
|
+ })
|
|
|
484
|
+ },
|
|
|
485
|
+ // 添加对话框,打开事件
|
|
|
486
|
+ applyAdd() {
|
|
|
487
|
+ this.addForm = {
|
|
|
488
|
+ area: '',
|
|
|
489
|
+ billweight: '',
|
|
|
490
|
+ custel: '',
|
|
|
491
|
+ customer: '',
|
|
|
492
|
+ customername: '',
|
|
|
493
|
+ goodstype: '',
|
|
|
494
|
+ house:'',
|
|
|
495
|
+ ietype:'',
|
|
|
496
|
+ location:'',
|
|
|
497
|
+ opter:'',
|
|
|
498
|
+ opttime: '',
|
|
|
499
|
+ pcs: '',
|
|
|
500
|
+ serialnumber: '',
|
|
|
501
|
+ station: '',
|
|
|
502
|
+ status: '',
|
|
|
503
|
+ transcar: '',
|
|
|
504
|
+ transtype:'',
|
|
|
505
|
+ vol:'',
|
|
|
506
|
+ waybill:'',
|
|
|
507
|
+ weight:'',
|
|
|
508
|
+ remark:'',
|
|
|
509
|
+ remark1:'',
|
|
|
510
|
+ remark2:'',
|
|
|
511
|
+ remark3:'',
|
|
|
512
|
+ remark4:'',
|
|
|
513
|
+ remark5:'',
|
|
|
514
|
+ uuid:''
|
|
|
515
|
+ };
|
|
|
516
|
+ this.dialogApply= 'create';
|
|
|
517
|
+ this.apply_dialog.addDialog = true;
|
|
|
518
|
+ },
|
|
|
519
|
+ // 添加功能
|
|
|
520
|
+ add() {
|
|
|
521
|
+ this.$refs.addForm.validate(valid => {
|
|
|
522
|
+ // 未通过,表单预校验
|
|
|
523
|
+ if (!valid) return;
|
|
|
524
|
+ addInventoryrecord(this.addForm).then((response) => {
|
|
|
525
|
+ let res = response.data;
|
|
|
526
|
+ // 添加失败
|
|
|
527
|
+ if (res.code !== '200') {
|
|
|
528
|
+ return this.$message.error(res.msg);
|
|
|
529
|
+ }
|
|
|
530
|
+ // 添加,成功
|
|
|
531
|
+ this.$message.success(res.msg);
|
|
|
532
|
+ // 隐藏对话框
|
|
|
533
|
+ this.apply_dialog.addDialog = false;
|
|
|
534
|
+ // 刷新列表
|
|
|
535
|
+ this.getList();
|
|
|
536
|
+ }).catch(error => {
|
|
|
537
|
+ this.$message.error(error.toString());
|
|
|
538
|
+ });
|
|
|
539
|
+ })
|
|
|
540
|
+ },
|
|
|
541
|
+// 打开编辑
|
|
|
542
|
+ applyEdit(row) {
|
|
|
543
|
+ this.apply_dialog.addDialog = true;
|
|
|
544
|
+ this.dialogApply = 'update';
|
|
|
545
|
+ this.addForm=row;
|
|
|
546
|
+ },
|
|
|
547
|
+ // 编辑功能
|
|
|
548
|
+ edit() {
|
|
|
549
|
+ // 进行表单的预验证
|
|
|
550
|
+ this.$refs.addForm.validate(valid => {
|
|
|
551
|
+ // 未通过,表单预校验
|
|
|
552
|
+ if (!valid) return
|
|
|
553
|
+ ediInventroyrecord(this.addForm).then((response) => {
|
|
|
554
|
+ // console.log(row)
|
|
|
555
|
+ const res = response.data
|
|
|
556
|
+ if (res.code != '200') {
|
|
|
557
|
+ return this.$message.error(res.msg)
|
|
|
558
|
+ }
|
|
|
559
|
+ this.$message.success(res.msg)
|
|
|
560
|
+ // 隐藏对话框
|
|
|
561
|
+ this.apply_dialog.addDialog = false
|
|
|
562
|
+ // 刷新列表
|
|
|
563
|
+ this.getList()
|
|
|
564
|
+ }).catch(error => {
|
|
|
565
|
+ this.$message.error(error.toString())
|
|
|
566
|
+ })
|
|
|
567
|
+ })
|
|
|
568
|
+ },
|
|
|
569
|
+ // 删除
|
|
|
570
|
+ applyDel(index, row) {
|
|
|
571
|
+ // 弹框询问是否删除?
|
|
|
572
|
+ this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', {
|
|
|
573
|
+ confirmButtonText: '确定删除',
|
|
|
574
|
+ cancelButtonText: '取消',
|
|
|
575
|
+ type: 'warning'
|
|
|
576
|
+ }
|
|
|
577
|
+ ).then(() => {
|
|
|
578
|
+ // console.log(row);
|
|
|
579
|
+ delInventoryrecord({uuid:row.uuid}).then((response) => {
|
|
|
580
|
+ // console.log(row)
|
|
|
581
|
+ const res = response.data
|
|
|
582
|
+ this.$message.success(res.msg)
|
|
|
583
|
+ this.getList()
|
|
|
584
|
+ }).catch(error => {
|
|
|
585
|
+ this.$message.error(res.msg)
|
|
|
586
|
+ })
|
|
|
587
|
+ }).catch(() => {
|
|
|
588
|
+ })
|
|
|
589
|
+ },
|
|
|
590
|
+ },
|
|
|
591
|
+ mounted() {
|
|
|
592
|
+ this.getList();
|
|
|
593
|
+ // this.getYardList();
|
|
|
594
|
+
|
|
|
595
|
+ }
|
|
|
596
|
+
|
|
|
597
|
+ }
|
|
|
598
|
+</script>
|
|
|
599
|
+
|
|
|
600
|
+<style scoped>
|
|
|
601
|
+ .toolbar{
|
|
|
602
|
+ height: 60px;
|
|
|
603
|
+ background-color: white;
|
|
|
604
|
+ /*line-height: 60px;*/
|
|
|
605
|
+ vertical-align: middle;
|
|
|
606
|
+ border-radius: 5px 5px 5px 5px;
|
|
|
607
|
+ padding: 15px 0 0 20px;
|
|
|
608
|
+ box-shadow: 0px 5px 5px #e5e8eb;
|
|
|
609
|
+ }
|
|
|
610
|
+</style>
|
|
|
611
|
+ |