no message
parent
ab9531d192
commit
086446f92c
|
|
@ -24,4 +24,11 @@ export function edit(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del }
|
export function queryPickDetail(pickId) {
|
||||||
|
return request({
|
||||||
|
url: 'api/pick/queryPickDetail?pickId=' + pickId,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default {add, edit, del, queryPickDetail}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,8 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
<label class="el-form-item-label">成品代码/单品代码</label>
|
<label class="el-form-item-label">成品代码/单品代码</label>
|
||||||
<el-input v-model="query.cpCodeOrDpCode" clearable placeholder="成品代码/单品代码" style="width: 180px;" class="filter-item"
|
<el-input v-model="query.cpCodeOrDpCode" clearable placeholder="成品代码/单品代码" style="width: 180px;"
|
||||||
|
class="filter-item"
|
||||||
@keyup.enter.native="crud.toQuery"/>
|
@keyup.enter.native="crud.toQuery"/>
|
||||||
|
|
||||||
<label class="el-form-item-label">需求工位</label>
|
<label class="el-form-item-label">需求工位</label>
|
||||||
|
|
@ -85,10 +86,35 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" height="63vh" size="small" style="width: 100%;"
|
<el-table ref="table"
|
||||||
@selection-change="crud.selectionChangeHandler">
|
v-loading="crud.loading"
|
||||||
<el-table-column type="selection" width="55"/>
|
:data="crud.data"
|
||||||
<el-table-column prop="xh" label="序号" type="index" width="50"/>
|
height="63vh"
|
||||||
|
row-key="id"
|
||||||
|
size="small"
|
||||||
|
style="width: 100%;"
|
||||||
|
@selection-change="crud.selectionChangeHandler"
|
||||||
|
@row-click="handleRowClick"
|
||||||
|
@expand-change="expandChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template slot-scope="props">
|
||||||
|
<!-- <el-card shadow="never" class="nested-table-card">
|
||||||
|
|
||||||
|
</el-card>-->
|
||||||
|
<el-table :data="props.row.dataPickDetail" class="table2" show-summary v-loading="loading"
|
||||||
|
style="width: 100%">
|
||||||
|
<el-table-column prop="xh" label="序号" type="index" width="80"/>
|
||||||
|
<el-table-column prop="item.code" label="物料编码" align="center"/>
|
||||||
|
<el-table-column prop="item.name" label="物料名称" align="center"/>
|
||||||
|
<el-table-column prop="orderQty" label="订单数量" align="center"/>
|
||||||
|
<el-table-column prop="allocatedQty" label="分配数量" align="center"/>
|
||||||
|
<el-table-column prop="pickedQty" label="拣货数量" align="center"/>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="xh" label="序号" type="index"/>
|
||||||
<el-table-column prop="code" label="出库单编码"/>
|
<el-table-column prop="code" label="出库单编码"/>
|
||||||
<el-table-column prop="gdCode" label="工单编码"/>
|
<el-table-column prop="gdCode" label="工单编码"/>
|
||||||
<el-table-column prop="lineNo" label="顺序号"/>
|
<el-table-column prop="lineNo" label="顺序号"/>
|
||||||
|
|
@ -110,6 +136,7 @@
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<div style="float: right;">
|
<div style="float: right;">
|
||||||
|
|
@ -128,6 +155,7 @@ import udOperation from '@crud/UD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import {getItemsList} from "@/api/item";
|
import {getItemsList} from "@/api/item";
|
||||||
import {queryAllBigItem} from "@/api/bigItem";
|
import {queryAllBigItem} from "@/api/bigItem";
|
||||||
|
import {none} from "html-webpack-plugin/lib/chunksorter";
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
id: null,
|
id: null,
|
||||||
|
|
@ -167,6 +195,8 @@ export default {
|
||||||
return {
|
return {
|
||||||
gds: [],
|
gds: [],
|
||||||
itemAndBigItem: [],
|
itemAndBigItem: [],
|
||||||
|
dataPickDetail: [],
|
||||||
|
loading: true,
|
||||||
permission: {
|
permission: {
|
||||||
add: ['admin', 'pick:add'],
|
add: ['admin', 'pick:add'],
|
||||||
edit: ['admin', 'pick:edit'],
|
edit: ['admin', 'pick:edit'],
|
||||||
|
|
@ -192,6 +222,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
none,
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
return true
|
return true
|
||||||
|
|
@ -217,12 +248,82 @@ export default {
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
},
|
||||||
|
expandChange(row, expandedRows) {
|
||||||
|
// 该处是用于判断是展开还是收起行,只有展开的时候做请求,避免多次请求!
|
||||||
|
// 展开的时候expandedRows有值,收起的时候为空.
|
||||||
|
this.loading = true;
|
||||||
|
if (expandedRows.length > 0) {
|
||||||
|
crudPick.queryPickDetail(row.id).then(res => {
|
||||||
|
// 遍历当前页面表
|
||||||
|
this.$set(row, 'dataPickDetail', res)
|
||||||
|
this.loading = false;
|
||||||
|
}).catch(() => {
|
||||||
|
this.crud.notify('获取明细数据异常!', CRUD.NOTIFICATION_TYPE.ERROR);
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
handleRowClick(row, column, event) {
|
||||||
|
//点编辑按钮的时候不触发展开行
|
||||||
|
if (!event.target.classList.contains('el-button')) {
|
||||||
|
this.$refs.table.toggleRowExpansion(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style>
|
||||||
|
|
||||||
|
|
||||||
|
/*.nested-table-card {
|
||||||
|
background: linear-gradient(135deg, #f7f9fc, #eef1f7) !important;
|
||||||
|
border: 1px solid #dfe4ed !important;
|
||||||
|
border-radius: 10px !important;
|
||||||
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
.table2 {
|
||||||
|
background-color: white !important;
|
||||||
|
border-radius: 8px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table2 th {
|
||||||
|
background-color: #f2f6fc !important;
|
||||||
|
color: #333 !important;
|
||||||
|
font-size: 14px !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table2 td {
|
||||||
|
color: #666 !important;
|
||||||
|
font-size: 13px !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table2 .el-table__row {
|
||||||
|
transition: background-color 0.3s !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table2 .el-table__row:hover {
|
||||||
|
background-color: #f5f7fa !important;
|
||||||
|
cursor: pointer !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table2 .el-table__body-wrapper {
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table2 .el-table__footer-wrapper {
|
||||||
|
background-color: #F6F9FC !important;
|
||||||
|
color: #333 !important;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px !important;
|
||||||
|
border: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<span>API字典详情</span>
|
<span>API字典详情</span>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="checkPer(['admin','dict:add']) && this.$refs.dictDetail && this.$refs.dictDetail.query.dictName"
|
v-if="checkPer(['admin','apiDict:add']) && this.$refs.dictDetail && this.$refs.dictDetail.query.dictName"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
size="mini"
|
size="mini"
|
||||||
style="float: right;padding: 4px 10px"
|
style="float: right;padding: 4px 10px"
|
||||||
|
|
@ -100,9 +100,9 @@ export default {
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
permission: {
|
permission: {
|
||||||
add: ['admin', 'dict:add'],
|
add: ['admin', 'apiDict:add'],
|
||||||
edit: ['admin', 'dict:edit'],
|
edit: ['admin', 'apiDict:edit'],
|
||||||
del: ['admin', 'dict:del']
|
del: ['admin', 'apiDict:del']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue