Browse Source

2024-09-04

RFQ功能修改
java8
fengyuan_yang 1 year ago
parent
commit
86632cc9fb
  1. 140
      src/views/modules/part/bomManagement.vue
  2. 394
      src/views/modules/part/routingManagement.vue

140
src/views/modules/part/bomManagement.vue

@ -19,7 +19,12 @@
<el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input> <el-input v-model="searchData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'制造类型'"> <el-form-item :label="'制造类型'">
<el-input v-model="searchData.bomType" clearable style="width: 120px"></el-input>
<el-select v-model="searchData.bomType" clearable style="width: 120px">
<el-option label="Manufacturing" value="Manufacturing"></el-option>
<el-option label="Repair" value="Repair"></el-option>
<el-option label="Purchase" value="Purchase"></el-option>
<el-option label="Prototype" value="Prototype"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item :label="'BOM版本号'"> <el-form-item :label="'BOM版本号'">
<el-input v-model="searchData.engChgLevel" clearable style="width: 120px"></el-input> <el-input v-model="searchData.engChgLevel" clearable style="width: 120px"></el-input>
@ -526,7 +531,7 @@
<el-form-item label="物料编码"> <el-form-item label="物料编码">
<el-input v-model="modalData.partNo" readonly style="width: 120px"></el-input> <el-input v-model="modalData.partNo" readonly style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="'物料名称'">
<el-form-item label="物料名称">
<el-input v-model="modalData.partDesc" readonly style="width: 249px"></el-input> <el-input v-model="modalData.partDesc" readonly style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -608,7 +613,7 @@
</el-form> </el-form>
</fieldset> </fieldset>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="copyBom">保存</el-button>
<el-button type="primary" :loading="copyLoading" @click="copyBom">保存</el-button>
<el-button type="primary" @click="copyBomModelFlag = false">关闭</el-button> <el-button type="primary" @click="copyBomModelFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -669,15 +674,18 @@
<legend>Source Revision</legend> <legend>Source Revision</legend>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码"> <el-form-item label="物料编码">
<el-input v-model="detailData.partNo" readonly style="width: 185px"></el-input>
<el-input v-model="detailData.partNo" readonly style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="Site">
<el-input v-model="detailData.site" disabled style="width: 185px"></el-input>
<el-form-item label="物料名称">
<el-input v-model="modalData.partDesc" readonly style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Site">
<el-input v-model="detailData.site" readonly style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="BOM版本号"> <el-form-item label="BOM版本号">
<el-input v-model="detailData.engChgLevel" readonly style="width: 185px"></el-input>
<el-input v-model="detailData.engChgLevel" readonly style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="制造类型"> <el-form-item label="制造类型">
<el-input v-model="detailData.bomType" readonly style="width: 185px"></el-input> <el-input v-model="detailData.bomType" readonly style="width: 185px"></el-input>
@ -695,16 +703,20 @@
<fieldset style="width: 426px"> <fieldset style="width: 426px">
<legend>Destination Revision</legend> <legend>Destination Revision</legend>
<el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码">
<el-input v-model="copyAlternativeData.partNo" style="width: 185px"></el-input>
<el-form-item>
<span slot="label" @click="queryCopyPartModal"><a herf="#">物料编码</a></span>
<el-input v-model="copyAlternativeData.partNo" @blur="copyPartBlur" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="Site">
<el-input v-model="copyAlternativeData.site" disabled style="width: 185px"></el-input>
<el-form-item :label="'物料名称'">
<el-input v-model="copyAlternativeData.partDesc" disabled style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Site">
<el-input v-model="copyAlternativeData.site" disabled style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="BOM版本号"> <el-form-item label="BOM版本号">
<el-input v-model="copyAlternativeData.engChgLevel" style="width: 185px"></el-input>
<el-input v-model="copyAlternativeData.engChgLevel" style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="制造类型"> <el-form-item label="制造类型">
<el-select v-model="copyAlternativeData.bomType" style="width: 185px"> <el-select v-model="copyAlternativeData.bomType" style="width: 185px">
@ -856,6 +868,7 @@ export default {
saveHeaderLoading: false, saveHeaderLoading: false,
saveDetailLoading: false, saveDetailLoading: false,
saveAllLoading: false, saveAllLoading: false,
copyLoading: false,
// //
detailTable: 'bom_detail', detailTable: 'bom_detail',
subDetailTable: 'bom_sub_detail', subDetailTable: 'bom_sub_detail',
@ -945,6 +958,7 @@ export default {
limit: 10 limit: 10
}, },
copyPartData: { copyPartData: {
type: '',
site: '', site: '',
buNo: '', buNo: '',
partNo: '', partNo: '',
@ -981,6 +995,7 @@ export default {
}, },
copyBomData: { copyBomData: {
site: '', site: '',
buNo: '',
partNo: '', partNo: '',
partDesc: '', partDesc: '',
engChgLevel: '', engChgLevel: '',
@ -993,6 +1008,7 @@ export default {
copyAlternativeData: { copyAlternativeData: {
site: '', site: '',
partNo: '', partNo: '',
partDesc: '',
engChgLevel: '', engChgLevel: '',
bomType: '', bomType: '',
alternativeNo: '', alternativeNo: '',
@ -1879,6 +1895,7 @@ export default {
columnImage: false, columnImage: false,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100
}, },
{ {
columnProp: 'alternativeDescription', columnProp: 'alternativeDescription',
@ -1889,6 +1906,7 @@ export default {
columnImage: false, columnImage: false,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 200
}, },
{ {
columnProp: 'status', columnProp: 'status',
@ -1899,6 +1917,7 @@ export default {
columnImage: false, columnImage: false,
status: true, status: true,
fixed: '', fixed: '',
columnWidth: 100
}, },
], ],
// ======== ======== // ======== ========
@ -2298,6 +2317,7 @@ export default {
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
printUnit: row.printUnit, printUnit: row.printUnit,
printUnitName: row.printUnitName, printUnitName: row.printUnitName,
alternativeNo: row.alternativeNo
} }
this.subDetailTable = 'bom_sub_detail' this.subDetailTable = 'bom_sub_detail'
// bom // bom
@ -2732,6 +2752,8 @@ export default {
partNoBlur () { partNoBlur () {
this.partData.limit = this.pageSize2 this.partData.limit = this.pageSize2
this.partData.page = this.pageIndex2 this.partData.page = this.pageIndex2
this.partData.site = this.modalData.bu.split('_')[0]
this.partData.buNo = this.modalData.bu.split('_')[1]
this.partData.partNo = this.modalData.partNo this.partData.partNo = this.modalData.partNo
queryPartList(this.partData).then(({data}) => { queryPartList(this.partData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -2781,9 +2803,14 @@ export default {
// copy // copy
getCopyRowData (row) { getCopyRowData (row) {
this.copyBomData.partNo = row.partNo
this.copyBomData.partDesc = row.partDesc
this.copyBomTypeChange()
if (this.copyPartData.type === '1') {
this.copyBomData.partNo = row.partNo
this.copyBomData.partDesc = row.partDesc
this.copyBomTypeChange()
} else {
this.copyAlternativeData.partNo = row.partNo
this.copyAlternativeData.partDesc = row.partDesc
}
this.copyPartModelFlag = false this.copyPartModelFlag = false
}, },
@ -2816,10 +2843,10 @@ export default {
* copy物料列表 * copy物料列表
*/ */
queryCopyPartModal () { queryCopyPartModal () {
this.copyPartData.limit = this.pageSize3
this.copyPartData.page = this.pageIndex3
this.copyPartData.site = this.copyBomData.site
this.copyPartData.buNo = this.copyBomData.buNo
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
this.copyPartData.site = this.modalData.site
this.copyPartData.buNo = this.modalData.buNo
// //
queryPartList(this.copyPartData).then(({data}) => { queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -2901,20 +2928,38 @@ export default {
// copy // copy
copyPartBlur () { copyPartBlur () {
if (this.copyBomData.partNo != null && this.copyBomData.partNo !== '') {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
this.copyPartData.partNo = this.copyBomData.partNo
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
if (data.page.list.length === 1) {
this.copyBomData.partDesc = data.page.list[0].partDesc
} else {
this.$message.warning('该物料不存在!')
this.copyBomData.partDesc = ''
if (this.copyPartData.type === '1') {
if (this.copyBomData.partNo != null && this.copyBomData.partNo !== '') {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
this.copyPartData.partNo = this.copyBomData.partNo
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
if (data.page.list.length === 1) {
this.copyBomData.partDesc = data.page.list[0].partDesc
} else {
this.$message.warning('该物料不存在!')
this.copyBomData.partDesc = ''
}
} }
}
})
})
}
} else {
if (this.copyAlternativeData.partNo != null && this.copyAlternativeData.partNo !== '') {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
this.copyPartData.partNo = this.copyAlternativeData.partNo
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
if (data.page.list.length === 1) {
this.copyAlternativeData.partDesc = data.page.list[0].partDesc
} else {
this.$message.warning('该物料不存在!')
this.copyAlternativeData.partDesc = ''
}
}
})
}
} }
}, },
@ -3186,6 +3231,15 @@ export default {
previousVersion: {}, previousVersion: {},
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
} }
this.copyPartData = {
type: '1',
site: this.modalData.site,
buNo: this.modalData.buNo,
partNo: '',
partDesc: '',
page: 1,
limit: 10
}
this.copyBomModelFlag = true this.copyBomModelFlag = true
}, },
/** /**
@ -3204,12 +3258,17 @@ export default {
this.$message.warning('请选择制造类型!') this.$message.warning('请选择制造类型!')
return return
} }
if (this.copyBomData.effPhaseOutDate != null && this.copyBomData.effPhaseOutDate !== '' && this.copyBomData.effPhaseOutDate < this.copyBomData.effPhaseInDate) {
this.$message.warning('失效日期必须大于生效日期!')
return
}
this.copyBomData.previousVersion = this.modalData this.copyBomData.previousVersion = this.modalData
this.copyLoading = true
// //
copyBom(this.copyBomData).then(({data}) => { copyBom(this.copyBomData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.modalData.effPhaseOutDate = data.rows.effPhaseOutDate
this.copyBomModelFlag = false this.copyBomModelFlag = false
this.updateModal(data.rows)
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -3221,6 +3280,9 @@ export default {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
this.copyLoading = false
}).catch(()=>{
this.copyLoading = false
}) })
}, },
/** /**
@ -3231,6 +3293,7 @@ export default {
site: this.detailData.site, site: this.detailData.site,
buNo: this.detailData.buNo, buNo: this.detailData.buNo,
partNo: this.detailData.partNo, partNo: this.detailData.partNo,
partDesc: this.modalData.partDesc,
engChgLevel: this.detailData.engChgLevel, engChgLevel: this.detailData.engChgLevel,
bomType: this.detailData.bomType, bomType: this.detailData.bomType,
alternativeNo: this.detailData.alternativeNo, alternativeNo: this.detailData.alternativeNo,
@ -3242,6 +3305,15 @@ export default {
previousVersion: {}, previousVersion: {},
createBy: this.$store.state.user.name createBy: this.$store.state.user.name
} }
this.copyPartData = {
type: '2',
site: this.detailData.site,
buNo: this.detailData.buNo,
partNo: '',
partDesc: '',
page: 1,
limit: 10
}
this.copyAlternativeModelFlag = true this.copyAlternativeModelFlag = true
}, },
@ -3272,7 +3344,7 @@ export default {
this.copyAlternativeData.previousVersion = this.detailData this.copyAlternativeData.previousVersion = this.detailData
copyAlternative(this.copyAlternativeData).then(({data}) => { copyAlternative(this.copyAlternativeData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.detailDataList = data.rows.detailDataList
this.updateModal(data.rows)
this.copyAlternativeModelFlag = false this.copyAlternativeModelFlag = false
this.$message({ this.$message({
message: '操作成功', message: '操作成功',

394
src/views/modules/part/routingManagement.vue

@ -319,6 +319,16 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页插件 -->
<el-pagination
@size-change="sizeChangeHandle2"
@current-change="currentChangeHandle2"
:current-page="pageIndex2"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize2"
:total="totalPage2"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
</div> </div>
<el-footer style="height:40px;margin-top: 20px;text-align:center"> <el-footer style="height:40px;margin-top: 20px;text-align:center">
<el-button type="primary" @click="partModelFlag=false">关闭</el-button> <el-button type="primary" @click="partModelFlag=false">关闭</el-button>
@ -417,15 +427,18 @@
<legend>Source Revision</legend> <legend>Source Revision</legend>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码"> <el-form-item label="物料编码">
<el-input v-model="modalData.partNo" readonly style="width: 185px"></el-input>
<el-input v-model="modalData.partNo" readonly style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="Site">
<el-input v-model="modalData.site" disabled style="width: 185px"></el-input>
<el-form-item label="物料名称">
<el-input v-model="modalData.partDesc" readonly style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Site">
<el-input v-model="modalData.site" readonly style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="Routing版本号"> <el-form-item label="Routing版本号">
<el-input v-model="modalData.routingRevision" readonly style="width: 185px"></el-input>
<el-input v-model="modalData.routingRevision" readonly style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="工艺类型"> <el-form-item label="工艺类型">
<el-input v-model="modalData.routingType" readonly style="width: 185px"></el-input> <el-input v-model="modalData.routingType" readonly style="width: 185px"></el-input>
@ -464,19 +477,23 @@
<fieldset style="width: 426px"> <fieldset style="width: 426px">
<legend>Destination Revision</legend> <legend>Destination Revision</legend>
<el-form :inline="true" label-position="top" :model="copyRoutingData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyRoutingData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码">
<el-input v-model="copyRoutingData.partNo" style="width: 185px"></el-input>
<el-form-item>
<span slot="label" @click="queryCopyPartModal"><a herf="#">物料编码</a></span>
<el-input v-model="copyRoutingData.partNo" @change="copyRoutingTypeChange" @blur="copyPartBlur" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="Site">
<el-input v-model="copyRoutingData.site" disabled style="width: 185px"></el-input>
<el-form-item :label="'物料名称'">
<el-input v-model="copyRoutingData.partDesc" disabled style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="copyRoutingData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyRoutingData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Site">
<el-input v-model="copyRoutingData.site" disabled style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="Routing版本号"> <el-form-item label="Routing版本号">
<el-input v-model="copyRoutingData.routingRevision" style="width: 185px"></el-input>
<el-input v-model="copyRoutingData.routingRevision" style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="工艺类型"> <el-form-item label="工艺类型">
<el-select v-model="copyRoutingData.routingType" style="width: 185px">
<el-select v-model="copyRoutingData.routingType" @change="copyRoutingTypeChange" style="width: 185px">
<el-option label="Manufacturing" value="Manufacturing"></el-option> <el-option label="Manufacturing" value="Manufacturing"></el-option>
<el-option label="Repair" value="Repair"></el-option> <el-option label="Repair" value="Repair"></el-option>
<el-option label="Prototype" value="Prototype"></el-option> <el-option label="Prototype" value="Prototype"></el-option>
@ -493,7 +510,7 @@
</el-form> </el-form>
</fieldset> </fieldset>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="copyRouting">保存</el-button>
<el-button type="primary" :loading="copyLoading" @click="copyRouting">保存</el-button>
<el-button type="primary" @click="copyRoutingModelFlag = false">关闭</el-button> <el-button type="primary" @click="copyRoutingModelFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -504,15 +521,18 @@
<legend>Source Revision</legend> <legend>Source Revision</legend>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码"> <el-form-item label="物料编码">
<el-input v-model="detailData.partNo" readonly style="width: 185px"></el-input>
<el-input v-model="detailData.partNo" readonly style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="Site">
<el-input v-model="detailData.site" disabled style="width: 185px"></el-input>
<el-form-item label="物料名称">
<el-input v-model="modalData.partDesc" readonly style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="detailData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Site">
<el-input v-model="detailData.site" readonly style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="Routing版本号"> <el-form-item label="Routing版本号">
<el-input v-model="detailData.routingRevision" readonly style="width: 185px"></el-input>
<el-input v-model="detailData.routingRevision" readonly style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="工艺类型"> <el-form-item label="工艺类型">
<el-input v-model="detailData.routingType" readonly style="width: 185px"></el-input> <el-input v-model="detailData.routingType" readonly style="width: 185px"></el-input>
@ -530,16 +550,20 @@
<fieldset style="width: 426px"> <fieldset style="width: 426px">
<legend>Destination Revision</legend> <legend>Destination Revision</legend>
<el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="物料编码">
<el-input v-model="copyAlternativeData.partNo" style="width: 185px"></el-input>
<el-form-item>
<span slot="label" @click="queryCopyPartModal"><a herf="#">物料编码</a></span>
<el-input v-model="copyAlternativeData.partNo" @blur="copyPartBlur" style="width: 120px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="Site">
<el-input v-model="copyAlternativeData.site" disabled style="width: 185px"></el-input>
<el-form-item :label="'物料名称'">
<el-input v-model="copyAlternativeData.partDesc" disabled style="width: 249px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;"> <el-form :inline="true" label-position="top" :model="copyAlternativeData" style="margin-left: 7px;margin-top: -5px;">
<el-form-item label="Site">
<el-input v-model="copyAlternativeData.site" disabled style="width: 85px"></el-input>
</el-form-item>
<el-form-item label="Routing版本号"> <el-form-item label="Routing版本号">
<el-input v-model="copyAlternativeData.routingRevision" style="width: 185px"></el-input>
<el-input v-model="copyAlternativeData.routingRevision" style="width: 85px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="工艺类型"> <el-form-item label="工艺类型">
<el-select v-model="copyAlternativeData.routingType" style="width: 185px"> <el-select v-model="copyAlternativeData.routingType" style="width: 185px">
@ -559,11 +583,61 @@
</el-form> </el-form>
</fieldset> </fieldset>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button type="primary" @click="copyAlternative">保存</el-button>
<el-button type="primary" :loading="copyLoading" @click="copyAlternative">保存</el-button>
<el-button type="primary" @click="copyAlternativeModelFlag = false">关闭</el-button> <el-button type="primary" @click="copyAlternativeModelFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
<!-- copy物料模态框 -->
<el-dialog title="物料清单" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="copyPartModelFlag" width="700px">
<el-form :inline="true" label-position="top" :model="copyPartData">
<el-form-item :label="'物料编码'">
<el-input v-model="copyPartData.partNo" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="'物料名称'">
<el-input v-model="copyPartData.partDesc" clearable style="width: 120px"></el-input>
</el-form-item>
<el-form-item :label="' '">
<el-button type="primary" @click="queryCopyPartList">查询</el-button>
</el-form-item>
</el-form>
<el-table
:height="250"
:data="copyPartList"
@row-dblclick="getCopyRowData"
border
style="width: 100%;">
<el-table-column
v-for="(item,index) in componentPartColumnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden">{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
<!-- 分页插件 -->
<el-pagination
@size-change="sizeChangeHandle4"
@current-change="currentChangeHandle4"
:current-page="pageIndex4"
:page-sizes="[20, 50, 100, 200, 500]"
:page-size="pageSize4"
:total="totalPage4"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<el-footer style="height:35px;margin-top:10px;text-align:center">
<el-button type="primary" @click="copyPartModelFlag = false">关闭</el-button>
</el-footer>
</el-dialog>
<!-- chooseList模态框 --> <!-- chooseList模态框 -->
<ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList> <ChooseList ref="baseList" @getBaseData="getBaseData"></ChooseList>
</div> </div>
@ -660,6 +734,12 @@ export default {
pageIndex: 1, pageIndex: 1,
pageSize: 50, pageSize: 50,
totalPage: 0, totalPage: 0,
pageIndex2: 1,
pageSize2: 20,
totalPage2: 0,
pageIndex4: 1,
pageSize4: 20,
totalPage4: 0,
selectedDataNum: 0, selectedDataNum: 0,
// //
searchData: { searchData: {
@ -676,6 +756,7 @@ export default {
saveHeaderLoading: false, saveHeaderLoading: false,
saveDetailLoading: false, saveDetailLoading: false,
saveAllLoading: false, saveAllLoading: false,
copyLoading: false,
// //
detailTable: 'routing_detail', detailTable: 'routing_detail',
subDetailTable: 'routing_sub_detail', subDetailTable: 'routing_sub_detail',
@ -763,6 +844,8 @@ export default {
buNo: '', buNo: '',
partNo: '', partNo: '',
partDesc: '', partDesc: '',
page: 1,
limit: 10
}, },
operationData: { operationData: {
site: this.$store.state.user.site, site: this.$store.state.user.site,
@ -800,7 +883,9 @@ export default {
}, },
copyRoutingData: { copyRoutingData: {
site: '', site: '',
buNo: '',
partNo: '', partNo: '',
partDesc: '',
routingRevision: '', routingRevision: '',
routingType: '', routingType: '',
phaseInDate: '', phaseInDate: '',
@ -811,6 +896,7 @@ export default {
copyAlternativeData: { copyAlternativeData: {
site: '', site: '',
partNo: '', partNo: '',
partDesc: '',
routingRevision: '', routingRevision: '',
routingType: '', routingType: '',
alternativeNo: '', alternativeNo: '',
@ -829,6 +915,15 @@ export default {
previousVersion: {}, previousVersion: {},
createBy: '' createBy: ''
}, },
copyPartData: {
type: '',
site: '',
buNo: '',
partNo: '',
partDesc: '',
page: 1,
limit: 10
},
// ======== ======== // ======== ========
dataList: [], dataList: [],
partList: [], partList: [],
@ -839,6 +934,7 @@ export default {
checkedDetail: [], checkedDetail: [],
checkedTool: [], checkedTool: [],
alternativeList: [], alternativeList: [],
copyPartList: [],
// ======== ======== // ======== ========
columnList: [ columnList: [
{ {
@ -1384,6 +1480,68 @@ export default {
fixed: '', fixed: '',
}, },
], ],
componentPartColumnList: [
{
columnProp: 'partNo',
headerAlign: "center",
align: "center",
columnLabel: '物料编码',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
columnProp: 'partDesc',
headerAlign: "center",
align: "left",
columnLabel: '物料名称',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
columnProp: 'familyName',
headerAlign: "center",
align: "center",
columnLabel: '物料分类',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
columnProp: 'printUnit',
headerAlign: "center",
align: "center",
columnLabel: '计量单位',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
columnProp: 'spec',
headerAlign: "center",
align: "center",
columnLabel: '规格型号',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
},
{
columnProp: 'partType',
headerAlign: "center",
align: "center",
columnLabel: '零件类型',
columnHidden: false,
columnImage: false,
status: true,
fixed: '',
}
],
// ======== ======== // ======== ========
rules: { rules: {
partNo: [ partNo: [
@ -1556,6 +1714,7 @@ export default {
copyAlternativeModelFlag: false, copyAlternativeModelFlag: false,
headerSaveFlag: false, headerSaveFlag: false,
menuId: this.$route.meta.menuId, menuId: this.$route.meta.menuId,
copyPartModelFlag: false,
} }
}, },
@ -1628,6 +1787,149 @@ export default {
this.getDataList() this.getDataList()
}, },
/**
* 每页数
* @param val
*/
sizeChangeHandle2 (val) {
this.pageSize2 = val
this.pageIndex2 = 1
this.queryPartList()
},
/**
* 当前页
* @param val
*/
currentChangeHandle2 (val) {
this.pageIndex2 = val
this.queryPartList()
},
/**
* 每页数
* @param val
*/
sizeChangeHandle4 (val) {
this.pageSize4 = val
this.pageIndex4 = 1
this.queryCopyPartModal()
},
/**
* 当前页
* @param val
*/
currentChangeHandle4 (val) {
this.pageIndex4 = val
this.queryCopyPartModal()
},
/**
* copy物料列表
*/
queryCopyPartModal () {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
this.copyPartData.site = this.modalData.site
this.copyPartData.buNo = this.modalData.buNo
//
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
this.copyPartList = data.page.list
this.pageIndex4 = data.page.currPage
this.pageSize4 = data.page.pageSize
this.totalPage4 = data.page.totalCount
this.copyPartModelFlag = true
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
/**
* copy物料查询列表
*/
queryCopyPartList () {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
//
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
this.copyPartList = data.page.list
this.pageIndex4 = data.page.currPage
this.pageSize4 = data.page.pageSize
this.totalPage4 = data.page.totalCount
} else {
this.copyPartList = []
}
})
},
// copy
copyPartBlur () {
if (this.copyPartData.type === '1') {
if (this.copyRoutingData.partNo != null && this.copyRoutingData.partNo !== '') {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
this.copyPartData.partNo = this.copyRoutingData.partNo
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
if (data.page.list.length === 1) {
this.copyRoutingData.partDesc = data.page.list[0].partDesc
} else {
this.$message.warning('该物料不存在!')
this.copyRoutingData.partDesc = ''
}
}
})
}
} else {
if (this.copyAlternativeData.partNo != null && this.copyAlternativeData.partNo !== '') {
this.copyPartData.limit = this.pageSize4
this.copyPartData.page = this.pageIndex4
this.copyPartData.partNo = this.copyAlternativeData.partNo
queryPartList(this.copyPartData).then(({data}) => {
if (data && data.code === 0) {
if (data.page.list.length === 1) {
this.copyAlternativeData.partDesc = data.page.list[0].partDesc
} else {
this.$message.warning('该物料不存在!')
this.copyAlternativeData.partDesc = ''
}
}
})
}
}
},
// copy
getCopyRowData (row) {
if (this.copyPartData.type === '1') {
this.copyRoutingData.partNo = row.partNo
this.copyRoutingData.partDesc = row.partDesc
this.copyRoutingTypeChange()
} else {
this.copyAlternativeData.partNo = row.partNo
this.copyAlternativeData.partDesc = row.partDesc
}
this.copyPartModelFlag = false
},
// copy BOM
copyRoutingTypeChange () {
// routing
getRottingRevision(this.copyRoutingData).then(({data}) => {
if (data && data.code === 0) {
this.copyRoutingData.routingRevision = data.routingRevision
} else {
this.copyRoutingData.routingRevision = ''
}
})
},
// ======== ======== // ======== ========
/** /**
* 获取数据列表 * 获取数据列表
@ -1728,6 +2030,7 @@ export default {
updateBy: this.$store.state.user.name, updateBy: this.$store.state.user.name,
printUnit: row.printUnit, printUnit: row.printUnit,
printUnitName: row.printUnitName, printUnitName: row.printUnitName,
alternativeNo: row.alternativeNo,
} }
// routing // routing
queryRoutingDetail(this.modalData).then(({data}) => { queryRoutingDetail(this.modalData).then(({data}) => {
@ -2102,11 +2405,16 @@ export default {
* 查询物料 * 查询物料
*/ */
queryPartList () { queryPartList () {
this.partData.limit = this.pageSize2
this.partData.page = this.pageIndex2
this.partData.site = this.modalData.bu.split('_')[0] this.partData.site = this.modalData.bu.split('_')[0]
this.partData.buNo = this.modalData.bu.split('_')[1] this.partData.buNo = this.modalData.bu.split('_')[1]
queryPartListRouting(this.partData).then(({data}) => { queryPartListRouting(this.partData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.partList = data.rows
this.partList = data.page.list
this.pageIndex2 = data.page.currPage
this.pageSize2 = data.page.pageSize
this.totalPage2 = data.page.totalCount
this.partModelFlag = true this.partModelFlag = true
} else { } else {
this.$alert(data.msg, '错误', { this.$alert(data.msg, '错误', {
@ -2118,13 +2426,15 @@ export default {
// //
partNoBlur () { partNoBlur () {
this.partData.limit = this.pageSize2
this.partData.page = this.pageIndex2
this.partData.partNo = this.modalData.partNo this.partData.partNo = this.modalData.partNo
queryPartList(this.partData).then(({data}) => { queryPartList(this.partData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
if (data.rows.length === 1) {
this.modalData.partDesc = data.rows[0].partDesc
this.modalData.printUnit = data.rows[0].printUnit
this.modalData.printUnitName = data.rows[0].printUnitName
if (data.page.list.length === 1) {
this.modalData.partDesc = data.page.list[0].partDesc
this.modalData.printUnit = data.page.list[0].printUnit
this.modalData.printUnitName = data.page.list[0].printUnitName
// routing // routing
getRottingRevision(this.modalData).then(({data}) => { getRottingRevision(this.modalData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -2443,6 +2753,7 @@ export default {
site: this.modalData.site, site: this.modalData.site,
buNo: this.modalData.buNo, buNo: this.modalData.buNo,
partNo: this.modalData.partNo, partNo: this.modalData.partNo,
partDesc: this.modalData.partDesc,
routingRevision: this.modalData.routingRevision + 1, routingRevision: this.modalData.routingRevision + 1,
routingType: this.modalData.routingType, routingType: this.modalData.routingType,
phaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'), phaseInDate: this.dayjs(new Date()).format('YYYY-MM-DD'),
@ -2450,6 +2761,15 @@ export default {
previousVersion: {}, previousVersion: {},
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
} }
this.copyPartData = {
type: '1',
site: this.modalData.site,
buNo: this.modalData.buNo,
partNo: '',
partDesc: '',
page: 1,
limit: 10
}
this.copyRoutingModelFlag = true this.copyRoutingModelFlag = true
}, },
@ -2470,11 +2790,12 @@ export default {
return return
} }
this.copyRoutingData.previousVersion = this.modalData this.copyRoutingData.previousVersion = this.modalData
this.copyLoading = true
// //
copyRouting(this.copyRoutingData).then(({data}) => { copyRouting(this.copyRoutingData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.modalData.phaseOutDate = data.rows.phaseOutDate
this.copyRoutingModelFlag = false this.copyRoutingModelFlag = false
this.updateModal(data.rows)
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -2486,6 +2807,9 @@ export default {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
this.copyLoading = false
}).catch(()=>{
this.copyLoading = false
}) })
}, },
@ -2497,6 +2821,7 @@ export default {
site: this.detailData.site, site: this.detailData.site,
buNo: this.detailData.buNo, buNo: this.detailData.buNo,
partNo: this.detailData.partNo, partNo: this.detailData.partNo,
partDesc: this.modalData.partDesc,
routingRevision: this.detailData.routingRevision, routingRevision: this.detailData.routingRevision,
routingType: this.detailData.routingType, routingType: this.detailData.routingType,
alternativeNo: this.detailData.alternativeNo, alternativeNo: this.detailData.alternativeNo,
@ -2515,6 +2840,15 @@ export default {
previousVersion: {}, previousVersion: {},
createBy: this.$store.state.user.name createBy: this.$store.state.user.name
} }
this.copyPartData = {
type: '2',
site: this.detailData.site,
buNo: this.detailData.buNo,
partNo: '',
partDesc: '',
page: 1,
limit: 10
}
this.copyAlternativeModelFlag = true this.copyAlternativeModelFlag = true
}, },
@ -2543,10 +2877,11 @@ export default {
return return
} }
this.copyAlternativeData.previousVersion = this.detailData this.copyAlternativeData.previousVersion = this.detailData
this.copyLoading = true
copyAlternative(this.copyAlternativeData).then(({data}) => { copyAlternative(this.copyAlternativeData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.detailDataList = data.rows.detailDataList
this.copyAlternativeModelFlag = false this.copyAlternativeModelFlag = false
this.updateModal(data.rows)
this.$message({ this.$message({
message: '操作成功', message: '操作成功',
type: 'success', type: 'success',
@ -2558,6 +2893,9 @@ export default {
confirmButtonText: '确定' confirmButtonText: '确定'
}) })
} }
this.copyLoading = false
}).catch(()=>{
this.copyLoading = false
}) })
}, },

Loading…
Cancel
Save