|
|
|
@ -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 { |
|
|
|
<span slot="label" style="" class="big-label"> |
|
|
|
<a herf="#" @click="getBaseList(93)">Site</a> |
|
|
|
</span> |
|
|
|
<el-input v-model="tempData.site" style="width: 130px"></el-input> |
|
|
|
<el-input v-model="tempData.site" @blur="siteBlur(93)" style="width: 50px"></el-input> |
|
|
|
<el-input v-model="tempData.siteName" disabled style="width: 130px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label=" "> |
|
|
|
<el-button type="primary" @click="downloadFile()">Download file template</el-button> |
|
|
|
@ -1764,6 +1815,6 @@ export default { |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
.big-label { |
|
|
|
font-size: medium; /* 调整字号 */ |
|
|
|
font-size: small /* 调整字号 */ |
|
|
|
} |
|
|
|
</style> |