|
|
|
|
@ -7,7 +7,6 @@ |
|
|
|
|
v-model="form" |
|
|
|
|
v-model:page="page" |
|
|
|
|
ref="crud" |
|
|
|
|
@row-del="rowDel" |
|
|
|
|
@search-change="searchChange" |
|
|
|
|
@search-reset="searchReset" |
|
|
|
|
@selection-change="selectionChange" |
|
|
|
|
@ -24,32 +23,16 @@ |
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { getLazyList, remove, update, add, getMenu } from "@/api/system/menu"; |
|
|
|
|
|
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
import { |
|
|
|
|
getQueryAllCaList, |
|
|
|
|
getQueryAllCaDeatils, |
|
|
|
|
getQueryAllCaSave, |
|
|
|
|
getQueryAllCaDel, |
|
|
|
|
} from "@/api/processManagement/processCapability"; |
|
|
|
|
import { getDictionary } from "@/api/system/dict"; |
|
|
|
|
import { getList } from '@/api/productionManagement/sameFurnaceQuery'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
components: {}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
ocId: null, |
|
|
|
|
setCraftAbilityOpen: false, |
|
|
|
|
showIp: false, |
|
|
|
|
ecId: null, |
|
|
|
|
bcId: null, |
|
|
|
|
setCrewOpen: false, |
|
|
|
|
form: {}, |
|
|
|
|
query: {}, |
|
|
|
|
loading: true, |
|
|
|
|
selectionList: [], |
|
|
|
|
parentId: "", |
|
|
|
|
page: { |
|
|
|
|
pageSize: 10, |
|
|
|
|
currentPage: 1, |
|
|
|
|
@ -58,12 +41,12 @@ export default { |
|
|
|
|
option: { |
|
|
|
|
columnSort: true, |
|
|
|
|
tip: false, |
|
|
|
|
height: "auto", |
|
|
|
|
height: 'auto', |
|
|
|
|
calcHeight: 32, |
|
|
|
|
simplePage: false, |
|
|
|
|
searchShow: true, |
|
|
|
|
searchMenuSpan: 6, |
|
|
|
|
dialogWidth: "60%", |
|
|
|
|
dialogWidth: '60%', |
|
|
|
|
border: true, |
|
|
|
|
selection: false, |
|
|
|
|
index: true, |
|
|
|
|
@ -74,101 +57,92 @@ export default { |
|
|
|
|
addBtn: false, |
|
|
|
|
delBtn: false, |
|
|
|
|
editBtn: false, |
|
|
|
|
editBtnText: "编辑", |
|
|
|
|
editBtnText: '编辑', |
|
|
|
|
refreshBtn: false, |
|
|
|
|
searchShowBtn: false, |
|
|
|
|
gridBtn: false, |
|
|
|
|
searchIndex: 3, |
|
|
|
|
searchIcon: true, |
|
|
|
|
menu: false, |
|
|
|
|
searchLabelPosition: "left", |
|
|
|
|
searchLabelPosition: "left", |
|
|
|
|
searchLabelPosition: 'left', |
|
|
|
|
searchGutter: 24, |
|
|
|
|
searchSpan: 6, |
|
|
|
|
menuAlign: "left", |
|
|
|
|
menuAlign: 'left', |
|
|
|
|
gridBtn: false, |
|
|
|
|
searchMenuPosition: "right", |
|
|
|
|
addBtnIcon: " ", |
|
|
|
|
viewBtnIcon: " ", |
|
|
|
|
delBtnIcon: " ", |
|
|
|
|
editBtnIcon: " ", |
|
|
|
|
align: "center", |
|
|
|
|
searchMenuPosition: 'right', |
|
|
|
|
addBtnIcon: ' ', |
|
|
|
|
viewBtnIcon: ' ', |
|
|
|
|
delBtnIcon: ' ', |
|
|
|
|
editBtnIcon: ' ', |
|
|
|
|
align: 'center', |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "绑定编号", |
|
|
|
|
prop: "mtnCode", |
|
|
|
|
label: '绑定编号', |
|
|
|
|
prop: 'mtnCode', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
overHidden: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "车间订单号", |
|
|
|
|
prop: "prWorkPlan.prWorkOrder.woCode", |
|
|
|
|
bind: "prWorkPlan.prWorkOrder.woCode", |
|
|
|
|
label: '车间订单号', |
|
|
|
|
prop: 'prWorkPlan.prWorkOrder.woCode', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
overHidden: true, |
|
|
|
|
searchLabelWidth: 120, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "物料号", |
|
|
|
|
prop: "prWorkPlan.prWorkOrder.pjYieldOrder.partCode", |
|
|
|
|
bind: "prWorkPlan.prWorkOrder.pjYieldOrder.partCode", |
|
|
|
|
label: '物料号', |
|
|
|
|
prop: 'prWorkPlan.prWorkOrder.pjYieldOrder.partCode', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
overHidden: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "批次号", |
|
|
|
|
prop: "prWorkPlan.prWorkOrder.batchNo", |
|
|
|
|
bind: "prWorkPlan.prWorkOrder.batchNo", |
|
|
|
|
label: '批次号', |
|
|
|
|
prop: 'prWorkPlan.prWorkOrder.batchNo', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
overHidden: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "数量", |
|
|
|
|
prop: "prWorkPlan.workQty", |
|
|
|
|
bind: "prWorkPlan.workQty", |
|
|
|
|
label: '数量', |
|
|
|
|
prop: 'prWorkPlan.workQty', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
overHidden: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "设备编码", |
|
|
|
|
prop: "equipmentCard.deviceCode", |
|
|
|
|
bind: "equipmentCard.deviceCode", |
|
|
|
|
label: '设备编码', |
|
|
|
|
prop: 'equipmentCard.deviceCode', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
overHidden: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "挂具编号", |
|
|
|
|
prop: "bsRackSet.rsCode", |
|
|
|
|
bind: "bsRackSet.rsCode", |
|
|
|
|
label: '挂具编号', |
|
|
|
|
prop: 'bsRackSet.rsCode', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
overHidden: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "飞靶编号", |
|
|
|
|
prop: "bsFeiBaSet.fsCode", |
|
|
|
|
bind: "bsFeiBaSet.fsCode", |
|
|
|
|
label: '飞靶编号', |
|
|
|
|
prop: 'bsFeiBaSet.fsCode', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
overHidden: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "绑定时间", |
|
|
|
|
prop: "createTime", |
|
|
|
|
label: '绑定时间', |
|
|
|
|
prop: 'createTime', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
overHidden: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "绑定人员", |
|
|
|
|
prop: "createMan.userName", |
|
|
|
|
bind: "createMan.userName", |
|
|
|
|
label: '绑定人员', |
|
|
|
|
prop: 'createMan.userName', |
|
|
|
|
search: false, |
|
|
|
|
sortable: true, |
|
|
|
|
overHidden: true, |
|
|
|
|
@ -178,133 +152,16 @@ export default { |
|
|
|
|
data: [], |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters(["userInfo", "permission"]), |
|
|
|
|
permissionList() { |
|
|
|
|
return { |
|
|
|
|
addBtn: this.validData(this.permission.menu_add, false), |
|
|
|
|
viewBtn: this.validData(this.permission.menu_view, false), |
|
|
|
|
delBtn: this.validData(this.permission.menu_delete, false), |
|
|
|
|
editBtn: this.validData(this.permission.menu_edit, false), |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
ids() { |
|
|
|
|
let ids = []; |
|
|
|
|
this.selectionList.forEach((ele) => { |
|
|
|
|
ids.push(ele.id); |
|
|
|
|
}); |
|
|
|
|
return ids.join(","); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
// 设置班组、工序、工艺能力 |
|
|
|
|
setCraftAbility(ocId) { |
|
|
|
|
this.ocId = ocId; |
|
|
|
|
this.setCraftAbilityOpen = true; |
|
|
|
|
}, |
|
|
|
|
changePWD(ecId) { |
|
|
|
|
this.ecId = ecId; |
|
|
|
|
this.showIp = true; |
|
|
|
|
}, |
|
|
|
|
cancel(isRefresh) { |
|
|
|
|
this.showIp = false; |
|
|
|
|
this.isOpen = false; |
|
|
|
|
this.setCraftAbilityOpen = false; |
|
|
|
|
if (isRefresh) { |
|
|
|
|
this.refresh(); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 设置班组人员 |
|
|
|
|
setCrew(bcId) { |
|
|
|
|
console.log(9999, bcId); |
|
|
|
|
this.bcId = bcId; |
|
|
|
|
this.setCrewOpen = true; |
|
|
|
|
}, |
|
|
|
|
// 设置班组人员弹框关闭 |
|
|
|
|
setCrewOpeSancel(isRefresh) { |
|
|
|
|
if (isRefresh) { |
|
|
|
|
this.$refs.myTable.load(); |
|
|
|
|
} |
|
|
|
|
this.setCrewOpen = false; |
|
|
|
|
}, |
|
|
|
|
initData() { |
|
|
|
|
// getMenuTree().then(res => { |
|
|
|
|
// const column = this.findObject(this.option.column, 'parentId'); |
|
|
|
|
// column.dicData = res.data.data; |
|
|
|
|
// }); |
|
|
|
|
}, |
|
|
|
|
handleAdd(row) { |
|
|
|
|
this.parentId = row.id; |
|
|
|
|
const column = this.findObject(this.option.column, "parentId"); |
|
|
|
|
column.value = row.id; |
|
|
|
|
column.addDisabled = true; |
|
|
|
|
this.$refs.crud.rowAdd(); |
|
|
|
|
}, |
|
|
|
|
// 保存 |
|
|
|
|
rowSave(row, done, loading) { |
|
|
|
|
// add(row).then( |
|
|
|
|
// res => { |
|
|
|
|
// // 获取新增数据的相关字段 |
|
|
|
|
// const data = res.data.data; |
|
|
|
|
// row.id = data.id; |
|
|
|
|
// this.$message({ |
|
|
|
|
// type: 'success', |
|
|
|
|
// message: '操作成功!', |
|
|
|
|
// }); |
|
|
|
|
// // 数据回调进行刷新 |
|
|
|
|
// done(row); |
|
|
|
|
// }, |
|
|
|
|
// error => { |
|
|
|
|
// window.console.log(error); |
|
|
|
|
// loading(); |
|
|
|
|
// } |
|
|
|
|
// ); |
|
|
|
|
}, |
|
|
|
|
// 修改 |
|
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
|
// update(row).then( |
|
|
|
|
// () => { |
|
|
|
|
// this.$message({ |
|
|
|
|
// type: 'success', |
|
|
|
|
// message: '操作成功!', |
|
|
|
|
// }); |
|
|
|
|
// // 数据回调进行刷新 |
|
|
|
|
// done(row); |
|
|
|
|
// }, |
|
|
|
|
// error => { |
|
|
|
|
// window.console.log(error); |
|
|
|
|
// loading(); |
|
|
|
|
// } |
|
|
|
|
// ); |
|
|
|
|
}, |
|
|
|
|
rowDel(row, index, done) { |
|
|
|
|
this.$confirm("确定将选择数据删除?", { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning", |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
return remove(row.id); |
|
|
|
|
}) |
|
|
|
|
.then(() => { |
|
|
|
|
this.$message({ |
|
|
|
|
type: "success", |
|
|
|
|
message: "操作成功!", |
|
|
|
|
}); |
|
|
|
|
// 数据回调进行刷新 |
|
|
|
|
done(row); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 重置 |
|
|
|
|
searchReset() { |
|
|
|
|
this.query = {}; |
|
|
|
|
this.parentId = 0; |
|
|
|
|
this.onLoad(this.page); |
|
|
|
|
}, |
|
|
|
|
// 搜索 |
|
|
|
|
searchChange(params, done) { |
|
|
|
|
this.query = params; |
|
|
|
|
this.parentId = ""; |
|
|
|
|
this.page.currentPage = 1; |
|
|
|
|
this.onLoad(this.page, params); |
|
|
|
|
done(); |
|
|
|
|
@ -318,38 +175,15 @@ export default { |
|
|
|
|
this.selectionList = []; |
|
|
|
|
this.$refs.crud.toggleSelection(); |
|
|
|
|
}, |
|
|
|
|
// 打开弹框 前操作 打开表单前会执行beforeOpen方法 |
|
|
|
|
beforeOpen(done, type) { |
|
|
|
|
if (["add", "edit"].includes(type)) { |
|
|
|
|
this.initData(); |
|
|
|
|
} |
|
|
|
|
if (["edit", "view"].includes(type)) { |
|
|
|
|
getMenu(this.form.id).then((res) => { |
|
|
|
|
this.form = Object.assign(res.data.data, { |
|
|
|
|
hasChildren: this.form.hasChildren, |
|
|
|
|
}); |
|
|
|
|
if (this.form.parentId === "0") { |
|
|
|
|
this.form.parentId = ""; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
// 关闭 弹框 关闭表单前会执行beforeClose方法, |
|
|
|
|
beforeClose(done) { |
|
|
|
|
this.parentId = ""; |
|
|
|
|
const column = this.findObject(this.option.column, "parentId"); |
|
|
|
|
column.value = ""; |
|
|
|
|
column.addDisabled = false; |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
// 切换 页码 |
|
|
|
|
currentChange(currentPage) { |
|
|
|
|
this.page.currentPage = currentPage; |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
// 切换页面 数量 |
|
|
|
|
sizeChange(pageSize) { |
|
|
|
|
this.page.pageSize = pageSize; |
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
refreshChange() { |
|
|
|
|
@ -359,102 +193,10 @@ export default { |
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
|
|
getLazyList(this.parentId, Object.assign(params, this.query)).then((res) => { |
|
|
|
|
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => { |
|
|
|
|
// this.data = res.data.data; |
|
|
|
|
this.data = [ |
|
|
|
|
{ |
|
|
|
|
abbreviation: "L120", |
|
|
|
|
address: "aaa", |
|
|
|
|
codeAndName: "L120/L120", |
|
|
|
|
contactMan: "aaa", |
|
|
|
|
contactPhone: "aaa", |
|
|
|
|
craftAbility: "不锈钢涂福斯润滑剂、DL零件包装、", |
|
|
|
|
curStatus: 0, |
|
|
|
|
curStatusText: "正常供货", |
|
|
|
|
email: "aaa", |
|
|
|
|
keyValue: 2, |
|
|
|
|
limitType: 0, |
|
|
|
|
ocCode: "L120", |
|
|
|
|
ocId: 2, |
|
|
|
|
ocName: "L120", |
|
|
|
|
oemPassword: null, |
|
|
|
|
partCodeYesOrNo: false, |
|
|
|
|
qualification: 0, |
|
|
|
|
qualificationTitle: "民品&普军", |
|
|
|
|
region: "江苏省", |
|
|
|
|
updateTime: "2023-04-14 18:33:49", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
abbreviation: "L050", |
|
|
|
|
address: "aaa", |
|
|
|
|
codeAndName: "L050/测试厂家1", |
|
|
|
|
contactMan: "aaa", |
|
|
|
|
contactPhone: "aaa", |
|
|
|
|
craftAbility: |
|
|
|
|
"挂镀金锑、金锑合金、镀纯金、复合镍、化学镀镍、涂色标、局部镀厚金、闪镀金、DL零件包装、镀金小批量、喷砂、微孔镀金、铜合金化学镀镍、手工局部电镀、局部退火、复合材料镀镍、挂镀金、镀金丝、滚镀金或振镀金", |
|
|
|
|
curStatus: 0, |
|
|
|
|
curStatusText: "正常供货", |
|
|
|
|
email: "aaa", |
|
|
|
|
keyValue: 3, |
|
|
|
|
limitType: 0, |
|
|
|
|
ocCode: "L050", |
|
|
|
|
ocId: 3, |
|
|
|
|
ocName: "测试厂家1", |
|
|
|
|
oemPassword: null, |
|
|
|
|
partCodeYesOrNo: false, |
|
|
|
|
qualification: 10, |
|
|
|
|
qualificationTitle: null, |
|
|
|
|
region: "浙江省", |
|
|
|
|
updateTime: "2023-04-14 18:33:49", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
abbreviation: "L065", |
|
|
|
|
address: "aaa", |
|
|
|
|
codeAndName: "L065/L065", |
|
|
|
|
contactMan: "aaa", |
|
|
|
|
contactPhone: "aaa", |
|
|
|
|
craftAbility: null, |
|
|
|
|
curStatus: 0, |
|
|
|
|
curStatusText: "正常供货", |
|
|
|
|
email: "aaa", |
|
|
|
|
keyValue: 4, |
|
|
|
|
limitType: 0, |
|
|
|
|
ocCode: "L065", |
|
|
|
|
ocId: 4, |
|
|
|
|
ocName: "L065", |
|
|
|
|
oemPassword: null, |
|
|
|
|
partCodeYesOrNo: false, |
|
|
|
|
qualification: 2, |
|
|
|
|
qualificationTitle: "民品&普军&航军", |
|
|
|
|
region: null, |
|
|
|
|
updateTime: "2023-04-14 18:33:49", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
abbreviation: "L070", |
|
|
|
|
address: "aaa", |
|
|
|
|
codeAndName: "L070/L070", |
|
|
|
|
contactMan: "aaa", |
|
|
|
|
contactPhone: "aaa", |
|
|
|
|
craftAbility: "滚镀金或振镀金、局部镀厚金、闪镀金、镀铂金、局部退火", |
|
|
|
|
curStatus: 0, |
|
|
|
|
curStatusText: "正常供货", |
|
|
|
|
email: "aaa", |
|
|
|
|
keyValue: 5, |
|
|
|
|
limitType: 0, |
|
|
|
|
ocCode: "L070", |
|
|
|
|
ocId: 5, |
|
|
|
|
ocName: "L070", |
|
|
|
|
oemPassword: null, |
|
|
|
|
partCodeYesOrNo: false, |
|
|
|
|
qualification: 10, |
|
|
|
|
qualificationTitle: null, |
|
|
|
|
region: "江苏省", |
|
|
|
|
updateTime: "2023-04-14 18:33:49", |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
this.loading = false; |
|
|
|
|
this.page.total = this.data.length; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
|