<template>
|
<div class="cur-container-box">
|
<avue-form ref="replyForm" :option="option" v-model="form" :close-on-click-modal="false">
|
|
<template slot-scope="{size}" slot="menuForm">
|
<el-button type="primary" :size="size" @click="handleSubmit(2)">通 过</el-button>
|
<el-button :size="size" @click="handleSubmit(3)">驳 回</el-button>
|
</template>
|
|
<template slot-scope="{ row, size, index }" slot="houseCode" v-if="this.type == 2">
|
<el-select v-model="form.houseCode" filterable remote :remote-method="onRemoteMethod" @change="onSelectChange"
|
placeholder="请选择标准地址" reserve-keyword>
|
<el-option v-for="item in standardAddressList" :key="item.houseCode"
|
:label="item.placeName+'------详细地址:'+item.location" :value="item.houseCode">
|
</el-option>
|
</el-select>
|
</template>
|
|
</avue-form>
|
</div>
|
</template>
|
|
<script>
|
import {
|
setCheckPlaceExt,
|
getPlaceAddressList,
|
getList
|
} from "@/api/place/place"
|
|
import {
|
getTaskNoFraudReportingList,
|
removeTask,
|
update,
|
add,
|
applyTaskExamine
|
} from "@/api/task/task"
|
|
export default {
|
inject: ["placeElement"],
|
|
data() {
|
return {
|
id: '',
|
form: {},
|
type: '',
|
standardAddressList: [], //标准地址数据
|
option: {
|
submitBtn: false,
|
emptyBtn: false,
|
column: [{
|
span: 23,
|
prop: "houseCode",
|
slot: true,
|
label: "标准地址",
|
// labelWidth: 120,
|
display: false
|
},
|
{
|
span: 23,
|
row: true,
|
label: "审批意见",
|
prop: "confirmNotion",
|
type: 'textarea',
|
minRows: 3,
|
maxRows: 5,
|
rules: [],
|
}
|
]
|
},
|
}
|
},
|
|
watch: {
|
|
},
|
|
methods: {
|
|
onSelectChange(e) {
|
console.log("selectChange===>", e);
|
// this.getPlaceAddressListRequest()
|
},
|
init(row) {
|
this.id = row.taskId
|
this.type = row.type
|
let houseCodeColumn = this.findObject(this.option.column, 'houseCode')
|
console.log("*******77777************" + this.type)
|
if (this.type == 2) {
|
console.log("*******777778************" + this.type)
|
|
houseCodeColumn.display = true
|
} else {
|
console.log("*******777779************" + this.type)
|
|
houseCodeColumn.display = false
|
}
|
this.getPlaceAddressListRequest()
|
},
|
onRemoteMethod(query) {
|
console.log("remote===>", query)
|
this.getPlaceAddressListRequest(query)
|
},
|
getPlaceAddressListRequest(query) {
|
// 场所名称查询
|
if (this.type == 2) {
|
getList(1, 10, {
|
placeName: query
|
}).then(res => {
|
this.standardAddressList = res.data.data.records;
|
})
|
} else {
|
getList(1, 10, {
|
neiName: query
|
}).then(res => {
|
this.standardAddressList = res.data.data.records;
|
})
|
}
|
},
|
|
handleSubmit(status) {
|
let auditForm = {
|
id: this.id,
|
status: status,
|
remark: this.form.confirmNotion,
|
houseCode: this.form.houseCode,
|
reportType: 6
|
}
|
applyTaskExamine(auditForm).then(res => {
|
if (res.data.code == 200) {
|
this.placeElement.visible = false
|
this.placeElement.onLoad(this.placeElement.page)
|
this.$message.warning("审核成功")
|
}
|
})
|
// setCheckPlaceExt({
|
// confirmFlag: 2,
|
// id: this.placeElement.curAuditRow.placeExtId,
|
// confirmNotion: this.form.confirmNotion
|
// }).then(() => {
|
// this.$message({
|
// type: "success",
|
// message: "操作成功!",
|
// })
|
// this.$refs.replyForm && this.$refs.replyForm.resetForm()
|
// this.placeElement.auditBasePopup = false
|
|
// this.placeElement.onLoad(this.placeElement.page)
|
// })
|
},
|
|
handleReset() {
|
if ('confirmNotion' in this.form && this.form.confirmNotion.trim() == '' || !this.form.confirmNotion) {
|
this.$message({
|
type: 'warning',
|
message: "请输入审批意见!",
|
})
|
|
return
|
}
|
|
setCheckPlaceExt({
|
confirmFlag: 3,
|
id: this.placeElement.curAuditRow.placeExtId,
|
confirmNotion: this.form.confirmNotion
|
}).then(() => {
|
this.$message({
|
type: "success",
|
message: "操作成功!",
|
})
|
this.$refs.replyForm && this.$refs.replyForm.resetForm()
|
this.placeElement.auditBasePopup = false
|
|
this.placeElement.onLoad(this.placeElement.page)
|
})
|
},
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.cur-container-box {
|
display: flex;
|
flex-direction: column;
|
width: 100%;
|
height: 100%;
|
overflow: hidden;
|
|
.content-box {
|
margin: 0 4px;
|
padding: 0 16px;
|
height: 0;
|
flex: 1;
|
overflow: hidden;
|
overflow-y: auto;
|
}
|
|
.footer-btn-box {
|
margin-top: 10px;
|
display: flex;
|
justify-content: center;
|
}
|
}
|
</style>
|