重点工程 - 强制结束重点工程(不删除对应关联)

hyx_2024-9-29_tongbu
water_xu 2024-09-05 09:55:49 +08:00
parent e156a96acc
commit 8e0fea9f30
1 changed files with 14 additions and 8 deletions

View File

@ -159,7 +159,8 @@
<el-button type="success" icon="el-icon-view" size="mini" @click="goDetail(row.OUTSOURCED_ID)"></el-button>
<el-button v-if="row.CREATOR==userInfoUserId && row.STATE==-1" type="success" icon="el-icon-view" size="mini" @click="handleState(row.OUTSOURCED_ID)"></el-button>
<el-button v-if="row.CREATOR==userInfoUserId && row.STATE==-2" type="success" icon="el-icon-view" size="mini" @click="handleJie(row.OUTSOURCED_ID)"></el-button>
<el-button v-if="1 == row.STATE" type="danger" icon="el-icon-delete" size="mini" @click="handlePreForceDelete(row.OUTSOURCED_ID)"></el-button>
<el-button v-if="1 == row.STATE" type="danger" icon="el-icon-delete" size="mini" @click="handlePreForceDelete(row)"></el-button>
<el-button v-if="2 == row.STATE" type="success" icon="el-icon-view" size="mini" @click="handlePreForceDelete(row)"></el-button>
<el-button v-show="edit" v-if="0 === row.IS_CORP_TYPE" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.OUTSOURCED_ID)"></el-button>
<el-button v-show="del" v-if="0 === row.IS_CORP_TYPE" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.OUTSOURCED_ID)"></el-button>
</template>
@ -326,7 +327,7 @@
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="forceDelete" type="danger" icon="el-icon-delete">强制删除并结束</el-button>
<el-button v-if="selectOSTATE == 1" @click="forceJie" type="danger" icon="el-icon-delete"></el-button>
<el-button @click="dialogPreDeleteShow = false"> </el-button>
</div>
</el-dialog>
@ -383,6 +384,7 @@ export default {
fkList:[],//
aiList:[],// AI
selectOID: '',
selectOSTATE:'',
defaultProps: {
value: 'id',
children: 'nodes',
@ -620,11 +622,11 @@ export default {
}).catch(() => {
})
},
handlePreForceDelete(id){
handlePreForceDelete(row){
this.dialogPreDeleteShow = true
requestFN(
'/outsourced/preForceDelete',
{ OUTSOURCED_ID: id }
{ OUTSOURCED_ID: row.OUTSOURCED_ID }
).then((data) => {
this.inspectList = data.inspectList //
this.zgList = data.zgList //
@ -632,12 +634,14 @@ export default {
this.cfList = data.cfList //
this.fkList = data.fkList //
this.aiList = data.aiList // AI
this.selectOID = id
this.selectOID = row.OUTSOURCED_ID
this.selectOSTATE = row.STATE
}).catch((e) => {
})
},
//
forceDelete(){
forceJie(){
if (!this.selectOID) {
this.$message('请勿重复点击', {
confirmButtonText: '确定',
@ -645,21 +649,23 @@ export default {
})
}
// ---
this.$confirm('确定要删除所有关联吗?', {
this.$confirm('确定要结束该重点工程吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/outsourced/forceDelete',
'/outsourced/forceJie',
{OUTSOURCED_ID: this.selectOID}
).then((data) => {
this.dialogPreDeleteShow = false
this.selectOID = ''
this.selectOSTATE = ''
this.getList()
this.$forceUpdate()
}).catch((e) => {
this.selectOID = ''
this.selectOSTATE = ''
})
}).catch(() => {