|
@@ -51,17 +51,21 @@
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="设备SN">
|
|
|
- <el-input v-model="listQuery.type" placeholder="请输入设备SN" clearable></el-input>
|
|
|
+ <el-input v-model="listQuery.sn" placeholder="请输入设备SN" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="设备类型">
|
|
|
- <el-input v-model="listQuery.type" placeholder="请选择" clearable></el-input>
|
|
|
+ <el-select v-model="listQuery.type">
|
|
|
+ <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="电池类型">
|
|
|
- <el-input v-model="listQuery.type" placeholder="请选择" clearable></el-input>
|
|
|
+ <el-form-item label="状态">
|
|
|
+ <el-select v-model="listQuery.status">
|
|
|
+ <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.label" :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
@@ -75,36 +79,18 @@
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="客户">
|
|
|
- <el-input v-model="listQuery.type" placeholder="请输入设备SN" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="用途">
|
|
|
- <el-input v-model="listQuery.type" placeholder="请选择" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="状态">
|
|
|
- <el-input v-model="listQuery.type" placeholder="请选择" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
</el-form>
|
|
|
|
|
|
<el-table
|
|
|
- v-loading="page.loading"
|
|
|
- :data="page.data"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="data"
|
|
|
element-loading-text="Loading"
|
|
|
:header-cell-style="{background:'rgba(242, 242, 242, 1)',borderColor:'rgba(242, 242, 242, 1);',textAlign:'center'}"
|
|
|
:cell-style="{'text-align':'center'}"
|
|
|
fit
|
|
|
highlight-current-row
|
|
|
- @sort-change="sortChange"
|
|
|
>
|
|
|
- <el-table-column label="设备SN" sortable="custom">
|
|
|
+ <el-table-column label="设备SN">
|
|
|
<template slot-scope="scope">
|
|
|
{{ scope.row.intime }}
|
|
|
</template>
|
|
@@ -153,7 +139,7 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
- <el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.limit" :total="listQuery.total"
|
|
|
+ <el-pagination style="float: right; margin-top: 30px;" :current-page="listQuery.index" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.length" :total="total"
|
|
|
layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
|
|
|
@current-change="pageCurrentChangeHandle">
|
|
|
</el-pagination>
|
|
@@ -169,65 +155,42 @@ export default {
|
|
|
components: { },
|
|
|
data() {
|
|
|
return {
|
|
|
- page: {
|
|
|
- loading: false,
|
|
|
- data: [
|
|
|
- {code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
|
|
|
- {code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
|
|
|
- {code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
|
|
|
- {code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'}
|
|
|
- ],
|
|
|
- param: {
|
|
|
- index: 1,
|
|
|
- length: 10,
|
|
|
- sort: 'updateTime desc',
|
|
|
- plateNumber: ''
|
|
|
- }
|
|
|
- },
|
|
|
+ //表格加载动画
|
|
|
+ loading: false,
|
|
|
+ //列表数据
|
|
|
+ data: [
|
|
|
+ {code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
|
|
|
+ {code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
|
|
|
+ {code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'},
|
|
|
+ {code: 'SZRLCG20210001', total: 100, type: '二轮车', dt: '美顺', into: 0, create: '张三', address: '北京', to: '2021-05-18', intime: '2021-05-18 13:13:32',id: 'asdasdas'}
|
|
|
+ ],
|
|
|
/**查询条件对象 */
|
|
|
listQuery: {
|
|
|
- page: 1,
|
|
|
- limit: 20,
|
|
|
- total: 3,
|
|
|
+ index: 1,
|
|
|
+ length: 20,
|
|
|
importance: undefined,
|
|
|
- title: undefined,
|
|
|
- type: undefined,
|
|
|
- sort: '+id'
|
|
|
- },
|
|
|
- /**是否显示新增弹窗 */
|
|
|
- addVisible: false,
|
|
|
- /**新增form表单字段 */
|
|
|
- dataForm: {
|
|
|
- id: '',
|
|
|
- owner: '',
|
|
|
- email: '',
|
|
|
- phone: '',
|
|
|
- lossItem: '',
|
|
|
- description: '',
|
|
|
- lossLocation: '',
|
|
|
- lossDatetime: '',
|
|
|
- itemValues: '1',
|
|
|
- remark: '',
|
|
|
- status: null,
|
|
|
- isScreen: '',
|
|
|
- screenContent: '',
|
|
|
- creator: '',
|
|
|
- createDate: '',
|
|
|
- updater: '',
|
|
|
- updateDate: '',
|
|
|
- contactFlag: null,
|
|
|
- handleType: null,
|
|
|
- contactWay: '',
|
|
|
- todo: null
|
|
|
- },
|
|
|
- /**时间禁用 */
|
|
|
- pickerOption: {
|
|
|
- disabledDate: (time) => {
|
|
|
- let nowData = new Date()
|
|
|
- nowData = new Date(nowData.setDate(nowData.getDate()))
|
|
|
- return time > nowData
|
|
|
- }
|
|
|
+ sn: '',
|
|
|
+ type: null,
|
|
|
+ sort: '',
|
|
|
+ status: null
|
|
|
},
|
|
|
+ total: 3,
|
|
|
+ //产品类型
|
|
|
+ typeOptions: [
|
|
|
+ {label: '全部', value: null},
|
|
|
+ {label: '电池', value: 1},
|
|
|
+ {label: '电动车', value: 2},
|
|
|
+ {label: '配件', value: 3}
|
|
|
+ ],
|
|
|
+ statusOptions: [
|
|
|
+ {label: '全部', value: null},
|
|
|
+ {label: '已录入', value: 1},
|
|
|
+ {label: '已入库', value: 2},
|
|
|
+ {label: '已调拨', value: 3},
|
|
|
+ {label: '已出库', value: 4},
|
|
|
+ {label: '已处置', value: 5},
|
|
|
+ {label: '已调回', value: 6}
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -253,14 +216,6 @@ export default {
|
|
|
// this.fetchData()
|
|
|
},
|
|
|
|
|
|
- //打开新增弹窗
|
|
|
- cerateHandle() {
|
|
|
- this.addVisible = true
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.create.init()
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
/**跳转详情页面 */
|
|
|
gotoDetailsHandle(id) {
|
|
|
this.$router.push({
|
|
@@ -271,8 +226,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- dataFormSubmitHandle() {},
|
|
|
-
|
|
|
search() {
|
|
|
this.page.param.index = 1
|
|
|
// this.fetchData()
|