|
|
|
|
@ -16,11 +16,17 @@ |
|
|
|
|
<template #menu="{ row }"> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
<template #partId-form="{type}"> |
|
|
|
|
<el-select v-if="type == 'edit'" placeholder="请选择零件" v-model="form.partId" |
|
|
|
|
@change="changePart"> |
|
|
|
|
<el-option v-for="item in partData" :key="item.id" :label="item.partCode" :value="item.id"></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template #heatTreat="scope"> |
|
|
|
|
<!-- <template #heatTreat="scope"> |
|
|
|
|
<el-tag v-if="scope.row.afterPlating" type="success">是</el-tag> |
|
|
|
|
<el-tag v-else type="warning">否</el-tag> |
|
|
|
|
</template> |
|
|
|
|
</template> --> |
|
|
|
|
|
|
|
|
|
</avue-crud> |
|
|
|
|
|
|
|
|
|
@ -47,7 +53,7 @@ import { |
|
|
|
|
remove, |
|
|
|
|
update, |
|
|
|
|
} from '@/api/system/role'; |
|
|
|
|
import {getList,deleteRemind,editRemind,getSubPartList} from '@/api/qualityManagement/remindRedeem/remindRedeem' |
|
|
|
|
import {getList,deleteRemind,editRemind,getPartList,getSubPartList} from '@/api/qualityManagement/remindRedeem/remindRedeem' |
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
import { validatenull } from '@/utils/validate'; |
|
|
|
|
import basicImport from '@/components/basic-import/main.vue' |
|
|
|
|
@ -60,6 +66,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
partData:[], |
|
|
|
|
isShowImport:false, |
|
|
|
|
inBatchesOpen: false, |
|
|
|
|
platingSmallOpen: false, |
|
|
|
|
@ -153,17 +160,17 @@ export default { |
|
|
|
|
label: 'partCode', |
|
|
|
|
value:'id' |
|
|
|
|
}, |
|
|
|
|
onChange:val =>{ |
|
|
|
|
console.log('val-------------',val) |
|
|
|
|
this.form.partName = val && val.item && val.item.partName |
|
|
|
|
getSubPartList({ |
|
|
|
|
partCode:val && val.item && val.item.partCode |
|
|
|
|
}).then(res =>{ |
|
|
|
|
console.log('option--------',this.option) |
|
|
|
|
this.option.column[6].dicData = res.data.data |
|
|
|
|
// this.form.tableData[index].subList = res.data.data |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
// onChange:val =>{ |
|
|
|
|
// console.log('val-------------',val) |
|
|
|
|
// this.form.partName = val && val.item && val.item.partName |
|
|
|
|
// getSubPartList({ |
|
|
|
|
// partCode:val && val.item && val.item.partCode |
|
|
|
|
// }).then(res =>{ |
|
|
|
|
// console.log('option--------',this.option) |
|
|
|
|
// this.option.column[6].dicData = res.data.data |
|
|
|
|
// // this.form.tableData[index].subList = res.data.data |
|
|
|
|
// }) |
|
|
|
|
// } |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '零件名称', |
|
|
|
|
@ -305,7 +312,27 @@ export default { |
|
|
|
|
isBatchOpen: false,//分批处理 |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
this.getPartList() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
changePart(val){ |
|
|
|
|
let tmp = this.partData.find(item => item.id == val) |
|
|
|
|
this.form.partName = tmp && tmp.partName |
|
|
|
|
getSubPartList({ |
|
|
|
|
partCode:val && val.item && val.item.partCode |
|
|
|
|
}).then(res =>{ |
|
|
|
|
console.log('option--------',this.option) |
|
|
|
|
this.option.column[6].dicData = res.data.data |
|
|
|
|
// this.form.tableData[index].subList = res.data.data |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getPartList(){ |
|
|
|
|
getPartList().then(res =>{ |
|
|
|
|
this.partData = res.data.data |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 点击新增按钮 |
|
|
|
|
handleAdd(){ |
|
|
|
|
console.log('111111111111111') |
|
|
|
|
@ -315,24 +342,6 @@ export default { |
|
|
|
|
handleImport() { |
|
|
|
|
this.isShowImport = true |
|
|
|
|
}, |
|
|
|
|
// 批量接收 |
|
|
|
|
batchReceiving() { |
|
|
|
|
this.$confirm('确定将选择数据批量接收?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
// return remove(row.id); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
// this.onLoad(this.page); |
|
|
|
|
// this.$message({ |
|
|
|
|
// type: 'success', |
|
|
|
|
// message: '操作成功!', |
|
|
|
|
// }); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 批量关闭 |
|
|
|
|
batchDel() { |
|
|
|
|
if(this.selectionList.length == 0){ |
|
|
|
|
@ -354,40 +363,15 @@ export default { |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 加急 |
|
|
|
|
rushFn() { |
|
|
|
|
this.isRushOpen = true |
|
|
|
|
}, |
|
|
|
|
closeDialog(val) { |
|
|
|
|
this.isRushOpen = false |
|
|
|
|
this.isBatchOpen = false |
|
|
|
|
this.showDialog = false |
|
|
|
|
this.isShowImport = false |
|
|
|
|
console.log('partName---------------------',val) |
|
|
|
|
if(val){ |
|
|
|
|
this.onLoad() |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
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'); |
|
|
|
|
@ -424,22 +408,6 @@ export default { |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
|
update(row).then( |
|
|
|
|
() => { |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.$message({ |
|
|
|
|
type: 'success', |
|
|
|
|
message: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
error => { |
|
|
|
|
window.console.log(error); |
|
|
|
|
loading(); |
|
|
|
|
} |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
rowUpdate( row, index, done, loading){ |
|
|
|
|
editRemind(row).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
@ -485,78 +453,7 @@ export default { |
|
|
|
|
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) { |
|
|
|
|
this.page.currentPage = currentPage; |
|
|
|
|
@ -565,18 +462,8 @@ export default { |
|
|
|
|
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: '操作成功!', |
|
|
|
|
}); |
|
|
|
|
this.onLoad(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
getList({ |
|
|
|
|
@ -590,24 +477,11 @@ export default { |
|
|
|
|
}).catch(err =>{ |
|
|
|
|
console.log('err00000000000',err) |
|
|
|
|
this.loading = false |
|
|
|
|
this.data = [ |
|
|
|
|
{} |
|
|
|
|
] |
|
|
|
|
this.data = [] |
|
|
|
|
this.page.total = 0 |
|
|
|
|
}) |
|
|
|
|
// this.data = [ |
|
|
|
|
// {} |
|
|
|
|
// ] |
|
|
|
|
// this.page.total = this.data.length |
|
|
|
|
// // 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 |
|
|
|
|
// this.selectionClear(); |
|
|
|
|
// }); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|