|
|
|
@ -374,7 +374,15 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" :model="modalData"> |
|
|
|
<el-form-item label="材料描述/Material Desc." style="display: block;"> |
|
|
|
<el-form-item style="display: block;"> |
|
|
|
<template slot="label"> |
|
|
|
<span>材料描述/Material Desc.</span> |
|
|
|
<el-button |
|
|
|
v-if="authMaterialDescRemark" |
|
|
|
style="margin-left: 2px;width: 83px;line-height: 0.5;font-size: 10px;" |
|
|
|
type="primary" |
|
|
|
@click="openRohsMaterialDescDialog">编辑</el-button> |
|
|
|
</template> |
|
|
|
<el-input type="textarea" :rows="3" v-model="modalData.materialDesc" :disabled="isRohsFieldDisabled('materialDesc')" resize="none" style="width: 804px;height: 30px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
@ -1280,6 +1288,26 @@ |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog width="700px" title="材料描述" :close-on-click-modal="false" :visible.sync="rohsMaterialDescFlag" v-drag> |
|
|
|
<el-form label-position="top"> |
|
|
|
<el-form-item label="材料描述"> |
|
|
|
<el-input |
|
|
|
type="textarea" |
|
|
|
v-model="rohsMaterialDescForm.materialDesc" |
|
|
|
: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="refreshRohsMaterialDesc">刷新</el-button> |
|
|
|
<el-button type="primary" @click="saveRohsMaterialDesc">保存</el-button> |
|
|
|
<el-button type="primary" @click="rohsMaterialDescFlag = 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-tab-pane label="基本信息" name="basicInfo"> |
|
|
|
@ -1635,6 +1663,7 @@ export default { |
|
|
|
authFileRemove: false, |
|
|
|
authFilePreview: false, |
|
|
|
authDataEntry: false, |
|
|
|
authMaterialDescRemark: false, |
|
|
|
authDelete: false, |
|
|
|
superAdmin: false, |
|
|
|
createBy2: this.$store.state.user.name, |
|
|
|
@ -2102,11 +2131,15 @@ export default { |
|
|
|
showModalFlag: false, |
|
|
|
submitModalFlag: false, |
|
|
|
rohsRemarkFlag: false, |
|
|
|
rohsMaterialDescFlag: false, |
|
|
|
rejectOpinion: '', |
|
|
|
submitLoading: false, |
|
|
|
rohsRemarkForm: { |
|
|
|
remark: '' |
|
|
|
}, |
|
|
|
rohsMaterialDescForm: { |
|
|
|
materialDesc: '' |
|
|
|
}, |
|
|
|
hsfStandardDefaultText: 'With the follow environmental specification: Macallan regulated Substances specification(069-0135) /Macallan sustainable fiber specification(099-00532)', |
|
|
|
modalData: { |
|
|
|
site: 'DEFAULT', |
|
|
|
@ -2971,6 +3004,57 @@ export default { |
|
|
|
this.$message.error('保存失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
openRohsMaterialDescDialog () { |
|
|
|
this.$set(this.rohsMaterialDescForm, 'materialDesc', this.modalData.materialDesc || '') |
|
|
|
this.rohsMaterialDescFlag = true |
|
|
|
}, |
|
|
|
refreshRohsMaterialDesc () { |
|
|
|
if (!this.hasPersistedRohsRecord()) { |
|
|
|
this.$set(this.rohsMaterialDescForm, 'materialDesc', this.modalData.materialDesc || '') |
|
|
|
return |
|
|
|
} |
|
|
|
api.getRohsDetail(this.modalData.site, this.modalData.referenceNo).then(({data}) => { |
|
|
|
if (data && data.code === 0 && data.data) { |
|
|
|
this.$set(this.rohsMaterialDescForm, 'materialDesc', data.data.materialDesc || '') |
|
|
|
} else { |
|
|
|
this.$message.error((data && data.msg) || '刷新失败') |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('刷新失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveRohsMaterialDesc () { |
|
|
|
const materialDesc = this.rohsMaterialDescForm.materialDesc || '' |
|
|
|
if (!this.hasPersistedRohsRecord()) { |
|
|
|
this.$set(this.modalData, 'materialDesc', materialDesc) |
|
|
|
this.rohsMaterialDescFlag = false |
|
|
|
this.$message.success('暂存成功,保存单据后写入数据库') |
|
|
|
return |
|
|
|
} |
|
|
|
const params = { |
|
|
|
site: this.modalData.site, |
|
|
|
referenceNo: this.modalData.referenceNo, |
|
|
|
materialDesc: materialDesc |
|
|
|
} |
|
|
|
api.updateRohsMaterialDesc(params).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$set(this.modalData, 'materialDesc', materialDesc) |
|
|
|
if (this.currentRow && this.currentRow.site === this.modalData.site && this.currentRow.referenceNo === this.modalData.referenceNo) { |
|
|
|
this.$set(this.currentRow, 'materialDesc', materialDesc) |
|
|
|
} |
|
|
|
const target = (this.dataList || []).find(item => item.site === this.modalData.site && item.referenceNo === this.modalData.referenceNo) |
|
|
|
if (target) { |
|
|
|
this.$set(target, 'materialDesc', materialDesc) |
|
|
|
} |
|
|
|
this.rohsMaterialDescFlag = false |
|
|
|
this.$message.success('操作成功') |
|
|
|
} else { |
|
|
|
this.$message.error((data && data.msg) || '保存失败') |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.$message.error('保存失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
loadModalButtonCondition () { |
|
|
|
if (!this.modalData.site || !this.modalData.referenceNo || this.modalData.status !== '审批中') { |
|
|
|
this.$set(this.modalData, 'createBy2', '') |
|
|
|
@ -3020,6 +3104,7 @@ export default { |
|
|
|
this.authFileRemove = this.isAuth(this.menuId+":fileRemove") |
|
|
|
this.authFilePreview = this.isAuth(this.menuId+":filePreview") |
|
|
|
this.authDataEntry = this.isAuth(this.menuId+":dataEntry") |
|
|
|
this.authMaterialDescRemark = this.isAuth(this.menuId + ":materialDescRemark") |
|
|
|
this.authDelete = this.isAuth(this.menuId+":delete") |
|
|
|
}, |
|
|
|
// 校验是否为超级管理员 |
|
|
|
@ -3119,6 +3204,7 @@ export default { |
|
|
|
this.modalFlag = false |
|
|
|
this.rohsCreatePartDialogFlag = false |
|
|
|
this.rohsCharacteristicDialogFlag = false |
|
|
|
this.rohsMaterialDescFlag = false |
|
|
|
this.rohsCreatePartTab = 'General' |
|
|
|
this.$nextTick(() => { |
|
|
|
this.refreshAttachmentPanels() |
|
|
|
@ -3439,10 +3525,14 @@ export default { |
|
|
|
this.activeName = 'basicInfo' |
|
|
|
this.submitModalFlag = false |
|
|
|
this.rohsRemarkFlag = false |
|
|
|
this.rohsMaterialDescFlag = false |
|
|
|
this.rejectOpinion = '' |
|
|
|
this.rohsRemarkForm = { |
|
|
|
remark: '' |
|
|
|
} |
|
|
|
this.rohsMaterialDescForm = { |
|
|
|
materialDesc: '' |
|
|
|
} |
|
|
|
this.projectMaterialDialogFlag = false |
|
|
|
this.rohsCreatePartDialogFlag = false |
|
|
|
this.rohsCreatePartLoading = false |
|
|
|
|