<template>
|
<el-dialog
|
title="批量缴费"
|
:visible.sync="dialogVisible"
|
:modal-append-to-body="false"
|
:close-on-click-modal="false"
|
width="450px"
|
:before-close="handleClose"
|
>
|
<el-form ref="dataForm" :model="dataForm" :rules="rules" label-position="right" label-width="150px" style="padding-right: 50px" element-loading-text="保存中...">
|
<!-- <el-form-item label="缴款人类型:" prop="payPersonType">-->
|
<!-- <el-radio-group v-model="dataForm.payPersonType">-->
|
<!-- <el-radio :label="2">团体</el-radio>-->
|
<!-- </el-radio-group>-->
|
<!-- </el-form-item>-->
|
<el-form-item label="缴款单位名称:" prop="payCompanyName">
|
<el-input v-model.trim="dataForm.payCompanyName"/>
|
</el-form-item>
|
<el-form-item label="缴款单位证件号:" prop="payCompanyCard">
|
<el-input v-model.trim="dataForm.payCompanyCard"/>
|
</el-form-item>
|
</el-form>
|
<span slot="footer" class="dialog-footer">
|
<el-button @click="handleClose">取 消</el-button>
|
<el-button type="primary" @click="onSubmit">确 定</el-button>
|
</span>
|
</el-dialog>
|
</template>
|
|
<script >
|
import { verifySimplePhone } from '@/utils/validate'
|
import {coalTeamPay} from "@/api/specialOperationsPay/coalPay";
|
import {nonCoalPersonPay, nonCoalTeamPay} from "@/api/specialOperationsPay/notCoalPay";
|
|
export default {
|
name: 'batchPay',
|
components: {
|
},
|
data() {
|
return {
|
dialogVisible: false,
|
dialogStatus: '',
|
rules: {
|
payCompanyName: [{ required: true, message: '请输入缴费单位名称', trigger: 'blur' }],
|
payCompanyCard: [{ required: true, message: '请输入缴费单位证件号', trigger: 'blur' }]
|
},
|
dataForm: {
|
},
|
|
}
|
},
|
created() {
|
|
},
|
methods: {
|
openDialog (data,type) {
|
this.resetDataForm();
|
this.dialogVisible = true
|
this.dialogStatus = type
|
this.dataForm.id = data.id
|
this.dataForm.payPersonType = 2
|
if(this.dialogStatus == 'edit') {
|
this.dataForm = data
|
}
|
this.$nextTick(() => {
|
this.$refs['dataForm'].clearValidate()
|
})
|
},
|
handleClose() {
|
this.dialogVisible = false;
|
this.$emit("getList");
|
},
|
onSubmit() {
|
this.$refs["dataForm"].validate( async valid => {
|
if (valid) {
|
if(this.dialogStatus == 'add'){
|
const res = await nonCoalTeamPay(this.dataForm);
|
if(res.code == 200) {
|
this.$emit("getList")
|
this.dialogVisible = false
|
const query = {
|
id: this.dataForm.id,
|
payType: 2
|
}
|
const res = await nonCoalPersonPay(query)
|
if(res.code == 200) {
|
window.open(`http://finpt.xjcz.gov.cn/fs-public/billQuery/findByOrderId.do?orderId=${res.msg}&deviceType=1`)
|
}else{
|
this.$message({
|
type:'warning',
|
message: res.msg
|
})
|
}
|
}else{
|
this.$message({
|
type:'warning',
|
message: res.msg
|
})
|
}
|
}else {
|
// const res = await updatePlat(this.dataForm);
|
// if(res.code == 200) {
|
// this.$emit("getList");
|
// this.dialogVisible = false;
|
// this.$message({
|
// type:'success',
|
// message: '编辑成功'
|
// })
|
// }else{
|
// this.$message({
|
// type:'warning',
|
// message: res.msg
|
// })
|
// }
|
}
|
}
|
})
|
|
},
|
resetDataForm() {
|
this.dataForm = {
|
}
|
},
|
}
|
}
|
|
</script>
|
<style scoped>
|
.infoTitle{
|
margin-top:-10px;
|
margin-bottom:20px;
|
display: flex;
|
justify-content: space-around;
|
font-weight: 800;
|
font-size: 16px
|
}
|
|
</style>
|