|
|
|
|
@ -8,6 +8,8 @@ |
|
|
|
|
v-model:page="page" |
|
|
|
|
ref="crud" |
|
|
|
|
@row-del="rowDel" |
|
|
|
|
@row-save="rowSave" |
|
|
|
|
@row-update="rowUpdate" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
@ -17,27 +19,23 @@ |
|
|
|
|
@on-load="onLoad" |
|
|
|
|
> |
|
|
|
|
<template #menu-left> |
|
|
|
|
<el-button type="danger">删除</el-button> |
|
|
|
|
<el-button type="danger" @click="handleDelete">删除</el-button> |
|
|
|
|
</template> |
|
|
|
|
<template #menu-right> |
|
|
|
|
<el-button type="primary">导入</el-button> |
|
|
|
|
</template> |
|
|
|
|
<template #menu="scope"> |
|
|
|
|
<el-button type="text" size="mini" @click="handle(scope.row.tbId)" |
|
|
|
|
>处理</el-button |
|
|
|
|
> |
|
|
|
|
<el-button type="primary" @click="handleImport">导入</el-button> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
<!-- 导入 --> |
|
|
|
|
<basic-import v-if="isShowImport" title="导入" :isShow="isShowImport" |
|
|
|
|
templateUrl="/blade-desk/QA/CycleTestItem/download-excel-template" |
|
|
|
|
templateName="试验项目模板.xlsx" |
|
|
|
|
importUrl="/blade-desk/QA/CycleTestItem/import-excel" |
|
|
|
|
templateUrl="/blade-desk/mesOemProcess/downloadExcelTemplate" |
|
|
|
|
templateName="外协工序模板.xlsx" |
|
|
|
|
importUrl="/blade-desk/mesOemProcess/importExcel" |
|
|
|
|
@closeDialog="closeDialog"></basic-import> |
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import basicImport from '@/components/basic-import/main.vue' |
|
|
|
|
import {getList,addOutProcess,updateOutProcess,deleteOutProcess} from "@/api/outsourcingManagement/oemProcess" |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
basicImport |
|
|
|
|
@ -46,6 +44,7 @@ export default { |
|
|
|
|
return { |
|
|
|
|
isShowImport: false, |
|
|
|
|
loading: false, |
|
|
|
|
query:{}, |
|
|
|
|
selectionList: [], |
|
|
|
|
option: { |
|
|
|
|
height: "auto", |
|
|
|
|
@ -70,7 +69,7 @@ export default { |
|
|
|
|
editBtnIcon: " ", |
|
|
|
|
viewBtnText: "详情", |
|
|
|
|
labelWidth: 90, |
|
|
|
|
menuWidth: 180, |
|
|
|
|
menuWidth: 120, |
|
|
|
|
dialogWidth: 440, |
|
|
|
|
dialogClickModal: false, |
|
|
|
|
searchEnter: true, |
|
|
|
|
@ -85,7 +84,7 @@ export default { |
|
|
|
|
searchLabelPosition: "left", |
|
|
|
|
searchGutter: 24, |
|
|
|
|
searchSpan: 6, |
|
|
|
|
menuAlign: "left", |
|
|
|
|
menuAlign: "center", |
|
|
|
|
gridBtn: false, |
|
|
|
|
searchMenuPosition: "right", |
|
|
|
|
addBtnIcon: " ", |
|
|
|
|
@ -96,7 +95,7 @@ export default { |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "工序编码", |
|
|
|
|
prop: "bopCode", |
|
|
|
|
prop: "oemProcessCode", |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
span: 12, |
|
|
|
|
@ -105,7 +104,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "工序", |
|
|
|
|
prop: "bopName", |
|
|
|
|
prop: "processIdStr", |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
@ -113,16 +112,11 @@ export default { |
|
|
|
|
searchLabelWidth: 50, |
|
|
|
|
type: "select", |
|
|
|
|
filterable: true, |
|
|
|
|
dicData: [ |
|
|
|
|
{ |
|
|
|
|
label: "工序1", |
|
|
|
|
value: 1, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "工序2", |
|
|
|
|
value: 2, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
dicUrl:"/api/blade-scheduling/processSet/findList", |
|
|
|
|
props:{ |
|
|
|
|
label: "name", |
|
|
|
|
value:"id" |
|
|
|
|
}, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
@ -130,10 +124,14 @@ export default { |
|
|
|
|
trigger: "blur", |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
change:val =>{ |
|
|
|
|
console.log('val==========',val) |
|
|
|
|
this.form.oemProcessCode = val.item.code |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "工艺能力", |
|
|
|
|
prop: "caNameTest", |
|
|
|
|
prop: "craftIds", |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
filter: true, |
|
|
|
|
@ -141,16 +139,11 @@ export default { |
|
|
|
|
type: "select", |
|
|
|
|
multiple: true, |
|
|
|
|
filterable: true, |
|
|
|
|
dicData: [ |
|
|
|
|
{ |
|
|
|
|
label: "工序1", |
|
|
|
|
value: 1, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "工序2", |
|
|
|
|
value: 2, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
dicUrl:"/api/blade-desk/BA/craftAbility/findList", |
|
|
|
|
props:{ |
|
|
|
|
label:'caName', |
|
|
|
|
value:"id" |
|
|
|
|
}, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
@ -174,6 +167,12 @@ export default { |
|
|
|
|
handleImport() { |
|
|
|
|
this.isShowImport = true |
|
|
|
|
}, |
|
|
|
|
closeDialog(val){ |
|
|
|
|
this.isShowImport = false |
|
|
|
|
if(val){ |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
handleDelete() { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning("请选择至少一条数据"); |
|
|
|
|
@ -189,14 +188,102 @@ export default { |
|
|
|
|
selectionChange(list) { |
|
|
|
|
this.selectionList = list; |
|
|
|
|
}, |
|
|
|
|
searchChange(params, done){ |
|
|
|
|
this.page.currentPage = 1 |
|
|
|
|
this.query = params |
|
|
|
|
this.onLoad() |
|
|
|
|
done() |
|
|
|
|
}, |
|
|
|
|
searchReset(){ |
|
|
|
|
this.query = {} |
|
|
|
|
this.onLoad() |
|
|
|
|
}, |
|
|
|
|
currentChange(currentPage){ |
|
|
|
|
this.page.currentPage = currentPage |
|
|
|
|
}, |
|
|
|
|
sizeChange(pageSize){ |
|
|
|
|
this.page.pageSize = pageSize |
|
|
|
|
}, |
|
|
|
|
refreshChange(){ |
|
|
|
|
this.onLoad() |
|
|
|
|
}, |
|
|
|
|
rowSave(row, done, loading){ |
|
|
|
|
row.processId = row.processIdStr |
|
|
|
|
addOutProcess(row).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('添加成功') |
|
|
|
|
done() |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}).catch(err =>{ |
|
|
|
|
done() |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
rowUpdate(row, index, done, loading){ |
|
|
|
|
row.processId = row.processIdStr |
|
|
|
|
updateOutProcess(row).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('修改成功') |
|
|
|
|
done() |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}).catch(err =>{ |
|
|
|
|
done() |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
handleDelete(){ |
|
|
|
|
if(this.selectionList.length == 0){ |
|
|
|
|
this.$message.error('请至少选择一条数据') |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
this.$confirm("确定删除选中数据?", { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning", |
|
|
|
|
}).then(() => { |
|
|
|
|
deleteOutProcess({ |
|
|
|
|
ids:this.selectionList.map(item => item.id).join(",") |
|
|
|
|
}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('删除成功') |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
rowDel(row){ |
|
|
|
|
this.$confirm("确定删除选中数据?", { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning", |
|
|
|
|
}).then(() => { |
|
|
|
|
deleteOutProcess({ |
|
|
|
|
ids:row.id |
|
|
|
|
}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('删除成功') |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
onLoad() { |
|
|
|
|
this.loading = true; |
|
|
|
|
this.data = [{}]; |
|
|
|
|
this.page.total = this.data.length; |
|
|
|
|
this.loading = false; |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}, 500); |
|
|
|
|
getList({ |
|
|
|
|
current:this.page.currentPage, |
|
|
|
|
size:this.page.pageSize, |
|
|
|
|
...this.query |
|
|
|
|
}).then(res =>{ |
|
|
|
|
this.data = res.data.data.records |
|
|
|
|
this.page.total = res.data.data.total |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
// this.data = [{}]; |
|
|
|
|
// this.page.total = this.data.length; |
|
|
|
|
// this.loading = false; |
|
|
|
|
// setTimeout(() => { |
|
|
|
|
// this.selectionClear(); |
|
|
|
|
// }, 500); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
|