中航光电热表web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

367 lines
9.1 KiB

6 months ago
<template>
<basic-container>
<!-- 库存汇总 -->
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
v-model="form"
v-model:page="page"
ref="crud"
@row-update="rowUpdate"
@row-save="rowSave"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template #menu-left>
<el-button type="primary" @click="handlePrepare">准备</el-button>
</template>
</avue-crud>
</basic-container>
6 months ago
</template>
<script>
import { getList, setReadStatus } from '@/api/productionManagement/frontTooling';
6 months ago
export default {
data() {
return {
selectionList: [],
loading: false,
data: [],
form: {},
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
option: {
height: 'auto',
align: 'center',
calcHeight: 32,
rowKey: 'woId',
tip: false,
simplePage: true,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: false,
selection: true,
viewBtn: false,
delBtn: false,
addBtn: false,
editBtn: false,
editBtnText: '修改',
addBtnIcon: ' ',
viewBtnIcon: ' ',
delBtnIcon: ' ',
editBtnIcon: ' ',
viewBtnText: '详情',
labelWidth: 120,
searchLabelWidth: 120,
menu: false,
menuWidth: 220,
dialogWidth: 1200,
dialogClickModal: false,
searchEnter: true,
excelBtn: false,
filterBtn: true,
searchShowBtn: false,
columnSort: true,
excelBtn: true,
columnSort: true,
showOverflowTooltip: true,
searchLabelPosition: 'left',
searchLabelPosition: 'left',
searchGutter: 24,
searchSpan: 6,
menuAlign: 'left',
gridBtn: false,
searchMenuPosition: 'right',
column: [
{
label: '准备状态',
prop: 'readStatus',
type: 'select',
width: 200,
search: true,
sortable: true,
overHidden: true,
},
{
label: '生产计划号',
prop: 'ypCode',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
{
label: '生产订单号',
prop: 'yoCode',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
{
label: '车间订单号',
prop: 'woCode',
width: 200,
search: true,
sortable: true,
overHidden: true,
},
{
label: '零件号',
prop: 'partCode',
width: 200,
search: true,
sortable: true,
overHidden: true,
},
{
label: '零件名称',
prop: 'partName',
width: 200,
search: true,
sortable: true,
overHidden: true,
},
{
label: '流程卡号',
prop: 'cardNo',
width: 200,
search: true,
sortable: true,
overHidden: true,
},
{
label: '批次号',
prop: 'batchNo',
width: 200,
search: true,
sortable: true,
overHidden: true,
},
{
label: '镀种信息',
prop: 'plate',
width: 200,
search: true,
sortable: true,
overHidden: true,
},
{
label: '生产标识',
prop: 'prodIdent',
width: 200,
search: true,
sortable: true,
overHidden: true,
},
{
label: '生产数量',
prop: 'makeQty',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
{
label: '面积(dm²)',
prop: 'poArea',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
{
label: '订单优先级',
prop: 'priority',
type: 'select',
width: 200,
search: true,
sortable: true,
overHidden: true,
dicUrl: '/blade-system/dict/dictionary?code=orderPriority',
props: {
label: 'dictValue',
value: 'dictKey',
},
},
{
label: '计划下达时间',
prop: 'releaseDate',
type: 'date',
searchRange: true,
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
width: 200,
search: true,
sortable: true,
overHidden: true,
},
{
label: '需求交期',
prop: 'demandDate',
type: 'date',
searchRange: true,
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
width: 200,
search: true,
sortable: true,
overHidden: true,
},
{
label: '石墨模具号',
prop: 'moCode',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
{
label: '库位号',
prop: 'moLocal',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
{
label: '待出库数量',
prop: 'moNumber',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
{
label: '玻璃饼',
prop: 'glassPie',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
{
label: '待出库数量',
prop: 'glassNumber',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
{
label: '压饼模具号',
prop: 'ybCode',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
{
label: '库位号',
prop: 'ybLocal',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
{
label: '待出库数量',
prop: 'ybNumber',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
{
label: '备注',
prop: 'memo',
width: 200,
search: false,
sortable: true,
overHidden: true,
},
],
},
};
},
mounted() {},
methods: {
selectionChange(val) {
this.selectionList = val;
6 months ago
},
handlePrepare() {
if (this.selectionList.length == 0) {
this.$message.error('请先选择数据');
return;
}
//
this.$confirm('确定选中数据已准备完成?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
let arr = this.selectionList.map(item => item.woId);
let query = {
woIds: arr.join(','),
};
setReadStatus(query).then(res => {
this.$message.success('操作成功');
this.onLoad(this.page, this.query);
});
});
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
this.onLoad(this.page, this.query);
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
this.onLoad(this.page, this.query);
},
refreshChange() {
this.onLoad(this.page, this.query);
},
searchReset() {
this.query = {};
this.treeDeptId = '';
this.onLoad(this.page, this.query);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
onLoad(page, params = {}) {
this.loading = true;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
this.data = res.data.data.records;
this.loading = false;
this.page.total = res.data.data.total;
this.selectionClear();
});
6 months ago
},
},
};
6 months ago
</script>
<style></style>