|
|
|
|
@ -46,37 +46,29 @@ |
|
|
|
|
}}</el-tag> |
|
|
|
|
</template> |
|
|
|
|
<template #menu="{ row }"> |
|
|
|
|
<el-button text @click="editData(row)">修改</el-button> |
|
|
|
|
<el-button text @click="editData1(row)">修改1</el-button> |
|
|
|
|
<!-- <el-button type="primary" text plain style="border: 0; background-color: transparent !important" |
|
|
|
|
@click="lookProcessRoute(row)">查看工艺路线 |
|
|
|
|
</el-button> --> |
|
|
|
|
</template> |
|
|
|
|
</avue-crud> |
|
|
|
|
<!-- <el-dialog v-model="isEdit" width="60%" title="修改"> |
|
|
|
|
<el-form :model="editForm"> |
|
|
|
|
<el-form-item label="计划单号"> |
|
|
|
|
<el-input></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</el-dialog> --> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { getList, closeBatchs,updateData } from '@/api/orderManagement/exceptionOrder'; |
|
|
|
|
// import { |
|
|
|
|
// add, |
|
|
|
|
// getRole, |
|
|
|
|
// getRoleAlias, |
|
|
|
|
// getRoleTreeById, |
|
|
|
|
// grant, |
|
|
|
|
// grantTree, |
|
|
|
|
// remove, |
|
|
|
|
// update, |
|
|
|
|
// } from '@/api/system/role'; |
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
import website from '@/config/website'; |
|
|
|
|
import { validatenull } from '@/utils/validate'; |
|
|
|
|
// import { getList } from '@/api/base/region'; |
|
|
|
|
import { templateDic } from '@/const/tool/model'; |
|
|
|
|
// import orderCol from './orderCol.js' |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
// lookProcess |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
editForm:{}, |
|
|
|
|
isEdit:false, |
|
|
|
|
isOpen: false, |
|
|
|
|
rowItem: {}, |
|
|
|
|
poId: null, |
|
|
|
|
@ -118,7 +110,7 @@ export default { |
|
|
|
|
viewBtn: false, |
|
|
|
|
delBtn: false, |
|
|
|
|
addBtn: false, |
|
|
|
|
editBtn: true, |
|
|
|
|
editBtn: false, |
|
|
|
|
editBtnText: '修改', |
|
|
|
|
labelWidth: 120, |
|
|
|
|
// searchLabelWidth: 120, |
|
|
|
|
@ -491,6 +483,18 @@ export default { |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
editData(row){ |
|
|
|
|
this.isEdit = true |
|
|
|
|
}, |
|
|
|
|
editData1(row){ |
|
|
|
|
updateData(row).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('修改成功') |
|
|
|
|
this.onLoad() |
|
|
|
|
done() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 关闭订单 |
|
|
|
|
claseOrder() { |
|
|
|
|
// 检查是否选择了数据 |
|
|
|
|
@ -509,9 +513,7 @@ export default { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
.then(() => { |
|
|
|
|
}) .then(() => { |
|
|
|
|
const ids = this.selectionList.map(item => item.id).join(','); |
|
|
|
|
closeBatchs({ ...{ ids } }).then(res => { |
|
|
|
|
if (res.data.code === 200) { |
|
|
|
|
@ -531,22 +533,17 @@ export default { |
|
|
|
|
}, |
|
|
|
|
searchReset() { |
|
|
|
|
this.query = {}; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
this.onLoad(); |
|
|
|
|
}, |
|
|
|
|
searchChange(params, done) { |
|
|
|
|
this.query = params; |
|
|
|
|
this.page.currentPage = 1; |
|
|
|
|
this.onLoad(this.page, params); |
|
|
|
|
this.onLoad(); |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
selectionChange(list) { |
|
|
|
|
this.selectionList = list; |
|
|
|
|
}, |
|
|
|
|
selectionClear() { |
|
|
|
|
this.selectionList = []; |
|
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
currentChange(currentPage) { |
|
|
|
|
this.page.currentPage = currentPage; |
|
|
|
|
}, |
|
|
|
|
@ -554,65 +551,54 @@ 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(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
async onLoad(page, params = {}) { |
|
|
|
|
onLoad() { |
|
|
|
|
this.loading = true; |
|
|
|
|
this.query.partCode = this.query.partCode1 |
|
|
|
|
if(this.query.partCode1){ |
|
|
|
|
delete this.query.partCode1 |
|
|
|
|
} |
|
|
|
|
try { |
|
|
|
|
const res = await getList({ |
|
|
|
|
current:this.page.currentPage, |
|
|
|
|
size:this.page.pageSize, |
|
|
|
|
validationResult: '16002', |
|
|
|
|
...this.query, |
|
|
|
|
}); |
|
|
|
|
// if (res.data.code) { |
|
|
|
|
getList({ |
|
|
|
|
current:this.page.currentPage, |
|
|
|
|
size:this.page.pageSize, |
|
|
|
|
validationResult: '16002', |
|
|
|
|
...this.query, |
|
|
|
|
}).then(res =>{ |
|
|
|
|
if (res.data.code) { |
|
|
|
|
this.data = res.data.data.records; |
|
|
|
|
this.page.total = res.data.data.total; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
this.loading = false; |
|
|
|
|
// } |
|
|
|
|
} catch (err) { |
|
|
|
|
console.log(err); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
rowUpdate( row, index, done, loading) { |
|
|
|
|
updateData(row).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success('修改成功') |
|
|
|
|
this.onLoad() |
|
|
|
|
done() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
// edit(row).then( |
|
|
|
|
// () => { |
|
|
|
|
// this.onLoad(this.page); |
|
|
|
|
// this.$message({ |
|
|
|
|
// type: 'success', |
|
|
|
|
// message: '操作成功!', |
|
|
|
|
// }); |
|
|
|
|
// done(); |
|
|
|
|
// }, |
|
|
|
|
// error => { |
|
|
|
|
// window.console.log(error); |
|
|
|
|
// loading(); |
|
|
|
|
// } |
|
|
|
|
// ); |
|
|
|
|
// try { |
|
|
|
|
// const res = await getList({ |
|
|
|
|
// current:this.page.currentPage, |
|
|
|
|
// size:this.page.pageSize, |
|
|
|
|
// validationResult: '16002', |
|
|
|
|
// ...this.query, |
|
|
|
|
// }); |
|
|
|
|
// // if (res.data.code) { |
|
|
|
|
// this.data = res.data.data.records; |
|
|
|
|
// this.page.total = res.data.data.total; |
|
|
|
|
// this.selectionClear(); |
|
|
|
|
// this.loading = false; |
|
|
|
|
// // } |
|
|
|
|
// } catch (err) { |
|
|
|
|
// console.log(err); |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
// rowUpdate( row, index, done, loading) { |
|
|
|
|
// updateData(row).then(res =>{ |
|
|
|
|
// if(res.data.code == 200){ |
|
|
|
|
// this.$message.success('修改成功') |
|
|
|
|
// this.onLoad() |
|
|
|
|
// done() |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// }, |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
// this.option.column = orderCol['exceptionOrder'] |
|
|
|
|
|