|
|
|
@ -2,21 +2,96 @@
|
|
|
|
|
<div class="main">
|
|
|
|
|
<div class="headBox">
|
|
|
|
|
<div>
|
|
|
|
|
<el-button type="primary" @click="HederButtonSend">
|
|
|
|
|
<i class="el-icon-refresh" style="margin-right: 0.3rem" />原始重发
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="primary" @click="ClickAlter">
|
|
|
|
|
<i class="el-icon-edit" style="margin-right: 0.3rem" />修改发送
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button type="primary" @click="ClickDelS">
|
|
|
|
|
<i class="el-icon-delete" style="margin-right: 0.3rem" />删除发送
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-popover
|
|
|
|
|
placement="top"
|
|
|
|
|
width="160"
|
|
|
|
|
v-model="visible1"
|
|
|
|
|
style="margin-right: 0.3rem"
|
|
|
|
|
>
|
|
|
|
|
<p>是否要原始重发?</p>
|
|
|
|
|
<div style="text-align: right; margin: 0">
|
|
|
|
|
<el-button size="mini" type="text" @click="visible1 = false">
|
|
|
|
|
取消
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="
|
|
|
|
|
() => {
|
|
|
|
|
HederButtonSend();
|
|
|
|
|
visible1 = false;
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
确定
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-button type="primary" slot="reference">
|
|
|
|
|
<i class="el-icon-refresh" style="margin-right: 0.3rem" />原始重发
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-popover>
|
|
|
|
|
<el-popover
|
|
|
|
|
placement="top"
|
|
|
|
|
width="160"
|
|
|
|
|
v-model="visible2"
|
|
|
|
|
style="margin-right: 0.3rem"
|
|
|
|
|
>
|
|
|
|
|
<p>是否要修改发送?</p>
|
|
|
|
|
<div style="text-align: right; margin: 0">
|
|
|
|
|
<el-button size="mini" type="text" @click="visible2 = false">
|
|
|
|
|
取消
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="
|
|
|
|
|
() => {
|
|
|
|
|
ClickAlter();
|
|
|
|
|
visible2 = false;
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
确定
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-button type="primary" slot="reference">
|
|
|
|
|
<i class="el-icon-edit" style="margin-right: 0.3rem" />修改发送
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-popover>
|
|
|
|
|
<el-popover
|
|
|
|
|
placement="top"
|
|
|
|
|
width="160"
|
|
|
|
|
v-model="visible3"
|
|
|
|
|
style="margin-right: 0.3rem"
|
|
|
|
|
>
|
|
|
|
|
<p>是否要删除发送?</p>
|
|
|
|
|
<div style="text-align: right; margin: 0">
|
|
|
|
|
<el-button size="mini" type="text" @click="visible3 = false">
|
|
|
|
|
取消
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="
|
|
|
|
|
() => {
|
|
|
|
|
ClickDelS();
|
|
|
|
|
visible3 = false;
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
确定
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
<el-button type="primary" slot="reference">
|
|
|
|
|
<i class="el-icon-delete" style="margin-right: 0.3rem" />删除发送
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-popover>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<!-- <div>
|
|
|
|
|
<el-button type="primary" @click="Download">
|
|
|
|
|
<i class="el-icon-download" style="margin-right: 0.3rem" />导出ISF
|
|
|
|
|
</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
</div>
|
|
|
|
|
<div class="SearchBox">
|
|
|
|
|
<el-input
|
|
|
|
@ -28,12 +103,12 @@
|
|
|
|
|
<el-input
|
|
|
|
|
size="small"
|
|
|
|
|
placeholder="货代提单号"
|
|
|
|
|
v-model="search_data.HBLNO"
|
|
|
|
|
v-model="search_data.HouseBillNo"
|
|
|
|
|
>
|
|
|
|
|
</el-input>
|
|
|
|
|
<el-select
|
|
|
|
|
size="small"
|
|
|
|
|
v-model="search_data.CARRIERID"
|
|
|
|
|
v-model="search_data.ShipCompanyName"
|
|
|
|
|
filterable
|
|
|
|
|
placeholder="请选择船公司"
|
|
|
|
|
clearable
|
|
|
|
@ -64,62 +139,61 @@
|
|
|
|
|
<el-table-column prop="mblno" type="selection" width="55" align="center">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="mblno" label="MBL"></el-table-column>
|
|
|
|
|
<el-table-column prop="houseDto_hblNo" label="HBL"></el-table-column>
|
|
|
|
|
<el-table-column prop="vessel" label="AMS B/L NO" width="110">
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="houseList_houseBillNo"
|
|
|
|
|
label="HBL"
|
|
|
|
|
></el-table-column>
|
|
|
|
|
<!-- <el-table-column prop="vessel" label="AMS B/L NO" width="110">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.sasccode }}{{ scope.row.houseDto_hblNo }}
|
|
|
|
|
{{ scope.row.sasccode }}{{ scope.row.houseList_houseBillNo }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column prop="houseDto_reportState" label="申报状态">
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
<el-table-column prop="houseDto_mateState" label="匹配状态" width="190">
|
|
|
|
|
<!-- <el-table-column prop="houseList_reportState" label="申报状态">
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="houseList_stateIsAccept"
|
|
|
|
|
label="申报状态"
|
|
|
|
|
width="190"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
:type="scope.row.houseDto_mateState['W2'] ? 'success' : ''"
|
|
|
|
|
:type="scope.row.houseList_stateIsAccept ? 'success' : ''"
|
|
|
|
|
size="mini"
|
|
|
|
|
plain
|
|
|
|
|
>
|
|
|
|
|
W2
|
|
|
|
|
Accept
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
:type="scope.row.houseDto_mateState['1Y'] ? 'success' : ''"
|
|
|
|
|
:type="scope.row.houseList_stateIsAccept ? 'success' : ''"
|
|
|
|
|
size="mini"
|
|
|
|
|
plain
|
|
|
|
|
>
|
|
|
|
|
1Y
|
|
|
|
|
</el-button>
|
|
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
:type="scope.row.houseDto_mateState['3Z'] ? 'success' : ''"
|
|
|
|
|
size="mini"
|
|
|
|
|
plain
|
|
|
|
|
>
|
|
|
|
|
3Z
|
|
|
|
|
Matched
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="houseDto_newNotice" label="最新通知">
|
|
|
|
|
<el-table-column prop="houseList_newNotice" label="最新通知">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="carrier" label="船公司" width="80" align="center">
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="shipCompanyName"
|
|
|
|
|
label="船公司"
|
|
|
|
|
width="80"
|
|
|
|
|
align="center"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column prop="houseDto_shippername" label="发货人名称">
|
|
|
|
|
<!-- <el-table-column prop="houseList_shippername" label="发货人名称">
|
|
|
|
|
</el-table-column> -->
|
|
|
|
|
<el-table-column prop="historyDto_operator" label="最新操作人">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="historyDto_state" label="最新操作">
|
|
|
|
|
<el-table-column prop="history_operator" label="最新操作人">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="history_state" label="最新操作"> </el-table-column>
|
|
|
|
|
<el-table-column prop="vessel" label="船名"></el-table-column>
|
|
|
|
|
<el-table-column prop="voyno" label="船次"></el-table-column>
|
|
|
|
|
<el-table-column prop="loadingPort" label="装货港"></el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="historyDto_sendTime"
|
|
|
|
|
label="最近操作时间"
|
|
|
|
|
width="160"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column prop="loadHarbour" label="装货港"></el-table-column>
|
|
|
|
|
<el-table-column prop="history_sendTime" label="最近操作时间" width="160">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<i class="el-icon-time" />
|
|
|
|
|
{{ moment(scope.row.historyDto_sendTime).format("YYYY-MM-DD HH:mm") }}
|
|
|
|
|
{{ moment(scope.row.history_sendTime).format("YYYY-MM-DD HH:mm") }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="compName" label="所属公司"></el-table-column>
|
|
|
|
@ -170,7 +244,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import {
|
|
|
|
|
Load,
|
|
|
|
|
PageData,
|
|
|
|
|
Send,
|
|
|
|
|
ExportPDF,
|
|
|
|
|
GetToken,
|
|
|
|
@ -193,17 +267,24 @@ export default {
|
|
|
|
|
// ],
|
|
|
|
|
moment,
|
|
|
|
|
search_data: {
|
|
|
|
|
ReportState: "1",
|
|
|
|
|
Page: 1,
|
|
|
|
|
Limit: 10,
|
|
|
|
|
MBLNO: "",
|
|
|
|
|
total: 0,
|
|
|
|
|
// Type: "2",
|
|
|
|
|
// Page: 1,
|
|
|
|
|
// Limit: 10,
|
|
|
|
|
// MBLNO: "",
|
|
|
|
|
// total: 0,
|
|
|
|
|
pageNumber: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
type: "2",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// ---------------------------------------------
|
|
|
|
|
tableData: [],
|
|
|
|
|
Backup_tableData: [],
|
|
|
|
|
SpanMethod: [],
|
|
|
|
|
CarrierData: [],
|
|
|
|
|
visible1: false,
|
|
|
|
|
visible2: false,
|
|
|
|
|
visible3: false,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {},
|
|
|
|
@ -211,65 +292,66 @@ export default {
|
|
|
|
|
GetToken({ code: this.$route.query.code }).then((res) => {
|
|
|
|
|
localStorage.setItem(
|
|
|
|
|
"token",
|
|
|
|
|
`${res.data.data.toenType} ${res.data.data.token}`
|
|
|
|
|
`${res.data.result.toenType} ${res.data.result.token}`
|
|
|
|
|
);
|
|
|
|
|
this.Reset();
|
|
|
|
|
});
|
|
|
|
|
// this.Reset();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
Search() {
|
|
|
|
|
this.search_data.Page = 1;
|
|
|
|
|
this.GetList();
|
|
|
|
|
},
|
|
|
|
|
Download() {
|
|
|
|
|
var myDate = new Date();
|
|
|
|
|
let Y = myDate.getFullYear(); // 获取完整的年份(4位,1970-????)
|
|
|
|
|
let M = myDate.getMonth() + 1; // 获取当前月份(0-11,0代表1月)
|
|
|
|
|
let D = myDate.getDate(); // 获取当前日(1-31)
|
|
|
|
|
let H = myDate.getHours(); // 获取当前小时数(0-23)
|
|
|
|
|
let m = myDate.getMinutes(); // 获取当前分钟数(0-59)
|
|
|
|
|
if (this.$refs.SendTable.selection.length) {
|
|
|
|
|
let ids = "";
|
|
|
|
|
let mblno = "";
|
|
|
|
|
this.$refs.SendTable.selection.forEach((item, index) => {
|
|
|
|
|
if (index == 0) {
|
|
|
|
|
ids = item.houseDto_gid;
|
|
|
|
|
mblno = item.mblno;
|
|
|
|
|
} else {
|
|
|
|
|
ids = `${ids},${item.houseDto_gid}`;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
ExportPDF({ ids }).then((res) => {
|
|
|
|
|
const content = res.data;
|
|
|
|
|
const blob = new Blob([content]); //构造一个blob对象来处理数据
|
|
|
|
|
// const fileName = `${item.mblno}-${Y}${M}${D}${H}${m}.pdf`;
|
|
|
|
|
const fileName = `${mblno}-${Y}${M}${D}${H}${m}.pdf`;
|
|
|
|
|
//对于<a>标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
|
|
|
|
|
//IE10以上支持blob但是依然不支持download
|
|
|
|
|
if ("download" in document.createElement("a")) {
|
|
|
|
|
//支持a标签download的浏览器
|
|
|
|
|
const link = document.createElement("a"); //创建a标签
|
|
|
|
|
link.download = fileName; //a标签添加属性
|
|
|
|
|
link.style.display = "none";
|
|
|
|
|
link.href = URL.createObjectURL(blob);
|
|
|
|
|
document.body.appendChild(link);
|
|
|
|
|
link.click(); //执行下载
|
|
|
|
|
URL.revokeObjectURL(link.href); //释放url
|
|
|
|
|
document.body.removeChild(link); //释放标签
|
|
|
|
|
} else {
|
|
|
|
|
//其他浏览器
|
|
|
|
|
navigator.msSaveBlob(blob, fileName);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "请选择至少一条数据",
|
|
|
|
|
type: "warning",
|
|
|
|
|
showClose: true,
|
|
|
|
|
duration: 0,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// Download() {
|
|
|
|
|
// var myDate = new Date();
|
|
|
|
|
// let Y = myDate.getFullYear(); // 获取完整的年份(4位,1970-????)
|
|
|
|
|
// let M = myDate.getMonth() + 1; // 获取当前月份(0-11,0代表1月)
|
|
|
|
|
// let D = myDate.getDate(); // 获取当前日(1-31)
|
|
|
|
|
// let H = myDate.getHours(); // 获取当前小时数(0-23)
|
|
|
|
|
// let m = myDate.getMinutes(); // 获取当前分钟数(0-59)
|
|
|
|
|
// if (this.$refs.SendTable.selection.length) {
|
|
|
|
|
// let ids = "";
|
|
|
|
|
// let mblno = "";
|
|
|
|
|
// this.$refs.SendTable.selection.forEach((item, index) => {
|
|
|
|
|
// if (index == 0) {
|
|
|
|
|
// ids = item.houseList_gid;
|
|
|
|
|
// mblno = item.mblno;
|
|
|
|
|
// } else {
|
|
|
|
|
// ids = `${ids},${item.houseList_gid}`;
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// ExportPDF({ ids }).then((res) => {
|
|
|
|
|
// const content = res.data;
|
|
|
|
|
// const blob = new Blob([content]); //构造一个blob对象来处理数据
|
|
|
|
|
// // const fileName = `${item.mblno}-${Y}${M}${D}${H}${m}.pdf`;
|
|
|
|
|
// const fileName = `${mblno}-${Y}${M}${D}${H}${m}.pdf`;
|
|
|
|
|
// //对于<a>标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
|
|
|
|
|
// //IE10以上支持blob但是依然不支持download
|
|
|
|
|
// if ("download" in document.createElement("a")) {
|
|
|
|
|
// //支持a标签download的浏览器
|
|
|
|
|
// const link = document.createElement("a"); //创建a标签
|
|
|
|
|
// link.download = fileName; //a标签添加属性
|
|
|
|
|
// link.style.display = "none";
|
|
|
|
|
// link.href = URL.createObjectURL(blob);
|
|
|
|
|
// document.body.appendChild(link);
|
|
|
|
|
// link.click(); //执行下载
|
|
|
|
|
// URL.revokeObjectURL(link.href); //释放url
|
|
|
|
|
// document.body.removeChild(link); //释放标签
|
|
|
|
|
// } else {
|
|
|
|
|
// //其他浏览器
|
|
|
|
|
// navigator.msSaveBlob(blob, fileName);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
// this.$message({
|
|
|
|
|
// message: "请选择至少一条数据",
|
|
|
|
|
// type: "warning",
|
|
|
|
|
// showClose: true,
|
|
|
|
|
// duration: 0,
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// },
|
|
|
|
|
Reset() {
|
|
|
|
|
Object.assign(this.$data, this.$options.data());
|
|
|
|
|
this.GetList();
|
|
|
|
@ -284,76 +366,78 @@ export default {
|
|
|
|
|
GetList() {
|
|
|
|
|
delete this.search_data.Data;
|
|
|
|
|
this.TableLoading = true;
|
|
|
|
|
Load(this.search_data).then((res) => {
|
|
|
|
|
PageData(this.search_data).then((res) => {
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
let obj = [];
|
|
|
|
|
res.data.data.forEach((item, index) => {
|
|
|
|
|
let historyDtoData = {};
|
|
|
|
|
// if (item.historyDto.length) {
|
|
|
|
|
// Object.keys(item.historyDto[0]).forEach((historyDtoKey) => {
|
|
|
|
|
// historyDtoData[`historyDto_${historyDtoKey}`] =
|
|
|
|
|
// item.historyDto[0][historyDtoKey];
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
res.data.result.forEach((item, index) => {
|
|
|
|
|
let historyData = {};
|
|
|
|
|
if (item.history) {
|
|
|
|
|
Object.keys(item.history).forEach((HistoryDto) => {
|
|
|
|
|
historyData[`history_${HistoryDto}`] = item.history[HistoryDto];
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
this.SpanMethod[index] = [[0], [0, 0]];
|
|
|
|
|
item.houseDto.forEach((item2, index2) => {
|
|
|
|
|
if (item2.historyDto.length) {
|
|
|
|
|
let HArr = [];
|
|
|
|
|
item2.historyDto.forEach((Hitem) => {
|
|
|
|
|
if (Hitem.type == 0) {
|
|
|
|
|
HArr.push(Hitem);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (HArr[0]) {
|
|
|
|
|
Object.keys(HArr[0]).forEach((historyDtoKey) => {
|
|
|
|
|
historyDtoData[`historyDto_${historyDtoKey}`] =
|
|
|
|
|
HArr[0][historyDtoKey];
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
Object.keys(item2.historyDto[0]).forEach((historyDtoKey) => {
|
|
|
|
|
historyDtoData[`historyDto_${historyDtoKey}`] =
|
|
|
|
|
item2.historyDto[0][historyDtoKey];
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
item.houseList.forEach((item2, index2) => {
|
|
|
|
|
// if (item2.history.length) {
|
|
|
|
|
// let HArr = [];
|
|
|
|
|
// item2.history.forEach((Hitem) => {
|
|
|
|
|
// if (Hitem.type == 0) {
|
|
|
|
|
// HArr.push(Hitem);
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// if (HArr[0]) {
|
|
|
|
|
// Object.keys(HArr[0]).forEach((historyKey) => {
|
|
|
|
|
// historyData[`history_${historyKey}`] = HArr[0][historyKey];
|
|
|
|
|
// });
|
|
|
|
|
// } else {
|
|
|
|
|
// Object.keys(item2.history[0]).forEach((historyKey) => {
|
|
|
|
|
// historyData[`history_${historyKey}`] =
|
|
|
|
|
// item2.history[0][historyKey];
|
|
|
|
|
// });
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
this.SpanMethod[index][0].push(
|
|
|
|
|
this.SpanMethod[index][1][
|
|
|
|
|
this.SpanMethod[index][1].length - 1
|
|
|
|
|
] + item2.cntrnoDto.length
|
|
|
|
|
] + item2.cntrList.length
|
|
|
|
|
);
|
|
|
|
|
let houseDtoData = {};
|
|
|
|
|
Object.keys(item2).forEach((HouseDtoKey) => {
|
|
|
|
|
if (HouseDtoKey == "mateState") {
|
|
|
|
|
let obj = {
|
|
|
|
|
W2: false,
|
|
|
|
|
"1Y": false,
|
|
|
|
|
"3Z": false,
|
|
|
|
|
};
|
|
|
|
|
item2[HouseDtoKey].split(",").forEach((item) => {
|
|
|
|
|
obj[item] = true;
|
|
|
|
|
});
|
|
|
|
|
houseDtoData[`houseDto_${HouseDtoKey}`] = obj;
|
|
|
|
|
} else {
|
|
|
|
|
houseDtoData[`houseDto_${HouseDtoKey}`] = item2[HouseDtoKey];
|
|
|
|
|
}
|
|
|
|
|
let houseListData = {};
|
|
|
|
|
Object.keys(item2).forEach((houseListKey) => {
|
|
|
|
|
// if (houseListKey == "mateState") {
|
|
|
|
|
// let obj = {
|
|
|
|
|
// W2: false,
|
|
|
|
|
// "1Y": false,
|
|
|
|
|
// "3Z": false,
|
|
|
|
|
// };
|
|
|
|
|
// item2[houseListKey].split(",").forEach((item) => {
|
|
|
|
|
// obj[item] = true;
|
|
|
|
|
// });
|
|
|
|
|
// houseListData[`houseList_${houseListKey}`] = obj;
|
|
|
|
|
// } else {
|
|
|
|
|
houseListData[`houseList_${houseListKey}`] =
|
|
|
|
|
item2[houseListKey];
|
|
|
|
|
// }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
obj = [
|
|
|
|
|
...obj,
|
|
|
|
|
{
|
|
|
|
|
...item,
|
|
|
|
|
...houseDtoData,
|
|
|
|
|
...historyDtoData,
|
|
|
|
|
...houseListData,
|
|
|
|
|
...historyData,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
this.search_data.total = res.data.count;
|
|
|
|
|
this.Backup_tableData = res.data.data;
|
|
|
|
|
this.Backup_tableData = res.data.result;
|
|
|
|
|
|
|
|
|
|
this.tableData = obj;
|
|
|
|
|
|
|
|
|
|
this.TableLoading = false;
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.message,
|
|
|
|
|
message: res.data.Message ? res.data.Message : res.data.message,
|
|
|
|
|
type: "warning",
|
|
|
|
|
showClose: true,
|
|
|
|
|
duration: 0,
|
|
|
|
@ -372,120 +456,137 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
ClickEdit(scope, type) {
|
|
|
|
|
this.Backup_tableData.forEach((item, index) => {
|
|
|
|
|
if (scope.row.gid == item.gid) {
|
|
|
|
|
let EditType = false;
|
|
|
|
|
this.$store.state.SendeditableTabs.forEach((item2) => {
|
|
|
|
|
if (
|
|
|
|
|
item2.data &&
|
|
|
|
|
item2.data.mblno == this.Backup_tableData[index].mblno &&
|
|
|
|
|
item2.data.EditType == this.Backup_tableData[index].EditType
|
|
|
|
|
) {
|
|
|
|
|
EditType = true;
|
|
|
|
|
this.$store.state.ListData = item2.data;
|
|
|
|
|
this.$store.state.SendeditableTabsValue = item2.name;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (!EditType) {
|
|
|
|
|
if (type == "历史记录") {
|
|
|
|
|
item = {
|
|
|
|
|
...item,
|
|
|
|
|
EditType: "历史记录",
|
|
|
|
|
};
|
|
|
|
|
} else if (type == "查看") {
|
|
|
|
|
item = {
|
|
|
|
|
...item,
|
|
|
|
|
EditType: "查看",
|
|
|
|
|
};
|
|
|
|
|
} else if (type == "复制") {
|
|
|
|
|
this.GetList();
|
|
|
|
|
let DelArr = ["gid", "isDel", "pid", "hid", "hblNo", "mblno"];
|
|
|
|
|
let data = { ...item };
|
|
|
|
|
data.houseDto = [];
|
|
|
|
|
item.houseDto.forEach((e, i) => {
|
|
|
|
|
if (scope.row.houseDto_gid == e.gid) {
|
|
|
|
|
data.houseDto.push(e);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
Object.keys(data).forEach((item) => {
|
|
|
|
|
DelArr.forEach((Del) => {
|
|
|
|
|
if (Del == item) {
|
|
|
|
|
delete data[item];
|
|
|
|
|
item.houseList.forEach((e) => {
|
|
|
|
|
if (scope.row.houseList_gid == e.gid) {
|
|
|
|
|
let EditType = false;
|
|
|
|
|
this.$store.state.SendeditableTabs.forEach((item2) => {
|
|
|
|
|
if (
|
|
|
|
|
item2.data &&
|
|
|
|
|
item2.data.mblno == this.Backup_tableData[index].mblno &&
|
|
|
|
|
item2.data.EditType == this.Backup_tableData[index].EditType
|
|
|
|
|
) {
|
|
|
|
|
EditType = true;
|
|
|
|
|
this.$store.state.ListData = item2.data;
|
|
|
|
|
this.$store.state.SendeditableTabsValue = item2.name;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (!EditType) {
|
|
|
|
|
if (type == "历史记录") {
|
|
|
|
|
item = {
|
|
|
|
|
...item,
|
|
|
|
|
EditType: "历史记录",
|
|
|
|
|
};
|
|
|
|
|
} else if (type == "查看") {
|
|
|
|
|
item = {
|
|
|
|
|
...item,
|
|
|
|
|
EditType: "查看",
|
|
|
|
|
};
|
|
|
|
|
} else if (type == "复制") {
|
|
|
|
|
this.GetList();
|
|
|
|
|
let DelArr = [
|
|
|
|
|
// "gid",
|
|
|
|
|
"isDel",
|
|
|
|
|
"pid",
|
|
|
|
|
"hid",
|
|
|
|
|
"houseBillNo",
|
|
|
|
|
"mblno",
|
|
|
|
|
];
|
|
|
|
|
let data = { ...item };
|
|
|
|
|
|
|
|
|
|
data.houseList = [];
|
|
|
|
|
item.houseList.forEach((e, i) => {
|
|
|
|
|
if (scope.row.houseList_gid == e.gid) {
|
|
|
|
|
data.houseList.push(e);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (item == "houseDto") {
|
|
|
|
|
data.houseDto.forEach((arr, arrindex) => {
|
|
|
|
|
Object.keys(arr).forEach((item2) => {
|
|
|
|
|
DelArr.forEach((Del) => {
|
|
|
|
|
if (Del == item2) {
|
|
|
|
|
delete data.houseDto[arrindex][item2];
|
|
|
|
|
Object.keys(data).forEach((item) => {
|
|
|
|
|
DelArr.forEach((Del) => {
|
|
|
|
|
if (Del == item) {
|
|
|
|
|
delete data[item];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (item == "houseList") {
|
|
|
|
|
data.houseList.forEach((arr, arrindex) => {
|
|
|
|
|
Object.keys(arr).forEach((item2) => {
|
|
|
|
|
DelArr.forEach((Del) => {
|
|
|
|
|
if (Del == item2) {
|
|
|
|
|
delete data.houseList[arrindex][item2];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (item2 == "cntrList") {
|
|
|
|
|
data.houseList[arrindex].cntrList.forEach(
|
|
|
|
|
(arr2, arrindex2) => {
|
|
|
|
|
Object.keys(arr2).forEach((item3) => {
|
|
|
|
|
DelArr.forEach((Del) => {
|
|
|
|
|
if (Del == item3) {
|
|
|
|
|
delete data.houseList[arrindex].cntrList[
|
|
|
|
|
arrindex2
|
|
|
|
|
][item3];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
if (item2 == "cntrnoDto") {
|
|
|
|
|
data.houseDto[arrindex].cntrnoDto.forEach(
|
|
|
|
|
(arr2, arrindex2) => {
|
|
|
|
|
Object.keys(arr2).forEach((item3) => {
|
|
|
|
|
DelArr.forEach((Del) => {
|
|
|
|
|
if (Del == item3) {
|
|
|
|
|
delete data.houseDto[arrindex].cntrnoDto[
|
|
|
|
|
arrindex2
|
|
|
|
|
][item3];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
item = {
|
|
|
|
|
...data,
|
|
|
|
|
EditType: "复制",
|
|
|
|
|
// gid: "CopyData",
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let arr = { ...item };
|
|
|
|
|
arr.houseList.forEach((item) => {
|
|
|
|
|
if (item.gid == scope.row.houseList_gid) {
|
|
|
|
|
arr.houseList = [item];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
item = {
|
|
|
|
|
...data,
|
|
|
|
|
EditType: "复制",
|
|
|
|
|
gid: "CopyData",
|
|
|
|
|
};
|
|
|
|
|
this.ClickAdd(arr);
|
|
|
|
|
}
|
|
|
|
|
let arr = { ...item };
|
|
|
|
|
arr.houseDto.forEach((item) => {
|
|
|
|
|
if (item.gid == scope.row.houseDto_gid) {
|
|
|
|
|
arr.houseDto = [item];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.ClickAdd(arr);
|
|
|
|
|
this.$store.state.ListData = this.Backup_tableData[index];
|
|
|
|
|
}
|
|
|
|
|
this.$store.state.ListData = this.Backup_tableData[index];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
HederButtonSend() {
|
|
|
|
|
if (this.$refs.SendTable.selection.length) {
|
|
|
|
|
this.$refs.SendTable.selection.forEach((item) => {
|
|
|
|
|
Send({
|
|
|
|
|
ids: item.gid,
|
|
|
|
|
hid: item.houseDto_gid,
|
|
|
|
|
docType: "AMSAR",
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.message,
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
let hids = "";
|
|
|
|
|
console.log(this.$refs.SendTable.selection);
|
|
|
|
|
this.$refs.SendTable.selection.forEach((item, index) => {
|
|
|
|
|
index == 0
|
|
|
|
|
? (hids = item.houseList_gid)
|
|
|
|
|
: (hids = `${hids},${item.houseList_gid}`);
|
|
|
|
|
});
|
|
|
|
|
let ApiData = { hids, sendType: "2" };
|
|
|
|
|
Send(ApiData).then((res) => {
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.Message ? res.data.Message : res.data.message,
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
this.$refs.SendTable.selection.forEach((item, index) => {
|
|
|
|
|
this.$store.state.SendeditableTabs.forEach((item2, index) => {
|
|
|
|
|
if (item2.title == item.mblno) {
|
|
|
|
|
this.$store.state.SendeditableTabs.splice(index, 1);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
Object.assign(this.$data, this.$options.data());
|
|
|
|
|
this.GetList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.message,
|
|
|
|
|
type: "warning",
|
|
|
|
|
showClose: true,
|
|
|
|
|
duration: 0,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Object.assign(this.$data, this.$options.data());
|
|
|
|
|
this.GetList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.Message ? res.data.Message : res.data.message,
|
|
|
|
|
type: "warning",
|
|
|
|
|
showClose: true,
|
|
|
|
|
duration: 0,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
@ -498,31 +599,46 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
ClickAlter() {
|
|
|
|
|
if (this.$refs.SendTable.selection.length) {
|
|
|
|
|
this.$refs.SendTable.selection.forEach((item) => {
|
|
|
|
|
Send({ ids: item.gid, hid: item.houseDto_gid, docType: "AMSM" }).then(
|
|
|
|
|
(res) => {
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.message,
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
let hids = "";
|
|
|
|
|
this.$refs.SendTable.selection.forEach((item, index) => {
|
|
|
|
|
index == 0
|
|
|
|
|
? (hids = item.houseList_gid)
|
|
|
|
|
: (hids = `${hids},${item.houseList_gid}`);
|
|
|
|
|
});
|
|
|
|
|
let ApiData = { hids, sendType: "3" };
|
|
|
|
|
Send(ApiData).then((res) => {
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.Message ? res.data.Message : res.data.message,
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
this.$refs.SendTable.selection.forEach((item, index) => {
|
|
|
|
|
this.$store.state.SendeditableTabs.forEach((item2, index) => {
|
|
|
|
|
if (item2.title == item.mblno) {
|
|
|
|
|
this.$store.state.SendeditableTabs.splice(index, 1);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
Object.assign(this.$data, this.$options.data());
|
|
|
|
|
this.GetList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.message,
|
|
|
|
|
type: "warning",
|
|
|
|
|
showClose: true,
|
|
|
|
|
duration: 0,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Object.assign(this.$data, this.$options.data());
|
|
|
|
|
this.GetList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.Message ? res.data.Message : res.data.message,
|
|
|
|
|
type: "warning",
|
|
|
|
|
showClose: true,
|
|
|
|
|
duration: 0,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.Message ? res.data.Message : res.data.message,
|
|
|
|
|
type: "warning",
|
|
|
|
|
showClose: true,
|
|
|
|
|
duration: 0,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
@ -535,31 +651,46 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
ClickDelS() {
|
|
|
|
|
if (this.$refs.SendTable.selection.length) {
|
|
|
|
|
this.$refs.SendTable.selection.forEach((item) => {
|
|
|
|
|
Send({ ids: item.gid, hid: item.houseDto_gid, docType: "AMSD" }).then(
|
|
|
|
|
(res) => {
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.message,
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
let hids = "";
|
|
|
|
|
this.$refs.SendTable.selection.forEach((item, index) => {
|
|
|
|
|
index == 0
|
|
|
|
|
? (hids = item.houseList_gid)
|
|
|
|
|
: (hids = `${hids},${item.houseList_gid}`);
|
|
|
|
|
});
|
|
|
|
|
let ApiData = { hids, sendType: "4" };
|
|
|
|
|
Send(ApiData).then((res) => {
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
if (res.data.code == 200) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.Message ? res.data.Message : res.data.message,
|
|
|
|
|
type: "success",
|
|
|
|
|
});
|
|
|
|
|
this.$refs.SendTable.selection.forEach((item, index) => {
|
|
|
|
|
this.$store.state.SendeditableTabs.forEach((item2, index) => {
|
|
|
|
|
if (item2.title == item.mblno) {
|
|
|
|
|
this.$store.state.SendeditableTabs.splice(index, 1);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
Object.assign(this.$data, this.$options.data());
|
|
|
|
|
this.GetList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.message,
|
|
|
|
|
type: "warning",
|
|
|
|
|
showClose: true,
|
|
|
|
|
duration: 0,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Object.assign(this.$data, this.$options.data());
|
|
|
|
|
this.GetList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.Message ? res.data.Message : res.data.message,
|
|
|
|
|
type: "warning",
|
|
|
|
|
showClose: true,
|
|
|
|
|
duration: 0,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: res.data.Message ? res.data.Message : res.data.message,
|
|
|
|
|
type: "warning",
|
|
|
|
|
showClose: true,
|
|
|
|
|
duration: 0,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.$message({
|
|
|
|
@ -573,7 +704,7 @@ export default {
|
|
|
|
|
// ClickDel(scope) {
|
|
|
|
|
// Send({ ids: scope.row.gid, docType: "AMSD" }).then((res) => {
|
|
|
|
|
// this.$message({
|
|
|
|
|
// message: res.data.message,
|
|
|
|
|
// message: res.data.Message ? res.data.Message : res.data.message,
|
|
|
|
|
// type: "success",
|
|
|
|
|
// });
|
|
|
|
|
// this.$store.state.SendeditableTabs.forEach((item, index) => {
|
|
|
|
|