|
|
@ -15,7 +15,6 @@ |
|
|
<el-input v-model="searchData.familyName" clearable style="width: 120px"></el-input> |
|
|
<el-input v-model="searchData.familyName" clearable style="width: 120px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="' '"> |
|
|
<el-form-item :label="' '"> |
|
|
<!-- <el-button @click="doEmpty()">清空</el-button>--> |
|
|
|
|
|
<el-button type="primary" @click="getDataList()">查询</el-button> |
|
|
<el-button type="primary" @click="getDataList()">查询</el-button> |
|
|
<el-button type="primary" @click="addModal()">新增</el-button> |
|
|
<el-button type="primary" @click="addModal()">新增</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
@ -127,7 +126,7 @@ |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 检验模板 --> |
|
|
|
|
|
|
|
|
<!-- 检验模板清单 --> |
|
|
<el-dialog title="检验模板清单" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="1400px"> |
|
|
<el-dialog title="检验模板清单" :close-on-click-modal="false" v-drag :visible.sync="detailModelFlag" width="1400px"> |
|
|
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()"> |
|
|
<el-form :inline="true" label-position="top" @keyup.enter.native="getDataList()"> |
|
|
<el-form-item :label="'类别编码'"> |
|
|
<el-form-item :label="'类别编码'"> |
|
|
@ -177,10 +176,22 @@ |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="specialField" |
|
|
|
|
|
|
|
|
prop="operation" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
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> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="" |
|
|
prop="" |
|
|
@ -267,10 +278,10 @@ |
|
|
<div style="font-size: 12px"> |
|
|
<div style="font-size: 12px"> |
|
|
<el-form :inline="true" label-position="top" :model="detailData"> |
|
|
<el-form :inline="true" label-position="top" :model="detailData"> |
|
|
<el-form-item :label="'模板编码'"> |
|
|
<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> |
|
|
<el-form-item :label="'模板名称'"> |
|
|
<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> |
|
|
<el-form-item label="检验类型"> |
|
|
<el-form-item label="检验类型"> |
|
|
<el-select v-model="detailData.inspectionTypeNo" @change="checkInspectionType()" placeholder="请选择"> |
|
|
<el-select v-model="detailData.inspectionTypeNo" @change="checkInspectionType()" placeholder="请选择"> |
|
|
@ -285,6 +296,13 @@ |
|
|
<el-form-item :label="' '"> |
|
|
<el-form-item :label="' '"> |
|
|
<el-button type="primary" @click="checkInspectionType()">查询</el-button> |
|
|
<el-button type="primary" @click="checkInspectionType()">查询</el-button> |
|
|
</el-form-item> |
|
|
</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> |
|
|
</el-form> |
|
|
</div> |
|
|
</div> |
|
|
<el-container style="margin-top: 0px;"> |
|
|
<el-container style="margin-top: 0px;"> |
|
|
@ -331,13 +349,7 @@ |
|
|
</el-table> |
|
|
</el-table> |
|
|
</el-main> |
|
|
</el-main> |
|
|
<el-main style="width: 100px;padding: 1px"> |
|
|
<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> |
|
|
<el-button type="primary" @click="addItem()">添加>></el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div style="margin-top: 15px;margin-left: 18px"> |
|
|
<div style="margin-top: 15px;margin-left: 18px"> |
|
|
@ -378,10 +390,22 @@ |
|
|
label="模板名称"> |
|
|
label="模板名称"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="specialField" |
|
|
|
|
|
|
|
|
prop="operation" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="工序"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="resourceID" |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
label="工序 / 供应商"> |
|
|
|
|
|
|
|
|
label="机台"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="manufacturerName" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
label="供应商"> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="inspectionTypeName" |
|
|
prop="inspectionTypeName" |
|
|
@ -406,7 +430,7 @@ |
|
|
<el-input v-model="operationData.operationDesc" style="width: 120px"></el-input> |
|
|
<el-input v-model="operationData.operationDesc" style="width: 120px"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item :label="' '"> |
|
|
<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-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-table |
|
|
<el-table |
|
|
@ -414,16 +438,15 @@ |
|
|
:data="operationList" |
|
|
:data="operationList" |
|
|
ref="operationTable" |
|
|
ref="operationTable" |
|
|
@row-click="operationClickRow" |
|
|
@row-click="operationClickRow" |
|
|
@selection-change="selectionChangeHandle" |
|
|
|
|
|
|
|
|
@selection-change="selectionOperationChangeHandle" |
|
|
border |
|
|
border |
|
|
v-loading="dataListLoading" |
|
|
v-loading="dataListLoading" |
|
|
|
|
|
:row-class-name="operationRowClassName" |
|
|
style="width: 100%;"> |
|
|
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> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
prop="operationDesc" |
|
|
prop="operationDesc" |
|
|
@ -435,7 +458,54 @@ |
|
|
</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="confirmOperation()">确认</el-button> |
|
|
<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-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
@ -444,10 +514,10 @@ |
|
|
<div class="rq"> |
|
|
<div class="rq"> |
|
|
<el-form :inline="true" label-position="top" :model="manufacturerData"> |
|
|
<el-form :inline="true" label-position="top" :model="manufacturerData"> |
|
|
<el-form-item :label="'供应商编码:'"> |
|
|
<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> |
|
|
<el-form-item :label="'供应商名称:'"> |
|
|
<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> |
|
|
<el-form-item :label="' '"> |
|
|
<el-form-item :label="' '"> |
|
|
<el-button type="primary" @click="getManufacturerList()">查询</el-button> |
|
|
<el-button type="primary" @click="getManufacturerList()">查询</el-button> |
|
|
@ -458,7 +528,7 @@ |
|
|
:data="manufacturerList" |
|
|
:data="manufacturerList" |
|
|
ref="manufacturerTable" |
|
|
ref="manufacturerTable" |
|
|
@row-click="manufacturerClickRow" |
|
|
@row-click="manufacturerClickRow" |
|
|
@selection-change="selectionChangeHandle2" |
|
|
|
|
|
|
|
|
@selection-change="selectionManufacturerChangeHandle" |
|
|
border |
|
|
border |
|
|
v-loading="dataListLoading" |
|
|
v-loading="dataListLoading" |
|
|
style="width: 100%;"> |
|
|
style="width: 100%;"> |
|
|
@ -490,6 +560,7 @@ |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<qcUpload ref="qcUpload" @refreshPageTables="getDataList()" v-drag></qcUpload> |
|
|
<qcUpload ref="qcUpload" @refreshPageTables="getDataList()" v-drag></qcUpload> |
|
|
</div> |
|
|
</div> |
|
|
@ -508,7 +579,8 @@ |
|
|
// getItemLists, // 获取模板列表 |
|
|
// getItemLists, // 获取模板列表 |
|
|
getPartTemplateLists, // 获取模板列表 |
|
|
getPartTemplateLists, // 获取模板列表 |
|
|
getOperationDescList, // 查询工序列表 |
|
|
getOperationDescList, // 查询工序列表 |
|
|
getManufacturerList // 查询供应商列表 |
|
|
|
|
|
|
|
|
getManufacturerList, // 查询供应商列表 |
|
|
|
|
|
getAllResourceList // 查询机台列表 |
|
|
} from "@/api/qc/qc.js" |
|
|
} from "@/api/qc/qc.js" |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam' |
|
|
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' |
|
|
import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' |
|
|
@ -517,9 +589,6 @@ |
|
|
components: { |
|
|
components: { |
|
|
Chooselist, |
|
|
Chooselist, |
|
|
qcUpload |
|
|
qcUpload |
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
data () { |
|
|
data () { |
|
|
return { |
|
|
return { |
|
|
@ -534,6 +603,7 @@ |
|
|
// 导出 end |
|
|
// 导出 end |
|
|
tagNo:'', |
|
|
tagNo:'', |
|
|
searchData: { |
|
|
searchData: { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
familyID: '', |
|
|
familyID: '', |
|
|
familyName: '', |
|
|
familyName: '', |
|
|
attributeType: 'B', |
|
|
attributeType: 'B', |
|
|
@ -548,6 +618,7 @@ |
|
|
modalFlag:false, |
|
|
modalFlag:false, |
|
|
modalDisableFlag:false, |
|
|
modalDisableFlag:false, |
|
|
modalData:{ |
|
|
modalData:{ |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
flag: '', |
|
|
flag: '', |
|
|
familyID: '', |
|
|
familyID: '', |
|
|
familyName: '', |
|
|
familyName: '', |
|
|
@ -726,20 +797,31 @@ |
|
|
// 工序 |
|
|
// 工序 |
|
|
operationList: [], |
|
|
operationList: [], |
|
|
operationModelFlag: false, |
|
|
operationModelFlag: false, |
|
|
dataListSelections: [], |
|
|
|
|
|
operationData:{ |
|
|
operationData:{ |
|
|
operationDesc: '' |
|
|
operationDesc: '' |
|
|
}, |
|
|
}, |
|
|
selectionOperation: [], |
|
|
|
|
|
// 供应商 |
|
|
// 供应商 |
|
|
manufacturerList: [], |
|
|
manufacturerList: [], |
|
|
manufacturerModelFlag: false, |
|
|
manufacturerModelFlag: false, |
|
|
dataListSelections2: [], |
|
|
|
|
|
|
|
|
dataListManufacturerSelections: [], |
|
|
manufacturerData:{ |
|
|
manufacturerData:{ |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
manufacturerID: '', |
|
|
manufacturerID: '', |
|
|
manufacturerName: '' |
|
|
manufacturerName: '' |
|
|
}, |
|
|
}, |
|
|
|
|
|
operation: '', |
|
|
|
|
|
resourceId: '', |
|
|
|
|
|
// 单选框绑定的值 |
|
|
|
|
|
operationCurrent: -1, |
|
|
|
|
|
resourceCurrent: -1, |
|
|
|
|
|
selectionManufacturer: [], |
|
|
|
|
|
resourceModelFlag: false, |
|
|
|
|
|
resourceData: { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
resourceId: '', |
|
|
|
|
|
resourceDesc: '' |
|
|
|
|
|
}, |
|
|
|
|
|
resourceList: [], |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
mounted () { |
|
|
mounted () { |
|
|
@ -803,27 +885,17 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
// // 清空搜索栏 |
|
|
|
|
|
// doEmpty(){ |
|
|
|
|
|
// this.searchData = { |
|
|
|
|
|
// codeNo: '', |
|
|
|
|
|
// codeDesc: '', |
|
|
|
|
|
// active:'', |
|
|
|
|
|
// familyName:'', |
|
|
|
|
|
// functionType:'D', |
|
|
|
|
|
// inspectionTypeName:'', |
|
|
|
|
|
// page: 1, |
|
|
|
|
|
// limit: 10, |
|
|
|
|
|
// } |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
chooseLevel(row){ |
|
|
chooseLevel(row){ |
|
|
this.tempLevelRow = row; |
|
|
this.tempLevelRow = row; |
|
|
this.getBaseList(1048); |
|
|
this.getBaseList(1048); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
chooseProgrammeRow(row){ |
|
|
chooseProgrammeRow(row){ |
|
|
this.tempProgrammeRow = row; |
|
|
this.tempProgrammeRow = row; |
|
|
this.getBaseList(1051); |
|
|
this.getBaseList(1051); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 获取基础数据列表S |
|
|
// 获取基础数据列表S |
|
|
getBaseList (val,type) { |
|
|
getBaseList (val,type) { |
|
|
this.tagNo = val |
|
|
this.tagNo = val |
|
|
@ -843,6 +915,7 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/* 列表方法的回调 */ |
|
|
/* 列表方法的回调 */ |
|
|
getBaseData (val) { |
|
|
getBaseData (val) { |
|
|
if (this.tagNo === 1042) { |
|
|
if (this.tagNo === 1042) { |
|
|
@ -858,6 +931,7 @@ |
|
|
this.tempProgrammeRow.samplingProgrammeDesc = val.sampling_programme_desc |
|
|
this.tempProgrammeRow.samplingProgrammeDesc = val.sampling_programme_desc |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 获取数据列表 |
|
|
// 获取数据列表 |
|
|
getDataList () { |
|
|
getDataList () { |
|
|
this.searchData.limit = this.pageSize |
|
|
this.searchData.limit = this.pageSize |
|
|
@ -872,19 +946,23 @@ |
|
|
this.dataListLoading = false |
|
|
this.dataListLoading = false |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 每页数 |
|
|
// 每页数 |
|
|
sizeChangeHandle (val) { |
|
|
sizeChangeHandle (val) { |
|
|
this.pageSize = val |
|
|
this.pageSize = val |
|
|
this.pageIndex = 1 |
|
|
this.pageIndex = 1 |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 当前页 |
|
|
// 当前页 |
|
|
currentChangeHandle (val) { |
|
|
currentChangeHandle (val) { |
|
|
this.pageIndex = val |
|
|
this.pageIndex = val |
|
|
this.getDataList() |
|
|
this.getDataList() |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
addModal () { |
|
|
addModal () { |
|
|
this.modalData = { |
|
|
this.modalData = { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
flag: '1', |
|
|
flag: '1', |
|
|
familyID: '', |
|
|
familyID: '', |
|
|
familyName: '', |
|
|
familyName: '', |
|
|
@ -897,6 +975,7 @@ |
|
|
this.modalDisableFlag = false; |
|
|
this.modalDisableFlag = false; |
|
|
this.modalFlag = true; |
|
|
this.modalFlag = true; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 删除 |
|
|
// 删除 |
|
|
deletePropertiesModel (row) { |
|
|
deletePropertiesModel (row) { |
|
|
this.$confirm(`是否删除这个分类属性?`, '提示', { |
|
|
this.$confirm(`是否删除这个分类属性?`, '提示', { |
|
|
@ -923,6 +1002,7 @@ |
|
|
}).catch(() => { |
|
|
}).catch(() => { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
saveData(){ |
|
|
saveData(){ |
|
|
if (this.modalData.familyID === '' || this.modalData.familyID == null) { |
|
|
if (this.modalData.familyID === '' || this.modalData.familyID == null) { |
|
|
this.$message.warning('请选择物料分类编码!') |
|
|
this.$message.warning('请选择物料分类编码!') |
|
|
@ -952,6 +1032,7 @@ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 保存属性模板 |
|
|
// 保存属性模板 |
|
|
saveDetail(){ |
|
|
saveDetail(){ |
|
|
for (let i = 0; i < this.detailList.length; i++) { |
|
|
for (let i = 0; i < this.detailList.length; i++) { |
|
|
@ -977,6 +1058,7 @@ |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//打开分类模板清单 |
|
|
//打开分类模板清单 |
|
|
detailModal(row){ |
|
|
detailModal(row){ |
|
|
this.detailData.familyID = row.familyID |
|
|
this.detailData.familyID = row.familyID |
|
|
@ -987,66 +1069,97 @@ |
|
|
}) |
|
|
}) |
|
|
this.detailModelFlag = true; |
|
|
this.detailModelFlag = true; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
checkInspectionType(){ |
|
|
checkInspectionType(){ |
|
|
getPartTemplateLists(this.detailData).then(({data}) => { |
|
|
getPartTemplateLists(this.detailData).then(({data}) => { |
|
|
this.itemList1 = data.row1; |
|
|
|
|
|
this.itemList2 = data.row2; |
|
|
|
|
|
|
|
|
this.operation = '' |
|
|
|
|
|
this.resourceId = '' |
|
|
|
|
|
this.operationCurrent = -1 |
|
|
|
|
|
this.resourceCurrent = -1 |
|
|
|
|
|
this.itemList1 = data.row1 |
|
|
|
|
|
this.itemList2 = data.row2 |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 快速新增 |
|
|
// 快速新增 |
|
|
addFastModal(){ |
|
|
addFastModal(){ |
|
|
this.itemSelections1 = null |
|
|
this.itemSelections1 = null |
|
|
this.itemSelections2 = null |
|
|
this.itemSelections2 = null |
|
|
getPartTemplateLists(this.detailData).then(({data}) => { |
|
|
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.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo; |
|
|
this.checkInspectionType(); |
|
|
this.checkInspectionType(); |
|
|
this.dataListSelections = []; |
|
|
|
|
|
this.selectionOperation = []; |
|
|
|
|
|
this.dataListSelections2 = []; |
|
|
|
|
|
|
|
|
this.operation = '' |
|
|
|
|
|
this.resourceId = '' |
|
|
|
|
|
this.operationCurrent = -1 |
|
|
|
|
|
this.resourceCurrent = -1 |
|
|
|
|
|
this.selectionManufacturer = [] |
|
|
|
|
|
this.dataListManufacturerSelections = [] |
|
|
this.fastAddFlag = true; |
|
|
this.fastAddFlag = true; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 可选项目 |
|
|
// 可选项目 |
|
|
itemClickRow1(row){ |
|
|
itemClickRow1(row){ |
|
|
this.$refs.itemTable1.toggleRowSelection(row); |
|
|
this.$refs.itemTable1.toggleRowSelection(row); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 已有项目 |
|
|
// 已有项目 |
|
|
itemClickRow2(row){ |
|
|
itemClickRow2(row){ |
|
|
this.$refs.itemTable2.toggleRowSelection(row); |
|
|
this.$refs.itemTable2.toggleRowSelection(row); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selectFlag(){ |
|
|
selectFlag(){ |
|
|
return true; |
|
|
return true; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selectionItem1(val){ |
|
|
selectionItem1(val){ |
|
|
this.itemSelections1 = val |
|
|
this.itemSelections1 = val |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
selectionItem2(val){ |
|
|
selectionItem2(val){ |
|
|
this.itemSelections2 = val |
|
|
this.itemSelections2 = val |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 添加模板 |
|
|
// 添加模板 |
|
|
addItem () { |
|
|
addItem () { |
|
|
if(this.itemSelections1 == null || this.itemSelections1.length == 0){ |
|
|
|
|
|
|
|
|
if(this.itemSelections1 == null || this.itemSelections1.length === 0){ |
|
|
this.$message.warning('请选择可选模板!') |
|
|
this.$message.warning('请选择可选模板!') |
|
|
return |
|
|
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 = { |
|
|
let inData = { |
|
|
site: this.$store.state.user.site, |
|
|
site: this.$store.state.user.site, |
|
|
attributeNo: this.detailData.familyID, |
|
|
attributeNo: this.detailData.familyID, |
|
|
itemList: this.itemSelections1, |
|
|
itemList: this.itemSelections1, |
|
|
fieldList: this.selectionOperation, |
|
|
|
|
|
|
|
|
operation: this.operation, |
|
|
|
|
|
resourceID: this.resourceId, |
|
|
|
|
|
manufacturerList: this.selectionManufacturer, |
|
|
attributeType: this.detailData.attributeType, |
|
|
attributeType: this.detailData.attributeType, |
|
|
|
|
|
inspectionTypeNo: this.detailData.inspectionTypeNo |
|
|
} |
|
|
} |
|
|
savePartAttributeDetails(inData).then(({data}) => { |
|
|
savePartAttributeDetails(inData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
getPartTemplateLists(this.detailData).then(({data}) => { |
|
|
getPartTemplateLists(this.detailData).then(({data}) => { |
|
|
this.itemList1 = data.row1; |
|
|
|
|
|
this.itemList2 = data.row2; |
|
|
|
|
|
|
|
|
this.itemList1 = data.row1 |
|
|
|
|
|
this.itemList2 = data.row2 |
|
|
}) |
|
|
}) |
|
|
this.itemSelections1 = []; |
|
|
|
|
|
this.selectionOperation = []; |
|
|
|
|
|
|
|
|
this.itemSelections1 = [] |
|
|
|
|
|
this.operation = '' |
|
|
|
|
|
this.resourceId = '' |
|
|
|
|
|
this.selectionManufacturer = [] |
|
|
} else { |
|
|
} else { |
|
|
this.$alert(data.msg, '错误', { |
|
|
this.$alert(data.msg, '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
@ -1054,6 +1167,7 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 删除项目 |
|
|
// 删除项目 |
|
|
deleteItem(){ |
|
|
deleteItem(){ |
|
|
if(this.itemSelections2 == null || this.itemSelections2.length === 0){ |
|
|
if(this.itemSelections2 == null || this.itemSelections2.length === 0){ |
|
|
@ -1080,12 +1194,14 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 关闭后刷新列表 |
|
|
// 关闭后刷新列表 |
|
|
refreshDetailList(){ |
|
|
refreshDetailList(){ |
|
|
searchPartAttributeDetails(this.detailData).then(({data}) => { |
|
|
searchPartAttributeDetails(this.detailData).then(({data}) => { |
|
|
this.detailList = data.rows |
|
|
this.detailList = data.rows |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 删除物料属性中的模板 |
|
|
// 删除物料属性中的模板 |
|
|
deletePartAttributeDetails(row){ |
|
|
deletePartAttributeDetails(row){ |
|
|
this.$confirm(`是否删除这个检验模板?`, '提示', { |
|
|
this.$confirm(`是否删除这个检验模板?`, '提示', { |
|
|
@ -1129,6 +1245,7 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 收藏 OR 取消收藏 |
|
|
// 收藏 OR 取消收藏 |
|
|
favoriteFunction() { |
|
|
favoriteFunction() { |
|
|
let userFavorite = { |
|
|
let userFavorite = { |
|
|
@ -1158,12 +1275,13 @@ |
|
|
}) |
|
|
}) |
|
|
return this.exportList; |
|
|
return this.exportList; |
|
|
}, |
|
|
}, |
|
|
startDownload() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
startDownload() { |
|
|
}, |
|
|
}, |
|
|
finishDownload() { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
finishDownload() { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
fields() { |
|
|
fields() { |
|
|
let json = "{" |
|
|
let json = "{" |
|
|
this.columnList.forEach((item, index) => { |
|
|
this.columnList.forEach((item, index) => { |
|
|
@ -1177,7 +1295,6 @@ |
|
|
let s = eval("(" + json + ")") |
|
|
let s = eval("(" + json + ")") |
|
|
return s |
|
|
return s |
|
|
}, |
|
|
}, |
|
|
// 导出 end |
|
|
|
|
|
|
|
|
|
|
|
// 导入 |
|
|
// 导入 |
|
|
qcUpload(){ |
|
|
qcUpload(){ |
|
|
@ -1197,18 +1314,21 @@ |
|
|
getOperationDescList(this.operationData).then(({data}) => { |
|
|
getOperationDescList(this.operationData).then(({data}) => { |
|
|
if (data && data.code === 0) { |
|
|
if (data && data.code === 0) { |
|
|
this.operationList = data.rows; |
|
|
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.operationModelFlag = true; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
this.operationModelFlag = true; |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 条件查询获取工序列表 |
|
|
|
|
|
getOperationList2(){ |
|
|
|
|
|
getOperationDescList(this.operationData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.operationList = data.rows |
|
|
|
|
|
this.operationCurrent = -1 |
|
|
} else { |
|
|
} else { |
|
|
this.$alert(data.msg, '错误', { |
|
|
this.$alert(data.msg, '错误', { |
|
|
confirmButtonText: '确定' |
|
|
confirmButtonText: '确定' |
|
|
@ -1216,24 +1336,26 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 点击行选中复选框 |
|
|
// 点击行选中复选框 |
|
|
operationClickRow(row){ |
|
|
operationClickRow(row){ |
|
|
this.$refs.operationTable.toggleRowSelection(row); |
|
|
this.$refs.operationTable.toggleRowSelection(row); |
|
|
}, |
|
|
}, |
|
|
// 多选 |
|
|
|
|
|
selectionChangeHandle (val) { |
|
|
|
|
|
this.dataListSelections = val |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 多选工序 |
|
|
|
|
|
selectionOperationChangeHandle (val) { |
|
|
|
|
|
this.operation = val[0].operationDesc |
|
|
|
|
|
if (val) { |
|
|
|
|
|
this.operationCurrent = val.index; |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
operationRowClassName ({row, rowIndex}) { |
|
|
|
|
|
row.index = rowIndex; // 在原有的数据上加一个index |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 确认多选工序 |
|
|
// 确认多选工序 |
|
|
confirmOperation(){ |
|
|
confirmOperation(){ |
|
|
if(this.dataListSelections.length === 0){ |
|
|
|
|
|
this.$message.warning('请勾选工序!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.selectionOperation = [] |
|
|
|
|
|
for (let i = 0; i < this.dataListSelections.length; i++) { |
|
|
|
|
|
this.selectionOperation.push(this.dataListSelections[i].operationDesc) |
|
|
|
|
|
} |
|
|
|
|
|
this.operationModelFlag = false |
|
|
this.operationModelFlag = false |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -1245,11 +1367,11 @@ |
|
|
// 回显数据 |
|
|
// 回显数据 |
|
|
// 先清空缓存选中 |
|
|
// 先清空缓存选中 |
|
|
this.$nextTick(() => this.$refs.manufacturerTable.clearSelection()) |
|
|
this.$nextTick(() => this.$refs.manufacturerTable.clearSelection()) |
|
|
// 拿到选中的工序 |
|
|
|
|
|
let tempDataList = this.selectionOperation |
|
|
|
|
|
|
|
|
// 拿到选中的供应商 |
|
|
|
|
|
let tempDataList = this.selectionManufacturer |
|
|
this.manufacturerList.forEach(val => { |
|
|
this.manufacturerList.forEach(val => { |
|
|
// 回显选中的工序 |
|
|
|
|
|
if (tempDataList.includes(val.manufacturerName)) { |
|
|
|
|
|
|
|
|
// 回显选中的供应商 |
|
|
|
|
|
if (tempDataList.includes(val.manufacturerID)) { |
|
|
this.$nextTick(() => this.$refs.manufacturerTable.toggleRowSelection(val, true)) |
|
|
this.$nextTick(() => this.$refs.manufacturerTable.toggleRowSelection(val, true)) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
@ -1261,27 +1383,75 @@ |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 点击行选中复选框 |
|
|
// 点击行选中复选框 |
|
|
manufacturerClickRow(row){ |
|
|
manufacturerClickRow(row){ |
|
|
this.$refs.manufacturerTable.toggleRowSelection(row); |
|
|
this.$refs.manufacturerTable.toggleRowSelection(row); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 多选 |
|
|
// 多选 |
|
|
selectionChangeHandle2 (val) { |
|
|
|
|
|
this.dataListSelections2 = val |
|
|
|
|
|
|
|
|
selectionManufacturerChangeHandle (val) { |
|
|
|
|
|
this.dataListManufacturerSelections = val |
|
|
}, |
|
|
}, |
|
|
// 确认多选工序 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 确认多选供应商 |
|
|
confirmManufacturer(){ |
|
|
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 |
|
|
this.manufacturerModelFlag = false |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 获取机台列表 |
|
|
|
|
|
getAllResourceList () { |
|
|
|
|
|
getAllResourceList(this.resourceData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.resourceList = data.rows |
|
|
|
|
|
this.resourceModelFlag = true; |
|
|
|
|
|
} 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: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 点击行选中机台复选框 |
|
|
|
|
|
resourceClickRow (row) { |
|
|
|
|
|
this.$refs.resourceTable.toggleRowSelection(row); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 多选机台 |
|
|
|
|
|
selectionResourceChangeHandle (val) { |
|
|
|
|
|
this.resourceId = val[0].resourceId |
|
|
|
|
|
if (val) { |
|
|
|
|
|
this.resourceCurrent = val.index; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
resourceRowClassName ({row, rowIndex}) { |
|
|
|
|
|
row.index = rowIndex; // 在原有的数据上加一个index |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 确认选择工序 |
|
|
|
|
|
confirmResource () { |
|
|
|
|
|
this.resourceModelFlag = false |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |