Browse Source

2025-05-16

master
fengyuan_yang 8 months ago
parent
commit
a2f065b334
  1. 7
      src/api/changeManagement/changeManagement.js
  2. 143
      src/views/modules/changeManagement/changeRecord.vue
  3. 6
      src/views/modules/project/projectInfo/com_project_technicalSpecification.vue

7
src/api/changeManagement/changeManagement.js

@ -242,6 +242,13 @@ export const choosePartNoList = data => createAPI(`/plm/changeManagement/chooseP
*/ */
export const tpExecute = data => createAPI(`/plm/changeManagement/tpExecute`,'post',data) export const tpExecute = data => createAPI(`/plm/changeManagement/tpExecute`,'post',data)
/**
* 会签执行
* @param data
* @returns {*}
*/
export const csExecute = data => createAPI(`/plm/changeManagement/csExecute`,'post',data)

143
src/views/modules/changeManagement/changeRecord.vue

@ -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, // sitebu getBuBySite, // sitebu
@ -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
})
})
}, },
// //

6
src/views/modules/project/projectInfo/com_project_technicalSpecification.vue

@ -36,7 +36,7 @@
:min-width="item.columnWidth" :min-width="item.columnWidth"
:label="item.columnLabel"> :label="item.columnLabel">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="item.columnProp === 'codeNo'">
<div v-if="item.columnProp === 'oriCodeNo'">
<el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="handleClick(scope.row)"> {{ scope.row[item.columnProp] }}</el-link> <el-link style="cursor:pointer;" v-if="!item.columnHidden" @click="handleClick(scope.row)"> {{ scope.row[item.columnProp] }}</el-link>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>
</div> </div>
@ -89,10 +89,10 @@
{ {
userId: this.$store.state.user.name, userId: this.$store.state.user.name,
functionId: 101002001, functionId: 101002001,
serialNumber: '101002001Table9CodeNo',
serialNumber: '101002001Table9OriCodeNo',
tableId: "101002001Table9", tableId: "101002001Table9",
tableName: "技术参数卡列表", tableName: "技术参数卡列表",
columnProp: "codeNo",
columnProp: "oriCodeNo",
headerAlign: "center", headerAlign: "center",
align: "left", align: "left",
columnLabel: "参数卡编码", columnLabel: "参数卡编码",

Loading…
Cancel
Save