|
|
@ -244,6 +244,7 @@ |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<el-button type="primary" :loading="alternativeLoading" @click="saveComponentModal" style="margin-left: 7px">新增</el-button> |
|
|
<el-button type="primary" :loading="alternativeLoading" @click="saveComponentModal" style="margin-left: 7px">新增</el-button> |
|
|
<el-button type="primary" :loading="alternativeLoading" @click="batchSaveComponentModal" style="margin-left: 7px">批量新增</el-button> |
|
|
<el-button type="primary" :loading="alternativeLoading" @click="batchSaveComponentModal" style="margin-left: 7px">批量新增</el-button> |
|
|
|
|
|
<el-button type="primary" :loading="alternativeLoading" @click="batchUpdateOperationModal" style="margin-left: 7px">编辑工序</el-button> |
|
|
<el-button type="primary" icon="el-icon-upload" @click="bomComponentUpload">导入</el-button> |
|
|
<el-button type="primary" icon="el-icon-upload" @click="bomComponentUpload">导入</el-button> |
|
|
<el-button type="primary" :loading="alternativeLoading" @click="deleteComponentPart">删除</el-button> |
|
|
<el-button type="primary" :loading="alternativeLoading" @click="deleteComponentPart">删除</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
@ -331,8 +332,8 @@ |
|
|
</el-tab-pane> |
|
|
</el-tab-pane> |
|
|
</el-tabs> |
|
|
</el-tabs> |
|
|
<el-footer style="height:30px;margin-top:20px;text-align:center"> |
|
|
<el-footer style="height:30px;margin-top:20px;text-align:center"> |
|
|
<el-button :loading="saveAllLoading" type="primary" @click="saveData(true)">应用</el-button> |
|
|
|
|
|
<el-button :loading="saveAllLoading" type="primary" @click="saveData(false)">保存</el-button> |
|
|
|
|
|
|
|
|
<el-button :loading="saveAllLoading" type="primary" @click="packageSaveData(true)">应用</el-button> |
|
|
|
|
|
<el-button :loading="saveAllLoading" type="primary" @click="packageSaveData(false)">保存</el-button> |
|
|
<el-button type="primary" @click="closeModal">关闭</el-button> |
|
|
<el-button type="primary" @click="closeModal">关闭</el-button> |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
@ -856,69 +857,6 @@ |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- <!– 批量新增子明细物料模态框 –>--> |
|
|
|
|
|
<!-- <el-dialog title="物料清单" top="17vh" :close-on-click-modal="false" v-drag :visible.sync="batchComponentPartModelFlag" width="1060px">--> |
|
|
|
|
|
<!-- <el-form :inline="true" label-position="top" :model="batchComponentPartData">--> |
|
|
|
|
|
<!-- <el-form-item :label="'物料编码'">--> |
|
|
|
|
|
<!-- <el-input v-model="batchComponentPartData.partNo" clearable style="width: 120px"></el-input>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- <el-form-item :label="'物料名称'">--> |
|
|
|
|
|
<!-- <el-input v-model="batchComponentPartData.partDesc" clearable style="width: 120px"></el-input>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- <el-form-item :label="' '">--> |
|
|
|
|
|
<!-- <el-button type="primary" @click="queryBatchComponentPartList">查询</el-button>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- <el-form-item :label="'损耗率%'" style="margin-left: 545px">--> |
|
|
|
|
|
<!-- <el-input-number :controls="false" :step="0" min="0" max="100" v-model="batchComponentPartData.shrinkageFactor" style="width: 80px"></el-input-number>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- </el-form>--> |
|
|
|
|
|
<!-- <el-table--> |
|
|
|
|
|
<!-- :height="400"--> |
|
|
|
|
|
<!-- :data="batchComponentPartList"--> |
|
|
|
|
|
<!-- ref="batchSaveTable"--> |
|
|
|
|
|
<!-- @row-click="batchSaveClickRow"--> |
|
|
|
|
|
<!-- @selection-change="selectionSaveComponent"--> |
|
|
|
|
|
<!-- border--> |
|
|
|
|
|
<!-- style="width: 100%;">--> |
|
|
|
|
|
<!-- <el-table-column--> |
|
|
|
|
|
<!-- type="selection"--> |
|
|
|
|
|
<!-- header-align="center"--> |
|
|
|
|
|
<!-- align="center"--> |
|
|
|
|
|
<!-- width="50">--> |
|
|
|
|
|
<!-- </el-table-column>--> |
|
|
|
|
|
<!-- <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="sizeChangeHandle5"--> |
|
|
|
|
|
<!-- @current-change="currentChangeHandle5"--> |
|
|
|
|
|
<!-- :current-page="pageIndex5"--> |
|
|
|
|
|
<!-- :page-sizes="[20, 50, 100, 200, 500]"--> |
|
|
|
|
|
<!-- :page-size="pageSize5"--> |
|
|
|
|
|
<!-- :total="totalPage5"--> |
|
|
|
|
|
<!-- 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="batchComponentDataSave">保存</el-button>--> |
|
|
|
|
|
<!-- <el-button type="primary" @click="batchComponentPartModelFlag = false">关闭</el-button>--> |
|
|
|
|
|
<!-- </el-footer>--> |
|
|
|
|
|
<!-- </el-dialog>--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 默认库位-> 快速新增 --> |
|
|
<!-- 默认库位-> 快速新增 --> |
|
|
<el-dialog title="新增" :close-on-click-modal="false" v-drag :visible.sync="batchComponentPartModelFlag" width="1170px"> |
|
|
<el-dialog title="新增" :close-on-click-modal="false" v-drag :visible.sync="batchComponentPartModelFlag" width="1170px"> |
|
|
<div style="font-size: 12px"> |
|
|
<div style="font-size: 12px"> |
|
|
@ -945,7 +883,7 @@ |
|
|
:data="batchComponentPartList" |
|
|
:data="batchComponentPartList" |
|
|
border |
|
|
border |
|
|
ref="batchSaveTable" |
|
|
ref="batchSaveTable" |
|
|
@row-click="batchSaveClickRow" |
|
|
|
|
|
|
|
|
@row-dblclick="batchAddPartDB" |
|
|
@selection-change="selectionSaveComponent" |
|
|
@selection-change="selectionSaveComponent" |
|
|
highlight-current-row |
|
|
highlight-current-row |
|
|
style="width: 100%"> |
|
|
style="width: 100%"> |
|
|
@ -997,7 +935,7 @@ |
|
|
:data="choosePartList" |
|
|
:data="choosePartList" |
|
|
border |
|
|
border |
|
|
ref="batchSaveTable2" |
|
|
ref="batchSaveTable2" |
|
|
@row-click="batchSaveClickRow2" |
|
|
|
|
|
|
|
|
@row-dblclick="batchDeletePartDB" |
|
|
@selection-change="selectionSaveComponent2" |
|
|
@selection-change="selectionSaveComponent2" |
|
|
highlight-current-row |
|
|
highlight-current-row |
|
|
style="width: 100%"> |
|
|
style="width: 100%"> |
|
|
@ -1030,6 +968,23 @@ |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 批量编辑工序 --> |
|
|
|
|
|
<el-dialog title="工序" top="35vh" :close-on-click-modal="false" v-drag :visible.sync="batchOperationModelFlag" width="350px"> |
|
|
|
|
|
<el-form :inline="true" label-position="top" :model="batchOperationData" style="margin-left: 5px"> |
|
|
|
|
|
<el-form-item label="工序编码"> |
|
|
|
|
|
<span slot="label" @click="queryOperationList"><a>工序</a></span> |
|
|
|
|
|
<el-input v-model="batchOperationData.operationNo" style="width: 100px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="工序名称"> |
|
|
|
|
|
<el-input v-model="batchOperationData.operationName" disabled style="width: 200px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-footer style="height:35px;margin-top:20px;text-align:center"> |
|
|
|
|
|
<el-button type="primary" @click="batchOperationEdit">保存</el-button> |
|
|
|
|
|
<el-button type="primary" @click="batchOperationModelFlag = false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<bom-component-upload ref="BomComponentUpload" @refreshPageTables="queryBomComponentTable" v-drag></bom-component-upload> |
|
|
<bom-component-upload ref="BomComponentUpload" @refreshPageTables="queryBomComponentTable" v-drag></bom-component-upload> |
|
|
|
|
|
|
|
|
@ -1068,13 +1023,14 @@ import { |
|
|
exportWordOrPdf, // 导出word |
|
|
exportWordOrPdf, // 导出word |
|
|
computeQtyPerAssemblySave, // 计算单位用量(新增) |
|
|
computeQtyPerAssemblySave, // 计算单位用量(新增) |
|
|
computeQtyPerAssemblyEdit, // 计算单位用量(修改) |
|
|
computeQtyPerAssemblyEdit, // 计算单位用量(修改) |
|
|
|
|
|
batchOperationEdit, // 批量修改工序 |
|
|
} from '@/api/part/bomManagement.js' |
|
|
} from '@/api/part/bomManagement.js' |
|
|
import {getSiteAndBuByUserName, getSiteAndBuByUserName2} from "@/api/qc/qc.js" |
|
|
import {getSiteAndBuByUserName, getSiteAndBuByUserName2} from "@/api/qc/qc.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" |
|
|
import ChooseList from '@/views/modules/common/Chooselist_eam' |
|
|
import ChooseList from '@/views/modules/common/Chooselist_eam' |
|
|
import BomComponentUpload from "./bom_component_upload.vue"; |
|
|
|
|
|
import {Decimal} from "decimal.js"; |
|
|
|
|
|
import {updateColumnSize} from "../../../api/table"; |
|
|
|
|
|
|
|
|
import BomComponentUpload from "./bom_component_upload.vue" |
|
|
|
|
|
import {Decimal} from "decimal.js" |
|
|
|
|
|
import {updateColumnSize} from "../../../api/table" |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
// 组件 |
|
|
// 组件 |
|
|
@ -1130,7 +1086,6 @@ export default { |
|
|
// 对象 |
|
|
// 对象 |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
// 导出 |
|
|
|
|
|
exportData: [], |
|
|
exportData: [], |
|
|
exportName: 'BOM物料列表' + this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
exportName: 'BOM物料列表' + this.dayjs().format('YYYYMMDDHHmmss'), |
|
|
exportHeader: ['BOM物料列表'], |
|
|
exportHeader: ['BOM物料列表'], |
|
|
@ -1138,6 +1093,11 @@ export default { |
|
|
resultList: [], |
|
|
resultList: [], |
|
|
userBuList: [], |
|
|
userBuList: [], |
|
|
buList: [], |
|
|
buList: [], |
|
|
|
|
|
batchOperationData: { |
|
|
|
|
|
operationId: '', |
|
|
|
|
|
operationNo: '', |
|
|
|
|
|
operationName: '' |
|
|
|
|
|
}, |
|
|
// ======== 行高 ======== |
|
|
// ======== 行高 ======== |
|
|
height: 200, |
|
|
height: 200, |
|
|
// ======== 分页 ======== |
|
|
// ======== 分页 ======== |
|
|
@ -1848,13 +1808,13 @@ export default { |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 601002, |
|
|
functionId: 601002, |
|
|
serialNumber: '601002Table2OperationDesc', |
|
|
|
|
|
|
|
|
serialNumber: '601002Table2OperationNo', |
|
|
tableId: '601002Table2', |
|
|
tableId: '601002Table2', |
|
|
tableName: 'BOM子物料表', |
|
|
tableName: 'BOM子物料表', |
|
|
columnProp: 'operationNo', |
|
|
columnProp: 'operationNo', |
|
|
headerAlign: 'center', |
|
|
headerAlign: 'center', |
|
|
align: 'center', |
|
|
align: 'center', |
|
|
columnLabel: '工序', |
|
|
|
|
|
|
|
|
columnLabel: '工序编码', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
@ -1863,6 +1823,24 @@ export default { |
|
|
fixed: '', |
|
|
fixed: '', |
|
|
columnWidth: 80 |
|
|
columnWidth: 80 |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
userId: this.$store.state.user.name, |
|
|
|
|
|
functionId: 601002, |
|
|
|
|
|
serialNumber: '601002Table2OperationName', |
|
|
|
|
|
tableId: '601002Table2', |
|
|
|
|
|
tableName: 'BOM子物料表', |
|
|
|
|
|
columnProp: 'operationName', |
|
|
|
|
|
headerAlign: 'center', |
|
|
|
|
|
align: 'left', |
|
|
|
|
|
columnLabel: '工序名称', |
|
|
|
|
|
columnHidden: false, |
|
|
|
|
|
columnImage: false, |
|
|
|
|
|
columnSortable: false, |
|
|
|
|
|
sortLv: 0, |
|
|
|
|
|
status: true, |
|
|
|
|
|
fixed: '', |
|
|
|
|
|
columnWidth: 120 |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 601002, |
|
|
functionId: 601002, |
|
|
@ -2164,6 +2142,7 @@ export default { |
|
|
headerSaveFlag: false, |
|
|
headerSaveFlag: false, |
|
|
menuId: this.$route.meta.menuId, |
|
|
menuId: this.$route.meta.menuId, |
|
|
batchComponentPartModelFlag: false, |
|
|
batchComponentPartModelFlag: false, |
|
|
|
|
|
batchOperationModelFlag: false, |
|
|
// ======== 子物料字段分类集合 ======== |
|
|
// ======== 子物料字段分类集合 ======== |
|
|
productionDataFamily: ['RFID003', 'RFID004', 'RFID005', 'RFID006', 'RFID007', 'RFID008', 'RFID009', 'RFID012', 'RFID023', 'RFID024', 'RFID025', 'RFID027'], |
|
|
productionDataFamily: ['RFID003', 'RFID004', 'RFID005', 'RFID006', 'RFID007', 'RFID008', 'RFID009', 'RFID012', 'RFID023', 'RFID024', 'RFID025', 'RFID027'], |
|
|
materialDataFamily: ['RFID011', 'RFID020', 'RFID021', 'RFID022'], |
|
|
materialDataFamily: ['RFID011', 'RFID020', 'RFID021', 'RFID022'], |
|
|
@ -2287,96 +2266,66 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// ======== 分页相关方法 ======== |
|
|
// ======== 分页相关方法 ======== |
|
|
/** |
|
|
|
|
|
* 每页数 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 每页数 |
|
|
sizeChangeHandle (val) { |
|
|
sizeChangeHandle (val) { |
|
|
this.pageSize = val |
|
|
this.pageSize = val |
|
|
this.pageIndex = 1 |
|
|
this.pageIndex = 1 |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 当前页 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 当前页 |
|
|
currentChangeHandle (val) { |
|
|
currentChangeHandle (val) { |
|
|
this.pageIndex = val |
|
|
this.pageIndex = val |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 每页数 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 每页数 |
|
|
sizeChangeHandle2 (val) { |
|
|
sizeChangeHandle2 (val) { |
|
|
this.pageSize2 = val |
|
|
this.pageSize2 = val |
|
|
this.pageIndex2 = 1 |
|
|
this.pageIndex2 = 1 |
|
|
this.queryPartList() |
|
|
this.queryPartList() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 当前页 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 当前页 |
|
|
currentChangeHandle2 (val) { |
|
|
currentChangeHandle2 (val) { |
|
|
this.pageIndex2 = val |
|
|
this.pageIndex2 = val |
|
|
this.queryPartList() |
|
|
this.queryPartList() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 每页数 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 每页数 |
|
|
sizeChangeHandle3 (val) { |
|
|
sizeChangeHandle3 (val) { |
|
|
this.pageSize3 = val |
|
|
this.pageSize3 = val |
|
|
this.pageIndex3 = 1 |
|
|
this.pageIndex3 = 1 |
|
|
this.queryComponentPartModal() |
|
|
this.queryComponentPartModal() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 当前页 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 当前页 |
|
|
currentChangeHandle3 (val) { |
|
|
currentChangeHandle3 (val) { |
|
|
this.pageIndex3 = val |
|
|
this.pageIndex3 = val |
|
|
this.queryComponentPartModal() |
|
|
this.queryComponentPartModal() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 每页数 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 每页数 |
|
|
sizeChangeHandle4 (val) { |
|
|
sizeChangeHandle4 (val) { |
|
|
this.pageSize4 = val |
|
|
this.pageSize4 = val |
|
|
this.pageIndex4 = 1 |
|
|
this.pageIndex4 = 1 |
|
|
this.queryCopyPartModal() |
|
|
this.queryCopyPartModal() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 当前页 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 当前页 |
|
|
currentChangeHandle4 (val) { |
|
|
currentChangeHandle4 (val) { |
|
|
this.pageIndex4 = val |
|
|
this.pageIndex4 = val |
|
|
this.queryCopyPartModal() |
|
|
this.queryCopyPartModal() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 每页数 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 每页数 |
|
|
sizeChangeHandle5 (val) { |
|
|
sizeChangeHandle5 (val) { |
|
|
this.pageSize5 = val |
|
|
this.pageSize5 = val |
|
|
this.pageIndex5 = 1 |
|
|
this.pageIndex5 = 1 |
|
|
this.queryBatchComponentPartList() |
|
|
this.queryBatchComponentPartList() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 当前页 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 当前页 |
|
|
currentChangeHandle5 (val) { |
|
|
currentChangeHandle5 (val) { |
|
|
this.pageIndex5 = val |
|
|
this.pageIndex5 = val |
|
|
this.queryBatchComponentPartList() |
|
|
this.queryBatchComponentPartList() |
|
|
@ -2384,17 +2333,13 @@ export default { |
|
|
|
|
|
|
|
|
// ======== 页签切换相关方法 ======== |
|
|
// ======== 页签切换相关方法 ======== |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 子明细页签选择替换 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 子明细页签选择替换 |
|
|
tabSubDetailClick (tab, event) { |
|
|
tabSubDetailClick (tab, event) { |
|
|
// 刷新列表数据 |
|
|
// 刷新列表数据 |
|
|
this.refreshSubDetailTable() |
|
|
this.refreshSubDetailTable() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 刷新子明细页签的table数据 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 刷新子明细页签的table数据 |
|
|
refreshSubDetailTable () { |
|
|
refreshSubDetailTable () { |
|
|
if (this.subDetailTable === 'bom_sub_detail') { |
|
|
if (this.subDetailTable === 'bom_sub_detail') { |
|
|
this.queryBomComponentTable() |
|
|
this.queryBomComponentTable() |
|
|
@ -2411,9 +2356,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// ======== 列表数据操作方法 ======== |
|
|
// ======== 列表数据操作方法 ======== |
|
|
/** |
|
|
|
|
|
* 获取数据列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 获取数据列表 |
|
|
getDataList () { |
|
|
getDataList () { |
|
|
this.searchData.limit = this.pageSize |
|
|
this.searchData.limit = this.pageSize |
|
|
this.searchData.page = this.pageIndex |
|
|
this.searchData.page = this.pageIndex |
|
|
@ -2428,39 +2371,24 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 复选列表信息 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 复选列表信息 |
|
|
selectionBom (val) { |
|
|
selectionBom (val) { |
|
|
this.bomSelections = val |
|
|
this.bomSelections = val |
|
|
this.$refs.selectDiv.setLengthselected(this.bomSelections.length) |
|
|
this.$refs.selectDiv.setLengthselected(this.bomSelections.length) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 点击行选中复选框 |
|
|
|
|
|
batchSaveClickRow (row) { |
|
|
|
|
|
this.$refs.batchSaveTable.toggleRowSelection(row) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 复选子物料信息 |
|
|
// 复选子物料信息 |
|
|
selectionSaveComponent (val) { |
|
|
selectionSaveComponent (val) { |
|
|
this.batchComponentSelections = val |
|
|
this.batchComponentSelections = val |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 点击行选中复选框 |
|
|
|
|
|
batchSaveClickRow2 (row) { |
|
|
|
|
|
this.$refs.batchSaveTable2.toggleRowSelection(row) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 复选子物料信息 |
|
|
// 复选子物料信息 |
|
|
selectionSaveComponent2 (val) { |
|
|
selectionSaveComponent2 (val) { |
|
|
this.batchComponentSelections2 = val |
|
|
this.batchComponentSelections2 = val |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// ======== 新增/编辑模态框 ======== |
|
|
// ======== 新增/编辑模态框 ======== |
|
|
/** |
|
|
|
|
|
* bom新增模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// bom新增模态框 |
|
|
addModal () { |
|
|
addModal () { |
|
|
this.modalData = { |
|
|
this.modalData = { |
|
|
flag: '1', |
|
|
flag: '1', |
|
|
@ -2510,9 +2438,7 @@ export default { |
|
|
this.modalFlag = true |
|
|
this.modalFlag = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* bom编辑模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// bom编辑模态框 |
|
|
async updateModal (row) { |
|
|
async updateModal (row) { |
|
|
this.modalData = { |
|
|
this.modalData = { |
|
|
flag: '2', |
|
|
flag: '2', |
|
|
@ -2555,9 +2481,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 替代新增模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 替代新增模态框 |
|
|
saveBomDetail () { |
|
|
saveBomDetail () { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
this.$message.warning('请先选择Bom物料!') |
|
|
this.$message.warning('请先选择Bom物料!') |
|
|
@ -2604,9 +2528,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 替代编辑模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 替代编辑模态框 |
|
|
updateBomDetail () { |
|
|
updateBomDetail () { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
this.$message.warning('请先选择Bom物料!') |
|
|
this.$message.warning('请先选择Bom物料!') |
|
|
@ -2652,9 +2574,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 子明细新增模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 子明细新增模态框 |
|
|
saveComponentModal () { |
|
|
saveComponentModal () { |
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
this.$message.warning('请先选择替代!') |
|
|
this.$message.warning('请先选择替代!') |
|
|
@ -2761,18 +2681,12 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 副产品新增模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 副产品新增模态框 |
|
|
saveByProductModal () { |
|
|
saveByProductModal () { |
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
this.$message.warning('请先选择替代!') |
|
|
this.$message.warning('请先选择替代!') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
|
|
|
// this.$message.warning('不可编辑的替代状态!') |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
this.componentData = { |
|
|
this.componentData = { |
|
|
flag: '1', |
|
|
flag: '1', |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
@ -2813,9 +2727,7 @@ export default { |
|
|
this.componentSaveModal = true |
|
|
this.componentSaveModal = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 子明细编辑模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 子明细编辑模态框 |
|
|
updateComponentModal (row) { |
|
|
updateComponentModal (row) { |
|
|
this.componentData = { |
|
|
this.componentData = { |
|
|
flag: '2', |
|
|
flag: '2', |
|
|
@ -2865,9 +2777,24 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// ======== 新增/编辑/删除方法 ======== |
|
|
// ======== 新增/编辑/删除方法 ======== |
|
|
/** |
|
|
|
|
|
* bom新增/编辑 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 判断子物料工序是否选择 |
|
|
|
|
|
packageSaveData (isClose) { |
|
|
|
|
|
const allAHasValue = this.subDetailList.every(item => item.operationId !== null && item.operationId !== '') |
|
|
|
|
|
if (!allAHasValue) { |
|
|
|
|
|
this.$confirm(`存在未选择工序的子物料,是否确认保存数据?`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.saveData(isClose) |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.saveData(isClose) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// bom新增/编辑 |
|
|
saveData (isClose) { |
|
|
saveData (isClose) { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
if (this.modalData.partNo === '' || this.modalData.partNo == null) { |
|
|
this.$message.warning('请选择物料编码!') |
|
|
this.$message.warning('请选择物料编码!') |
|
|
@ -2925,7 +2852,6 @@ export default { |
|
|
informationList: this.subDetailList, |
|
|
informationList: this.subDetailList, |
|
|
processUnit: this.modalData.processUnit |
|
|
processUnit: this.modalData.processUnit |
|
|
} |
|
|
} |
|
|
// if (this.modalData.flag === '1') { |
|
|
|
|
|
this.saveAllLoading = true |
|
|
this.saveAllLoading = true |
|
|
bomManagementSave(tempData).then(({data}) => { |
|
|
bomManagementSave(tempData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
@ -2950,47 +2876,21 @@ export default { |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
this.saveAllLoading = false |
|
|
this.saveAllLoading = false |
|
|
}) |
|
|
}) |
|
|
// } else { |
|
|
|
|
|
// this.saveAllLoading = true |
|
|
|
|
|
// bomManagementEdit(tempData).then(({data}) => { |
|
|
|
|
|
// if (data && data.code === 0) { |
|
|
|
|
|
// this.getDataList() |
|
|
|
|
|
// this.modalFlag = false |
|
|
|
|
|
// this.$message({ |
|
|
|
|
|
// message: '操作成功', |
|
|
|
|
|
// type: 'success', |
|
|
|
|
|
// duration: 1500, |
|
|
|
|
|
// onClose: () => {} |
|
|
|
|
|
// }) |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.$alert(data.msg, '错误', { |
|
|
|
|
|
// confirmButtonText: '确定' |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
// this.saveAllLoading = false |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 新增编辑模态框关闭 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 新增编辑模态框关闭 |
|
|
closeModal () { |
|
|
closeModal () { |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
this.modalFlag = false |
|
|
this.modalFlag = false |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 新增编辑模态框关闭 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 新增编辑模态框关闭 |
|
|
closeModalX (done) { |
|
|
closeModalX (done) { |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
done() |
|
|
done() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* bom删除 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// bom删除 |
|
|
delModal () { |
|
|
delModal () { |
|
|
if (this.bomSelections.length === 0) { |
|
|
if (this.bomSelections.length === 0) { |
|
|
this.$message.warning('请勾选要删除的BOM!') |
|
|
this.$message.warning('请勾选要删除的BOM!') |
|
|
@ -3023,9 +2923,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 查询物料 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 查询物料 |
|
|
queryPartList () { |
|
|
queryPartList () { |
|
|
this.partData.limit = this.pageSize2 |
|
|
this.partData.limit = this.pageSize2 |
|
|
this.partData.page = this.pageIndex2 |
|
|
this.partData.page = this.pageIndex2 |
|
|
@ -3087,9 +2985,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* BOM类型改变 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// BOM类型改变 |
|
|
bomTypeChange () { |
|
|
bomTypeChange () { |
|
|
// 获取物料的Bom版本号 |
|
|
// 获取物料的Bom版本号 |
|
|
getBomEngChgLevel(this.modalData).then(({data}) => { |
|
|
getBomEngChgLevel(this.modalData).then(({data}) => { |
|
|
@ -3101,10 +2997,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 双击选中物料 |
|
|
|
|
|
* @param row |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 双击选中物料 |
|
|
getRowData (row) { |
|
|
getRowData (row) { |
|
|
this.modalData.partNo = row.partNo |
|
|
this.modalData.partNo = row.partNo |
|
|
this.modalData.partDesc = row.partDesc |
|
|
this.modalData.partDesc = row.partDesc |
|
|
@ -3124,13 +3017,16 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 双击选中工序 |
|
|
|
|
|
* @param row |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 双击选中工序 |
|
|
getRowOperationData (row) { |
|
|
getRowOperationData (row) { |
|
|
|
|
|
if (this.batchOperationModelFlag) { |
|
|
|
|
|
this.batchOperationData.operationId = row.operationId |
|
|
|
|
|
this.batchOperationData.operationNo = row.operationNo |
|
|
|
|
|
this.batchOperationData.operationName = row.operationName |
|
|
|
|
|
} else { |
|
|
this.componentData.operationId = row.operationId |
|
|
this.componentData.operationId = row.operationId |
|
|
this.componentData.operationNo = row.operationNo |
|
|
this.componentData.operationNo = row.operationNo |
|
|
|
|
|
} |
|
|
this.operationModelFlag = false |
|
|
this.operationModelFlag = false |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -3168,9 +3064,7 @@ export default { |
|
|
this.copyPartModelFlag = false |
|
|
this.copyPartModelFlag = false |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 子物料列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 子物料列表 |
|
|
queryComponentPartModal () { |
|
|
queryComponentPartModal () { |
|
|
this.componentPartData.limit = this.pageSize3 |
|
|
this.componentPartData.limit = this.pageSize3 |
|
|
this.componentPartData.page = this.pageIndex3 |
|
|
this.componentPartData.page = this.pageIndex3 |
|
|
@ -3191,9 +3085,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* copy物料列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// copy物料列表 |
|
|
queryCopyPartModal () { |
|
|
queryCopyPartModal () { |
|
|
this.copyPartData.limit = this.pageSize4 |
|
|
this.copyPartData.limit = this.pageSize4 |
|
|
this.copyPartData.page = this.pageIndex4 |
|
|
this.copyPartData.page = this.pageIndex4 |
|
|
@ -3215,9 +3107,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 子物料查询列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 子物料查询列表 |
|
|
queryComponentPartList () { |
|
|
queryComponentPartList () { |
|
|
this.componentPartData.limit = this.pageSize3 |
|
|
this.componentPartData.limit = this.pageSize3 |
|
|
this.componentPartData.page = this.pageIndex3 |
|
|
this.componentPartData.page = this.pageIndex3 |
|
|
@ -3234,9 +3124,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 子物料查询列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 子物料查询列表 |
|
|
queryBatchComponentPartList () { |
|
|
queryBatchComponentPartList () { |
|
|
this.batchComponentPartData.limit = this.pageSize5 |
|
|
this.batchComponentPartData.limit = this.pageSize5 |
|
|
this.batchComponentPartData.page = this.pageIndex5 |
|
|
this.batchComponentPartData.page = this.pageIndex5 |
|
|
@ -3253,9 +3141,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* copy物料查询列表 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// copy物料查询列表 |
|
|
queryCopyPartList () { |
|
|
queryCopyPartList () { |
|
|
this.copyPartData.limit = this.pageSize4 |
|
|
this.copyPartData.limit = this.pageSize4 |
|
|
this.copyPartData.page = this.pageIndex4 |
|
|
this.copyPartData.page = this.pageIndex4 |
|
|
@ -3358,31 +3244,18 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 表格的新增 |
|
|
|
|
|
* @param row |
|
|
|
|
|
* @param rowIndex |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 表格的新增 |
|
|
rowClassName({ row, rowIndex }) { |
|
|
rowClassName({ row, rowIndex }) { |
|
|
row.xh = rowIndex + 1 |
|
|
row.xh = rowIndex + 1 |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 选中数据 |
|
|
|
|
|
* @param selection |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 选中数据 |
|
|
componentSelectionChange(selection) { |
|
|
componentSelectionChange(selection) { |
|
|
this.checkedDetail = selection |
|
|
this.checkedDetail = selection |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 删除子物料 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 删除子物料 |
|
|
deleteComponentPart () { |
|
|
deleteComponentPart () { |
|
|
// if (this.detailData.status != null && this.detailData.status !== '' && this.detailData.status !== 'Tentative') { |
|
|
|
|
|
// this.$message.warning('不可编辑的替代状态!') |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
if (this.checkedDetail.length === 0) { |
|
|
if (this.checkedDetail.length === 0) { |
|
|
this.$message.warning('请选择要删除子物料!') |
|
|
this.$message.warning('请选择要删除子物料!') |
|
|
return |
|
|
return |
|
|
@ -3415,17 +3288,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// /** |
|
|
|
|
|
// * 子物料 |
|
|
|
|
|
// * @param row |
|
|
|
|
|
// */ |
|
|
|
|
|
// componentClickRow (row) { |
|
|
|
|
|
// this.$refs.componentTable.toggleRowSelection(row) |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 新增子明细方法 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 新增子明细方法 |
|
|
componentDataSave (isClose) { |
|
|
componentDataSave (isClose) { |
|
|
if (this.componentData.lineSequence === '' || this.componentData.lineSequence == null) { |
|
|
if (this.componentData.lineSequence === '' || this.componentData.lineSequence == null) { |
|
|
this.$message.warning('序号不能为空!') |
|
|
this.$message.warning('序号不能为空!') |
|
|
@ -3658,6 +3521,20 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 双击添加 |
|
|
|
|
|
batchAddPartDB (row) { |
|
|
|
|
|
this.batchComponentSelections = [] |
|
|
|
|
|
this.batchComponentSelections.push(row) |
|
|
|
|
|
this.batchAddPart() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 双击删除 |
|
|
|
|
|
batchDeletePartDB (row) { |
|
|
|
|
|
this.batchComponentSelections2 = [] |
|
|
|
|
|
this.batchComponentSelections2.push(row) |
|
|
|
|
|
this.batchDeletePart() |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
batchAddPart () { |
|
|
batchAddPart () { |
|
|
if (this.batchComponentSelections == null || this.batchComponentSelections.length === 0) { |
|
|
if (this.batchComponentSelections == null || this.batchComponentSelections.length === 0) { |
|
|
this.$message.warning('请选择可选物料!') |
|
|
this.$message.warning('请选择可选物料!') |
|
|
@ -3685,9 +3562,7 @@ export default { |
|
|
this.choosePartList = this.choosePartList.filter(item => !set.has(`${item.site}-${item.partNo}`)) |
|
|
this.choosePartList = this.choosePartList.filter(item => !set.has(`${item.site}-${item.partNo}`)) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 回车事件 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 回车事件 |
|
|
focusNextInput (index, type) { |
|
|
focusNextInput (index, type) { |
|
|
let aaa = '' |
|
|
let aaa = '' |
|
|
if (this.subDetailList.length - 1 === index) { |
|
|
if (this.subDetailList.length - 1 === index) { |
|
|
@ -3700,9 +3575,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 保存主表信息 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 保存主表信息 |
|
|
saveBomHeader () { |
|
|
saveBomHeader () { |
|
|
if (this.modalData.bu === '' || this.modalData.bu == null) { |
|
|
if (this.modalData.bu === '' || this.modalData.bu == null) { |
|
|
this.$message.warning('请选择BU!') |
|
|
this.$message.warning('请选择BU!') |
|
|
@ -3769,9 +3642,8 @@ export default { |
|
|
this.saveHeaderLoading = false |
|
|
this.saveHeaderLoading = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 复制bom的模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 复制bom的模态框 |
|
|
copyBomRevision () { |
|
|
copyBomRevision () { |
|
|
this.copyBomData = { |
|
|
this.copyBomData = { |
|
|
site: this.modalData.site, |
|
|
site: this.modalData.site, |
|
|
@ -3796,9 +3668,8 @@ export default { |
|
|
} |
|
|
} |
|
|
this.copyBomModelFlag = true |
|
|
this.copyBomModelFlag = true |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 复制bom的方法 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 复制bom的方法 |
|
|
copyBom () { |
|
|
copyBom () { |
|
|
if (this.copyBomData.partNo === '' || this.copyBomData.partNo == null) { |
|
|
if (this.copyBomData.partNo === '' || this.copyBomData.partNo == null) { |
|
|
this.$message.warning('请选择Bom物料!') |
|
|
this.$message.warning('请选择Bom物料!') |
|
|
@ -3839,9 +3710,8 @@ export default { |
|
|
this.copyLoading = false |
|
|
this.copyLoading = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 复制alternative的模态框 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 复制alternative的模态框 |
|
|
copyBomAlternative () { |
|
|
copyBomAlternative () { |
|
|
this.copyAlternativeData = { |
|
|
this.copyAlternativeData = { |
|
|
site: this.detailData.site, |
|
|
site: this.detailData.site, |
|
|
@ -3871,9 +3741,7 @@ export default { |
|
|
this.copyAlternativeModelFlag = true |
|
|
this.copyAlternativeModelFlag = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 复制alternative的方法 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 复制alternative的方法 |
|
|
copyAlternative () { |
|
|
copyAlternative () { |
|
|
if (this.copyAlternativeData.partNo === '' || this.copyAlternativeData.partNo == null) { |
|
|
if (this.copyAlternativeData.partNo === '' || this.copyAlternativeData.partNo == null) { |
|
|
this.$message.warning('请选择Bom物料!') |
|
|
this.$message.warning('请选择Bom物料!') |
|
|
@ -3914,9 +3782,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 新增替代方法 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 新增替代方法 |
|
|
detailDataSave () { |
|
|
detailDataSave () { |
|
|
if (this.saveDetailData.partNo === '' || this.saveDetailData.partNo == null) { |
|
|
if (this.saveDetailData.partNo === '' || this.saveDetailData.partNo == null) { |
|
|
this.$message.warning('请先选择Bom物料!') |
|
|
this.$message.warning('请先选择Bom物料!') |
|
|
@ -3990,9 +3856,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 删除替代 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 删除替代 |
|
|
deleteBomDetail () { |
|
|
deleteBomDetail () { |
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
if (this.detailData.alternativeNo === '' || this.detailData.alternativeNo == null) { |
|
|
this.$message.warning('请选择要删除的替代编码!') |
|
|
this.$message.warning('请选择要删除的替代编码!') |
|
|
@ -4027,9 +3891,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 修改替代状态为 Buildable |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 修改替代状态为 Buildable |
|
|
updateStatusToBuildable () { |
|
|
updateStatusToBuildable () { |
|
|
this.$confirm(`是否修改状态为Buildable?`, '提示', { |
|
|
this.$confirm(`是否修改状态为Buildable?`, '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
@ -4055,9 +3917,8 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 修改替代状态为 Obsolete |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 修改替代状态为 Obsolete |
|
|
updateStatusToObsolete () { |
|
|
updateStatusToObsolete () { |
|
|
this.$confirm(`是否修改状态为Obsolete?`, '提示', { |
|
|
this.$confirm(`是否修改状态为Obsolete?`, '提示', { |
|
|
confirmButtonText: '确定', |
|
|
confirmButtonText: '确定', |
|
|
@ -4084,9 +3945,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 替代改变事件 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 替代改变事件 |
|
|
alternativeChange () { |
|
|
alternativeChange () { |
|
|
this.alternativeLoading = true |
|
|
this.alternativeLoading = true |
|
|
queryBomComponent(this.detailData).then(({data}) => { |
|
|
queryBomComponent(this.detailData).then(({data}) => { |
|
|
@ -4105,9 +3964,7 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 根据物料编码查询工序 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 根据物料编码查询工序 |
|
|
queryOperationList () { |
|
|
queryOperationList () { |
|
|
this.operationData.site = this.modalData.site |
|
|
this.operationData.site = this.modalData.site |
|
|
this.operationData.buNo = this.modalData.buNo |
|
|
this.operationData.buNo = this.modalData.buNo |
|
|
@ -4135,12 +3992,47 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 批量修改工序模态框 |
|
|
|
|
|
batchUpdateOperationModal () { |
|
|
|
|
|
if (this.checkedDetail.length === 0) { |
|
|
|
|
|
this.$message.warning('请选择要编辑子物料!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.batchOperationData = { |
|
|
|
|
|
operationId: '', |
|
|
|
|
|
operationNo: '', |
|
|
|
|
|
operationName: '' |
|
|
|
|
|
} |
|
|
|
|
|
this.batchOperationModelFlag = true |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 批量修改工序 |
|
|
|
|
|
batchOperationEdit () { |
|
|
|
|
|
let tempData = { |
|
|
|
|
|
informationList: this.checkedDetail, |
|
|
|
|
|
operationId: this.batchOperationData.operationId, |
|
|
|
|
|
updateBy: this.$store.state.user.name, |
|
|
|
|
|
} |
|
|
|
|
|
batchOperationEdit(tempData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.subDetailList = data.rows.subDetailList |
|
|
|
|
|
this.batchOperationModelFlag = false |
|
|
|
|
|
this.$message({ |
|
|
|
|
|
message: '操作成功', |
|
|
|
|
|
type: 'success', |
|
|
|
|
|
duration: 1500, |
|
|
|
|
|
onClose: () => {} |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// ======== chooseList相关方法 ======== |
|
|
// ======== chooseList相关方法 ======== |
|
|
/** |
|
|
|
|
|
* 获取基础数据列表S |
|
|
|
|
|
* @param val |
|
|
|
|
|
* @param type |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 获取基础数据列表S |
|
|
getBaseList (val, type) { |
|
|
getBaseList (val, type) { |
|
|
this.tagNo = val |
|
|
this.tagNo = val |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
@ -4155,10 +4047,8 @@ export default { |
|
|
this.$refs.baseList.init(val, strVal, conSql) |
|
|
this.$refs.baseList.init(val, strVal, conSql) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
|
|
|
* 列表方法的回调 |
|
|
|
|
|
* @param val |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 列表方法的回调 |
|
|
getBaseData (val) { |
|
|
getBaseData (val) { |
|
|
if (this.tagNo === 215) { |
|
|
if (this.tagNo === 215) { |
|
|
this.componentData.issueToLoc = val.location_id |
|
|
this.componentData.issueToLoc = val.location_id |
|
|
@ -4171,9 +4061,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// ======== 导出相关方法 ======== |
|
|
// ======== 导出相关方法 ======== |
|
|
/** |
|
|
|
|
|
* 导出excel |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
// 导出excel |
|
|
async createExportData () { |
|
|
async createExportData () { |
|
|
this.searchData.limit = -1 |
|
|
this.searchData.limit = -1 |
|
|
this.searchData.page = 1 |
|
|
this.searchData.page = 1 |
|
|
|