parent
b6bcd23f34
commit
dd30baf05e
11 changed files with 3417 additions and 6 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,704 @@ |
|||||||
|
<template> |
||||||
|
<avue-crud |
||||||
|
:option="option" |
||||||
|
:table-loading="loading" |
||||||
|
:data="data" |
||||||
|
v-model="form" |
||||||
|
v-model:page="page" |
||||||
|
ref="crud" |
||||||
|
@row-del="rowDel" |
||||||
|
@search-change="searchChange" |
||||||
|
@search-reset="searchReset" |
||||||
|
@selection-change="selectionChange" |
||||||
|
@current-change="currentChange" |
||||||
|
@size-change="sizeChange" |
||||||
|
@refresh-change="refreshChange" |
||||||
|
@on-load="onLoad" |
||||||
|
@row-update="rowUpdate" |
||||||
|
@sort-change="sortChange" |
||||||
|
> |
||||||
|
<template #menu-left> |
||||||
|
<el-button type="primary" @click="claseOrder()" >关闭订单</el-button> |
||||||
|
</template> |
||||||
|
<template #menu-right> </template> |
||||||
|
|
||||||
|
<template #ypCode="{ row }"> |
||||||
|
<el-text type="primary">{{ row.ypCode }}</el-text> |
||||||
|
</template> |
||||||
|
<template #productIdent="{ row }"> |
||||||
|
<el-tag>{{ row.productIdent }}</el-tag> |
||||||
|
</template> |
||||||
|
<template #curStatusText="{ row }"> |
||||||
|
<el-tag v-if="row.curStatusText == '已派工'">{{ row.curStatusText }}</el-tag> |
||||||
|
<el-tag class="ml-2" type="success" v-if="row.curStatusText == '已完工'"> |
||||||
|
{{ row.curStatusText }}</el-tag |
||||||
|
> |
||||||
|
<el-tag class="ml-2" type="info" v-if="row.curStatusText == '已关闭'">{{ |
||||||
|
row.curStatusText |
||||||
|
}}</el-tag> |
||||||
|
<el-tag class="ml-2" type="warning" v-if="row.curStatusText == '加工中'">{{ |
||||||
|
row.curStatusText |
||||||
|
}}</el-tag> |
||||||
|
<el-tag class="ml-2" type="danger" v-if="row.curStatusText == '已退回'">{{ |
||||||
|
row.curStatusText |
||||||
|
}}</el-tag> |
||||||
|
<el-tag class="ml-2" type="danger" v-if="row.curStatusText == '无工艺'">{{ |
||||||
|
row.curStatusText |
||||||
|
}}</el-tag> |
||||||
|
</template> |
||||||
|
<!-- <template #demandDate="{ row }"> |
||||||
|
<el-text class="mx-1" type="danger">{{ row.demandDate }}</el-text> |
||||||
|
</template> --> |
||||||
|
<template #menu="{ row }"> </template> |
||||||
|
<template #demandDate="{ row }"> |
||||||
|
{{ row.demandDate ? row.demandDate.substring(0, 10) : '' }} |
||||||
|
</template> |
||||||
|
|
||||||
|
</avue-crud> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import { getList, closeBatchs,updateData } from '@/api/orderManagement/exceptionOrder'; |
||||||
|
export default { |
||||||
|
components: {}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
isOpen: false, |
||||||
|
rowItem: {}, |
||||||
|
poId: null, |
||||||
|
form: {}, |
||||||
|
box: false, |
||||||
|
props: { |
||||||
|
label: 'title', |
||||||
|
value: 'key', |
||||||
|
}, |
||||||
|
menuGrantList: [], |
||||||
|
dataScopeGrantList: [], |
||||||
|
apiScopeGrantList: [], |
||||||
|
apiGrantList: [], |
||||||
|
menuTreeObj: [], |
||||||
|
dataScopeTreeObj: [], |
||||||
|
apiScopeTreeObj: [], |
||||||
|
selectionList: [], |
||||||
|
query: {}, |
||||||
|
loading: true, |
||||||
|
page: { |
||||||
|
pageSize: 10, |
||||||
|
currentPage: 1, |
||||||
|
total: 0, |
||||||
|
}, |
||||||
|
option: { |
||||||
|
columnSort: true, |
||||||
|
tip: false, |
||||||
|
height: 'auto', |
||||||
|
calcHeight: 32, |
||||||
|
simplePage: false, |
||||||
|
searchShow: true, |
||||||
|
searchMenuSpan: 12, |
||||||
|
searchIcon: true, |
||||||
|
searchIndex: 3, |
||||||
|
tree: false, |
||||||
|
border: true, |
||||||
|
index: false, |
||||||
|
selection: true, |
||||||
|
viewBtn: false, |
||||||
|
delBtn: false, |
||||||
|
addBtn: false, |
||||||
|
editBtn: false, |
||||||
|
editBtnText: '修改', |
||||||
|
labelWidth: 120, |
||||||
|
// searchLabelWidth: 120, |
||||||
|
menuWidth: 80, |
||||||
|
dialogWidth: 900, |
||||||
|
dialogClickModal: false, |
||||||
|
searchEnter: true, |
||||||
|
excelBtn: false, |
||||||
|
filterBtn: true, |
||||||
|
searchShowBtn: false, |
||||||
|
excelBtn: true, |
||||||
|
showOverflowTooltip: true, |
||||||
|
addBtnIcon: ' ', |
||||||
|
viewBtnIcon: ' ', |
||||||
|
delBtnIcon: ' ', |
||||||
|
editBtnIcon: ' ', |
||||||
|
menuAlign: 'center', |
||||||
|
menu:false, |
||||||
|
gridBtn: false, |
||||||
|
searchLabelPosition: 'left', |
||||||
|
searchLabelWidth: 'auto', |
||||||
|
searchGutter: 24, |
||||||
|
searchSpan: 6, |
||||||
|
gridBtn: false, |
||||||
|
searchMenuPosition: 'right', |
||||||
|
align: 'center', |
||||||
|
|
||||||
|
column: [ |
||||||
|
{ |
||||||
|
label: '计划单号', |
||||||
|
prop: 'ypCode', |
||||||
|
search: true, |
||||||
|
sortable: 'custom', |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入角色名称', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '生产订单', |
||||||
|
prop: 'yoCode', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入生产订单', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '零件号', |
||||||
|
prop: 'partCode1', |
||||||
|
search: true, |
||||||
|
sortable: 'custom', |
||||||
|
addDisplay:false, |
||||||
|
editDisplay:false, |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
hide:true, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
// rules: [ |
||||||
|
// { |
||||||
|
// required: true, |
||||||
|
// message: '请输入零件号', |
||||||
|
// trigger: 'blur', |
||||||
|
// }, |
||||||
|
// ], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '零件号', |
||||||
|
prop: 'partCode', |
||||||
|
// type:"select", |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
// dicUrl:'/api/blade-desk/dsPart/getPartList', |
||||||
|
// props:{ |
||||||
|
// label: 'partCode', |
||||||
|
// value:'partCode' |
||||||
|
// }, |
||||||
|
// onChange:val =>{ |
||||||
|
// this.form.partName = val.item.partName |
||||||
|
// }, |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请选择零件号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '产品型号', |
||||||
|
prop: 'productType', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入产品型号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '产品名称', |
||||||
|
prop: 'partName', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
span: 12, |
||||||
|
width: 150, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'left', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入产品名称', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '流程卡号', |
||||||
|
prop: 'cardNo', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
span: 12, |
||||||
|
width: 150, |
||||||
|
searchOrder:20, |
||||||
|
headerAlign: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入流程卡号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '批次号', |
||||||
|
prop: 'batchNo', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
span: 12, |
||||||
|
width: 150, |
||||||
|
headerAlign: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入批次号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '镀种', |
||||||
|
prop: 'plate', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入镀种', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
// { |
||||||
|
// label: '镀种小类', |
||||||
|
// prop: 'plate1', |
||||||
|
// search: false, |
||||||
|
// sortable: 'custom', |
||||||
|
// width: 120, |
||||||
|
// display: false, |
||||||
|
// span: 12, |
||||||
|
// headerAlign: 'center', |
||||||
|
// align: 'center', |
||||||
|
// rules: [ |
||||||
|
// { |
||||||
|
// required: true, |
||||||
|
// message: '请输入角色名称', |
||||||
|
// trigger: 'blur', |
||||||
|
// }, |
||||||
|
// ], |
||||||
|
// }, |
||||||
|
{ |
||||||
|
label: '面积(d㎡)', |
||||||
|
prop: 'ypArea', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
disabled: true, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入面积(d㎡)', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '生产标识', |
||||||
|
prop: 'productIdent', |
||||||
|
type: 'select', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
dicUrl:'/api/blade-desk/BA/ProdMark/listForSelect', |
||||||
|
props:{ |
||||||
|
label:'name', |
||||||
|
value:'name' |
||||||
|
}, |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入生产标识', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '使用部门', |
||||||
|
prop: 'useDept', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入使用部门', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '生产数量', |
||||||
|
prop: 'ypQty', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入生产数量', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
|
||||||
|
{ |
||||||
|
label: '需求交期', |
||||||
|
prop: 'demandDate', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 180, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
type: 'datetime', // 改成 datetime |
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', // 输出格式 |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入需求交期', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '计划部门编码', |
||||||
|
prop: 'planDeptCode', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 140, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '计划员', |
||||||
|
prop: 'planUser', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入计划员', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '计划下达时间', |
||||||
|
prop: 'releaseDate', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
searchLabelWidth: 100, |
||||||
|
width: 180, |
||||||
|
span: 12, |
||||||
|
type: 'datetime', // 改成 datetime |
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', // 输出格式 |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入计划下达时间', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '订单状态', |
||||||
|
prop: 'status', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 12, |
||||||
|
display: false, |
||||||
|
type: 'select', |
||||||
|
width: '140', |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
dicData: [ |
||||||
|
{ |
||||||
|
value: 10000, |
||||||
|
label: '已同步', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10001, |
||||||
|
label: '订单异常', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10002, |
||||||
|
label: '未下达', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10003, |
||||||
|
label: '待排产', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10004, |
||||||
|
label: '待生产', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10005, |
||||||
|
label: '加工中', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10006, |
||||||
|
label: '排产异常', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10015, |
||||||
|
label: '已完工', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10021, |
||||||
|
label: '已关闭', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '接收状态', |
||||||
|
prop: 'receiveStatus', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 24, |
||||||
|
width: 100, |
||||||
|
type: 'select', |
||||||
|
dicData: [ |
||||||
|
{ |
||||||
|
value: '11000', |
||||||
|
label: '未接收', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: '11001', |
||||||
|
label: '已接收', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '接收人', |
||||||
|
prop: 'receiveUserName', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 24, |
||||||
|
width: 100, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '接收时间', |
||||||
|
prop: 'receiveTime', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 24, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '创建时间', |
||||||
|
prop: 'createTime', |
||||||
|
width: '140', |
||||||
|
sortable: 'custom', |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '备注', |
||||||
|
prop: 'memo', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 24, |
||||||
|
type: 'textarea', |
||||||
|
width: 150, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'left', |
||||||
|
// rules: [ |
||||||
|
// { |
||||||
|
// required: true, |
||||||
|
// message: '请输入备注', |
||||||
|
// trigger: 'blur', |
||||||
|
// }, |
||||||
|
// ], |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
|
||||||
|
data: [], |
||||||
|
}; |
||||||
|
}, |
||||||
|
|
||||||
|
methods: { |
||||||
|
sortChange({ prop, order }) { |
||||||
|
if (!prop) { |
||||||
|
// 如果取消排序,清空排序参数 |
||||||
|
this.query.orderByField = undefined; |
||||||
|
this.query.asc = undefined; |
||||||
|
} else { |
||||||
|
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); |
||||||
|
|
||||||
|
this.query.orderByField = orderByField; |
||||||
|
this.query.asc = order === 'ascending'?true:false; |
||||||
|
} |
||||||
|
// // 重新加载数据 |
||||||
|
this.onLoad(this.page, this.query); |
||||||
|
}, |
||||||
|
rowUpdate(row, index, done, loading){ |
||||||
|
updateData(row).then(res => { |
||||||
|
if(res.data.code == 200){ |
||||||
|
this.$message.success('修改成功') |
||||||
|
this.onLoad() |
||||||
|
done() |
||||||
|
} |
||||||
|
}); |
||||||
|
}, |
||||||
|
// 关闭订单 |
||||||
|
claseOrder() { |
||||||
|
// 检查是否选择了数据 |
||||||
|
if (this.selectionList.length === 0) { |
||||||
|
this.$message.error('请至少选择一条数据!'); |
||||||
|
return; |
||||||
|
} |
||||||
|
let tmp = this.selectionList.filter(item => item.status === 10015 || item.status === 10021) |
||||||
|
if(tmp.length > 0){ |
||||||
|
this.$message.error('请勿选择状态为【已完工】或【已关闭】的数据'); |
||||||
|
return |
||||||
|
} |
||||||
|
this.$confirm('确定将选择数据批量关闭?', { |
||||||
|
confirmButtonText: '确定', |
||||||
|
cancelButtonText: '取消', |
||||||
|
type: 'warning', |
||||||
|
}) |
||||||
|
.then(() => { |
||||||
|
const ids = this.selectionList.map(item => item.id).join(','); |
||||||
|
closeBatchs({ ...{ ids } }).then(res => { |
||||||
|
if (res.data.code === 200) { |
||||||
|
this.$message.success('关闭成功'); |
||||||
|
this.$refs.crud.toggleSelection(); |
||||||
|
this.onLoad(this.page); |
||||||
|
} |
||||||
|
}); |
||||||
|
}) |
||||||
|
.catch(() => { |
||||||
|
// this.onLoad(this.page); |
||||||
|
// this.$message({ |
||||||
|
// type: 'success', |
||||||
|
// message: '操作成功!', |
||||||
|
// }); |
||||||
|
}); |
||||||
|
}, |
||||||
|
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: '操作成功!', |
||||||
|
}); |
||||||
|
}, |
||||||
|
|
||||||
|
async onLoad(page, params = {}) { |
||||||
|
this.query.partCode = this.query.partCode1 |
||||||
|
if(this.query.partCode1){ |
||||||
|
delete this.query.partCode1 |
||||||
|
} |
||||||
|
this.loading = true; |
||||||
|
try { |
||||||
|
const res = await getList({ |
||||||
|
current:this.page.currentPage, |
||||||
|
size:this.page.pageSize, |
||||||
|
validationResult: '16005', |
||||||
|
...this.query, |
||||||
|
yieldType:'12002', |
||||||
|
}); |
||||||
|
// if (res.code) { |
||||||
|
this.data = res.data.data.records; |
||||||
|
this.page.total = res.data.data.total; |
||||||
|
this.selectionClear(); |
||||||
|
this.loading = false; |
||||||
|
// } |
||||||
|
} catch (err) { |
||||||
|
console.log(err); |
||||||
|
} |
||||||
|
}, |
||||||
|
}, |
||||||
|
mounted() { |
||||||
|
// this.option.column = orderCol['exceptionOrder'] |
||||||
|
}, |
||||||
|
}; |
||||||
|
</script> |
||||||
@ -0,0 +1,830 @@ |
|||||||
|
<template> |
||||||
|
<avue-crud |
||||||
|
:option="option" |
||||||
|
:table-loading="loading" |
||||||
|
:data="data" |
||||||
|
v-model="form" |
||||||
|
v-model:page="page" |
||||||
|
ref="crud" |
||||||
|
@row-del="rowDel" |
||||||
|
@search-change="searchChange" |
||||||
|
@search-reset="searchReset" |
||||||
|
@selection-change="selectionChange" |
||||||
|
@current-change="currentChange" |
||||||
|
@size-change="sizeChange" |
||||||
|
@refresh-change="refreshChange" |
||||||
|
@on-load="onLoad" |
||||||
|
@row-update="rowUpdate" |
||||||
|
@sort-change="sortChange" |
||||||
|
> |
||||||
|
<template #menu-left> |
||||||
|
<el-button type="primary" @click="complianceCheck()" v-if="permission.process_missing_compliance_check_sj">合规校验</el-button> |
||||||
|
<el-button type="primary" @click="claseOrder()" v-if="permission.process_missing_close_order_sj">关闭订单</el-button> |
||||||
|
</template> |
||||||
|
<template #menu-right> </template> |
||||||
|
|
||||||
|
<template #ypCode="{ row }"> |
||||||
|
<el-text type="primary">{{ row.ypCode }}</el-text> |
||||||
|
</template> |
||||||
|
<template #productIdent="{ row }"> |
||||||
|
<el-tag>{{ row.productIdent }}</el-tag> |
||||||
|
</template> |
||||||
|
<template #validationMomo="{row}"> |
||||||
|
<el-text type="danger">{{ row.validationMomo }}</el-text> |
||||||
|
</template> |
||||||
|
<template #curStatusText="{ row }"> |
||||||
|
<el-tag v-if="row.curStatusText == '已派工'">{{ row.curStatusText }}</el-tag> |
||||||
|
<el-tag class="ml-2" type="success" v-if="row.curStatusText == '已完工'"> |
||||||
|
{{ row.curStatusText }}</el-tag |
||||||
|
> |
||||||
|
<el-tag class="ml-2" type="info" v-if="row.curStatusText == '已关闭'">{{ |
||||||
|
row.curStatusText |
||||||
|
}}</el-tag> |
||||||
|
<el-tag class="ml-2" type="warning" v-if="row.curStatusText == '加工中'">{{ |
||||||
|
row.curStatusText |
||||||
|
}}</el-tag> |
||||||
|
<el-tag class="ml-2" type="danger" v-if="row.curStatusText == '已退回'">{{ |
||||||
|
row.curStatusText |
||||||
|
}}</el-tag> |
||||||
|
<el-tag class="ml-2" type="danger" v-if="row.curStatusText == '无工艺'">{{ |
||||||
|
row.curStatusText |
||||||
|
}}</el-tag> |
||||||
|
</template> |
||||||
|
<template #yichangyuanyin="{ row }"> |
||||||
|
<el-text class="mx-1" type="danger">{{ row.yichangyuanyin }}</el-text> |
||||||
|
</template> |
||||||
|
<template #menu="{ row }"> </template> |
||||||
|
<!-- <template #menu="{ row }"> </template> --> |
||||||
|
<template #demandDate="{ row }"> |
||||||
|
{{ row.demandDate ? row.demandDate.substring(0, 10) : '' }} |
||||||
|
</template> |
||||||
|
|
||||||
|
</avue-crud> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import { getList, closeBatchs,verificationData,updateData } from '@/api/orderManagement/exceptionOrder'; |
||||||
|
import { mapGetters } from 'vuex'; |
||||||
|
export default { |
||||||
|
components: {}, |
||||||
|
computed:{ |
||||||
|
...mapGetters([ 'permission']), |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
isOpen: false, |
||||||
|
rowItem: {}, |
||||||
|
poId: null, |
||||||
|
form: {}, |
||||||
|
box: false, |
||||||
|
props: { |
||||||
|
label: 'title', |
||||||
|
value: 'key', |
||||||
|
}, |
||||||
|
menuGrantList: [], |
||||||
|
dataScopeGrantList: [], |
||||||
|
apiScopeGrantList: [], |
||||||
|
apiGrantList: [], |
||||||
|
menuTreeObj: [], |
||||||
|
dataScopeTreeObj: [], |
||||||
|
apiScopeTreeObj: [], |
||||||
|
selectionList: [], |
||||||
|
query: {}, |
||||||
|
loading: true, |
||||||
|
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: false, |
||||||
|
selection: true, |
||||||
|
viewBtn: false, |
||||||
|
delBtn: false, |
||||||
|
addBtn: false, |
||||||
|
editBtn: false, |
||||||
|
editBtnText: '修改', |
||||||
|
labelWidth: 120, |
||||||
|
// searchLabelWidth: 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', |
||||||
|
searchLabelWidth: 'auto', |
||||||
|
searchGutter: 24, |
||||||
|
searchSpan: 6, |
||||||
|
menu:false, |
||||||
|
menuAlign: 'center', |
||||||
|
gridBtn: false, |
||||||
|
searchMenuPosition: 'right', |
||||||
|
align: 'center', |
||||||
|
|
||||||
|
column: [ |
||||||
|
{ |
||||||
|
label: '工艺异常原因', |
||||||
|
prop: 'validationMomo', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 240, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入工艺异常原因', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '计划单号', |
||||||
|
prop: 'ypCode', |
||||||
|
search: true, |
||||||
|
sortable: 'custom', |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入计划单号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '生产订单', |
||||||
|
prop: 'yoCode', |
||||||
|
search: true, |
||||||
|
sortable: 'custom', |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入生产订单', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '零件号', |
||||||
|
prop: 'partCode1', |
||||||
|
search: true, |
||||||
|
sortable: 'custom', |
||||||
|
addDisplay:false, |
||||||
|
editDisplay:false, |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
hide:true, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
// rules: [ |
||||||
|
// { |
||||||
|
// required: true, |
||||||
|
// message: '请输入零件号', |
||||||
|
// trigger: 'blur', |
||||||
|
// }, |
||||||
|
// ], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '零件号', |
||||||
|
prop: 'partCode', |
||||||
|
// type:"select", |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
// dicUrl:'/api/blade-desk/dsPart/getPartList', |
||||||
|
// props:{ |
||||||
|
// label: 'partCode', |
||||||
|
// value:'partCode' |
||||||
|
// }, |
||||||
|
// onChange:val =>{ |
||||||
|
// this.form.partName = val.item.partName |
||||||
|
// }, |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请选择零件号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '产品型号', |
||||||
|
prop: 'productType', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入产品型号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '产品名称', |
||||||
|
prop: 'partName', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
span: 12, |
||||||
|
width: 150, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'left', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入产品名称', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '流程卡号', |
||||||
|
prop: 'cardNo', |
||||||
|
search: true, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
span: 12, |
||||||
|
width: 150, |
||||||
|
searchOrder:20, |
||||||
|
headerAlign: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入流程卡号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '批次号', |
||||||
|
prop: 'batchNo', |
||||||
|
search: true, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
span: 12, |
||||||
|
width: 150, |
||||||
|
headerAlign: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入批次号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '镀种', |
||||||
|
prop: 'plate', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入镀种', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
// { |
||||||
|
// label: '镀种小类', |
||||||
|
// prop: 'plate1', |
||||||
|
// search: false, |
||||||
|
// sortable: 'custom', |
||||||
|
// width: 120, |
||||||
|
// display: false, |
||||||
|
// span: 12, |
||||||
|
// headerAlign: 'center', |
||||||
|
// align: 'center', |
||||||
|
// rules: [ |
||||||
|
// { |
||||||
|
// required: true, |
||||||
|
// message: '请输入镀种小类', |
||||||
|
// trigger: 'blur', |
||||||
|
// }, |
||||||
|
// ], |
||||||
|
// }, |
||||||
|
{ |
||||||
|
label: '面积(d㎡)', |
||||||
|
prop: 'ypArea', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
disabled: true, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入面积(d㎡)', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '生产标识', |
||||||
|
prop: 'productIdent', |
||||||
|
type: 'select', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
dicUrl:'/api/blade-desk/BA/ProdMark/listForSelect', |
||||||
|
props:{ |
||||||
|
label:'name', |
||||||
|
value:'name' |
||||||
|
}, |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入生产标识', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '使用部门', |
||||||
|
prop: 'useDept', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入使用部门', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '生产数量', |
||||||
|
prop: 'ypQty', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入生产数量', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
// { |
||||||
|
// label: '工艺任务编号', |
||||||
|
// prop: 'ypQty', |
||||||
|
// search: false, |
||||||
|
// sortable: 'custom', |
||||||
|
// width: 120, |
||||||
|
// span: 12, |
||||||
|
// headerAlign: 'center', |
||||||
|
// align: 'center', |
||||||
|
// rules: [ |
||||||
|
// { |
||||||
|
// required: true, |
||||||
|
// message: '请输入工艺任务编号', |
||||||
|
// trigger: 'blur', |
||||||
|
// }, |
||||||
|
// ], |
||||||
|
// }, |
||||||
|
// { |
||||||
|
// label: '工艺任务状态', |
||||||
|
// prop: 'ypQty', |
||||||
|
// search: false, |
||||||
|
// sortable: 'custom', |
||||||
|
// width: 120, |
||||||
|
// span: 12, |
||||||
|
// headerAlign: 'center', |
||||||
|
// align: 'center', |
||||||
|
// rules: [ |
||||||
|
// { |
||||||
|
// required: true, |
||||||
|
// message: '请输入工艺任务状态', |
||||||
|
// trigger: 'blur', |
||||||
|
// }, |
||||||
|
// ], |
||||||
|
// }, |
||||||
|
{ |
||||||
|
label: '需求交期', |
||||||
|
prop: 'demandDate', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 180, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
type: 'datetime', // 改成 datetime |
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', // 输出格式 |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入需求交期', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '计划部门编码', |
||||||
|
prop: 'planDeptCode', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 140, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '计划员', |
||||||
|
prop: 'planUser', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入计划员', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '计划下达时间', |
||||||
|
prop: 'releaseDate', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
searchLabelWidth: 100, |
||||||
|
width: 180, |
||||||
|
span: 12, |
||||||
|
type: 'datetime', // 改成 datetime |
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', // 输出格式 |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入计划下达时间', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '订单状态', |
||||||
|
prop: 'status', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 12, |
||||||
|
display: false, |
||||||
|
type: 'select', |
||||||
|
width: '140', |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
dicData: [ |
||||||
|
{ |
||||||
|
value: 10000, |
||||||
|
label: '已同步', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10001, |
||||||
|
label: '订单异常', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10002, |
||||||
|
label: '未下达', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10003, |
||||||
|
label: '待排产', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10004, |
||||||
|
label: '待生产', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10005, |
||||||
|
label: '加工中', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10006, |
||||||
|
label: '排产异常', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10015, |
||||||
|
label: '已完工', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10021, |
||||||
|
label: '已关闭', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
// { |
||||||
|
// label: '接收状态', |
||||||
|
// prop: 'receiveStatus', |
||||||
|
// search: false, |
||||||
|
// sortable: 'custom', |
||||||
|
// span: 24, |
||||||
|
// width: 100, |
||||||
|
// type: 'select', |
||||||
|
// dicData: [ |
||||||
|
// { |
||||||
|
// value: '11000', |
||||||
|
// label: '未接收', |
||||||
|
// }, |
||||||
|
// { |
||||||
|
// value: '11001', |
||||||
|
// label: '已接收', |
||||||
|
// }, |
||||||
|
// ], |
||||||
|
// }, |
||||||
|
// { |
||||||
|
// label: '接收人', |
||||||
|
// prop: 'receiveUserName', |
||||||
|
// search: false, |
||||||
|
// sortable: 'custom', |
||||||
|
// span: 24, |
||||||
|
// width: 100, |
||||||
|
// }, |
||||||
|
// { |
||||||
|
// label: '接收时间', |
||||||
|
// prop: 'receiveTime', |
||||||
|
// search: false, |
||||||
|
// sortable: 'custom', |
||||||
|
// span: 24, |
||||||
|
// width: 150, |
||||||
|
// }, |
||||||
|
{ |
||||||
|
label: '接收状态', |
||||||
|
prop: 'receiveStatus', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 24, |
||||||
|
width: 100, |
||||||
|
type: 'select', |
||||||
|
dicData: [ |
||||||
|
{ |
||||||
|
value: '11000', |
||||||
|
label: '未接收', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: '11001', |
||||||
|
label: '已接收', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '接收人', |
||||||
|
prop: 'receiveUserName', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 24, |
||||||
|
width: 100, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '接收时间', |
||||||
|
prop: 'receiveTime', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 24, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '创建时间', |
||||||
|
prop: 'createTime', |
||||||
|
width: '140', |
||||||
|
sortable: 'custom', |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '备注', |
||||||
|
prop: 'memo', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 24, |
||||||
|
type: 'textarea', |
||||||
|
width: 150, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'left', |
||||||
|
// rules: [ |
||||||
|
// { |
||||||
|
// required: true, |
||||||
|
// message: '请输入备注', |
||||||
|
// trigger: 'blur', |
||||||
|
// }, |
||||||
|
// ], |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
|
||||||
|
data: [], |
||||||
|
}; |
||||||
|
}, |
||||||
|
|
||||||
|
methods: { |
||||||
|
sortChange({ prop, order }) { |
||||||
|
if (!prop) { |
||||||
|
// 如果取消排序,清空排序参数 |
||||||
|
this.query.orderByField = undefined; |
||||||
|
this.query.asc = undefined; |
||||||
|
} else { |
||||||
|
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); |
||||||
|
|
||||||
|
this.query.orderByField = orderByField; |
||||||
|
this.query.asc = order === 'ascending'?true:false; |
||||||
|
} |
||||||
|
// // 重新加载数据 |
||||||
|
this.onLoad(this.page, this.query); |
||||||
|
}, |
||||||
|
// 合规检验 |
||||||
|
complianceCheck() { |
||||||
|
// 检查是否选择了数据 |
||||||
|
if (this.selectionList.length === 0) { |
||||||
|
this.$message.error('请选择至少一条数据'); |
||||||
|
return; |
||||||
|
} |
||||||
|
this.$confirm('确定将选择数据进行合规检验?', { |
||||||
|
confirmButtonText: '确定', |
||||||
|
cancelButtonText: '取消', |
||||||
|
type: 'warning', |
||||||
|
}) |
||||||
|
.then(() => { |
||||||
|
const ids = this.selectionList.map(item => item.id).join(','); |
||||||
|
verificationData({ids:ids}).then(res => { |
||||||
|
if (res.data.code === 200) { |
||||||
|
this.$message.success(res.data.msg); |
||||||
|
this.$refs.crud.toggleSelection(); |
||||||
|
this.onLoad(this.page); |
||||||
|
} |
||||||
|
}); |
||||||
|
}) |
||||||
|
.catch(() => { |
||||||
|
// this.onLoad(this.page); |
||||||
|
// this.$message({ |
||||||
|
// type: 'success', |
||||||
|
// message: '操作成功!', |
||||||
|
// }); |
||||||
|
}); |
||||||
|
}, |
||||||
|
rowUpdate(row, index, done, loading){ |
||||||
|
updateData(row).then(res => { |
||||||
|
if(res.data.code == 200){ |
||||||
|
this.$message.success('修改成功') |
||||||
|
this.onLoad() |
||||||
|
done() |
||||||
|
} |
||||||
|
}); |
||||||
|
}, |
||||||
|
// 关闭订单 |
||||||
|
claseOrder() { |
||||||
|
// 检查是否选择了数据 |
||||||
|
if (this.selectionList.length === 0) { |
||||||
|
this.$message.error('请选择至少一条数据'); |
||||||
|
return; |
||||||
|
} |
||||||
|
let tmp = this.selectionList.filter(item => item.status === 10015 || item.status === 10021) |
||||||
|
if(tmp.length > 0){ |
||||||
|
this.$message.error('请勿选择状态为【已完工】或【已关闭】的数据'); |
||||||
|
return |
||||||
|
} |
||||||
|
this.$confirm('确定将选择数据批量关闭?', { |
||||||
|
confirmButtonText: '确定', |
||||||
|
cancelButtonText: '取消', |
||||||
|
type: 'warning', |
||||||
|
}).then(() => { |
||||||
|
const ids = this.selectionList.map(item => item.id).join(','); |
||||||
|
closeBatchs({ ...{ ids } }).then(res => { |
||||||
|
if (res.data.code === 200) { |
||||||
|
this.$message.success('关闭成功'); |
||||||
|
this.$refs.crud.toggleSelection(); |
||||||
|
this.onLoad(this.page); |
||||||
|
} |
||||||
|
}); |
||||||
|
}) |
||||||
|
.catch(() => { |
||||||
|
// this.onLoad(this.page); |
||||||
|
// this.$message({ |
||||||
|
// type: 'success', |
||||||
|
// message: '操作成功!', |
||||||
|
// }); |
||||||
|
}); |
||||||
|
}, |
||||||
|
searchReset() { |
||||||
|
this.query = {}; |
||||||
|
this.onLoad(this.page); |
||||||
|
}, |
||||||
|
searchChange(params, done) { |
||||||
|
this.query = params; |
||||||
|
this.page.currentPage = 1; |
||||||
|
this.onLoad(); |
||||||
|
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: '操作成功!', |
||||||
|
}); |
||||||
|
}, |
||||||
|
|
||||||
|
async onLoad(page, params = {}) { |
||||||
|
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: '16003', |
||||||
|
...this.query, |
||||||
|
yieldType:'12002', |
||||||
|
}); |
||||||
|
// if (res.code) { |
||||||
|
// res.data.data.records.map(item =>{ |
||||||
|
// item.errorReason = "123123" |
||||||
|
// }) |
||||||
|
this.data = res.data.data.records; |
||||||
|
this.page.total = res.data.data.total; |
||||||
|
this.selectionClear(); |
||||||
|
this.loading = false; |
||||||
|
// } |
||||||
|
} catch (err) { |
||||||
|
console.log(err); |
||||||
|
} |
||||||
|
}, |
||||||
|
}, |
||||||
|
mounted() { |
||||||
|
// this.option.column = orderCol['exceptionOrder'] |
||||||
|
}, |
||||||
|
}; |
||||||
|
</script> |
||||||
@ -0,0 +1,787 @@ |
|||||||
|
<template> |
||||||
|
<avue-crud |
||||||
|
:option="option" |
||||||
|
:table-loading="loading" |
||||||
|
:data="data" |
||||||
|
v-model="form" |
||||||
|
v-model:page="page" |
||||||
|
ref="crud" |
||||||
|
@row-del="rowDel" |
||||||
|
@search-change="searchChange" |
||||||
|
@search-reset="searchReset" |
||||||
|
@selection-change="selectionChange" |
||||||
|
@current-change="currentChange" |
||||||
|
@size-change="sizeChange" |
||||||
|
@refresh-change="refreshChange" |
||||||
|
@on-load="onLoad" |
||||||
|
@row-update="rowUpdate" |
||||||
|
@sort-change="sortChange" |
||||||
|
> |
||||||
|
<template #menu-left> |
||||||
|
<el-button |
||||||
|
type="primary" |
||||||
|
@click="complianceCheck()" |
||||||
|
v-if="permission.exception_compliance_check_sj" |
||||||
|
>合规校验</el-button |
||||||
|
> |
||||||
|
<el-button type="primary" @click="claseOrder()" v-if="permission.exception_close_order_sj" |
||||||
|
>关闭订单</el-button |
||||||
|
> |
||||||
|
</template> |
||||||
|
<template #menu-right> </template> |
||||||
|
|
||||||
|
<template #ypCode="{ row }"> |
||||||
|
<el-text type="primary">{{ row.ypCode }}</el-text> |
||||||
|
</template> |
||||||
|
<template #productIdent="{ row }"> |
||||||
|
<el-tag>{{ row.productIdent }}</el-tag> |
||||||
|
</template> |
||||||
|
<template #curStatusText="{ row }"> |
||||||
|
<el-tag v-if="row.curStatusText == '已派工'">{{ row.curStatusText }}</el-tag> |
||||||
|
<el-tag class="ml-2" type="success" v-if="row.curStatusText == '已完工'"> |
||||||
|
{{ row.curStatusText }}</el-tag |
||||||
|
> |
||||||
|
<el-tag class="ml-2" type="info" v-if="row.curStatusText == '已关闭'">{{ |
||||||
|
row.curStatusText |
||||||
|
}}</el-tag> |
||||||
|
<el-tag class="ml-2" type="warning" v-if="row.curStatusText == '加工中'">{{ |
||||||
|
row.curStatusText |
||||||
|
}}</el-tag> |
||||||
|
<el-tag class="ml-2" type="danger" v-if="row.curStatusText == '已退回'">{{ |
||||||
|
row.curStatusText |
||||||
|
}}</el-tag> |
||||||
|
<el-tag class="ml-2" type="danger" v-if="row.curStatusText == '无工艺'">{{ |
||||||
|
row.curStatusText |
||||||
|
}}</el-tag> |
||||||
|
</template> |
||||||
|
<template #yichangyuanyin="{ row }"> |
||||||
|
<el-text class="mx-1" type="danger">{{ row.yichangyuanyin }}</el-text> |
||||||
|
</template> |
||||||
|
<template #menu="{ row }"> |
||||||
|
<el-button |
||||||
|
type="primary" |
||||||
|
text |
||||||
|
plain |
||||||
|
style="border: 0; background-color: transparent !important" |
||||||
|
@click="workFn(row)" |
||||||
|
>班组维护 |
||||||
|
</el-button> |
||||||
|
</template> |
||||||
|
<template #demandDate="{ row }"> |
||||||
|
{{ row.demandDate ? row.demandDate.substring(0, 10) : '' }} |
||||||
|
</template> |
||||||
|
|
||||||
|
<template #validationMomo="{ row }"> |
||||||
|
<el-text type="danger">{{ row.validationMomo }}</el-text> |
||||||
|
</template> |
||||||
|
</avue-crud> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import { |
||||||
|
getList, |
||||||
|
closeBatchs, |
||||||
|
verificationData, |
||||||
|
updateData, |
||||||
|
} from '@/api/orderManagement/exceptionOrder'; |
||||||
|
import { mapGetters } from 'vuex'; |
||||||
|
export default { |
||||||
|
components: {}, |
||||||
|
computed: { |
||||||
|
...mapGetters(['permission']), |
||||||
|
}, |
||||||
|
|
||||||
|
data() { |
||||||
|
return { |
||||||
|
isOpen: false, |
||||||
|
rowItem: {}, |
||||||
|
poId: null, |
||||||
|
form: {}, |
||||||
|
box: false, |
||||||
|
props: { |
||||||
|
label: 'title', |
||||||
|
value: 'key', |
||||||
|
}, |
||||||
|
menuGrantList: [], |
||||||
|
dataScopeGrantList: [], |
||||||
|
apiScopeGrantList: [], |
||||||
|
apiGrantList: [], |
||||||
|
menuTreeObj: [], |
||||||
|
dataScopeTreeObj: [], |
||||||
|
apiScopeTreeObj: [], |
||||||
|
selectionList: [], |
||||||
|
query: {}, |
||||||
|
loading: true, |
||||||
|
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: false, |
||||||
|
selection: true, |
||||||
|
viewBtn: false, |
||||||
|
delBtn: false, |
||||||
|
addBtn: false, |
||||||
|
editBtn: false, |
||||||
|
editBtnText: '修改', |
||||||
|
labelWidth: 120, |
||||||
|
// searchLabelWidth: 120, |
||||||
|
menuWidth: 100, |
||||||
|
dialogWidth: 900, |
||||||
|
dialogClickModal: false, |
||||||
|
searchEnter: true, |
||||||
|
excelBtn: false, |
||||||
|
filterBtn: true, |
||||||
|
searchShowBtn: false, |
||||||
|
excelBtn: true, |
||||||
|
showOverflowTooltip: true, |
||||||
|
addBtnIcon: ' ', |
||||||
|
viewBtnIcon: ' ', |
||||||
|
delBtnIcon: ' ', |
||||||
|
editBtnIcon: ' ', |
||||||
|
menuAlign: 'left', |
||||||
|
gridBtn: false, |
||||||
|
searchLabelPosition: 'left', |
||||||
|
searchLabelWidth: 'auto', |
||||||
|
searchGutter: 24, |
||||||
|
searchSpan: 6, |
||||||
|
menuAlign: 'center', |
||||||
|
gridBtn: false, |
||||||
|
searchMenuPosition: 'right', |
||||||
|
align: 'center', |
||||||
|
menu: false, |
||||||
|
|
||||||
|
column: [ |
||||||
|
{ |
||||||
|
label: '缺失资源', |
||||||
|
prop: 'validationMomo', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 240, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入缺失资源', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '计划单号', |
||||||
|
prop: 'ypCode', |
||||||
|
search: true, |
||||||
|
sortable: 'custom', |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入计划单号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '生产订单', |
||||||
|
prop: 'yoCode', |
||||||
|
search: true, |
||||||
|
sortable: 'custom', |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入生产订单', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '零件号', |
||||||
|
prop: 'partCode1', |
||||||
|
search: true, |
||||||
|
sortable: 'custom', |
||||||
|
addDisplay: false, |
||||||
|
editDisplay: false, |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
hide: true, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
// rules: [ |
||||||
|
// { |
||||||
|
// required: true, |
||||||
|
// message: '请输入零件号', |
||||||
|
// trigger: 'blur', |
||||||
|
// }, |
||||||
|
// ], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '零件号', |
||||||
|
prop: 'partCode', |
||||||
|
// type:"select", |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
// dicUrl:'/api/blade-desk/dsPart/getPartList', |
||||||
|
// props:{ |
||||||
|
// label: 'partCode', |
||||||
|
// value:'partCode' |
||||||
|
// }, |
||||||
|
// onChange:val =>{ |
||||||
|
// this.form.partName = val.item.partName |
||||||
|
// }, |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请选择零件号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '产品型号', |
||||||
|
prop: 'productType', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入产品型号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '产品名称', |
||||||
|
prop: 'partName', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
span: 12, |
||||||
|
width: 150, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'left', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入产品名称', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '流程卡号', |
||||||
|
prop: 'cardNo', |
||||||
|
search: true, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
span: 12, |
||||||
|
width: 150, |
||||||
|
searchOrder: 20, |
||||||
|
headerAlign: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入流程卡号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '批次号', |
||||||
|
prop: 'batchNo', |
||||||
|
search: true, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
span: 12, |
||||||
|
width: 150, |
||||||
|
headerAlign: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入批次号', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '镀种', |
||||||
|
prop: 'plate', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
width: 150, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入镀种', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
// { |
||||||
|
// label: '镀种小类', |
||||||
|
// prop: 'plate1', |
||||||
|
// search: false, |
||||||
|
// sortable: 'custom', |
||||||
|
// width: 120, |
||||||
|
// display: false, |
||||||
|
// span: 12, |
||||||
|
// headerAlign: 'center', |
||||||
|
// align: 'center', |
||||||
|
// rules: [ |
||||||
|
// { |
||||||
|
// required: true, |
||||||
|
// message: '请输入角色名称', |
||||||
|
// trigger: 'blur', |
||||||
|
// }, |
||||||
|
// ], |
||||||
|
// }, |
||||||
|
{ |
||||||
|
label: '面积(d㎡)', |
||||||
|
prop: 'ypArea', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
disabled: true, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: false, |
||||||
|
message: '请输入面积(d㎡)', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '生产标识', |
||||||
|
prop: 'productIdent', |
||||||
|
type: 'select', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
dicUrl: '/api/blade-desk/BA/ProdMark/listForSelect', |
||||||
|
props: { |
||||||
|
label: 'name', |
||||||
|
value: 'name', |
||||||
|
}, |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入生产标识', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '使用部门', |
||||||
|
prop: 'useDept', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
disabled: true, |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入使用部门', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '生产数量', |
||||||
|
prop: 'ypQty', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入生产数量', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
|
||||||
|
{ |
||||||
|
label: '需求交期', |
||||||
|
prop: 'demandDate', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 180, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
type: 'datetime', // 改成 datetime |
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', // 输出格式 |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入需求交期', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '计划部门编码', |
||||||
|
prop: 'planDeptCode', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 140, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '计划员', |
||||||
|
prop: 'planUser', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
width: 120, |
||||||
|
span: 12, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入计划员', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '计划下达时间', |
||||||
|
prop: 'releaseDate', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
searchLabelWidth: 100, |
||||||
|
width: 180, |
||||||
|
span: 12, |
||||||
|
type: 'datetime', // 改成 datetime |
||||||
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', // 输出格式 |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '请输入计划下达时间', |
||||||
|
trigger: 'blur', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '订单状态', |
||||||
|
prop: 'status', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 12, |
||||||
|
display: false, |
||||||
|
type: 'select', |
||||||
|
width: '140', |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'center', |
||||||
|
dicData: [ |
||||||
|
{ |
||||||
|
value: 10000, |
||||||
|
label: '已同步', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10001, |
||||||
|
label: '订单异常', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10002, |
||||||
|
label: '未下达', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10003, |
||||||
|
label: '待排产', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10004, |
||||||
|
label: '待生产', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10005, |
||||||
|
label: '加工中', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10006, |
||||||
|
label: '排产异常', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10015, |
||||||
|
label: '已完工', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: 10021, |
||||||
|
label: '已关闭', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '接收状态', |
||||||
|
prop: 'receiveStatus', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 24, |
||||||
|
width: 100, |
||||||
|
type: 'select', |
||||||
|
dicData: [ |
||||||
|
{ |
||||||
|
value: '11000', |
||||||
|
label: '未接收', |
||||||
|
}, |
||||||
|
{ |
||||||
|
value: '11001', |
||||||
|
label: '已接收', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '接收人', |
||||||
|
prop: 'receiveUserName', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 24, |
||||||
|
width: 100, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '接收时间', |
||||||
|
prop: 'receiveTime', |
||||||
|
search: false, |
||||||
|
sortable: 'custom', |
||||||
|
span: 24, |
||||||
|
width: 150, |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '创建时间', |
||||||
|
prop: 'createTime', |
||||||
|
width: '140', |
||||||
|
sortable: 'custom', |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '备注', |
||||||
|
prop: 'memo', |
||||||
|
search: false, |
||||||
|
span: 24, |
||||||
|
type: 'textarea', |
||||||
|
width: 150, |
||||||
|
headerAlign: 'center', |
||||||
|
align: 'left', |
||||||
|
// rules: [ |
||||||
|
// { |
||||||
|
// required: true, |
||||||
|
// message: '请输入备注', |
||||||
|
// trigger: 'blur', |
||||||
|
// }, |
||||||
|
// ], |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
|
||||||
|
data: [], |
||||||
|
}; |
||||||
|
}, |
||||||
|
|
||||||
|
methods: { |
||||||
|
sortChange({ prop, order }) { |
||||||
|
if (!prop) { |
||||||
|
// 如果取消排序,清空排序参数 |
||||||
|
this.query.orderByField = undefined; |
||||||
|
this.query.asc = undefined; |
||||||
|
} else { |
||||||
|
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); |
||||||
|
|
||||||
|
this.query.orderByField = orderByField; |
||||||
|
this.query.asc = order === 'ascending' ? true : false; |
||||||
|
} |
||||||
|
// // 重新加载数据 |
||||||
|
this.onLoad(this.page, this.query); |
||||||
|
}, |
||||||
|
// 合规检验 |
||||||
|
complianceCheck() { |
||||||
|
// 检查是否选择了数据 |
||||||
|
if (this.selectionList.length === 0) { |
||||||
|
this.$message.error('请选择至少一条数据'); |
||||||
|
return; |
||||||
|
} |
||||||
|
this.$confirm('确定将选择数据进行合规检验?', { |
||||||
|
confirmButtonText: '确定', |
||||||
|
cancelButtonText: '取消', |
||||||
|
type: 'warning', |
||||||
|
}) |
||||||
|
.then(() => { |
||||||
|
const ids = this.selectionList.map(item => item.id).join(','); |
||||||
|
verificationData({ ids }).then(res => { |
||||||
|
if (res.data.code === 200) { |
||||||
|
this.$message.success(res.data.msg); |
||||||
|
this.$refs.crud.toggleSelection(); |
||||||
|
this.onLoad(this.page); |
||||||
|
} |
||||||
|
}); |
||||||
|
}) |
||||||
|
.catch(() => { |
||||||
|
// this.onLoad(this.page); |
||||||
|
// this.$message({ |
||||||
|
// type: 'success', |
||||||
|
// message: '操作成功!', |
||||||
|
// }); |
||||||
|
}); |
||||||
|
}, |
||||||
|
rowUpdate(row, index, done, loading) { |
||||||
|
updateData(row).then(res => { |
||||||
|
if (res.data.code == 200) { |
||||||
|
this.$message.success('修改成功'); |
||||||
|
this.onLoad(); |
||||||
|
done(); |
||||||
|
} |
||||||
|
}); |
||||||
|
}, |
||||||
|
// 关闭订单 |
||||||
|
claseOrder() { |
||||||
|
// 检查是否选择了数据 |
||||||
|
if (this.selectionList.length === 0) { |
||||||
|
this.$message.error('请选择至少一条数据'); |
||||||
|
return; |
||||||
|
} |
||||||
|
let tmp = this.selectionList.filter(item => item.status === 10015 || item.status === 10021); |
||||||
|
if (tmp.length > 0) { |
||||||
|
this.$message.error('请勿选择状态为【已完工】或【已关闭】的数据'); |
||||||
|
return; |
||||||
|
} |
||||||
|
this.$confirm('确定将选择数据批量关闭?', { |
||||||
|
confirmButtonText: '确定', |
||||||
|
cancelButtonText: '取消', |
||||||
|
type: 'warning', |
||||||
|
}) |
||||||
|
.then(() => { |
||||||
|
const ids = this.selectionList.map(item => item.id).join(','); |
||||||
|
closeBatchs({ ...{ ids } }).then(res => { |
||||||
|
if (res.data.code === 200) { |
||||||
|
this.$message.success('关闭成功'); |
||||||
|
this.$refs.crud.toggleSelection(); |
||||||
|
this.onLoad(this.page); |
||||||
|
} |
||||||
|
}); |
||||||
|
}) |
||||||
|
.catch(() => { |
||||||
|
// this.onLoad(this.page); |
||||||
|
// this.$message({ |
||||||
|
// type: 'success', |
||||||
|
// message: '操作成功!', |
||||||
|
// }); |
||||||
|
}); |
||||||
|
}, |
||||||
|
// 班组维护 |
||||||
|
workFn() { |
||||||
|
this.$router.push({ |
||||||
|
path: '/basicData/teamManagement', |
||||||
|
}); |
||||||
|
}, |
||||||
|
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: '操作成功!', |
||||||
|
}); |
||||||
|
}, |
||||||
|
|
||||||
|
async onLoad(page, params = {}) { |
||||||
|
this.query.partCode = this.query.partCode1; |
||||||
|
if (this.query.partCode1) { |
||||||
|
delete this.query.partCode1; |
||||||
|
} |
||||||
|
try { |
||||||
|
this.loading = true; |
||||||
|
const res = await getList({ |
||||||
|
current: this.page.currentPage, |
||||||
|
size: this.page.pageSize, |
||||||
|
validationResult: '16004', |
||||||
|
...this.query, |
||||||
|
yieldType:'12002', |
||||||
|
}); |
||||||
|
// if (res.code) { |
||||||
|
this.data = res.data.data.records; |
||||||
|
this.page.total = res.data.data.total; |
||||||
|
this.selectionClear(); |
||||||
|
this.loading = false; |
||||||
|
// } |
||||||
|
} catch (err) { |
||||||
|
console.log(err); |
||||||
|
} |
||||||
|
}, |
||||||
|
}, |
||||||
|
mounted() { |
||||||
|
// this.option.column = orderCol['exceptionOrder'] |
||||||
|
}, |
||||||
|
}; |
||||||
|
</script> |
||||||
@ -0,0 +1,42 @@ |
|||||||
|
<template> |
||||||
|
<basic-container> |
||||||
|
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> |
||||||
|
<el-tab-pane label="数据缺失" name="1"></el-tab-pane> |
||||||
|
<el-tab-pane label="工艺缺失" name="2"></el-tab-pane> |
||||||
|
<el-tab-pane label="分派异常" name="3"></el-tab-pane> |
||||||
|
<!-- <el-tab-pane label="交期冲突" name="4"></el-tab-pane> --> |
||||||
|
</el-tabs> |
||||||
|
<dataMissing v-if="activeName=='1'"></dataMissing> |
||||||
|
<processMissing v-if="activeName=='2'"></processMissing> |
||||||
|
<resourceMissing v-if="activeName=='3'"></resourceMissing> |
||||||
|
<deliveryDate v-if="activeName=='4'"></deliveryDate> |
||||||
|
</basic-container> |
||||||
|
</template> |
||||||
|
|
||||||
|
<script> |
||||||
|
import dataMissing from './components/exception_sj/dataMissing.vue' |
||||||
|
import processMissing from './components/exception_sj/processMissing.vue' |
||||||
|
import resourceMissing from './components/exception_sj/resourceMissing.vue' |
||||||
|
import deliveryDate from './components/exception_sj/deliveryDate.vue' |
||||||
|
export default { |
||||||
|
components: { |
||||||
|
dataMissing, |
||||||
|
processMissing, |
||||||
|
resourceMissing, |
||||||
|
deliveryDate |
||||||
|
}, |
||||||
|
data() { |
||||||
|
return { |
||||||
|
activeName: '1' |
||||||
|
}; |
||||||
|
}, |
||||||
|
|
||||||
|
methods: { |
||||||
|
handleClick(){ |
||||||
|
console.log(9999999,this.activeName) |
||||||
|
} |
||||||
|
}, |
||||||
|
mounted() { |
||||||
|
} |
||||||
|
}; |
||||||
|
</script> |
||||||
Loading…
Reference in new issue