diff --git a/src/api/part/external.js b/src/api/part/external.js
index 177b90b..58210f7 100644
--- a/src/api/part/external.js
+++ b/src/api/part/external.js
@@ -22,3 +22,5 @@ export const savePartInfoByExcel = data => createAPI(`/part/savePartInfoByExcel`
export const provisionalDataAlterHandle = data => createAPI(`/part/provisionalDataAlterHandle/${data.type}`,'post',data)
export const getProvisionalDataList = data => createAPI(`/part/getProvisionalDataList`,'post',data)
+
+export const verifyData = data => createAPI(`part/partInformation/verifyData`,'post',data)
diff --git a/src/views/modules/part/external.vue b/src/views/modules/part/external.vue
index 2d40e35..89537a3 100644
--- a/src/views/modules/part/external.vue
+++ b/src/views/modules/part/external.vue
@@ -6,7 +6,8 @@ import {
saveExternalPart, savePartInfoByExcel,
selectExternalPartList, selectExternalPartPage,
selectUnitList,
- updateExternalPart
+ updateExternalPart,
+ verifyData
} from '../../../api/part/external'
import Chooselist from '@/views/modules/common/Chooselist_eam'
import dayjs from 'dayjs'
@@ -88,6 +89,7 @@ export default {
orderRef1: 'partInfo',
orderRef2: 'partInfoFormat',
site: this.$store.state.user.site,
+ siteName: this.$store.state.user.siteName,
},
partCategoryList: [],
category: {},
@@ -849,6 +851,7 @@ export default {
getBaseData (val) {
if (this.tagNo === 93) {
this.tempData.site = val.SiteID
+ this.tempData.siteName = val.SiteName
}
},
@@ -1246,6 +1249,33 @@ export default {
this.category = JSON.parse(JSON.stringify(category))
}
},
+
+ siteBlur (tagNo) {
+ if (this.tempData.site != null) {
+ let inData = {
+ tagno: tagNo,
+ conditionSql: " and SiteID = '" + this.tempData.site + "'"
+ }
+ verifyData(inData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.tempData.siteName = data.baseListData[0].SiteName
+ } else {
+ this.tempData.siteName = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.tempData.siteName = ''
+ }
+ }).catch(error => {
+ console.error(error);
+ this.$message.error('校验失败,请重试');
+ this.tempData.siteName = '';
+ });
+ }else {
+ this.tempData.siteName = ''
+ }
+ },
// ======== 导出相关方法 ========
/**
* 导出excel
@@ -1282,6 +1312,26 @@ export default {
},
partUpload () {
+ let inData = {
+ tagno: 93,
+ conditionSql: " and SiteID = '" + this.tempData.site + "'"
+ }
+ verifyData(inData).then(({data}) => {
+ if (data && data.code === 0) {
+ if (data.baseListData.length > 0) {
+ this.tempData.siteName = data.baseListData[0].SiteName
+ } else {
+ this.tempData.siteName = ''
+ }
+ } else {
+ this.$message.warning(data.msg)
+ this.tempData.siteName = ''
+ }
+ }).catch(error => {
+ console.error(error);
+ this.$message.error('校验失败,请重试');
+ this.tempData.siteName = '';
+ });
this.visible = true
},
@@ -1708,7 +1758,8 @@ export default {
Site
-
+
+
Download file template
@@ -1764,6 +1815,6 @@ export default {