|
|
|
@ -11,6 +11,8 @@ |
|
|
|
<el-button type="primary" @click="refreshBMPageModal()" v-if="!ifDisableFlag">更新模板</el-button> |
|
|
|
<el-button type="primary" @click="searchTable()" >刷新数据</el-button> |
|
|
|
<el-button type="primary" @click="saveTable()" v-if="!ifDisableFlag">保存数据</el-button> |
|
|
|
<el-button v-if="baseForm.status === 'spz'&&!ifDisableFlag" type="primary" @click="agreeSubmit">同意</el-button> |
|
|
|
<el-button v-if="baseForm.status === 'spz' && baseForm.isReject === 'Y' &&!ifDisableFlag" type="primary" @click="rejectSubmit">驳回</el-button> |
|
|
|
</el-form-item> |
|
|
|
<div class="rq "> |
|
|
|
<el-table |
|
|
|
@ -51,10 +53,10 @@ |
|
|
|
min-width="400" |
|
|
|
label="值"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px ;width:98%" allow-create></el-input> |
|
|
|
<div v-if="scope.row.valueTypeDb === 'S'&&scope.row.valueChooseFlag === 'N'"><el-input v-model="scope.row.textValue" style="height: 11px;padding: 0px ;width:98%" allow-create></el-input></div> |
|
|
|
<el-input v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.numValue" type="number" style="height: 11px;padding: 0px;width:98%" allow-create></el-input> |
|
|
|
<el-select v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create> |
|
|
|
<el-input v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.textValue" style="height: 11px;padding: 0px ;width:98%" allow-create :disabled="ifDisableFlag" ></el-input> |
|
|
|
<div v-if="scope.row.valueTypeDb === 'S'&&scope.row.valueChooseFlag === 'N'"><el-input v-model="scope.row.textValue" style="height: 11px;padding: 0px ;width:98%" allow-create :disabled="ifDisableFlag"></el-input></div> |
|
|
|
<el-input v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'N'" v-model="scope.row.numValue" type="number" style="height: 11px;padding: 0px;width:98%" allow-create :disabled="ifDisableFlag"></el-input> |
|
|
|
<el-select v-if="scope.row.valueTypeDb === 'T'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create :disabled="ifDisableFlag"> |
|
|
|
<el-option |
|
|
|
v-for="item in scope.row.availableValueList" |
|
|
|
:key="index" |
|
|
|
@ -62,7 +64,7 @@ |
|
|
|
:value="item.availableValue"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-select v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.numValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create> |
|
|
|
<el-select v-if="scope.row.valueTypeDb === 'N'&&scope.row.valueChooseFlag === 'Y'" v-model="scope.row.numValue" placeholder="请选择" style="height: 11px;padding: 0px " allow-create :disabled="ifDisableFlag"> |
|
|
|
<el-option |
|
|
|
v-for="item in scope.row.availableValueList" |
|
|
|
:key="index" |
|
|
|
@ -70,7 +72,7 @@ |
|
|
|
:value="item.availableValue"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<div v-if="scope.row.valueTypeDb === 'S'&&scope.row.valueChooseFlag === 'Y'"> <el-select v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px ;width:98%" allow-create> |
|
|
|
<div v-if="scope.row.valueTypeDb === 'S'&&scope.row.valueChooseFlag === 'Y'"> <el-select v-model="scope.row.textValue" placeholder="请选择" style="height: 11px;padding: 0px ;width:98%" allow-create :disabled="ifDisableFlag"> |
|
|
|
<el-option |
|
|
|
v-for="item in scope.row.availableValueList" |
|
|
|
:key="index" |
|
|
|
@ -95,8 +97,12 @@ |
|
|
|
refreshBMPageModal, |
|
|
|
searchBMPropertiesHeaderForBM, |
|
|
|
checkUrl, |
|
|
|
tsdBasicInformationSearch, |
|
|
|
submitChange, // 提交 |
|
|
|
} from "@/api/sampleManagement/technicalSpecificationList.js" |
|
|
|
|
|
|
|
import { |
|
|
|
getNodeAuthority, // 获取节点权限 |
|
|
|
} from '@/api/changeManagement/changeManagement.js' |
|
|
|
export default { |
|
|
|
components: { |
|
|
|
|
|
|
|
@ -113,10 +119,15 @@ |
|
|
|
buNo:'', |
|
|
|
type:'', |
|
|
|
propertiesCodeNo:'', |
|
|
|
fieldId:'', |
|
|
|
}, |
|
|
|
type:'prepress', |
|
|
|
ifDisableFlag:false, |
|
|
|
tableData:[], |
|
|
|
baseForm:{ |
|
|
|
status:'', |
|
|
|
isReject:'', |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
@ -151,6 +162,10 @@ |
|
|
|
// this.searchData.propertiesCodeNo = data.row.propertiesCodeNo; |
|
|
|
this.$set(this.searchData, 'propertiesCodeNo', data.row.propertiesCodeNo); |
|
|
|
}); |
|
|
|
tsdBasicInformationSearch(this.searchData).then(({data}) => { |
|
|
|
this.baseForm=data.row; |
|
|
|
this.getNodeAuthority(data.row) |
|
|
|
}) |
|
|
|
}, |
|
|
|
refreshBMPageModal(){ |
|
|
|
this.$confirm(`是否刷新至最新模板界面,已填数据会更新到新模板中,若旧属性在新模板中被删除,该条数据会消失。`, '提示', { |
|
|
|
@ -218,6 +233,86 @@ |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
// 获取流程的配置权限 |
|
|
|
getNodeAuthority (row) { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
let tempData = { |
|
|
|
site: row.site, |
|
|
|
stepId: row.stepId, |
|
|
|
menuId: '103002' |
|
|
|
} |
|
|
|
getNodeAuthority(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
let plmStepRoleBaseBm = data.rows.plm_stepRole_base_bm |
|
|
|
let arr = plmStepRoleBaseBm.filter(a => a.fieldId === this.searchData.fieldId) |
|
|
|
if (arr.length > 0) { |
|
|
|
if (arr[0].updateFlag === 'N') { |
|
|
|
this.ifDisableFlag = true |
|
|
|
} else { |
|
|
|
this.ifDisableFlag = false |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.ifDisableFlag = true |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 同意提交 |
|
|
|
agreeSubmit () { |
|
|
|
this.$confirm(`是否确认提交?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let tempData = { |
|
|
|
site: this.searchData.site, |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
codeNo: this.searchData.codeNo, |
|
|
|
menuId: '103002', |
|
|
|
nodeConclusion: 'Y' |
|
|
|
} |
|
|
|
this.submitData(tempData) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 驳回提交 |
|
|
|
rejectSubmit () { |
|
|
|
this.$confirm(`是否确认驳回?`, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
let tempData = { |
|
|
|
site: this.searchData.site, |
|
|
|
userName: this.$store.state.user.name, |
|
|
|
codeNo: this.searchData.codeNo, |
|
|
|
menuId: '103002', |
|
|
|
nodeConclusion: 'N' |
|
|
|
} |
|
|
|
this.submitData(tempData) |
|
|
|
}) |
|
|
|
}, |
|
|
|
submitData (tempData) { |
|
|
|
|
|
|
|
saveBMPropertiesValue(this.tableData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
submitChange(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message({message: '操作成功', type: 'success'}) |
|
|
|
this.$emit("closeModel") |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|
|