烧结齐套流转流程接口联调

dev-scheduling
zhangdi 3 months ago
parent d322b99dc6
commit 9407ec1fbb
  1. 41
      src/api/productionManagement/sjKitPreparation.js
  2. 403
      src/views/productionManagement/sjKitPreparation/index.vue

@ -0,0 +1,41 @@
import request from '@/axios';
//列表接口
export const getList = (current, size, params) => {
return request({
url: '/blade-desk/sjWorkOrder/page',
method: 'get',
params: {
...params,
current,
size,
},
});
};
// 石墨模准备完成
export const moldComplete = (params) => {
return request({
url: '/blade-desk/sjWorkOrder/moldComplete',
method: 'post',
data: params,
});
};
// 齐套流转发送 /sjWorkOrder/sendKit
export const sendKit = (params) => {
return request({
url: '/blade-desk/sjWorkOrder/sendKit',
method: 'post',
data: params,
});
};
// 生成车间订单 pdaLoad/loadBigWmsSend
export const loadBigWmsSend = (params) => {
return request({
url: '/blade-desk/pdaLoad/loadBigWmsSend',
method: 'post',
data: params,
});
};

@ -8,10 +8,8 @@
v-model="form" v-model="form"
v-model:page="page" v-model:page="page"
ref="crud" ref="crud"
@row-del="rowDel"
@search-change="searchChange" @search-change="searchChange"
@search-reset="searchReset" @search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange" @current-change="currentChange"
@size-change="sizeChange" @size-change="sizeChange"
@refresh-change="refreshChange" @refresh-change="refreshChange"
@ -20,9 +18,12 @@
<template #menu-left> </template> <template #menu-left> </template>
<template #menu-right> </template> <template #menu-right> </template>
<template #menu="{ row }"> <template #menu="{ row }">
<el-button type="text">完成</el-button> <!-- 石墨模准备完成 -->
<el-button type="text">发送</el-button> <el-button type="text" @click="moldComplete(scope.row.yoId)">完成</el-button>
<el-button type="text">车间订单生成</el-button> <!-- 齐套流转完成 -->
<el-button type="text" @click="sendKit(scope.row.yoId)">发送</el-button>
<!-- 车间订单生成 -->
<el-button type="text" @click="orderGen(scope.row.yoId)">车间订单生成</el-button>
</template> </template>
<template #heatTreat="scope"> <template #heatTreat="scope">
@ -35,42 +36,17 @@
<script> <script>
import { import {
add, getList,
getRole, moldComplete,
getRoleAlias, sendKit,
getRoleTreeById, loadBigWmsSend,
grant, } from '@/api/productionManagement/sjKitPreparation';
grantTree,
remove,
update,
} from '@/api/system/role';
import { mapGetters } from 'vuex';
import { validatenull } from '@/utils/validate';
export default { export default {
components: {}, components: {},
data() { data() {
return { return {
inBatchesOpen: false,
platingSmallOpen: false,
planOrderArr: [],
isOpen: false,
rowItem: {},
poId: null,
form: {}, form: {},
box: false,
props: {
label: 'title',
value: 'key',
},
menuGrantList: [],
dataScopeGrantList: [],
apiScopeGrantList: [],
apiGrantList: [],
menuTreeObj: [],
dataScopeTreeObj: [],
apiScopeTreeObj: [],
selectionList: [],
query: {}, query: {},
loading: true, loading: true,
page: { page: {
@ -98,7 +74,7 @@ export default {
delBtn: false, delBtn: false,
editBtnText: '修改', editBtnText: '修改',
labelWidth: 120, labelWidth: 120,
menuWidth: 80, menuWidth: 100,
dialogWidth: 900, dialogWidth: 900,
dialogClickModal: false, dialogClickModal: false,
searchEnter: true, searchEnter: true,
@ -122,366 +98,206 @@ export default {
column: [ column: [
{ {
label: '配套人', label: '配套人',
prop: 'partCode', prop: 'pkUsername',
bind: 'dsPart.partCode',
search: true, search: true,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
{ {
label: '配套时间', label: '配套时间',
prop: 'partName', prop: 'pkDate',
bind: 'dsPart.partName',
search: true, search: true,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
{ {
label: '计划单号', label: '计划单号',
prop: 'cycle', prop: 'ypCode',
search: true, search: true,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
{ {
label: '生产单号', label: '生产单号',
prop: 'material', prop: 'yoCode',
bind: 'dsPart.material',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
display: false,
}, },
{ {
label: '零件号', label: '零件号',
prop: 'plate', prop: 'partCode',
bind: 'dsPart.plate',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
display: false,
}, },
{ {
label: '批次号', label: '批次号',
prop: 'craftWay', prop: 'batchNo',
bind: 'dsPart.craftWay',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
display: false,
}, },
{ {
label: '流程卡号', label: '流程卡号',
prop: 'chlidPart', prop: 'cardNo',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
{ {
label: '产品型号', label: '产品型号',
prop: 'remindContent', prop: 'productType',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
{ {
label: '名称', label: '名称',
prop: 'parameter', prop: 'partName',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
display: false,
}, },
{ {
label: '镀种', label: '镀种',
prop: 'metalsTest', prop: 'plate',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
display: false,
}, },
{ {
label: '生产标识', label: '生产标识',
prop: 'silverTest', prop: 'productIdent',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
display: false,
}, },
{ {
label: '使用部门', label: '使用部门',
prop: 'heatTreat', prop: 'useDept',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
type: 'switch',
}, },
{ {
label: '数量', label: '数量',
prop: 'afterPlating', prop: 'ypQty',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
{ {
label: '面积(d㎡)', label: '面积(d㎡)',
prop: 'afterPlating', prop: 'ypArea',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
{ {
label: '需求交期', label: '需求交期',
prop: 'afterPlating', prop: 'demandDate',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
{ {
label: '计划员', label: '计划员',
prop: 'afterPlating', prop: 'planUser',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
{ {
label: '计划下达时间', label: '计划下达时间',
prop: 'afterPlating', prop: 'releaseDate',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
{ {
label: '流转编号', label: '流转编号',
prop: 'afterPlating', prop: 'roamNo',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
{ {
label: '备注', label: '备注',
prop: 'afterPlating', prop: 'memo',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
{ {
label: '状态', label: '状态',
prop: 'afterPlating', prop: 'curStatusTitle',
search: false, search: false,
sortable: true, sortable: true,
width: 150, width: 150,
span: 12,
}, },
], ],
}, },
data: [], data: [],
isRushOpen: false, //
isBatchOpen: false, //
}; };
}, },
methods: { methods: {
//
orderGen(cardNo) {
this.$confirm('生成车间订单?', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancle'),
type: 'warning',
})
.then(() => {
this.$ajax
.get('pdaLoad/loadBigWmsSend/' + cardNo + '/' + this.mark)
.then((res) => {
if (res.code === 0) {
this.$message.success(this.$t('global.saveOk'));
this.cancel(true);
}
});
})
.catch(() => {
this.$message.info('已取消');
});
},
// //
moldComplete(yoId) { moldComplete(yoId) {
this.$confirm('模具准备完成?', this.$t('global.tips'), { this.$confirm('模具准备完成?', '提示', {
confirmButtonText: this.$t('global.confirm'), confirmButtonText: '确认',
cancelButtonText: this.$t('global.cancle'), cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {
this.$ajax moldComplete({ yoId: yoId }).then(res => {
.post('pjYieldOrder/moldComplete', { this.$message.success('操作成功');
yoId: yoId, this.onLoad(this.page, this.query);
})
.then((res) => {
if (res.code === 0) {
this.$message.success(this.$t('global.saveOk'));
this.cancel(true);
}
}); });
}) })
.catch(() => { .catch(() => {
this.$message.info('已取消'); this.$message.info('已取消');
}); });
}, },
// //
batchReceiving() { sendKit(yoId) {
this.$confirm('确定将选择数据批量接收?', { this.$confirm('发送至待生成车间订单?', '提示', {
confirmButtonText: '确', confirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {
// return remove(row.id); sendKit({ yoId: yoId }).then(res => {
}) this.$message.success('操作成功');
.then(() => { this.onLoad(this.page, this.query);
// this.onLoad(this.page);
// this.$message({
// type: 'success',
// message: '!',
// });
}); });
},
//
batchDel() {
this.$confirm('确定将选择数据批量删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
}) })
.then(() => { .catch(() => {
// return remove(row.id); this.$message.info('已取消');
})
.then(() => {
// this.onLoad(this.page);
// this.$message({
// type: 'success',
// message: '!',
// });
});
},
//
rushFn() {
this.isRushOpen = true;
},
closeDialog() {
this.isRushOpen = false;
this.isBatchOpen = false;
},
inBatchesFn(row) {
this.rowItem = row;
this.isBatchOpen = true;
},
subclass() {
this.platingSmallOpen = true;
},
lookProcessRoute(row) {
this.isOpen = true;
this.rowItem = row;
},
cancel(refresh) {
if (refresh) {
this.$refs.myTable.load();
}
this.inBatchesOpen = false;
this.isOpen = false;
this.planFormOpen = false;
this.platingSmallOpen = false;
},
initData(roleId) {
getRoleTreeById(roleId).then(res => {
const column = this.findObject(this.option.column, 'parentId');
column.dicData = res.data.data;
});
},
submit() {
const menuList = this.$refs.treeMenu.getCheckedKeys();
const dataScopeList = this.$refs.treeDataScope.getCheckedKeys();
const apiScopeList = this.$refs.treeApiScope.getCheckedKeys();
grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => {
this.box = false;
this.$message({
type: 'success',
message: '操作成功!',
});
this.selectionList = [];
this.onLoad(this.page);
});
},
rowSave(row, done, loading) {
add(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
done();
},
error => {
window.console.log(error);
loading();
}
);
},
rowUpdate(row, index, done, loading) {
update(row).then(
() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
}); });
done();
},
error => {
window.console.log(error);
loading();
}
);
}, },
rowDel(row) { //
this.$confirm('确定将选择数据删除?', { orderGen(cardNo) {
confirmButtonText: '确定', this.$confirm('生成车间订单?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {
return remove(row.id); loadBigWmsSend().then(res => {
}) this.$message.success('操作成功');
.then(() => { this.onLoad(this.page, this.query);
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
}); });
})
.catch(() => {
this.$message.info('已取消');
}); });
}, },
searchReset() { searchReset() {
this.query = {}; this.query = {};
this.onLoad(this.page); this.onLoad(this.page, this.query);
}, },
searchChange(params, done) { searchChange(params, done) {
this.query = params; this.query = params;
@ -489,118 +305,27 @@ export default {
this.onLoad(this.page, params); this.onLoad(this.page, params);
done(); done();
}, },
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
beforeOpen(done, type) {
if (['add', 'edit'].includes(type)) {
this.initData(this.form.id);
}
if (['edit', 'view'].includes(type)) {
if (this.form.parentId === '0') {
this.form.parentId = '';
}
}
getRoleAlias().then(res => {
const column = this.findObject(this.option.column, 'currentAlias');
column.dicData = res.data.data;
});
done();
},
handleRole() {
if (this.selectionList.length !== 1) {
this.$message.warning('只能选择一条数据');
return;
}
this.menuTreeObj = [];
this.dataScopeTreeObj = [];
this.apiScopeTreeObj = [];
grantTree().then(res => {
this.menuGrantList = res.data.data.menu;
this.dataScopeGrantList = res.data.data.dataScope;
this.apiScopeGrantList = res.data.data.apiScope;
getRole(this.ids).then(res => {
this.menuTreeObj = res.data.data.menu;
this.dataScopeTreeObj = res.data.data.dataScope;
this.apiScopeTreeObj = res.data.data.apiScope;
this.box = true;
});
});
},
handleRowRole(row) {
this.menuTreeObj = [];
this.dataScopeTreeObj = [];
this.apiScopeTreeObj = [];
grantTree().then(res => {
this.menuGrantList = res.data.data.menu;
this.dataScopeGrantList = res.data.data.dataScope;
this.apiScopeGrantList = res.data.data.apiScope;
getRole(row.id).then(res => {
this.menuTreeObj = res.data.data.menu;
this.dataScopeTreeObj = res.data.data.dataScope;
this.apiScopeTreeObj = res.data.data.apiScope;
this.selectionList.push(row);
this.box = true;
});
});
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning('请选择至少一条数据');
return;
}
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: 'success',
message: '操作成功!',
});
this.$refs.crud.toggleSelection();
});
},
currentChange(currentPage) { currentChange(currentPage) {
this.page.currentPage = currentPage; this.page.currentPage = currentPage;
this.onLoad(this.page, this.query);
}, },
sizeChange(pageSize) { sizeChange(pageSize) {
this.page.pageSize = pageSize; this.page.pageSize = pageSize;
this.onLoad(this.page, this.query);
}, },
refreshChange() { refreshChange() {
this.onLoad(this.page, this.query); this.onLoad(this.page, this.query);
}, },
handleChange(file, fileList) {
// proxy.$Export.xlsx(file.raw).then((data) => {
// data.value = data.results;
// });
this.$message({
type: 'success',
message: '操作成功!',
});
},
onLoad(page, params = {}) { onLoad(page, params = {}) {
this.loading = true; this.loading = true;
this.data = []; this.data = [];
this.page.total = this.data.length; getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
// getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { this.data = res.data.data.records;
// this.data = res.data.data.records;
this.loading = false; this.loading = false;
// this.page.total = res.data.data.total this.page.total = res.data.data.total;
// this.selectionClear(); });
// });
}, },
}, },
mounted() {},
}; };
</script> </script>

Loading…
Cancel
Save