|
@@ -17,7 +17,7 @@
|
|
|
</template>
|
|
|
</van-cell>
|
|
|
<van-cell title="质检类型" :value="checkTypeTxt[reportForm.check_type]" v-if="reportForm.progress==100"/>
|
|
|
- <van-cell title="质检人" :value="reportForm.checker_name" is-link v-if="reportForm.progress==100">
|
|
|
+ <van-cell title="质检人" :value="reportForm.checker_name" is-link v-if="reportForm.progress==100" @click="showCheckerOptionList">
|
|
|
</van-cell>
|
|
|
</van-cell-group>
|
|
|
<div style="margin: 16px;">
|
|
@@ -27,7 +27,19 @@
|
|
|
</div>
|
|
|
</van-form>
|
|
|
<!-- 弹出层选人 -->
|
|
|
- <van-popup v-model="popupShow" round position="bottom" :style="{ height: '80%',background: '#F4F4F4' }" >
|
|
|
+ <van-popup v-model="checkerShow" position="bottom">
|
|
|
+ <van-picker
|
|
|
+ show-toolbar
|
|
|
+ value-key="name"
|
|
|
+ :columns="checkerOptionList"
|
|
|
+ @confirm="onConfirm"
|
|
|
+ @cancel="checkerShow = false"
|
|
|
+ >
|
|
|
+ <template #option="item">
|
|
|
+ <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
|
|
|
+ <span v-else>{{item.name}}</span>
|
|
|
+ </template>
|
|
|
+ </van-picker>
|
|
|
</van-popup>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -39,6 +51,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ checkerShow: false,
|
|
|
+ user: JSON.parse(localStorage.userInfo),
|
|
|
saving: false,
|
|
|
checkTypeTxt:['自检','互检','专检'],
|
|
|
reportForm: {
|
|
@@ -58,7 +72,23 @@ export default {
|
|
|
back() {
|
|
|
this.$router.go(-1);
|
|
|
},
|
|
|
-
|
|
|
+ onConfirm(value,key){
|
|
|
+ this.reportForm.checkerId = value.id
|
|
|
+ this.reportForm.checker_name = value.name
|
|
|
+ this.checkerShow = false
|
|
|
+ },
|
|
|
+ showCheckerOptionList() {
|
|
|
+ this.checkerShow = true;
|
|
|
+ this.$axios.post("/report/getCheckerList", {check_type: this.reportForm.check_type, deptId: this.reportForm.station_id})
|
|
|
+ .then(res => {
|
|
|
+ this.saving = false;
|
|
|
+ if(res.code == "ok") {
|
|
|
+ this.checkerOptionList = res.data;
|
|
|
+ } else {
|
|
|
+ this.$toast.fail(res.msg);
|
|
|
+ }
|
|
|
+ }).catch(err=> {this.$toast.clear();});
|
|
|
+ },
|
|
|
onSubmit() {
|
|
|
if (this.reportForm.progress == 0){
|
|
|
this.$toast.fail('进度不可为0')
|
|
@@ -94,14 +124,18 @@ export default {
|
|
|
}).catch(err=> {this.$toast.clear();});
|
|
|
},
|
|
|
getMyPlanProcedureList() {
|
|
|
- this.$axios.post("/plan-procedure-total/getFillProcedureDetail", {id: this.$route.query.id})
|
|
|
- .then(res => {
|
|
|
- if(res.code == "ok") {
|
|
|
- this.reportForm = res.data;
|
|
|
- } else {
|
|
|
- this.$toast.fail(res.msg);
|
|
|
- }
|
|
|
- }).catch(err=> {this.$toast.clear();});
|
|
|
+ this.$axios.post("/plan-procedure-total/getFillProcedureDetail", {id: this.$route.query.id})
|
|
|
+ .then(res => {
|
|
|
+ if(res.code == "ok") {
|
|
|
+ this.reportForm = res.data;
|
|
|
+ if (this.reportForm.check_type == 0) {
|
|
|
+ //自检
|
|
|
+ this.reportForm.checker_name = this.user.name;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$toast.fail(res.msg);
|
|
|
+ }
|
|
|
+ }).catch(err=> {this.$toast.clear();});
|
|
|
},
|
|
|
|
|
|
//打开报工页面
|