|
|
|
@ -18,7 +18,6 @@ |
|
|
|
<el-input v-model="searchData.familyName" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<!-- <el-button @click="doEmpty()">清空</el-button>--> |
|
|
|
<el-button type="primary" @click="getDataList()">查询</el-button> |
|
|
|
<el-button type="primary" @click="addModal()">新增</el-button> |
|
|
|
</el-form-item> |
|
|
|
@ -101,7 +100,7 @@ |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
<!-- 物料属性新增 --> |
|
|
|
<!-- 物料属性新增/修改 --> |
|
|
|
<el-dialog title="物料属性设置" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="430px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item prop="partNo" :rules="rules.partNoType"> |
|
|
|
@ -112,30 +111,6 @@ |
|
|
|
<el-input v-model="modalData.partDesc" disabled style="width: 240px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">--> |
|
|
|
<!-- <el-form-item prop="supplierNo" :rules="rules.supplierNoType">--> |
|
|
|
<!-- <span slot="label" style="" @click="getBaseList(1056)"><a herf="#">供应商编码:</a></span>--> |
|
|
|
<!-- <el-input v-model="modalData.supplierNo" style="width: 120px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label="供应商名称:" prop="supplierDesc" :rules="rules.supplierDescType">--> |
|
|
|
<!-- <el-input v-model="modalData.supplierDesc" disabled style="width: 240px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- </el-form>--> |
|
|
|
<!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">--> |
|
|
|
<!-- <el-form-item prop="operation" :rules="rules.operationType">--> |
|
|
|
<!-- <span slot="label" style="" @click="getBaseList(1055)"><a herf="#">工序:</a></span>--> |
|
|
|
<!-- <el-input v-model="modalData.operation" style="width: 120px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- </el-form>--> |
|
|
|
<!-- <el-form :inline="true" label-position="top" :model="modalData" :rules="rules" style="margin-left: 7px;margin-top: -5px;">--> |
|
|
|
<!-- <el-form-item prop="resourceId" :rules="rules.resourceIdType">--> |
|
|
|
<!-- <span slot="label" style="" @click="getBaseList(1054)"><a herf="#">机台号:</a></span>--> |
|
|
|
<!-- <el-input v-model="modalData.resourceId" style="width: 120px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label="机台名称:" prop="resourceDesc" :rules="rules.resourceDescType">--> |
|
|
|
<!-- <el-input v-model="modalData.resourceDesc" disabled style="width: 240px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- </el-form>--> |
|
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;"> |
|
|
|
<el-form-item label="备注:"> |
|
|
|
<el-input v-model="modalData.attributeRemark" style="width: 375px"></el-input> |
|
|
|
@ -192,15 +167,27 @@ |
|
|
|
: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.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-column |
|
|
|
prop="specialField" |
|
|
|
prop="operation" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="工序 / 供应商"> |
|
|
|
label="工序"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="resourceID" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="机台"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="manufacturerName" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="供应商"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="" |
|
|
|
@ -293,10 +280,10 @@ |
|
|
|
<div style="font-size: 12px"> |
|
|
|
<el-form :inline="true" label-position="top" :model="detailData"> |
|
|
|
<el-form-item :label="'模板编码'"> |
|
|
|
<el-input v-model="detailData.templateId" style="width: 120px"></el-input> |
|
|
|
<el-input v-model="detailData.templateId" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'模板名称'"> |
|
|
|
<el-input v-model="detailData.templateName" style="width: 120px"></el-input> |
|
|
|
<el-input v-model="detailData.templateName" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="检验类型"> |
|
|
|
<el-select v-model="detailData.inspectionTypeNo" @change="checkInspectionType()" placeholder="请选择"> |
|
|
|
@ -311,6 +298,13 @@ |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="checkInspectionType()">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-left: 117px" :label="' '"> |
|
|
|
<el-button type="primary" @click="getOperationList()" style="width: 63px" v-if="this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107'">工序</el-button> |
|
|
|
<el-button type="primary" @click="getManufacturerList()" v-if="this.detailData.inspectionTypeNo === '105'" style="width: 63px">供应商</el-button> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="getAllResourceList()" style="width: 63px" v-if="this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107'">机台</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
<el-container style="margin-top: 0px;"> |
|
|
|
@ -357,13 +351,7 @@ |
|
|
|
</el-table> |
|
|
|
</el-main> |
|
|
|
<el-main style="width: 100px;padding: 1px"> |
|
|
|
<div v-if="this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104'" style="margin-top: 180px;margin-left: 18px"> |
|
|
|
<el-button type="primary" @click="getOperationList()" style="width: 63px">工序</el-button> |
|
|
|
</div> |
|
|
|
<div v-if="this.detailData.inspectionTypeNo === '105'" style="margin-top: 180px;margin-left: 18px"> |
|
|
|
<el-button type="primary" @click="getManufacturerList()" style="width: 63px">供应商</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 15px;margin-left: 18px"> |
|
|
|
<div style="margin-top: 180px;margin-left: 18px"> |
|
|
|
<el-button type="primary" @click="addItem()">添加>></el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-top: 15px;margin-left: 18px"> |
|
|
|
@ -402,10 +390,22 @@ |
|
|
|
label="模板名称"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="specialField" |
|
|
|
prop="operation" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="工序 / 供应商"> |
|
|
|
label="工序"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="resourceID" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="机台"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="manufacturerName" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="供应商"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="inspectionTypeName" |
|
|
|
@ -426,10 +426,10 @@ |
|
|
|
<div class="rq"> |
|
|
|
<el-form :inline="true" label-position="top" :model="operationData"> |
|
|
|
<el-form-item :label="'工序:'"> |
|
|
|
<el-input v-model="operationData.operationDesc" style="width: 120px"></el-input> |
|
|
|
<el-input v-model="operationData.operationDesc" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="getOperationList()">查询</el-button> |
|
|
|
<el-button type="primary" @click="getOperationList2()">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
@ -437,16 +437,15 @@ |
|
|
|
:data="operationList" |
|
|
|
ref="operationTable" |
|
|
|
@row-click="operationClickRow" |
|
|
|
@selection-change="selectionChangeHandle" |
|
|
|
@selection-change="selectionOperationChangeHandle" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
:row-class-name="operationRowClassName" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
:selectable="selectFlag" |
|
|
|
width="50"> |
|
|
|
<el-table-column type="index" width="50" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-radio v-model="operationCurrent" :label="scope.row.index">{{''}}</el-radio> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="operationDesc" |
|
|
|
@ -458,7 +457,54 @@ |
|
|
|
</div> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="confirmOperation()">确认</el-button> |
|
|
|
<el-button type="primary" @click="operationModelFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 机台 --> |
|
|
|
<el-dialog title="机台清单" :close-on-click-modal="false" v-drag :visible.sync="resourceModelFlag" width="420px"> |
|
|
|
<div class="rq"> |
|
|
|
<el-form :inline="true" label-position="top" :model="resourceData"> |
|
|
|
<el-form-item :label="'机台编码'"> |
|
|
|
<el-input v-model="resourceData.resourceId" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'机台名称'"> |
|
|
|
<el-input v-model="resourceData.resourceDesc" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="getAllResourceList2()">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="300" |
|
|
|
:data="resourceList" |
|
|
|
ref="resourceTable" |
|
|
|
@row-click="resourceClickRow" |
|
|
|
@selection-change="selectionResourceChangeHandle" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
:row-class-name="resourceRowClassName" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column type="index" width="50" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-radio v-model="resourceCurrent" :label="scope.row.index">{{''}}</el-radio> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="resourceId" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="机台编码"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="resourceDesc" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
label="机台名称"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="confirmResource()">确认</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
@ -467,10 +513,10 @@ |
|
|
|
<div class="rq"> |
|
|
|
<el-form :inline="true" label-position="top" :model="manufacturerData"> |
|
|
|
<el-form-item :label="'供应商编码:'"> |
|
|
|
<el-input v-model="manufacturerData.manufacturerID" style="width: 120px"></el-input> |
|
|
|
<el-input v-model="manufacturerData.manufacturerID" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'供应商名称:'"> |
|
|
|
<el-input v-model="manufacturerData.manufacturerName" style="width: 120px"></el-input> |
|
|
|
<el-input v-model="manufacturerData.manufacturerName" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="getManufacturerList()">查询</el-button> |
|
|
|
@ -481,7 +527,7 @@ |
|
|
|
:data="manufacturerList" |
|
|
|
ref="manufacturerTable" |
|
|
|
@row-click="manufacturerClickRow" |
|
|
|
@selection-change="selectionChangeHandle2" |
|
|
|
@selection-change="selectionManufacturerChangeHandle" |
|
|
|
border |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="width: 100%;"> |
|
|
|
@ -513,6 +559,7 @@ |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<qcUpload ref="qcUpload" @refreshPageTables="getDataList()" v-drag></qcUpload> |
|
|
|
</div> |
|
|
|
@ -531,7 +578,8 @@ |
|
|
|
getPartTemplateLists, // 获取模板列表 |
|
|
|
InspectionTypeSearch, // 搜索所有检验类型 |
|
|
|
getOperationDescList, // 查询工序列表 |
|
|
|
getManufacturerList // 查询供应商列表 |
|
|
|
getManufacturerList, // 查询供应商列表 |
|
|
|
getAllResourceList // 查询机台列表 |
|
|
|
} from "@/api/qc/qc.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
|
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' |
|
|
|
@ -554,6 +602,7 @@ |
|
|
|
// 导出 end |
|
|
|
tagNo: '', |
|
|
|
searchData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
partNo: '', |
|
|
|
partDesc: '', |
|
|
|
familyID: '', |
|
|
|
@ -564,7 +613,7 @@ |
|
|
|
}, |
|
|
|
height: 200, |
|
|
|
pageIndex: 1, |
|
|
|
pageSize: 100, |
|
|
|
pageSize: 50, |
|
|
|
totalPage: 0, |
|
|
|
modalFlag: false, |
|
|
|
modalDisableFlag: false, |
|
|
|
@ -643,7 +692,7 @@ |
|
|
|
fixed: '', |
|
|
|
}, |
|
|
|
{ |
|
|
|
columnProp: 'supplierNo', |
|
|
|
columnProp: 'supplierDesc', |
|
|
|
headerAlign: "center", |
|
|
|
align: "center", |
|
|
|
columnLabel: '供应商', |
|
|
|
@ -795,60 +844,37 @@ |
|
|
|
message: ' ', |
|
|
|
trigger: 'change' |
|
|
|
} |
|
|
|
], |
|
|
|
// supplierNoType:[ |
|
|
|
// { |
|
|
|
// required: true, |
|
|
|
// message: ' ', |
|
|
|
// trigger: 'change' |
|
|
|
// } |
|
|
|
// ], |
|
|
|
// supplierDescType:[ |
|
|
|
// { |
|
|
|
// required: true, |
|
|
|
// message: ' ', |
|
|
|
// trigger: 'change' |
|
|
|
// } |
|
|
|
// ], |
|
|
|
// operationType:[ |
|
|
|
// { |
|
|
|
// required: true, |
|
|
|
// message: ' ', |
|
|
|
// trigger: 'change' |
|
|
|
// } |
|
|
|
// ], |
|
|
|
// resourceIdType:[ |
|
|
|
// { |
|
|
|
// required: true, |
|
|
|
// message: ' ', |
|
|
|
// trigger: 'change' |
|
|
|
// } |
|
|
|
// ], |
|
|
|
// resourceDescType:[ |
|
|
|
// { |
|
|
|
// required: true, |
|
|
|
// message: ' ', |
|
|
|
// trigger: 'change' |
|
|
|
// } |
|
|
|
// ], |
|
|
|
] |
|
|
|
}, |
|
|
|
// 工序 |
|
|
|
operationList: [], |
|
|
|
resourceList: [], |
|
|
|
operationModelFlag: false, |
|
|
|
dataListSelections: [], |
|
|
|
resourceModelFlag: false, |
|
|
|
dataListOperationSelections: [], |
|
|
|
operationData:{ |
|
|
|
operationDesc: '' |
|
|
|
}, |
|
|
|
selectionOperation: [], |
|
|
|
resourceData: { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
resourceId: '', |
|
|
|
resourceDesc: '' |
|
|
|
}, |
|
|
|
operation: '', |
|
|
|
resourceId: '', |
|
|
|
selectionManufacturer: [], |
|
|
|
// 供应商 |
|
|
|
manufacturerList: [], |
|
|
|
manufacturerModelFlag: false, |
|
|
|
dataListSelections2: [], |
|
|
|
dataListManufacturerSelections: [], |
|
|
|
manufacturerData:{ |
|
|
|
site: this.$store.state.user.site, |
|
|
|
manufacturerID: '', |
|
|
|
manufacturerName: '' |
|
|
|
}, |
|
|
|
// 单选框绑定的值 |
|
|
|
operationCurrent: -1, |
|
|
|
resourceCurrent: -1 |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
@ -913,18 +939,6 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// // 清空搜索栏 |
|
|
|
// doEmpty(){ |
|
|
|
// this.searchData = { |
|
|
|
// partNo: '', |
|
|
|
// partDesc: '', |
|
|
|
// familyID: '', |
|
|
|
// familyName: '', |
|
|
|
// attributeType: 'A', |
|
|
|
// page: 1, |
|
|
|
// limit: 10, |
|
|
|
// } |
|
|
|
// }, |
|
|
|
chooseLevel(row){ |
|
|
|
this.tempLevelRow = row; |
|
|
|
this.getBaseList(1048); |
|
|
|
@ -1002,6 +1016,7 @@ |
|
|
|
}, |
|
|
|
addModal(){ |
|
|
|
this.modalData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
flag: '1', |
|
|
|
partNo: '', |
|
|
|
partDesc: '', |
|
|
|
@ -1101,7 +1116,7 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
//打开物料模板清单 |
|
|
|
detailModal(row){ |
|
|
|
detailModal (row) { |
|
|
|
this.detailData.partNo = row.partNo |
|
|
|
this.detailData.attributeNo = row.partNo |
|
|
|
this.detailData.partDesc = row.partDesc |
|
|
|
@ -1113,6 +1128,8 @@ |
|
|
|
|
|
|
|
checkInspectionType(){ |
|
|
|
getPartTemplateLists(this.detailData).then(({data}) => { |
|
|
|
this.operation = '' |
|
|
|
this.resourceId = '' |
|
|
|
this.itemList1 = data.row1; |
|
|
|
this.itemList2 = data.row2; |
|
|
|
}) |
|
|
|
@ -1123,15 +1140,19 @@ |
|
|
|
this.itemSelections1 = null |
|
|
|
this.itemSelections2 = null |
|
|
|
getPartTemplateLists(this.detailData).then(({data}) => { |
|
|
|
this.itemList1 = data.row1; |
|
|
|
this.itemList2 = data.row2; |
|
|
|
this.itemList1 = data.row1 |
|
|
|
this.itemList2 = data.row2 |
|
|
|
}) |
|
|
|
this.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo; |
|
|
|
this.checkInspectionType(); |
|
|
|
this.dataListSelections = []; |
|
|
|
this.selectionOperation = []; |
|
|
|
this.dataListSelections2 = []; |
|
|
|
this.fastAddFlag = true; |
|
|
|
this.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo |
|
|
|
this.checkInspectionType() |
|
|
|
this.dataListOperationSelections = [] |
|
|
|
this.operation = '' |
|
|
|
this.resourceId = '' |
|
|
|
this.operationCurrent = -1 |
|
|
|
this.resourceCurrent = -1 |
|
|
|
this.selectionManufacturer = [] |
|
|
|
this.dataListManufacturerSelections = [] |
|
|
|
this.fastAddFlag = true |
|
|
|
}, |
|
|
|
// 可选项目 |
|
|
|
itemClickRow1(row){ |
|
|
|
@ -1157,12 +1178,27 @@ |
|
|
|
this.$message.warning('请选择可选模板!') |
|
|
|
return |
|
|
|
} |
|
|
|
if((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.operation == null || this.operation === '')){ |
|
|
|
this.$message.warning('请选择工序!') |
|
|
|
return |
|
|
|
} |
|
|
|
if((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.resourceId == null || this.resourceId === '')){ |
|
|
|
this.$message.warning('请选择机台!') |
|
|
|
return |
|
|
|
} |
|
|
|
if((this.detailData.inspectionTypeNo === '105') && (this.selectionManufacturer == null || this.selectionManufacturer.length === 0)){ |
|
|
|
this.$message.warning('请选择供应商!') |
|
|
|
return |
|
|
|
} |
|
|
|
let inData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
attributeNo: this.detailData.partNo, |
|
|
|
itemList: this.itemSelections1, |
|
|
|
fieldList: this.selectionOperation, |
|
|
|
operation: this.operation, |
|
|
|
resourceID: this.resourceId, |
|
|
|
manufacturerList: this.selectionManufacturer, |
|
|
|
attributeType: this.detailData.attributeType, |
|
|
|
inspectionTypeNo: this.detailData.inspectionTypeNo |
|
|
|
} |
|
|
|
savePartAttributeDetails(inData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
@ -1171,7 +1207,9 @@ |
|
|
|
this.itemList2 = data.row2; |
|
|
|
}) |
|
|
|
this.itemSelections1 = [] |
|
|
|
this.selectionOperation = [] |
|
|
|
this.operation = '' |
|
|
|
this.resourceId = '' |
|
|
|
this.selectionManufacturer = [] |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
@ -1322,17 +1360,17 @@ |
|
|
|
getOperationDescList(this.operationData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.operationList = data.rows; |
|
|
|
// 回显数据 |
|
|
|
// 先清空缓存选中 |
|
|
|
this.$nextTick(() => this.$refs.operationTable.clearSelection()) |
|
|
|
// 拿到选中的工序 |
|
|
|
let tempDataList = this.selectionOperation |
|
|
|
this.operationList.forEach(val => { |
|
|
|
// 回显选中的工序 |
|
|
|
if (tempDataList.includes(val.operationDesc)) { |
|
|
|
this.$nextTick(() => this.$refs.operationTable.toggleRowSelection(val, true)) |
|
|
|
} |
|
|
|
}) |
|
|
|
// // 回显数据 |
|
|
|
// // 先清空缓存选中 |
|
|
|
// this.$nextTick(() => this.$refs.operationTable.clearSelection()) |
|
|
|
// // 拿到选中的工序 |
|
|
|
// let tempDataList = this.operationDesc |
|
|
|
// this.operationList.forEach(val => { |
|
|
|
// // 回显选中的工序 |
|
|
|
// if (tempDataList === val.operationDesc) { |
|
|
|
// this.$nextTick(() => this.$refs.operationTable.toggleRowSelection(val, true)) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
this.operationModelFlag = true; |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
@ -1341,27 +1379,91 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 点击行选中复选框 |
|
|
|
operationClickRow(row){ |
|
|
|
// 获取机台列表 |
|
|
|
getAllResourceList () { |
|
|
|
getAllResourceList(this.resourceData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.resourceList = data.rows |
|
|
|
this.resourceModelFlag = true; |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 条件查询获取工序列表 |
|
|
|
getOperationList2(){ |
|
|
|
getOperationDescList(this.operationData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.operationList = data.rows |
|
|
|
this.operationCurrent = -1 |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 条件查询获取机台列表 |
|
|
|
getAllResourceList2 () { |
|
|
|
getAllResourceList(this.resourceData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.resourceList = data.rows |
|
|
|
this.resourceCurrent = -1 |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 点击行选中工序复选框 |
|
|
|
operationClickRow (row) { |
|
|
|
this.$refs.operationTable.toggleRowSelection(row); |
|
|
|
}, |
|
|
|
// 多选 |
|
|
|
selectionChangeHandle (val) { |
|
|
|
this.dataListSelections = val |
|
|
|
// 点击行选中机台复选框 |
|
|
|
resourceClickRow (row) { |
|
|
|
this.$refs.resourceTable.toggleRowSelection(row); |
|
|
|
}, |
|
|
|
// 确认多选工序 |
|
|
|
confirmOperation(){ |
|
|
|
if(this.dataListSelections.length === 0){ |
|
|
|
this.$message.warning('请勾选工序!') |
|
|
|
return |
|
|
|
// 多选工序 |
|
|
|
selectionOperationChangeHandle (val) { |
|
|
|
this.operation = val[0].operationDesc |
|
|
|
if (val) { |
|
|
|
this.operationCurrent = val.index; |
|
|
|
} |
|
|
|
this.selectionOperation = [] |
|
|
|
for (let i = 0; i < this.dataListSelections.length; i++) { |
|
|
|
this.selectionOperation.push(this.dataListSelections[i].operationDesc) |
|
|
|
}, |
|
|
|
// 多选机台 |
|
|
|
selectionResourceChangeHandle (val) { |
|
|
|
this.resourceId = val[0].resourceId |
|
|
|
if (val) { |
|
|
|
this.resourceCurrent = val.index; |
|
|
|
} |
|
|
|
}, |
|
|
|
operationRowClassName ({row, rowIndex}) { |
|
|
|
row.index = rowIndex; // 在原有的数据上加一个index |
|
|
|
}, |
|
|
|
resourceRowClassName ({row, rowIndex}) { |
|
|
|
row.index = rowIndex; // 在原有的数据上加一个index |
|
|
|
}, |
|
|
|
// // 单选 |
|
|
|
// clickChange (row) { |
|
|
|
// this.radioOperation = row.operationDesc |
|
|
|
// }, |
|
|
|
// 确认选择工序 |
|
|
|
confirmOperation () { |
|
|
|
//this.operationDesc = '' |
|
|
|
// this.operationDesc = this.radioOperation |
|
|
|
// this.radioOperation = '' |
|
|
|
// for (let i = 0; i < this.dataListOperationSelections.length; i++) { |
|
|
|
// this.selectionOperation.push(this.dataListOperationSelections[i].operationDesc) |
|
|
|
// } |
|
|
|
this.operationModelFlag = false |
|
|
|
}, |
|
|
|
|
|
|
|
// 确认选择工序 |
|
|
|
confirmResource () { |
|
|
|
this.resourceModelFlag = false |
|
|
|
}, |
|
|
|
// 获取供应商列表 |
|
|
|
getManufacturerList(){ |
|
|
|
getManufacturerList(this.manufacturerData).then(({data}) => { |
|
|
|
@ -1370,11 +1472,11 @@ |
|
|
|
// 回显数据 |
|
|
|
// 先清空缓存选中 |
|
|
|
this.$nextTick(() => this.$refs.manufacturerTable.clearSelection()) |
|
|
|
// 拿到选中的工序 |
|
|
|
let tempDataList = this.selectionOperation |
|
|
|
// 拿到选中的供应商 |
|
|
|
let tempDataList = this.selectionManufacturer |
|
|
|
this.manufacturerList.forEach(val => { |
|
|
|
// 回显选中的工序 |
|
|
|
if (tempDataList.includes(val.manufacturerName)) { |
|
|
|
// 回显选中的供应商 |
|
|
|
if (tempDataList.includes(val.manufacturerID)) { |
|
|
|
this.$nextTick(() => this.$refs.manufacturerTable.toggleRowSelection(val, true)) |
|
|
|
} |
|
|
|
}) |
|
|
|
@ -1391,23 +1493,17 @@ |
|
|
|
this.$refs.manufacturerTable.toggleRowSelection(row); |
|
|
|
}, |
|
|
|
// 多选 |
|
|
|
selectionChangeHandle2 (val) { |
|
|
|
this.dataListSelections2 = val |
|
|
|
selectionManufacturerChangeHandle (val) { |
|
|
|
this.dataListManufacturerSelections = val |
|
|
|
}, |
|
|
|
// 确认多选工序 |
|
|
|
// 确认多选供应商 |
|
|
|
confirmManufacturer(){ |
|
|
|
if(this.dataListSelections2.length === 0){ |
|
|
|
this.$message.warning('请勾选供应商!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.selectionOperation = [] |
|
|
|
for (let i = 0; i < this.dataListSelections2.length; i++) { |
|
|
|
this.selectionOperation.push(this.dataListSelections2[i].manufacturerName) |
|
|
|
this.selectionManufacturer = [] |
|
|
|
for (let i = 0; i < this.dataListManufacturerSelections.length; i++) { |
|
|
|
this.selectionManufacturer.push(this.dataListManufacturerSelections[i].manufacturerID) |
|
|
|
} |
|
|
|
this.manufacturerModelFlag = false |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |