Browse Source

【网格实体化运作】-【验收】-(王童)-2020/12/9

master
Jackwang 5 years ago
parent
commit
945079675d
  1. 46
      src/views/modules/kpi/kpisubpositiondetail.vue
  2. 1
      src/views/modules/kpi/subpositioncheckinfo-acceptance.vue
  3. 6
      src/views/modules/kpi/subpositioncheckinfo.vue

46
src/views/modules/kpi/kpisubpositiondetail.vue

@ -131,15 +131,16 @@
<el-form>
<el-form-item style="margin-left:35px;">
<el-button type="primary" @click="backToUserRelationList">{{"返回"}}</el-button>
<el-button v-if="this.state === '0'" type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
<el-button v-if="state === '2'" type="primary" @click="">初审</el-button>
<el-button v-if="state === '3'" type="primary" @click="">验收</el-button>
<el-button v-if="this.status === '0'" type="primary" :disabled="isAble" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
<el-button v-if="status === '1'" type="primary" @click="firstTrial()">初审</el-button>
<el-button v-if="status === '2'" type="primary" @click="acceptance()">验收</el-button>
</el-form-item>
</el-form>
</div>
<!-- 初审弹框 -->
<trial v-if="trialVisible" ref="subpositioncheckinfoTrial" @refreshDataList="backToUserRelationList"></trial>
<subpositioncheckinfo-trial v-if="trialVisible" ref="subpositioncheckinfoTrial" v-on:connectResponse="connectResponse"></subpositioncheckinfo-trial>
<subpositioncheckinfo-acceptance v-if="acceptanceVisible" ref="subpositioncheckinfoAcceptance" v-on:connectResponse="connectResponse"></subpositioncheckinfo-acceptance>
</el-card>
</template>
@ -148,6 +149,8 @@ import Cookies from "js-cookie";
import debounce from "lodash/debounce";
import MapSelect from "@/views/modules/workRecord/map-select";
import trial from "./subpositioncheckinfo-trial"
import SubpositioncheckinfoTrial from './subpositioncheckinfo-trial'
import SubpositioncheckinfoAcceptance from './subpositioncheckinfo-acceptance'
export default {
name: "kpisubpositiondetail",
@ -159,8 +162,11 @@ export default {
subDetail:[],
files:[],
images: [],
infoId:''
},
options :[],
trialVisible:false,
acceptanceVisible:false,
isAble:false,
pageDisabled:false,
gridIds:[],
@ -179,7 +185,7 @@ export default {
hideUpload: false,
fileloading: false,
checkDiction:[],
state:'0',
status:'0',
//
trialVisible:false,
@ -212,8 +218,8 @@ export default {
methods: {
init () {
this.dataForm.id = this.$route.query.id
this.state = this.$route.query.state === undefined? '0':this.$route.query.state;
if (this.state === '1'){
this.status = this.$route.query.status === undefined? '0':this.$route.query.status;
if (this.status === '1'){
this.isAble = true;
this.pageDisabled = true;
}
@ -235,6 +241,24 @@ export default {
}
})
},
// dialog
connectResponse (connectResponse) {
this.backToUserRelationList()
},
firstTrial () {
this.trialVisible = true
this.$nextTick(() => {
this.$refs.subpositioncheckinfoTrial.dataForm.infoId = this.dataForm.id
this.$refs.subpositioncheckinfoTrial.init()
})
},
acceptance () {
this.acceptanceVisible = true
this.$nextTick(() => {
this.$refs.subpositioncheckinfoAcceptance.dataForm.infoId = this.dataForm.id
this.$refs.subpositioncheckinfoAcceptance.init()
})
},
beforeAvatarUpload (file) {
if (this.dataForm.length === 6) {
this.$message.error('最多上传6张图片!')
@ -375,11 +399,6 @@ export default {
}).catch(() => {})
},
//
trial(){
this.trialVisible = true
},
//
dataFormSubmitHandle: debounce(function () {
//
@ -449,7 +468,8 @@ export default {
},
components: {
MapSelect,
trial
SubpositioncheckinfoTrial,
SubpositioncheckinfoAcceptance
}
}
</script>

1
src/views/modules/kpi/subpositioncheckinfo-acceptance.vue

@ -73,6 +73,7 @@ export default {
init () {
this.visible = true
this.isAble = false
this.checkedItems = []
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.infoId) {

6
src/views/modules/kpi/subpositioncheckinfo.vue

@ -70,8 +70,8 @@
<template slot-scope="scope">
<el-button type="text" size="small" @click="addHandle(scope.row.id,scope.row.status)">{{ '查看' }}</el-button>
<el-button v-if="scope.row.delShow" type="text" size="small" @click="openHandle(scope.row.id)">{{ '修改' }}</el-button>
<el-button v-if="$hasPermission('sub:check:tiral') && scope.row.status==='1'" type="text" size="small" @click="firstTrial(scope.row.id)">{{ '初审' }}</el-button>
<el-button v-if="$hasPermission('sub:check:acceptance') && scope.row.status==='2'" type="text" size="small" @click="acceptance(scope.row.id)">{{ '验收' }}</el-button>
<el-button v-if="$hasPermission('sub:check:tiral') && scope.row.status==='1'" type="text" size="small" @click="addHandle(scope.row.id,scope.row.status)">{{ '初审' }}</el-button>
<el-button v-if="$hasPermission('sub:check:acceptance') && scope.row.status==='2'" type="text" size="small" @click="addHandle(scope.row.id,scope.row.status)">{{ '验收' }}</el-button>
<el-button v-if="scope.row.delShow" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ '删除' }}</el-button>
<!-- <el-button v-if="$hasPermission('kpi:subpositioncheckinfo:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>-->
<!-- <el-button v-if="$hasPermission('kpi:subpositioncheckinfo:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>-->
@ -149,7 +149,7 @@ export default {
this.options = res.data.options
})
.catch(() => { })
this.initTime()
this.getDataList()
},
components: {
AddOrUpdate,

Loading…
Cancel
Save