parent
1d0cfc3f4d
commit
284e938446
6 changed files with 550 additions and 4 deletions
@ -0,0 +1,34 @@ |
|||||||
|
import request from '@/axios'; |
||||||
|
|
||||||
|
|
||||||
|
// 查询流程卡号订单数据
|
||||||
|
export const getByCardNoByPlanAll = (params) => { |
||||||
|
return request({ |
||||||
|
url: '/blade-desk/disTasking/getByCardNoByPlanAll', |
||||||
|
method: 'get', |
||||||
|
params: params, |
||||||
|
}); |
||||||
|
}; |
||||||
|
|
||||||
|
// 退回此工序 /
|
||||||
|
export const returnThisProcess = (params) => { |
||||||
|
return request({ |
||||||
|
url: '/blade-desk/disTasking/returnThisProcess', |
||||||
|
method: 'post', |
||||||
|
data: params, |
||||||
|
}); |
||||||
|
}; |
||||||
|
|
||||||
|
|
||||||
|
// 回退记录
|
||||||
|
export const getWorkPlanPreserve = (current, size, params) => { |
||||||
|
return request({ |
||||||
|
url: '/blade-desk/disTasking/getWorkPlanPreserve', |
||||||
|
method: 'get', |
||||||
|
params: { |
||||||
|
...params, |
||||||
|
current, |
||||||
|
size, |
||||||
|
} |
||||||
|
}) |
||||||
|
} |
||||||
@ -0,0 +1,238 @@ |
|||||||
|
<template> |
||||||
|
<div> |
||||||
|
<avue-crud |
||||||
|
:option="option" |
||||||
|
:table-loading="loading" |
||||||
|
:data="data" |
||||||
|
v-model="form" |
||||||
|
v-model:page="page" |
||||||
|
ref="crud" |
||||||
|
@search-change="searchChange" |
||||||
|
@search-reset="searchReset" |
||||||
|
@current-change="currentChange" |
||||||
|
@size-change="sizeChange" |
||||||
|
@refresh-change="refreshChange" |
||||||
|
> |
||||||
|
<template #menu-left> |
||||||
|
<el-input |
||||||
|
v-model="cardNo" |
||||||
|
style="width: 240px; margin-right: 24px" |
||||||
|
@keyup.enter.native="changeCode" |
||||||
|
placeholder="请扫描流程卡号" |
||||||
|
/> |
||||||
|
</template> |
||||||
|
<template #menu-right> </template> |
||||||
|
<template #menu="{ row }"> |
||||||
|
<el-button type="text" v-if="row.status > 1" @click="returnThisProcess(row.wpId)" |
||||||
|
>退至此工序</el-button |
||||||
|
> |
||||||
|
</template> |
||||||
|
|
||||||
|
<template #heatTreat="scope"> </template> |
||||||
|
</avue-crud> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import { |
||||||
|
getByCardNoByPlanAll, |
||||||
|
returnThisProcess, |
||||||
|
} from '@/api/productionManagement/returnPrWorkOrder'; |
||||||
|
export default { |
||||||
|
components: {}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
form: {}, |
||||||
|
selectionList: [], |
||||||
|
query: {}, |
||||||
|
loading: false, |
||||||
|
page: { |
||||||
|
pageSize: 10, |
||||||
|
currentPage: 1, |
||||||
|
total: 0, |
||||||
|
}, |
||||||
|
option: { |
||||||
|
columnSort: true, |
||||||
|
tip: false, |
||||||
|
height: 'auto', |
||||||
|
calcHeight: 32, |
||||||
|
simplePage: false, |
||||||
|
searchShow: true, |
||||||
|
searchMenuSpan: 6, |
||||||
|
searchIcon: true, |
||||||
|
searchIndex: 3, |
||||||
|
tree: false, |
||||||
|
border: true, |
||||||
|
index: true, |
||||||
|
selection: false, |
||||||
|
addBtn: false, |
||||||
|
editBtn: false, |
||||||
|
viewBtn: false, |
||||||
|
delBtn: false, |
||||||
|
editBtnText: '修改', |
||||||
|
labelWidth: 120, |
||||||
|
menuWidth: 110, |
||||||
|
dialogWidth: 900, |
||||||
|
dialogClickModal: false, |
||||||
|
searchEnter: true, |
||||||
|
excelBtn: false, |
||||||
|
filterBtn: true, |
||||||
|
searchShowBtn: false, |
||||||
|
excelBtn: true, |
||||||
|
showOverflowTooltip: true, |
||||||
|
addBtnIcon: ' ', |
||||||
|
viewBtnIcon: ' ', |
||||||
|
delBtnIcon: ' ', |
||||||
|
editBtnIcon: ' ', |
||||||
|
gridBtn: false, |
||||||
|
searchLabelPosition: 'left', |
||||||
|
searchGutter: 24, |
||||||
|
searchSpan: 6, |
||||||
|
menuAlign: 'left', |
||||||
|
gridBtn: false, |
||||||
|
searchMenuPosition: 'right', |
||||||
|
align: 'center', |
||||||
|
column: [ |
||||||
|
{ |
||||||
|
label: '车间订单', |
||||||
|
prop: 'woCode', |
||||||
|
search: false, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '流程卡号', |
||||||
|
prop: 'cardNo', |
||||||
|
search: false, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '零件号', |
||||||
|
prop: 'partCode', |
||||||
|
search: false, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '批次号', |
||||||
|
prop: 'batchNo', |
||||||
|
search: false, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '当前工序', |
||||||
|
prop: 'ppsName', |
||||||
|
search: false, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '工序序号', |
||||||
|
prop: 'orders', |
||||||
|
search: false, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
|
||||||
|
data: [], |
||||||
|
cardNo: '', |
||||||
|
}; |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
changeCode() { |
||||||
|
this.loading = true; |
||||||
|
this.$emit('updateDataChange', this.cardNo); |
||||||
|
getByCardNoByPlanAll({ cardNo: this.cardNo }) |
||||||
|
.then(res => { |
||||||
|
// this.cardNo = ''; |
||||||
|
// if (Object.keys(res.data.data).length != 0) { |
||||||
|
// this.data = res.data.data; |
||||||
|
// this.loading = false; |
||||||
|
// } else { |
||||||
|
// this.loading = false; |
||||||
|
// this.$message.error('未找到该流程卡号!'); |
||||||
|
// } |
||||||
|
res.data.data.forEach(item => { |
||||||
|
if (item.receiveMan.userId) { |
||||||
|
item.receive = true; |
||||||
|
} else { |
||||||
|
item.receive = false; |
||||||
|
} |
||||||
|
this.plantList.push(item); |
||||||
|
}); |
||||||
|
this.prWorkOrder = this.plantList[0].prWorkOrder; |
||||||
|
this.$message.success('操作成功'); |
||||||
|
}) |
||||||
|
.catch(err => { |
||||||
|
this.loading = false; |
||||||
|
}); |
||||||
|
}, |
||||||
|
returnThisProcess() { |
||||||
|
this.$prompt('确定将订单退回至此工序,并输入退回理由:', '提示', { |
||||||
|
confirmButtonText: '确定', |
||||||
|
cancelButtonText: '取消', |
||||||
|
type: 'warning', // 图标样式 "warning"|"error"... |
||||||
|
inputErrorMessage: '理由不能为空', |
||||||
|
inputValidator: value => { |
||||||
|
// 点击按钮时,对文本框里面的值进行验证 |
||||||
|
if (!value) { |
||||||
|
return '理由不能为空'; |
||||||
|
} |
||||||
|
}, |
||||||
|
}) |
||||||
|
.then(({ value }) => { |
||||||
|
returnThisProcess({ wpId: wpId, memo: value }).then(res => { |
||||||
|
this.$message.success('退回成功'); |
||||||
|
this.changeCode(); |
||||||
|
}); |
||||||
|
}) |
||||||
|
.catch(() => { |
||||||
|
this.$message({ |
||||||
|
type: 'info', |
||||||
|
message: '已取消', |
||||||
|
}); |
||||||
|
}); |
||||||
|
}, |
||||||
|
searchReset() { |
||||||
|
this.query = {}; |
||||||
|
this.onLoad(this.page); |
||||||
|
}, |
||||||
|
searchChange(params, done) { |
||||||
|
this.query = params; |
||||||
|
this.page.currentPage = 1; |
||||||
|
this.onLoad(this.page, params); |
||||||
|
done(); |
||||||
|
}, |
||||||
|
|
||||||
|
selectionClear() { |
||||||
|
this.selectionList = []; |
||||||
|
this.$refs.crud.toggleSelection(); |
||||||
|
}, |
||||||
|
|
||||||
|
currentChange(currentPage) { |
||||||
|
this.page.currentPage = currentPage; |
||||||
|
}, |
||||||
|
sizeChange(pageSize) { |
||||||
|
this.page.pageSize = pageSize; |
||||||
|
}, |
||||||
|
refreshChange() { |
||||||
|
this.onLoad(this.page, this.query); |
||||||
|
}, |
||||||
|
|
||||||
|
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; |
||||||
|
// }); |
||||||
|
}, |
||||||
|
}, |
||||||
|
mounted() {}, |
||||||
|
}; |
||||||
|
</script> |
||||||
|
d |
||||||
@ -0,0 +1,226 @@ |
|||||||
|
<template> |
||||||
|
<div> |
||||||
|
<avue-crud |
||||||
|
:option="option" |
||||||
|
:table-loading="loading" |
||||||
|
:data="data" |
||||||
|
v-model="form" |
||||||
|
v-model:page="page" |
||||||
|
v-model:search="query" |
||||||
|
ref="crud" |
||||||
|
@search-change="searchChange" |
||||||
|
@search-reset="searchReset" |
||||||
|
@selection-change="selectionChange" |
||||||
|
@current-change="currentChange" |
||||||
|
@size-change="sizeChange" |
||||||
|
@refresh-change="refreshChange" |
||||||
|
> |
||||||
|
<template #menu-left> </template> |
||||||
|
<template #menu-right> </template> |
||||||
|
<template #menu="{ row }"> </template> |
||||||
|
|
||||||
|
<template #updateTimes="scope"> |
||||||
|
{{ scope.row.updateTime }} |
||||||
|
</template> |
||||||
|
</avue-crud> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import { getWorkPlanPreserve } from '@/api/productionManagement/returnPrWorkOrder'; |
||||||
|
export default { |
||||||
|
props: { |
||||||
|
cardNo: { |
||||||
|
type: String, |
||||||
|
default: '', |
||||||
|
}, |
||||||
|
}, |
||||||
|
components: {}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
form: {}, |
||||||
|
selectionList: [], |
||||||
|
query: {}, |
||||||
|
loading: false, |
||||||
|
page: { |
||||||
|
pageSize: 10, |
||||||
|
currentPage: 1, |
||||||
|
total: 0, |
||||||
|
}, |
||||||
|
option: { |
||||||
|
columnSort: true, |
||||||
|
tip: false, |
||||||
|
height: 'auto', |
||||||
|
calcHeight: 32, |
||||||
|
simplePage: false, |
||||||
|
searchShow: true, |
||||||
|
searchMenuSpan: 6, |
||||||
|
searchIcon: true, |
||||||
|
searchIndex: 3, |
||||||
|
tree: false, |
||||||
|
border: true, |
||||||
|
index: true, |
||||||
|
selection: false, |
||||||
|
addBtn: false, |
||||||
|
editBtn: false, |
||||||
|
viewBtn: false, |
||||||
|
delBtn: false, |
||||||
|
editBtnText: '修改', |
||||||
|
labelWidth: 120, |
||||||
|
menuWidth: 80, |
||||||
|
dialogWidth: 900, |
||||||
|
dialogClickModal: false, |
||||||
|
searchEnter: true, |
||||||
|
excelBtn: false, |
||||||
|
filterBtn: true, |
||||||
|
searchShowBtn: false, |
||||||
|
excelBtn: true, |
||||||
|
showOverflowTooltip: true, |
||||||
|
addBtnIcon: ' ', |
||||||
|
viewBtnIcon: ' ', |
||||||
|
delBtnIcon: ' ', |
||||||
|
editBtnIcon: ' ', |
||||||
|
gridBtn: false, |
||||||
|
searchLabelPosition: 'left', |
||||||
|
searchGutter: 24, |
||||||
|
searchSpan: 6, |
||||||
|
menuAlign: 'left', |
||||||
|
gridBtn: false, |
||||||
|
searchMenuPosition: 'right', |
||||||
|
align: 'center', |
||||||
|
menu: false, |
||||||
|
searchLabelWidth: 'auto', |
||||||
|
column: [ |
||||||
|
{ |
||||||
|
label: '车间订单', |
||||||
|
prop: 'woCode', |
||||||
|
search: true, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '流程卡号', |
||||||
|
prop: 'cardNo', |
||||||
|
search: true, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
searchOrder: 20, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '零件号', |
||||||
|
prop: 'partCode', |
||||||
|
search: true, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '批次号', |
||||||
|
prop: 'batchNo', |
||||||
|
search: true, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '当前工序', |
||||||
|
prop: 'ppsName', |
||||||
|
search: false, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '工序序号', |
||||||
|
prop: 'orders', |
||||||
|
search: false, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '回退人', |
||||||
|
prop: 'ldapName', |
||||||
|
search: true, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '备注', |
||||||
|
prop: 'memo', |
||||||
|
search: false, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '回退时间', |
||||||
|
prop: 'updateTimes', |
||||||
|
search: false, |
||||||
|
sortable: false, |
||||||
|
span: 12, |
||||||
|
type: 'date', |
||||||
|
format: 'YYYY-MM-DD', |
||||||
|
valueFormat: 'YYYY-MM-DD', |
||||||
|
searchRange: true, |
||||||
|
startPlaceholder: '开始时间', |
||||||
|
endPlaceholder: '结束时间', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
|
||||||
|
data: [], |
||||||
|
}; |
||||||
|
}, |
||||||
|
methods: { |
||||||
|
|
||||||
|
searchReset() { |
||||||
|
this.query = {}; |
||||||
|
this.onLoad(this.page); |
||||||
|
}, |
||||||
|
searchChange(params, done) { |
||||||
|
this.query = params; |
||||||
|
this.page.currentPage = 1; |
||||||
|
this.onLoad(this.page, params); |
||||||
|
done(); |
||||||
|
}, |
||||||
|
selectionChange(list) { |
||||||
|
this.selectionList = list; |
||||||
|
}, |
||||||
|
selectionClear() { |
||||||
|
this.selectionList = []; |
||||||
|
this.$refs.crud.toggleSelection(); |
||||||
|
}, |
||||||
|
|
||||||
|
currentChange(currentPage) { |
||||||
|
this.page.currentPage = currentPage; |
||||||
|
}, |
||||||
|
sizeChange(pageSize) { |
||||||
|
this.page.pageSize = pageSize; |
||||||
|
}, |
||||||
|
refreshChange() { |
||||||
|
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 = {}) { |
||||||
|
this.loading = true; |
||||||
|
getWorkPlanPreserve(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; |
||||||
|
}).catch(err=>{ |
||||||
|
this.loading = false |
||||||
|
}) |
||||||
|
}, |
||||||
|
}, |
||||||
|
mounted() { |
||||||
|
console.log(8989898,this.cardNo) |
||||||
|
this.query.cardNo = this.cardNo |
||||||
|
this.onLoad(this.page, this.query); |
||||||
|
}, |
||||||
|
}; |
||||||
|
</script> |
||||||
@ -0,0 +1,47 @@ |
|||||||
|
<template> |
||||||
|
<basic-container> |
||||||
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> |
||||||
|
<el-tab-pane label="订单回退" name="preserve"></el-tab-pane> |
||||||
|
<el-tab-pane label="回退记录" name="preserveLog"></el-tab-pane> |
||||||
|
</el-tabs> |
||||||
|
<preserve v-if="activeName == 'preserve'" @updateDataChange="updateDataChange"></preserve> |
||||||
|
<preserveLog |
||||||
|
v-if="activeName == 'preserveLog'" |
||||||
|
:cardNo="cardNo" |
||||||
|
ref="preserveLog" |
||||||
|
></preserveLog> |
||||||
|
</basic-container> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import preserve from './components/preserve.vue'; |
||||||
|
import preserveLog from './components/preserveLog.vue'; |
||||||
|
export default { |
||||||
|
components: { |
||||||
|
preserve, |
||||||
|
preserveLog, |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
activeName: 'preserve', |
||||||
|
cardNo: '', |
||||||
|
}; |
||||||
|
}, |
||||||
|
mounted() {}, |
||||||
|
methods: { |
||||||
|
handleClick() { |
||||||
|
if (this.activeName == 'preserveLog') { |
||||||
|
|
||||||
|
// this.$refs.preserveLog.openss(this.cardNo); |
||||||
|
} |
||||||
|
}, |
||||||
|
updateDataChange(value) { |
||||||
|
console.log('父组件已经更新',value) |
||||||
|
this.cardNo = value; |
||||||
|
}, |
||||||
|
}, |
||||||
|
}; |
||||||
|
</script> |
||||||
|
|
||||||
|
<style> |
||||||
|
</style> |
||||||
@ -1,3 +0,0 @@ |
|||||||
<template> |
|
||||||
订单回退 |
|
||||||
</template> |
|
||||||
Loading…
Reference in new issue