|
@@ -78,6 +78,7 @@
|
|
|
<div>
|
|
<div>
|
|
|
<el-button
|
|
<el-button
|
|
|
v-if="cacheList.length > 1"
|
|
v-if="cacheList.length > 1"
|
|
|
|
|
+ v-auth="'MERGEVOYAGE'"
|
|
|
class="mr20"
|
|
class="mr20"
|
|
|
@click="showMergeModal()"
|
|
@click="showMergeModal()"
|
|
|
size="medium"
|
|
size="medium"
|
|
@@ -675,6 +676,23 @@
|
|
|
min-width="100"
|
|
min-width="100"
|
|
|
align="center"
|
|
align="center"
|
|
|
></el-table-column> -->
|
|
></el-table-column> -->
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-auth="'UNMERGEVOYAGE'"
|
|
|
|
|
+ label="解除"
|
|
|
|
|
+ min-width="80"
|
|
|
|
|
+ align="center"
|
|
|
|
|
+ v-if="status == 5"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template v-slot="scope">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ @click="showUnmergeModal(scope.row.id)"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ >
|
|
|
|
|
+ 解除合并
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
v-auth="'VOYAGEDETAIL'"
|
|
v-auth="'VOYAGEDETAIL'"
|
|
|
label="操作"
|
|
label="操作"
|
|
@@ -751,6 +769,7 @@ async function getVoyageList(type) {
|
|
|
function changeVoyageType(s) {
|
|
function changeVoyageType(s) {
|
|
|
currentPage.value = 1;
|
|
currentPage.value = 1;
|
|
|
status.value = s;
|
|
status.value = s;
|
|
|
|
|
+ cacheList.value = [];
|
|
|
getVoyageList(1);
|
|
getVoyageList(1);
|
|
|
}
|
|
}
|
|
|
async function voyageDetail(id) {
|
|
async function voyageDetail(id) {
|
|
@@ -1231,7 +1250,6 @@ function preSelect(e, row) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
function preSelectAll(e) {
|
|
function preSelectAll(e) {
|
|
|
- console.log(e);
|
|
|
|
|
if (!e.length) {
|
|
if (!e.length) {
|
|
|
let arr = tableData.value;
|
|
let arr = tableData.value;
|
|
|
cacheList.value = cacheList.value.filter(
|
|
cacheList.value = cacheList.value.filter(
|
|
@@ -1240,8 +1258,6 @@ function preSelectAll(e) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
function preSelectionChange(e) {
|
|
function preSelectionChange(e) {
|
|
|
- console.log(e);
|
|
|
|
|
-
|
|
|
|
|
cacheList.value = cacheList.value.concat(e);
|
|
cacheList.value = cacheList.value.concat(e);
|
|
|
cacheList.value = _.uniqWith(cacheList.value, _.isEqual);
|
|
cacheList.value = _.uniqWith(cacheList.value, _.isEqual);
|
|
|
}
|
|
}
|
|
@@ -1280,6 +1296,19 @@ async function mergeVoyage() {
|
|
|
clearMergeForm();
|
|
clearMergeForm();
|
|
|
getVoyageList();
|
|
getVoyageList();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+async function showUnmergeModal(voyageId) {
|
|
|
|
|
+ ElMessageBox.confirm("确认解除航次合并?", "解除合并", {
|
|
|
|
|
+ confirmButtonText: "确认",
|
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
|
+ type: "warning",
|
|
|
|
|
+ }).then(async () => {
|
|
|
|
|
+ let res = await api.unmergeVoyage({
|
|
|
|
|
+ voyageId,
|
|
|
|
|
+ });
|
|
|
|
|
+ getVoyageList();
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
function clearMergeForm() {
|
|
function clearMergeForm() {
|
|
|
mergeVisable.value = false;
|
|
mergeVisable.value = false;
|
|
|
mergeForm.value = {};
|
|
mergeForm.value = {};
|