@ -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" @blur="hazardCodeBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.hazardCode" @blur="hazardCodeBlur(123) " 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" @blur="productGroupId4Blur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.productGroupId4" @blur="productGroupId4Blur(113) " 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" @blur="productGroupId3Blur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.productGroupId3" @blur="productGroupId3Blur(112) " 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 " >
< el -form -item prop = "umId" :rules ="rules.umId " >
< span style = "cursor: pointer" slot = "label" @click ="getBaseList(1007)" > < a herf = "#" > 计量单位 / Inventory UoM < / a > < / span >
< el -input v-model ="modalData.umId" @blur="umIdBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.umId" @blur="umIdBlur(1007) " 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" @blur="groupIdBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.groupId" @blur="groupIdBlur(109) " 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" @blur="productGroupId1Blur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.productGroupId1" @blur="productGroupId1Blur(110) " 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" @blur="familyIdBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.familyId" @blur="familyIdBlur(108) " 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" @blur="productGroupId2Blur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.productGroupId2" @blur="productGroupId2Blur(111) " 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" @blur="assetClassBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.assetClass" @blur="assetClassBlur(124) " 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" @blur="partStatusBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.partStatus" @blur="partStatusBlur(125) " 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" @blur="abcClassBlur" :readonly="!modalDisableFlag" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.abcClass" @blur="abcClassBlur(126) " :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" @blur="codeNoBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.codeNo" 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" @blur="countryOfOriginBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.countryOfOrigin" @blur="countryOfOriginBlur(127) " 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" @blur="regionOfOriginBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.regionOfOrigin" @blur="regionOfOriginBlur(128) " 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" @blur="customsStatNoBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.customsStatNo" @blur="customsStatNoBlur(129) " 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" @blur="partCostGroupIdBlur" style="width: 128px" > < / el -input >
< el -input v-model ="modalData.partCostGroupId" @blur="partCostGroupIdBlur(131) " 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" @blur="planningMethodBlur" style="width: 170px" > < / el -input >
< el -input v-model ="modalData.planningMethod" @blur="planningMethodBlur(132) " 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 >
@ -794,6 +794,7 @@
width = "100"
label = "操作" >
< template slot -scope = " scope " >
< el -link style = "cursor: pointer" @click ="previewFile(scope.row)" > 预览 < / el -link >
< el -link style = "cursor: pointer" @click ="downloadFile(scope.row)" > 下载 < / el -link >
< el -link style = "cursor: pointer" @click ="deleteFile(scope.row)" > 删除 < / el -link >
< / template >
@ -1395,9 +1396,7 @@
deleteQuotationFile , / / 文 件 删 除
downLoadQuotationFile / / 文 件 下 载
} from '@/api/quotation/quotationInformation.js'
import {
getChooselistData
} from "@/api/chooselist/chooselist.js"
import { getChooselistData , verifyData } 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'
@ -2902,7 +2901,7 @@
trigger : [ 'blur' , 'change' ]
}
] ,
umName : [
umId : [
{
required : true ,
message : ' ' ,
@ -4627,272 +4626,408 @@
} ,
/ / 安 全 代 码 输 入 校 验
hazardCodeBlur ( ) {
hazardCodeBlur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and hazard_code = '" + this . modalData . hazardCode + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该安全代码不存在!' )
this . modalData . hazardDesc = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . hazardDesc = ''
}
} )
}
} ,
/ / 计 划 人 输 入 校 验
productGroupId4Blur ( ) {
productGroupId4Blur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and product_group_id = '" + this . modalData . productGroupId4 + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该计划人不存在!' )
this . modalData . productGroupName4 = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . productGroupName4 = ''
}
} )
}
} ,
/ / 会 计 组 输 入 校 验
productGroupId3Blur ( ) {
productGroupId3Blur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and product_group_id = '" + this . modalData . productGroupId3 + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该会计组不存在!' )
this . modalData . productGroupName3 = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . productGroupName3 = ''
}
} )
}
} ,
/ / 计 量 单 位 输 入 校 验
umIdBlur ( ) {
umIdBlur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and um_id = '" + this . modalData . umId + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该计量单位不存在!' )
this . modalData . umName = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . umName = ''
}
} )
}
} ,
/ / 产 品 代 码 输 入 校 验
groupIdBlur ( ) {
groupIdBlur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and group_id = '" + this . modalData . groupId + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该产品代码不存在!' )
this . modalData . groupName = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . groupName = ''
}
} )
}
} ,
/ / 商 品 组 1 输 入 校 验
productGroupId1Blur ( ) {
productGroupId1Blur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and product_group_id = '" + this . modalData . productGroupId1 + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该商品组1不存在!' )
this . modalData . productGroupName1 = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . productGroupName1 = ''
}
} )
}
} ,
/ / 产 品 大 类 输 入 校 验
familyIdBlur ( ) {
familyIdBlur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and family_id = '" + this . modalData . familyId + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该产品大类不存在!' )
this . modalData . familyName = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . familyName = ''
}
} )
}
} ,
/ / 商 品 组 2 输 入 校 验
productGroupId2Blur ( ) {
productGroupId2Blur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and product_group_id = '" + this . modalData . productGroupId2 + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该商品组2不存在!' )
this . modalData . productGroupName2 = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . productGroupName2 = ''
}
} )
}
} ,
/ / 资 产 等 级 输 入 校 验
assetClassBlur ( ) {
assetClassBlur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and asset_class = '" + this . modalData . assetClass + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该资产等级不存在!' )
this . modalData . assetClassDesc = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . assetClassDesc = ''
}
} )
}
} ,
/ / 零 件 状 态 输 入 校 验
partStatusBlur ( ) {
partStatusBlur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and part_status = '" + this . modalData . partStatus + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该零件状态不存在!' )
this . modalData . partStatusDesc = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . partStatusDesc = ''
}
} )
}
} ,
/ / a b c 类 输 入 校 验
abcClassBlur ( ) {
abcClassBlur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and abc_class = '" + this . modalData . abcClass + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该ABC类不存在!' )
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 = ''
}
this . $message . warning ( data . msg )
this . modalData . abcClassDesc = ''
}
} )
}
} ,
/ / / / 属 性 模 板 输 入 校 验
/ / c o d e N o B l u r ( t a g N o ) {
/ / i f ( t h i s . m o d a l D a t a . c o d e N o ! = n u l l & & t h i s . m o d a l D a t a . c o d e N o ! = = ' ' ) {
/ / l e t t e m p D a t a = {
/ / t a g n o : t a g N o ,
/ / c o n d i t i o n S q l : " a n d C o d e _ n o = ' " + t h i s . m o d a l D a t a . c o d e N o + " ' " + " a n d s i t e = ' " + t h i s . m o d a l D a t a . s i t e + " ' "
/ / }
/ / v e r i f y D a t a ( t e m p D a t a ) . t h e n ( ( { d a t a } ) = > {
/ / i f ( d a t a & & d a t a . c o d e = = = 0 ) {
/ / i f ( d a t a . b a s e L i s t D a t a . l e n g t h > 0 ) {
/ / t h i s . m o d a l D a t a . c o d e N o = d a t a . b a s e L i s t D a t a [ 0 ] . C o d e _ n o
/ / t h i s . m o d a l D a t a . c o d e D e s c = d a t a . b a s e L i s t D a t a [ 0 ] . C o d e _ d e s c
/ / } e l s e {
/ / t h i s . $ m e s s a g e . w a r n i n g ( ' 该 属 性 模 板 不 存 在 ! ' )
/ / t h i s . m o d a l D a t a . c o d e D e s c = ' '
/ / }
/ / } e l s e {
/ / t h i s . $ m e s s a g e . w a r n i n g ( d a t a . m s g )
/ / t h i s . m o d a l D a t a . c o d e D e s c = ' '
/ / }
/ / } )
/ / }
/ / } ,
/ / 来 源 国 家 输 入 校 验
countryOfOriginBlur ( ) {
countryOfOriginBlur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and country_of_origin = '" + this . modalData . countryOfOrigin + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该来源国家不存在!' )
this . modalData . countryOfOriginDesc = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . countryOfOriginDesc = ''
}
} )
}
} ,
/ / 区 域 代 码 输 入 校 验
regionOfOriginBlur ( ) {
regionOfOriginBlur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and region_of_origin = '" + this . modalData . regionOfOrigin + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该区域代码不存在!' )
this . modalData . regionOfOriginDesc = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . regionOfOriginDesc = ''
}
} )
}
} ,
/ / 海 关 统 计 序 号 输 入 校 验
customsStatNoBlur ( ) {
customsStatNoBlur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and customs_stat_no = '" + this . modalData . customsStatNo + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该海关统计序号不存在!' )
this . modalData . customsStatDesc = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . customsStatDesc = ''
}
} )
}
} ,
/ / 零 件 成 本 组 输 入 校 验
partCostGroupIdBlur ( ) {
partCostGroupIdBlur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and part_cost_group_id = '" + this . modalData . partCostGroupId + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该零件成本组不存在!' )
this . modalData . partCostGroupDesc = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . partCostGroupDesc = ''
}
} )
}
} ,
/ / 计 划 方 法
planningMethodBlur ( ) {
planningMethodBlur ( tagNo ) {
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 } ) => {
let tempData = {
tagno : tagNo ,
conditionSql : " and planning_method = '" + this . modalData . planningMethod + "'" + " and site = '" + this . modalData . site + "'"
}
verifyData ( tempData ) . 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 . $message . warning ( '该计划方法不存在!' )
this . modalData . planningMethodDesc = ''
}
} else {
this . $message . warning ( data . msg )
this . modalData . planningMethodDesc = ''
}
} )
}
@ -5035,6 +5170,44 @@
} )
} ,
/ / 预 览
previewFile ( row ) {
/ / 预 览 文 件
let image = [ 'jpg' , 'jpeg' , 'png' , 'gif' , 'bmp' ]
let type = ''
if ( image . includes ( row . fileType . toLowerCase ( ) ) ) {
type = 'image/' + row . fileType
}
let video = [ 'mp4' , 'avi' , 'mov' , 'wmv' , 'flv' ]
if ( video . includes ( row . fileType . toLowerCase ( ) ) ) {
type = 'video/' + row . fileType
}
let txt = [ 'txt' ]
if ( txt . includes ( row . fileType . toLowerCase ( ) ) ) {
type = 'text/plain'
}
let office = [ 'doc' , 'docx' , 'ppt' , 'pptx' , 'xls' , 'xlsx' ]
if ( office . includes ( row . fileType . toLowerCase ( ) ) ) {
this . $message . warning ( ` 暂不支持预览 ${ row . fileType . toLowerCase ( ) } 文件 ` )
return
}
let pdf = [ 'pdf' ]
if ( pdf . includes ( row . fileType . toLowerCase ( ) ) ) {
type = 'application/pdf'
}
if ( type === '' ) {
this . $message . warning ( ` 暂不支持预览 ${ row . fileType . toLowerCase ( ) } 文件 ` )
return ;
}
downLoadQuotationFile ( row ) . then ( ( { data } ) => {
const blob = new Blob ( [ data ] , { type : type } ) ;
/ / 创 建 U R L 来 生 成 预 览
const fileURL = URL . createObjectURL ( blob ) ;
/ / 在 新 标 签 页 中 打 开 文 件 预 览
const newTab = window . open ( fileURL , '_blank' )
} )
} ,
/ / = = = = = = = = c h o o s e L i s t 相 关 方 法 = = = = = = = =
/ * *
* 获取基础数据列表S