parent
4c68f51e76
commit
44e6051165
21 changed files with 1305 additions and 723 deletions
@ -0,0 +1,194 @@ |
||||
<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: { |
||||
// 新增:接收父组件的唯一标识(如父组件名称或ID) |
||||
sourceId: { |
||||
type: String, |
||||
required: true, // 强制要求父组件传入,确保唯一性 |
||||
description: "调用当前组件的父组件标识,用于区分来源" |
||||
}, |
||||
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, |
||||
searchLabelPosition: 'left', |
||||
searchLabelPosition: 'left', |
||||
searchGutter: 24, |
||||
searchSpan: 6, |
||||
menuAlign: 'left', |
||||
gridBtn: false, |
||||
searchMenuPosition: 'right', |
||||
addBtnIcon: ' ', |
||||
viewBtnIcon: ' ', |
||||
delBtnIcon: ' ', |
||||
editBtnIcon: ' ', |
||||
align: 'center', |
||||
column: [ |
||||
{ |
||||
label: '零件号', |
||||
prop: 'partCode', |
||||
search: false, |
||||
width: 150, |
||||
}, |
||||
{ |
||||
label: '零件名称', |
||||
prop: 'partName', |
||||
search: false, |
||||
width: 170, |
||||
}, |
||||
{ |
||||
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() { |
||||
if (this.sourceId === 'sinTerYieIdOrder') { |
||||
console.log('由sinTerYieIdOrder组件打开'); |
||||
// 父组件A的专属逻辑 |
||||
} if (this.sourceId === 'planYieIdOrder') { |
||||
console.log('由planYieIdOrder父组件打开'); |
||||
// 父组件B的专属逻辑 |
||||
} if (this.sourceId === 'plannedOrder') { |
||||
console.log('由plannedOrder111父组件打开'); |
||||
// 父组件B的专属逻辑 |
||||
} if (this.sourceId === 'sinTerOrder') { |
||||
console.log('sinTerOrder'); |
||||
// 父组件B的专属逻辑 |
||||
} |
||||
// 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.setCrewShow = false; |
||||
// this.$emit('cancel', false); |
||||
// 通知父组件时可携带sourceId,方便父组件确认 |
||||
this.$emit('cancel', { |
||||
isOpen: false, |
||||
sourceId: this.sourceId |
||||
}); |
||||
}, |
||||
onLoad() { |
||||
this.loading = false |
||||
}, |
||||
}, |
||||
mounted() { |
||||
this.setCrewShow = this.isOpen |
||||
console.log(this.isOpen, 90) |
||||
console.log(this.setCrewShow, 80) |
||||
}, |
||||
} |
||||
</script> |
||||
<style lang="scss" scoped></style> |
||||
@ -0,0 +1,73 @@ |
||||
<template> |
||||
<el-dialog title="优先级调整" append-to-body :modelValue="openShow" width="30%" @close="closeDialog"> |
||||
<el-form ref="form" :model="form" label-width="120px"> |
||||
<el-form-item label="当前优先级:">一级</el-form-item> |
||||
<el-form-item label="设置优先级:" prop="value1" required> |
||||
<el-select v-model="form.value1" placeholder="请选择" > |
||||
<el-option |
||||
label="一级" |
||||
:value="1"> |
||||
</el-option> |
||||
<el-option |
||||
label="二级" |
||||
:value="2"> |
||||
</el-option> |
||||
<el-option |
||||
label="三级" |
||||
:value="3"> |
||||
</el-option> |
||||
</el-select> |
||||
</el-form-item> |
||||
</el-form> |
||||
|
||||
<template #footer> |
||||
<span class="dialog-footer"> |
||||
<el-button @click="closeDialog">取 消</el-button> |
||||
<el-button type="primary" @click="submit">确 定</el-button> |
||||
</span> |
||||
</template> |
||||
</el-dialog> |
||||
</template> |
||||
<script> |
||||
export default { |
||||
props: { |
||||
showDialog: { |
||||
type: Boolean, |
||||
default: false |
||||
}, |
||||
}, |
||||
data() { |
||||
return { |
||||
openShow:false, |
||||
form:{ |
||||
value1:'' |
||||
} |
||||
} |
||||
}, |
||||
mounted(){ |
||||
this.openShow = this.showDialog |
||||
}, |
||||
methods:{ |
||||
closeDialog(){ |
||||
this.openShow = false |
||||
this.$emit('closeDialog'); |
||||
}, |
||||
submit() { |
||||
if (!this.form.value1) { |
||||
this.$message.warning('请选择优先级'); |
||||
return; |
||||
} |
||||
this.$emit('submitPriority', { |
||||
priority: this.form.value1 |
||||
}); |
||||
this.closeDialog(); |
||||
} |
||||
}, |
||||
|
||||
watch:{ |
||||
showDialog(val){ |
||||
this.openShow = val |
||||
} } |
||||
} |
||||
</script> |
||||
<style lang="scss" scoped></style> |
||||
Loading…
Reference in new issue