master
张同海 11 months ago
parent b93ff5ed36
commit f6107649a0

@ -11,22 +11,46 @@ const GetToken = (data) => {
});
};
// 查询
const Load = (params) => {
const PageData = (params) => {
return request({
data: {
url: "/api/Ams/Load",
url: "/api/Afr/PageData",
method: "get",
params,
headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 获取历史记录
const GetHistory = (params) => {
return request({
data: {
url: "/api/Afr/GetHistory",
method: "get",
params,
headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 查询
const Detail = (params) => {
return request({
data: {
url: "/api/Afr/Detail",
method: "get",
params,
headers: { Authorization: localStorage.getItem("token") },
},
});
};
// 删除
const Del = (params) => {
return request({
data: {
url: "/api/Ams/Del",
method: "get",
url: "/api/Afr/Del",
method: "post",
params,
headers: { Authorization: localStorage.getItem("token") },
},
@ -36,7 +60,7 @@ const Del = (params) => {
const AddOrUpdate = (data) => {
return request({
data: {
url: "/api/Ams/AddOrUpdate",
url: "/api/Afr/AddOrUpdate",
method: "post",
data,
headers: { Authorization: localStorage.getItem("token") },
@ -47,7 +71,7 @@ const AddOrUpdate = (data) => {
const Send = (params) => {
return request({
data: {
url: "/api/Ams/Send",
url: "/api/Afr/Send",
method: "get",
params,
headers: { Authorization: localStorage.getItem("token") },
@ -58,7 +82,7 @@ const Send = (params) => {
const GetCARRIER = () => {
return request({
data: {
url: "/GetCARRIER",
url: "/api/Common/GetCARRIER",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
},
@ -68,7 +92,7 @@ const GetCARRIER = () => {
const GetCTNALL = () => {
return request({
data: {
url: "/GetCTNALL",
url: "/api/Common/GetCTNALL",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
},
@ -78,7 +102,7 @@ const GetCTNALL = () => {
const GetKINDPKGS = () => {
return request({
data: {
url: "/GetPackage",
url: "/api/Common/GetPackage",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
},
@ -99,7 +123,7 @@ const GetDangerousGoods = (params) => {
const GetCountry = () => {
return request({
data: {
url: "/GetCountry",
url: "/api/Common/GetCountry",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
},
@ -109,7 +133,7 @@ const GetCountry = () => {
const GetCodePortLoad = (params) => {
return request({
data: {
url: "/GetCodePortLoad",
url: "/api/Common/GetPort",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
params,
@ -120,7 +144,7 @@ const GetCodePortLoad = (params) => {
const GetPort = (params) => {
return request({
data: {
url: "/GetPort",
url: "/api/Common/GetPort",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
params,
@ -131,7 +155,7 @@ const GetPort = (params) => {
const GetVessel = (params) => {
return request({
data: {
url: "/GetVessel",
url: "/api/Common/GetVessel",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
params,
@ -195,7 +219,9 @@ const GetSASCCODE = (params) => {
});
};
export {
Load,
PageData,
GetHistory,
Detail,
Del,
Send,
AddOrUpdate,

@ -58,7 +58,7 @@ const Send = (params) => {
const GetCARRIER = () => {
return request({
data: {
url: "/AMS/GetCARRIER",
url: "/AFR/GetCARRIER",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
},
@ -68,7 +68,7 @@ const GetCARRIER = () => {
const GetCTNALL = () => {
return request({
data: {
url: "/AMS/GetCTNALL",
url: "/AFR/GetCTNALL",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
},
@ -78,7 +78,7 @@ const GetCTNALL = () => {
const GetKINDPKGS = () => {
return request({
data: {
url: "/AMS/GetPackage",
url: "/AFR/GetPackage",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
},
@ -88,7 +88,7 @@ const GetKINDPKGS = () => {
const GetDangerousGoods = (params) => {
return request({
data: {
url: "/AMS/GetDangerousGoods",
url: "/AFR/GetDangerousGoods",
method: "get",
params,
headers: { Authorization: localStorage.getItem("token") },
@ -99,7 +99,7 @@ const GetDangerousGoods = (params) => {
const GetCountry = () => {
return request({
data: {
url: "/AMS/GetCountry",
url: "/AFR/GetCountry",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
},
@ -109,7 +109,7 @@ const GetCountry = () => {
const GetCodePortLoad = (params) => {
return request({
data: {
url: "/AMS/GetCodePortLoad",
url: "/AFR/GetCodePortLoad",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
params,
@ -120,7 +120,7 @@ const GetCodePortLoad = (params) => {
const GetPort = (params) => {
return request({
data: {
url: "/AMS/GetPort",
url: "/AFR/GetPort",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
params,
@ -131,7 +131,7 @@ const GetPort = (params) => {
const GetVessel = (params) => {
return request({
data: {
url: "/AMS/GetVessel",
url: "/AFR/GetVessel",
method: "get",
headers: { Authorization: localStorage.getItem("token") },
params,

@ -12,6 +12,7 @@ Vue.use(VueEasytable);
Vue.use(VueRouter);
Vue.use(ElementUI);
Vue.config.productionTip = false;
// axios.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8";
Vue.prototype.$axios = axios;
const router = new VueRouter({
routes: routes,

@ -16,7 +16,7 @@ export default ({ data }) => {
function (config) {
// if (data.url !== "/user/login") {
// config.headers["Authorization"] =
// "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkQ1RTkxMDI5OUU0RURFNUZEM0EwNTJBMEFDRDUzMUQzIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2NjkxMDE5NTMsImV4cCI6MTY2OTE0NTE1MywiaXNzIjoiaHR0cDovLzYwLjIwOS4xMjUuMjM4OjM1MTAxIiwiY2xpZW50X2lkIjoiZGp5dXNlciIsInN1YiI6ImQ4NWZkNTkwLWQ5ZjYtNDQxMC05M2ExLWY2ZmFjNzdiNjA2ZSIsImF1dGhfdGltZSI6MTY2OTEwMTk1MywiaWRwIjoibG9jYWwiLCJsb2dpbnR5cGUiOiIyIiwibG9naW5pZCI6ImQ4NWZkNTkwLWQ5ZjYtNDQxMC05M2ExLWY2ZmFjNzdiNjA2ZSIsImp0aSI6IkYxQ0IwMjJCOEM3MTA1QjMxRjcxMUM4QzBGN0FDMEUyIiwiaWF0IjoxNjY5MTAxOTUzLCJzY29wZSI6WyJvcGVuaWQiLCJwcm9maWxlIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbIjIiXX0.RvXAXPPoVob5Lb0-SHYuQ4o6HjCtHBGYNyhEoKKovxLk4151LFSAsqylyY0zggh-TzZ1w5FkiCCclLNDFYmpf_Uniw57InpPKzRwIBF4bvuRz2923eU6QU0MV2Y_vJ_Y9LZ9S5nHrejo7NAEURCHvEnjeqTRFr_CwL4g0cmS2uFmMou2ycdngXbWpkJnkJ-7usmvxXhUhDFFAqlEOEFH51vx80WqbLI7KD2qgAR0xgeo-A-HRdKeho1bg1ZjheF-07bxWRhm7NCxkNlwt5hQdpeEyXWbq5WV-WMwyjFB-i2zuDV_2UP8DTML9ew2uJ4rAgsxMbLdUcXSelq6BBgXfQ";
// "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IkQ1RTkxMDI5OUU0RURFNUZEM0EwNTJBMEFDRDUzMUQzIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE3MDQzNTQ1NTMsImV4cCI6MTcwNDM5Nzc1MywiaXNzIjoiaHR0cDovLzYwLjIwOS4xMjUuMjM4OjQwNTAxIiwiY2xpZW50X2lkIjoiZGp5dXNlciIsInN1YiI6ImQ4NWZkNTkwLWQ5ZjYtNDQxMC05M2ExLWY2ZmFjNzdiNjA2ZSIsImF1dGhfdGltZSI6MTcwNDM1NDU1MywiaWRwIjoibG9jYWwiLCJsb2dpbnR5cGUiOiIyIiwibG9naW5pZCI6ImQ4NWZkNTkwLWQ5ZjYtNDQxMC05M2ExLWY2ZmFjNzdiNjA2ZSIsImp0aSI6IjRENDgwNDg2NjIyNTUwNkRDQzUyNzc3NkY0QTkyNzZDIiwiaWF0IjoxNzA0MzU0NTUzLCJzY29wZSI6WyJvcGVuaWQiLCJwcm9maWxlIiwib2ZmbGluZV9hY2Nlc3MiXSwiYW1yIjpbIjIiXX0.qcr2OGT-g0rx9gl4cz21lZyn5Ry26S9BCoUa5KKqWK7WMUkZRLx-XBd3QadapsauUZ7_hHKcC2ijPX1YDC248S8TUrSdgIJ-ClLS8hHME-lr3GkHb5aEXwR2jQJq3trFEoEv-TD1mKCN9bqurqERLLC_a1wUKDIMX1aCH-sq0CjkwEUMoELddVpuwST7QtpGLpHgI3SwLmSdCAcXvKBlPRlOlXa-zpJCNBHeeUyyD70BPkdFWML0QTQ1Gwgqj34fAsmOgaziaRAjs8ofGXZw0bnTzC3TpVYTmJDd_1rnqaGyW7H9hPcPASDyWL6pxK4z8PxsVsj-hfbsJDy0F7yyXw";
// }
return config;
},

@ -1,6 +1,6 @@
import Vue from "vue";
import Vuex from "vuex";
import { Detail, GetHistory } from "@/api/views/AmsIndex";
//1、注册
Vue.use(Vuex);
@ -11,7 +11,7 @@ const store = new Vuex.Store({
editableTabsValue: "0",
editableTabs: [
{
title: "AMS列表",
title: "AFR列表",
name: "0",
},
],
@ -28,15 +28,49 @@ const store = new Vuex.Store({
getters: {},
mutations: {
AddTabs(state, payload) {
let newTabName = ++state.tabIndex + "";
state.editableTabs.push({
title: payload && payload.mblno ? payload.mblno : "New Tab",
name: newTabName,
data: payload ? payload : {},
});
state.editableTabsValue = newTabName;
console.log(payload);
if (payload && payload.mblno) {
Detail({ gid: payload.gid }).then((res) => {
let newTabName = ++state.tabIndex + "";
state.editableTabs.push({
title: payload.mblno,
name: newTabName,
data: res.data.result,
});
state.editableTabsValue = newTabName;
});
} else {
let newTabName = ++state.tabIndex + "";
state.editableTabs.push({
title: "New Tab",
name: newTabName,
data: {},
});
state.editableTabsValue = newTabName;
}
},
AddSendTabs(state, payload) {
// let title = "";
// if (payload) {
// if (payload.EditType == "历史记录") {
// title = "历史记录";
// } else if (payload.EditType == "查看") {
// title = `查看${payload.mblno}`;
// } else if (payload.EditType == "复制") {
// title = `复制`;
// } else {
// title = payload.mblno;
// }
// } else {
// title = "New Tab";
// }
// let newTabName = ++state.SendtabIndex + "";
// state.SendeditableTabs.push({
// title,
// name: newTabName,
// data: payload ? payload : {},
// });
// state.SendeditableTabsValue = newTabName;
let title = "";
if (payload) {
if (payload.EditType == "历史记录") {
@ -51,13 +85,51 @@ const store = new Vuex.Store({
} else {
title = "New Tab";
}
let newTabName = ++state.SendtabIndex + "";
state.SendeditableTabs.push({
title,
name: newTabName,
data: payload ? payload : {},
});
state.SendeditableTabsValue = newTabName;
console.log(title, payload);
if (payload) {
Detail({ gid: payload.gid }).then((res) => {
if (payload.EditType == "复制") {
payload.gid = "CopyData";
}
let newTabName = ++state.SendtabIndex + "";
let data;
payload.houseList.forEach((item) => {
res.data.result.houseList.forEach((item2) => {
if (item2.gid == item.gid) {
data = { ...payload, houseList: [item2] };
}
});
});
if (payload.EditType == "历史记录") {
GetHistory({ gid: payload.gid }).then((res) => {
console.log(res);
data = { ...payload, history: res.data.result };
state.SendeditableTabs.push({
title,
name: newTabName,
data,
});
state.SendeditableTabsValue = newTabName;
});
} else {
state.SendeditableTabs.push({
title,
name: newTabName,
data,
});
state.SendeditableTabsValue = newTabName;
}
});
} else {
let newTabName = ++state.SendtabIndex + "";
state.SendeditableTabs.push({
title,
name: newTabName,
data: {},
});
state.SendeditableTabsValue = newTabName;
}
},
},

File diff suppressed because it is too large Load Diff

@ -22,7 +22,7 @@
<el-input
size="small"
placeholder="货代提单号"
v-model="search_data.HBLNO"
v-model="search_data.HouseBillNo"
>
</el-input>
<el-date-picker
@ -46,24 +46,24 @@
<!-- <el-input
size="small"
placeholder="卸货港"
v-model="search_data.PORTDISCHARGECode"
v-model="search_data.DischargeHarbour"
>
</el-input> -->
<el-select
size="small"
v-model="search_data.PORTDISCHARGECode"
v-model="search_data.DischargeHarbour"
filterable
remote
clearable
:remote-method="remoteMethodLoadingPort"
placeholder="请选择卸货港"
@focus="SelectFocus"
>
<!-- :remote-method="remoteMethodLoadingPort" -->
<el-option
v-for="item in PortData"
:key="`portdischarge${item.code}`"
:label="item.value"
:value="item.code"
:value="item.value"
>
</el-option>
</el-select>
@ -82,28 +82,37 @@
height="calc(100vh - 230px)"
style="width: 100%"
@row-dblclick="RowDblclick"
:span-method="objectSpanMethod"
:header-cell-style="{ background: 'rgb(160, 207, 255)', color: '#fff' }"
:span-method="objectSpanMethod"
>
<el-table-column prop="mblno" type="selection" width="50" align="center">
<el-table-column
prop="selection"
type="selection"
width="50"
align="center"
></el-table-column>
<el-table-column prop="mblno" label="船东提单号"> </el-table-column>
<el-table-column prop="houseList_houseBillNo" label="货代提单号">
</el-table-column>
<el-table-column prop="mblno" label="船东提单号"></el-table-column>
<el-table-column prop="houseDto_hblNo" label="货代提单号">
<el-table-column prop="shipCompanyName" 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="loadHarbour" label="装货港"> </el-table-column>
<el-table-column prop="dischargeHarbour" label="卸货港">
</el-table-column>
<el-table-column prop="sasccode" 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="portdischarge" label="卸货港"></el-table-column>
<el-table-column prop="lastUpdate" label="最近编辑时间" width="160">
<template slot-scope="scope">
<i class="el-icon-time" />
{{ moment(scope.row.lastUpdate).format("YYYY-MM-DD HH:mm") }}
{{
scope.row.lastUpdate
? moment(scope.row.lastUpdate).format("YYYY-MM-DD HH:mm")
: "-"
}}
</template>
</el-table-column>
<el-table-column prop="historyDto_operator" label="操作人">
<el-table-column prop="history_operator" label="操作人">
</el-table-column>
<el-table-column prop="compName" label="所属公司"></el-table-column>
<el-table-column prop="compName" label="所属公司"> </el-table-column>
<el-table-column prop="operation" label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="ClickEdit(scope)"></el-button>
@ -112,6 +121,35 @@
</el-button>
</template>
</el-table-column>
<!-- <el-table-column
v-for="item in tableF"
:key="item.prop"
:type="item.type"
:prop="item.prop"
:width="item.width"
:align="item.align"
:label="item.label"
>
<template slot-scope="scope">
<span v-if="item.prop == 'lastUpdate'">
<i class="el-icon-time" />
{{
scope.row.lastUpdate
? moment(scope.row.lastUpdate).format("YYYY-MM-DD HH:mm")
: "-"
}}
</span>
<span v-else-if="item.prop == 'operation'">
<el-button type="text" @click="ClickEdit(scope)"></el-button>
<el-button type="text" style="color: red" @click="ClickDel(scope)">
删除
</el-button>
</span>
<span v-else-if="item.prop != 'selection'">
{{ scope.row[item.prop] }}
</span>
</template>
</el-table-column> -->
</el-table>
<!-- layout="total, sizes, prev, pager, next, jumper" -->
<!-- @size-change="handleSizeChange" -->
@ -119,9 +157,9 @@
<el-pagination
class="pagination"
background
:current-page="search_data.Page"
:current-page="search_data.pageNumber"
@current-change="handleCurrentChange"
:page-size="search_data.Limit"
:page-size="search_data.pageSize"
layout="total, prev, pager, next"
:total="search_data.total"
>
@ -130,12 +168,13 @@
</template>
<script>
import {
Load,
PageData,
Del,
Send,
GetPort,
GetToken,
GetSASCCODE,
GetTime,
} from "@/api/views/AmsIndex";
import moment from "moment";
export default {
@ -145,11 +184,12 @@ export default {
TableLoading: false,
moment,
search_data: {
ReportState: "0",
Page: 1,
Limit: 10,
MBLNO: "",
total: 0,
pageNumber: 1,
pageSize: 10,
type: "1",
// MBLNO: "",
// total: 0,
},
// ---------------------------------------------
tableData: [],
@ -163,6 +203,21 @@ export default {
},
},
SASCCODE: "",
tableF: [
{ prop: "selection", type: "selection", width: "50", align: "center" },
{ prop: "mblno", label: "船东提单号" },
{ prop: "houseList_houseBillNo", label: "货代提单号" },
{ prop: "shipCompanyName", label: "船公司" },
{ prop: "vessel", label: "船名" },
{ prop: "voyno", label: "航次" },
{ prop: "loadHarbour", label: "装货港" },
{ prop: "dischargeHarbour", label: "卸货港" },
{ prop: "lastUpdate", label: "最近编辑时间", width: "160" },
{ prop: "houseList_operator", label: "操作人" },
{ prop: "compName", label: "所属公司" },
{ prop: "operation", label: "操作", align: "center" },
],
tableD: [],
};
},
created() {},
@ -184,7 +239,7 @@ export default {
},
methods: {
Search() {
this.search_data.Page = 1;
this.search_data.pageNumber = 1;
this.GetList();
},
SelectFocus() {
@ -192,157 +247,154 @@ export default {
this.PortData = res.data.result;
});
},
remoteMethodLoadingPort(strlink) {
GetPort({ strlink }).then((res) => {
this.PortData = res.data.result;
});
},
// remoteMethodLoadingPort(strlink) {
// GetPort({ strlink }).then((res) => {
// this.PortData = res.data.result;
// });
// },
ChangeData(e) {
this.search_data.BDate = e[0];
this.search_data.CreateTimeStart = e[0];
let data = e[1].split("00:00:00")[0];
this.search_data.EDate = `${data}23:59:59`;
this.search_data.CreateTimeEnd = `${data}23:59:59`;
},
Reset() {
Object.assign(this.$data, this.$options.data());
this.GetList();
},
handleCurrentChange(val) {
this.search_data.Page = val;
this.search_data.pageNumber = val;
this.GetList();
},
handleSizeChange(val) {
this.search_data.Limit = val;
this.search_data.pageSize = val;
this.GetList();
},
GetList() {
this.tableD = [];
delete this.search_data.Data;
delete this.search_data.total;
this.TableLoading = true;
Load(this.search_data).then((res) => {
this.SpanMethod = [];
PageData(this.search_data).then((res) => {
// this.SpanMethod = [];
if (res.data.code == 200) {
let obj = [];
this.search_data.total = res.data.count;
res.data.data.forEach((item, index) => {
this.SpanMethod[index] = [[0], [0, 0]];
// let historyDtoData = {};
// item.historyDto.forEach((item2, index2) => {
// Object.keys(item2).forEach((HistoryDto) => {
// historyDtoData[`historyDto_${HistoryDto}`] = item2[HistoryDto];
// });
// });
// if (item.houseDto.length == 0) {
// obj = [
// ...obj,
// {
// ...item,
// ...historyDtoData,
// },
// ];
// if (index == 0) {
// this.SpanMethod[index][1] = [0, 0];
// } else {
// this.SpanMethod[index][1] = [
// this.SpanMethod[index - 1][1][0] +
// this.SpanMethod[index - 1][1][1],
// 0,
// ];
// }
// }
item.houseDto.forEach((item2, index2) => {
let historyDtoData = {};
Object.keys(item2.historyDto[0]).forEach((HistoryDto) => {
historyDtoData[`historyDto_${HistoryDto}`] =
item2.historyDto[0][HistoryDto];
res.data.result.forEach((item, index) => {
// this.SpanMethod[index] = [[0], [0, 0]];
let houseListData = {};
let historyData = {};
if (item.history) {
// item.history.forEach((item2, index2) => {
Object.keys(item.history).forEach((HistoryDto) => {
historyData[`history_${HistoryDto}`] = item.history[HistoryDto];
});
// if (item.houseDto.length == 0) {
// obj = [
// ...obj,
// {
// ...item,
// ...historyDtoData,
// },
// ];
// if (index == 0) {
// this.SpanMethod[index][1] = [0, 0];
// } else {
// this.SpanMethod[index][1] = [
// this.SpanMethod[index - 1][1][0] +
// this.SpanMethod[index - 1][1][1],
// 0,
// ];
// }
// }
this.SpanMethod[index][0].push(
this.SpanMethod[index][1][
this.SpanMethod[index][1].length - 1
] + item2.cntrnoDto.length
);
let houseDtoData = {};
Object.keys(item2).forEach((HouseDtoKey) => {
houseDtoData[`houseDto_${HouseDtoKey}`] = item2[HouseDtoKey];
});
if (item2.cntrnoDto.length == 0) {
// });
}
if (item.houseList.length) {
item.houseList.forEach((item2, index2) => {
Object.keys(item2).forEach((HistoryDto) => {
houseListData[`houseList_${HistoryDto}`] = item2[HistoryDto];
});
obj = [
...obj,
{
...item,
...houseDtoData,
...historyDtoData,
...houseListData,
...historyData,
},
];
if (index == 0) {
this.SpanMethod[index][1] = [
0,
this.SpanMethod[index][1][1] + 1,
];
} else {
this.SpanMethod[index][1] = [
this.SpanMethod[index - 1][1][0] +
this.SpanMethod[index - 1][1][1],
this.SpanMethod[index][1][1] + 1,
];
}
});
}
});
console.log(obj);
// this.search_data.total = res.data.count;
this.Backup_tableData = res.data.result;
this.tableData = obj;
// columnIndex rowIndex
let pid = 0;
let columnNum = 0;
let Num = 0;
this.tableData.forEach((item, index) => {
this.tableD.push([]);
if (index != 0) {
if (pid == (item.houseList_pid ? item.houseList_pid : item.gid)) {
columnNum = columnNum + 1;
} else {
item2.cntrnoDto.forEach((item3, index3) => {
if (index == 0) {
this.SpanMethod[index][1] = [
0,
this.SpanMethod[index][1][1] + 1,
];
} else {
this.SpanMethod[index][1] = [
this.SpanMethod[index - 1][1][0] +
this.SpanMethod[index - 1][1][1],
this.SpanMethod[index][1][1] + 1,
];
}
columnNum = 0;
pid = item.houseList_pid ? item.houseList_pid : item.gid;
}
} else {
// columnNum = columnNum + 1;
pid = item.houseList_pid ? item.houseList_pid : item.gid;
}
let CntrnoDtoData = {};
Object.keys(item3).forEach((CntrnoDtoKey) => {
CntrnoDtoData[`CntrnoDto_${CntrnoDtoKey}`] =
item3[CntrnoDtoKey];
});
obj = [
...obj,
{
...item,
...houseDtoData,
...historyDtoData,
...CntrnoDtoData,
},
];
});
if (index <= this.tableData.length - 1) {
if (index == this.tableData.length - 1) {
Num = columnNum + 1;
} else {
if (
(this.tableData[index + 1].houseList_pid
? this.tableData[index + 1].houseList_pid
: this.tableData[index + 1].gid) != pid
) {
Num = columnNum + 1;
}
}
}
this.tableF.forEach((item2, index2) => {
this.tableD[index].push([]);
if (item2.prop == "houseList_houseBillNo") {
this.tableD[index][index2] = [
item.houseList_pid ? item.houseList_pid : item.gid,
item2.prop,
1,
1,
];
} else {
this.tableD[index][index2] = [
item.houseList_pid ? item.houseList_pid : item.gid,
item2.prop,
Num,
Num == 0 ? 0 : 1,
];
}
});
Num = 0;
});
this.search_data.total = res.data.count;
this.Backup_tableData = res.data.data;
this.tableData = obj;
let TData = [];
let STData = [];
let TDataIDS = [];
this.tableD.forEach((item, index) => {
if (!TDataIDS.includes(item[0][0])) {
if (index != 0) {
TData.push(...STData.reverse());
STData = [];
STData.push(item);
TDataIDS.push(item[0][0]);
} else {
STData.push(item);
TDataIDS.push(item[0][0]);
}
} else {
if (index == this.tableD.length - 1) {
STData.push(item);
TData.push(...STData.reverse());
STData = [];
TDataIDS = [];
} else {
STData.push(item);
}
}
});
this.tableD = TData;
console.log(this.tableD);
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,
@ -357,16 +409,17 @@ export default {
this.$refs.Table.selection.forEach((item, index) => {
index == 0 ? (ids = item.gid) : (ids = `${ids},${item.gid}`);
});
Send({ ids, docType: "AMSDOC" }).then((res) => {
let ApiData = { ids, sendType: "1" };
Send(ApiData).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.message,
message: res.data.Message ? res.data.Message : res.data.message,
type: "success",
});
this.GetList();
} else {
this.$message({
message: res.data.message,
message: res.data.Message ? res.data.Message : res.data.message,
type: "warning",
showClose: true,
duration: 0,
@ -394,6 +447,7 @@ export default {
this.ClickEdit({ row });
},
ClickEdit(scope) {
console.log(scope);
this.Backup_tableData.forEach((item, index) => {
if (scope.row.gid == item.gid) {
let EditType = false;
@ -410,20 +464,18 @@ export default {
if (!EditType) {
this.ClickAdd(item);
}
this.Backup_tableData[index].houseDto.forEach((item, index) => {
this.Backup_tableData[index].houseList.forEach((item, index) => {
item.WebHouseDtoId = index;
console.log(item);
});
this.$store.state.ListData = this.Backup_tableData[index];
}
});
console.log(this.$store.state.ListData);
},
ClickDel(scope) {
Del({ ids: scope.row.gid }).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.message,
message: res.data.Message ? res.data.Message : res.data.message,
type: "success",
});
this.$store.state.editableTabs.forEach((item, index) => {
@ -435,7 +487,7 @@ export default {
this.GetList();
} else {
this.$message({
message: res.data.message,
message: res.data.Message ? res.data.Message : res.data.message,
type: "warning",
showClose: true,
duration: 0,
@ -444,36 +496,17 @@ export default {
});
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let prefix = column.property.split("_")[0];
let rowspan = 0;
let colspan = 0;
this.SpanMethod.forEach((item, index) => {
if (prefix == "houseDto") {
item[0].forEach((num, nindex) => {
if (rowIndex == item[1][0] + num) {
rowspan = item[0][nindex + 1] - item[0][nindex];
colspan = 1;
}
});
} else if (prefix == "CntrnoDto") {
rowspan = 1;
colspan = 1;
} else if (prefix == "historyDto") {
if (rowIndex == item[1][0]) {
rowspan = item[1][1];
colspan = 1;
}
} else {
if (rowIndex == item[1][0]) {
rowspan = item[1][1];
colspan = 1;
}
}
});
return {
rowspan,
colspan,
};
if (this.tableD[rowIndex] && this.tableD[rowIndex][columnIndex][2]) {
return {
rowspan: this.tableD[rowIndex][columnIndex][2],
colspan: this.tableD[rowIndex][columnIndex][3],
};
} else {
return {
rowspan: 0,
colspan: 0,
};
}
},
},
};

@ -242,7 +242,7 @@ export default {
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,
@ -261,7 +261,7 @@ export default {
this.Reset();
} else {
this.$message({
message: res.data.message,
message: res.data.Message ? res.data.Message : res.data.message,
type: "warning",
showClose: true,
duration: 0,
@ -286,13 +286,13 @@ export default {
DeleteTemplate({ ids: item.gid }).then((res) => {
if (res.data.code == 200) {
this.$message({
message: res.data.message,
message: res.data.Message ? res.data.Message : res.data.message,
type: "success",
});
this.Reset();
} else {
this.$message({
message: res.data.message,
message: res.data.Message ? res.data.Message : res.data.message,
type: "warning",
showClose: true,
duration: 0,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -9,10 +9,10 @@
>
<el-row class="HeadRow">
<el-col :span="6">
<el-form-item label="HBL No" prop="carrier">
<el-form-item label="货代提单号" prop="houseBillNo">
<el-input
v-model="form.houseDto[0].hblNo"
placeholder="请输入HBL No"
v-model="form.houseList[0].houseBillNo"
placeholder="请输入货代提单号"
>
</el-input>
</el-form-item>
@ -24,9 +24,9 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="船公司" prop="carrier">
<el-form-item label="船公司" prop="shipCompanyCode">
<el-input
v-model="form.carrier"
v-model="form.shipCompanyCode"
placeholder="请输入船公司"
></el-input>
</el-form-item>
@ -42,17 +42,17 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="装货港" prop="loadingPort">
<el-form-item label="装货港" prop="loadHarbour">
<el-input
v-model="form.loadingPort"
v-model="form.loadHarbour"
placeholder="请输入装货港"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="预计出发" prop="eta">
<el-form-item label="预计开船日期" prop="loadDate">
<el-date-picker
v-model="form.eta"
v-model="form.loadDate"
type="datetime"
placeholder="选择日期时间"
style="width: 100%"
@ -61,17 +61,17 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="卸货港" prop="portdischarge">
<el-form-item label="卸货港" prop="dischargeHarbour">
<el-input
v-model="form.portdischarge"
v-model="form.dischargeHarbour"
placeholder="请输入卸货港"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="预计到达" prop="etd">
<el-form-item label="预计到达日期" prop="estimatedArrivalTime">
<el-date-picker
v-model="form.etd"
v-model="form.estimatedArrivalTime"
type="datetime"
placeholder="选择日期时间"
style="width: 100%"
@ -79,14 +79,14 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<!-- <el-col :span="6">
<el-form-item label="SASC CODE" prop="loadingPort">
<el-input
v-model="form.SascCode"
placeholder="请输入SASC CODE"
></el-input>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
</el-form>
<div class="CsFlex">
@ -182,15 +182,19 @@ export default {
Object.assign(this.$data.form, this.$options.data().form);
} else {
let form = { ...newData };
form.houseDto.forEach((item, index) => {
item.cntrnoDto.forEach((item2, index2) => {
form.houseList.forEach((item, index) => {
item.cntrList.forEach((item2, index2) => {
item2.rowKey = index2;
item2.name = `${index}-${index2 + 1}`;
});
});
this.form = form;
this.form.SascCode = "NIAV";
console.log(this.form.houseDto[0].historyDto);
this.form.houseDto[0].historyDto.forEach((item) => {
console.log(this.form.history);
// this.Type0.push(this.form.history);
// this.Type1.push(this.form.history);
this.form.history.forEach((item) => {
if (item.type == 0) {
//
this.Type0.push(item);

@ -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,01)
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
//IE10blobdownload
if ("download" in document.createElement("a")) {
//adownload
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,01)
// 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
// //IE10blobdownload
// if ("download" in document.createElement("a")) {
// //adownload
// 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) => {

@ -14,17 +14,17 @@ module.exports = defineConfig({
proxy: {
// 跨域处理
"/api": {
target: "http://60.209.125.238:30816/api", //目标接口域名
target: "http://60.209.125.238:30818/api", //目标接口域名
changeOrigin: true, //是否跨域
pathRewrite: {
"^/api": "", //重写接口
},
},
"/AMS": {
target: "http://60.209.125.238:30816", //目标接口域名
"/Afr": {
target: "http://60.209.125.238:30818", //目标接口域名
changeOrigin: true, //是否跨域
pathRewrite: {
"^/AMS": "", //重写接口
"^/Afr": "", //重写接口
},
},
},

Loading…
Cancel
Save