no message
parent
0c06eb3381
commit
35f64249f4
|
|
@ -23,7 +23,7 @@
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.stockTypeCode"
|
v-model="query.stockType"
|
||||||
clearable
|
clearable
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="容器类型"
|
placeholder="容器类型"
|
||||||
|
|
@ -32,10 +32,10 @@
|
||||||
@change="crud.toQuery"
|
@change="crud.toQuery"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stockTypes"
|
v-for="item in dict.stock_type"
|
||||||
:key="item.code"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.label"
|
||||||
:value="item.code"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
|
|
@ -83,10 +83,10 @@
|
||||||
<el-form-item label="类型" prop="stockType">
|
<el-form-item label="类型" prop="stockType">
|
||||||
<el-select v-model="form.stockType" value-key="id" filterable placeholder="请选择" style="width: 180px;">
|
<el-select v-model="form.stockType" value-key="id" filterable placeholder="请选择" style="width: 180px;">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stockTypes"
|
v-for="item in dict.stock_type"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.label"
|
||||||
:value="item"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -132,7 +132,7 @@
|
||||||
<el-table-column prop="code" label="代码"/>
|
<el-table-column prop="code" label="代码"/>
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="stockType" label="类型">
|
<el-table-column :show-overflow-tooltip="true" prop="stockType" label="类型">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div>{{ scope.row.stockType.name }}</div>
|
<div>{{ scope.row.stockType }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="area" label="状态">
|
<el-table-column :show-overflow-tooltip="true" prop="area" label="状态">
|
||||||
|
|
@ -189,12 +189,11 @@
|
||||||
<script>
|
<script>
|
||||||
import crudStock from '@/api/stock'
|
import crudStock from '@/api/stock'
|
||||||
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
import CRUD, {presenter, header, form, crud} from '@crud/crud'
|
||||||
import {queryPointList, updatePointOk} from "@/api/point";
|
import {queryPointList} from "@/api/point";
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import {getStockTypes} from '@/api/stockType'
|
|
||||||
import DonMessage from "@/utils/message";
|
import DonMessage from "@/utils/message";
|
||||||
import {getToken} from "@/utils/auth";
|
import {getToken} from "@/utils/auth";
|
||||||
import {getAres} from "@/api/area";
|
import {getAres} from "@/api/area";
|
||||||
|
|
@ -233,7 +232,7 @@ export default {
|
||||||
name: 'Stock',
|
name: 'Stock',
|
||||||
components: {CallContainer, ReturnContainer, ContainerIn, pagination, crudOperation, rrOperation, udOperation},
|
components: {CallContainer, ReturnContainer, ContainerIn, pagination, crudOperation, rrOperation, udOperation},
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
dicts: ['base_staus', 'use_status'],
|
dicts: ['base_staus', 'use_status', 'stock_type'],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: '容器', url: 'api/stock', idField: 'id', sort: 'id,desc', crudMethod: {...crudStock},
|
title: '容器', url: 'api/stock', idField: 'id', sort: 'id,desc', crudMethod: {...crudStock},
|
||||||
|
|
@ -252,7 +251,6 @@ export default {
|
||||||
//地标点数据
|
//地标点数据
|
||||||
fileList: [],
|
fileList: [],
|
||||||
areas: [],
|
areas: [],
|
||||||
pointListData: [],
|
|
||||||
ContainerIn: {
|
ContainerIn: {
|
||||||
containerCode: '',
|
containerCode: '',
|
||||||
position: ''
|
position: ''
|
||||||
|
|
@ -263,7 +261,6 @@ export default {
|
||||||
edit: ['admin', 'stock:edit'],
|
edit: ['admin', 'stock:edit'],
|
||||||
del: ['admin', 'stock:del']
|
del: ['admin', 'stock:del']
|
||||||
},
|
},
|
||||||
stockTypes: [],
|
|
||||||
rules: {
|
rules: {
|
||||||
id: [
|
id: [
|
||||||
{required: true, message: '容器ID不能为空', trigger: 'blur'}
|
{required: true, message: '容器ID不能为空', trigger: 'blur'}
|
||||||
|
|
@ -279,14 +276,11 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getArea();
|
this.getArea();
|
||||||
this.getStockType();
|
|
||||||
//获取点位表的数据
|
|
||||||
this.getPointListData();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSuccess(response, file, fileList, crud) {
|
handleSuccess(response, file, fileList, crud) {
|
||||||
let myError = response.toString();//转字符串
|
let myError = response.toString();//转字符串
|
||||||
DonMessage.success("" + response['message'])
|
this.crud.notify(response['message'], CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
crud.toQuery()
|
crud.toQuery()
|
||||||
},
|
},
|
||||||
handleErr(err, file, fileList) {
|
handleErr(err, file, fileList) {
|
||||||
|
|
@ -294,35 +288,12 @@ export default {
|
||||||
let myError = err.toString();//转字符串
|
let myError = err.toString();//转字符串
|
||||||
myError = myError.replace("Error: ", "") // 去掉前面的" Error: "
|
myError = myError.replace("Error: ", "") // 去掉前面的" Error: "
|
||||||
myError = JSON.parse(myError);//转对象
|
myError = JSON.parse(myError);//转对象
|
||||||
|
this.crud.notify(myError['message'], CRUD.NOTIFICATION_TYPE.ERROR)
|
||||||
DonMessage.error("" + myError['message'])
|
|
||||||
},
|
},
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
getStockType() {
|
|
||||||
getStockTypes({}).then(res => {
|
|
||||||
this.stockTypes = res.content.map(function (obj) {
|
|
||||||
if (obj.hasChildren) {
|
|
||||||
obj.children = null
|
|
||||||
}
|
|
||||||
return obj
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
//获取点位表的数据
|
|
||||||
getPointListData() {
|
|
||||||
queryPointList().then(res => {
|
|
||||||
for (const re of res) {
|
|
||||||
if (re.status === "FREE" && re.area.name === "轴承座空车区") {
|
|
||||||
this.pointListData.push(re);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).catch(e => {
|
|
||||||
DonMessage.error("点位表数据获取失败")
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// 改变状态
|
// 改变状态
|
||||||
changeEnabled(data, val) {
|
changeEnabled(data, val) {
|
||||||
this.$confirm('此操作将 "' + this.dict.label.base_staus[val] + '" ' + data.code + ', 是否继续?', '提示', {
|
this.$confirm('此操作将 "' + this.dict.label.base_staus[val] + '" ' + data.code + ', 是否继续?', '提示', {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue