|
|
@ -240,6 +240,7 @@ |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<el-form-item label=" " style="margin-top: -2px;margin-left: 2px"> |
|
|
<el-form-item label=" " style="margin-top: -2px;margin-left: 2px"> |
|
|
<el-button type="primary" icon="el-icon-upload" @click="uploadDialog = true">上传附件</el-button> |
|
|
<el-button type="primary" icon="el-icon-upload" @click="uploadDialog = true">上传附件</el-button> |
|
|
|
|
|
<el-button type="primary" icon="el-icon-edit-outline" v-if="authDataEntry" @click="openRohsRemarkDialog" style="margin-left: 6px">RoHs备注</el-button> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-form :inline="true" label-position="top" :model="modalData"> |
|
|
<el-form :inline="true" label-position="top" :model="modalData"> |
|
|
@ -554,6 +555,26 @@ |
|
|
</el-footer> |
|
|
</el-footer> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<el-dialog width="700px" title="RoHs备注" :close-on-click-modal="false" :visible.sync="rohsRemarkFlag" v-drag> |
|
|
|
|
|
<el-form label-position="top"> |
|
|
|
|
|
<el-form-item label="RoHs备注"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
type="textarea" |
|
|
|
|
|
v-model="rohsRemarkForm.rohsRemark" |
|
|
|
|
|
:rows="6" |
|
|
|
|
|
maxlength="255" |
|
|
|
|
|
show-word-limit |
|
|
|
|
|
resize="none"> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-footer style="height:35px;margin-top:110px;text-align:center"> |
|
|
|
|
|
<el-button type="primary" @click="refreshRohsRemark">刷新</el-button> |
|
|
|
|
|
<el-button type="primary" @click="saveRohsRemark">保存</el-button> |
|
|
|
|
|
<el-button type="primary" @click="rohsRemarkFlag = false">取消</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 底部附件页签 --> |
|
|
<!-- 底部附件页签 --> |
|
|
<el-tabs v-model="activeTable" style="width: 100%; height: 100%;" type="border-card" @tab-click="refreshCurrentTabTable" class="customer-tab"> |
|
|
<el-tabs v-model="activeTable" style="width: 100%; height: 100%;" type="border-card" @tab-click="refreshCurrentTabTable" class="customer-tab"> |
|
|
<el-tab-pane label="基本信息" name="basicInfo"> |
|
|
<el-tab-pane label="基本信息" name="basicInfo"> |
|
|
@ -848,6 +869,7 @@ export default { |
|
|
authFileDownLoad: false, |
|
|
authFileDownLoad: false, |
|
|
authFileRemove: false, |
|
|
authFileRemove: false, |
|
|
authFilePreview: false, |
|
|
authFilePreview: false, |
|
|
|
|
|
authDataEntry: false, |
|
|
authDelete: false, |
|
|
authDelete: false, |
|
|
superAdmin: false, |
|
|
superAdmin: false, |
|
|
createBy2: this.$store.state.user.name, |
|
|
createBy2: this.$store.state.user.name, |
|
|
@ -1025,8 +1047,12 @@ export default { |
|
|
activeName: 'basicInfo', |
|
|
activeName: 'basicInfo', |
|
|
showModalFlag: false, |
|
|
showModalFlag: false, |
|
|
submitModalFlag: false, |
|
|
submitModalFlag: false, |
|
|
|
|
|
rohsRemarkFlag: false, |
|
|
rejectOpinion: '', |
|
|
rejectOpinion: '', |
|
|
submitLoading: false, |
|
|
submitLoading: false, |
|
|
|
|
|
rohsRemarkForm: { |
|
|
|
|
|
rohsRemark: '' |
|
|
|
|
|
}, |
|
|
modalData: { |
|
|
modalData: { |
|
|
site: 'DEFAULT', |
|
|
site: 'DEFAULT', |
|
|
referenceNo: '', |
|
|
referenceNo: '', |
|
|
@ -1066,6 +1092,7 @@ export default { |
|
|
testReportIncludingItems: '', |
|
|
testReportIncludingItems: '', |
|
|
testReportIncludingItemsList: [], |
|
|
testReportIncludingItemsList: [], |
|
|
remark: '', |
|
|
remark: '', |
|
|
|
|
|
rohsRemark: '', |
|
|
status: '', |
|
|
status: '', |
|
|
sgsReportNumber: '', |
|
|
sgsReportNumber: '', |
|
|
expiredDate: '', |
|
|
expiredDate: '', |
|
|
@ -1328,6 +1355,60 @@ export default { |
|
|
canRejectAction () { |
|
|
canRejectAction () { |
|
|
return this.authReject && this.isCurrentApprover() && this.modalData.status === '审批中' && this.modalData.isReject === 'Y' |
|
|
return this.authReject && this.isCurrentApprover() && this.modalData.status === '审批中' && this.modalData.isReject === 'Y' |
|
|
}, |
|
|
}, |
|
|
|
|
|
hasPersistedRohsRecord () { |
|
|
|
|
|
return !!(this.modalData && this.modalData.site && this.modalData.referenceNo && !String(this.modalData.referenceNo).startsWith('TEMP-')) |
|
|
|
|
|
}, |
|
|
|
|
|
openRohsRemarkDialog () { |
|
|
|
|
|
this.$set(this.rohsRemarkForm, 'rohsRemark', this.modalData.rohsRemark || '') |
|
|
|
|
|
this.rohsRemarkFlag = true |
|
|
|
|
|
}, |
|
|
|
|
|
refreshRohsRemark () { |
|
|
|
|
|
if (!this.hasPersistedRohsRecord()) { |
|
|
|
|
|
this.$set(this.rohsRemarkForm, 'rohsRemark', this.modalData.rohsRemark || '') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
api.getRohsDetail(this.modalData.site, this.modalData.referenceNo).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0 && data.data) { |
|
|
|
|
|
this.$set(this.rohsRemarkForm, 'rohsRemark', data.data.rohsRemark || '') |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error((data && data.msg) || '刷新失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.$message.error('刷新失败') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
saveRohsRemark () { |
|
|
|
|
|
const rohsRemark = this.rohsRemarkForm.rohsRemark || '' |
|
|
|
|
|
if (!this.hasPersistedRohsRecord()) { |
|
|
|
|
|
this.$set(this.modalData, 'rohsRemark', rohsRemark) |
|
|
|
|
|
this.rohsRemarkFlag = false |
|
|
|
|
|
this.$message.success('暂存成功,保存单据后写入数据库') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
const params = { |
|
|
|
|
|
site: this.modalData.site, |
|
|
|
|
|
referenceNo: this.modalData.referenceNo, |
|
|
|
|
|
rohsRemark: rohsRemark |
|
|
|
|
|
} |
|
|
|
|
|
api.updateRohsRemark(params).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.$set(this.modalData, 'rohsRemark', rohsRemark) |
|
|
|
|
|
if (this.currentRow && this.currentRow.site === this.modalData.site && this.currentRow.referenceNo === this.modalData.referenceNo) { |
|
|
|
|
|
this.$set(this.currentRow, 'rohsRemark', rohsRemark) |
|
|
|
|
|
} |
|
|
|
|
|
const target = (this.dataList || []).find(item => item.site === this.modalData.site && item.referenceNo === this.modalData.referenceNo) |
|
|
|
|
|
if (target) { |
|
|
|
|
|
this.$set(target, 'rohsRemark', rohsRemark) |
|
|
|
|
|
} |
|
|
|
|
|
this.rohsRemarkFlag = false |
|
|
|
|
|
this.$message.success('操作成功') |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error((data && data.msg) || '保存失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
this.$message.error('保存失败') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
loadModalButtonCondition () { |
|
|
loadModalButtonCondition () { |
|
|
if (!this.modalData.site || !this.modalData.referenceNo || this.modalData.status !== '审批中') { |
|
|
if (!this.modalData.site || !this.modalData.referenceNo || this.modalData.status !== '审批中') { |
|
|
this.$set(this.modalData, 'createBy2', '') |
|
|
this.$set(this.modalData, 'createBy2', '') |
|
|
@ -1376,6 +1457,7 @@ export default { |
|
|
this.authFileDownLoad = this.isAuth(this.menuId+":fileDownLoad") |
|
|
this.authFileDownLoad = this.isAuth(this.menuId+":fileDownLoad") |
|
|
this.authFileRemove = this.isAuth(this.menuId+":fileRemove") |
|
|
this.authFileRemove = this.isAuth(this.menuId+":fileRemove") |
|
|
this.authFilePreview = this.isAuth(this.menuId+":filePreview") |
|
|
this.authFilePreview = this.isAuth(this.menuId+":filePreview") |
|
|
|
|
|
this.authDataEntry = this.isAuth(this.menuId+":dataEntry") |
|
|
this.authDelete = this.isAuth(this.menuId+":delete") |
|
|
this.authDelete = this.isAuth(this.menuId+":delete") |
|
|
}, |
|
|
}, |
|
|
// 校验是否为超级管理员 |
|
|
// 校验是否为超级管理员 |
|
|
@ -1555,7 +1637,7 @@ export default { |
|
|
this.$message.warning('没有新增权限') |
|
|
this.$message.warning('没有新增权限') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (row && !this.authUpdate) { |
|
|
|
|
|
|
|
|
if (row && !this.authUpdate && !this.authDataEntry) { |
|
|
this.$message.warning('没有编辑权限') |
|
|
this.$message.warning('没有编辑权限') |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
@ -1564,7 +1646,11 @@ export default { |
|
|
this.fileList = [] |
|
|
this.fileList = [] |
|
|
this.uploadDialog = false |
|
|
this.uploadDialog = false |
|
|
this.submitModalFlag = false |
|
|
this.submitModalFlag = false |
|
|
|
|
|
this.rohsRemarkFlag = false |
|
|
this.rejectOpinion = '' |
|
|
this.rejectOpinion = '' |
|
|
|
|
|
this.rohsRemarkForm = { |
|
|
|
|
|
rohsRemark: '' |
|
|
|
|
|
} |
|
|
this.projectMaterialDialogFlag = false |
|
|
this.projectMaterialDialogFlag = false |
|
|
this.projectMaterialSelections = [] |
|
|
this.projectMaterialSelections = [] |
|
|
this.materialSelections = [] |
|
|
this.materialSelections = [] |
|
|
@ -1581,7 +1667,7 @@ export default { |
|
|
finalPartNo: '', |
|
|
finalPartNo: '', |
|
|
customerPartNo: '' |
|
|
customerPartNo: '' |
|
|
} |
|
|
} |
|
|
this.showModalFlag = !!(row && row.status === '已完成') |
|
|
|
|
|
|
|
|
this.showModalFlag = !!(row && (row.status === '已完成' || !this.authUpdate)) |
|
|
|
|
|
|
|
|
if (row) { |
|
|
if (row) { |
|
|
this.modalTitle = 'RoHs 编辑' |
|
|
this.modalTitle = 'RoHs 编辑' |
|
|
@ -1662,6 +1748,7 @@ export default { |
|
|
testReportIncludingItems: '', |
|
|
testReportIncludingItems: '', |
|
|
testReportIncludingItemsList: [], |
|
|
testReportIncludingItemsList: [], |
|
|
remark: '', |
|
|
remark: '', |
|
|
|
|
|
rohsRemark: '', |
|
|
status: '草稿', |
|
|
status: '草稿', |
|
|
sgsReportNumber: '', |
|
|
sgsReportNumber: '', |
|
|
expiredDate: '', |
|
|
expiredDate: '', |
|
|
|