@ -118,7 +118,7 @@
< el -dialog :title ="modalData.title" top = "10vh" :close-on-click-modal ="false" v -drag :visible.sync ="modalFlag" width = "1000px" >
< el -form :inline ="true" label -position = " top " :model ="modalData" :rules ="rules" style = "margin-top: -5px;" >
< el -form -item label = "物料编码" prop = "partNo" :rules ="rules.partNo" >
< el -input v-model ="modalData.partNo" clearable style="width: 128px" @blur="queryMasterField" :disabled ="modalDisableFlag" > < / el -input >
< el -input v -model = " modalData.partNo " style = "width: 128px" @blur ="queryMasterField" disabled > < / e l - i n p u t >
< / e l - f o r m - i t e m >
< el -form -item label = "物料描述" prop = "partDesc" :rules ="rules.partDesc" style = "margin-left: -10px" >
< el -input v-model ="modalData.partDesc" clearable style="width: 330px" > < / el -input >
@ -145,50 +145,50 @@
< / e l - f o r m - i t e m >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(123)" > < a herf = "#" > 安全代码 / Safety Code < / a > < / span >
< el -input v-model ="modalData.hazardCode" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.hazardCode" @blur="hazardCodeBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.hazardDesc" disabled style="width: 330px" > < / 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" >
< el -form -item prop = "productGroupId4" :rules ="rules.productGroupId4" >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(113)" > < a herf = "#" > 计划人 / Planner < / a > < / span >
< el -input v-model ="modalData.productGroupId4" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.productGroupId4" @blur="productGroupId4Blur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.productGroupName4" disabled style="width: 330px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(112)" > < a herf = "#" > 会计组 / Accounting Group < / a > < / span >
< el -input v-model ="modalData.productGroupId3" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.productGroupId3" @blur="productGroupId3Blur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.productGroupName3" disabled style="width: 330px" > < / 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" >
< el -form -item prop = "umName" :rules ="rules.umName" >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(1007)" > < a herf = "#" > 库存计量单位 / Inventory UoM < / a > < / span >
< el -input v-model ="modalData.umId" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.umId" @blur="umIdBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.umName" disabled style="width: 330px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(109)" > < a herf = "#" > 产品代码 / Product Code < / a > < / span >
< el -input v-model ="modalData.groupId" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.groupId" @blur="groupIdBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.groupName" disabled style="width: 330px" > < / 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" >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(110)" > < a herf = "#" > 商品组1 / Comm Group 1 < / a > < / span >
< el -input v-model ="modalData.productGroupId1" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.productGroupId1" @blur="productGroupId1Blur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.productGroupName1" disabled style="width: 330px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(108)" > < a herf = "#" > 产品大类 / Product Family < / a > < / span >
< el -input v-model ="modalData.familyId" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.familyId" @blur="familyIdBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.familyName" disabled style="width: 330px" > < / 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" >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(111)" > < a herf = "#" > 商品组2 / Comm Group 2 < / a > < / span >
< el -input v-model ="modalData.productGroupId2" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.productGroupId2" @blur="productGroupId2Blur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.productGroupName2" disabled style="width: 330px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "类型指定 / Type Designation" >
@ -198,7 +198,7 @@
< el -form :inline ="true" label -position = " top " :model ="modalData" :rules ="rules" >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(124)" > < a herf = "#" > 资产等级 / Asset Class < / a > < / span >
< el -input v-model ="modalData.assetClass" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.assetClass" @blur="assetClassBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.assetClassDesc" disabled style="width: 330px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "尺寸/材质 / Dimension/Quality" >
@ -208,7 +208,7 @@
< el -form :inline ="true" label -position = " top " :model ="modalData" :rules ="rules" >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(125)" > < a herf = "#" > 零件状态 / Part Status < / a > < / span >
< el -input v-model ="modalData.partStatus" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.partStatus" @blur="partStatusBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.partStatusDesc" disabled style="width: 330px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "净重" >
@ -223,7 +223,7 @@
< el -form -item >
< span style = "cursor: pointer" slot = "label" v-if ="!modalDisableFlag" > < a herf = "#" > ABC类 / ABC Class < / a > < / span >
< span style = "cursor: pointer" slot = "label" v -else @click ="getBaseList(126)" > < a herf = "#" > ABC类 / ABC Class < / a > < / span >
< el -input v-model ="modalData.abcClass" :readonly="!modalDisableFlag" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.abcClass" @blur="abcClassBlur" :readonly="!modalDisableFlag" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.abcClassDesc" disabled style="width: 330px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "净数量" >
@ -237,7 +237,7 @@
< el -form :inline ="true" label -position = " top " :model ="modalData" :rules ="rules" >
< el -form -item prop = "codeNo" :rules ="rules.codeNo" >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(20)" > < a herf = "#" > 属性模板 < / a > < / span >
< el -input v-model ="modalData.codeNo" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.codeNo" @blur="codeNoBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.codeDesc" disabled style="width: 330px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = "频率级别 / Frequency Class" >
@ -259,7 +259,7 @@
< / e l - f o r m - i t e m >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(127)" > < a herf = "#" > 来源国家 / Country of Origin < / a > < / span >
< el -input v-model ="modalData.countryOfOrigin" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.countryOfOrigin" @blur="countryOfOriginBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.countryOfOriginDesc" disabled style="width: 330px" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m >
@ -272,7 +272,7 @@
< / e l - f o r m - i t e m >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(128)" > < a herf = "#" > 区域代码 / Region Code < / a > < / span >
< el -input v-model ="modalData.regionOfOrigin" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.regionOfOrigin" @blur="regionOfOriginBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.regionOfOriginDesc" disabled style="width: 330px" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m >
@ -283,7 +283,7 @@
< / e l - f o r m - i t e m >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(129)" > < a herf = "#" > 海关统计序号 / Customs Stat No < / a > < / span >
< el -input v-model ="modalData.customsStatNo" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.customsStatNo" @blur="customsStatNoBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.customsStatDesc" disabled style="width: 330px" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m >
@ -321,7 +321,7 @@
< / e l - f o r m - i t e m >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(131)" > < a herf = "#" > 零件成本组 / Part Cost Group < / a > < / span >
< el -input v-model ="modalData.partCostGroupId" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.partCostGroupId" @blur="partCostGroupIdBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.partCostGroupDesc" disabled style="width: 330px" > < / el -input >
< / e l - f o r m - i t e m >
< / e l - f o r m >
@ -360,7 +360,7 @@
< el -form :inline ="true" label -position = " top " :model ="modalData" :rules ="rules" >
< el -form -item >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(132)" > < a herf = "#" > 计划方法 / Planning Method < / a > < / span >
< el -input v-model ="modalData.planningMethod" style="width: 170px" > < / el -input >
< el -input v-model ="modalData.planningMethod" @blur="planningMethodBlur" style="width: 170px" > < / el -input >
< / e l - f o r m - i t e m >
< el -form -item label = " " >
< el -input v-model ="modalData.planningMethodDesc" disabled style="width: 510px" > < / el -input >
@ -765,7 +765,7 @@
<!-- 文档页签 -- >
< el -tab -pane label = "文档" name = "part_file" >
< el -form label -position = " top " style = "margin-top: 2px; margin-left: 2px;" >
< el -button type = "primary" @click ="uploadFile() " > 上传文件 < / el -button >
< el -button type = "primary" @click ="uploadFile" > 上传文件 < / el -button >
< / e l - f o r m >
< el -table
: data = "fileContentList"
@ -1340,6 +1340,8 @@
<!-- 上传文件的modal -- >
< partUploadFile ref = "partUploadFile" @refreshPageTables ="getFileContentData()" v-drag > < / partUploadFile >
< upload -file -list folder = "Inventory Part" title = "物料附件上传" :label ="'物料编码:'" :no ="partCurrentRow.partNo" :file-list.sync ="fileList" :upload-dialog.sync ="uploadDialog" path = "/upload/test" > < / u p l o a d - f i l e - l i s t >
< / div >
< / template >
@ -1386,17 +1388,23 @@
copyPart , / / 复 制 物 料
getBomAndRoutingList , / / 查 询 物 料 的 b o m 和 r o u t i n g 集 合
partInformationToOfficial , / / 转 正 式 物 料
getProjectPartNo , / / 获 取 物 料 编 码
} from '@/api/part/partInformation.js'
import {
getFileContentList , / / 获 取 物 料 单 附 件 列 表
deleteQuotationFile , / / 文 件 删 除
downLoadQuotationFile / / 文 件 下 载
} from '@/api/quotation/quotationInformation.js'
import {
getChooselistData
} from "@/api/chooselist/chooselist.js"
import Chooselist from '@/views/modules/common/Chooselist'
import partUploadFile from "./part_upload_file"
import DictDataSelect from '../sys/dict-data-select.vue'
import UploadFileList from "../common/uploadFileList.vue" ;
export default {
components : {
UploadFileList ,
DictDataSelect ,
Chooselist ,
partUploadFile
@ -1429,6 +1437,7 @@
this . modalData . customsStatNo = this . modalData . customsStatNo . toUpperCase ( )
this . modalData . partCostGroupId = this . modalData . partCostGroupId . toUpperCase ( )
this . modalData . planningMethod = this . modalData . planningMethod . toUpperCase ( )
this . modalData . ifsPartNo = this . modalData . ifsPartNo . toUpperCase ( )
}
} ,
itemData : {
@ -1454,9 +1463,13 @@
handler : function ( newV , oldV ) {
this . locationData . locationId = this . locationData . locationId . toUpperCase ( )
}
} ,
uploadDialog ( newValue , oldValue ) {
if ( newValue === false ) {
this . getFileContentData ( )
}
} ,
} ,
data ( ) {
return {
/ / 导 出
@ -1487,7 +1500,7 @@
limit : 10
} ,
/ / 其 它
loading : false ,
/ / 初 始 页 签
activeTable : 'part_item' ,
inventoryPartTable : 'General' ,
@ -1590,7 +1603,8 @@
overReportTolerance : '' ,
fixedLeadTimeHour : '' ,
density : '' ,
variableLeadTimeHour : ''
variableLeadTimeHour : '' ,
ifsPartNo : ''
} ,
revisionData : {
flag : '' ,
@ -1679,6 +1693,7 @@
bomAlternativeList : [ ] ,
routingAlternativeList : [ ] ,
copyAttributeList : [ ] ,
fileList : [ ] ,
/ / = = = = = = = = 列 表 表 头 = = = = = = = =
columnList : [
{
@ -1693,8 +1708,6 @@
columnLabel : '物料编码' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 120
@ -1711,26 +1724,22 @@
columnLabel : '物料描述' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 12 0
columnWidth : 15 0
} ,
{
userId : this . $store . state . user . name ,
functionId : 104001 ,
serialNumber : '104001Table1Status' ,
serialNumber : '104001Table1StatusDesc ' ,
tableId : '104001Table1' ,
tableName : '物料信息表' ,
columnProp : 'status' ,
columnProp : 'statusDesc ' ,
headerAlign : 'center' ,
align : 'center' ,
columnLabel : '是否为正式 物料' ,
columnLabel : '物料状态 ' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 100
@ -1747,8 +1756,6 @@
columnLabel : '规格型号' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 120
@ -1765,11 +1772,9 @@
columnLabel : '库存计量单位' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 6 0
columnWidth : 10 0
} ,
{
userId : this . $store . state . user . name ,
@ -1783,8 +1788,6 @@
columnLabel : '净重' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 60
@ -1801,11 +1804,9 @@
columnLabel : '净重单位' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 6 0
columnWidth : 8 0
} ,
{
userId : this . $store . state . user . name ,
@ -1819,8 +1820,6 @@
columnLabel : '净数量' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 60
@ -1837,11 +1836,9 @@
columnLabel : '数量单位' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 6 0
columnWidth : 8 0
} ,
{
userId : this . $store . state . user . name ,
@ -1851,15 +1848,13 @@
tableName : '物料信息表' ,
columnProp : 'lotTrackingCode' ,
headerAlign : 'center' ,
align : 'left ' ,
align : 'center ' ,
columnLabel : '批号跟踪' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 6 0
columnWidth : 11 0
} ,
{
userId : this . $store . state . user . name ,
@ -1873,11 +1868,9 @@
columnLabel : '零件类型' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 8 0
columnWidth : 13 0
} ,
{
userId : this . $store . state . user . name ,
@ -1891,11 +1884,9 @@
columnLabel : '产品大类' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 8 0
columnWidth : 10 0
} ,
{
userId : this . $store . state . user . name ,
@ -1909,11 +1900,9 @@
columnLabel : '产品代码' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 8 0
columnWidth : 10 0
} ,
{
userId : this . $store . state . user . name ,
@ -1927,11 +1916,9 @@
columnLabel : '商品组1' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 8 0
columnWidth : 10 0
} ,
{
userId : this . $store . state . user . name ,
@ -1945,11 +1932,9 @@
columnLabel : '商品组2' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 8 0
columnWidth : 10 0
} ,
{
userId : this . $store . state . user . name ,
@ -1963,11 +1948,9 @@
columnLabel : '会计组' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 8 0
columnWidth : 10 0
} ,
{
userId : this . $store . state . user . name ,
@ -1981,11 +1964,9 @@
columnLabel : '计划人' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 8 0
columnWidth : 10 0
} ,
{
userId : this . $store . state . user . name ,
@ -1999,8 +1980,6 @@
columnLabel : '属性模板' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 100
@ -2017,29 +1996,25 @@
columnLabel : '备注' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 16 0
columnWidth : 15 0
} ,
{
userId : this . $store . state . user . name ,
functionId : 104001 ,
serialNumber : '104001Table1Active ' ,
serialNumber : '104001Table1PlmPartNo ' ,
tableId : '104001Table1' ,
tableName : '物料信息表' ,
columnProp : 'active ' ,
columnProp : 'plmPartNo ' ,
headerAlign : 'center' ,
align : 'center' ,
columnLabel : '是否在用 ' ,
columnLabel : 'PLM料号 ' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 6 0
columnWidth : 12 0
} ,
{
userId : this . $store . state . user . name ,
@ -2053,8 +2028,6 @@
columnLabel : '创建时间' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 160
@ -2071,8 +2044,6 @@
columnLabel : '创建人' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 80
@ -2089,8 +2060,6 @@
columnLabel : '更新时间' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 160
@ -2107,8 +2076,6 @@
columnLabel : '更新人' ,
columnHidden : false ,
columnImage : false ,
columnSortable : false ,
sortLv : 0 ,
status : true ,
fixed : '' ,
columnWidth : 80
@ -2690,7 +2657,7 @@
serialNumber : '104001Table4CreatedBy' ,
tableId : '104001Table4' ,
tableName : '文件信息表' ,
columnProp : 'created By' ,
columnProp : 'createBy' ,
headerAlign : 'center' ,
align : 'center' ,
columnLabel : '上传人' ,
@ -3030,8 +2997,8 @@
updateRevisionModelFlag : false ,
updateRevisionModelDisableFlag : false ,
copyPartModelFlag : false ,
loading : false ,
attributeDialog : true ,
uploadDialog : false ,
}
} ,
@ -3651,11 +3618,13 @@
* 物料信息新增模态框
* /
addModal ( ) {
getProjectPartNo ( this . searchData ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
this . modalData = {
flag : '1' ,
title : '物料新增' ,
site : this . $store . state . user . site ,
partNo : '' ,
partNo : data . partNo ,
partDesc : '' ,
spec : '' ,
partTypeDb : '' ,
@ -3751,6 +3720,10 @@
this . inventoryPartTable = 'General'
this . modalDisableFlag = false
this . modalFlag = true
} else {
this . $message . error ( '获取项目物料编码失败!' )
}
} )
} ,
/ * *
* 物料信息编辑模态框
@ -4642,6 +4615,277 @@
} )
} ,
/ / 安 全 代 码 输 入 校 验
hazardCodeBlur ( ) {
if ( this . modalData . hazardCode != null && this . modalData . hazardCode !== '' ) {
getChooselistData ( { "sqlcode" : "Select hazard_code, hazard_desc from plm_safety_code where active = 'Y' and hazard_code = '" + this . modalData . hazardCode + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . hazardCode = data . baseListData [ 0 ] . hazard_code
this . modalData . hazardDesc = data . baseListData [ 0 ] . hazard_desc
} else {
this . modalData . hazardDesc = ''
}
}
} )
}
} ,
/ / 计 划 人 输 入 校 验
productGroupId4Blur ( ) {
if ( this . modalData . productGroupId4 != null && this . modalData . productGroupId4 !== '' ) {
getChooselistData ( { "sqlcode" : "select product_group_id,product_group_name from product_group where active = 'Y' and type = '4' and product_group_id = '" + this . modalData . productGroupId4 + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . productGroupId4 = data . baseListData [ 0 ] . product_group_id
this . modalData . productGroupName4 = data . baseListData [ 0 ] . product_group_name
} else {
this . modalData . productGroupName4 = ''
}
}
} )
}
} ,
/ / 会 计 组 输 入 校 验
productGroupId3Blur ( ) {
if ( this . modalData . productGroupId3 != null && this . modalData . productGroupId3 !== '' ) {
getChooselistData ( { "sqlcode" : "select product_group_id,product_group_name from product_group where active = 'Y' and type = '3' and product_group_id = '" + this . modalData . productGroupId3 + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . productGroupId3 = data . baseListData [ 0 ] . product_group_id
this . modalData . productGroupName3 = data . baseListData [ 0 ] . product_group_name
} else {
this . modalData . productGroupName3 = ''
}
}
} )
}
} ,
/ / 库 存 计 量 单 位 输 入 校 验
umIdBlur ( ) {
if ( this . modalData . umId != null && this . modalData . umId !== '' ) {
getChooselistData ( { "sqlcode" : "select um_id, um_name from um where active = 'Y' and um_id = '" + this . modalData . umId + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . umId = data . baseListData [ 0 ] . um_id
this . modalData . umName = data . baseListData [ 0 ] . um_name
} else {
this . modalData . umName = ''
}
}
} )
}
} ,
/ / 产 品 代 码 输 入 校 验
groupIdBlur ( ) {
if ( this . modalData . groupId != null && this . modalData . groupId !== '' ) {
getChooselistData ( { "sqlcode" : "select group_id, group_name from part_group where active = 'Y' and group_id = '" + this . modalData . groupId + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . groupId = data . baseListData [ 0 ] . group_id
this . modalData . groupName = data . baseListData [ 0 ] . group_name
} else {
this . modalData . groupName = ''
}
}
} )
}
} ,
/ / 商 品 组 1 输 入 校 验
productGroupId1Blur ( ) {
if ( this . modalData . productGroupId1 != null && this . modalData . productGroupId1 !== '' ) {
getChooselistData ( { "sqlcode" : "select product_group_id, product_group_name from product_group where active = 'Y' and type = '1' and product_group_id = '" + this . modalData . productGroupId1 + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . productGroupId1 = data . baseListData [ 0 ] . product_group_id
this . modalData . productGroupName1 = data . baseListData [ 0 ] . product_group_name
} else {
this . modalData . productGroupName1 = ''
}
}
} )
}
} ,
/ / 产 品 大 类 输 入 校 验
familyIdBlur ( ) {
if ( this . modalData . familyId != null && this . modalData . familyId !== '' ) {
getChooselistData ( { "sqlcode" : "select family_id, family_name from part_family where active = 'Y' and family_id = '" + this . modalData . familyId + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . familyId = data . baseListData [ 0 ] . family_id
this . modalData . familyName = data . baseListData [ 0 ] . family_name
} else {
this . modalData . familyName = ''
}
}
} )
}
} ,
/ / 商 品 组 2 输 入 校 验
productGroupId2Blur ( ) {
if ( this . modalData . productGroupId2 != null && this . modalData . productGroupId2 !== '' ) {
getChooselistData ( { "sqlcode" : "Select product_group_id, product_group_name from product_group where active = 'Y' and type = '2' and product_group_id = '" + this . modalData . productGroupId2 + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . productGroupId2 = data . baseListData [ 0 ] . product_group_id
this . modalData . productGroupName2 = data . baseListData [ 0 ] . product_group_name
} else {
this . modalData . productGroupName2 = ''
}
}
} )
}
} ,
/ / 资 产 等 级 输 入 校 验
assetClassBlur ( ) {
if ( this . modalData . assetClass != null && this . modalData . assetClass !== '' ) {
getChooselistData ( { "sqlcode" : "Select asset_class, asset_class_desc from plm_asset_class where active = 'Y' and asset_class = '" + this . modalData . assetClass + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . assetClass = data . baseListData [ 0 ] . asset_class
this . modalData . assetClassDesc = data . baseListData [ 0 ] . asset_class_desc
} else {
this . modalData . assetClassDesc = ''
}
}
} )
}
} ,
/ / 零 件 状 态 输 入 校 验
partStatusBlur ( ) {
if ( this . modalData . partStatus != null && this . modalData . partStatus !== '' ) {
getChooselistData ( { "sqlcode" : "Select part_status, part_status_desc from plm_part_status where active = 'Y' and part_status = '" + this . modalData . partStatus + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . partStatus = data . baseListData [ 0 ] . part_status
this . modalData . partStatusDesc = data . baseListData [ 0 ] . part_status_desc
} else {
this . modalData . partStatusDesc = ''
}
}
} )
}
} ,
/ / a b c 类 输 入 校 验
abcClassBlur ( ) {
if ( this . modalData . abcClass != null && this . modalData . abcClass !== '' ) {
getChooselistData ( { "sqlcode" : "Select abc_class, abc_class_desc from plm_abc_class where active = 'Y' and abc_class = '" + this . modalData . abcClass + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . abcClass = data . baseListData [ 0 ] . abc_class
this . modalData . abcClassDesc = data . baseListData [ 0 ] . abc_class_desc
} else {
this . modalData . abcClassDesc = ''
}
}
} )
}
} ,
/ / 属 性 模 板 输 入 校 验
codeNoBlur ( ) {
if ( this . modalData . codeNo != null && this . modalData . codeNo !== '' ) {
getChooselistData ( { "sqlcode" : "Select Code_no,Code_desc,Active from plm_properties_model_header where function_type='IP' and Code_no = '" + this . modalData . codeNo + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . codeNo = data . baseListData [ 0 ] . Code_no
this . modalData . codeDesc = data . baseListData [ 0 ] . Code_desc
} else {
this . modalData . codeDesc = ''
}
}
} )
}
} ,
/ / 来 源 国 家 输 入 校 验
countryOfOriginBlur ( ) {
if ( this . modalData . countryOfOrigin != null && this . modalData . countryOfOrigin !== '' ) {
getChooselistData ( { "sqlcode" : "Select country_of_origin, country_of_origin_desc from plm_country where active = 'Y' and country_of_origin = '" + this . modalData . countryOfOrigin + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . countryOfOrigin = data . baseListData [ 0 ] . country_of_origin
this . modalData . countryOfOriginDesc = data . baseListData [ 0 ] . country_of_origin_desc
} else {
this . modalData . countryOfOriginDesc = ''
}
}
} )
}
} ,
/ / 区 域 代 码 输 入 校 验
regionOfOriginBlur ( ) {
if ( this . modalData . regionOfOrigin != null && this . modalData . regionOfOrigin !== '' ) {
getChooselistData ( { "sqlcode" : "Select region_of_origin, region_of_origin_desc from plm_region_of_origin where active = 'Y' and region_of_origin = '" + this . modalData . regionOfOrigin + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . regionOfOrigin = data . baseListData [ 0 ] . region_of_origin
this . modalData . regionOfOriginDesc = data . baseListData [ 0 ] . region_of_origin_desc
} else {
this . modalData . regionOfOriginDesc = ''
}
}
} )
}
} ,
/ / 海 关 统 计 序 号 输 入 校 验
customsStatNoBlur ( ) {
if ( this . modalData . customsStatNo != null && this . modalData . customsStatNo !== '' ) {
getChooselistData ( { "sqlcode" : "Select customs_stat_no, customs_stat_desc from plm_customs_stat where active = 'Y' and customs_stat_no = '" + this . modalData . customsStatNo + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . customsStatNo = data . baseListData [ 0 ] . customs_stat_no
this . modalData . customsStatDesc = data . baseListData [ 0 ] . customs_stat_desc
} else {
this . modalData . customsStatDesc = ''
}
}
} )
}
} ,
/ / 零 件 成 本 组 输 入 校 验
partCostGroupIdBlur ( ) {
if ( this . modalData . partCostGroupId != null && this . modalData . partCostGroupId !== '' ) {
getChooselistData ( { "sqlcode" : "Select part_cost_group_id, part_cost_group_desc from plm_part_cost_group where active = 'Y' and part_cost_group_id = '" + this . modalData . partCostGroupId + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . partCostGroupId = data . baseListData [ 0 ] . part_cost_group_id
this . modalData . partCostGroupDesc = data . baseListData [ 0 ] . part_cost_group_desc
} else {
this . modalData . partCostGroupDesc = ''
}
}
} )
}
} ,
/ / 计 划 方 法
planningMethodBlur ( ) {
if ( this . modalData . planningMethod != null && this . modalData . planningMethod !== '' ) {
getChooselistData ( { "sqlcode" : "Select planning_method, planning_method_desc from plm_planning_method where active = 'Y' and planning_method = '" + this . modalData . planningMethod + "'" } ) . then ( ( { data } ) => {
if ( data && data . code === 0 ) {
if ( data . baseListData . length > 0 ) {
this . modalData . planningMethod = data . baseListData [ 0 ] . planning_method
this . modalData . planningMethodDesc = data . baseListData [ 0 ] . planning_method_desc
} else {
this . modalData . planningMethodDesc = ''
}
}
} )
}
} ,
/ / = = = = = = = = 列 表 操 作 方 法 = = = = = = = =
/ * *
@ -4724,10 +4968,11 @@
createBy : this . $store . state . user . name ,
partNo : this . partCurrentRow . partNo
}
this . uploadDialog = true
/ / 打 开 组 件 去 做 新 增 业 务
this . $nextTick ( ( ) => {
this . $refs . partUploadFile . init ( currentData ) ;
} )
/ / t h i s . $ n e x t T i c k ( ( ) = > {
/ / t h i s . $ r e f s . p a r t U p l o a d F i l e . i n i t ( c u r r e n t D a t a ) ;
/ / } )
} ,
/ * *
* 文件删除