|
@@ -2,7 +2,7 @@
|
|
|
<div class="app-container">
|
|
|
<h1><i class="el-icon-arrow-left" @click="goBack"></i>批次入库</h1>
|
|
|
<div class="top-info">
|
|
|
- 共计电池 <span>1864</span>,未入库电池 <span>200</span>批次号: 录入时间:
|
|
|
+ 共计电池 <span>{{totalData}}</span>,未入库电池 <span>200</span>批次号: 录入时间:
|
|
|
</div>
|
|
|
<el-form :inline="true" :model="listQuery" @keyup.enter.native="handleFilter()">
|
|
|
<el-row style="float: right;">
|
|
@@ -30,37 +30,37 @@
|
|
|
|
|
|
<el-table-column label="电池SN">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.intime }}
|
|
|
+ {{ scope.row.sn }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="设备号IMEI">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.code }}
|
|
|
+ {{ scope.row.imei }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="电池类型">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.total}}
|
|
|
+ {{ scope.row.typeTitle}}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="PACK厂">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.dt }}
|
|
|
+ {{ scope.row.packTitle }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="产品规格" prop="model" width="80">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.into }}
|
|
|
+ {{ scope.row.packTitle }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="产品拓展">
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.create }}
|
|
|
+ {{ scope.row.expandTitle }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
@@ -72,13 +72,13 @@
|
|
|
|
|
|
<el-table-column align="center" prop="updateTime" label="发货时间">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.to }}</span>
|
|
|
+ <span>{{ scope.row.deliverTime }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column align="center" prop="updateTime" label="入库时间">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{ scope.row.to }}</span>
|
|
|
+ <span>{{ scope.row.addTime }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -91,7 +91,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { postJson, getSort } from '@/api/page'
|
|
|
+import { batchStorageList, batchStorageAdd } from '@/api/device/storage'
|
|
|
import Create from '@/views/device/storage/create.vue'
|
|
|
|
|
|
export default {
|
|
@@ -111,13 +111,27 @@ export default {
|
|
|
importance: undefined,
|
|
|
title: undefined,
|
|
|
type: undefined,
|
|
|
- sort: '+id'
|
|
|
+ sort: '+id',
|
|
|
+ batchName: ''
|
|
|
},
|
|
|
/**批量选中的数据列表 */
|
|
|
multipleSelection: [],
|
|
|
+ //总电池数量
|
|
|
+ totalData: 0,
|
|
|
+ //已入库电池
|
|
|
+ storage: 0
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
+ if (this.$route.query.batchId !== undefined) {
|
|
|
+ this.listQuery.batchName = this.$route.query.batchId
|
|
|
+ }
|
|
|
+ if (this.$route.query.total !== undefined) {
|
|
|
+ this.totalData = this.$route.query.total
|
|
|
+ }
|
|
|
+ if (this.$route.query.storage !== undefined) {
|
|
|
+ this.storage = this.$route.query.storage
|
|
|
+ }
|
|
|
this.getDataList()
|
|
|
},
|
|
|
methods: {
|
|
@@ -128,7 +142,17 @@ export default {
|
|
|
},
|
|
|
/**请求列表数据 */
|
|
|
getDataList() {
|
|
|
-
|
|
|
+ this.loading = true
|
|
|
+ batchStorageList(this.listQuery).then(response => {
|
|
|
+ if (response.code === 200) {
|
|
|
+ this.data = response.data
|
|
|
+ this.total = response.total
|
|
|
+ this.loading = false
|
|
|
+ } else {
|
|
|
+ this.loading = false
|
|
|
+ return this.$message.error(response.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
// 分页, 每页条数
|
|
|
pageSizeChangeHandle (val) {
|
|
@@ -152,30 +176,13 @@ export default {
|
|
|
return row.disabled === false
|
|
|
},
|
|
|
|
|
|
- fetchData() {
|
|
|
- this.page.loading = false
|
|
|
- postJson('/api/v1/carinfo/pageQuery', this.page.param).then(response => {
|
|
|
- if (response.code === 200) {
|
|
|
- this.page.data = response.data
|
|
|
- this.page.total = response.total
|
|
|
- this.page.loading = false
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
-
|
|
|
- del(val) {
|
|
|
- this.$confirm('此操作将删除该数据, 是否继续?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- postJson('/api/v1/carinfo/delete', { id: val }).then(response => {
|
|
|
- if (response.code === 200) {
|
|
|
- this.fetchData()
|
|
|
- }
|
|
|
- })
|
|
|
+ //批量新增电池
|
|
|
+ cerateHandle: debounce(function () {
|
|
|
+ if(this.multipleSelection.length === 0) return this.$message.warning("请选择电池")
|
|
|
+ batchStorageAdd().then(res => {
|
|
|
+
|
|
|
})
|
|
|
- }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|