|
|
@@ -652,7 +652,7 @@ const gdtableRowClick = async (row) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-//点击左侧树形获取表格列表
|
|
|
+//点击左侧树形获取表格列表//机台侧边栏
|
|
|
const tableData = ref([]);
|
|
|
const _machine = ref(null);
|
|
|
const treeType = ref('customTree') // dataTree // 计划中,排产中 ,dataTree 车间
|
|
|
@@ -665,24 +665,21 @@ const handleNodeClick = async (node) => {
|
|
|
const custom_code = node.label;
|
|
|
// 使用字符串分割获取#前面的数据
|
|
|
const dataBeforeHash = custom_code.split('#')[0].trim();
|
|
|
- const machine = dataBeforeHash + '#';
|
|
|
- console.log(machine)
|
|
|
- _machine.value = machine;
|
|
|
-
|
|
|
- const zhubiao = await MachineWorkOrderList({ machine, status: '排程' })
|
|
|
- const fubiao = await MachineWorkOrderList({ machine, status: '制程' })
|
|
|
- // console.log(zhubiao, fubiao)
|
|
|
-
|
|
|
- chejianData.value = zhubiao.data;
|
|
|
- chejianfuData.value = fubiao.data;
|
|
|
+ _machine.value = dataBeforeHash + '#';
|
|
|
+ console.log(_machine.value)
|
|
|
+ const zhubiao = await MachineWorkOrderList({ machine:_machine.value})
|
|
|
+ chejianData.value = zhubiao.data['排程'];
|
|
|
+ chejianfuData.value = zhubiao.data['制程'];
|
|
|
}
|
|
|
};
|
|
|
//计划中已完工搜索
|
|
|
const searchInfo = ref('');
|
|
|
// 提交搜索
|
|
|
const onSubmit = () => {
|
|
|
+ console.log(searchInfo.value)
|
|
|
+ console.log(currentNode.value)
|
|
|
+ console.log(_machine.value)
|
|
|
if(searchInfo.value === '' || searchInfo.value === null ){
|
|
|
- tableData.value = [];
|
|
|
ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
|
|
|
return false;
|
|
|
}
|
|
|
@@ -694,39 +691,20 @@ const onSubmit = () => {
|
|
|
_Schedule();
|
|
|
return false;
|
|
|
}
|
|
|
- console.log(searchInfo.value)
|
|
|
- console.log(currentNode.value)
|
|
|
- console.log(_machine.value)
|
|
|
-
|
|
|
-return false;
|
|
|
- if(searchInfo.value === '' || searchInfo.value === null || searchInfo.value.length < 6 ){
|
|
|
- tableData.value = [];
|
|
|
- ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
|
|
|
- return false;
|
|
|
- }else{
|
|
|
- if(currentNode.value === '计划中' || currentNode.value === '已完工'){
|
|
|
- _Project();
|
|
|
- }else if(currentNode.value === '排程中' || currentNode.value === '制程中'){
|
|
|
- _Schedule();
|
|
|
- }else{
|
|
|
- ElMessage({type: 'warning',message: '请选择具体的工单后,再操作此功能'})
|
|
|
- return false;
|
|
|
- }
|
|
|
+ if(_machine.value){
|
|
|
+ console.log(2131211111111111111111111111111)
|
|
|
+ _MachineWorkOrderList();
|
|
|
}
|
|
|
};
|
|
|
-const errorMessage = ref('');
|
|
|
// 搜索计划中、已完工一条工单
|
|
|
const _Project = async () => {
|
|
|
const status = currentNode.value;
|
|
|
const search = searchInfo.value;
|
|
|
const Project_search = await Project({status:status,search:search});
|
|
|
console.log(Project_search);
|
|
|
- if(Project_search.code === 0){
|
|
|
+ if(Project_search.msg === '成功'){
|
|
|
tableData.value = Project_search.data;
|
|
|
}else{
|
|
|
- tableData.value = [];
|
|
|
- yjtableData.value = [];
|
|
|
- gytableData.value = [];
|
|
|
ElMessage({type: 'warning',message: '查不到具体条件的工单'})
|
|
|
return false;
|
|
|
}
|
|
|
@@ -739,10 +717,24 @@ const _Schedule = async () => {
|
|
|
console.log(search)
|
|
|
const Schedule_search = await Schedule({status:status,search:search});
|
|
|
console.log(Schedule_search);
|
|
|
- if(Schedule_search.code === 0){
|
|
|
- tableData.value = Schedule_search.data;
|
|
|
+ if(Schedule_search.msg === '成功'){
|
|
|
+ chejianData.value = Schedule_search.data;
|
|
|
+ }else{
|
|
|
+ ElMessage({type: 'warning',message: '查不到具体条件的工单'})
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+};
|
|
|
+//机台搜索一条工单
|
|
|
+const _MachineWorkOrderList = async () => {
|
|
|
+ console.log(123)
|
|
|
+ const status = searchInfo.value;
|
|
|
+ const search = _machine.value;
|
|
|
+
|
|
|
+ const MachineWorkOrderList_search = await MachineWorkOrderList({status:status,search:search});
|
|
|
+ console.log(MachineWorkOrderList_search);
|
|
|
+ if(MachineWorkOrderList_search.code === 0){
|
|
|
+ tableData.value = MachineWorkOrderList_search.data;
|
|
|
}else{
|
|
|
- tableData.value = [];
|
|
|
ElMessage({type: 'warning',message: '查不到具体条件的工单'})
|
|
|
return false;
|
|
|
}
|
|
|
@@ -791,30 +783,21 @@ const gxztgzzCancel = () => {
|
|
|
gxztgzzlist.value = false;
|
|
|
};
|
|
|
|
|
|
-//点击车间表格【获取车间工单编号】
|
|
|
-// const _PC_gdbh = ref(null)
|
|
|
-// const chejianRowClick = (row) => {
|
|
|
-// // console.log(row['工单编号'])
|
|
|
-// _PC_gdbh.value = row['工单编号'];
|
|
|
-// };
|
|
|
//加入排产【按钮】
|
|
|
const onjrpcClick = async () => {
|
|
|
if(_PC_gdbh.value == null || _PC_gdbh.value == ''){
|
|
|
ElMessage({type: 'warning',message: '请选择排程中工单'})
|
|
|
}else{
|
|
|
let params = {}
|
|
|
- // params.workOrder = '2311116';
|
|
|
- // params.machine = 'JY01#';
|
|
|
params.workOrder = _PC_gdbh.value;
|
|
|
params.machine = _machine.value;
|
|
|
params.printCode = 1;
|
|
|
params.processCode = 1;
|
|
|
- console.log(params)
|
|
|
const ProductionSchedulingAdd_add = await ProductionSchedulingAdd(params);
|
|
|
- console.log(ProductionSchedulingAdd_add)
|
|
|
if (ProductionSchedulingAdd_add .code === 0) {
|
|
|
- const fubiao = await MachineWorkOrderList({ machine:_machine.value, status: '制程' });
|
|
|
- chejianfuData.value = fubiao.data;
|
|
|
+ const pc_zc_table = await MachineWorkOrderList({ machine:_machine.value});
|
|
|
+ chejianfuData.value = pc_zc_table.data['制程'];
|
|
|
+ chejianData.value = pc_zc_table.data['"排程"'];
|
|
|
ElMessage({type: 'success',message: '加入排产 更新成功'});
|
|
|
} else {
|
|
|
ElMessage({ type: 'error',message: '更新失败'})
|
|
|
@@ -822,35 +805,24 @@ const onjrpcClick = async () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-// const _ZC_gdbh = ref(null)
|
|
|
-// const chejianfuRowClick = (row) => {
|
|
|
-// // console.log(row['工单编号'])
|
|
|
-// _ZC_gdbh.value = row['工单编号'];
|
|
|
-// };
|
|
|
-
|
|
|
//暂停排产【按钮】
|
|
|
const onztwgClick = async () => {
|
|
|
if(_ZC_gdbh.value == null || _ZC_gdbh.value == ''){
|
|
|
ElMessage({type: 'warning', message: '请选择制程中工单'})
|
|
|
}else{
|
|
|
let params = {}
|
|
|
- // params.workOrder = '2311116';
|
|
|
- // params.machine = 'JY01#';
|
|
|
params.workOrder = _ZC_gdbh.value;
|
|
|
params.machine = _machine.value;
|
|
|
params.printCode = 1;
|
|
|
params.processCode = 1;
|
|
|
- console.log(params)
|
|
|
-
|
|
|
const ProductionSchedulingAdd_stop = await ProductionSchedulingPause(params);
|
|
|
console.log(ProductionSchedulingAdd_stop)
|
|
|
if (ProductionSchedulingAdd_stop .code === 0) {
|
|
|
-
|
|
|
- const zhubiao = await MachineWorkOrderList({ machine:_machine.value, status: '排程' });
|
|
|
- chejianData.value = zhubiao.data;
|
|
|
+ const pc_zc_table = await MachineWorkOrderList({ machine:_machine.value});
|
|
|
+ chejianData.value = pc_zc_table.data['"排程"'];
|
|
|
+ chejianfuData.value = pc_zc_table.data['制程'];
|
|
|
ElMessage({type: 'success',message: '暂停排产 更新成功'});
|
|
|
} else {
|
|
|
- console.log(ygjbzledit_eddt);
|
|
|
ElMessage({ type: 'error',message: '更新失败'})
|
|
|
}
|
|
|
}
|
|
|
@@ -865,17 +837,14 @@ const ongxwgClick = async () => {
|
|
|
message: '请选择制程中工单'
|
|
|
})
|
|
|
}else{
|
|
|
- // let combinedValue = `${_ZC_gdbh.value},${_PC_gdbh.value}`;
|
|
|
- // console.log(combinedValue);
|
|
|
let params = {}
|
|
|
params.workOrder = _ZC_gdbh.value;
|
|
|
params.processCode = _gxh.value;
|
|
|
- console.log(params)
|
|
|
const complete_get = await complete(params);
|
|
|
- console.log(complete_get)
|
|
|
if (complete_get .code === 0) {
|
|
|
- const fubiao = await MachineWorkOrderList({ machine:_machine.value, status: '制程' });
|
|
|
- chejianfuData.value = fubiao.data;
|
|
|
+ const pc_zc_table = await MachineWorkOrderList({ machine:_machine.value});
|
|
|
+ chejianData.value = pc_zc_table.data['"排程"'];
|
|
|
+ chejianfuData.value = pc_zc_table.data['制程'];
|
|
|
ElMessage({type: 'success',message: '工序完工 更新成功'})
|
|
|
} else {
|
|
|
ElMessage({ type: 'error',message: '更新失败'})
|
|
|
@@ -886,7 +855,6 @@ const ongxwgClick = async () => {
|
|
|
const _PC_gdbh = ref(null)
|
|
|
const PC_handleChange = (arr) => {
|
|
|
let str = arr.map((val) => val['工单编号']).join(",");
|
|
|
- console.log(str);
|
|
|
_PC_gdbh.value = str;
|
|
|
}
|
|
|
//加入制程【下面到上面】
|
|
|
@@ -896,8 +864,6 @@ const ZP_handleChange = (arr) => {
|
|
|
console.log(arr)
|
|
|
let str = arr.map((val) => val['工单编号']).join(",");
|
|
|
let gxh = arr.map((val) => val['gxh']).join(",");
|
|
|
- console.log(str);
|
|
|
- console.log(gxh);
|
|
|
_ZC_gdbh.value = str;
|
|
|
_gxh.value = gxh;
|
|
|
}
|
|
|
@@ -1118,9 +1084,6 @@ const cjsbpcCancel = () => {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
:deep(.el-tabs__header){
|