|
@@ -0,0 +1,107 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="app-container">
|
|
|
|
+ <!-- 查询 -->
|
|
|
|
+ <div class="filter-container">
|
|
|
|
+ <el-select v-model="queryForm.securitiesId" class="filter-item" placeholder="品名" filterable clearable>
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in securitiesOpt"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ />
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">查 询</el-button>
|
|
|
|
+ <el-button class="filter-item" type="primary" icon="el-icon-refresh" @click="resetQuery">重 置</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 功能 -->
|
|
|
|
+ <div class="filter-container">
|
|
|
|
+ <el-button class="filter-item" type="success" icon="el-icon-plus" @click="handleAdd()">新 增</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 大屏数据管理表列表 -->
|
|
|
|
+ <el-table v-loading="listLoading" row-key="id" :data="tableData" border stripe fit highlight-current-row>
|
|
|
|
+ <el-table-column type="selection" align="center" prop="id" />
|
|
|
|
+ <el-table-column label="NO" prop="id" align="center" width="40" type="index" />
|
|
|
|
+ <el-table-column label="产品名称" align="center" prop="securities" />
|
|
|
|
+ <el-table-column label="位置" align="center" prop="wareCn" />
|
|
|
|
+ <el-table-column label="当前库存(箱)" align="center" prop="qty" />
|
|
|
|
+ <el-table-column label="今日入库(箱)" align="center" prop="dayInQty" />
|
|
|
|
+ <el-table-column label="今日出库(箱)" align="center" prop="dayOutQty" />
|
|
|
|
+ <el-table-column label="状态" min-width="40" align="center">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <el-tag
|
|
|
|
+ style="cursor: pointer"
|
|
|
|
+ :type="row.status | statusFilter"
|
|
|
|
+ @click="handleStatus(row)"
|
|
|
|
+ >
|
|
|
|
+ {{ $commonArray.methods.getArrayVal('statusOpt', row.status) }}
|
|
|
|
+ </el-tag>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" align="center">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <el-link type="primary" :underline="false" @click="handleUpdate(row)">编辑</el-link>
|
|
|
|
+ <el-divider direction="vertical" />
|
|
|
|
+ <el-link type="primary" :underline="false" @click="handleDelete(row)">删除</el-link>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <!-- 分页 -->
|
|
|
|
+ <pagination v-show="pageTotal>0" :total="pageTotal" :page.sync="page" :limit.sync="rows" @pagination="getList" />
|
|
|
|
+ <!-- 新增/编辑 -->
|
|
|
|
+ <Edit
|
|
|
|
+ v-if="editShow"
|
|
|
|
+ ref="edit"
|
|
|
|
+ :edit-show="editShow"
|
|
|
|
+ :edit-type="editType"
|
|
|
|
+ :edit-id="editId"
|
|
|
|
+ :securities-opt="securitiesOpt"
|
|
|
|
+ :ware-opt="wareOpt"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+import { pageScreenData, delScreenData, statusScreenData } from '@/api/workshop/screenData'
|
|
|
|
+import Edit from './components/edit'
|
|
|
|
+import Pagination from '@/components/Pagination'
|
|
|
|
+import Mixin from '@/utils/mixin.js'
|
|
|
|
+import Dictionaries from '@/utils/dictionaries.js'
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ name: 'ScreenData',
|
|
|
|
+ components: { Pagination, Edit },
|
|
|
|
+ filters: {
|
|
|
|
+ statusFilter(status) {
|
|
|
|
+ const statusMap = {
|
|
|
|
+ 1: 'success',
|
|
|
|
+ 2: 'danger',
|
|
|
|
+ 3: 'info',
|
|
|
|
+ 0: 'danger'
|
|
|
|
+ }
|
|
|
|
+ return statusMap[status]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ mixins: [Mixin, Dictionaries],
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ listApi: pageScreenData, // 列表
|
|
|
|
+ delApi: delScreenData, // 删除
|
|
|
|
+ statusApi: statusScreenData, // 状态
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.getDictOptList('wareOpt') // 总库选项
|
|
|
|
+ this.listSecuritiesOpt() // 品名选项
|
|
|
|
+ this.getPageList()
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ // methods-end
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
+
|
|
|
|
+</style>
|