中航光电热表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.
 
 
 
 

543 lines
14 KiB

<template>
<basic-container>
<!-- 领料出库 -->
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
v-model="form"
v-model:page="page"
ref="crud"
@search-change="searchChange"
@search-reset="searchReset"
:before-open="beforeOpen"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
@row-save="rowSave"
>
<template #menu-left>
<el-button type="primary" @click="addFn">新增出库</el-button>
<el-button type="primary" @click="handleOut">批量打印</el-button>
<el-button type="primary" @click="outboundFn">批量出库</el-button>
<el-button type="primary" @click="closeOrder" plain>批量关闭</el-button>
</template>
<template #menu="scope">
<el-button type="text" @click="detailsFn(scope.row)">详情 </el-button>
<el-button type="text" @click="editFn(scope.row)" v-if="scope.row.status == '1'"
>打印
</el-button>
<el-button
type="text"
@click="ouboundFn(scope.row)"
v-if="scope.row.status == '1'"
>出库
</el-button>
<el-button type="text" @click="handleEdit(scope.row)" v-if="scope.row.status == '1'"
>修改
</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-if="scope.row.status == '1'"
>删除
</el-button>
<el-button type="text" @click="handleScrap(scope.row)" v-if="scope.row.status == '2'"
>报废
</el-button>
</template>
</avue-crud>
<addOut v-if="isAddOpen" :showDialog="isAddOpen" @closeDialog="closeDialog"> </addOut>
<detailsDialog
v-if="isDetailsOpen"
:showDialog="isDetailsOpen"
@closeDialog="closeDialog"
:rowItem="rowItem"
>
</detailsDialog>
<outboundDialog
v-if="isOutboundOpen"
:showDialog="isOutboundOpen"
@closeDialog="closeDialog"
></outboundDialog>
</basic-container>
</template>
<script>
import addOut from "./components/addDialog.vue";
import detailsDialog from "./components/detailsDialog.vue";
import outboundDialog from "./components/outboundDialog.vue";
export default {
components: {
addOut,
detailsDialog,
outboundDialog,
},
data() {
return {
loading: false,
data: [],
form: {},
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
selectionList: [],
option: {
columnSort: true,
tip: false,
height: "auto",
align: "center",
calcHeight: 32,
simplePage: false,
searchShow: true,
searchMenuSpan: 6,
searchIcon: true,
searchIndex: 3,
tree: false,
border: true,
index: false,
selection: true,
viewBtn: false,
delBtn: false,
editBtn: false,
editBtnText: "修改",
editBtnIcon: " ",
delBtnIcon: " ",
addBtn: false,
labelWidth: 140,
searchLabelWidth: 120,
menu: true,
menuWidth: 300,
menuBtn: true,
menuBtnIcon: 'el-icon-menu',
menuBtnTitle: '操作',
menuList: [
{ label: '详情', value: 'details' },
{ label: '打印', value: 'print', display: (row) => row.status == '1' },
{ label: '出库', value: 'outbound', display: (row) => row.status == '1' },
{ label: '修改', value: 'edit', display: (row) => row.status == '1' },
{ label: '删除', value: 'delete', display: (row) => row.status == '1' },
{ label: '报废', value: 'scrap', display: (row) => row.status == '2' }
],
dialogWidth: 1200,
dialogClickModal: false,
searchEnter: true,
excelBtn: true,
gridBtn: false,
searchShowBtn: false,
showOverflowTooltip: true,
searchLabelPosition: "left",
searchLabelPosition: "left",
searchGutter: 24,
searchSpan: 6,
menuAlign: "left",
gridBtn: false,
searchMenuPosition: "right",
addBtnIcon: " ",
viewBtnIcon: " ",
delBtnIcon: " ",
editBtnIcon: " ",
column: [
{
label: "出库单号",
prop: "brCode",
search: false,
width: 120,
searchLabelWidth: 75,
},
{
label: "车间订单号",
prop: "woCode",
search: true,
width: 120,
searchLabelWidth: 100,
},
{
label: "零件号",
prop: "partCode",
search: true,
width: 120,
searchLabelWidth: 70,
},
{
label: "零件名称",
prop: "partName",
search: false,
width: 120,
},
{
label: "批次号",
prop: "batchNo",
search: false,
width: 120,
},
{
label: "流程卡号",
prop: "processCardNo",
search: true,
width: 120,
},
{
label: "生产数量",
prop: "okNum",
search: false,
width: 120,
},
{
label: "物料编号",
prop: "c_materiel_id",
search: true,
width: 120,
},
{
label: "物料名称",
prop: "partNames",
search: false,
width: 120,
},
{
label: "物料需求数量",
prop: "xuqiushuliang",
search: false,
width: 120,
},
{
label: "库房",
prop: "bsStoreRoomSet",
search: false,
width: 120,
},
{
label: "库位",
prop: "goodsKuwei",
search: false,
width: 120,
},
{
label: "是否印字",
prop: "isPrint",
search: false,
width: 120,
type : "select",
dicData : [
{
label : "是",
value : "1"
},
{
label : "否",
value : "0"
}
]
},
{
label: "粉重",
prop: "powderWeight",
search: false,
width: 120,
},
{
label: "材料号",
prop: "materialCode",
search: false,
width: 120,
},
{
label: "成型厚度",
prop: "chengxinghoudu",
search: false,
width: 120,
},
{
label: "炉批号",
prop: "luPiHao",
search: false,
width: 120,
},
{
label: "物料出库数量",
prop: "chukushuliang",
search: false,
width: 120,
},
// {
// label: "物料批次号",
// prop: "goodbatchNo",
// search: false,
// width: 120,
// },
{
label: "状态",
prop: "status",
search: true,
width: 120,
searchLabelWidth: 60,
type: "select",
dicData: [
{
label: "待出库",
value: "1",
},
{
label: "已出库",
value: "2",
},
{
label: "已报废",
value: "3",
},
{
label: "订单完成",
value: "4",
},
],
},
{
label: "预计领料日期",
prop: "goodsCode",
search: true,
width: 120,
searchLabelWidth: 100,
hide: true,
type: "date",
searchRange: true,
startPlaceholder: "开始时间",
endPlaceholder: "结束时间",
},
{
label: "预计使用时间",
prop: "times",
search: false,
width: 120,
},
{
label: "创建时间",
prop: "createTime",
search: false,
width: 120,
type: "datetime",
},
{
label: "创建人",
prop: "createUserName",
search: false,
width: 120,
},
{
label: "出库时间",
prop: "outboundTime",
search: false,
width: 120,
type: "datetime",
},
{
label: "出库人",
prop: "outboundUserName",
search: false,
width: 120,
},
],
},
isAddOpen: false,
isDetailsOpen: false,
isOutboundOpen: false,
rowItem: {},
};
},
mounted() {},
methods: {
addFn() {
this.isAddOpen = true;
},
detailsFn(row) {
this.isDetailsOpen = true;
this.rowItem = row;
},
outboundFn() {
this.isOutboundOpen = true;
},
closeDialog() {
this.isAddOpen = false;
this.isDetailsOpen = false;
this.isOutboundOpen = false;
},
// 多选
selectionChange(list) {
this.selectionList = list;
},
// 批量出库
handleOut() {
// this.$confirm('确定将选择数据删除?', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning',
// })
// .then(() => {
// return remove(row.id);
// })
// .then(() => {
// this.onLoad(this.page);
// this.$message({
// type: 'success',
// message: '操作成功!',
// });
// });
},
closeOrder() {
this.$confirm("确定是否关闭订单?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
// return remove(row.id);
})
.then(() => {
// this.onLoad(this.page);
// this.$message({
// type: 'success',
// message: '操作成功!',
// });
});
},
// 出库
ouboundFn(row) {
this.$confirm("确定是否出库?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
})
.catch(() => {});
},
// 修改
handleEdit(row) {
this.isAddOpen = true;
},
// 删除
handleDelete(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
},
// 报废
handleScrap(row) {
this.$confirm('确定将此记录标记为报废?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const index = this.data.findIndex(item => item.brCode === row.brCode);
if (index !== -1) {
this.data[index].status = 3;
this.data[index].statusName = "已报废";
this.$message.success('标记报废成功');
}
}).catch(() => {});
},
onLoad() {
this.data = [
{
brCode: "aaaa",
woCode: "WO-090899899",
partCode: "E6-78787-E1",
partName: "零件一",
batchNo: "9098900",
okNum: "88",
c_materiel_id: "89",
partNames: "8989",
xuqiushuliang: 99,
chukushuliang: 67,
goodbatchNo: "898989",
bsStoreRoomSet: "仓库一",
goodsKuwei: "库位一",
status: 1,
statusName: "待出库",
times: "2025-09-08",
},
{
brCode: "aaaa",
woCode: "WO-090899899",
partCode: "E6-78787-E1",
partName: "零件一",
batchNo: "9098900",
okNum: "88",
c_materiel_id: "89",
partNames: "8989",
xuqiushuliang: 99,
chukushuliang: 67,
goodbatchNo: "898989",
bsStoreRoomSet: "仓库一",
goodsKuwei: "库位一",
status: 2,
statusName: "已出库",
times: "2025-09-08",
},
{
brCode: "aaaa",
woCode: "WO-090899899",
partCode: "E6-78787-E1",
partName: "零件一",
batchNo: "9098900",
okNum: "88",
c_materiel_id: "89",
partNames: "8989",
xuqiushuliang: 99,
chukushuliang: 67,
goodbatchNo: "898989",
bsStoreRoomSet: "仓库一",
goodsKuwei: "库位一",
status: 1,
statusName: "",
times: "2025-09-08",
},
{
brCode: "aaaa",
woCode: "WO-090899899",
partCode: "E6-78787-E1",
partName: "零件一",
batchNo: "9098900",
okNum: "88",
c_materiel_id: "89",
partNames: "8989",
xuqiushuliang: 99,
chukushuliang: 67,
goodbatchNo: "898989",
bsStoreRoomSet: "仓库一",
goodsKuwei: "库位一",
status: 4,
statusName: "订单完成",
times: "2025-09-08",
},
{
brCode: "aaaa",
woCode: "WO-090899899",
partCode: "E6-78787-E1",
partName: "零件一",
batchNo: "9098900",
okNum: "88",
c_materiel_id: "89",
partNames: "8989",
xuqiushuliang: 99,
chukushuliang: 67,
goodbatchNo: "898989",
bsStoreRoomSet: "仓库一",
goodsKuwei: "库位一",
status: 1,
statusName: "待出库",
times: "2025-09-08",
},
];
this.page.total = this.data.length;
},
},
};
</script>