da13b022 by 任超

style:上报

1 parent 1331dbb4
/*
* @Description: 数据上报模块api文件
* @Autor: renchao
* @LastEditTime: 2023-03-01 16:33:08
* @LastEditTime: 2023-03-03 14:38:57
*/
/* 引入axios请求文件 */
import request from '@/utils/request'
......@@ -109,4 +109,17 @@ export function restartGenerateXml (bsmReport) {
url: urlHeader + 'restartGenerateXml?bsmReport=' + bsmReport,
method: 'post'
})
}
/**
* @description: 编辑报文头
* @param {*} data
* @author: renchao
*/
export function edit (data) {
return request({
url: urlHeader + 'edit',
method: 'post',
data
})
}
\ No newline at end of file
......
<template>
<el-dialog :close-on-click-modal="false" top="0" @close="closeDialog" custom-class="dialogBox editDialogBox mainCenter"
:visible.sync="dialogVisible" width="88%">
:visible.sync="dialogVisible" width="92%">
<div slot="title" class="dialog_title" ref="dialogTitle">
{{ title || '详情' }}
</div>
......@@ -11,81 +11,86 @@
<el-tab-pane v-if="visiableXml" label="xml报文" name="xml"></el-tab-pane>
<el-tab-pane v-if="visiableXml" label="响应结果" name="xyjg"></el-tab-pane>
</el-tabs>
<div class="dialog-from item-content-input" :class="$store.state.business.Edit ? 'editInput' : ''"
v-if="titleName == 'sjmx'">
<div class="dialog-from item-content-input" v-if="titleName == 'sjmx'">
<el-row>
<el-col :span="5">
<span>业务报文ID:</span>
<el-input v-model="dataReport.BizMsgId"></el-input>
<el-select v-model="dataReport.BizMsgId" :disabled="$store.state.business.Edit">
<el-option v-for="item in bwoptions" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-col>
<el-col :span="6">
<span>ASID:</span>
<el-input v-model="dataReport.ASID"></el-input>
<el-input v-model="dataReport.ASID" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="6">
<span>行政区划编码:</span>
<el-input v-model="dataReport.AreaCode"></el-input>
<el-input v-model="dataReport.AreaCode" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="7">
<span>上次不动产单元号:</span>
<el-input v-model="dataReport.PreEstateNum"></el-input>
<el-input v-model="dataReport.PreEstateNum" :disabled="$store.state.business.Edit"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<span>业务编码:</span>
<el-input v-model="dataReport.RecType"></el-input>
<el-input v-model="dataReport.RecType" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="6">
<span>权利类型:</span>
<el-select v-model="dataReport.RightType">
<el-select v-model="dataReport.RightType" :disabled="$store.state.business.Edit">
<el-option v-for="item in dicData['A8']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
</el-option>
</el-select>
</el-col>
<el-col :span="6">
<span>登记类型:</span>
<el-select v-model="dataReport.RegType">
<el-select v-model="dataReport.RegType" :disabled="$store.state.business.Edit">
<el-option v-for="item in dicData['A21']" :key="item.DCODE" :label="item.DNAME" :value="item.DCODE">
</el-option>
</el-select>
</el-col>
<el-col :span="7">
<span>不动产权证书数量:</span>
<el-input v-model="dataReport.CertCount" oninput="if(value.length > 8) value=value.slice(0, 8)"></el-input>
<el-input v-model="dataReport.CertCount" :disabled="$store.state.business.Edit"
oninput="if(value.length > 8) value=value.slice(0, 8)"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="5">
<span>创建时间:</span>
<el-date-picker v-model="dataReport.createDate" type="date" value-format="yyyy-MM-dd">
<el-date-picker v-model="dataReport.createDate" clearable :disabled="$store.state.business.Edit" type="date"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-col>
<el-col :span="6">
<span>业务流水号:</span>
<el-input v-model="dataReport.RecFlowID"></el-input>
<el-input v-model="dataReport.RecFlowID" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="6">
<span>宗地/宗海代码:</span>
<el-input v-model="dataReport.ParcelID"></el-input>
<el-input v-model="dataReport.ParcelID" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="7">
<span>证明数量:</span>
<el-input v-model="dataReport.ProofCount" oninput="if(value.length > 8) value=value.slice(0, 8)"></el-input>
<el-input v-model="dataReport.ProofCount" :disabled="$store.state.business.Edit"
oninput="if(value.length > 8) value=value.slice(0, 8)"></el-input>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<span>不动产单元号:</span>
<el-input v-model="dataReport.EstateNum"></el-input>
<el-input v-model="dataReport.EstateNum" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="7">
<span>登记机构:</span>
<el-input v-model="dataReport.RegOrgID"></el-input>
<el-input v-model="dataReport.RegOrgID" :disabled="$store.state.business.Edit"></el-input>
</el-col>
<el-col :span="11">
<span>上次不动产权证号/不动产登记证明:</span>
<el-input v-model="dataReport.PreCertID"></el-input>
<el-input v-model="dataReport.PreCertID" :disabled="$store.state.business.Edit"></el-input>
</el-col>
</el-row>
</div>
......@@ -124,10 +129,13 @@
</template>
<script>
import axios from "axios";
import SERVER from '@/api/config'
const urlHeader = SERVER.SERVERAPI + '/rest/sjsb/DataReport/'
import { mapGetters } from "vuex";
import JsonEditor from "@/components/JsonEditor.vue";
import Xyjg from "./Result";
import { getTabsDetail, getXml, getReportDetail, restartGenerateXml } from "@/api/dataReport.js";
import { getTabsDetail, getXml, getReportDetail, restartGenerateXml, edit } from "@/api/dataReport.js";
export default {
components: { JsonEditor, Xyjg },
props: {
......@@ -150,31 +158,31 @@ export default {
},
data () {
return {
key: 0,
resultInfo: '',
titleName: 'sjmx',
// 报文list
bwoptions: [],
dataReport: {},
index: 0,
bsmYwsjb: "",
ruleFormList: {
bizMsgID: "",
asid: "",
areaCode: "",
preestateNum: "",
recType: "",
rightType: "",
regType: "",
certCount: "",
createDate: "",
recFlowID: "",
regOrgID: "",
prllfCount: "",
parcelID: "",
estateNum: "",
preCertID: "",
digitalSign: "",
BizMsgId: "", // 业务报文ID
ASID: "", // ASID
AreaCode: "", //行政区划编码
PreEstateNum: "", //上次不动产单元号
RecType: "", // 业务编码
RightType: "", // 权利类型
RegType: "", //登记类型
CertCount: "", //不动产权证书数量
createDate: "", //创建时间
RecFlowID: "", // 业务流水号
ParcelID: "", //宗地/宗海代码
ProofCount: "", //证明数量
EstateNum: "", // 不动产单元号
RegOrgID: "", // 登记机构
PreCertID: "", //次不动产权证号/不动产登记证明
},
images: require("./images/success.gif"),
dialogVisible: false,
......@@ -200,18 +208,22 @@ export default {
handleTitleTab (val) {
},
isShow (item) {
this.dataReport = item;
this.$set(this.bwoptions, 0, {
value: item.bizMsgid,
label: item.bizMsgid,
})
this.$set(this.bwoptions, 1, {
value: item.bizMsgid + 'CBXZ',
label: item.bizMsgid + 'CBXZ',
})
this.$set(this.bwoptions, 2, {
value: item.bizMsgid + 'BBXZ',
label: item.bizMsgid + 'BBXZ',
})
this.titleName = 'sjmx';
this.dialogVisible = true;
//获取表头列表
getTabsDetail({ bsmReport: this.dataReport.bsmReport || this.dataReport.bsmSjsb }).then((res) => {
if (res.code == 200) {
this.headerList = res.result;
this.activeName = this.tabsActiveName == '' ? res.result[0].soleurl : this.tabsActiveName
this.bsmYwsjb = this.headerList[0].bsmYwsjb;
this.editItem = this.loadView(this.activeName);
}
});
this._getList(item)
//不动产数据查询上报详情
getReportDetail({ bsmReport: item.bsmSjsb || item.bsmReport }).then((res) => {
if (res.code == 200) {
......@@ -225,6 +237,17 @@ export default {
})
}
},
// 获取列表接口
_getList (data) {
getTabsDetail({ bsmReport: data.bsmReport || data.bsmSjsb }).then((res) => {
if (res.code == 200) {
this.headerList = res.result;
this.activeName = this.tabsActiveName == '' ? res.result[0].soleurl : this.tabsActiveName
this.bsmYwsjb = this.headerList[0].bsmYwsjb;
this.editItem = this.loadView(this.activeName);
}
});
},
changeList (val) {
let _index = val.index;
if (_index > this.index) {
......@@ -252,22 +275,33 @@ export default {
* @description: 提交
* @author: renchao
*/
submitForm: _.debounce(function () {
this.$refs["editItem"].handleUpdateForm()
.then((res) => {
if (res == 200) {
this.$message({
message: '修改成功',
type: 'success'
})
}
})
.catch(function (error) {
this.$alert(error, "提示", {
confirmButtonText: "确定",
type: "error"
submitForm: _.debounce(async function () {
let _this = this
// 上报请求头修改
try {
var headRes = await axios.post('/api' + urlHeader + 'edit', this.dataReport,
{
headers: {
'Authorization': sessionStorage.getItem("token") || ""
}
})
if (headRes.code == 200) {
_this._getList(_this.dataReport)
}
} catch (error) {
this.$message({
message: '报文头修改出错',
type: 'error'
})
}
let listRes = await this.$refs["editItem"].handleUpdateForm()
console.log(headRes, listRes);
if (headRes.data?.code == 200 && listRes == 200) {
this.$message({
message: '上报成功',
type: 'success'
})
}
}, 500),
/**
* @description: 重新上报
......@@ -306,14 +340,6 @@ export default {
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBox.scss";
.editInput {
/deep/.el-input__inner {
color: #87adf3;
cursor: not-allowed;
pointer-events: none;
}
}
/deep/.el-dialog__body {
display: flex;
flex-direction: column;
......@@ -405,7 +431,7 @@ export default {
padding-right: 1px;
margin-bottom: 10px;
border-top: none;
height: 45vh;
height: 44vh;
}
/deep/.editDialogBox {
......@@ -453,6 +479,10 @@ export default {
padding-right: 15px;
}
/deep/.el-icon-circle-close {
display: none;
}
/deep/.el-input__suffix {
right: -25px !important;
top: -5px;
......
......@@ -99,189 +99,188 @@
</template>
<script>
// 接收报文查询
// 引入表格头部数据
import data from "./data";
// 引入table混入方法
import tableMixin from "@/mixins/tableMixin.js";
import { getReceiveDataReportPage } from "@/api/dataReport.js";
// 引入详情弹框
import dataDetails from "@/components/EditDialog";
//引入日期处理方法
import { timeFormat } from "@/utils/operation";
export default {
name: "jsbwcx",
mixins: [tableMixin],
// 注册组件
components: {
dataDetails,
},
data () {
return {
pickerOptionsStart: {
disabledDate: (time) => {
let endDateVal = this.form.receiveEndTime;
if (endDateVal) {
return (
time.getTime() >=
new Date(endDateVal).getTime()
);
}
},
},
pickerOptionsEnd: {
disabledDate: (time) => {
let beginDateVal = this.form.receiveStartTime;
if (beginDateVal) {
return (
time.getTime() <
new Date(beginDateVal).getTime()
);
}
},
},
// 表格数据
form: {
qxdm: "", // 行政区
receiveStartTime: "", // 开始日期
receiveEndTime: "", // 结束日期
bdcdyh: "", // 不动产单元号
ywh: "", // 业务号
qllx: "", // 权利类型
djlx: "", // 登记类型
jcjg: "", // 检查结果
rkjg: "", //入库结果
currentPage: 1
},
// 校验规则
rules: {
pcode: [{ required: true, message: "请选择行政区", trigger: "change" }],
startTime: [
{ required: true, message: "请选择开始日期", trigger: "change" },
],
endTime: [
{ required: true, message: "请选择结束日期", trigger: "change" },
],
bdcdyh: [
{ required: true, message: "不动产单元号", trigger: "change" },
],
ywmc: [{ required: true, message: "业务名称", trigger: "change" }],
jcjg: [{ required: true, message: "检查结果", trigger: "change" }],
rkjg: [{ required: true, message: "入库结果", trigger: "change" }],
},
// 表格数据
tableData: {
// 表格头部
columns: [
{
label: "序号",
type: "index",
width: "50",
index: this.indexMethod,
}
]
.concat(data.columns())
.concat([
{
label: "操作",
width: "90",
render: (h, scope) => {
return (
<div>
<el-button
type="primary"
onClick={() => {
this.handleDetails(scope.row);
}}
>
详情
</el-button>
</div>
)
}
}
]),
// 表格列表数据
total: 0,
data: [],
},
// 分页
pageData: {
total: 0,
pageSize: 10,
current: 1
// 接收报文查询
// 引入表格头部数据
import data from "./data";
// 引入table混入方法
import tableMixin from "@/mixins/tableMixin.js";
import { getReceiveDataReportPage } from "@/api/dataReport.js";
// 引入详情弹框
import dataDetails from "@/components/EditDialog";
//引入日期处理方法
import { timeFormat } from "@/utils/operation";
export default {
name: "jsbwcx",
mixins: [tableMixin],
// 注册组件
components: {
dataDetails,
},
data () {
return {
pickerOptionsStart: {
disabledDate: (time) => {
let endDateVal = this.form.receiveEndTime;
if (endDateVal) {
return (
time.getTime() >=
new Date(endDateVal).getTime()
);
}
},
title: "",
};
},
methods: {
//截止日期变化
endTimeChange (val) {
this.form.receiveEndTime = timeFormat(new Date(val), true)
},
// 初始化数据
queryClick () {
getReceiveDataReportPage({ ...this.form, ...this.formData }).then(
(res) => {
if (res.code === 200) {
console.log("菜单列表", res);
let { total, records, current } = res.result;
this.tableData.total = total;
this.tableData.data = records ? records : [];
this.pageData.current = current
}
pickerOptionsEnd: {
disabledDate: (time) => {
let beginDateVal = this.form.receiveStartTime;
if (beginDateVal) {
return (
time.getTime() <
new Date(beginDateVal).getTime()
);
}
)
},
// 重置
resetForm () {
this.$refs.ruleForm.resetFields();
this.form.currentPage = 1
this.queryClick();
},
},
featchData () {
this.queryClick();
// 表格数据
form: {
qxdm: "", // 行政区
receiveStartTime: "", // 开始日期
receiveEndTime: "", // 结束日期
bdcdyh: "", // 不动产单元号
ywh: "", // 业务号
qllx: "", // 权利类型
djlx: "", // 登记类型
jcjg: "", // 检查结果
rkjg: "", //入库结果
currentPage: 1
},
// 结果
handleResult (row) {
this.$popupDialog('响应结果', 'views/jsbwcx/components/result', row)
// 校验规则
rules: {
pcode: [{ required: true, message: "请选择行政区", trigger: "change" }],
startTime: [
{ required: true, message: "请选择开始日期", trigger: "change" },
],
endTime: [
{ required: true, message: "请选择结束日期", trigger: "change" },
],
bdcdyh: [
{ required: true, message: "不动产单元号", trigger: "change" },
],
ywmc: [{ required: true, message: "业务名称", trigger: "change" }],
jcjg: [{ required: true, message: "检查结果", trigger: "change" }],
rkjg: [{ required: true, message: "入库结果", trigger: "change" }],
},
// 详情
handleDetails (row) {
if (row.rectypeName) {
this.title = row.rectypeName
} else {
let Title = ''
this.dicData['A21'].map(item => {
if (item.DCODE == row.DJLX || item.DCODE == row.djlx) {
Title = item.DNAME
return
}
})
this.dicData['A8'].map(item => {
if (item.DCODE == row.QLLX || item.DCODE == row.qllx) {
Title += '-' + item.DNAME
return
// 表格数据
tableData: {
// 表格头部
columns: [
{
label: "序号",
type: "index",
width: "50",
index: this.indexMethod,
}
]
.concat(data.columns())
.concat([
{
label: "操作",
width: "90",
render: (h, scope) => {
return (
<div>
<el-button
type="primary"
onClick={() => {
this.handleDetails(scope.row);
}}
>
详情
</el-button>
</div>
)
}
}
})
this.title = Title
}
this.$refs.editLog.isShow(row);
if (row.receiveState == 2) {
this.$store.dispatch('business/setReportLogEdit')
} else {
this.$store.dispatch('business/setEdit')
}
]),
// 表格列表数据
total: 0,
data: [],
},
// 分页
pageData: {
total: 0,
pageSize: 10,
current: 1
},
}
title: "",
};
},
methods: {
//截止日期变化
endTimeChange (val) {
this.form.receiveEndTime = timeFormat(new Date(val), true)
},
// 初始化数据
queryClick () {
getReceiveDataReportPage({ ...this.form, ...this.formData }).then(
(res) => {
if (res.code === 200) {
let { total, records, current } = res.result;
this.tableData.total = total;
this.tableData.data = records ? records : [];
this.pageData.current = current
}
}
)
},
// 重置
resetForm () {
this.$refs.ruleForm.resetFields();
this.form.currentPage = 1
this.queryClick();
},
featchData () {
this.queryClick();
},
// 结果
handleResult (row) {
this.$popupDialog('响应结果', 'views/jsbwcx/components/result', row)
},
// 详情
handleDetails (row) {
if (row.rectypeName) {
this.title = row.rectypeName
} else {
let Title = ''
this.dicData['A21'].map(item => {
if (item.DCODE == row.DJLX || item.DCODE == row.djlx) {
Title = item.DNAME
return
}
})
this.dicData['A8'].map(item => {
if (item.DCODE == row.QLLX || item.DCODE == row.qllx) {
Title += '-' + item.DNAME
return
}
})
this.title = Title
}
this.$refs.editLog.isShow(row);
if (row.receiveState == 2) {
this.$store.dispatch('business/setReportLogEdit')
} else {
this.$store.dispatch('business/setEdit')
}
},
}
}
</script>
<style scoped lang="scss">
// 引入表单整体样式
@import "~@/styles/public.scss";
// 引入当前css
@import "./index.scss";
// 引入表单整体样式
@import "~@/styles/public.scss";
// 引入当前css
@import "./index.scss";
</style>
......