|
|
@ -598,16 +598,16 @@ |
|
|
<el-input :disabled="changeCountersignatureItemFlag('itemRemark') === 'N'" v-model="scope.row.itemRemark" style="width:98%"></el-input> |
|
|
<el-input :disabled="changeCountersignatureItemFlag('itemRemark') === 'N'" v-model="scope.row.itemRemark" style="width:98%"></el-input> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<!-- <el-table-column--> |
|
|
|
|
|
<!-- fixed="right"--> |
|
|
|
|
|
<!-- header-align="center"--> |
|
|
|
|
|
<!-- align="center"--> |
|
|
|
|
|
<!-- width="60"--> |
|
|
|
|
|
<!-- label="操作">--> |
|
|
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
|
|
<!-- <el-link v-if="scope.row.executeFlag !== 'Y'" style="cursor: pointer" @click="executeCSModal(scope.row)">执行</el-link>--> |
|
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
<!-- </el-table-column>--> |
|
|
|
|
|
|
|
|
<el-table-column |
|
|
|
|
|
fixed="right" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="center" |
|
|
|
|
|
width="60" |
|
|
|
|
|
label="操作"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-link v-if="scope.row.executeFlag !== 'Y' && $store.state.user.name === scope.row.itemDesc && modalData.changeStatus === '审批中'" style="cursor: pointer" @click="executeCSModal(scope.row)">执行</el-link> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -1303,7 +1303,8 @@ |
|
|
countersignatureUpdate, // 编辑会签信息 |
|
|
countersignatureUpdate, // 编辑会签信息 |
|
|
issueChange, // 下达 |
|
|
issueChange, // 下达 |
|
|
submitChange, // 提交 |
|
|
submitChange, // 提交 |
|
|
tpExecute, // 执行 |
|
|
|
|
|
|
|
|
tpExecute, // TP执行 |
|
|
|
|
|
csExecute, // 会签执行 |
|
|
getNodeAuthority, // 获取节点权限 |
|
|
getNodeAuthority, // 获取节点权限 |
|
|
getApprovalList, // 查询审批信息 |
|
|
getApprovalList, // 查询审批信息 |
|
|
getBuBySite, // 根据site查bu |
|
|
getBuBySite, // 根据site查bu |
|
|
@ -4353,9 +4354,123 @@ |
|
|
|
|
|
|
|
|
// 执行所选属性 |
|
|
// 执行所选属性 |
|
|
executeCSModal (row) { |
|
|
executeCSModal (row) { |
|
|
row.executeFlag = 'Y' |
|
|
|
|
|
row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') |
|
|
|
|
|
row.executor = this.$store.state.user.name |
|
|
|
|
|
|
|
|
this.$confirm(`是否确认提交?`, '提示', { |
|
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
|
type: 'warning' |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
if (this.plmChangeRequestArr) { // 主信息 |
|
|
|
|
|
for (let i = 0; i < this.plmChangeRequestArr.length; i++) { |
|
|
|
|
|
if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') { |
|
|
|
|
|
this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (this.plmChangeRequestDetailArr) { // 所选技术参数卡 |
|
|
|
|
|
for (let i = 0; i < this.plmChangeRequestDetailArr.length; i++) { |
|
|
|
|
|
// 判断集合中的该属性是否都有值 |
|
|
|
|
|
let val = this.chooseDataList.every(item => { |
|
|
|
|
|
const value = item[this.plmChangeRequestDetailArr[i].fieldId] |
|
|
|
|
|
return value !== null && value !== '' |
|
|
|
|
|
}) |
|
|
|
|
|
// 如果没有值 且该字段为必填 |
|
|
|
|
|
if (!val && this.plmChangeRequestDetailArr[i].required === 'Y') { |
|
|
|
|
|
this.$message.warning(this.plmChangeRequestDetailArr[i].fieldName + '不能为空!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (this.plmChangeCostImpactArr) { // 库存成本影响 |
|
|
|
|
|
for (let i = 0; i < this.plmChangeCostImpactArr.length; i++) { |
|
|
|
|
|
if (!this.costImpactData[this.plmChangeCostImpactArr[i].fieldId] && this.plmChangeCostImpactArr[i].required === 'Y') { |
|
|
|
|
|
this.$message.warning(this.plmChangeCostImpactArr[i].fieldName + '不能为空!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (this.plmChangeFAItemArr) { // 评估信息 |
|
|
|
|
|
for (let i = 0; i < this.plmChangeFAItemArr.length; i++) { |
|
|
|
|
|
let val = this.chooseItemList2.every(item => { |
|
|
|
|
|
const value = item[this.plmChangeFAItemArr[i].fieldId] |
|
|
|
|
|
return value !== null && value !== '' |
|
|
|
|
|
}) |
|
|
|
|
|
if (!val && this.plmChangeFAItemArr[i].required === 'Y') { |
|
|
|
|
|
this.$message.warning(this.plmChangeFAItemArr[i].fieldName + '不能为空!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (this.plmChangeExecutionInfoArr) { |
|
|
|
|
|
for (let i = 0; i < this.plmChangeExecutionInfoArr.length; i++) { |
|
|
|
|
|
if (!this.executionInfoData[this.plmChangeExecutionInfoArr[i].fieldId] && this.plmChangeExecutionInfoArr[i].required === 'Y') { |
|
|
|
|
|
this.$message.warning(this.plmChangeExecutionInfoArr[i].fieldName + '不能为空!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (this.plmChangeItemArr) { // 执行信息 |
|
|
|
|
|
for (let i = 0; i < this.plmChangeItemArr.length; i++) { |
|
|
|
|
|
let val = this.chooseItemList.every(item => { |
|
|
|
|
|
const value = item[this.plmChangeItemArr[i].fieldId] |
|
|
|
|
|
return value !== null && value !== '' |
|
|
|
|
|
}) |
|
|
|
|
|
if (!val && this.plmChangeItemArr[i].required === 'Y') { |
|
|
|
|
|
this.$message.warning(this.plmChangeItemArr[i].fieldName + '不能为空!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (this.plmChangeCountersignatureItemArr) { // 会签信息 |
|
|
|
|
|
for (let i = 0; i < this.plmChangeCountersignatureItemArr.length; i++) { |
|
|
|
|
|
let val = this.currentChooseCSItemList.every(item => { |
|
|
|
|
|
const value = item[this.plmChangeCountersignatureItemArr[i].fieldId] |
|
|
|
|
|
return value !== null && value !== '' |
|
|
|
|
|
}) |
|
|
|
|
|
if (!val && this.plmChangeCountersignatureItemArr[i].required === 'Y') { |
|
|
|
|
|
this.$message.warning(this.plmChangeCountersignatureItemArr[i].fieldName + '不能为空!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (this.chooseDataList.length === 0) { |
|
|
|
|
|
this.$message.warning('请添加需要变更的技术参数卡!') |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
row.executeFlag = 'Y' |
|
|
|
|
|
row.itemExecutionDate = new Date(+ new Date() + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') |
|
|
|
|
|
this.costImpactData.changeTotalCost = this.totalCost |
|
|
|
|
|
this.executionInfoData.chooseItemList = this.chooseItemList |
|
|
|
|
|
this.executionInfoData.chooseItemList2 = this.chooseItemList2 |
|
|
|
|
|
this.countersignatureData.changeNo = this.modalData.changeNo |
|
|
|
|
|
this.countersignatureData.chooseCSItemList = this.chooseCSItemList |
|
|
|
|
|
this.modalData.userName = this.$store.state.user.name |
|
|
|
|
|
this.modalData.menuId = this.$route.meta.menuId |
|
|
|
|
|
this.modalData.detailList = this.chooseDataList |
|
|
|
|
|
this.modalData.ecnTypeData = this.form |
|
|
|
|
|
this.modalData.costImpactData = this.costImpactData |
|
|
|
|
|
this.modalData.executionInfoData = this.executionInfoData |
|
|
|
|
|
this.modalData.countersignatureData = this.countersignatureData |
|
|
|
|
|
this.modalData.nodeConclusion = 'Y' |
|
|
|
|
|
this.submitLoading = true |
|
|
|
|
|
csExecute(this.modalData).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.getDataList() |
|
|
|
|
|
this.$message({message: '操作成功', type: 'success'}) |
|
|
|
|
|
this.submitModalFlag = false |
|
|
|
|
|
this.modalFlag = false |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
row.executeFlag = '' |
|
|
|
|
|
row.itemExecutionDate = '' |
|
|
|
|
|
} |
|
|
|
|
|
this.submitLoading = false |
|
|
|
|
|
}).catch(()=>{ |
|
|
|
|
|
this.submitLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 执行所选属性 |
|
|
// 执行所选属性 |
|
|
|