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

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

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

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

@ -70,8 +70,8 @@
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="addHandle(scope.row.id,scope.row.status)">{{ '查看' }}</el-button> <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="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: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="acceptance(scope.row.id)">{{ '验收' }}</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="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: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>--> <!-- <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 this.options = res.data.options
}) })
.catch(() => { }) .catch(() => { })
this.initTime() this.getDataList()
}, },
components: { components: {
AddOrUpdate, AddOrUpdate,

Loading…
Cancel
Save