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

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 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==-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="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="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> <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> </template>
@ -326,7 +327,7 @@
</el-table> </el-table>
<div slot="footer" class="dialog-footer"> <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> <el-button @click="dialogPreDeleteShow = false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -383,6 +384,7 @@ export default {
fkList:[],// fkList:[],//
aiList:[],// AI aiList:[],// AI
selectOID: '', selectOID: '',
selectOSTATE:'',
defaultProps: { defaultProps: {
value: 'id', value: 'id',
children: 'nodes', children: 'nodes',
@ -620,11 +622,11 @@ export default {
}).catch(() => { }).catch(() => {
}) })
}, },
handlePreForceDelete(id){ handlePreForceDelete(row){
this.dialogPreDeleteShow = true this.dialogPreDeleteShow = true
requestFN( requestFN(
'/outsourced/preForceDelete', '/outsourced/preForceDelete',
{ OUTSOURCED_ID: id } { OUTSOURCED_ID: row.OUTSOURCED_ID }
).then((data) => { ).then((data) => {
this.inspectList = data.inspectList // this.inspectList = data.inspectList //
this.zgList = data.zgList // this.zgList = data.zgList //
@ -632,12 +634,14 @@ export default {
this.cfList = data.cfList // this.cfList = data.cfList //
this.fkList = data.fkList // this.fkList = data.fkList //
this.aiList = data.aiList // AI this.aiList = data.aiList // AI
this.selectOID = id this.selectOID = row.OUTSOURCED_ID
this.selectOSTATE = row.STATE
}).catch((e) => { }).catch((e) => {
}) })
}, },
// //
forceDelete(){ forceJie(){
if (!this.selectOID) { if (!this.selectOID) {
this.$message('请勿重复点击', { this.$message('请勿重复点击', {
confirmButtonText: '确定', confirmButtonText: '确定',
@ -645,21 +649,23 @@ export default {
}) })
} }
// --- // ---
this.$confirm('确定要删除所有关联吗?', { this.$confirm('确定要结束该重点工程吗?', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
requestFN( requestFN(
'/outsourced/forceDelete', '/outsourced/forceJie',
{OUTSOURCED_ID: this.selectOID} {OUTSOURCED_ID: this.selectOID}
).then((data) => { ).then((data) => {
this.dialogPreDeleteShow = false this.dialogPreDeleteShow = false
this.selectOID = '' this.selectOID = ''
this.selectOSTATE = ''
this.getList() this.getList()
this.$forceUpdate() this.$forceUpdate()
}).catch((e) => { }).catch((e) => {
this.selectOID = '' this.selectOID = ''
this.selectOSTATE = ''
}) })
}).catch(() => { }).catch(() => {