parent
65f8f23d54
commit
3e90a6bb50
22 changed files with 6719 additions and 1808 deletions
@ -0,0 +1,54 @@ |
||||
import request from '@/axios'; |
||||
|
||||
/** |
||||
* 工艺能力管理
|
||||
**/ |
||||
|
||||
// 获取列表数据 bsCraftAbility/queryAllCa
|
||||
export const getQueryAllCaList = (current, size, params) => { |
||||
return request({ |
||||
url: '/bsCraftAbility/queryAllCa', |
||||
method: 'get', |
||||
params: { |
||||
...params, |
||||
current, |
||||
size, |
||||
}, |
||||
}); |
||||
}; |
||||
// 获取详情
|
||||
export const getQueryAllCaDeatils = (params) => { |
||||
return request({ |
||||
url: `/bsCraftAbility/getByKey/${params,id}`, |
||||
method: 'get', |
||||
params, |
||||
}); |
||||
}; |
||||
|
||||
// 编辑
|
||||
export const getQueryAllCaSave = (params) => { |
||||
return request({ |
||||
url: `/bsCraftAbility/saveOrEdit`, |
||||
method: 'get', |
||||
params, |
||||
}); |
||||
}; |
||||
// 删除
|
||||
export const getQueryAllCaDel = (params) => { |
||||
return request({ |
||||
url: `/bsCraftAbility/signDelete`, |
||||
method: 'get', |
||||
params, |
||||
}); |
||||
}; |
||||
// 模板下载 download/downloadDoc
|
||||
// 导入 bsCraftAbility/importSave
|
||||
// 导出
|
||||
export const exportBlob = (url, params) => { |
||||
return request({ |
||||
url: url, |
||||
params: params, |
||||
method: 'get', |
||||
responseType: 'blob', |
||||
}); |
||||
}; |
||||
@ -0,0 +1,154 @@ |
||||
<template> |
||||
<el-dialog v-model="setCrewShow" :before-close="cancel" title="查看工艺路线" width="70%" @open="open" @opened="opened"> |
||||
<el-card> |
||||
<el-descriptions :column="1" size="medium" class="margin-top" border> |
||||
<el-descriptions-item label="一级工艺路线"> |
||||
|
||||
<!-- {{ craftData.primaryCraft }} -->999 |
||||
</el-descriptions-item> |
||||
</el-descriptions> |
||||
</el-card> |
||||
<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"> |
||||
</avue-crud> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
export default { |
||||
components: {}, |
||||
props: { |
||||
isOpen: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
rowItem: { |
||||
type: Object, |
||||
default: () => { } |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
craftData: {}, |
||||
height: 350, |
||||
firseqList: [], |
||||
setCrewShow: false, |
||||
query: {}, |
||||
loading: true, |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
option: { |
||||
tip: false, |
||||
simplePage: true, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
searchIcon: true, |
||||
searchIndex: 3, |
||||
tree: false, |
||||
border: true, |
||||
index: true, |
||||
selection: false, |
||||
viewBtn: false, |
||||
delBtn: false, |
||||
addBtn: false, |
||||
editBtnText: '修改', |
||||
labelWidth: 120, |
||||
// searchLabelWidth: 120, |
||||
menuWidth: 330, |
||||
dialogWidth: 900, |
||||
dialogClickModal: false, |
||||
searchEnter: true, |
||||
excelBtn: false, |
||||
filterBtn: false, |
||||
searchShowBtn: false, |
||||
excelBtn: false, |
||||
index: true, |
||||
showOverflowTooltip: true, |
||||
menu: false, |
||||
// refreshBtn:false, |
||||
// columnBtn:false, |
||||
// gridBtn :false, |
||||
header: false, |
||||
column: [ |
||||
{ |
||||
label: '零件号', |
||||
prop: 'partCode', |
||||
search: false, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '零件名称', |
||||
prop: 'partName', |
||||
search: false, |
||||
}, |
||||
{ |
||||
label: '一级工艺计划(A)号', |
||||
prop: 'firpp', |
||||
search: false, |
||||
width: 180, |
||||
}, |
||||
{ |
||||
label: '一级工艺计划名称', |
||||
prop: 'firppName', |
||||
search: false, |
||||
width: 180, |
||||
}, |
||||
{ |
||||
label: '一级工序(B)号', |
||||
prop: 'firseq', |
||||
search: false, |
||||
width: 180, |
||||
}, |
||||
{ |
||||
label: '一级工序名称', |
||||
prop: 'firseqName', |
||||
search: false, |
||||
width: 180, |
||||
}, |
||||
{ |
||||
label: '一级工序序号', |
||||
prop: 'firseqNo', |
||||
search: false, |
||||
width: 180, |
||||
}, |
||||
], |
||||
}, |
||||
|
||||
data: [], |
||||
}; |
||||
|
||||
}, |
||||
methods: { |
||||
open() { |
||||
// this.$ajax |
||||
// .get('planOrder/getCraftData/' + this.rowItem.poId) |
||||
// .then((res) => { |
||||
// if (this.$ifAjax(res)) { |
||||
// this.craftData = res.data; |
||||
// } |
||||
// }); |
||||
// this.$ajax |
||||
// .get('planOrder/getFirseqData/' + this.rowItem.partCode) |
||||
// .then((res1) => { |
||||
// if (this.$ifAjax(res1)) { |
||||
// this.firseqList = res1.data; |
||||
// } |
||||
// }); |
||||
}, |
||||
cancel() { |
||||
this.$emit('cancel', false); |
||||
}, |
||||
onLoad() { |
||||
this.loading = false |
||||
}, |
||||
}, |
||||
mounted() { |
||||
this.setCrewShow = this.isOpen |
||||
} |
||||
}; |
||||
</script> |
||||
<style lang="less" scoped></style> |
||||
@ -0,0 +1,90 @@ |
||||
<template> |
||||
<el-dialog v-model="setCrewShow" :before-close="cancel" title="设置班组" width="600px" @open="open" @opened="opened"> |
||||
<!-- <vd-tree-transfer ref="tree-transfer" :url="url" parent-icon="department" child-icon="userInfo" /> --> |
||||
<!-- <div style="padding:10px;text-align:center;"> |
||||
<vd-btn-submit @click="submit" /> |
||||
</div> --> |
||||
<el-transfer v-model="value" filterable :filter-method="filterMethod" filter-placeholder="输入关键字进行确认" :titles="['未选择', '已选择']" :data="data" /> |
||||
<template #footer> |
||||
<div class="dialog-footer"> |
||||
<el-button @click="cancel()">取消</el-button> |
||||
<el-button type="primary" @click="cancel()"> |
||||
确认 |
||||
</el-button> |
||||
</div> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
export default { |
||||
name: 'SetPersonnel', |
||||
props: { |
||||
setCrewOpen: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
id: { |
||||
type: Number, |
||||
default: null |
||||
}, |
||||
type: { |
||||
type: String, |
||||
default: '' |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
url: '', |
||||
setCrewShow: false |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.setCrewShow = this.setCrewOpen |
||||
console.log(9999, this.setCrewOpen) |
||||
}, |
||||
methods: { |
||||
open() { |
||||
// if (this.type === 'teamSet') { |
||||
// this.url = 'teamSet/findUserByTeam/' + this.id; |
||||
// } else if (this.type === 'platingAssort') { |
||||
// this.url = 'bsPlatingAssort/findUserByPlatingAssort/' + this.id; |
||||
// } else if (this.type === 'abnormalConfig') { |
||||
// this.url = 'bsBasicClass/findUserByAbnormalConfig/' + this.id; |
||||
// } |
||||
}, |
||||
submit() { |
||||
const keyIds = this.$refs['tree-transfer'].getChecked(); |
||||
if (keyIds == null) { |
||||
this.$message.warning(this.$t('publics.message.noDataToSave')); |
||||
return; |
||||
} |
||||
let url = ''; |
||||
if (this.type === 'teamSet') { |
||||
url = '/teamSet/addOrDeleteUserRight'; |
||||
} else if (this.type === 'platingAssort') { |
||||
url = '/bsPlatingAssort/addOrDeleteUserRight'; |
||||
} else if (this.type === 'abnormalConfig') { |
||||
url = '/bsBasicClass/addOrDeleteUserRight'; |
||||
} |
||||
this.loading = true; |
||||
this.$ajax |
||||
.post(url, { |
||||
id: this.id, |
||||
keyIdArr: keyIds |
||||
}) |
||||
.then(() => { |
||||
this.loading = false; |
||||
this.$message.success(this.$t('videaVueLib.publics.message.success')); |
||||
this.cancel(true); |
||||
}); |
||||
}, |
||||
opened() { |
||||
this.$refs['tree-transfer'].axios(); |
||||
}, |
||||
cancel(refresh) { |
||||
this.setCrewShow = false |
||||
this.$emit('setCrewOpeSancel', typeof refresh === 'boolean' && refresh); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
@ -0,0 +1,90 @@ |
||||
<template> |
||||
<el-dialog v-model="setCrewShow" :before-close="cancel" title="设置人员" width="600px" @open="open" @opened="opened"> |
||||
<!-- <vd-tree-transfer ref="tree-transfer" :url="url" parent-icon="department" child-icon="userInfo" /> --> |
||||
<!-- <div style="padding:10px;text-align:center;"> |
||||
<vd-btn-submit @click="submit" /> |
||||
</div> --> |
||||
<el-transfer v-model="value" filterable :filter-method="filterMethod" filter-placeholder="输入关键字进行确认" :titles="['未选择', '已选择']" :data="data" /> |
||||
<template #footer> |
||||
<div class="dialog-footer"> |
||||
<el-button @click="cancel()">取消</el-button> |
||||
<el-button type="primary" @click="cancel()"> |
||||
确认 |
||||
</el-button> |
||||
</div> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
export default { |
||||
name: 'SetPersonnel', |
||||
props: { |
||||
setCrewOpen: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
id: { |
||||
type: Number, |
||||
default: null |
||||
}, |
||||
type: { |
||||
type: String, |
||||
default: '' |
||||
} |
||||
}, |
||||
data() { |
||||
return { |
||||
url: '', |
||||
setCrewShow: false |
||||
}; |
||||
}, |
||||
mounted() { |
||||
this.setCrewShow = this.setCrewOpen |
||||
console.log(9999, this.setCrewOpen) |
||||
}, |
||||
methods: { |
||||
open() { |
||||
// if (this.type === 'teamSet') { |
||||
// this.url = 'teamSet/findUserByTeam/' + this.id; |
||||
// } else if (this.type === 'platingAssort') { |
||||
// this.url = 'bsPlatingAssort/findUserByPlatingAssort/' + this.id; |
||||
// } else if (this.type === 'abnormalConfig') { |
||||
// this.url = 'bsBasicClass/findUserByAbnormalConfig/' + this.id; |
||||
// } |
||||
}, |
||||
submit() { |
||||
const keyIds = this.$refs['tree-transfer'].getChecked(); |
||||
if (keyIds == null) { |
||||
this.$message.warning(this.$t('publics.message.noDataToSave')); |
||||
return; |
||||
} |
||||
let url = ''; |
||||
if (this.type === 'teamSet') { |
||||
url = '/teamSet/addOrDeleteUserRight'; |
||||
} else if (this.type === 'platingAssort') { |
||||
url = '/bsPlatingAssort/addOrDeleteUserRight'; |
||||
} else if (this.type === 'abnormalConfig') { |
||||
url = '/bsBasicClass/addOrDeleteUserRight'; |
||||
} |
||||
this.loading = true; |
||||
this.$ajax |
||||
.post(url, { |
||||
id: this.id, |
||||
keyIdArr: keyIds |
||||
}) |
||||
.then(() => { |
||||
this.loading = false; |
||||
this.$message.success(this.$t('videaVueLib.publics.message.success')); |
||||
this.cancel(true); |
||||
}); |
||||
}, |
||||
opened() { |
||||
this.$refs['tree-transfer'].axios(); |
||||
}, |
||||
cancel(refresh) { |
||||
this.setCrewShow = false |
||||
this.$emit('setCrewOpeSancel', typeof refresh === 'boolean' && refresh); |
||||
} |
||||
} |
||||
}; |
||||
</script> |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,705 @@ |
||||
export default { |
||||
plannedOrder:[ |
||||
{ |
||||
label: '计划单号', |
||||
prop: 'poCode', |
||||
search: false, |
||||
sortable: true, |
||||
width: 150, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '零件号', |
||||
prop: 'partCode', |
||||
search: false, |
||||
sortable: true, |
||||
width: 150, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '产品型号', |
||||
prop: 'productType', |
||||
search: false, |
||||
sortable: true, |
||||
disabled: true, |
||||
width: 120, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '名称', |
||||
prop: 'partName', |
||||
search: false, |
||||
sortable: true, |
||||
disabled: true, |
||||
span: 12, |
||||
width: 100, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '镀种', |
||||
prop: 'plate', |
||||
search: false, |
||||
sortable: true, |
||||
disabled: true, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '镀种小类', |
||||
prop: 'plate', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
display: false, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '生产标识', |
||||
prop: 'prodIdent', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '使用部门', |
||||
prop: 'useDept', |
||||
search: false, |
||||
sortable: true, |
||||
disabled: true, |
||||
width: 120, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '生产数量', |
||||
prop: 'poQty', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '面积(d㎡)', |
||||
prop: 'poArea', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
disabled: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '需求交期', |
||||
prop: 'demandDate', |
||||
search: false, |
||||
sortable: true, |
||||
width: 150, |
||||
span: 12, |
||||
|
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '计划员', |
||||
prop: 'planUser', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '计划下达时间', |
||||
prop: 'releaseDate', |
||||
search: true, |
||||
sortable: true, |
||||
searchLabelWidth:120, |
||||
width: 150, |
||||
span: 12, |
||||
type: "date", |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '优先级', |
||||
prop: 'createName', |
||||
search: false, |
||||
sortable: true, |
||||
hide: true, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '计划类型', |
||||
prop: 'createName', |
||||
search: false, |
||||
sortable: true, |
||||
hide: true, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '工艺路线', |
||||
prop: 'createName', |
||||
search: false, |
||||
sortable: true, |
||||
disabled: true, |
||||
hide: true, |
||||
span: 24, |
||||
type: 'textarea', |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '备注', |
||||
prop: 'memo', |
||||
search: false, |
||||
sortable: true, |
||||
span: 24, |
||||
type: 'textarea', |
||||
width: 150, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '产品系列', |
||||
prop: 'prodLine', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
display: false, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '已交付数量', |
||||
prop: 'deliveryQty', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
display: false, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '未交付数量', |
||||
prop: 'undeliveredQty', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
display: false, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '状态', |
||||
prop: 'curStatusText', |
||||
search: true, |
||||
sortable: true, |
||||
searchLabelWidth:80, |
||||
span: 12, |
||||
display: false, |
||||
type: 'select', |
||||
width: '100', |
||||
dicData: [{ |
||||
value: 2, |
||||
label: '已退回' |
||||
}, { |
||||
value: 4, |
||||
label: '已派工' |
||||
}, { |
||||
value: 5, |
||||
label: '加工中' |
||||
}, { |
||||
value: 15, |
||||
label: '已完工' |
||||
}, |
||||
{ |
||||
value: 21, |
||||
label: '已关闭' |
||||
}] |
||||
}, |
||||
], |
||||
exceptionOrder:[ |
||||
{ |
||||
label: '描述', |
||||
prop: 'roamNo', |
||||
search: false, |
||||
sortable: true, |
||||
width: 150, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '计划单号', |
||||
prop: 'poCode', |
||||
search: false, |
||||
sortable: true, |
||||
width: 150, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '零件号', |
||||
prop: 'partCode', |
||||
search: false, |
||||
sortable: true, |
||||
width: 150, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '产品型号', |
||||
prop: 'productType', |
||||
search: false, |
||||
sortable: true, |
||||
disabled: true, |
||||
width: 120, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '名称', |
||||
prop: 'partName', |
||||
search: false, |
||||
sortable: true, |
||||
disabled: true, |
||||
span: 12, |
||||
width: 100, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '镀种', |
||||
prop: 'plate', |
||||
search: false, |
||||
sortable: true, |
||||
disabled: true, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '镀种小类', |
||||
prop: 'plate', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
display: false, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '生产标识', |
||||
prop: 'prodIdent', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '使用部门', |
||||
prop: 'useDept', |
||||
search: false, |
||||
sortable: true, |
||||
disabled: true, |
||||
width: 120, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '生产数量', |
||||
prop: 'poQty', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '面积(d㎡)', |
||||
prop: 'poArea', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
disabled: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '需求交期', |
||||
prop: 'demandDate', |
||||
search: false, |
||||
sortable: true, |
||||
width: 150, |
||||
span: 12, |
||||
|
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '计划员', |
||||
prop: 'planUser', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '计划下达时间', |
||||
prop: 'releaseDate', |
||||
search: true, |
||||
sortable: true, |
||||
searchLabelWidth:120, |
||||
width: 150, |
||||
span: 12, |
||||
type: "date", |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '优先级', |
||||
prop: 'createName', |
||||
search: false, |
||||
sortable: true, |
||||
hide: true, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '计划类型', |
||||
prop: 'createName', |
||||
search: false, |
||||
sortable: true, |
||||
hide: true, |
||||
span: 12, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '工艺路线', |
||||
prop: 'createName', |
||||
search: false, |
||||
sortable: true, |
||||
disabled: true, |
||||
hide: true, |
||||
span: 24, |
||||
type: 'textarea', |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '备注', |
||||
prop: 'memo', |
||||
search: false, |
||||
sortable: true, |
||||
span: 24, |
||||
type: 'textarea', |
||||
width: 150, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '产品系列', |
||||
prop: 'prodLine', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
display: false, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '已交付数量', |
||||
prop: 'deliveryQty', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
display: false, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '未交付数量', |
||||
prop: 'undeliveredQty', |
||||
search: false, |
||||
sortable: true, |
||||
width: 120, |
||||
span: 12, |
||||
display: false, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入角色名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '状态', |
||||
prop: 'curStatusText', |
||||
search: true, |
||||
sortable: true, |
||||
searchLabelWidth:80, |
||||
span: 12, |
||||
display: false, |
||||
type: 'select', |
||||
width: '100', |
||||
dicData: [{ |
||||
value: 2, |
||||
label: '已退回' |
||||
}, { |
||||
value: 4, |
||||
label: '已派工' |
||||
}, { |
||||
value: 5, |
||||
label: '加工中' |
||||
}, { |
||||
value: 15, |
||||
label: '已完工' |
||||
}, |
||||
{ |
||||
value: 21, |
||||
label: '已关闭' |
||||
}] |
||||
}, |
||||
] |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -1,13 +0,0 @@ |
||||
<template> |
||||
镀种分类 |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
|
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
|
||||
</style> |
||||
@ -1,13 +0,0 @@ |
||||
<template> |
||||
工艺能力 |
||||
</template> |
||||
|
||||
<script> |
||||
export default { |
||||
|
||||
} |
||||
</script> |
||||
|
||||
<style> |
||||
|
||||
</style> |
||||
@ -0,0 +1,600 @@ |
||||
<template> |
||||
<basic-container> |
||||
<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"> |
||||
<template #menu-left> |
||||
|
||||
</template> |
||||
<template #menu="scope"> |
||||
<!-- 是否展示 --> |
||||
<el-button type="text" v-if="scope.row.special" @click="setCrew(scope.row.ppsId)"> 设置班组</el-button> |
||||
</template> |
||||
<template #menu-right="{ size }"> |
||||
<span style="display: inline-flex;margin-right: 12px;"> |
||||
<el-button type="primary">导入</el-button> |
||||
</span> |
||||
</template> |
||||
|
||||
<template #assist="scope"> |
||||
<el-tag v-if="scope.row.assist" type="success">是</el-tag> |
||||
<el-tag v-else type="danger">否</el-tag> |
||||
</template> |
||||
<template #special="scope"> |
||||
<el-tag v-if="scope.row.special" type="success">是</el-tag> |
||||
<el-tag v-else type="danger">否</el-tag> |
||||
</template> |
||||
<template #mainProcess="scope"> |
||||
<el-tag v-if="scope.row.mainProcess" type="success">是</el-tag> |
||||
<el-tag v-else type="danger">否</el-tag> |
||||
</template> |
||||
<template #assist-form="{ type, disabled }"> |
||||
<el-checkbox v-model="form.assist">不分派</el-checkbox> |
||||
</template> |
||||
<template #assist-label="{ type, disabled }"> |
||||
<span></span> |
||||
</template> |
||||
<template #special-form="{ type, disabled }"> |
||||
<el-checkbox v-model="form.special">特殊</el-checkbox> |
||||
</template> |
||||
<template #special-label="{ type, disabled }"> |
||||
<span></span> |
||||
</template> |
||||
<template #mainProcess-form="{ type, disabled }"> |
||||
<el-checkbox v-model="form.mainProcess">主工序</el-checkbox> |
||||
</template> |
||||
<template #mainProcess-label="{ type, disabled }"> |
||||
<span></span> |
||||
</template> |
||||
<template #eleStream-form="{ type, disabled }"> |
||||
<el-checkbox v-model="form.eleStream">电流(A)</el-checkbox> |
||||
</template> |
||||
<template #eleStream-label="{ type, disabled }"> |
||||
<span></span> |
||||
</template> |
||||
<template #eleRate-form="{ type, disabled }"> |
||||
<el-checkbox v-model="form.eleRate">电导率</el-checkbox> |
||||
</template> |
||||
<template #eleRate-label="{ type, disabled }"> |
||||
<span></span> |
||||
</template> |
||||
<template #phValue-form="{ type, disabled }"> |
||||
<el-checkbox v-model="form.phValue">PH</el-checkbox> |
||||
</template> |
||||
<template #phValue-label="{ type, disabled }"> |
||||
<span></span> |
||||
</template> |
||||
<template #niValue-form="{ type, disabled }"> |
||||
<el-checkbox v-model="form.niValue">Ni+</el-checkbox> |
||||
</template> |
||||
<template #niValue-label="{ type, disabled }"> |
||||
<span></span> |
||||
</template> |
||||
<template #vSpeed-form="{ type, disabled }"> |
||||
<el-checkbox v-model="form.vSpeed">转速/振频</el-checkbox> |
||||
</template> |
||||
<template #vSpeed-label="{ type, disabled }"> |
||||
<span></span> |
||||
</template> |
||||
<template #cyropactorControl-form="{ type, disabled }"> |
||||
<el-checkbox v-model="form.cyropactorControl">整流机控制模式</el-checkbox> |
||||
</template> |
||||
<template #cyropactorControl-label="{ type, disabled }"> |
||||
<span></span> |
||||
</template> |
||||
|
||||
<template #name="{ row }"> |
||||
<i :class="row.source" style="margin-right: 5px" /> |
||||
<span>{{ row.name }}</span> |
||||
</template> |
||||
<template #source="{ row }"> |
||||
<div style="text-align: center"> |
||||
<i :class="row.source" /> |
||||
</div> |
||||
</template> |
||||
</avue-crud> |
||||
|
||||
<setCrew :id="ppsId" :set-crew-open="setCrewOpen" v-if="setCrewOpen" type="abnormalConfig" |
||||
@setCrewOpeSancel="setCrewOpeSancel" /> |
||||
</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 setCrew from "@/components/dialogCom/setCrew.vue" |
||||
|
||||
export default { |
||||
components: { |
||||
setCrew |
||||
}, |
||||
data() { |
||||
return { |
||||
ppsId: null, |
||||
setCrewOpen: false, |
||||
form: {}, |
||||
query: {}, |
||||
loading: true, |
||||
selectionList: [], |
||||
parentId: '', |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
option: { |
||||
tip: false, |
||||
simplePage: false, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
dialogWidth: '35%', |
||||
border: true, |
||||
selection: true, |
||||
menuWidth: 180, |
||||
dialogClickModal: false, |
||||
excelBtn: true, |
||||
viewBtn: false, |
||||
delBtn: false, |
||||
editBtnText: '编辑', |
||||
refreshBtn: false, |
||||
searchShowBtn: false, |
||||
gridBtn: false, |
||||
searchIndex: 3, |
||||
searchIcon: true, |
||||
column: [ |
||||
{ |
||||
label: '编码', |
||||
prop: 'ppsCode', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
order: 9, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入配置码', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '名称', |
||||
prop: 'ppsName', |
||||
sortable: true, |
||||
search: true, |
||||
overHidden: true, |
||||
order: 8, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请选择镀种分类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '不分派', |
||||
prop: 'assist', |
||||
sortable: true, |
||||
search: true, |
||||
overHidden: true, |
||||
span:8, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入镀种', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '特殊', |
||||
prop: 'special', |
||||
sortable: true, |
||||
search: true, |
||||
overHidden: true, |
||||
span:8, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入镀层编码', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '主工序', |
||||
prop: 'mainProcess', |
||||
sortable: true, |
||||
search: false, |
||||
span:8, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入镀种小类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '班组', |
||||
prop: 'team', |
||||
sortable: true, |
||||
search: false, |
||||
overHidden: true, |
||||
display:false, |
||||
|
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入材料', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '标准周期', |
||||
prop: 'cycle', |
||||
sortable: true, |
||||
search: false, |
||||
order: 7, |
||||
span:24, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入标准周期', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '电流(A)', |
||||
prop: 'eleStream', |
||||
display:true, |
||||
hide:true, |
||||
span:8, |
||||
}, |
||||
{ |
||||
label: '电导率', |
||||
prop: 'eleRate', |
||||
display:true, |
||||
hide:true, |
||||
span:8, |
||||
}, |
||||
{ |
||||
label: 'PH', |
||||
prop: 'phValue', |
||||
display:true, |
||||
hide:true, |
||||
span:8, |
||||
}, |
||||
{ |
||||
label: 'Ni+', |
||||
prop: 'niValue', |
||||
display:true, |
||||
hide:true, |
||||
span:8, |
||||
}, |
||||
{ |
||||
label: '转速/振频', |
||||
prop: 'vSpeed', |
||||
display:true, |
||||
hide:true, |
||||
span:6, |
||||
}, |
||||
{ |
||||
label: '整流机控制模式', |
||||
prop: 'cyropactorControl', |
||||
display:true, |
||||
hide:true, |
||||
span:10, |
||||
}, |
||||
], |
||||
}, |
||||
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: { |
||||
// 设置班组人员 |
||||
setCrew(ppsId) { |
||||
console.log(9999, ppsId) |
||||
this.ppsId = ppsId; |
||||
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(); |
||||
}, |
||||
// 选中表格数据 |
||||
selectionChange(list) { |
||||
this.selectionList = list; |
||||
}, |
||||
// |
||||
selectionClear() { |
||||
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; |
||||
}, |
||||
// 切换页面 数量 |
||||
sizeChange(pageSize) { |
||||
this.page.pageSize = pageSize; |
||||
}, |
||||
|
||||
refreshChange() { |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
// 加载页面数据 |
||||
onLoad(page, params = {}) { |
||||
this.loading = true; |
||||
|
||||
getLazyList(this.parentId, Object.assign(params, this.query)).then(res => { |
||||
// this.data = res.data.data; |
||||
this.data = [{ |
||||
"assist": false, |
||||
"assistTitle": "否", |
||||
"createMan": { |
||||
"userId": 541, |
||||
"userName": "崔殿龙" |
||||
}, |
||||
"cycle": 0.0, |
||||
"cyropactorControl": false, |
||||
"deleted": false, |
||||
"eleRate": false, |
||||
"eleStream": false, |
||||
"keyValue": 425, |
||||
"mainProcess": false, |
||||
"mainProcessTitle": "否", |
||||
"niValue": false, |
||||
"phValue": false, |
||||
"ppsCode": "362", |
||||
"ppsId": 425, |
||||
"ppsName": "烧结包装防护", |
||||
"special": false, |
||||
"specialTitle": "否", |
||||
"team": null, |
||||
"vSpeed": false |
||||
}, |
||||
{ |
||||
"assist": false, |
||||
"assistTitle": "否", |
||||
"createMan": { |
||||
"userId": 541, |
||||
"userName": "崔殿龙" |
||||
}, |
||||
"cycle": 0.0, |
||||
"cyropactorControl": false, |
||||
"deleted": false, |
||||
"eleRate": false, |
||||
"eleStream": false, |
||||
"keyValue": 424, |
||||
"mainProcess": false, |
||||
"mainProcessTitle": "否", |
||||
"niValue": false, |
||||
"phValue": false, |
||||
"ppsCode": "361", |
||||
"ppsId": 424, |
||||
"ppsName": "玻璃饼印字", |
||||
"special": true, |
||||
"specialTitle": "是", |
||||
"team": null, |
||||
"vSpeed": false |
||||
}, |
||||
{ |
||||
"assist": false, |
||||
"assistTitle": "否", |
||||
"createMan": { |
||||
"userId": 541, |
||||
"userName": "崔殿龙" |
||||
}, |
||||
"cycle": 0.0, |
||||
"cyropactorControl": false, |
||||
"deleted": false, |
||||
"eleRate": false, |
||||
"eleStream": false, |
||||
"keyValue": 423, |
||||
"mainProcess": false, |
||||
"mainProcessTitle": "否", |
||||
"niValue": false, |
||||
"phValue": false, |
||||
"ppsCode": "360", |
||||
"ppsId": 423, |
||||
"ppsName": "玻璃饼振光", |
||||
"special": false, |
||||
"specialTitle": "否", |
||||
"team": null, |
||||
"vSpeed": false |
||||
}, |
||||
{ |
||||
"assist": false, |
||||
"assistTitle": "否", |
||||
"createMan": { |
||||
"userId": 541, |
||||
"userName": "崔殿龙" |
||||
}, |
||||
"cycle": 0.0, |
||||
"cyropactorControl": false, |
||||
"deleted": false, |
||||
"eleRate": false, |
||||
"eleStream": false, |
||||
"keyValue": 422, |
||||
"mainProcess": false, |
||||
"mainProcessTitle": "否", |
||||
"niValue": false, |
||||
"phValue": false, |
||||
"ppsCode": "359", |
||||
"ppsId": 422, |
||||
"ppsName": "玻璃饼排蜡玻化(箱式炉)", |
||||
"special": false, |
||||
"specialTitle": "否", |
||||
"team": null, |
||||
"vSpeed": false |
||||
}, |
||||
{ |
||||
"assist": false, |
||||
"assistTitle": "否", |
||||
"createMan": { |
||||
"userId": 541, |
||||
"userName": "崔殿龙" |
||||
}, |
||||
"cycle": 0.0, |
||||
"cyropactorControl": false, |
||||
"deleted": false, |
||||
"eleRate": false, |
||||
"eleStream": false, |
||||
"keyValue": 421, |
||||
"mainProcess": false, |
||||
"mainProcessTitle": "否", |
||||
"niValue": false, |
||||
"phValue": false, |
||||
"ppsCode": "358", |
||||
"ppsId": 421, |
||||
"ppsName": "玻璃饼排蜡玻化(链式炉)", |
||||
"special": false, |
||||
"specialTitle": "否", |
||||
"team": null, |
||||
"vSpeed": false |
||||
}] |
||||
this.loading = false; |
||||
this.page.total = this.data.length |
||||
this.selectionClear(); |
||||
}); |
||||
}, |
||||
}, |
||||
} |
||||
</script> |
||||
@ -0,0 +1,361 @@ |
||||
<template> |
||||
<basic-container> |
||||
<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"> |
||||
<template #menu-left> |
||||
|
||||
</template> |
||||
|
||||
<template #menu-right="{ size }"> |
||||
|
||||
</template> |
||||
<template #menu="scope"> |
||||
<el-button type="primary" link @click="setCrew(scope.row.bcId)">设置人员</el-button> |
||||
</template> |
||||
<template #bsWorkType.wtName="scope"> |
||||
<span> |
||||
{{ scope.row.bsWorkType ? scope.row.bsWorkType.wtName : '-' }} |
||||
</span> |
||||
</template> |
||||
<template #name="{ row }"> |
||||
<i :class="row.source" style="margin-right: 5px" /> |
||||
<span>{{ row.name }}</span> |
||||
</template> |
||||
<template #source="{ row }"> |
||||
<div style="text-align: center"> |
||||
<i :class="row.source" /> |
||||
</div> |
||||
</template> |
||||
</avue-crud> |
||||
<!-- 设置人员弹框 --> |
||||
<setPersonnel :id="bcId" :set-crew-open="setCrewOpen" v-if="setCrewOpen" type="platingAssort" |
||||
@setCrewOpeSancel="setCrewOpeSancel" /> |
||||
</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 setPersonnel from "@/components/dialogCom/setPersonnel.vue" |
||||
export default { |
||||
components: { |
||||
setPersonnel |
||||
}, |
||||
data() { |
||||
return { |
||||
bcId: null, |
||||
setCrewOpen: false, |
||||
form: {}, |
||||
query: {}, |
||||
loading: true, |
||||
selectionList: [], |
||||
parentId: '', |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
option: { |
||||
tip: false, |
||||
simplePage: false, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
dialogWidth: '60%', |
||||
border: true, |
||||
selection: true, |
||||
viewBtn: true, |
||||
menuWidth: 240, |
||||
dialogClickModal: false, |
||||
excelBtn: true, |
||||
viewBtn: false, |
||||
editBtnText: '编辑', |
||||
refreshBtn: false, |
||||
searchShowBtn: false, |
||||
gridBtn: false, |
||||
searchIndex: 3, |
||||
searchIcon: true, |
||||
column: [ |
||||
{ |
||||
label: '名称分类', |
||||
prop: 'name', |
||||
search: false, |
||||
sortable: true, |
||||
overHidden: true, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入名称分类', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '分类备注', |
||||
prop: 'memo', |
||||
sortable: true, |
||||
search: false, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请选择镀种分类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
], |
||||
}, |
||||
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: { |
||||
// 设置班组人员 |
||||
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(); |
||||
}, |
||||
// 选中表格数据 |
||||
selectionChange(list) { |
||||
this.selectionList = list; |
||||
}, |
||||
// |
||||
selectionClear() { |
||||
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; |
||||
}, |
||||
// 切换页面 数量 |
||||
sizeChange(pageSize) { |
||||
this.page.pageSize = pageSize; |
||||
}, |
||||
|
||||
refreshChange() { |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
// 加载页面数据 |
||||
onLoad(page, params = {}) { |
||||
this.loading = true; |
||||
|
||||
getLazyList(this.parentId, Object.assign(params, this.query)).then(res => { |
||||
// this.data = res.data.data; |
||||
this.data = [ |
||||
{ |
||||
"bcId": 21, |
||||
"code": "A1", |
||||
"deleted": false, |
||||
"keyValue": 21, |
||||
"memo": "镀金", |
||||
"name": "A类", |
||||
"type": 5, |
||||
"updateTime": null |
||||
}, |
||||
{ |
||||
"bcId": 22, |
||||
"code": "B类", |
||||
"deleted": false, |
||||
"keyValue": 22, |
||||
"memo": "镀银", |
||||
"name": "B类", |
||||
"type": 5, |
||||
"updateTime": null |
||||
}, |
||||
{ |
||||
"bcId": 23, |
||||
"code": "C类", |
||||
"deleted": false, |
||||
"keyValue": 23, |
||||
"memo": "镀镍、锌镍、镀锡", |
||||
"name": "C类", |
||||
"type": 5, |
||||
"updateTime": null |
||||
}, |
||||
{ |
||||
"bcId": 24, |
||||
"code": "D类", |
||||
"deleted": false, |
||||
"keyValue": 24, |
||||
"memo": "镀锌、镀镉、复合材料", |
||||
"name": "D类", |
||||
"type": 5, |
||||
"updateTime": null |
||||
}, |
||||
{ |
||||
"bcId": 25, |
||||
"code": "E类", |
||||
"deleted": false, |
||||
"keyValue": 25, |
||||
"memo": "氧化、喷漆", |
||||
"name": "E类", |
||||
"type": 5, |
||||
"updateTime": null |
||||
}, |
||||
{ |
||||
"bcId": 26, |
||||
"code": "F类", |
||||
"deleted": false, |
||||
"keyValue": 26, |
||||
"memo": "钝化、综合", |
||||
"name": "F类", |
||||
"type": 5, |
||||
"updateTime": null |
||||
}, |
||||
{ |
||||
"bcId": 27, |
||||
"code": "G类", |
||||
"deleted": false, |
||||
"keyValue": 27, |
||||
"memo": "镀铬、杂项", |
||||
"name": "G类", |
||||
"type": 5, |
||||
"updateTime": null |
||||
} |
||||
] |
||||
this.loading = false; |
||||
this.page.total = this.data.length |
||||
this.selectionClear(); |
||||
}); |
||||
}, |
||||
}, |
||||
} |
||||
</script> |
||||
@ -0,0 +1,930 @@ |
||||
<template> |
||||
<basic-container> |
||||
<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"> |
||||
<template #menu-left> |
||||
|
||||
</template> |
||||
|
||||
<template #menu-right="{ size }"> |
||||
<span style="display: inline-flex;margin-right: 12px;"> |
||||
<el-button type="primary">导入</el-button> |
||||
</span> |
||||
</template> |
||||
|
||||
<template #bsBasicClass.name="scope"> |
||||
<span> |
||||
{{ scope.row.bsBasicClass ? scope.row.bsBasicClass.name : '-' }} |
||||
</span> |
||||
</template> |
||||
<template #subclass.bpsName="scope"> |
||||
<span> |
||||
{{ scope.row.subclass ? scope.row.subclass.bpsName : '-' }} |
||||
</span> |
||||
</template> |
||||
<template #name="{ row }"> |
||||
<i :class="row.source" style="margin-right: 5px" /> |
||||
<span>{{ row.name }}</span> |
||||
</template> |
||||
<template #source="{ row }"> |
||||
<div style="text-align: center"> |
||||
<i :class="row.source" /> |
||||
</div> |
||||
</template> |
||||
</avue-crud> |
||||
</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'; |
||||
|
||||
export default { |
||||
data() { |
||||
return { |
||||
form: {}, |
||||
query: {}, |
||||
loading: true, |
||||
selectionList: [], |
||||
parentId: '', |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
formOption: { |
||||
menuSpan: 12, |
||||
enter: true, |
||||
menuBtn: false, |
||||
column: [ |
||||
{ |
||||
label: '', |
||||
prop: 'wtName', |
||||
type: 'select', |
||||
filterable: true, |
||||
props: { |
||||
label: 'dictValue', |
||||
value: 'dictKey', |
||||
}, |
||||
dicUrl: '/blade-system/dict/dictionary?code=ProcessCapabilityType', |
||||
}, |
||||
] |
||||
}, |
||||
option: { |
||||
size: 'medium', |
||||
tip: false, |
||||
simplePage: false, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
dialogWidth: '60%', |
||||
border: true, |
||||
selection: true, |
||||
viewBtn: true, |
||||
menuWidth: 180, |
||||
dialogClickModal: false, |
||||
excelBtn: true, |
||||
viewBtn: false, |
||||
editBtnText: '编辑', |
||||
refreshBtn: false, |
||||
searchShowBtn: false, |
||||
gridBtn: false, |
||||
searchIndex: 3, |
||||
searchIcon: true, |
||||
column: [ |
||||
{ |
||||
label: '配置码', |
||||
prop: 'configNo', |
||||
search: true, |
||||
sortable: true, |
||||
width: 120, |
||||
overHidden: true, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入配置码', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '镀种分类', |
||||
prop: 'bsBasicClass.name', |
||||
sortable: true, |
||||
search: true, |
||||
width: 120, |
||||
type: 'select', |
||||
filterable: true, |
||||
|
||||
props: { |
||||
label: 'dictValue', |
||||
value: 'dictKey', |
||||
}, |
||||
dicUrl: '/blade-system/dict/dictionary?code=ProcessCapabilityType', |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请选择镀种分类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '镀种', |
||||
prop: 'plating', |
||||
sortable: true, |
||||
search: true, |
||||
width: 140, |
||||
overHidden: true, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入镀种', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '镀层代码', |
||||
prop: 'matCode', |
||||
sortable: true, |
||||
search: false, |
||||
width: 120, |
||||
overHidden: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入镀层代码', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '镀种小类', |
||||
prop: 'subclass.bpsName', |
||||
sortable: true, |
||||
search: true, |
||||
width: 120, |
||||
filterable: true, |
||||
type: 'select', |
||||
props: { |
||||
label: 'dictValue', |
||||
value: 'dictKey', |
||||
}, |
||||
dicUrl: '/blade-system/dict/dictionary?code=ProcessCapabilityType', |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请选择镀种小类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '材料', |
||||
prop: 'material', |
||||
sortable: true, |
||||
search: true, |
||||
overHidden: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入材料', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '材料状态', |
||||
prop: 'matState', |
||||
sortable: true, |
||||
search: false, |
||||
width: 120, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入材料状态', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '硬度', |
||||
prop: 'hardness', |
||||
sortable: true, |
||||
search: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入硬度', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '镀层代号', |
||||
prop: 'plateCode', |
||||
sortable: true, |
||||
search: false, |
||||
width: 120, |
||||
overHidden: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入镀层代号', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '物料编码', |
||||
prop: 'plateGoodsCode', |
||||
sortable: true, |
||||
search: false, |
||||
width: 120, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入物料编码', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '镀层厚度', |
||||
prop: 'plateThickness', |
||||
sortable: true, |
||||
search: false, |
||||
width: 120, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入镀层厚度', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '其他要求', |
||||
prop: 'memo', |
||||
sortable: true, |
||||
search: false, |
||||
width: 120, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入其他要求', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
|
||||
], |
||||
}, |
||||
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: { |
||||
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(); |
||||
}, |
||||
// 选中表格数据 |
||||
selectionChange(list) { |
||||
this.selectionList = list; |
||||
}, |
||||
// |
||||
selectionClear() { |
||||
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; |
||||
}, |
||||
// 切换页面 数量 |
||||
sizeChange(pageSize) { |
||||
this.page.pageSize = pageSize; |
||||
}, |
||||
|
||||
refreshChange() { |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
// 加载页面数据 |
||||
onLoad(page, params = {}) { |
||||
this.loading = true; |
||||
|
||||
getLazyList(this.parentId, Object.assign(params, this.query)).then(res => { |
||||
// this.data = res.data.data; |
||||
this.data = [ |
||||
{ |
||||
"bsBasicClass": { |
||||
"bcId": 22, |
||||
"code": "B类", |
||||
"deleted": false, |
||||
"keyValue": 22, |
||||
"memo": "镀银", |
||||
"name": "B类", |
||||
"type": 5, |
||||
"updateTime": null |
||||
}, |
||||
"id": "1", |
||||
"configNo": "E1", |
||||
"hardness": null, |
||||
"keyValue": 1, |
||||
"matCode": "21E8-340-001-A1", |
||||
"matState": "T6", |
||||
"material": "6061", |
||||
"memo": null, |
||||
"platId": 1, |
||||
"plateCode": null, |
||||
"plateGoodsCode": null, |
||||
"plateThickness": null, |
||||
"plating": "Et.A(S)10.Cl(OL)", |
||||
"subclass": { |
||||
"bpsId": 5, |
||||
"bpsName": "小类05", |
||||
"bsWorkCenter": { |
||||
"area": 0.0, |
||||
"batchNo": null, |
||||
"bigBatch": false, |
||||
"bsJfCenter": { |
||||
"createMan": { |
||||
"accountId": null, |
||||
"card": null, |
||||
"createTime": "2022-08-31", |
||||
"curStatus": 1, |
||||
"deleted": false, |
||||
"deptName": null, |
||||
"dimissionTime": null, |
||||
"factoryId": 41, |
||||
"head": 0, |
||||
"jobName": "总工", |
||||
"keyValue": 1, |
||||
"ldapName": "admin", |
||||
"mail": "13699999999@136.com", |
||||
"mobile": "13699999999", |
||||
"pfDepartment": { |
||||
"appLink": null, |
||||
"createTime": "2022-08-31", |
||||
"deleted": false, |
||||
"deptCode": "001", |
||||
"deptId": 1, |
||||
"deptName": "MES开发部", |
||||
"deptType": 1, |
||||
"deptTypeTitle": "厂", |
||||
"keyValue": 1, |
||||
"memo": null, |
||||
"orders": "00", |
||||
"parentDeptId": null, |
||||
"parentPath": null, |
||||
"ucDeptId": null, |
||||
"updateTime": "2022-08-31 16:32:46" |
||||
}, |
||||
"pinyinIndex": "ADMIN,ADMIN", |
||||
"ucUserId": null, |
||||
"updateTime": "2022-08-31 16:32:46", |
||||
"userCode": "00", |
||||
"userId": 1, |
||||
"userName": "admin", |
||||
"userSex": 1, |
||||
"userSources": "admin", |
||||
"userString": "1:A:admin", |
||||
"userType": "A" |
||||
}, |
||||
"createTime": "2024-12-09 00:00:00", |
||||
"deleted": false, |
||||
"jcCode": "RBZX", |
||||
"jcId": 1, |
||||
"jcName": "热表中心", |
||||
"keyValue": 1, |
||||
"updateTime": "2024-12-09 00:00:00" |
||||
}, |
||||
"checkout": false, |
||||
"craftAbility": "真空退火、固溶、局部退火、整体退火、淬火、时效、热处理、淬火时效、真空释氢", |
||||
"createMan": { |
||||
"accountId": 90, |
||||
"card": null, |
||||
"createTime": "2023-02-08", |
||||
"curStatus": 1, |
||||
"deleted": false, |
||||
"deptName": null, |
||||
"dimissionTime": null, |
||||
"factoryId": 41, |
||||
"head": 1, |
||||
"jobName": "生产调度员", |
||||
"keyValue": 90, |
||||
"ldapName": "03891", |
||||
"mail": null, |
||||
"mobile": null, |
||||
"pfDepartment": { |
||||
"appLink": null, |
||||
"createTime": "2023-02-08", |
||||
"deleted": false, |
||||
"deptCode": "06", |
||||
"deptId": 47, |
||||
"deptName": "经营管理室", |
||||
"deptType": 1, |
||||
"deptTypeTitle": "厂", |
||||
"keyValue": 47, |
||||
"memo": null, |
||||
"orders": "6", |
||||
"parentDeptId": 41, |
||||
"parentPath": null, |
||||
"ucDeptId": null, |
||||
"updateTime": "2023-02-08 13:23:30" |
||||
}, |
||||
"pinyinIndex": "03891,03891", |
||||
"ucUserId": null, |
||||
"updateTime": "2023-02-08 13:20:39", |
||||
"userCode": "03891", |
||||
"userId": 90, |
||||
"userName": "03891", |
||||
"userSex": 1, |
||||
"userSources": "03891", |
||||
"userString": "90:A:03891", |
||||
"userType": "A" |
||||
}, |
||||
"createTime": "2023-04-08 18:35:43", |
||||
"deleted": false, |
||||
"describe": null, |
||||
"endPoint": null, |
||||
"keyValue": 142, |
||||
"leaderUser": { |
||||
"accountId": 541, |
||||
"card": null, |
||||
"createTime": "2023-05-04", |
||||
"curStatus": 1, |
||||
"deleted": false, |
||||
"deptName": null, |
||||
"dimissionTime": null, |
||||
"factoryId": 102, |
||||
"head": 0, |
||||
"jobName": "MES开发", |
||||
"keyValue": 541, |
||||
"ldapName": "cdl", |
||||
"mail": null, |
||||
"mobile": null, |
||||
"pfDepartment": { |
||||
"appLink": null, |
||||
"createTime": "2022-08-31", |
||||
"deleted": false, |
||||
"deptCode": "001", |
||||
"deptId": 1, |
||||
"deptName": "MES开发部", |
||||
"deptType": 1, |
||||
"deptTypeTitle": "厂", |
||||
"keyValue": 1, |
||||
"memo": null, |
||||
"orders": "00", |
||||
"parentDeptId": null, |
||||
"parentPath": null, |
||||
"ucDeptId": null, |
||||
"updateTime": "2022-08-31 16:32:46" |
||||
}, |
||||
"pinyinIndex": "CUIDIANLONG,CDL", |
||||
"ucUserId": null, |
||||
"updateTime": "2023-05-04 09:16:54", |
||||
"userCode": "cdl", |
||||
"userId": 541, |
||||
"userName": "崔殿龙", |
||||
"userSex": 1, |
||||
"userSources": "崔殿龙", |
||||
"userString": "541:A:崔殿龙", |
||||
"userType": "A" |
||||
}, |
||||
"limitType": 0, |
||||
"processes": " ", |
||||
"quantity": 0, |
||||
"roundCycle": null, |
||||
"saturation": 0.0, |
||||
"sign": "4", |
||||
"startPoint": null, |
||||
"team": "热处理班", |
||||
"updateTime": "2023-04-08 18:35:43", |
||||
"wcCode": "003", |
||||
"wcId": 142, |
||||
"wcName": "热处理作业中心", |
||||
"whetherPlate": false |
||||
}, |
||||
"capacity": 1.0, |
||||
"keyValue": 5, |
||||
"updateMan": { |
||||
"accountId": 541, |
||||
"card": null, |
||||
"createTime": "2023-05-04", |
||||
"curStatus": 1, |
||||
"deleted": false, |
||||
"deptName": null, |
||||
"dimissionTime": null, |
||||
"factoryId": 102, |
||||
"head": 0, |
||||
"jobName": "MES开发", |
||||
"keyValue": 541, |
||||
"ldapName": "cdl", |
||||
"mail": null, |
||||
"mobile": null, |
||||
"pfDepartment": { |
||||
"appLink": null, |
||||
"createTime": "2022-08-31", |
||||
"deleted": false, |
||||
"deptCode": "001", |
||||
"deptId": 1, |
||||
"deptName": "MES开发部", |
||||
"deptType": 1, |
||||
"deptTypeTitle": "厂", |
||||
"keyValue": 1, |
||||
"memo": null, |
||||
"orders": "00", |
||||
"parentDeptId": null, |
||||
"parentPath": null, |
||||
"ucDeptId": null, |
||||
"updateTime": "2022-08-31 16:32:46" |
||||
}, |
||||
"pinyinIndex": "CUIDIANLONG,CDL", |
||||
"ucUserId": null, |
||||
"updateTime": "2023-05-04 09:16:54", |
||||
"userCode": "cdl", |
||||
"userId": 541, |
||||
"userName": "崔殿龙", |
||||
"userSex": 1, |
||||
"userSources": "崔殿龙", |
||||
"userString": "541:A:崔殿龙", |
||||
"userType": "A" |
||||
}, |
||||
"updateTime": "2024-04-10 16:22:22" |
||||
} |
||||
}, |
||||
{ |
||||
"bsBasicClass": { |
||||
"bcId": 21, |
||||
"code": "A1", |
||||
"deleted": false, |
||||
"keyValue": 21, |
||||
"memo": "镀金", |
||||
"name": "A类", |
||||
"type": 5, |
||||
"updateTime": null |
||||
}, |
||||
"id": "2", |
||||
"configNo": "E3", |
||||
"hardness": null, |
||||
"keyValue": 3, |
||||
"matCode": "21E8-340-003-A1", |
||||
"matState": "T6", |
||||
"material": "6061", |
||||
"memo": null, |
||||
"platId": 3, |
||||
"plateCode": null, |
||||
"plateGoodsCode": null, |
||||
"plateThickness": null, |
||||
"plating": "Et.A(S)10.Cs浸绝缘清漆", |
||||
"subclass": { |
||||
"bpsId": 4, |
||||
"bpsName": "小类04", |
||||
"bsWorkCenter": { |
||||
"area": 0.0, |
||||
"batchNo": null, |
||||
"bigBatch": false, |
||||
"bsJfCenter": { |
||||
"createMan": { |
||||
"accountId": null, |
||||
"card": null, |
||||
"createTime": "2022-08-31", |
||||
"curStatus": 1, |
||||
"deleted": false, |
||||
"deptName": null, |
||||
"dimissionTime": null, |
||||
"factoryId": 41, |
||||
"head": 0, |
||||
"jobName": "总工", |
||||
"keyValue": 1, |
||||
"ldapName": "admin", |
||||
"mail": "13699999999@136.com", |
||||
"mobile": "13699999999", |
||||
"pfDepartment": { |
||||
"appLink": null, |
||||
"createTime": "2022-08-31", |
||||
"deleted": false, |
||||
"deptCode": "001", |
||||
"deptId": 1, |
||||
"deptName": "MES开发部", |
||||
"deptType": 1, |
||||
"deptTypeTitle": "厂", |
||||
"keyValue": 1, |
||||
"memo": null, |
||||
"orders": "00", |
||||
"parentDeptId": null, |
||||
"parentPath": null, |
||||
"ucDeptId": null, |
||||
"updateTime": "2022-08-31 16:32:46" |
||||
}, |
||||
"pinyinIndex": "ADMIN,ADMIN", |
||||
"ucUserId": null, |
||||
"updateTime": "2022-08-31 16:32:46", |
||||
"userCode": "00", |
||||
"userId": 1, |
||||
"userName": "admin", |
||||
"userSex": 1, |
||||
"userSources": "admin", |
||||
"userString": "1:A:admin", |
||||
"userType": "A" |
||||
}, |
||||
"createTime": "2024-12-09 00:00:00", |
||||
"deleted": false, |
||||
"jcCode": "RBZX", |
||||
"jcId": 1, |
||||
"jcName": "热表中心", |
||||
"keyValue": 1, |
||||
"updateTime": "2024-12-09 00:00:00" |
||||
}, |
||||
"checkout": false, |
||||
"craftAbility": "真空退火、固溶、局部退火、整体退火、淬火、时效、热处理、淬火时效、真空释氢", |
||||
"createMan": { |
||||
"accountId": 90, |
||||
"card": null, |
||||
"createTime": "2023-02-08", |
||||
"curStatus": 1, |
||||
"deleted": false, |
||||
"deptName": null, |
||||
"dimissionTime": null, |
||||
"factoryId": 41, |
||||
"head": 1, |
||||
"jobName": "生产调度员", |
||||
"keyValue": 90, |
||||
"ldapName": "03891", |
||||
"mail": null, |
||||
"mobile": null, |
||||
"pfDepartment": { |
||||
"appLink": null, |
||||
"createTime": "2023-02-08", |
||||
"deleted": false, |
||||
"deptCode": "06", |
||||
"deptId": 47, |
||||
"deptName": "经营管理室", |
||||
"deptType": 1, |
||||
"deptTypeTitle": "厂", |
||||
"keyValue": 47, |
||||
"memo": null, |
||||
"orders": "6", |
||||
"parentDeptId": 41, |
||||
"parentPath": null, |
||||
"ucDeptId": null, |
||||
"updateTime": "2023-02-08 13:23:30" |
||||
}, |
||||
"pinyinIndex": "03891,03891", |
||||
"ucUserId": null, |
||||
"updateTime": "2023-02-08 13:20:39", |
||||
"userCode": "03891", |
||||
"userId": 90, |
||||
"userName": "03891", |
||||
"userSex": 1, |
||||
"userSources": "03891", |
||||
"userString": "90:A:03891", |
||||
"userType": "A" |
||||
}, |
||||
"createTime": "2023-04-08 18:35:43", |
||||
"deleted": false, |
||||
"describe": null, |
||||
"endPoint": null, |
||||
"keyValue": 142, |
||||
"leaderUser": { |
||||
"accountId": 541, |
||||
"card": null, |
||||
"createTime": "2023-05-04", |
||||
"curStatus": 1, |
||||
"deleted": false, |
||||
"deptName": null, |
||||
"dimissionTime": null, |
||||
"factoryId": 102, |
||||
"head": 0, |
||||
"jobName": "MES开发", |
||||
"keyValue": 541, |
||||
"ldapName": "cdl", |
||||
"mail": null, |
||||
"mobile": null, |
||||
"pfDepartment": { |
||||
"appLink": null, |
||||
"createTime": "2022-08-31", |
||||
"deleted": false, |
||||
"deptCode": "001", |
||||
"deptId": 1, |
||||
"deptName": "MES开发部", |
||||
"deptType": 1, |
||||
"deptTypeTitle": "厂", |
||||
"keyValue": 1, |
||||
"memo": null, |
||||
"orders": "00", |
||||
"parentDeptId": null, |
||||
"parentPath": null, |
||||
"ucDeptId": null, |
||||
"updateTime": "2022-08-31 16:32:46" |
||||
}, |
||||
"pinyinIndex": "CUIDIANLONG,CDL", |
||||
"ucUserId": null, |
||||
"updateTime": "2023-05-04 09:16:54", |
||||
"userCode": "cdl", |
||||
"userId": 541, |
||||
"userName": "崔殿龙", |
||||
"userSex": 1, |
||||
"userSources": "崔殿龙", |
||||
"userString": "541:A:崔殿龙", |
||||
"userType": "A" |
||||
}, |
||||
"limitType": 0, |
||||
"processes": " ", |
||||
"quantity": 0, |
||||
"roundCycle": null, |
||||
"saturation": 0.0, |
||||
"sign": "4", |
||||
"startPoint": null, |
||||
"team": "热处理班", |
||||
"updateTime": "2023-04-08 18:35:43", |
||||
"wcCode": "003", |
||||
"wcId": 142, |
||||
"wcName": "热处理作业中心", |
||||
"whetherPlate": false |
||||
}, |
||||
"capacity": 1.0, |
||||
"keyValue": 4, |
||||
"updateMan": { |
||||
"accountId": 541, |
||||
"card": null, |
||||
"createTime": "2023-05-04", |
||||
"curStatus": 1, |
||||
"deleted": false, |
||||
"deptName": null, |
||||
"dimissionTime": null, |
||||
"factoryId": 102, |
||||
"head": 0, |
||||
"jobName": "MES开发", |
||||
"keyValue": 541, |
||||
"ldapName": "cdl", |
||||
"mail": null, |
||||
"mobile": null, |
||||
"pfDepartment": { |
||||
"appLink": null, |
||||
"createTime": "2022-08-31", |
||||
"deleted": false, |
||||
"deptCode": "001", |
||||
"deptId": 1, |
||||
"deptName": "MES开发部", |
||||
"deptType": 1, |
||||
"deptTypeTitle": "厂", |
||||
"keyValue": 1, |
||||
"memo": null, |
||||
"orders": "00", |
||||
"parentDeptId": null, |
||||
"parentPath": null, |
||||
"ucDeptId": null, |
||||
"updateTime": "2022-08-31 16:32:46" |
||||
}, |
||||
"pinyinIndex": "CUIDIANLONG,CDL", |
||||
"ucUserId": null, |
||||
"updateTime": "2023-05-04 09:16:54", |
||||
"userCode": "cdl", |
||||
"userId": 541, |
||||
"userName": "崔殿龙", |
||||
"userSex": 1, |
||||
"userSources": "崔殿龙", |
||||
"userString": "541:A:崔殿龙", |
||||
"userType": "A" |
||||
}, |
||||
"updateTime": "2024-04-10 16:22:22" |
||||
} |
||||
} |
||||
] |
||||
this.loading = false; |
||||
this.page.total = this.data.length |
||||
this.selectionClear(); |
||||
}); |
||||
}, |
||||
}, |
||||
} |
||||
</script> |
||||
@ -0,0 +1,450 @@ |
||||
<template> |
||||
<basic-container> |
||||
<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" :before-open="beforeOpen"> |
||||
<template #menu-left> |
||||
|
||||
</template> |
||||
|
||||
<template #menu-right="{ size }"> |
||||
<span style="display: inline-flex;margin-right: 12px;"> |
||||
<avue-select v-model="slectForm.wtName" placeholder="请选择能力类型" type="tree" :dic="slectDic" |
||||
:filterable="true" :props="{ |
||||
label: 'dictValue', |
||||
value: 'dictKey', |
||||
}" style="width: 200px;margin-right: 12px;"></avue-select> |
||||
<el-button type="primary" @click="batchSet()">批量设置</el-button> |
||||
<el-button type="primary">导入</el-button> |
||||
</span> |
||||
</template> |
||||
|
||||
|
||||
<template #name="{ row }"> |
||||
<i :class="row.source" style="margin-right: 5px" /> |
||||
<span>{{ row.name }}</span> |
||||
</template> |
||||
<template #source="{ row }"> |
||||
<div style="text-align: center"> |
||||
<i :class="row.source" /> |
||||
</div> |
||||
</template> |
||||
</avue-crud> |
||||
</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'; |
||||
|
||||
export default { |
||||
data() { |
||||
return { |
||||
slectForm: { |
||||
wtName: '' |
||||
}, |
||||
slectDic: [], |
||||
form: {}, |
||||
query: {}, |
||||
loading: true, |
||||
selectionList: [], |
||||
parentId: '', |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
formOption: { |
||||
menuSpan: 12, |
||||
enter: true, |
||||
menuBtn: false, |
||||
column: [ |
||||
{ |
||||
label: '', |
||||
prop: 'wtName', |
||||
type: 'select', |
||||
filterable: true, |
||||
props: { |
||||
label: 'dictValue', |
||||
value: 'dictKey', |
||||
}, |
||||
dicUrl: '/blade-system/dict/dictionary?code=ProcessCapabilityType', |
||||
}, |
||||
] |
||||
}, |
||||
option: { |
||||
|
||||
tip: false, |
||||
simplePage: false, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
dialogWidth: '60%', |
||||
border: true, |
||||
selection: true, |
||||
viewBtn: true, |
||||
menuWidth: 150, |
||||
dialogClickModal: false, |
||||
excelBtn: true, |
||||
viewBtn: false, |
||||
editBtnText: '编辑', |
||||
refreshBtn: false, |
||||
searchShowBtn: false, |
||||
gridBtn: false, |
||||
searchIndex: 3, |
||||
searchIcon: true, |
||||
column: [{ |
||||
label: '编码', |
||||
prop: 'caCode', |
||||
search: true, |
||||
sortable: true, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入编码', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '名称', |
||||
prop: 'caName', |
||||
sortable: true, |
||||
search: true, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入名称', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '能力类型', |
||||
prop: 'wtName', |
||||
bind: 'bsWorkType.wtName', |
||||
sortable: true, |
||||
search: true, |
||||
type: 'select', |
||||
filterable: true, |
||||
props: { |
||||
label: 'dictValue', |
||||
value: 'dictKey', |
||||
}, |
||||
dicUrl: '/blade-system/dict/dictionary?code=ProcessCapabilityType', |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请选择能力类型', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '修改时间', |
||||
prop: 'updateTime', |
||||
sortable: true, |
||||
search: true, |
||||
display: false, |
||||
type: "date", |
||||
},], |
||||
}, |
||||
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: { |
||||
getDictionary() { |
||||
getDictionary({ code: 'ProcessCapabilityType' }).then(res => { |
||||
this.slectDic = res.data.data |
||||
}) |
||||
}, |
||||
// 批量设置 |
||||
batchSet() { |
||||
if (this.selectionList.length === 0) { |
||||
return this.$message.warning('请先选择数据再进行操作!'); |
||||
} |
||||
if (this.slectForm.wtName == '') { |
||||
return this.$message.warning('请先选择能力类型!'); |
||||
} |
||||
if (this.slectForm.wtName) { |
||||
this.$confirm( |
||||
'请确认此操作!', |
||||
'提示', |
||||
{ |
||||
confirmButtonText: '确认', |
||||
cancelButtonText: '取消', |
||||
type: 'warning' |
||||
} |
||||
) |
||||
.then(() => { |
||||
this.$message.success('操作成功') |
||||
// this.selectionArr.forEach((item) => { |
||||
// this.list.push(item.caId); |
||||
// }); |
||||
// this.$ajax |
||||
// .post('bsCraftAbility/batchWtSet', { |
||||
// list: this.list, |
||||
// wtId: this.formData.wtId |
||||
// }) |
||||
// .then((res) => { |
||||
// if (res.code === 0) { |
||||
// this.$message.success( |
||||
// this.$t('global.successfulOperation') |
||||
// ); |
||||
// this.$refs.myTable.load(); |
||||
// } |
||||
// }); |
||||
}) |
||||
.catch(() => { |
||||
this.$message.info(this.$t('global.canceled')); |
||||
}); |
||||
} |
||||
}, |
||||
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(); |
||||
}, |
||||
// 选中表格数据 |
||||
selectionChange(list) { |
||||
this.selectionList = list; |
||||
console.log(67676, this.selectionList) |
||||
}, |
||||
// |
||||
selectionClear() { |
||||
this.selectionList = []; |
||||
this.$refs.crud.toggleSelection(); |
||||
}, |
||||
// 打开弹框 前操作 打开表单前会执行beforeOpen方法 |
||||
beforeOpen(done, type) { |
||||
console.log(999,this.$refs.crud.data) |
||||
// 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; |
||||
}, |
||||
// 切换页面 数量 |
||||
sizeChange(pageSize) { |
||||
this.page.pageSize = pageSize; |
||||
}, |
||||
|
||||
refreshChange() { |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
// 加载页面数据 |
||||
onLoad(page, params = {}) { |
||||
this.loading = true; |
||||
|
||||
// getLazyList(this.parentId, Object.assign(params, this.query)).then(res => { |
||||
// this.data = res.data.data; |
||||
this.data = [ |
||||
{ |
||||
"bsWorkType": { |
||||
"deleted": false, |
||||
"keyValue": 1, |
||||
"wtCode": "code", |
||||
"wtId": 1, |
||||
"wtName": "name" |
||||
}, |
||||
"caCode": "E9881", |
||||
"caId": 239, |
||||
"caName": "热处理清洗", |
||||
"keyValue": 239, |
||||
"updateTime": "2023-03-10 15:36:22", |
||||
"id": '1' |
||||
}, |
||||
{ |
||||
"bsWorkType": null, |
||||
"caCode": "E9880", |
||||
"caId": 377, |
||||
"caName": "烧结后检验", |
||||
"keyValue": 377, |
||||
"updateTime": "2024-01-26 11:11:02", |
||||
"id": '2' |
||||
}, |
||||
{ |
||||
"bsWorkType": null, |
||||
"caCode": "E9726", |
||||
"caId": 238, |
||||
"caName": "喷特氟龙", |
||||
"keyValue": 238, |
||||
"updateTime": "2023-03-10 15:36:22", |
||||
"id": '3' |
||||
}, |
||||
{ |
||||
"bsWorkType": null, |
||||
"caCode": "E9725", |
||||
"caId": 243, |
||||
"caName": "耐原子氧涂层", |
||||
"keyValue": 243, |
||||
"updateTime": "2023-03-10 15:38:53", |
||||
"id": '4' |
||||
}, |
||||
{ |
||||
"bsWorkType": null, |
||||
"caCode": "E9724", |
||||
"caId": 242, |
||||
"caName": "喷码", |
||||
"keyValue": 242, |
||||
"updateTime": "2023-03-10 15:38:53", |
||||
"id": '5' |
||||
}, |
||||
{ |
||||
"bsWorkType": null, |
||||
"caCode": "E9723", |
||||
"caId": 241, |
||||
"caName": "CC化学转化膜层", |
||||
"keyValue": 241, |
||||
"updateTime": "2023-03-10 15:38:53", |
||||
"id": '6' |
||||
}, |
||||
{ |
||||
"bsWorkType": null, |
||||
"caCode": "E9722", |
||||
"caId": 240, |
||||
"caName": "钛合金阳极化", |
||||
"keyValue": 240, |
||||
"updateTime": "2023-03-10 15:38:53", |
||||
"id": '7' |
||||
}, |
||||
{ |
||||
"bsWorkType": null, |
||||
"caCode": "E9721", |
||||
"caId": 247, |
||||
"caName": "铬酸阳极化", |
||||
"keyValue": 247, |
||||
"updateTime": "2023-03-10 15:42:37", |
||||
"id": '8' |
||||
}, |
||||
] |
||||
this.loading = false; |
||||
this.page.total = this.data.length |
||||
this.selectionClear(); |
||||
// }); |
||||
}, |
||||
}, |
||||
|
||||
mounted() { |
||||
this.getDictionary() |
||||
} |
||||
} |
||||
</script> |
||||
@ -1,3 +1,477 @@ |
||||
<template> |
||||
工艺模板 |
||||
</template> |
||||
<basic-container> |
||||
<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"> |
||||
<template #bsWorkType.wtName="scope"> |
||||
<span> |
||||
{{ scope.row.bsWorkType ? scope.row.bsWorkType.wtName : '-' }} |
||||
</span> |
||||
</template> |
||||
<template #name="{ row }"> |
||||
<i :class="row.source" style="margin-right: 5px" /> |
||||
<span>{{ row.name }}</span> |
||||
</template> |
||||
<template #source="{ row }"> |
||||
<div style="text-align: center"> |
||||
<i :class="row.source" /> |
||||
</div> |
||||
</template> |
||||
</avue-crud> |
||||
</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'; |
||||
|
||||
export default { |
||||
data() { |
||||
return { |
||||
form: {}, |
||||
query: {}, |
||||
loading: true, |
||||
selectionList: [], |
||||
parentId: '', |
||||
page: { |
||||
pageSize: 10, |
||||
currentPage: 1, |
||||
total: 0, |
||||
}, |
||||
option: { |
||||
size: 'medium', |
||||
tip: false, |
||||
simplePage: false, |
||||
searchShow: true, |
||||
searchMenuSpan: 6, |
||||
dialogWidth: '60%', |
||||
border: true, |
||||
selection: true, |
||||
viewBtn: true, |
||||
menuWidth: 240, |
||||
dialogClickModal: false, |
||||
excelBtn: true, |
||||
viewBtn: false, |
||||
editBtnText: '修改', |
||||
delBtnText:'作废', |
||||
refreshBtn: false, |
||||
searchShowBtn: false, |
||||
gridBtn: false, |
||||
searchIndex: 3, |
||||
searchIcon: true, |
||||
column: [ |
||||
{ |
||||
label: '模板编码', |
||||
prop: 'pmCode', |
||||
search: true, |
||||
sortable: true, |
||||
overHidden: true, |
||||
rules: [ |
||||
{ |
||||
required: true, |
||||
message: '请输入名称分类', |
||||
trigger: 'blur', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '模板名称', |
||||
prop: 'pmName', |
||||
sortable: true, |
||||
search: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请选择镀种分类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '作业中心', |
||||
prop: 'bsWorkCenter.wcName', |
||||
sortable: true, |
||||
search: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请选择镀种分类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '镀种分类', |
||||
prop: 'bsBasicClass.name', |
||||
sortable: true, |
||||
search: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请选择镀种分类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '优先级', |
||||
prop: 'priority', |
||||
sortable: true, |
||||
search: false, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请选择镀种分类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '工序数', |
||||
prop: 'proQuantity', |
||||
sortable: true, |
||||
search: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请选择镀种分类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '修改人', |
||||
prop: 'updateMan.userName', |
||||
sortable: true, |
||||
search: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请选择镀种分类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '修改时间', |
||||
prop: 'updateTime', |
||||
sortable: true, |
||||
search: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请选择镀种分类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '状态', |
||||
prop: 'pmStatusTitle', |
||||
sortable: true, |
||||
search: true, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请选择镀种分类', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
{ |
||||
label: '备注', |
||||
prop: 'memo', |
||||
sortable: true, |
||||
search: false, |
||||
rules: [ |
||||
{ |
||||
required: false, |
||||
message: '请输入备注', |
||||
trigger: 'click', |
||||
}, |
||||
], |
||||
}, |
||||
], |
||||
}, |
||||
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: { |
||||
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(); |
||||
}, |
||||
// 选中表格数据 |
||||
selectionChange(list) { |
||||
this.selectionList = list; |
||||
}, |
||||
// |
||||
selectionClear() { |
||||
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; |
||||
}, |
||||
// 切换页面 数量 |
||||
sizeChange(pageSize) { |
||||
this.page.pageSize = pageSize; |
||||
}, |
||||
|
||||
refreshChange() { |
||||
this.onLoad(this.page, this.query); |
||||
}, |
||||
// 加载页面数据 |
||||
onLoad(page, params = {}) { |
||||
this.loading = true; |
||||
|
||||
getLazyList(this.parentId, Object.assign(params, this.query)).then(res => { |
||||
// this.data = res.data.data; |
||||
this.data = [ |
||||
{ |
||||
"bsBasicClass":{ |
||||
"bcId":23, |
||||
"code":"C类", |
||||
"deleted":false, |
||||
"keyValue":23, |
||||
"memo":"镀镍、锌镍、镀锡", |
||||
"name":"C类", |
||||
"type":5, |
||||
"updateTime":null |
||||
}, |
||||
"bsWorkCenter":{ |
||||
"wcCode":"010", |
||||
"wcId":202, |
||||
"wcName":"玻璃烧结作业中心" |
||||
}, |
||||
"createMan":{ |
||||
"userId":541, |
||||
"userName":"崔殿龙" |
||||
}, |
||||
"keyValue":141, |
||||
"memo":null, |
||||
"pmCode":"玻璃烧结001", |
||||
"pmId":141, |
||||
"pmName":"玻璃烧结001", |
||||
"pmStatus":0, |
||||
"pmStatusTitle":"正常", |
||||
"priority":1, |
||||
"proQuantity":5, |
||||
"quGrText":null, |
||||
"qualityGrade":null, |
||||
"updateMan":{ |
||||
"userId":541, |
||||
"userName":"崔殿龙" |
||||
}, |
||||
"updateTime":"2024-01-19" |
||||
}, |
||||
{ |
||||
"bsBasicClass":{ |
||||
"bcId":21, |
||||
"code":"A1", |
||||
"deleted":false, |
||||
"keyValue":21, |
||||
"memo":"镀金", |
||||
"name":"A类", |
||||
"type":5, |
||||
"updateTime":null |
||||
}, |
||||
"bsWorkCenter":{ |
||||
"wcCode":"001", |
||||
"wcId":81, |
||||
"wcName":"化学镀镍作业中心" |
||||
}, |
||||
"createMan":{ |
||||
"userId":541, |
||||
"userName":"崔殿龙" |
||||
}, |
||||
"keyValue":123, |
||||
"memo":null, |
||||
"pmCode":"32", |
||||
"pmId":123, |
||||
"pmName":"32", |
||||
"pmStatus":0, |
||||
"pmStatusTitle":"正常", |
||||
"priority":1, |
||||
"proQuantity":6, |
||||
"quGrText":null, |
||||
"qualityGrade":"[]", |
||||
"updateMan":{ |
||||
"userId":541, |
||||
"userName":"崔殿龙" |
||||
}, |
||||
"updateTime":"2023-07-03" |
||||
}, |
||||
{ |
||||
"bsBasicClass":{ |
||||
"bcId":21, |
||||
"code":"A1", |
||||
"deleted":false, |
||||
"keyValue":21, |
||||
"memo":"镀金", |
||||
"name":"A类", |
||||
"type":5, |
||||
"updateTime":null |
||||
}, |
||||
"bsWorkCenter":{ |
||||
"wcCode":"001", |
||||
"wcId":81, |
||||
"wcName":"化学镀镍作业中心" |
||||
}, |
||||
"createMan":{ |
||||
"userId":541, |
||||
"userName":"崔殿龙" |
||||
}, |
||||
"keyValue":122, |
||||
"memo":null, |
||||
"pmCode":"12", |
||||
"pmId":122, |
||||
"pmName":"12", |
||||
"pmStatus":0, |
||||
"pmStatusTitle":"正常", |
||||
"priority":3, |
||||
"proQuantity":6, |
||||
"quGrText":null, |
||||
"qualityGrade":"[]", |
||||
"updateMan":{ |
||||
"userId":541, |
||||
"userName":"崔殿龙" |
||||
}, |
||||
"updateTime":"2023-07-03" |
||||
} |
||||
] |
||||
this.loading = false; |
||||
this.page.total = this.data.length |
||||
this.selectionClear(); |
||||
}); |
||||
}, |
||||
}, |
||||
} |
||||
</script> |
||||
@ -1,3 +0,0 @@ |
||||
<template> |
||||
工艺模板 |
||||
</template> |
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue