diff --git a/src/views/modules/eam/com_eam_object_add_update.vue b/src/views/modules/eam/com_eam_object_add_update.vue
index f37485a..37194ed 100644
--- a/src/views/modules/eam/com_eam_object_add_update.vue
+++ b/src/views/modules/eam/com_eam_object_add_update.vue
@@ -53,7 +53,8 @@
供应商
-
+
+
@@ -115,6 +116,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -292,7 +345,19 @@ export default {
calibrationEnableFlag: 'N',
calibrationPeriod: undefined,
lastCalibrationDate: '',
- nextCalibrationDate: ''
+ nextCalibrationDate: '',
+ workshop: '',
+ contactMethod: '',
+ warrantyStartDate: '',
+ warrantyEndDate: '',
+ warrantyExpiredFlag: 'N',
+ voltage: '',
+ currentA: '',
+ powerKw: '',
+ totalSize: '',
+ splitSize: '',
+ totalWeight: '',
+ splitModuleWeight: ''
},
dataListLoading: false,
rules:{
@@ -361,6 +426,12 @@ export default {
// 当前分类是否为委外校正设备
isOutsourceCalibrationDevice () {
return this.pageData.familyDesc != null && this.pageData.familyDesc.indexOf('委外校正设备') !== -1
+ },
+ // 当前BU是否为RFID
+ isRfidBu () {
+ const bu = this.pageData.bu == null ? '' : String(this.pageData.bu)
+ const buNo = this.pageData.buNo == null ? '' : String(this.pageData.buNo)
+ return bu.indexOf('RFID') !== -1 || buNo.indexOf('RFID') !== -1
}
},
methods: {
@@ -391,6 +462,45 @@ export default {
this.pageData.calibrationPeriod = undefined
}
},
+ normalizeRfidConfig () {
+ if (!this.isRfidBu) {
+ this.pageData.workshop = ''
+ this.pageData.contactMethod = ''
+ this.pageData.warrantyStartDate = ''
+ this.pageData.warrantyEndDate = ''
+ this.pageData.warrantyExpiredFlag = 'N'
+ this.pageData.voltage = ''
+ this.pageData.currentA = ''
+ this.pageData.powerKw = ''
+ this.pageData.totalSize = ''
+ this.pageData.splitSize = ''
+ this.pageData.totalWeight = ''
+ this.pageData.splitModuleWeight = ''
+ return
+ }
+ this.pageData.warrantyExpiredFlag = this.pageData.warrantyExpiredFlag === 'Y' ? 'Y' : 'N'
+ },
+ initRfidFieldDefaults () {
+ const ensureReactiveField = (fieldName, defaultValue) => {
+ const currentValue = this.pageData[fieldName]
+ if (currentValue === undefined || currentValue === null) {
+ this.$set(this.pageData, fieldName, defaultValue)
+ }
+ }
+ ensureReactiveField('workshop', '')
+ ensureReactiveField('contactMethod', '')
+ ensureReactiveField('warrantyStartDate', '')
+ ensureReactiveField('warrantyEndDate', '')
+ ensureReactiveField('warrantyExpiredFlag', 'N')
+ ensureReactiveField('voltage', '')
+ ensureReactiveField('currentA', '')
+ ensureReactiveField('powerKw', '')
+ ensureReactiveField('totalSize', '')
+ ensureReactiveField('splitSize', '')
+ ensureReactiveField('totalWeight', '')
+ ensureReactiveField('splitModuleWeight', '')
+ this.pageData.warrantyExpiredFlag = this.pageData.warrantyExpiredFlag === 'Y' ? 'Y' : 'N'
+ },
// 日期显示格式化
formatDateValue (value) {
if (value == null || value === '') {
@@ -407,6 +517,21 @@ export default {
let day = (date.getDate() + '').padStart(2, '0')
return `${date.getFullYear()}-${month}-${day}`
},
+ getSupplierPhone (supplierData) {
+ if (supplierData == null) {
+ return ''
+ }
+ if (supplierData.Phone != null && supplierData.Phone !== '') {
+ return supplierData.Phone
+ }
+ if (supplierData.phone != null && supplierData.phone !== '') {
+ return supplierData.phone
+ }
+ if (supplierData.contactMethod != null && supplierData.contactMethod !== '') {
+ return supplierData.contactMethod
+ }
+ return ''
+ },
addDeviceManager(){
this.detailData.bu = this.pageData.bu
//查询角色列表
@@ -474,6 +599,8 @@ export default {
//重置人员信息
this.pageData.username = this.userId
this.handleCalibrationFamilyChange()
+ this.initRfidFieldDefaults()
+ this.normalizeRfidConfig()
},
// 保存标签自定义的信息
@@ -522,6 +649,7 @@ export default {
this.pageData.calibrationEnableFlag = 'N'
this.pageData.calibrationPeriod = undefined
}
+ this.normalizeRfidConfig()
this.pageData.mesType = this.pageData.mesTypeList.join(',')
for (let i = 0; i < this.pageData.mesType.length; i++) {
if(this.pageData.mesType[i] == 'D'){
@@ -609,6 +737,7 @@ export default {
//设置参数
this.pageData.supplierID = val.SupplierID;
this.$set(this.pageData,'supplierName',val.SupplierName)
+ this.$set(this.pageData,'contactMethod', this.getSupplierPhone(val))
} else if (this.tagNo === 30) {
//设置参数
this.pageData.manufacturerID = val.ManufacturerID;
diff --git a/src/views/modules/partspare/coreSparePartsManagemen.vue b/src/views/modules/partspare/coreSparePartsManagemen.vue
index 82cabdb..6a71e1b 100644
--- a/src/views/modules/partspare/coreSparePartsManagemen.vue
+++ b/src/views/modules/partspare/coreSparePartsManagemen.vue
@@ -125,6 +125,14 @@
:fixed="item.fixed==''?false:item.fixed"
:min-width="item.columnWidth"
:label="item.columnLabel">
+
+
+ {{ shouldShowTimeDiffMonths(scope.row) ? scope.row[item.columnProp] : '' }}
+
+
+ {{ scope.row[item.columnProp] }}
+
+
@@ -1076,6 +1084,10 @@ export default {
}
}
},
+ shouldShowTimeDiffMonths(row) {
+ const onOffStatus = row && row.onOffStatus ? String(row.onOffStatus) : ''
+ return onOffStatus.indexOf('上机') === -1
+ },
// 获取数据列表
getDataList () {