Commit 3283e02d authored by youjie's avatar youjie

邮轮冲抵

parent 5a4444fd
...@@ -406,6 +406,9 @@ ...@@ -406,6 +406,9 @@
.c059FF6 { .c059FF6 {
color: #059ff6; color: #059ff6;
} }
.c3FC4FF {
color: #3fc4ff;
}
.c9e { .c9e {
color: #9e9e9e; color: #9e9e9e;
} }
......
...@@ -161,4 +161,88 @@ ...@@ -161,4 +161,88 @@
} }
.pointer{ .pointer{
cursor: pointer; cursor: pointer;
} }
\ No newline at end of file
.bgf {
background: #ffffff;
}
.bgf5 {
background: #f5f5f5;
}
.bgE8F5E9 {
background: #e8f5e9;
}
.bgD9F3FF {
background: #d9f3ff;
}
.bgFAEAED {
background: #faeaed;
}
.bg3FC4FF {
background: #3FC4FF;
}
.bgF1416C{
background: #F1416C;
}
.bgff9800{
background: #ff9800;
}
.bj {
background: #ffffff;
}
.bjFFF3E0 {
background: #FFF3E0;
}
.radius5 {
border-radius: 5px;
}
.cblack {
color: black;
}
.cf {
color: #ffffff;
}
.c9e {
color: #9e9e9e;
}
.c20C997 {
color: #20c997;
}
.c02C854 {
color: #02c854;
}
.cff9800 {
color: #ff9800;
}
.cF1416C {
color: #f1416c;
}
.cF57A98 {
color: #f57a98;
}
.c04C8C8 {
color: #04c8c8;
}
.c059FF6 {
color: #059ff6;
}
.c3FC4FF {
color: #3fc4ff;
}
...@@ -2,6 +2,14 @@ ...@@ -2,6 +2,14 @@
<div class="base-list-manager" :class="customClass"> <div class="base-list-manager" :class="customClass">
<!-- 查询工具栏 --> <!-- 查询工具栏 -->
<div class="query-toolbar"> <div class="query-toolbar">
<div v-if="headConfiguration">
<div v-if="headConfiguration.DocumentStatus" class="row justify-end mb-sm">
<p>
<span class="groupTourOrderByTuan_ico fz14"><i class="bg3FC4FF"></i><span>{{$t('fnc.yidadan')}}</span></span>
<span class="groupTourOrderByTuan_ico fz14"><i class="bgF1416C"></i><span>{{$t('fnc.yhcnyshenhe')}}</span></span>
<span class="groupTourOrderByTuan_ico fz14"><i class="bgff9800"></i><span>{{$t('fnc.ytongguo')}}</span></span></p>
</div>
</div>
<el-button v-if="addActionConfig" size="medium" @click="handleAddAction">{{addActionConfig.buttonText||'新增'}}</el-button> <el-button v-if="addActionConfig" size="medium" @click="handleAddAction">{{addActionConfig.buttonText||'新增'}}</el-button>
<!-- 高级查询 --> <!-- 高级查询 -->
...@@ -29,7 +37,7 @@ ...@@ -29,7 +37,7 @@
<!-- 选择器 --> <!-- 选择器 -->
<el-select v-else-if="field.type === 'select'" v-model="advancedFilters[field.key]" <el-select v-else-if="field.type === 'select'" v-model="advancedFilters[field.key]"
:placeholder="field.placeholder" clearable size="small"> :placeholder="field.placeholder" clearable size="small" :filterable="field.filterable">
<el-option v-for="option in field.options" :key="option.value" :label="option.label" <el-option v-for="option in field.options" :key="option.value" :label="option.label"
:value="option.value"> :value="option.value">
</el-option> </el-option>
...@@ -72,8 +80,9 @@ ...@@ -72,8 +80,9 @@
<!-- 表格区域 --> <!-- 表格区域 -->
<div class="table-container"> <div class="table-container">
<el-table ref="table" :data="dataList" :loading="loading" v-bind="tableConfig" <el-table ref="table" :data="dataList" :loading="loading" v-bind="tableConfig"
@selection-change="handleSelectionChange" @sort-change="handleSortChange" @row-click="handleRowClick"> @selection-change="handleSelectionChange" @sort-change="handleSortChange"
@row-click="handleRowClick">
<!-- 调试信息 --> <!-- 调试信息 -->
<!-- <div v-if="dataList.length === 0" style="padding: 20px; text-align: center; color: red;"> <!-- <div v-if="dataList.length === 0" style="padding: 20px; text-align: center; color: red;">
...@@ -83,7 +92,7 @@ ...@@ -83,7 +92,7 @@
<!-- 动态列 --> <!-- 动态列 -->
<template v-for="(column, index) in columns"> <template v-for="(column, index) in columns">
<!-- 选择列 --> <!-- 选择列 -->
<el-table-column v-if="column.type === 'selection'" :key="index" type="selection" v-bind="column"> <el-table-column v-if="column.type === 'selection'" :key="index" type="selection" v-bind="column" :selectable="selectable">
</el-table-column> </el-table-column>
<!-- 索引列 --> <!-- 索引列 -->
...@@ -191,6 +200,7 @@ ...@@ -191,6 +200,7 @@
<!-- 列内容 --> <!-- 列内容 -->
<template #default="scope"> <template #default="scope">
<!-- 这里判断是否有插槽 --> <!-- 这里判断是否有插槽 -->
<template v-if="$scopedSlots[column.slotName]"> <template v-if="$scopedSlots[column.slotName]">
<slot <slot
:name="column.slotName" :name="column.slotName"
...@@ -199,7 +209,6 @@ ...@@ -199,7 +209,6 @@
:$index="scope.$index" :$index="scope.$index"
/> />
</template> </template>
<!-- 链接类型 --> <!-- 链接类型 -->
<span v-else-if="column.type === 'link'" class="table-link" @click="handleLinkClick(scope.row, column)"> <span v-else-if="column.type === 'link'" class="table-link" @click="handleLinkClick(scope.row, column)">
{{ getColumnValue(scope.row, column) }} {{ getColumnValue(scope.row, column) }}
...@@ -213,7 +222,6 @@ ...@@ -213,7 +222,6 @@
<!-- 默认文本 --> <!-- 默认文本 -->
<span v-else :class="column.className"> <span v-else :class="column.className">
{{ getColumnValue(scope.row, column) || (column.emptyText || '-') }} {{ getColumnValue(scope.row, column) || (column.emptyText || '-') }}
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -262,7 +270,7 @@ export default { ...@@ -262,7 +270,7 @@ export default {
default: () => ({ default: () => ({
height: '100%', height: '100%',
border: true, border: true,
stripe: true, // stripe: true,
size: 'mini' size: 'mini'
}) })
}, },
...@@ -337,7 +345,13 @@ export default { ...@@ -337,7 +345,13 @@ export default {
customClass: { customClass: {
type: String, type: String,
default: '' default: ''
} },
// 头部额外配置
headConfiguration: {
type: Object,
default: null
},
}, },
data() { data() {
...@@ -359,7 +373,10 @@ export default { ...@@ -359,7 +373,10 @@ export default {
drawerData: null, drawerData: null,
// 选中行 // 选中行
selectedRows: [] selectedRows: [],
currentRow: null,//单选行
} }
}, },
...@@ -425,7 +442,6 @@ export default { ...@@ -425,7 +442,6 @@ export default {
} }
}, },
}, },
mounted() { mounted() {
...@@ -441,6 +457,19 @@ export default { ...@@ -441,6 +457,19 @@ export default {
}, },
methods: { methods: {
toggleSelection(rows) {
if (rows) {
rows.forEach(row => {
this.$refs.table.toggleRowSelection(row);
});
} else {
this.$refs.table.clearSelection();
}
},
// 行是否可选
selectable(row, index) {
return true;
},
// Popover 管理 // Popover 管理
closeAllPopovers() { closeAllPopovers() {
this.advancedSearchVisible = false; this.advancedSearchVisible = false;
...@@ -508,6 +537,12 @@ export default { ...@@ -508,6 +537,12 @@ export default {
// 表格事件处理 // 表格事件处理
handleSelectionChange(selection) { handleSelectionChange(selection) {
// 处理单选
if(!this.tableConfig.multiple){
for (let i = 0; i < selection.length - 1; i++) {
this.$refs.table.toggleRowSelection(selection[i]);
}
}
this.selectedRows = selection; this.selectedRows = selection;
this.$emit('selection-change', selection); this.$emit('selection-change', selection);
}, },
...@@ -644,4 +679,14 @@ export default { ...@@ -644,4 +679,14 @@ export default {
<style> <style>
@import './BaseListManager.css'; @import './BaseListManager.css';
@import '../../assets/css/flex.css';
/deep/.base-list-manager .el-table--border .el-table__cell:first-child .cell{
display: flex;
justify-content: center;
align-items: center;
}
/deep/.base-list-manager .el-table th.el-table__cell>.cell{
padding-left: 0 !important;
padding-right: 0 !important;
}
</style> </style>
...@@ -3,16 +3,7 @@ export const addEditMixin = { ...@@ -3,16 +3,7 @@ export const addEditMixin = {
data() { data() {
return { return {
//用户信息 //用户信息
userInfo: {}, userInfo: {},
//单选产品订单状态
OrderStatusType: [
{ Name: this.$t('OrderList.orderStatus.apply'), ID: '1' },
{ Name: this.$t('OrderList.orderStatus.check'), ID: '2' },
{ Name: this.$t('OrderList.orderStatus.cancel'), ID: '3' },
{ Name: this.$t('OrderList.orderStatus.sun'), ID: '4' },
],
//取消订单备注
cancelRemark: '',
}; };
}, },
created() { created() {
......
...@@ -29,6 +29,13 @@ export const listManagerMixin = { ...@@ -29,6 +29,13 @@ export const listManagerMixin = {
IsLeave: 0, IsLeave: 0,
}, },
EmployeeList: [],//员工 EmployeeList: [],//员工
//单选产品订单状态
OrderStatusType: [
// { Name: this.$t('OrderList.orderStatus.apply'), ID: '1' },
{ Name: this.$t('OrderList.orderStatus.check'), ID: '2' },
{ Name: this.$t('OrderList.orderStatus.cancel'), ID: '3' },
{ Name: this.$t('OrderList.orderStatus.sun'), ID: '4' },
],
}; };
}, },
created() { created() {
......
...@@ -429,13 +429,13 @@ ...@@ -429,13 +429,13 @@
<el-form :model="addMsg" :rules="rules" class="h-full" ref="addMsg" label-width="0"> <el-form :model="addMsg" :rules="rules" class="h-full" ref="addMsg" label-width="0">
<div class="hotel-form-container h-full"> <div class="hotel-form-container h-full">
<el-tabs v-model="activeTab" type="border-card" class="hotel-tabs"> <el-tabs v-model="activeTab" type="border-card" class="hotel-tabs">
<el-tab-pane label="OP" name="basic"> <el-tab-pane label="编辑OP" name="basic">
<div class="tab-content"> <div class="tab-content">
<el-row :gutter="16"> <el-row :gutter="16">
<el-col :span="19"> <el-col :span="19">
<el-form-item label="" prop="OpEmpId"> <el-form-item label="" prop="OpEmpId">
<el-select v-model="addMsg.OpEmpId" <el-select v-model="addMsg.OpEmpId"
multiple filterable collapse-tags placeholder="请选择OP"> multiple filterable placeholder="请选择OP">
<el-option v-for='item in EmployeeList' :label='item.EmName' <el-option v-for='item in EmployeeList' :label='item.EmName'
:value='item.EmployeeId' :key='item.EmployeeId'></el-option> :value='item.EmployeeId' :key='item.EmployeeId'></el-option>
</el-select> </el-select>
...@@ -510,7 +510,7 @@ ...@@ -510,7 +510,7 @@
handler(newVal) { handler(newVal) {
if (newVal && newVal.OrderId !== this.addMsg.OrderId) { if (newVal && newVal.OrderId !== this.addMsg.OrderId) {
this.addMsg.OrderId = newVal.OrderId; this.addMsg.OrderId = newVal.OrderId;
this.addMsg.OpEmpId = newVal.AppointOPList.map(item => item.OPId); this.addMsg.OpEmpId = newVal.AppointOPList.length>0? newVal.AppointOPList.map(item => item.OPId):[]
} }
} }
} }
......
...@@ -434,7 +434,7 @@ ...@@ -434,7 +434,7 @@
<el-row :gutter="16"> <el-row :gutter="16">
<el-col :span="19"> <el-col :span="19">
<el-form-item label="" prop="LossMoney"> <el-form-item label="" prop="LossMoney">
<el-input type="number" v-model="addMsg.LossMoney" placeholder="收损金额"></el-input> <el-input type="number" v-model="addMsg.LossMoney" placeholder="输入收损金额"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
......
<style scoped>
@import "../../../assets/css/DMC.css";
.drawer-mode {
display: flex;
height: 100%;
flex-direction: column;
}
/* 抽屉模式下的样式优化 */
.drawer-mode .changInfo {
padding: 0;
margin: 0;
height: 100%;
display: flex;
flex-direction: column;
}
.drawer-mode .resource-content {
padding: 0;
flex: 1;
overflow: hidden;
margin: 0 !important;
}
.drawer-mode .hotel-form-container {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
/* Tabs 样式优化 */
.drawer-mode .hotel-tabs {
flex: 1;
display: flex;
flex-direction: column;
border: none;
box-shadow: none;
}
.drawer-mode .hotel-tabs .el-tabs__header {
margin: 0;
background: #f8f9fa;
border-bottom: 1px solid #e8e8e8;
}
.drawer-mode .hotel-tabs .el-tabs__nav-wrap {
padding: 0 20px;
}
.drawer-mode .hotel-tabs .el-tabs__item {
height: 40px;
line-height: 40px;
font-size: 13px;
font-weight: 500;
color: #595959;
border: none;
padding: 0 20px;
}
.drawer-mode .hotel-tabs .el-tabs__item.is-active {
color: #1890ff;
background: #fff;
border-bottom: 2px solid #1890ff;
}
.drawer-mode .hotel-tabs .el-tabs__content {
flex: 1;
overflow-y: auto;
padding: 0;
}
.drawer-mode .hotel-tabs .el-tab-pane {
height: 100%;
}
/* Tab 内容区域 */
.drawer-mode .tab-content {
padding: 20px;
height: 100%;
overflow-y: auto;
}
.drawer-mode .tab-content.hidden {
height: calc(100vh - 160px);
overflow: hidden;
display: flex;
flex-direction: column;
}
/* 表单样式优化 */
.drawer-mode .el-form {
padding: 0;
}
.drawer-mode .el-form-item {
margin-bottom: 16px;
}
.drawer-mode .el-form-item__label {
font-size: 13px;
font-weight: 500;
line-height: 32px;
color: #262626;
/* width: 120px !important; */
}
/* 输入框和下拉框优化 */
.drawer-mode .el-input,
.drawer-mode .el-select {
width: 100%;
}
.drawer-mode .el-input__inner,
.drawer-mode .el-select .el-input__inner {
height: 32px;
line-height: 32px;
font-size: 13px;
border: 1px solid #d9d9d9;
border-radius: 4px;
transition: all 0.2s ease;
}
.drawer-mode .el-input__inner:focus,
.drawer-mode .el-select .el-input__inner:focus {
border-color: #1890ff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.drawer-mode .el-textarea__inner {
font-size: 13px;
border: 1px solid #d9d9d9;
border-radius: 4px;
min-height: 60px;
}
.drawer-mode .el-textarea__inner:focus {
border-color: #1890ff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
/* 日期选择器优化 */
.drawer-mode .el-date-editor {
width: 100%;
}
.drawer-mode .el-date-editor .el-input__inner {
height: 32px;
line-height: 32px;
}
/* 联系人区域样式 */
.drawer-mode .contact-header {
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid #e8e8e8;
text-align: right;
}
.drawer-mode .contact-list {
flex: 1;
overflow-y: auto;
}
.drawer-mode .contact-item {
margin-bottom: 12px;
padding: 12px;
background: #fafbfc;
border: 1px solid #e8e8e8;
border-radius: 6px;
position: relative;
display: flex;
align-items: start;
padding-bottom: 0;
}
.drawer-mode .contact-item .el-form-item__content {
margin-left: 0px !important;
}
/* 上传区域样式 */
.drawer-mode .upload-section {
display: flex;
flex-direction: column;
gap: 8px;
}
.drawer-mode .upload-section a {
color: #1890ff;
text-decoration: none;
font-size: 13px;
margin-right: 8px;
display: inline-block;
margin-bottom: 4px;
}
.drawer-mode .upload-section a:hover {
color: #40a9ff;
text-decoration: underline;
}
/* 按钮区域优化 */
.drawer-mode .btn-list {
position: sticky;
bottom: 0;
background: #fff;
padding: 16px 20px;
border-top: 1px solid #e8e8e8;
margin: 0;
z-index: 100;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}
.drawer-mode .btn-actions {
display: flex;
justify-content: flex-end;
gap: 12px;
}
.drawer-mode .save-Btn,
.drawer-mode .cancel-Btn {
height: 36px;
padding: 0 20px;
font-size: 14px;
border-radius: 4px;
cursor: pointer;
border: 1px solid;
transition: all 0.2s ease;
}
.drawer-mode .save-Btn {
background: #1890ff;
border-color: #1890ff;
color: #fff;
}
.drawer-mode .save-Btn:hover {
background: #40a9ff;
border-color: #40a9ff;
}
.drawer-mode .save-Btn:disabled {
background: #d9d9d9;
border-color: #d9d9d9;
color: #bfbfbf;
cursor: not-allowed;
}
.drawer-mode .save-Btn:disabled:hover {
background: #d9d9d9;
border-color: #d9d9d9;
}
.drawer-mode .cancel-Btn {
background: #fff;
border-color: #d9d9d9;
color: #595959;
}
.drawer-mode .cancel-Btn:hover {
background: #f5f5f5;
border-color: #40a9ff;
color: #40a9ff;
}
/* 上传按钮优化 */
.drawer-mode .el-button--small {
height: 28px;
padding: 0 12px;
font-size: 12px;
border-radius: 4px;
}
.drawer-mode .el-button--primary.el-button--small {
background: #1890ff;
border-color: #1890ff;
}
.drawer-mode .el-button--primary.el-button--small:hover {
background: #40a9ff;
border-color: #40a9ff;
}
/* 滚动条样式 */
.drawer-mode .tab-content::-webkit-scrollbar {
width: 6px;
}
.drawer-mode .tab-content::-webkit-scrollbar-track {
background-color: #f6f8fa;
border-radius: 3px;
}
.drawer-mode .tab-content::-webkit-scrollbar-thumb {
background-color: #d0d7de;
border-radius: 3px;
}
.drawer-mode .tab-content::-webkit-scrollbar-thumb:hover {
background-color: #8c959f;
}
/* 加载状态样式 */
.loading-container {
display: flex;
align-items: center;
justify-content: center;
min-height: 300px;
padding: 40px;
}
.loading-content {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.loading-content .el-loading-spinner {
margin-bottom: 16px;
}
.loading-content .el-loading-spinner .circular {
width: 32px;
height: 32px;
color: #1890ff;
}
.loading-content p {
color: #666;
font-size: 14px;
margin: 0;
}
/* 错误状态样式 */
.error-container {
display: flex;
align-items: center;
justify-content: center;
min-height: 300px;
padding: 40px;
}
.error-content {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
max-width: 400px;
}
.error-content .el-icon-warning {
font-size: 48px;
color: #f56c6c;
margin-bottom: 16px;
}
.error-content .error-title {
color: #f56c6c;
font-size: 16px;
font-weight: 500;
margin: 0 0 8px 0;
}
.error-content .error-message {
color: #666;
font-size: 14px;
margin: 0 0 20px 0;
line-height: 1.5;
}
.error-actions {
display: flex;
gap: 12px;
}
.error-actions .el-button {
min-width: 80px;
}
/* 响应式优化 */
@media (max-width: 1200px) {
.drawer-mode .el-col[class*="span-6"] {
width: 50% !important;
}
.drawer-mode .el-col[class*="span-4"] {
width: 33.333% !important;
}
}
@media (max-width: 768px) {
.drawer-mode .el-col[class*="span-"] {
width: 100% !important;
}
.drawer-mode .tab-content {
padding: 16px;
}
.drawer-mode .el-form-item__label {
width: 100px !important;
}
.loading-container,
.error-container {
min-height: 200px;
padding: 20px;
}
.error-actions {
flex-direction: column;
width: 100%;
}
.error-actions .el-button {
width: 100%;
}
}
.cruiseShipInfo{
display: flex;
flex-direction: row;
}
/deep/.changInfo .el-tabs--border-card>.el-tabs__content{
flex: 1;
}
</style>
<template>
<div class="flexOne changInfo" :class="{ 'drawer-mode': isDrawerMode }">
<div class="resource-content clearfix">
<el-form :model="addMsg" :rules="rules" class="h-full" ref="addMsg" label-width="0">
<div class="hotel-form-container h-full">
<el-tabs v-model="activeTab" type="border-card" class="hotel-tabs">
<el-tab-pane label="冲抵单据" name="basic" style="height: 100%">
<div class="tab-content">
<el-row :gutter="16" style="height: calc(100% - 1px)">
<el-col :span="24" style="height: 100%;overflow: hidden">
<BaseListManager
ref="listManager"
:columns="tableColumns"
:action-column="actionColumn"
:data-list="dataList"
:loading="loading"
:pagination="pagination"
:table-config="tableConfig"
:advanced-search-config="advancedSearchConfig"
:tool-actions="toolActions"
:drawer-config="drawerConfig"
:add-action-config="addActionConfig"
@filter-change="handleFilterChange"
@advanced-search="handleAdvancedSearch"
@page-change="handlePageChange"
@tool-command="handleToolCommand"
@selection-change="handleSelectionChange">
<template slot="ClientTypeName" slot-scope="{ row }">
{{row.ClientTypeName+':'+row.RemitterName+'('+row.AccountNumber+')'}}
</template>
</BaseListManager>
</el-col>
</el-row>
</div>
</el-tab-pane>
</el-tabs>
</div>
</el-form>
</div>
<div class="btn-list">
<div class="btn-actions">
<button class="save-Btn" @click="submitForm('addMsg')" :disabled="isSaving">
<i v-if="isSaving" class="el-icon-loading" style="margin-right: 4px;"></i>
{{ isSaving ? '' : $t('restaurant.res_confirm') }}
</button>
<button class="cancel-Btn" @click="goUrl('HotelManagement')">
{{ isDrawerMode ? '关闭' : $t('pub.cancelBtn') }}
</button>
</div>
</div>
</div>
</template>
<script>
import DMCchooseImg from "../../commonPage/DMCchooseImg.vue";
import { listManagerMixin } from "../../common/mixins/listManagerMixin.js";
import BaseListManager from "../../common/BaseListManager.vue";
import spotListConfig from "./offsetConfig.js";
export default {
mixins: [listManagerMixin],
components: {BaseListManager},
props: {
itemId: {
type: [String, Number],
default: 0
},
details: {
type: Object,
default: () => {}
},
isDrawerMode: {
type: Boolean,
default: false
}
},
data() {
return {
activeTab: 'basic',
addMsg: {
OrderId: 0,// 订单号
OpEmpId: null,
},
rules: {
OpEmpId: [{
required: true,
message: '请选择OP',
trigger: "blur"
}],
},
CruiseShipList: [],//邮轮
CSloading: false,
RoomTypeList: [],//房型
RTloading: false,
SupplierList: [],//供应商
SPloading: false,
isSaving: false,
loding: false,
dataList: [],
// 选中的数据
selectedSpotId: null,
selectedSpotData: null,
// 查询参数 - 使用配置的默认参数
queryParams: {
...spotListConfig.defaultQueryParams
},
typeList: [],
queryObj:null,
tradeObj:null,
};
},
watch: {
details: {
deep: true,
immediate: true,
handler(newVal) {
this.queryObj = newVal
if(this.queryObj.tradeObj){
this.tradeObj = JSON.parse(this.queryObj.tradeObj)
}
if(this.queryObj.orderObj){
this.tradeObj = JSON.parse(this.queryObj.orderObj)
}
this.loadListData()
this.initializeData()
}
}
},
computed: {
// 表格配置
tableConfig() {
return spotListConfig.tableConfig;
},
// 表格列配置
tableColumns() {
return spotListConfig.createColumns({
// costList: this.typeList.map(item => ({
// label: item.Name,
// value: item.ID
// })),
});
},
// 操作列配置
actionColumn() {
// return spotListConfig.actionColumn;
},
// 高级查询配置
advancedSearchConfig() {
const config = { ...spotListConfig.advancedSearchConfig };
// 动态更新选项
config.fields = config.fields.map(field => {
switch (field.key) {
case "CostTypeID":
return {
...field,
options: [
{ label: "不限", value: '' },
...this.typeList.map(item => ({
label: item.Name,
value: item.ID
}))
]
};
default:
return field;
}
});
return config;
},
// 工具操作配置
toolActions() {
return spotListConfig.toolActions;
},
// 抽屉配置
drawerConfig() {
return spotListConfig.drawerConfig;
},
//新增按钮
addActionConfig() {
},
},
created() {
// 初始化数据
this.initializeData();
},
methods: {
handleSelectionChange(row) {
this.selectedSpotData = row;
},
// 重写 mixin 中的筛选处理方法
handleFilterChange({ key, value }) {
// 映射列筛选器 key 到查询参数 key
const keyMapping = {
StatusFilter: "OrderStatus"
};
const actualKey = keyMapping[key] || key;
if (value === null || value === undefined) {
delete this.queryParams[actualKey];
} else {
// 处理不同类型的筛选值
let newValue = value;
// 如果是数组类型的多选筛选,转换为逗号分隔的字符串
if (Array.isArray(value)) {
newValue = value.join(",");
}
this.queryParams[actualKey] = newValue;
}
// 重置分页并重新加载数据
this.resetPageIndex();
this.loadListData();
},
handleAdvancedSearch(filters) {
// 合并高级筛选条件到查询参数
Object.keys(filters).forEach(key => {
const value = filters[key];
if (value !== '' && value !== null && value !== undefined) {
this.queryParams[key] = value;
} else {
delete this.queryParams[key];
}
});
if(this.queryParams.Datelist&&this.queryParams.Datelist.length>0){
this.queryParams.sTradeDate = this.queryParams.Datelist[0]
this.queryParams.eTradeDate = this.queryParams.Datelist[1]
}else{
this.queryParams.sTradeDate = ''
this.queryParams.eTradeDate = ''
}
this.queryParams.pageIndex = 1;
this.pagination.currentPage = 1;
this.loadListData();
},
handlePageChange(page) {
this.queryParams.pageIndex = page;
this.pagination.currentPage = page;
this.loadListData();
},
// 工具命令处理
handleToolCommand(command) {
switch (command) {
case "add":
this.addSpot();
break;
case "export":
this.exportData();
break;
case "refresh":
this.loadListData();
break;
case "clearFilters":
this.clearAllFilters();
break;
default:
console.warn("未知的工具命令:", command);
}
},
// 数据加载 - 重写mixin中的方法
loadListData() {
// if(this.loading) return
this.loading = true;
this.apipost(
spotListConfig.apiConfig.list,
this.queryParams,
res => {
this.loading = false;
if (res.data.resultCode == 1) {
let tempData = res.data.data.pageData || [];
this.pagination.total = res.data.data.count || 0;
this.dataList = tempData;
} else {
this.$message.error(res.data.message || "加载数据失败");
}
},
error => {
this.loading = false;
this.$message.error("网络请求失败");
console.error("数据加载失败:", error);
}
);
},
// 初始化基础数据
async initializeData() {
await Promise.all([
this.loadTypeList(),
]);
},
loadTypeList() {
return new Promise(resolve => {
this.apipost(
spotListConfig.apiConfig.costType,
{},
res => {
if (res.data.resultCode == 1) {
this.typeList = res.data.data || [];
}
resolve();
},
error => {
console.error("加载门票类型列表失败:", error);
resolve();
}
);
});
},
submitForm(addMsg) {
let that = this;
if (this.selectedSpotData&&this.selectedSpotData.length==1) {
that.saveResource();
} else {
return this.Error(this.$t('objFill.atleastone'));
}
},
saveResource() {
let that=this;
this.tradeObj.MatchFrId = this.selectedSpotData[0].FrID
// 同业单项订单
if(this.queryObj.tradeObj){
this.queryObj.tradeObj = JSON.stringify(this.tradeObj)
}
this.queryObj.searchTitle=this.queryObj.searchTitle?this.queryObj.searchTitle:'分摊';
let query = this.queryObj
this.goUrl("HotelManagement")
this.$router.push({
path: "/ChoiceAddFinancialDocuments",
query
});
},
goUrl(path) {
if (this.isDrawerMode) {
this.$emit('close')
} else {
this.$router.push({
path: path,
query: {
cache: true
}
})
}
},
}
};
</script>
// 邮轮列表配置
export const spotListConfig = {
// 表格基础配置
tableConfig: {
height: '100%',
border: true,
stripe: false,
size: 'mini',
multiple: false,//是否支持多选
'empty-text': '暂无数据'
},
// 分页配置
paginationConfig: {
background: true,
layout: 'total, sizes, prev, pager, next, jumper',
'pager-count': 7,
'hide-on-single-page': false,
'page-sizes': [10, 14, 20, 25, 50, 100],
'page-size': 14,
'current-page': 1,
small: false,
disabled: false,
'prev-text': '',
'next-text': '',
total: 0
},
// 分页默认配置
defaultPagination: {
currentPage: 1,
pageSize: 14,
total: 0,
pageSizes: [10, 14, 20, 25, 50, 100]
},
// 列配置工厂函数
createColumns: (options = {}) => [
{
type: 'selection',
minWidth: 55,
fixed: 'left',
slotName: 'FrID',
},
{
id: 'FrID',
label: '单号',
prop: 'FrID',
minWidth: 30,
// fixed: 'left',
slotName: 'FrID',
},
{
label: '公司',
prop: 'BranchName',
minWidth: 90,
slotName: 'BranchName',
},
{
label: '费用类型',
prop: 'CostTypeName',
minWidth: 80,
slotName: 'CostTypeName',
},
{
label: '币种',
prop: 'CurrencyName',
minWidth: 30,
slotName: 'CurrencyName',
},
{
label: '汇率',
prop: 'Rate',
minWidth: 30,
slotName: 'Rate',
},
{
label: '金额',
prop: 'Money',
minWidth: 80,
slotName: 'Money',
},
{
label: '冲抵金额',
prop: 'MatchMoney',
minWidth: 80,
slotName: 'MatchMoney',
},
{
label: '状态',
prop: 'StatusStr',
minWidth: 30,
slotName: 'StatusStr',
},
{
label: '付款对象',
prop: 'ClientTypeName',
minWidth: 80,
slotName: 'ClientTypeName',
},
{
label: '备注',
prop: 'Remark',
minWidth: 80,
slotName: 'Remark',
}
],
// 操作列配置
actionColumn: {
label: '操作',
width: 240,
minWidth: 150,
fixed: 'right'
},
// 高级查询配置
advancedSearchConfig: {
title: '高级查询',
buttonText: '高级查询',
width: 600,
fields: [
{
key: 'FrID',
label: '编号',
type: 'input',
placeholder: '单据编号',
span: 8,
options: [] // 动态填充
},
{
key: 'CostTypeID',
label: '费用类型',
type: 'select',
span: 8,
options: [] // 动态填充
},
{
key: 'Datelist',
label: '交易时间',
type: 'date',
dateType: 'daterange',
placeholder: '选择交易时间',
span: 8,
}
]
},
// 工具操作配置
toolActions: [
{
command: 'refresh',
label: '刷新',
icon: 'el-icon-refresh',
type: 'default'
},
{
command: 'clearFilters',
label: '清除筛选',
icon: 'el-icon-delete',
type: 'warning'
}
],
// 抽屉配置
drawerConfig: {
title: '冲抵信息',
size: '90%',
direction: 'rtl'
},
// API 配置
apiConfig: {
list: 'Financial_get_GetAdvanceFinancePageList',//列表
costType: 'Financial_get_GetAdvanceCostTypeList',
},
// 默认查询参数
defaultQueryParams: {
pageIndex: 1,
pageSize: 16,
FrID: 0,
CostTypeID:'',
sTradeDate:'',
eTradeDate:'',
IsAdvanceFinance:1,
Datelist: [],
},
// 分页配置工具方法
createPaginationConfig: (options = {}) => ({
...spotListConfig.paginationConfig,
...options
}),
// 验证分页参数
validatePaginationParams: (pageIndex, pageSize, total) => {
const validPageSizes = [10, 14, 20, 25, 50, 100]
const normalizedPageSize = validPageSizes.includes(pageSize) ? pageSize : 14
const maxPage = total > 0 ? Math.ceil(total / normalizedPageSize) : 1
const normalizedPageIndex = Math.max(1, Math.min(pageIndex, maxPage))
return {
pageIndex: normalizedPageIndex,
pageSize: normalizedPageSize,
isValid: pageIndex === normalizedPageIndex && pageSize === normalizedPageSize
}
}
}
// 导出默认配置
export default spotListConfig
// 导出分页配置工具方法
export const createPaginationConfig = spotListConfig.createPaginationConfig
export const validatePaginationParams = spotListConfig.validatePaginationParams
...@@ -429,7 +429,7 @@ ...@@ -429,7 +429,7 @@
<el-form :model="addMsg" :rules="rules" class="h-full" ref="addMsg" label-width="0"> <el-form :model="addMsg" :rules="rules" class="h-full" ref="addMsg" label-width="0">
<div class="hotel-form-container h-full"> <div class="hotel-form-container h-full">
<el-tabs v-model="activeTab" type="border-card" class="hotel-tabs"> <el-tabs v-model="activeTab" type="border-card" class="hotel-tabs">
<el-tab-pane label="备注" name="basic"> <el-tab-pane label="取消备注" name="basic">
<div class="tab-content"> <div class="tab-content">
<el-row :gutter="16"> <el-row :gutter="16">
<el-col :span="19"> <el-col :span="19">
......
<style>
@import "../../../assets/css/DMC.css";
.drawer-mode {
display: flex;
height: 100%;
flex-direction: column;
}
/* 抽屉模式下的样式优化 */
.drawer-mode .changInfo {
padding: 0;
margin: 0;
height: 100%;
display: flex;
flex-direction: column;
}
.drawer-mode .resource-content {
padding: 0;
flex: 1;
overflow: hidden;
margin: 0 !important;
}
.drawer-mode .hotel-form-container {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
/* Tabs 样式优化 */
.drawer-mode .hotel-tabs {
flex: 1;
display: flex;
flex-direction: column;
border: none;
box-shadow: none;
}
.drawer-mode .hotel-tabs .el-tabs__header {
margin: 0;
background: #f8f9fa;
border-bottom: 1px solid #e8e8e8;
}
.drawer-mode .hotel-tabs .el-tabs__nav-wrap {
padding: 0 20px;
}
.drawer-mode .hotel-tabs .el-tabs__item {
height: 40px;
line-height: 40px;
font-size: 13px;
font-weight: 500;
color: #595959;
border: none;
padding: 0 20px;
}
.drawer-mode .hotel-tabs .el-tabs__item.is-active {
color: #1890ff;
background: #fff;
border-bottom: 2px solid #1890ff;
}
.drawer-mode .hotel-tabs .el-tabs__content {
flex: 1;
overflow-y: auto;
padding: 0;
}
.drawer-mode .hotel-tabs .el-tab-pane {
height: 100%;
}
/* Tab 内容区域 */
.drawer-mode .tab-content {
padding: 20px;
height: 100%;
overflow-y: auto;
}
.drawer-mode .tab-content.hidden {
height: calc(100vh - 160px);
overflow: hidden;
display: flex;
flex-direction: column;
}
/* 表单样式优化 */
.drawer-mode .el-form {
padding: 0;
}
.drawer-mode .el-form-item {
margin-bottom: 16px;
}
.drawer-mode .el-form-item__label {
font-size: 13px;
font-weight: 500;
line-height: 32px;
color: #262626;
/* width: 120px !important; */
}
/* 输入框和下拉框优化 */
.drawer-mode .el-input,
.drawer-mode .el-select {
width: 100%;
}
.drawer-mode .el-input__inner,
.drawer-mode .el-select .el-input__inner {
height: 32px;
line-height: 32px;
font-size: 13px;
border: 1px solid #d9d9d9;
border-radius: 4px;
transition: all 0.2s ease;
}
.drawer-mode .el-input__inner:focus,
.drawer-mode .el-select .el-input__inner:focus {
border-color: #1890ff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
.drawer-mode .el-textarea__inner {
font-size: 13px;
border: 1px solid #d9d9d9;
border-radius: 4px;
min-height: 60px;
}
.drawer-mode .el-textarea__inner:focus {
border-color: #1890ff;
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}
/* 日期选择器优化 */
.drawer-mode .el-date-editor {
width: 100%;
}
.drawer-mode .el-date-editor .el-input__inner {
height: 32px;
line-height: 32px;
}
/* 联系人区域样式 */
.drawer-mode .contact-header {
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid #e8e8e8;
text-align: right;
}
.drawer-mode .contact-list {
flex: 1;
overflow-y: auto;
}
.drawer-mode .contact-item {
margin-bottom: 12px;
padding: 12px;
background: #fafbfc;
border: 1px solid #e8e8e8;
border-radius: 6px;
position: relative;
display: flex;
align-items: start;
padding-bottom: 0;
}
.drawer-mode .contact-item .el-form-item__content {
margin-left: 0px !important;
}
/* 上传区域样式 */
.drawer-mode .upload-section {
display: flex;
flex-direction: column;
gap: 8px;
}
.drawer-mode .upload-section a {
color: #1890ff;
text-decoration: none;
font-size: 13px;
margin-right: 8px;
display: inline-block;
margin-bottom: 4px;
}
.drawer-mode .upload-section a:hover {
color: #40a9ff;
text-decoration: underline;
}
/* 按钮区域优化 */
.drawer-mode .btn-list {
position: sticky;
bottom: 0;
background: #fff;
padding: 16px 20px;
border-top: 1px solid #e8e8e8;
margin: 0;
z-index: 100;
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}
.drawer-mode .btn-actions {
display: flex;
justify-content: flex-end;
gap: 12px;
}
.drawer-mode .save-Btn,
.drawer-mode .cancel-Btn {
height: 36px;
padding: 0 20px;
font-size: 14px;
border-radius: 4px;
cursor: pointer;
border: 1px solid;
transition: all 0.2s ease;
}
.drawer-mode .save-Btn {
background: #1890ff;
border-color: #1890ff;
color: #fff;
}
.drawer-mode .save-Btn:hover {
background: #40a9ff;
border-color: #40a9ff;
}
.drawer-mode .save-Btn:disabled {
background: #d9d9d9;
border-color: #d9d9d9;
color: #bfbfbf;
cursor: not-allowed;
}
.drawer-mode .save-Btn:disabled:hover {
background: #d9d9d9;
border-color: #d9d9d9;
}
.drawer-mode .cancel-Btn {
background: #fff;
border-color: #d9d9d9;
color: #595959;
}
.drawer-mode .cancel-Btn:hover {
background: #f5f5f5;
border-color: #40a9ff;
color: #40a9ff;
}
/* 上传按钮优化 */
.drawer-mode .el-button--small {
height: 28px;
padding: 0 12px;
font-size: 12px;
border-radius: 4px;
}
.drawer-mode .el-button--primary.el-button--small {
background: #1890ff;
border-color: #1890ff;
}
.drawer-mode .el-button--primary.el-button--small:hover {
background: #40a9ff;
border-color: #40a9ff;
}
/* 滚动条样式 */
.drawer-mode .tab-content::-webkit-scrollbar {
width: 6px;
}
.drawer-mode .tab-content::-webkit-scrollbar-track {
background-color: #f6f8fa;
border-radius: 3px;
}
.drawer-mode .tab-content::-webkit-scrollbar-thumb {
background-color: #d0d7de;
border-radius: 3px;
}
.drawer-mode .tab-content::-webkit-scrollbar-thumb:hover {
background-color: #8c959f;
}
/* 加载状态样式 */
.loading-container {
display: flex;
align-items: center;
justify-content: center;
min-height: 300px;
padding: 40px;
}
.loading-content {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.loading-content .el-loading-spinner {
margin-bottom: 16px;
}
.loading-content .el-loading-spinner .circular {
width: 32px;
height: 32px;
color: #1890ff;
}
.loading-content p {
color: #666;
font-size: 14px;
margin: 0;
}
/* 错误状态样式 */
.error-container {
display: flex;
align-items: center;
justify-content: center;
min-height: 300px;
padding: 40px;
}
.error-content {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
max-width: 400px;
}
.error-content .el-icon-warning {
font-size: 48px;
color: #f56c6c;
margin-bottom: 16px;
}
.error-content .error-title {
color: #f56c6c;
font-size: 16px;
font-weight: 500;
margin: 0 0 8px 0;
}
.error-content .error-message {
color: #666;
font-size: 14px;
margin: 0 0 20px 0;
line-height: 1.5;
}
.error-actions {
display: flex;
gap: 12px;
}
.error-actions .el-button {
min-width: 80px;
}
/* 响应式优化 */
@media (max-width: 1200px) {
.drawer-mode .el-col[class*="span-6"] {
width: 50% !important;
}
.drawer-mode .el-col[class*="span-4"] {
width: 33.333% !important;
}
}
@media (max-width: 768px) {
.drawer-mode .el-col[class*="span-"] {
width: 100% !important;
}
.drawer-mode .tab-content {
padding: 16px;
}
.drawer-mode .el-form-item__label {
width: 100px !important;
}
.loading-container,
.error-container {
min-height: 200px;
padding: 20px;
}
.error-actions {
flex-direction: column;
width: 100%;
}
.error-actions .el-button {
width: 100%;
}
}
.cruiseShipInfo{
display: flex;
flex-direction: row;
}
</style>
<template>
<div class="flexOne changInfo" :class="{ 'drawer-mode': isDrawerMode }">
<div class="resource-content clearfix">
<el-form :model="addMsg" :rules="rules" class="h-full" ref="addMsg" label-width="0">
<div class="hotel-form-container h-full">
<el-tabs v-model="activeTab" type="border-card" class="hotel-tabs">
<el-tab-pane label="编辑总金额" name="basic">
<div class="tab-content">
<el-row :gutter="16">
<el-col :span="19">
<el-form-item label="" prop="Money">
<el-input type="number" v-model="addMsg.Money" placeholder="输入总金额"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</el-tab-pane>
</el-tabs>
</div>
</el-form>
</div>
<div class="btn-list">
<div class="btn-actions">
<button class="save-Btn" @click="submitForm('addMsg')" :disabled="isSaving">
<i v-if="isSaving" class="el-icon-loading" style="margin-right: 4px;"></i>
{{ isSaving ? '' : $t('pub.saveBtn') }}
</button>
<button class="cancel-Btn" @click="goUrl('HotelManagement')">
{{ isDrawerMode ? '关闭' : $t('pub.cancelBtn') }}
</button>
</div>
</div>
</div>
</template>
<script>
import DMCchooseImg from "../../commonPage/DMCchooseImg.vue";
import { listManagerMixin } from "../../common/mixins/listManagerMixin.js";
export default {
mixins: [listManagerMixin],
props: {
itemId: {
type: [String, Number],
default: 0
},
details: {
type: Object,
default: () => {}
},
isDrawerMode: {
type: Boolean,
default: false
}
},
data() {
return {
activeTab: 'basic',
addMsg: {
OrderId: 0,// 订单号
Money: 0,
},
rules: {
Money: [{
required: true,
message: '请输入收损金额',
trigger: "blur"
}],
},
CruiseShipList: [],//邮轮
CSloading: false,
RoomTypeList: [],//房型
RTloading: false,
SupplierList: [],//供应商
SPloading: false,
isSaving: false,
};
},
watch: {
details: {
deep: true,
immediate: true,
handler(newVal) {
if (newVal && newVal.OrderId !== this.addMsg.OrderId) {
this.addMsg.OrderId = newVal.OrderId;
this.addMsg.Money = newVal.Money;
}
}
}
},
components: {
},
methods: {
submitForm(addMsg) {
//提交创建、修改表单
let that = this;
that.$refs[addMsg].validate(valid => {
if (valid) {
that.saveResource();
} else {
return false;
}
});
},
saveResource() {
// 防重复提交
if (this.isSaving) {
return;
}
this.isSaving = true;
this.apipost(
"ticket_post_SetTicketOrderMoney",
this.addMsg,
response => {
this.isSaving = false;
//修改添加接口
if (response.data.resultCode == 1) {
this.Success(this.$t('tips.saveYes'))
if (this.isDrawerMode) {
this.$emit('save-success')
} else {
this.goUrl("HotelManagement")
}
} else {
this.Error(response.data.message)
}
},
error => {
this.isSaving = false;
this.Error('保存失败,请检查网络连接');
}
)
},
goUrl(path) {
if (this.isDrawerMode) {
this.$emit('close')
} else {
this.$router.push({
path: path,
query: {
cache: true
}
})
}
},
}
};
</script>
...@@ -428,7 +428,7 @@ ...@@ -428,7 +428,7 @@
<!-- 正常内容 --> <!-- 正常内容 -->
<div class="resource-content clearfix"> <div class="resource-content clearfix">
<el-form :model="addMsg" :rules="rules" class="h-full" ref="addMsg" label-width="120px" <el-form :model="addMsg" :rules="rules" class="h-full" ref="addMsg" label-width="120px"
:disabled="addMsg.OrderId>0"> :disabled="addMsg.OrderId>0&&(activeTab=='basic'||activeTab=='contact')">
<div class="hotel-form-container h-full"> <div class="hotel-form-container h-full">
<el-tabs v-model="activeTab" type="border-card" class="hotel-tabs"> <el-tabs v-model="activeTab" type="border-card" class="hotel-tabs">
<el-tab-pane label="基础资料" name="basic"> <el-tab-pane label="基础资料" name="basic">
......
...@@ -36,19 +36,19 @@ export const spotListConfig = { ...@@ -36,19 +36,19 @@ export const spotListConfig = {
// 列配置工厂函数 // 列配置工厂函数
createColumns: (options = {}) => [ createColumns: (options = {}) => [
{ {
id: 'OrderId', id: 'OrderNo',
label: '订单Id', label: '订单编号',
prop: 'OrderId', prop: 'OrderNo',
minWidth: 80, minWidth: 220,
// fixed: 'left', // fixed: 'left',
slotName: 'OrderId', slotName: 'OrderNo',
}, },
{ {
id: 'scenic-name-column', id: 'scenic-name-column',
label: '邮轮名称', label: '邮轮名称',
prop: 'CouponsName', prop: 'CouponsName',
minWidth: 150, minWidth: 150,
// fixed: 'left', fixed: 'left',
type: 'link', type: 'link',
slotName: 'CouponsName', slotName: 'CouponsName',
filter: { filter: {
...@@ -60,7 +60,7 @@ export const spotListConfig = { ...@@ -60,7 +60,7 @@ export const spotListConfig = {
{ {
label: '使用时间', label: '使用时间',
prop: 'UseDate', prop: 'UseDate',
minWidth: 80, minWidth: 90,
slotName: 'UseDate', slotName: 'UseDate',
}, },
{ {
...@@ -90,7 +90,7 @@ export const spotListConfig = { ...@@ -90,7 +90,7 @@ export const spotListConfig = {
{ {
label: '应收总金额', label: '应收总金额',
prop: 'Money', prop: 'Money',
minWidth: 80, minWidth: 120,
slotName: 'Money', slotName: 'Money',
}, },
{ {
...@@ -129,10 +129,44 @@ export const spotListConfig = { ...@@ -129,10 +129,44 @@ export const spotListConfig = {
minWidth: 80, minWidth: 80,
slotName: 'Refund', slotName: 'Refund',
}, },
{
label: '收款单据',
prop: 'IncomeList',
minWidth: 125,
slotName: 'IncomeList',
},
{
label: '退款单据',
prop: 'RefundList',
minWidth: 125,
slotName: 'RefundList',
emptyText: '-'
},
{
label: '成本单据',
prop: 'CostList',
minWidth: 125,
slotName: 'CostList',
emptyText: '-'
},
{
label: '发票单据',
prop: 'InvoiceApplyList',
minWidth: 125,
slotName: 'InvoiceApplyList',
emptyText: '-'
},
{
label: '下单备注',
prop: 'Remark',
minWidth: 100,
slotName: 'Remark',
emptyText: '-'
},
{ {
label: '创建时间', label: '创建时间',
prop: 'CreateTime', prop: 'CreateTime',
minWidth: 100, minWidth: 120,
slotName: 'CreateTime', slotName: 'CreateTime',
emptyText: '-' emptyText: '-'
}, },
...@@ -157,10 +191,13 @@ export const spotListConfig = { ...@@ -157,10 +191,13 @@ export const spotListConfig = {
} }
], ],
// 操作列配置 // 操作列配置
actionColumn: { actionColumn: {
label: '操作', label: '操作',
width: 150, width: 240,
minWidth: 150,
fixed: 'right' fixed: 'right'
}, },
...@@ -289,7 +326,7 @@ export const spotListConfig = { ...@@ -289,7 +326,7 @@ export const spotListConfig = {
// 默认查询参数 // 默认查询参数
defaultQueryParams: { defaultQueryParams: {
pageIndex: 1, pageIndex: 1,
pageSize: 25, pageSize: 15,
Name: '', Name: '',
StartTime: '', StartTime: '',
EndTime: '', EndTime: '',
...@@ -307,6 +344,11 @@ export const spotListConfig = { ...@@ -307,6 +344,11 @@ export const spotListConfig = {
Datelist: [], Datelist: [],
}, },
// 头部额外配置
headConfiguration: {
},
// 分页配置工具方法 // 分页配置工具方法
createPaginationConfig: (options = {}) => ({ createPaginationConfig: (options = {}) => ({
...spotListConfig.paginationConfig, ...spotListConfig.paginationConfig,
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
:tool-actions="toolActions" :tool-actions="toolActions"
:drawer-config="drawerConfig" :drawer-config="drawerConfig"
:add-action-config="addActionConfig" :add-action-config="addActionConfig"
:head-configuration="headConfiguration"
@filter-change="handleFilterChange" @filter-change="handleFilterChange"
@advanced-search="handleAdvancedSearch" @advanced-search="handleAdvancedSearch"
@page-change="handlePageChange" @page-change="handlePageChange"
...@@ -19,6 +20,9 @@ ...@@ -19,6 +20,9 @@
@add-click="addSpot" @add-click="addSpot"
> >
<!-- 插槽 --> <!-- 插槽 -->
<template slot="OrderNo" slot-scope="{ row }">
{{ row.OrderNo }}({{ row.OrderId }})
</template>
<template slot="CouponsName" slot-scope="{ row }"> <template slot="CouponsName" slot-scope="{ row }">
<span class="name-link" @click="editSpot(row)"> <span class="name-link" @click="editSpot(row)">
{{ row.CouponsName }} {{ row.CouponsName }}
...@@ -40,6 +44,69 @@ ...@@ -40,6 +44,69 @@
{{ row.SupplierModel.SupplierName?row.SupplierModel.SupplierName:'-' }} {{ row.SupplierModel.SupplierName?row.SupplierModel.SupplierName:'-' }}
</span> </span>
</template> </template>
<template slot="IncomeList" slot-scope="{ row }">
<div class="row justify-end pr-sm mb-xs" v-if="row.OrderStatus == 2">
<el-tooltip v-if="row.OrderStatus == 2" class="item" effect="dark" :content="$t('objFill.preparedocument')" placement="top">
<i class="pointer el-icon-circle-plus c059FF6"
@click="makeAdocument(row, $index, 1)"></i>
</el-tooltip>
</div>
<div class="row wrap">
<template v-for="(x,index) in row.IncomeList">
<el-tag :key="index" @click="openDetails(x)"
size="mini" class="mr-xs mb-xs pointer"
:class="{'bgD9F3FF':x.Status==1,'bgFAEAED':x.Status==2,'bjFFF3E0':x.Status==3,
'c3FC4FF':x.Status==1,'cF1416C':x.Status==2,'cff9800':x.Status==3}">{{ x.FrID }}</el-tag>
</template>
</div>
</template>
<template slot="RefundList" slot-scope="{ row }">
<div class="row justify-end pr-sm mb-xs" v-if="row.OrderStatus == 2">
<el-tooltip v-if="row.OrderStatus == 2" class="item" effect="dark" :content="$t('objFill.preparedocument')" placement="top">
<i class="pointer el-icon-circle-plus c059FF6"
@click="makeAdocument(row, $index, 2)"></i>
</el-tooltip>
</div>
<div class="row wrap">
<template v-for="(x,index) in row.RefundList">
<el-tag :key="index" @click="openDetails(x)"
size="mini" class="mr-xs mb-xs pointer"
:class="{'bgD9F3FF':x.Status==1,'bgFAEAED':x.Status==2,'bjFFF3E0':x.Status==3,
'c3FC4FF':x.Status==1,'cF1416C':x.Status==2,'cff9800':x.Status==3}">{{ x.FrID }}</el-tag>
</template>
</div>
</template>
<template slot="CostList" slot-scope="{ row, $index }">
<div class="row justify-end pr-sm mb-xs" v-if="row.OrderStatus == 2">
<el-tooltip class="" effect="dark" :content="$t('objFill.preparedocument')" placement="top">
<i class="pointer el-icon-circle-plus c059FF6 mr-xs" @click="makeAdocument(row, $index, 3)"></i>
</el-tooltip>
<el-tooltip class="" effect="dark" :content="$t('objFill.balanceout')" placement="top">
<i class="pointer el-icon-circle-plus c3FC4FF" @click="isOffset(row, $index, 3)"></i>
</el-tooltip>
</div>
<div class="row wrap">
<template v-for="(x,index) in row.CostList">
<el-tag :key="index" @click="openDetails(x)"
size="mini" class="mr-xs mb-xs pointer"
:class="{'bgD9F3FF':x.Status==1,'bgFAEAED':x.Status==2,'bjFFF3E0':x.Status==3,
'c3FC4FF':x.Status==1,'cF1416C':x.Status==2,'cff9800':x.Status==3}">{{ x.FrID }}</el-tag>
</template>
</div>
</template>
<template slot="InvoiceApplyList" slot-scope="{ row }">
<div class="row wrap">
<template v-for="(x,index) in row.InvoiceApplyList">
<el-tag :key="index" @click="openDetails(x,row)"
size="mini" class="mr-xs mb-xs pointer"
:class="{'bgD9F3FF':x.InvoiceApplyState===6,'bgFAEAED':x.InvoiceApplyState===1||x.InvoiceApplyState===3,
'bjFFF3E0':x.InvoiceApplyState===2||x.InvoiceApplyState===4||x.InvoiceApplyState===5,
'c3FC4FF':x.InvoiceApplyState===6,'cF1416C':x.InvoiceApplyState===1||x.InvoiceApplyState===3,
'cff9800':x.InvoiceApplyState===2||x.InvoiceApplyState===4||x.InvoiceApplyState===5}"
>{{ x.ID }}</el-tag>
</template>
</div>
</template>
<!-- 操作插槽 --> <!-- 操作插槽 -->
<template slot="actions" slot-scope="{ row }"> <template slot="actions" slot-scope="{ row }">
...@@ -55,12 +122,17 @@ ...@@ -55,12 +122,17 @@
class="delete-btn mr-xs pointer" class="delete-btn mr-xs pointer"
@click="clickOperation(row,3)" @click="clickOperation(row,3)"
>{{$t('fnc.shousun')}}</span> >{{$t('fnc.shousun')}}</span>
<!-- v-if="row.OrderStatus>1&&!row.OrderStatus!=3&&!row.OrderStatus!=4&&isOP&&userInfo.ActionMenuCode.indexOf('is_correlationOP') != -1" -->
<span v-if="row.OrderStatus>1&&!row.OrderStatus!=3&&!row.OrderStatus!=4&&isOP&&userInfo.ActionMenuCode.indexOf('is_correlationOP') != -1" <span
class="delete-btn mr-xs pointer" class="c059FF6 mr-xs pointer"
@click="clickOperation(row,4)" @click="clickOperation(row,4)"
>{{$t('pub.edit')}}OP</span> >{{$t('pub.edit')}}OP</span>
<span v-if="row.OrderStatus!=3&&isOP"
class="c059FF6 mr-xs pointer"
@click="clickOperation(row,5)"
>{{$t('pub.edit')}}{{$t('fnc.a_zongjine')}}</span>
<ApplyFoInvoice class="pointer" v-if="userInfo&&userInfo.RB_Group_id==2&&userInfo.EmployeeId==row.EnterID" <ApplyFoInvoice class="pointer" v-if="userInfo&&userInfo.RB_Group_id==2&&userInfo.EmployeeId==row.EnterID"
:obj="row" :type="7"></ApplyFoInvoice> :obj="row" :type="7"></ApplyFoInvoice>
</div> </div>
...@@ -84,7 +156,15 @@ ...@@ -84,7 +156,15 @@
:isDrawerMode="true" :details="selectedSpotData" :isDrawerMode="true" :details="selectedSpotData"
@close="close" @save-success="handleSaveSuccess"/> @close="close" @save-success="handleSaveSuccess"/>
<totalAamount v-if="visible&&ShowType==5"
:isDrawerMode="true" :details="selectedSpotData"
@close="close" @save-success="handleSaveSuccess"/>
<offset v-if="visible&&ShowType==6"
:isDrawerMode="true" :details="queryObj"
@close="close" @save-success="handleSaveSuccess"></offset>
<!-- <div v-if="visible" class="drawer-content"> <!-- <div v-if="visible" class="drawer-content">
<h3>邮轮信息编辑</h3> <h3>邮轮信息编辑</h3>
<p>邮轮ID: {{ selectedSpotId }}</p> <p>邮轮ID: {{ selectedSpotId }}</p>
<p>功能待实现...</p> <p>功能待实现...</p>
...@@ -104,6 +184,8 @@ import ApplyFoInvoice from '../../public/ApplyFoInvoice'; ...@@ -104,6 +184,8 @@ import ApplyFoInvoice from '../../public/ApplyFoInvoice';
import remarks from '../components/remarks.vue' import remarks from '../components/remarks.vue'
import loss from '../components/loss.vue' import loss from '../components/loss.vue'
import editOP from '../components/editOP.vue' import editOP from '../components/editOP.vue'
import totalAamount from '../components/totalAamount.vue'
import offset from '../components/offset.vue';
export default { export default {
name: "ScenicSpotListNew", name: "ScenicSpotListNew",
...@@ -115,6 +197,8 @@ export default { ...@@ -115,6 +197,8 @@ export default {
remarks, remarks,
loss, loss,
editOP, editOP,
totalAamount,
offset,
}, },
data() { data() {
...@@ -134,11 +218,27 @@ export default { ...@@ -134,11 +218,27 @@ export default {
queryParams: { queryParams: {
...spotListConfig.defaultQueryParams ...spotListConfig.defaultQueryParams
}, },
ShowType: 1,//1新增 2OP取消 3收损 ShowType: 1,//1新增 2OP取消 3收损 4编辑OP 5编辑总金额 6冲抵
isOP: 0, isOP: 0,
queryObj:{},
BillMakingMsg: {
OtherType: 61,
ReFinanceId: "",
ReFinanceId2: ""
},
cdState: false,
}; };
}, },
watch: {
'$router': {
handler(val) {
if(this.$route.query.isOP) this.isOP = this.$route.query.isOP
else this.isOP = 0
this.loadListData();
}
}
},
computed: { computed: {
// 表格配置 // 表格配置
tableConfig() { tableConfig() {
...@@ -175,21 +275,13 @@ export default { ...@@ -175,21 +275,13 @@ export default {
return { return {
...field, ...field,
options: [ options: [
{ label: "不限", value: 0 }, // { label: "不限", value: 0 },
...this.OrderStatusType.map(item => ({ ...this.OrderStatusType.map(item => ({
label: item.Name, label: item.Name,
value: item.ID value: item.ID
})) }))
] ]
}; };
case "EnterID":
return {
...field,
options: this.EmployeeList.map(item => ({
label: item.EmName,
value: item.EmployeeId
}))
};
default: default:
return field; return field;
} }
...@@ -200,8 +292,12 @@ export default { ...@@ -200,8 +292,12 @@ export default {
label: '销售名称', label: '销售名称',
type: 'select', type: 'select',
placeholder: '选择销售', placeholder: '选择销售',
filterable: true,
span: 8, span: 8,
options: [] // 动态填充 options: this.EmployeeList.map(item => ({
label: item.EmName,
value: item.EmployeeId
}))
}) })
} }
return config; return config;
...@@ -224,9 +320,96 @@ export default { ...@@ -224,9 +320,96 @@ export default {
width: 100 width: 100
} }
}, },
// 头部额外配置
headConfiguration() {
return {
DocumentStatus: true,
}
}
}, },
methods: { methods: {
isOffset(row, index, num) {
this.makeAdocument(row, index, num, 'Offset')
},
// 制作单据
makeAdocument(row, index, num, Offset) {
if ((num == 2 || num == 3) && (row.Income+row.PlatformMoney) <= 0) {
this.Info(this.$t('objFill.qinxianzhidanzaizhicbtkdj'))
return
}
let type = 0
if (num == 3) {
type = 2
} else {
type = num
}
this.BillMakingMsg.ReFinanceId = row.OrderId;
this.BillMakingMsg.ReFinanceId2 = num;
this.BillMakingMsg.OtherType = 66;
let text = "";
let query = {};
if (num == 1) {
text = this.$t('fnc.shoukuan');
} else if (num == 2) {
text = this.$t('fnc.fukuan');
} else if (num == 3) {
text = this.$t('hotel.hotel_cost');
}
if (Offset) {
this.ShowType = 6
}
query = {
blank: "y",
tab: `${this.$t('pub.addBtn')}${text}${this.$t('salesModule.Docments')}`,
Type: type,
tradeObj: JSON.stringify(this.BillMakingMsg),
companyID: row.OutBranchId
};
if (num == 2) {
query.searchTitle = '溢收团费退款';
} else if (num == 3 && this.ShowType != 6) {
query.portTypeId = 6;
}
this.queryObj = query
if (Offset) {
spotListConfig.drawerConfig.size = '90%'
this.$refs.listManager.openDrawer(row);
}
if (!Offset) {
this.$store.commit("ChoiceAddFinancialDocuments");
this.$router.push({
path: "/ChoiceAddFinancialDocuments",
query
});
}
},
// 单据详情
openDetails(item,x) {
let query = {
id: item.FrID ? item.FrID : item.ID,
blank: "y",
};
// 跳转发票详情页面
if(x){
this.$router.push({
name: "invoicesManagerDetail",
query: {
id: item.FrID ? item.FrID : item.ID,
InvoiceApplyType: 7,
blank: "y",
},
});
}else{
this.$router.push({
path: "/FinancialDocumentsDetail",
query
});
}
},
clickOperation(row,type){ clickOperation(row,type){
spotListConfig.drawerConfig.size = '50%' spotListConfig.drawerConfig.size = '50%'
this.ShowType = type this.ShowType = type
...@@ -244,35 +427,6 @@ export default { ...@@ -244,35 +427,6 @@ export default {
this.pagination.currentPage = 1; this.pagination.currentPage = 1;
}, },
// 加载地区列表
loadRegionList(parentId, type) {
if (!parentId) return;
this.apipost(
spotListConfig.apiConfig.provinceList,
{ Id: parentId },
res => {
if (res.data.resultCode == 1) {
const data = res.data.data || [];
switch (type) {
case 1: // 省份
this.provinceList = data;
break;
case 2: // 城市
this.cityList = data;
break;
case 3: // 区域
this.districtList = data;
break;
}
}
},
error => {
console.error("加载地区列表失败:", error);
}
);
},
// 重写 mixin 中的筛选处理方法 // 重写 mixin 中的筛选处理方法
handleFilterChange({ key, value }) { handleFilterChange({ key, value }) {
// 映射列筛选器 key 到查询参数 key // 映射列筛选器 key 到查询参数 key
...@@ -319,8 +473,8 @@ export default { ...@@ -319,8 +473,8 @@ export default {
this.queryParams.UseETime = '' this.queryParams.UseETime = ''
} }
if(this.queryParams.Datelist&&this.queryParams.Datelist.length>0){ if(this.queryParams.Datelist&&this.queryParams.Datelist.length>0){
this.queryParams.StartTime = this.queryParams.DatelistUse[0] this.queryParams.StartTime = this.queryParams.Datelist[0]
this.queryParams.EndTime = this.queryParams.DatelistUse[1] this.queryParams.EndTime = this.queryParams.Datelist[1]
}else{ }else{
this.queryParams.StartTime = '' this.queryParams.StartTime = ''
this.queryParams.EndTime = '' this.queryParams.EndTime = ''
...@@ -588,10 +742,8 @@ export default { ...@@ -588,10 +742,8 @@ export default {
}, },
created() { created() {
if(this.$route.query.isOP) this.isOP = this.$route.query.isOP
// 初始化数据 // 初始化数据
this.initializeData(); this.initializeData();
// 处理路由参数 // 处理路由参数
if (this.$route.query.OrderId) { if (this.$route.query.OrderId) {
this.queryParams.OrderId = this.$route.query.OrderId; this.queryParams.OrderId = this.$route.query.OrderId;
...@@ -599,6 +751,8 @@ export default { ...@@ -599,6 +751,8 @@ export default {
}, },
mounted() { mounted() {
if(this.$route.query.isOP) this.isOP = this.$route.query.isOP
else this.isOP = 0
// 加载数据 // 加载数据
this.loadListData(); this.loadListData();
} }
...@@ -634,4 +788,7 @@ export default { ...@@ -634,4 +788,7 @@ export default {
.drawer-content { .drawer-content {
padding: 20px; padding: 20px;
} }
/deep/.scenic-spot-list-new .el-tag{
border-color: #fff;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment