diff --git a/src/api/chooselist/chooselist.js b/src/api/chooselist/chooselist.js
index 6482309..9c2b5c8 100644
--- a/src/api/chooselist/chooselist.js
+++ b/src/api/chooselist/chooselist.js
@@ -7,3 +7,5 @@ export const getChooselist = data => createAPI(`/chooselist/getChooselist/${data
export const getChooselistData = data => createAPI(`/chooselist/getChooselistData`,'post',data)
export const chooseList = data => createAPI(`/chooselist/getChooseList`,'post',data)
+
+export const verifyData = data => createAPI(`/chooselist/verifyData`,'post',data)
diff --git a/src/views/modules/changeManagement/changeRecord.vue b/src/views/modules/changeManagement/changeRecord.vue
index 3dbdb1e..fc89b21 100644
--- a/src/views/modules/changeManagement/changeRecord.vue
+++ b/src/views/modules/changeManagement/changeRecord.vue
@@ -83,7 +83,7 @@
申请人
申请人
-
+
@@ -126,7 +126,7 @@
审批人员
审批人员
-
+
@@ -151,7 +151,7 @@
I/E
I/E
-
+
@@ -162,13 +162,13 @@
CQC
CQC
-
+
FAI
FAI
-
+
@@ -1000,10 +1000,11 @@
submitChange2, // 临时提交方法
} from '@/api/changeManagement/changeManagement.js'
import ChooseList from '@/views/modules/common/Chooselist'
- import changeUploadFile from "../base/upload_file.vue";
+ import {verifyData} from "@/api/chooselist/chooselist.js"
+ import changeUploadFile from "../base/upload_file.vue"
import {downLoadQuotationFile} from '@/api/quotation/quotationInformation.js'
- import DictDataSelect from "../sys/dict-data-select.vue";
- import UploadFileList from "../common/uploadFileList.vue";
+ import DictDataSelect from "../sys/dict-data-select.vue"
+ import UploadFileList from "../common/uploadFileList.vue"
export default {
components: {
UploadFileList,
@@ -3592,6 +3593,131 @@
}
},
+ // 申请人输入校验
+ applicantBlur (tagNo) {
+ if (this.modalData.applicantId != null && this.modalData.applicantId !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and username = '" + this.modalData.applicantId + "'" + " and site = '" + this.modalData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.applicantId = data.baseListData[0].username
+ this.modalData.applicantName = data.baseListData[0].user_display
+ this.getDepartmentByUserName()
+ } else {
+ this.$message.warning('该申请人员不存在!')
+ this.modalData.applicantName = ''
+ this.modalData.applicationDepartmentId = ''
+ this.modalData.applicationDepartmentName = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.modalData.applicantName = ''
+ this.modalData.applicationDepartmentId = ''
+ this.modalData.applicationDepartmentName = ''
+ }
+ })
+ }
+ },
+
+ // 审批人员输入校验
+ tpEngineerBlur (tagNo) {
+ if (this.modalData.tpEngineerId != null && this.modalData.tpEngineerId !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and a.username = '" + this.modalData.tpEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.tpEngineerId = data.baseListData[0].username
+ this.modalData.tpEngineerName = data.baseListData[0].user_display
+ } else {
+ this.$message.warning('该审批人员不存在!')
+ this.modalData.tpEngineerName = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.modalData.tpEngineerName = ''
+ }
+ })
+ }
+ },
+
+ // I/E输入校验
+ industrialEngineerBlur (tagNo) {
+ if (this.modalData.industrialEngineerId != null && this.modalData.industrialEngineerId !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and a.username = '" + this.modalData.industrialEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.industrialEngineerId = data.baseListData[0].username
+ this.modalData.industrialEngineerName = data.baseListData[0].user_display
+ } else {
+ this.$message.warning('该I/E人员不存在!')
+ this.modalData.industrialEngineerName = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.modalData.industrialEngineerName = ''
+ }
+ })
+ }
+ },
+
+ // CQC输入校验
+ cqcOperatorBlur (tagNo) {
+ if (this.modalData.cqcOperatorId != null && this.modalData.cqcOperatorId !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and a.username = '" + this.modalData.cqcOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.cqcOperatorId = data.baseListData[0].username
+ this.modalData.cqcOperatorName = data.baseListData[0].user_display
+ } else {
+ this.$message.warning('该CQC人员不存在!')
+ this.modalData.cqcOperatorName = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.modalData.cqcOperatorName = ''
+ }
+ })
+ }
+ },
+
+ // FAI输入校验
+ faiOperatorBlur (tagNo) {
+ if (this.modalData.faiOperatorId != null && this.modalData.faiOperatorId !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and a.username = '" + this.modalData.faiOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.faiOperatorId = data.baseListData[0].username
+ this.modalData.faiOperatorName = data.baseListData[0].user_display
+ } else {
+ this.$message.warning('该FAI人员不存在!')
+ this.modalData.faiOperatorName = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.modalData.faiOperatorName = ''
+ }
+ })
+ }
+ },
+
// ======== 导出相关方法 ========
/**
* 导出excel
diff --git a/src/views/modules/changeManagement/changeRequest.vue b/src/views/modules/changeManagement/changeRequest.vue
index 516299a..3aa03d7 100644
--- a/src/views/modules/changeManagement/changeRequest.vue
+++ b/src/views/modules/changeManagement/changeRequest.vue
@@ -78,7 +78,6 @@
申请人
-
+
@@ -137,7 +136,7 @@
审批人员
-
+
@@ -160,7 +159,7 @@
I/E
-
+
@@ -170,12 +169,12 @@
CQC
-
+
FAI
-
+
@@ -811,15 +810,14 @@
getItemList, // 查询模板属性
countersignatureSave, // 新增会签信息
} from "@/api/changeManagement/changeManagement.js"
+ import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
import ChooseList from '@/views/modules/common/Chooselist'
- import {
- uploadFile // 文件上传
- } from '@/api/oss/oss.js'
- import {uploadFileList} from "../../../api/test/testInformation";
+ import {uploadFile} from '@/api/oss/oss.js'
+ import {uploadFileList} from "../../../api/test/testInformation"
import DictDataSelect from '../sys/dict-data-select.vue'
import changeUploadFile from "../base/upload_file.vue"
- import dayjs from "dayjs";
- import UploadFileList from "../common/uploadFileList.vue";
+ import dayjs from "dayjs"
+ import UploadFileList from "../common/uploadFileList.vue"
export default {
components: {
UploadFileList,
@@ -827,7 +825,6 @@
DictDataSelect,
ChooseList
},
-
watch: {
modalData: {
deep: true,
@@ -847,7 +844,6 @@
}
},
},
-
data() {
return {
uploadDialog: false,
@@ -2803,6 +2799,133 @@
}
},
+ // 申请人输入校验
+ applicantBlur (tagNo) {
+ if (this.modalData.applicantId != null && this.modalData.applicantId !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and username = '" + this.modalData.applicantId + "'" + " and site = '" + this.modalData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.applicantId = data.baseListData[0].username
+ this.modalData.applicantName = data.baseListData[0].user_display
+ this.getDepartmentByUserName()
+ } else {
+ this.$message.warning('该申请人员不存在!')
+ this.modalData.applicantName = ''
+ this.modalData.applicationDepartmentId = ''
+ this.modalData.applicationDepartmentName = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.modalData.applicantName = ''
+ this.modalData.applicationDepartmentId = ''
+ this.modalData.applicationDepartmentName = ''
+ }
+ })
+ }
+ },
+
+ // 审批人员输入校验
+ tpEngineerBlur (tagNo) {
+ if (this.modalData.tpEngineerId != null && this.modalData.tpEngineerId !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and a.username = '" + this.modalData.tpEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.tpEngineerId = data.baseListData[0].username
+ this.modalData.tpEngineerName = data.baseListData[0].user_display
+ } else {
+ this.$message.warning('该审批人员不存在!')
+ this.modalData.tpEngineerName = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.modalData.tpEngineerName = ''
+ }
+ })
+ }
+ },
+
+ // I/E输入校验
+ industrialEngineerBlur (tagNo) {
+ if (this.modalData.industrialEngineerId != null && this.modalData.industrialEngineerId !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and a.username = '" + this.modalData.industrialEngineerId + "'" + " and b.site = '" + this.modalData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.industrialEngineerId = data.baseListData[0].username
+ this.modalData.industrialEngineerName = data.baseListData[0].user_display
+ } else {
+ this.$message.warning('该I/E人员不存在!')
+ this.modalData.industrialEngineerName = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.modalData.industrialEngineerName = ''
+ }
+ })
+ }
+ },
+
+ // CQC输入校验
+ cqcOperatorBlur (tagNo) {
+ if (this.modalData.cqcOperatorId != null && this.modalData.cqcOperatorId !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and a.username = '" + this.modalData.cqcOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.cqcOperatorId = data.baseListData[0].username
+ this.modalData.cqcOperatorName = data.baseListData[0].user_display
+ } else {
+ this.$message.warning('该CQC人员不存在!')
+ this.modalData.cqcOperatorName = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.modalData.cqcOperatorName = ''
+ }
+ })
+ }
+ },
+
+ // FAI输入校验
+ faiOperatorBlur (tagNo) {
+ if (this.modalData.faiOperatorId != null && this.modalData.faiOperatorId !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and a.username = '" + this.modalData.faiOperatorId + "'" + " and b.site = '" + this.modalData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.faiOperatorId = data.baseListData[0].username
+ this.modalData.faiOperatorName = data.baseListData[0].user_display
+ } else {
+ this.$message.warning('该FAI人员不存在!')
+ this.modalData.faiOperatorName = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.modalData.faiOperatorName = ''
+ }
+ })
+ }
+ },
+
+
+
// ======== 导出相关方法 ========
/**
* 导出excel
diff --git a/src/views/modules/customer/customerInformationManagement.vue b/src/views/modules/customer/customerInformationManagement.vue
index 84c4192..b08a9db 100644
--- a/src/views/modules/customer/customerInformationManagement.vue
+++ b/src/views/modules/customer/customerInformationManagement.vue
@@ -82,7 +82,7 @@
-
客户组1
-
+
客户组2
-
+
@@ -724,6 +724,7 @@
saveProjectInfo
} from "@/api/project/project.js"
import Chooselist from '@/views/modules/common/Chooselist'
+ import {verifyData} from "@/api/chooselist/chooselist.js"
import DictDataSelect from '../sys/dict-data-select.vue'
import saveOrUpdate from '../project/projectInfo/com_projectInfo-add-or-update.vue'
import partUploadFile from '../part/part_upload_file.vue'
@@ -2944,30 +2945,48 @@
this.projectInformationSelections = val
},
- // 客户组ID输入校验
- customerGroupBlur () {
+ // 客户组1输入校验
+ customerGroupBlur (tagNo) {
if (this.modalData.customerGroupId1 != null && this.modalData.customerGroupId1 !== '') {
- this.modalData.type = '1'
- checkCustomerGroup(this.modalData).then(({data}) => {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and customer_group_id = '" + this.modalData.customerGroupId1 + "'" + " and site = '" + this.modalData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
- this.modalData.customerGroupId1 = data.rows.customerGroupId
- this.modalData.customerGroupName1 = data.rows.customerGroupName
+ if (data.baseListData.length > 0) {
+ this.modalData.customerGroupId1 = data.baseListData[0].customer_group_id
+ this.modalData.customerGroupName1 = data.baseListData[0].customer_group_name
+ } else {
+ this.$message.warning('该客户组1不存在!')
+ this.modalData.customerGroupName1 = ''
+ }
} else {
+ this.$message.warning(data.msg)
this.modalData.customerGroupName1 = ''
}
})
}
},
- // 客户组ID输入校验
- customerGroupBlur2 () {
+ // 客户组2输入校验
+ customerGroupBlur2 (tagNo) {
if (this.modalData.customerGroupId2 != null && this.modalData.customerGroupId2 !== '') {
- this.modalData.type = '2'
- checkCustomerGroup(this.modalData).then(({data}) => {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and customer_group_id = '" + this.modalData.customerGroupId2 + "'" + " and site = '" + this.modalData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
if (data && data.code === 0) {
- this.modalData.customerGroupId12 = data.rows.customerGroupId
- this.modalData.customerGroupName2 = data.rows.customerGroupName
+ if (data.baseListData.length > 0) {
+ this.modalData.customerGroupId2 = data.baseListData[0].customer_group_id
+ this.modalData.customerGroupName2 = data.baseListData[0].customer_group_name
+ } else {
+ this.$message.warning('该客户组2不存在!')
+ this.modalData.customerGroupName2 = ''
+ }
} else {
+ this.$message.warning(data.msg)
this.modalData.customerGroupName2 = ''
}
})
diff --git a/src/views/modules/part/bomManagement.vue b/src/views/modules/part/bomManagement.vue
index 5562b31..4749262 100644
--- a/src/views/modules/part/bomManagement.vue
+++ b/src/views/modules/part/bomManagement.vue
@@ -81,14 +81,14 @@
-
+
@@ -3231,20 +3231,23 @@ export default {
// 子物料编码失焦事件
componentPartBlur () {
- this.componentPartData.partNo = this.componentData.componentPart
- queryPartList(this.componentPartData).then(({data}) => {
- if (data && data.code === 0) {
- if (data.rows.length === 1) {
- this.componentData.componentPartDesc = data.rows[0].partDesc
- this.componentData.printUnit = data.rows[0].printUnit
- this.componentData.printUnitName = data.rows[0].printUnitName
- } else {
- this.componentData.componentPartDesc = ''
- this.componentData.printUnit = ''
- this.componentData.printUnitName = ''
+ if (this.componentData.componentPart != null && this.componentData.componentPart !== '') {
+ this.componentPartData.partNo = this.componentData.componentPart
+ queryPartList(this.componentPartData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.rows.length === 1) {
+ this.componentData.componentPartDesc = data.rows[0].partDesc
+ this.componentData.printUnit = data.rows[0].printUnit
+ this.componentData.printUnitName = data.rows[0].printUnitName
+ } else {
+ this.$message.warning('该子物料不存在!')
+ this.componentData.componentPartDesc = ''
+ this.componentData.printUnit = ''
+ this.componentData.printUnitName = ''
+ }
}
- }
- })
+ })
+ }
},
/**
diff --git a/src/views/modules/part/partCatalogInformation.vue b/src/views/modules/part/partCatalogInformation.vue
index c62a252..eb0b537 100644
--- a/src/views/modules/part/partCatalogInformation.vue
+++ b/src/views/modules/part/partCatalogInformation.vue
@@ -77,7 +77,7 @@
- -->
-
+
计量单位
-
+
-
+
属性模板
@@ -129,7 +129,7 @@
物料分组
-
+
@@ -427,6 +427,7 @@
queryMasterPartItem,
toBecomeOfficialMasterPart, // 转正式物料
} from '@/api/part/masterPartInformation.js'
+ import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
import {getProjectPartNo} from '@/api/part/partInformation.js'
import Chooselist from '@/views/modules/common/Chooselist'
import DictDataSelect from '../sys/dict-data-select.vue'
@@ -1695,6 +1696,54 @@
}
},
+ // 计量单位输入校验
+ umIdBlur (tagNo) {
+ if (this.modalData.umId != null && this.modalData.umId !== '') {
+ 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 (tagNo) {
+ if (this.modalData.partMainGroup != null && this.modalData.partMainGroup !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and group_id = '" + this.modalData.partMainGroup + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.partMainGroup = 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 = ''
+ }
+ })
+ }
+ },
+
// ======== 导出相关方法 ========
/**
* 导出excel
diff --git a/src/views/modules/part/partInformation.vue b/src/views/modules/part/partInformation.vue
index e5be4dc..0838eb6 100644
--- a/src/views/modules/part/partInformation.vue
+++ b/src/views/modules/part/partInformation.vue
@@ -145,50 +145,50 @@
安全代码 / Safety Code
-
+
计划人 / Planner
-
+
会计组 / Accounting Group
-
+
-
+
计量单位 / Inventory UoM
-
+
产品代码 / Product Code
-
+
商品组1 / Comm Group 1
-
+
产品大类 / Product Family
-
+
商品组2 / Comm Group 2
-
+
@@ -198,7 +198,7 @@
资产等级 / Asset Class
-
+
@@ -208,7 +208,7 @@
零件状态 / Part Status
-
+
@@ -223,7 +223,7 @@
ABC类 / ABC Class
ABC类 / ABC Class
-
+
@@ -237,7 +237,7 @@
属性模板
-
+
@@ -259,7 +259,7 @@
来源国家 / Country of Origin
-
+
@@ -272,7 +272,7 @@
区域代码 / Region Code
-
+
@@ -283,7 +283,7 @@
海关统计序号 / Customs Stat No
-
+
@@ -321,7 +321,7 @@
零件成本组 / Part Cost Group
-
+
@@ -360,7 +360,7 @@
计划方法 / Planning Method
-
+
@@ -794,6 +794,7 @@
width="100"
label="操作">
+ 预览
下载
删除
@@ -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 = ''
}
})
}
},
// abc类输入校验
- 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 = ''
}
+ } else {
+ this.$message.warning(data.msg)
+ 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 = ''
- }
- }
- })
- }
- },
+ // // 属性模板输入校验
+ // codeNoBlur (tagNo) {
+ // if (this.modalData.codeNo != null && this.modalData.codeNo !== '') {
+ // let tempData = {
+ // tagno: tagNo,
+ // conditionSql: " and Code_no = '" + this.modalData.codeNo + "'" + " and site = '" + this.modalData.site + "'"
+ // }
+ // verifyData(tempData).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.$message.warning('该属性模板不存在!')
+ // this.modalData.codeDesc = ''
+ // }
+ // } else {
+ // this.$message.warning(data.msg)
+ // this.modalData.codeDesc = ''
+ // }
+ // })
+ // }
+ // },
// 来源国家输入校验
- 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 });
+ // 创建URL来生成预览
+ const fileURL = URL.createObjectURL(blob);
+ // 在新标签页中打开文件预览
+ const newTab = window.open(fileURL, '_blank')
+ })
+ },
+
// ======== chooseList相关方法 ========
/**
* 获取基础数据列表S
diff --git a/src/views/modules/part/routingManagement.vue b/src/views/modules/part/routingManagement.vue
index fa8fedb..a5196ea 100644
--- a/src/views/modules/part/routingManagement.vue
+++ b/src/views/modules/part/routingManagement.vue
@@ -81,14 +81,14 @@
-
+
@@ -400,7 +400,7 @@
加工中心编码
-
+
@@ -841,6 +841,7 @@ import {
workGuidelineEdit, // 编辑 workGuideline
deleteWorkGuideline, // 删除 workGuideline
} from '@/api/part/routingOperationWorkGuidelines.js'
+import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
import ChooseList from '@/views/modules/common/Chooselist'
export default {
@@ -4006,6 +4007,30 @@ export default {
this.componentData.laborRunFactor = this.componentData.machRunFactor
},
+ // 加工中心输入校验
+ workCenterBlur (tagNo) {
+ if (this.componentData.workCenterNo != null && this.componentData.workCenterNo !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and work_center_no = '" + this.componentData.workCenterNo + "'" + " and site = '" + this.componentData.site + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.componentData.workCenterNo = data.baseListData[0].work_center_no
+ this.componentData.workCenterDesc = data.baseListData[0].work_center_desc
+ } else {
+ this.$message.warning('该加工中心不存在!')
+ this.componentData.workCenterDesc = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.componentData.workCenterDesc = ''
+ }
+ })
+ }
+ },
+
// ======== 导出相关方法 ========
/**
* 导出excel
diff --git a/src/views/modules/processManagement/processBindingInfo.vue b/src/views/modules/processManagement/processBindingInfo.vue
index c7f615b..95a79bd 100644
--- a/src/views/modules/processManagement/processBindingInfo.vue
+++ b/src/views/modules/processManagement/processBindingInfo.vue
@@ -105,9 +105,9 @@
-->
- 流程ID
+ 流程ID
流程ID
-
+
@@ -116,8 +116,8 @@
菜单ID
- 菜单ID
-
+ 菜单ID
+
@@ -386,6 +386,7 @@
saveAuthorityList, // 保存节点权限
editNodeInfo, // 修改节点
} from '@/api/processManagement/processManagement.js'
+ import {getChooselistData, verifyData} from "@/api/chooselist/chooselist.js"
import Chooselist from '@/views/modules/common/Chooselist'
import DictDataSelect from '../sys/dict-data-select.vue'
export default {
@@ -1638,6 +1639,54 @@
}
},
+ // 流程ID输入校验
+ workflowBlur (tagNo) {
+ if (this.modalData.workflowId != null && this.modalData.workflowId !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and Workflowid = '" + this.modalData.workflowId + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.workflowId = data.baseListData[0].Workflowid
+ this.modalData.workflowname = data.baseListData[0].Workflowname
+ } else {
+ this.$message.warning('该流程不存在!')
+ this.modalData.workflowname = ''
+ }
+ } else {
+ this.$message.warning('该流程不存在!')
+ this.modalData.workflowname = ''
+ }
+ })
+ }
+ },
+
+ // 菜单ID输入校验
+ menuBlur (tagNo) {
+ if (this.modalData.menuId != null && this.modalData.menuId !== '') {
+ let tempData = {
+ tagno: tagNo,
+ conditionSql: " and Menu_id = '" + this.modalData.menuId + "'"
+ }
+ verifyData(tempData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.modalData.menuId = data.baseListData[0].Menu_id
+ this.modalData.name = data.baseListData[0].Name
+ } else {
+ this.$message.warning('该菜单不存在!')
+ this.modalData.name = ''
+ }
+ } else {
+ this.$message.warning('该菜单不存在!')
+ this.modalData.name = ''
+ }
+ })
+ }
+ },
+
// ======== 导出相关方法 ========
/**
* 导出excel