@ -28,11 +28,9 @@
< el -input v-model ="searchData.familyName" clearable style="width: 120px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item : label = "' '" >
< el -button v-if ="!authSearch" type="primary" @click="getDataList()" > 查询 < / el -button >
< el -button v-if ="!authSave" type="primary" @click="addModal()" > 新增 < / el -button >
< el -button v-if ="!authSearch" type="primary" :loading="searchLoading" @click="getDataList()" > 查询 < / el -button >
< / e l - f o r m - i t e m >
< el -form -item : label = "' '" >
< el -button type = "primary" icon = "el-icon-upload" @click ="qcUpload()" > 导入 < / el -button >
< el -button @click ="exportExcel()" type = "primary" style = "margin-left: 2px" > { { '导出' } } < / e l - b u t t o n >
< / e l - f o r m - i t e m >
< / e l - f o r m >
@ -42,6 +40,11 @@
: height = "height"
: data = "dataList"
border
v - loading = "searchLoading"
ref = "partTable"
: row - style = "rowStyle"
@ row - click = "partClickRow"
@ current - change = "changeCurrentRow"
style = "width: 100%;" >
< el -table -column
v - for = "(item,index) in columnList" : key = "index"
@ -67,13 +70,13 @@
fixed = "right"
header - align = "center"
align = "center"
width = "18 0"
width = "10 0"
label = "操作" >
< template slot -scope = " scope " >
< el -link v-if ="!authDetail" style="cursor: pointer" @click="detailModal(scope.row)" > 检验模板 < / el -link >
<!-- < el -link v-if ="!authDetail" style="cursor: pointer" @click="detailModal(scope.row)" > 检验模板 < / el -link > -- >
< el -link v-if ="!authUpdate" style="cursor: pointer" @click="updateModal(scope.row)" > 编辑 < / el -link >
< el -link v-if ="!authDelete" style="cursor: pointer" @click="deletePropertiesModel(scope.row)" > 删除 < / el -link >
< el -link v-if ="!authFile" style="cursor: pointer" @click="sopFileList(scope.row)" > SOP文件 < / el -link >
< el -link v-if ="!authUpdate" style="cursor: pointer" @click="updateModal(scope.row)" > 详情 < / el -link >
<!-- < el -link v-if ="!authFile" style="cursor: pointer" @click="sopFileList(scope.row)" > SOP文件 < / el -link > -- >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
@ -91,47 +94,223 @@
< / e l - p a g i n a t i o n >
<!-- 物料属性新增 / 修改 -- >
< 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 label = "BU" prop = "bu" :rules ="rules.bu" >
< el -select v-model ="modalData.bu" placeholder="请选择" :disabled="modalDisableFlag" style="width: 295px" >
< el -option
v - for = "i in userBuList"
: key = "i.buNo"
: label = "i.sitename"
: value = "i.buNo" >
< span style = "float: left;width: 100px" > { { i . sitename } } < / span >
< span style = "float: right; color: #8492a6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; font-size: 11px;width: 60px" >
{ { i . buDesc } }
< / span >
< / e l - o p t i o n >
< / e l - s e l e c t >
< el -dialog title = "物料档案编辑" :close-on-click-modal ="false" v -drag :visible.sync ="modalFlag" width = "685px" >
< el -form :inline ="true" label -position = " top " :model ="modalData" :rules ="rules" style = "margin-left: 7px" >
< el -form -item label = "物料编码" >
< el -input v-model ="modalData.partNo" disabled style="width: 120px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item style = "margin-top: 23px;margin-left: 2px" >
< el -checkbox v-model ="modalData.exemptInspection" true-label="Y" > 是否免检 < / el -checkbox > < br >
< el -form -item label = "物料名称" >
< el -input v-model ="modalData.partDesc" disabled style="width: 250px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "物料分类" >
< el -input v-model ="modalData.partType" disabled style="width: 100px" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< 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" >
< span v-if ="modalDisableFlag === false" slot="label" @click="searchPartInfo()"><a herf="#" > 物料编码 : < / a > < / span >
< span v-if ="modalDisableFlag === true" slot="label" > 物料编码 : < / span >
< el -input v-model ="modalData.partNo" :disabled="modalDisableFlag" style="width: 120px" > < / el -input >
< el -form :inline ="true" label -position = " top " style = "margin-left: 7px" >
< el -form -item label = "计量单位" >
< el -input v-model ="modalData.umId" disabled style="width: 120px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "物料名称:" prop = "partDesc" :rules ="rules.partDescType" >
< el -input v-model ="modalData.partDesc" disabled style="width: 250px" > < / el -input >
< el -form -item label = "规格型号" >
< el -input v-model ="modalData.spec" disabled style="width: 120px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item style = "margin-top: 23px" >
< el -checkbox v-model ="modalData.expirationFlag" :disabled="modalDisableFlag" true-label="Y" > 物料有效期管理 < / el -checkbox >
< / e l - f o r m - i t e m >
< el -form -item label = "有效期天数" style = "margin-left: 10px" >
< el -input -number :controls ="false" :step ="0" v-model ="modalData.expirationDay" :disabled="modalDisableFlag" style="width: 100px" > < / el -input -number >
< / e l - f o r m - i t e m >
< el -form -item label = "有效期预警天数" >
< el -input -number :controls ="false" :step ="0" v-model ="modalData.expirationWarningDay" :disabled="modalDisableFlag" style="width: 100px" > < / el -input -number >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< 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: 385px" > < / el -input >
< el -form :inline ="true" label -position = " top " style = "margin-left: 7px" >
< el -form -item label = "超入比例" >
< el -input -number :controls ="false" :step ="0" v-model ="modalData.exceedInRatio" :disabled="modalDisableFlag" style="width: 120px" > < / el -input -number >
< / e l - f o r m - i t e m >
< el -form -item >
< span v-if ="modalDisableFlag" slot="label" > 入库默认仓库 < / span >
< span v -else style = "cursor: pointer" slot = "label" @ click = "getBaseList(20, 1)" > < a herf = "#" > 入库默认仓库 < / a > < / span >
< el -input v-model ="modalData.inboundWarehouseId" @change="inWarehouseBlur(20)" style="width: 80px" > < / el -input >
< el -input v-model ="modalData.inboundWarehouseName" disabled style="width: 165px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(22)" > < a herf = "#" > 默认库位 < / a > < / span >
< el -input v-model ="modalData.inboundLocationId" @change="locationBlur(22)" style="width: 80px" > < / el -input >
< el -input v-model ="modalData.inboundLocationName" disabled style="width: 165px" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< el -footer style = "height:40px;margin-top: 10px;text-align:center" >
< el -button type = "primary" @click ="saveData()" > 保存 < / el -button >
< el -form :inline ="true" label -position = " top " style = "margin-left: 7px" >
< el -form -item label = "超领比例" >
< el -input -number :controls ="false" :step ="0" v-model ="modalData.exceedOutRatio" style="width: 120px" > < / el -input -number >
< / e l - f o r m - i t e m >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @ click = "getBaseList(20, 2)" > < a herf = "#" > 领料默认仓库 < / a > < / span >
< el -input v-model ="modalData.outboundWarehouseId" @change="outWarehouseBlur(20)" style="width: 80px" > < / el -input >
< el -input v-model ="modalData.outboundWarehouseName" disabled style="width: 165px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "状态" >
< el -select v-model ="modalData.active" style="width: 80px" >
< el -option label = "启用" value = "Y" > < / e l - o p t i o n >
< el -option label = "弃用" value = "N" > < / e l - o p t i o n >
< / e l - s e l e c t >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< el -form :inline ="true" label -position = " top " style = "margin-left: 7px" >
< el -form -item style = "margin-top: 13px" >
< el -checkbox v-model ="modalData.iqcExempt" true-label="Y" > IQC检验 < / el -checkbox >
< / e l - f o r m - i t e m >
< el -form -item style = "margin-top: 13px;margin-left: 20px" >
< el -checkbox v-model ="modalData.faiExempt" true-label="Y" > FAI检验 < / el -checkbox >
< / e l - f o r m - i t e m >
< el -form -item style = "margin-top: 13px;margin-left: 20px" >
< el -checkbox v-model ="modalData.ipqcExempt" true-label="Y" > IPQC检验 < / el -checkbox >
< / e l - f o r m - i t e m >
< el -form -item style = "margin-top: 13px;margin-left: 20px" >
< el -checkbox v-model ="modalData.pqcExempt" true-label="Y" > PQC检验 < / el -checkbox >
< / e l - f o r m - i t e m >
< el -form -item style = "margin-top: 13px;margin-left: 20px" >
< el -checkbox v-model ="modalData.fqcExempt" true-label="Y" > FQC检验 < / el -checkbox >
< / e l - f o r m - i t e m >
< el -form -item style = "margin-top: 13px;margin-left: 20px" >
< el -checkbox v-model ="modalData.oqcExempt" true-label="Y" > OQC检验 < / el -checkbox >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< el -form :inline ="true" label -position = " top " style = "margin-left: 7px;margin-top: 2px" >
< el -form -item label = "首次巡检时长(h)" >
< el -input -number :controls ="false" :step ="0" v-model ="modalData.firstInspectionDuration" style="width: 120px" > < / el -input -number >
< / e l - f o r m - i t e m >
< el -form -item label = "下次巡检时长(h)" >
< el -input -number :controls ="false" :step ="0" v-model ="modalData.nextInspectionDuration" style="width: 120px" > < / el -input -number >
< / e l - f o r m - i t e m >
< el -form -item label = "累计巡检时长(h)" >
< el -input -number :controls ="false" :step ="0" v-model ="modalData.totalInspectionDuration" style="width: 120px" > < / el -input -number >
< / e l - f o r m - i t e m >
< / e l - f o r m >
< el -footer style = "height:35px;margin-top: 15px;text-align:center" >
< el -button type = "primary" :loading ="saveLoading" @click ="saveData()" > 保存 < / el -button >
< el -button type = "primary" @ click = "modalFlag = false" > 关闭 < / e l - b u t t o n >
< / e l - f o o t e r >
< / e l - d i a l o g >
<!-- 页签 -- >
< el -tabs v-model ="activeTable" style="width: 100%" :style="{height: secondHeight + 'px'}" type="border-card" @tab-click="tabClick" class="customer-tab" >
<!-- BOM页签 -- >
< el -tab -pane label = "BOM" name = "part_agent" >
< el -form label -position = " top " style = "margin-left: 2px;" >
< el -button v-if ="isAuth('104001001:agentSave')" type="primary" @click="savePartAgent" > 新增 < / el -button >
< / e l - f o r m >
< el -table
: data = "partAgentList"
: height = "secondHeight - 68"
border
style = "width: 100%;" >
< el -table -column
v - for = "(item,index) in columnAgentList" : 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 >
< / e l - t a b l e - c o l u m n >
< el -table -column
header - align = "center"
align = "center"
width = "150"
fixed = "right"
label = "操作" >
< template slot -scope = " scope " >
< el -link v-if ="isAuth('104001001:agentDelete')" style="cursor: pointer" @click="deleteAgent2(scope.row)" > 删除 < / el -link >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< / e l - t a b - p a n e >
<!-- 制造商页签 -- >
< el -tab -pane label = "制造商" name = "part_manufacturer" >
< el -form label -position = " top " style = "margin-left: 2px;" >
< el -button v-if ="isAuth('104001001:manufacturerSave')" type="primary" @click="savePartManufacturer()" > 新增 < / el -button >
< / e l - f o r m >
< el -table
: data = "partManufacturerList"
: height = "secondHeight - 68"
border
style = "width: 100%;" >
< el -table -column
v - for = "(item,index) in columnManufacturerList" : 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 >
< / e l - t a b l e - c o l u m n >
< el -table -column
header - align = "center"
align = "center"
width = "150"
fixed = "right"
label = "操作" >
< template slot -scope = " scope " >
< el -link v-if ="isAuth('104001001:manufacturerDelete')" style="cursor: pointer" @click="deleteManufacturer2(scope.row)" > 删除 < / el -link >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< / e l - t a b - p a n e >
<!-- 默认库位页签 -- >
< el -tab -pane label = "默认库位" name = "default_locations" >
< el -form label -position = " top " style = "margin-left: 2px;" >
< el -button v-if ="isAuth('104001001:locationSave')" type="primary" @click="saveDefaultLocation()" > 新增 < / el -button >
< / e l - f o r m >
< el -table
: data = "defaultLocationList"
: height = "secondHeight - 68"
border
style = "width: 100%;" >
< el -table -column
v - for = "(item,index) in columnLocationList" : 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 >
< / e l - t a b l e - c o l u m n >
< el -table -column
header - align = "center"
align = "center"
width = "150"
fixed = "right"
label = "操作" >
< template slot -scope = " scope " >
< el -link v-if ="isAuth('104001001:locationDelete')" style="cursor: pointer" @click="deleteLocation2(scope.row)" > 删除 < / el -link >
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e >
< / e l - t a b - p a n e >
<!-- 文档页签 -- >
< el -tab -pane label = "附件信息" name = "part_file" >
< oss -components label = "物料编码" : height = "secondHeight - 73" :columns ="columnFileList" :order-ref2 ="partCurrentRow.partNo" :order-ref1 ="partCurrentRow.site" :disabled ="!isAuth('104001001:fileSaveAndDelete')" > < / o s s - c o m p o n e n t s >
< / e l - t a b - p a n e >
< / e l - t a b s >
<!-- 检验模板 -- >
< el -dialog title = "检验模板清单" :close-on-click-modal ="false" v -drag :visible.sync ="detailModelFlag" width = "1400px" >
< el -form :inline ="true" label -position = " top " >
@ -652,8 +831,6 @@
< script >
import {
qcPartAttributeSearch , / / 查 询 物 料 属 性
qcPartAttributeSave , / / 新 增 物 料 属 性
qcPartAttributeDelete , / / 删 除 物 料 属 性
qcPartAttributeEdit , / / 修 改 物 料 属 性
searchPartAttributeDetails , / / 查 询 物 料 属 性 模 板
savePartAttributeDetails , / / 新 增 物 料 属 性 模 板
@ -673,6 +850,7 @@
import { userFavoriteList , saveUserFavorite , removeUserFavorite } from '@/api/userFavorite.js'
import { deleteObjectFile } from '@/api/eam/eam.js'
import excel from "@/utils/excel-util.js"
import { verifyData } from "@/api/chooselist/chooselist.js"
import qcUpload from "./qc_upload"
import qcSOPUploadFile from "./qc_SOP_upload_file"
export default {
@ -694,6 +872,7 @@
exportList : [ ] ,
/ / 导 出 e n d
tagNo : '' ,
tagType : '' ,
searchData : {
site : '' ,
userName : this . $store . state . user . name ,
@ -718,21 +897,36 @@
modalData : {
site : '' ,
bu : '' ,
buNo : '' ,
flag : '' ,
partNo : '' ,
partDesc : '' ,
familyID : '' ,
familyName : '' ,
cinvSourceCode : '' ,
sku : '' ,
umid : '' ,
supplierNo : '' ,
supplierDesc : '' ,
attributeRemark : '' ,
createTime : '' ,
createBy : this . $store . state . user . name ,
attributeType : 'A' ,
exemptInspection : ''
partTypeDB : '' ,
partType : '' ,
umId : '' ,
spec : '' ,
expirationFlag : '' ,
expirationDay : '' ,
expirationWarningDay : '' ,
exceedInRatio : '' ,
exceedOutRatio : '' ,
inboundWarehouseId : '' ,
inboundWarehouseName : '' ,
outboundWarehouseId : '' ,
outboundWarehouseName : '' ,
inboundLocationId : '' ,
inboundLocationName : '' ,
active : '' ,
iqcExempt : '' ,
faiExempt : '' ,
ipqcExempt : '' ,
pqcExempt : '' ,
fqcExempt : '' ,
oqcExempt : '' ,
firstInspectionDuration : '' ,
nextInspectionDuration : '' ,
totalInspectionDuration : '' ,
lastUpdateBy : this . $store . state . user . name
} ,
detailData : {
site : '' ,
@ -881,7 +1075,7 @@
serialNumber : '301003Table1Umid' ,
tableId : "301003Table1" ,
tableName : "物料属性设置表" ,
columnProp : 'umi d' ,
columnProp : 'umI d' ,
headerAlign : "center" ,
align : "left" ,
columnLabel : '单位' ,
@ -1310,12 +1504,19 @@
authDetail : false ,
authFile : false ,
menuId : this . $route . meta . menuId ,
activeTable : 'part_agent' ,
partCurrentRow : { } ,
secondHeight : 200 ,
searchLoading : false ,
saveLoading : false
}
} ,
mounted ( ) {
this . $nextTick ( ( ) => {
this . height = window . innerHeight - 170
this . height = window . innerHeight / 2 - 100
/*第二个表格高度的动态调整*/
this . secondHeight = window . innerHeight - this . height - 170
} )
} ,
@ -1389,50 +1590,11 @@
this . getBaseList ( 207 )
} ,
/ / 获 取 基 础 数 据 列 表 S
getBaseList ( val , type ) {
this . tagNo = val
this . $nextTick ( ( ) => {
let strVal = ''
if ( val === 208 ) {
strVal = this . tempLevelRow . samplingLevelNo
this . $refs . baseList . init ( val , strVal )
}
if ( val === 207 ) {
strVal = this . tempProgrammeRow . samplingProgrammeNo
this . $refs . baseList . init ( val , strVal )
}
if ( val === 1056 ) {
strVal = this . modalData . supplierNo
this . $refs . baseList . init ( val , strVal )
}
} )
} ,
/ / 列 表 方 法 的 回 调
getBaseData ( val ) {
if ( this . tagNo === 507 ) {
this . modalData . partNo = val . part_no
this . modalData . partDesc = val . part_desc
}
if ( this . tagNo === 208 ) {
this . tempLevelRow . samplingLevelNo = val . sampling_level_no
this . tempLevelRow . samplingLevelDesc = val . sampling_level_desc
}
if ( this . tagNo === 207 ) {
this . tempProgrammeRow . samplingProgrammeNo = val . sampling_programme_no
this . tempProgrammeRow . samplingProgrammeDesc = val . sampling_programme_desc
}
if ( this . tagNo === 1056 ) {
this . modalData . supplierNo = val . supplier_id
this . modalData . supplierDesc = val . supplier_name
}
} ,
/ / 获 取 数 据 列 表
getDataList ( ) {
this . searchData . limit = this . pageSize
this . searchData . page = this . pageIndex
this . searchLoading = true
qcPartAttributeSearch ( this . searchData ) . then ( ( { data } ) => {
if ( data . code === 0 ) {
this . dataList = data . page . list
@ -1440,6 +1602,8 @@
this . pageSize = data . page . pageSize
this . totalPage = data . page . totalCount
}
} ) . finally ( ( ) => {
this . searchLoading = false
} )
} ,
@ -1464,103 +1628,61 @@
this . getDataList ( )
} ,
addModal ( ) {
this . modalData = {
site : '' ,
bu : this . userBuList [ 0 ] . buNo ,
flag : '1' ,
partNo : '' ,
partDesc : '' ,
familyID : '' ,
familyName : '' ,
umid : '' ,
supplierNo : '' ,
supplierDesc : '' ,
attributeRemark : '' ,
createTime : '' ,
updateBy : this . $store . state . user . name ,
createBy : this . $store . state . user . name ,
attributeType : 'A' ,
exemptInspection : ''
}
this . modalDisableFlag = false
this . modalFlag = true
} ,
updateModal ( row ) {
this . modalData = {
site : row . site ,
bu : row . site + '_' + row . buNo ,
flag : '2' ,
buNo : row . buNo ,
partNo : row . partNo ,
partDesc : row . partDesc ,
familyID : row . familyID ,
familyName : row . familyName ,
umid : row . umid ,
supplierNo : row . supplierNo ,
supplierDesc : row . supplierDesc ,
attributeRemark : row . attributeRemark ,
updateBy : this . $store . state . user . name ,
createBy : this . $store . state . user . name ,
attributeType : 'A' ,
exemptInspection : row . exemptInspection
partTypeDB : row . partTypeDB ,
partType : row . partType ,
umId : row . umId ,
spec : row . spec ,
expirationFlag : row . expirationFlag ,
expirationDay : row . expirationDay ,
expirationWarningDay : row . expirationWarningDay ,
exceedInRatio : row . exceedInRatio ,
exceedOutRatio : row . exceedOutRatio ,
inboundWarehouseId : row . inboundWarehouseId ,
inboundWarehouseName : row . inboundWarehouseName ,
outboundWarehouseId : row . outboundWarehouseId ,
outboundWarehouseName : row . outboundWarehouseName ,
inboundLocationId : row . inboundLocationId ,
inboundLocationName : row . inboundLocationName ,
active : row . active ,
iqcExempt : row . iqcExempt ,
faiExempt : row . faiExempt ,
ipqcExempt : row . ipqcExempt ,
pqcExempt : row . pqcExempt ,
fqcExempt : row . fqcExempt ,
oqcExempt : row . oqcExempt ,
firstInspectionDuration : row . firstInspectionDuration ,
nextInspectionDuration : row . nextInspectionDuration ,
totalInspectionDuration : row . totalInspectionDuration ,
lastUpdateBy : this . $store . state . user . name ,
}
this . modalDisableFlag = true
this . modalFlag = true
} ,
/ / 删 除
deletePropertiesModel ( row ) {
this . $confirm ( ` 是否删除这个检验模板? ` , '提示' , {
confirmButtonText : '确定' ,
cancelButtonText : '取消' ,
type : 'warning'
} ) . then ( ( ) => {
qcPartAttributeDelete ( row ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
this . getDataList ( )
this . $message . success ( '操作成功' )
} else {
this . $message . error ( data . msg )
}
} )
} )
} ,
saveData ( ) {
if ( this . modalData . bu === '' || this . modalData . bu == null ) {
this . $message . warning ( '请选择BU!' )
return
}
if ( this . modalData . partNo === '' || this . modalData . partNo == null ) {
this . $message . warning ( '请选择物料编码!' )
return
}
if ( this . modalData . partDesc === '' || this . modalData . partDesc == null ) {
this . $message . warning ( '请选择物料名称!' )
return
}
if ( this . modalData . flag === '1' ) {
qcPartAttributeSave ( this . modalData ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
this . getDataList ( )
this . modalFlag = false
this . $message . success ( '操作成功' )
} else {
this . $message . error ( data . msg )
}
} )
} else {
qcPartAttributeEdit ( this . modalData ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
this . getDataList ( )
this . modalFlag = false
this . $message . success ( '操作成功' )
} else {
this . $message . error ( data . msg )
}
} )
}
this . saveLoading = true
qcPartAttributeEdit ( this . modalData ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
this . getDataList ( )
this . modalFlag = false
this . $message . success ( '操作成功' )
} else {
this . $message . error ( data . msg )
}
} ) . finally ( ( ) => {
this . saveLoading = false
} )
} ,
/ / 保 存 属 性 模 板
@ -1740,6 +1862,117 @@
} )
} ,
/ / 仓 库 输 入 校 验
inWarehouseBlur ( tagNo ) {
let tempData = {
tagno : tagNo ,
conditionSql : " and WareHouseID = '" + this . modalData . inboundWarehouseId + "'" + " and site = '" + this . modalData . site + "'" + " and bu_no = '" + this . modalData . buNo + "'"
}
verifyData ( tempData ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . inboundWarehouseId = data . baseListData [ 0 ] . WareHouseID
this . modalData . inboundWarehouseName = data . baseListData [ 0 ] . WareHouseName
} else {
this . modalData . inboundWarehouseName = ''
}
}
} )
} ,
/ / 仓 库 输 入 校 验
outWarehouseBlur ( tagNo ) {
let tempData = {
tagno : tagNo ,
conditionSql : " and WareHouseID = '" + this . modalData . outboundWarehouseId + "'" + " and site = '" + this . modalData . site + "'" + " and bu_no = '" + this . modalData . buNo + "'"
}
verifyData ( tempData ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . outboundWarehouseId = data . baseListData [ 0 ] . WareHouseID
this . modalData . outboundWarehouseName = data . baseListData [ 0 ] . WareHouseName
} else {
this . modalData . outboundWarehouseName = ''
}
}
} )
} ,
/ / 库 位 输 入 校 验
locationBlur ( tagNo ) {
let tempData = {
tagno : tagNo ,
conditionSql : " and LocationID = '" + this . modalData . inboundLocationId + "'" + " and site = '" + this . modalData . site + "'" + " and bu_no = '" + this . modalData . buNo + "'"
}
verifyData ( tempData ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . inboundLocationId = data . baseListData [ 0 ] . LocationID
this . modalData . inboundLocationName = data . baseListData [ 0 ] . LocationName
} else {
this . modalData . inboundLocationName = ''
}
}
} )
} ,
/ / 获 取 基 础 数 据 列 表 S
getBaseList ( val , type ) {
this . tagNo = val
this . tagType = type
this . $nextTick ( ( ) => {
let strVal = ''
if ( val === 208 ) {
strVal = this . tempLevelRow . samplingLevelNo
this . $refs . baseList . init ( val , strVal )
}
if ( val === 207 ) {
strVal = this . tempProgrammeRow . samplingProgrammeNo
this . $refs . baseList . init ( val , strVal )
}
if ( val === 1056 ) {
strVal = this . modalData . supplierNo
this . $refs . baseList . init ( val , strVal )
}
if ( val === 20 && type === 1 ) {
strVal = this . modalData . inboundWarehouseId
this . $refs . baseList . init ( val , strVal )
}
if ( val === 20 && type === 2 ) {
strVal = this . modalData . outboundWarehouseId
this . $refs . baseList . init ( val , strVal )
}
} )
} ,
/ / 列 表 方 法 的 回 调
getBaseData ( val ) {
if ( this . tagNo === 507 ) {
this . modalData . partNo = val . part_no
this . modalData . partDesc = val . part_desc
}
if ( this . tagNo === 208 ) {
this . tempLevelRow . samplingLevelNo = val . sampling_level_no
this . tempLevelRow . samplingLevelDesc = val . sampling_level_desc
}
if ( this . tagNo === 207 ) {
this . tempProgrammeRow . samplingProgrammeNo = val . sampling_programme_no
this . tempProgrammeRow . samplingProgrammeDesc = val . sampling_programme_desc
}
if ( this . tagNo === 1056 ) {
this . modalData . supplierNo = val . supplier_id
this . modalData . supplierDesc = val . supplier_name
}
if ( this . tagNo === 20 && this . tagType === 1 ) {
this . modalData . inboundWarehouseId = val . WareHouseID
this . modalData . inboundWarehouseName = val . WareHouseName
}
if ( this . tagNo === 20 && this . tagType === 2 ) {
this . modalData . outboundWarehouseId = val . WareHouseID
this . modalData . outboundWarehouseName = val . WareHouseName
}
} ,
/ / 校 验 用 户 是 否 收 藏
favoriteIsOk ( ) {
let userFavorite = {
@ -2026,6 +2259,46 @@
} )
} ,
/ / 列 表 表 格 选 择 替 换
tabClick ( tab , event ) {
/ / 刷 新 列 表 数 据
this . refreshCurrentTabTable ( )
} ,
/ / 当 前 值 发 生 变 化 的 时 候 修 改
changeCurrentRow ( row , oldRow ) {
/ / 判 断 是 否 是 获 取 焦 点 的 事 件
if ( row ) {
this . partCurrentRow = JSON . parse ( JSON . stringify ( row ) )
/ / 刷 新 当 前 页 表
this . refreshCurrentTabTable ( )
}
} ,
rowStyle ( { row } ) {
if ( this . partCurrentRow . partNo === row . partNo ) {
return { 'background-color' : '#E8F7F6' , cursor : 'pointer' }
}
} ,
/ / 单 机 选 中 物 料 信 息
partClickRow ( row , column ) {
this . partCurrentRow = JSON . parse ( JSON . stringify ( row ) )
} ,
/ / 刷 新 页 签 的 t a b l e 数 据
refreshCurrentTabTable ( ) {
if ( this . activeTable === 'part_agent' ) {
this . getPartAgent ( )
} else if ( this . activeTable === 'part_file' ) {
this . getFileContentData ( )
} else if ( this . activeTable === 'part_manufacturer' ) {
this . getPartManufacturer ( )
} else if ( this . activeTable === 'default_locations' ) {
this . getDefaultLocation ( )
}
} ,
/ / 动 态 列 开 始 获 取 用 户 保 存 的 格 式 列
async getTableUserColumn ( tableId , columnId ) {
let queryTableUser = {