|
@@ -18,23 +18,11 @@
|
|
|
>
|
|
>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template v-slot:type="{ row }">
|
|
|
|
|
- <el-tag
|
|
|
|
|
- :type="
|
|
|
|
|
- row.type == '0' ? 'danger' : row.type == '1' ? '' : 'success'
|
|
|
|
|
- "
|
|
|
|
|
- effect="dark"
|
|
|
|
|
- >{{
|
|
|
|
|
- row.type == '0'
|
|
|
|
|
- ? '未领料'
|
|
|
|
|
- : row.type == '1'
|
|
|
|
|
- ? '领料中'
|
|
|
|
|
- : row.type == '2'
|
|
|
|
|
- ? '已出库'
|
|
|
|
|
- : ''
|
|
|
|
|
- }}</el-tag
|
|
|
|
|
- >
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <template v-slot:scene="{ row }">
|
|
|
|
|
+ {{ row.scene }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
|
|
|
<template v-slot:action="{ row }">
|
|
<template v-slot:action="{ row }">
|
|
|
<el-button type="text" size="mini" @click="handDetailed(row)"
|
|
<el-button type="text" size="mini" @click="handDetailed(row)"
|
|
@@ -44,7 +32,7 @@
|
|
|
</ele-pro-table>
|
|
</ele-pro-table>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
|
|
- <returnPop v-if="returnShow" @close="close"></returnPop>
|
|
|
|
|
|
|
+ <returnPop v-if="returnShow" @close="close" :sceneList="sceneList"></returnPop>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -54,6 +42,7 @@
|
|
|
import returnSearch from './components/return-search.vue';
|
|
import returnSearch from './components/return-search.vue';
|
|
|
|
|
|
|
|
import returnPop from './components/returnPop.vue';
|
|
import returnPop from './components/returnPop.vue';
|
|
|
|
|
+ import { getByCode } from '@/api/system/dictionary-data';
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -66,28 +55,21 @@
|
|
|
loading: false,
|
|
loading: false,
|
|
|
selection: [],
|
|
selection: [],
|
|
|
|
|
|
|
|
- returnShow: false
|
|
|
|
|
|
|
+ returnShow: false,
|
|
|
|
|
+
|
|
|
|
|
+ sceneList: [],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
columns() {
|
|
columns() {
|
|
|
return [
|
|
return [
|
|
|
|
|
|
|
|
- {
|
|
|
|
|
- width: 45,
|
|
|
|
|
- type: 'selection',
|
|
|
|
|
- columnKey: 'selection',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- reserveSelection: true,
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
{
|
|
{
|
|
|
prop: 'code',
|
|
prop: 'code',
|
|
|
label: '退料单编号',
|
|
label: '退料单编号',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
{
|
|
{
|
|
|
prop: 'name',
|
|
prop: 'name',
|
|
|
label: '退料单名称',
|
|
label: '退料单名称',
|
|
@@ -95,6 +77,7 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
|
|
+ slot: 'scene',
|
|
|
prop: 'scene',
|
|
prop: 'scene',
|
|
|
label: '退料场景',
|
|
label: '退料场景',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
@@ -112,9 +95,8 @@
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- prop: 'type',
|
|
|
|
|
- slot: 'type',
|
|
|
|
|
- label: '退料类型',
|
|
|
|
|
|
|
+ prop: 'remark',
|
|
|
|
|
+ label: '退料描述',
|
|
|
align: 'center'
|
|
align: 'center'
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -130,7 +112,9 @@
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- created() {},
|
|
|
|
|
|
|
+ created() {
|
|
|
|
|
+ this.getByCodeFn();
|
|
|
|
|
+ },
|
|
|
methods: {
|
|
methods: {
|
|
|
/* 表格数据源 */
|
|
/* 表格数据源 */
|
|
|
async datasource({ page, limit, where }) {
|
|
async datasource({ page, limit, where }) {
|
|
@@ -149,14 +133,39 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
close(val) {
|
|
close(val) {
|
|
|
- if (val) {
|
|
|
|
|
- this.reload()
|
|
|
|
|
- }
|
|
|
|
|
- this.returnShow = false;
|
|
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ this.reload();
|
|
|
|
|
+ }
|
|
|
|
|
+ this.returnShow = false;
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ handDetailed(row) {},
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ getByCodeFn() {
|
|
|
|
|
+ getByCode('returnScenario').then((res) => {
|
|
|
|
|
+ let _arr = [];
|
|
|
|
|
+ res.data.map((item) => {
|
|
|
|
|
+ const key = Object.keys(item)[0];
|
|
|
|
|
+ const value = item[key];
|
|
|
|
|
+
|
|
|
|
|
+ _arr.push({ name: key, value: value });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ this.sceneList = _arr;
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
+ sceneListFn(val) {
|
|
|
|
|
+ let _arr = this.sceneList;
|
|
|
|
|
+ for (const item of _arr) {
|
|
|
|
|
+ console.log(item.value, val);
|
|
|
|
|
+ if (item.value == val) {
|
|
|
|
|
+ return item.name;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- handDetailed(row) {},
|
|
|
|
|
|
|
|
|
|
/* 刷新表格 */
|
|
/* 刷新表格 */
|
|
|
reload(where = {}) {
|
|
reload(where = {}) {
|