Commit 7d209bf8 authored by liuzeheng's avatar liuzeheng
parents e6bad242 4d693a36
...@@ -40,6 +40,24 @@ export function approveTask(data) { ...@@ -40,6 +40,24 @@ export function approveTask(data) {
}) })
} }
//lanbm 2024-05-20 add
export function approveTask2(data) {
return request({
url: '/bpm/task/approve2',
method: 'PUT',
data: data
})
}
//lanbm 2024-05-20 add
export function rejectTask2(data) {
return request({
url: '/bpm/task/reject2',
method: 'PUT',
data: data
})
}
export function rejectTask(data) { export function rejectTask(data) {
return request({ return request({
url: '/bpm/task/reject', url: '/bpm/task/reject',
......
...@@ -124,6 +124,15 @@ export function getCostList(params) { ...@@ -124,6 +124,15 @@ export function getCostList(params) {
params, params,
}); });
} }
// 付款单主表 SELECT * from ecw_payment
// 付款单费用明细 SELECT * from ecw_payable
// 根据明细获取主表ID
export function getPaymentId(id) {
return request({
url: "/ecw/box-cost/getPaymentId?id="+id,
method: "get"
});
}
// 获得出货异常记录列表 // 获得出货异常记录列表
export function getAbnormalList(params) { export function getAbnormalList(params) {
......
import request from '@/utils/request'
//2024-05-18
export function getPageList(query) {
return request({
url: '/ecw/BankReceiptDetails/list',
method: 'get',
params: query
})
}
//测试功能使用的接口 lanbm 2024-05-20 add
export function test(query) {
return request({
//url: '/my/test/1',
url:"/ecw/BankReceiptDetails/test",
method: 'get',
params: query
})
}
\ No newline at end of file
...@@ -48,8 +48,6 @@ export function getEChartData(query) { ...@@ -48,8 +48,6 @@ export function getEChartData(query) {
}) })
} }
// 导出测试 Excel 2024-04-27 // 导出测试 Excel 2024-04-27
export function exportTestExcel(query) { export function exportTestExcel(query) {
return request({ return request({
......
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 审批信息 --> <!-- 审批信息 -->
<el-card class="box-card" v-loading="processInstanceLoading" v-for="(item, index) in runningTasks" :key="index"> <el-card
class="box-card"
v-loading="processInstanceLoading"
v-for="(item, index) in runningTasks"
:key="index"
>
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="el-icon-picture-outline">{{$t('审批任务')}}{{ item.name }}</span> <span class="el-icon-picture-outline"
>{{ $t("审批任务") }}{{ item.name }}</span
>
</div> </div>
<el-col :span="16" :offset="6"> <el-col :span="16" :offset="6">
<el-form :ref="'form' + index" :model="auditForms[index]" :rules="auditRule" label-width="100px"> <el-form
<el-form-item :label="$t('流程名')" v-if="processInstance && processInstance.name"> :ref="'form' + index"
:model="auditForms[index]"
:rules="auditRule"
label-width="100px"
>
<el-form-item
:label="$t('流程名')"
v-if="processInstance && processInstance.name"
>
{{ processInstance.name }} {{ processInstance.name }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('流程发起人')" v-if="processInstance && processInstance.startUser"> <el-form-item
:label="$t('流程发起人')"
v-if="processInstance && processInstance.startUser"
>
{{ processInstance.startUser.nickname }} {{ processInstance.startUser.nickname }}
<el-tag type="info" size="mini">{{ processInstance.startUser.deptName }}</el-tag> <el-tag type="info" size="mini">{{
processInstance.startUser.deptName
}}</el-tag>
</el-form-item> </el-form-item>
<el-form-item :label="$t('抄送人')" prop="copyUserIds"> <el-form-item :label="$t('抄送人')" prop="copyUserIds">
<el-select v-model="auditForms[index].copyUserIds" clearable multiple filterable style="width: 100%"> <el-select
<el-option v-for="item in userOptions" :key="parseInt(item.id)" :label="item.nickname" v-model="auditForms[index].copyUserIds"
:value="parseInt(item.id)"/> clearable
multiple
filterable
style="width: 100%"
>
<el-option
v-for="item in userOptions"
:key="parseInt(item.id)"
:label="item.nickname"
:value="parseInt(item.id)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('审批建议')" prop="comment"> <el-form-item :label="$t('审批建议')" prop="comment">
<el-input type="textarea" v-model="auditForms[index].comment" :placeholder="$t('请输入审批建议')"/> <el-input
type="textarea"
v-model="auditForms[index].comment"
:placeholder="$t('请输入审批建议')"
/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px;"> <div style="margin-left: 10%; margin-bottom: 20px; font-size: 14px">
<el-button :loading="loading" icon="el-icon-edit-outline" type="success" size="mini" @click="handleAudit(item, true)">{{$t('通过')}} <el-button
:loading="loading"
icon="el-icon-edit-outline"
type="success"
size="mini"
@click="handleAudit(item, true)"
>{{ $t("通过") }}
</el-button> </el-button>
<el-button :loading="loading" icon="el-icon-circle-close" type="danger" size="mini" @click="handleAudit(item, false)">{{$t('不通过')}} <el-button
:loading="loading"
icon="el-icon-circle-close"
type="danger"
size="mini"
@click="handleAudit(item, false)"
>{{ $t("不通过") }}
</el-button> </el-button>
<el-button :loading="loading" icon="el-icon-edit-outline" type="primary" size="mini" @click="handleUpdateAssignee(item)">{{$t('转办')}} <el-button
:loading="loading"
icon="el-icon-edit-outline"
type="primary"
size="mini"
@click="handleUpdateAssignee(item)"
>{{ $t("转办") }}
</el-button> </el-button>
<!-- <el-button icon="el-icon-edit-outline" type="primary" size="mini" @click="handleDelegate(item)">{{ $t('委派') }}</el-button>--> <!-- <el-button icon="el-icon-edit-outline" type="primary" size="mini" @click="handleDelegate(item)">{{ $t('委派') }}</el-button>-->
<!-- <el-button icon="el-icon-refresh-left" type="warning" size="mini" @click="handleBack(item)">{{ $t('退回') }}</el-button>--> <!-- <el-button icon="el-icon-refresh-left" type="warning" size="mini" @click="handleBack(item)">{{ $t('退回') }}</el-button>-->
</div> </div>
</el-col> </el-col>
</el-card> </el-card>
<!-- 申请信息 --> <!-- 申请信息 -->
<el-card class="box-card mt-10" v-loading="processInstanceLoading"> <el-card class="box-card mt-10" v-loading="processInstanceLoading">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="el-icon-document">{{$t('申请信息')}}{{ processInstance.name }}</span> <span class="el-icon-document"
>{{ $t("申请信息") }}{{ processInstance.name }}</span
>
</div> </div>
<el-col v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 10" <el-col
:span="16" :offset="6"> v-if="
this.processInstance.processDefinition &&
this.processInstance.processDefinition.formType === 10
"
:span="16"
:offset="6"
>
<div> <div>
<parser :key="new Date().getTime()" :form-conf="detailForm" @submit="submitForm"/> <parser
:key="new Date().getTime()"
:form-conf="detailForm"
@submit="submitForm"
/>
</div> </div>
</el-col> </el-col>
<div v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 20"> <div
<component v-if="businessKeyToComponent" :is="businessKeyToComponent.component" v-bind="businessKeyToComponent" /> v-if="
this.processInstance.processDefinition &&
this.processInstance.processDefinition.formType === 20
"
>
<component
v-if="businessKeyToComponent"
:is="businessKeyToComponent.component"
v-bind="businessKeyToComponent"
/>
<div v-else> <div v-else>
<router-link :to="this.processInstance.processDefinition.formCustomViewPath + '?id=' <router-link
+ this.processInstance.businessKey"> :to="
<el-button type="primary">{{$t('点击查看')}}</el-button> this.processInstance.processDefinition.formCustomViewPath +
'?id=' +
this.processInstance.businessKey
"
>
<el-button type="primary">{{ $t("点击查看") }}</el-button>
</router-link> </router-link>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card class="box-card mt-10" v-loading="tasksLoad"> <el-card class="box-card mt-10" v-loading="tasksLoad">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="el-icon-picture-outline">{{$t('审批记录')}}</span> <span class="el-icon-picture-outline">{{ $t("审批记录") }}</span>
</div> </div>
<el-col :span="16" :offset="4"> <el-col :span="16" :offset="4">
<div class="block"> <div class="block">
<el-timeline> <el-timeline>
<el-timeline-item v-for="(item, index) in tasks" :key="index" <el-timeline-item
:icon="getTimelineItemIcon(item)" :type="getTimelineItemType(item)"> v-for="(item, index) in tasks"
<p style="font-weight: 700">{{$t('任务')}}{{ item.name }}</p> :key="index"
:icon="getTimelineItemIcon(item)"
:type="getTimelineItemType(item)"
>
<p style="font-weight: 700">{{ $t("任务") }}{{ item.name }}</p>
<el-card :body-style="{ padding: '10px' }"> <el-card :body-style="{ padding: '10px' }">
<label v-if="item.assigneeUser" style="font-weight: normal; margin-right: 30px;"> <label
{{$t('审批人')}}{{ item.assigneeUser.nickname }} v-if="item.assigneeUser"
<el-tag type="info" size="mini">{{ item.assigneeUser.deptName }}</el-tag> style="font-weight: normal; margin-right: 30px"
>
{{ $t("审批人") }}{{ item.assigneeUser.nickname }}
<el-tag type="info" size="mini">{{
item.assigneeUser.deptName
}}</el-tag>
</label>
<label style="font-weight: normal"
>{{ $t("创建时间") }}</label
>
<label style="color: #8a909c; font-weight: normal">{{
parseTime(item.createTime)
}}</label>
<label
v-if="item.endTime"
style="margin-left: 30px; font-weight: normal"
>{{ $t("审批时间") }}</label
>
<label
v-if="item.endTime"
style="color: #8a909c; font-weight: normal"
>
{{ parseTime(item.endTime) }}</label
>
<label
v-if="item.durationInMillis"
style="margin-left: 30px; font-weight: normal"
>{{ $t("耗时") }}</label
>
<label
v-if="item.durationInMillis"
style="color: #8a909c; font-weight: normal"
>
{{ getDateStar(item.durationInMillis) }}
</label> </label>
<label style="font-weight: normal">{{$t('创建时间')}}</label>
<label style="color:#8a909c; font-weight: normal">{{ parseTime(item.createTime) }}</label>
<label v-if="item.endTime" style="margin-left: 30px;font-weight: normal">{{$t('审批时间')}}</label>
<label v-if="item.endTime" style="color:#8a909c;font-weight: normal"> {{
parseTime(item.endTime)
}}</label>
<label v-if="item.durationInMillis" style="margin-left: 30px;font-weight: normal">{{$t('耗时')}}</label>
<label v-if="item.durationInMillis" style="color:#8a909c;font-weight: normal">
{{ getDateStar(item.durationInMillis) }} </label>
<p v-if="item.comment"> <p v-if="item.comment">
<el-tag :type="getTimelineItemType(item)">{{ item.comment }}</el-tag> <el-tag :type="getTimelineItemType(item)">{{
item.comment
}}</el-tag>
</p> </p>
</el-card> </el-card>
</el-timeline-item> </el-timeline-item>
...@@ -96,48 +203,84 @@ ...@@ -96,48 +203,84 @@
<!-- 高亮流程图 --> <!-- 高亮流程图 -->
<el-card class="box-card mt-10" v-loading="processInstanceLoading"> <el-card class="box-card mt-10" v-loading="processInstanceLoading">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span class="el-icon-picture-outline">{{$t('流程图')}}</span> <span class="el-icon-picture-outline">{{ $t("流程图") }}</span>
</div> </div>
<my-process-viewer key="designer" v-model="bpmnXML" v-bind="bpmnControlForm" :activityData="activityList" <my-process-viewer
:processInstanceData="processInstance" :taskData="tasks"/> key="designer"
v-model="bpmnXML"
v-bind="bpmnControlForm"
:activityData="activityList"
:processInstanceData="processInstance"
:taskData="tasks"
/>
</el-card> </el-card>
<!-- 对话框(转派审批人) --> <!-- 对话框(转派审批人) -->
<el-dialog :title="$t('转派审批人')" :visible.sync="updateAssignee.open" width="500px" append-to-body> <el-dialog
<el-form ref="updateAssigneeForm" :model="updateAssignee.form" :rules="updateAssignee.rules" label-width="110px"> :title="$t('转派审批人')"
:visible.sync="updateAssignee.open"
width="500px"
append-to-body
>
<el-form
ref="updateAssigneeForm"
:model="updateAssignee.form"
:rules="updateAssignee.rules"
label-width="110px"
>
<el-form-item :label="$t('新审批人')" prop="assigneeUserId"> <el-form-item :label="$t('新审批人')" prop="assigneeUserId">
<el-select v-model="updateAssignee.form.assigneeUserId" clearable style="width: 100%"> <el-select
<el-option v-for="item in userOptions" :key="parseInt(item.id)" :label="item.nickname" v-model="updateAssignee.form.assigneeUserId"
:value="parseInt(item.id)"/> clearable
style="width: 100%"
>
<el-option
v-for="item in userOptions"
:key="parseInt(item.id)"
:label="item.nickname"
:value="parseInt(item.id)"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitUpdateAssigneeForm">{{$t('确定')}}</el-button> <el-button type="primary" @click="submitUpdateAssigneeForm">{{
<el-button @click="cancelUpdateAssigneeForm">{{$t('取消')}}</el-button> $t("确定")
}}</el-button>
<el-button @click="cancelUpdateAssigneeForm">{{
$t("取消")
}}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {getProcessDefinitionBpmnXML} from "@/api/bpm/definition"; import { getProcessDefinitionBpmnXML } from "@/api/bpm/definition";
import {DICT_TYPE, getDictDatas} from "@/utils/dict"; import { DICT_TYPE, getDictDatas } from "@/utils/dict";
import store from "@/store"; import store from "@/store";
import {decodeFields} from "@/utils/formGenerator"; import { decodeFields } from "@/utils/formGenerator";
import Parser from '@/components/parser/Parser' import Parser from "@/components/parser/Parser";
import {createProcessInstance, getProcessInstance} from "@/api/bpm/processInstance"; import {
import {approveTask, getTaskListByProcessInstanceId, rejectTask, updateTaskAssignee} from "@/api/bpm/task"; createProcessInstance,
import {getDate} from "@/utils/dateUtils"; getProcessInstance,
import {listSimpleUsers} from "@/api/system/user"; } from "@/api/bpm/processInstance";
import {getActivityList} from "@/api/bpm/activity"; import {
import OfferSpecialDetail from "@/views/ecw/offer/components/SpecialDetail" approveTask,
getTaskListByProcessInstanceId,
rejectTask,
updateTaskAssignee,
} from "@/api/bpm/task";
import { getDate } from "@/utils/dateUtils";
import { listSimpleUsers } from "@/api/system/user";
import { getActivityList } from "@/api/bpm/activity";
import OfferSpecialDetail from "@/views/ecw/offer/components/SpecialDetail";
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails"; import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
import shippingDetail from '@/views/ecw/box/shippingDetail' import shippingDetail from "@/views/ecw/box/shippingDetail";
import SplitDetail from '@/views/ecw/order/components/SplitDetail' import SplitDetail from "@/views/ecw/order/components/SplitDetail";
import MergeDetail from '@/views/ecw/order/components/MergeDetail' import MergeDetail from "@/views/ecw/order/components/MergeDetail";
import CargoControlDetail from '@/views/ecw/order/components/CargoControlDetail' import CargoControlDetail from "@/views/ecw/order/components/CargoControlDetail";
import BoxSplitDetail from '@/views/ecw/order/components/BoxSplitDetail' import BoxSplitDetail from "@/views/ecw/order/components/BoxSplitDetail";
// 流程实例的详情页,可用于审批 // 流程实例的详情页,可用于审批
export default { export default {
name: "ProcessInstanceDetail", name: "ProcessInstanceDetail",
...@@ -149,64 +292,68 @@ export default { ...@@ -149,64 +292,68 @@ export default {
SplitDetail, SplitDetail,
MergeDetail, MergeDetail,
CargoControlDetail, CargoControlDetail,
BoxSplitDetail BoxSplitDetail,
}, },
computed:{ computed: {
matterNum(){ matterNum() {
return this.$store.state.user.matterNum return this.$store.state.user.matterNum;
}, },
businessKeyToComponent(){ businessKeyToComponent() {
if(!this.processInstance.processDefinition || !this.processInstance.processDefinition.formCustomViewPath){ if (
return false !this.processInstance.processDefinition ||
!this.processInstance.processDefinition.formCustomViewPath
) {
return false;
} }
const map = { const map = {
"shippingDetail": { shippingDetail: {
component: "shippingDetail", component: "shippingDetail",
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
}, },
// 报价单特价审核,原来配置的组件名 // 报价单特价审核,原来配置的组件名
"special-discount": { "special-discount": {
component: 'OfferSpecialDetail', component: "OfferSpecialDetail",
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
type: 1 type: 1,
}, },
// 报价单特价审核,符合命名规则的组件名 // 报价单特价审核,符合命名规则的组件名
offer_special: { offer_special: {
component: 'OfferSpecialDetail', component: "OfferSpecialDetail",
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
type: 1 type: 1,
}, },
offer_commission: { offer_commission: {
component: 'OfferSpecialDetail', component: "OfferSpecialDetail",
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
type: 2 type: 2,
}, },
// 原来的费用申请 // 原来的费用申请
free_apply: { free_apply: {
component: "warehouseDetails", component: "warehouseDetails",
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
type: 2 type: 2,
}, },
// 2.0空运加的批量申请 // 2.0空运加的批量申请
batch_free_apply: { batch_free_apply: {
component: () => import('@/views/ecw/order/components/BatchFeeApplication'), component: () =>
import("@/views/ecw/order/components/BatchFeeApplication"),
businessId: this.processInstance.businessKey, businessId: this.processInstance.businessKey,
processInstanceId: this.$route.query.id processInstanceId: this.$route.query.id,
}, },
retired_warehouse: { retired_warehouse: {
component: "warehouseDetails", component: "warehouseDetails",
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
type: 3 type: 3,
}, },
warehouse_transfer: { warehouse_transfer: {
component: "warehouseDetails", component: "warehouseDetails",
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
type: 1 type: 1,
}, },
warehouse_update: { warehouse_update: {
component: "warehouseDetails", component: "warehouseDetails",
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
type: 4 type: 4,
}, },
container_modify: { container_modify: {
component: "shippingDetail", component: "shippingDetail",
...@@ -299,183 +446,213 @@ export default { ...@@ -299,183 +446,213 @@ export default {
}, },
// 放货修改 // 放货修改
order_update_release: { order_update_release: {
component: 'CargoControlDetail', component: "CargoControlDetail",
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
applyType: 7 applyType: 7,
}, },
// 反复核 // 反复核
order_fallback: { order_fallback: {
component: 'CargoControlDetail', component: "CargoControlDetail",
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
applyType: 8 applyType: 8,
}, },
// 调货审核 // 调货审核
order_transfer: { order_transfer: {
component: 'CargoControlDetail', component: "CargoControlDetail",
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
applyType: 9 applyType: 9,
}, },
// 取消放货审核 // 取消放货审核
order_cancel_release: { order_cancel_release: {
component: 'CargoControlDetail', component: "CargoControlDetail",
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
applyType: 10 applyType: 10,
}, },
// 提单审核 // 提单审核
order_landing_bill:{ order_landing_bill: {
component: () => import('@/views/ecw/order/components/LandingBillDetail'), component: () =>
import("@/views/ecw/order/components/LandingBillDetail"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
// 订单审核详情 // 订单审核详情
order_approval:{ order_approval: {
component: () => import('@/views/ecw/order/components/ApprovalDetail'), component: () =>
import("@/views/ecw/order/components/ApprovalDetail"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
// 订单修改审批 // 订单修改审批
order_update:{ order_update: {
component: () => import('@/views/ecw/order/components/UpdateDetail'), component: () => import("@/views/ecw/order/components/UpdateDetail"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
// 预付异常审核 // 预付异常审核
prepay_excetion:{ prepay_excetion: {
component: () => import('@/views/ecw/order/components/PrepayExceptionDetail'), component: () =>
import("@/views/ecw/order/components/PrepayExceptionDetail"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
// 客户延期 // 客户延期
customer_delay:{ customer_delay: {
component: () => import('@/views/ecw/customer/components/Delay'), component: () => import("@/views/ecw/customer/components/Delay"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
//付款单审核-所有审核流程详情组件 //付款单审核-所有审核流程详情组件
finance_payment_approve:{ finance_payment_approve: {
component: () => import('@/views/ecw/financial/components/PaymentApproval'), component: () =>
import("@/views/ecw/financial/components/PaymentApproval"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
//收款单审核 //收款单审核
finance_receipt_approve:{ finance_receipt_approve: {
component: () => import('@/views/ecw/financial/components/CollectionApproval'), component: () =>
import("@/views/ecw/financial/components/CollectionApproval"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
//收款单核销 //收款单核销
finance_receipt_write_off:{ finance_receipt_write_off: {
component: () => import('@/views/ecw/financial/components/CollectionWriteoff'), component: () =>
import("@/views/ecw/financial/components/CollectionWriteoff"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
//收款单反核销审核 //收款单反核销审核
finance_receipt_write_off_no:{ finance_receipt_write_off_no: {
component: () => import('@/views/ecw/financial/components/CollectionApproval'), component: () =>
import("@/views/ecw/financial/components/CollectionApproval"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
//收款单核销反审核 //收款单核销反审核
finance_receipt_approve_no:{ finance_receipt_approve_no: {
component: () => import('@/views/ecw/financial/components/CollectionApproval'), component: () =>
import("@/views/ecw/financial/components/CollectionApproval"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
//收款单银行实收明细核销 //收款单银行实收明细核销
finance_receipt_item_write_off:{ finance_receipt_item_write_off: {
component: () => import('@/views/ecw/financial/components/CollectionBankDetail'), component: () =>
import("@/views/ecw/financial/components/CollectionBankDetail"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
//收款单银行实收反核销 //收款单银行实收反核销
finance_receipt_item_write_off_no:{ finance_receipt_item_write_off_no: {
component: () => import('@/views/ecw/financial/components/CollectionBankDetail'), component: () =>
import("@/views/ecw/financial/components/CollectionBankDetail"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
//佣金付款单审核详情-关于佣金付款单所有审核详情 //佣金付款单审核详情-关于佣金付款单所有审核详情
commissionPaymentDetails:{ commissionPaymentDetails: {
component: ()=>import('@/views/ecw/financial/components/commissionPaymentDetails.vue'), component: () =>
import(
"@/views/ecw/financial/components/commissionPaymentDetails.vue"
),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
/*撤销拆单*/ /*撤销拆单*/
split_revoke:{ split_revoke: {
component: () => import("@/views/ecw/order/components/SplitRevokeDetail"), component: () =>
id: this.processInstance.businessKey import("@/views/ecw/order/components/SplitRevokeDetail"),
id: this.processInstance.businessKey,
}, },
// 不可出渠道异常审核 // 不可出渠道异常审核
not_shiping_channel:{ not_shiping_channel: {
component: () => import('@/views/ecw/order/components/NotShipingChannel'), component: () =>
import("@/views/ecw/order/components/NotShipingChannel"),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
// 出货批量加价审核 // 出货批量加价审核
box_batch_markup:{ box_batch_markup: {
component: () => import('@/views/ecw/box/components/batchMakeUpDetail.vue'), component: () =>
import("@/views/ecw/box/components/batchMakeUpDetail.vue"),
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
type: this.processInstance.processDefinition?.formCustomViewPath type: this.processInstance.processDefinition?.formCustomViewPath,
}, },
// 可获移交详情 // 可获移交详情
customer_handover_details:{ customer_handover_details: {
component: () => import('@/views/ecw/customer/components/customer-handover-details.vue'), component: () =>
import(
"@/views/ecw/customer/components/customer-handover-details.vue"
),
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
type: this.processInstance.processDefinition?.formCustomViewPath type: this.processInstance.processDefinition?.formCustomViewPath,
}, },
// 出货审核 // 出货审核
air_shipment: { air_shipment: {
component: "shippingDetail", component: "shippingDetail",
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
type: 'shipment' type: "shipment",
}, },
//排单分拣审核 //排单分拣审核
shipment_order_sorting: { shipment_order_sorting: {
component: "shippingDetail", component: "shippingDetail",
processId: this.processInstance.businessKey processId: this.processInstance.businessKey,
}, },
// 出货反审 // 出货反审
shipment_review: { shipment_review: {
component: "shippingDetail", component: "shippingDetail",
processId: this.processInstance.businessKey processId: this.processInstance.businessKey,
}, },
// 删单退场 // 删单退场
customs_declare_remove: { customs_declare_remove: {
component: "shippingDetail", component: "shippingDetail",
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
type: 'deleteExit' type: "deleteExit",
}, },
// 空运到仓审核 // 空运到仓审核
air_warehouse: { air_warehouse: {
component: "shippingDetail", component: "shippingDetail",
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
type: 'air_warehouse' type: "air_warehouse",
}, },
// 空运到仓审核 // 空运到仓审核
air_warehouse_no: { air_warehouse_no: {
component: "shippingDetail", component: "shippingDetail",
processId: this.processInstance.businessKey, processId: this.processInstance.businessKey,
type: 'air_warehouse' type: "air_warehouse",
}, },
revoke_clear:{ revoke_clear: {
component:() => import("@/views/ecw/box/components/RevokeClear"), component: () => import("@/views/ecw/box/components/RevokeClear"),
id: this.processInstance.businessKey id: this.processInstance.businessKey,
}, },
// 重量超限 // 重量超限
over_weight_exception:{ over_weight_exception: {
component: () => import('@/views/ecw/order/exception/components/overweightException'), component: () =>
import(
"@/views/ecw/order/exception/components/overweightException"
),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
// 线路重量超限 // 线路重量超限
line_weight_exception:{ line_weight_exception: {
component: () => import('@/views/ecw/order/exception/components/overweightException'), component: () =>
import(
"@/views/ecw/order/exception/components/overweightException"
),
id: this.processInstance.businessKey, id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath path: this.processInstance.processDefinition?.formCustomViewPath,
}, },
} };
console.log('formCustomViewPath', this.processInstance.processDefinition.formCustomViewPath.trim()) console.log(
return map[this.processInstance.processDefinition.formCustomViewPath.trim()] "formCustomViewPath",
} this.processInstance.processDefinition.formCustomViewPath.trim()
);
return map[
this.processInstance.processDefinition.formCustomViewPath.trim()
];
},
}, },
data() { data() {
return { return {
...@@ -489,13 +666,13 @@ export default { ...@@ -489,13 +666,13 @@ export default {
// 流程表单详情 // 流程表单详情
detailForm: { detailForm: {
fields: [] fields: [],
}, },
// BPMN 数据 // BPMN 数据
bpmnXML: null, bpmnXML: null,
bpmnControlForm: { bpmnControlForm: {
prefix: "activiti" prefix: "activiti",
}, },
activityList: [], activityList: [],
...@@ -507,7 +684,13 @@ export default { ...@@ -507,7 +684,13 @@ export default {
runningTasks: [], runningTasks: [],
auditForms: [], auditForms: [],
auditRule: { auditRule: {
comment: [{required: true, message: this.$t("审批建议不能为空"), trigger: "blur"}], comment: [
{
required: true,
message: this.$t("审批建议不能为空"),
trigger: "blur",
},
],
}, },
// 转派审批人 // 转派审批人
...@@ -518,8 +701,14 @@ export default { ...@@ -518,8 +701,14 @@ export default {
assigneeUserId: undefined, assigneeUserId: undefined,
}, },
rules: { rules: {
assigneeUserId: [{required: true, message: this.$t("新审批人不能为空"), trigger: "change"}], assigneeUserId: [
} {
required: true,
message: this.$t("新审批人不能为空"),
trigger: "change",
},
],
},
}, },
// 数据字典 // 数据字典
...@@ -529,14 +718,14 @@ export default { ...@@ -529,14 +718,14 @@ export default {
created() { created() {
this.id = this.$route.query.id; this.id = this.$route.query.id;
if (!this.id) { if (!this.id) {
this.$message.error('未传递 id 参数,无法查看流程信息'); this.$message.error("未传递 id 参数,无法查看流程信息");
return; return;
} }
this.getDetail(); this.getDetail();
// 获得用户列表 // 获得用户列表
this.userOptions = []; this.userOptions = [];
listSimpleUsers().then(response => { listSimpleUsers().then((response) => {
this.userOptions.push(...response.data); this.userOptions.push(...response.data);
}); });
}, },
...@@ -545,14 +734,14 @@ export default { ...@@ -545,14 +734,14 @@ export default {
getDetail() { getDetail() {
// 获得流程实例相关 // 获得流程实例相关
this.processInstanceLoading = true; this.processInstanceLoading = true;
getProcessInstance(this.id).then(response => { getProcessInstance(this.id).then((response) => {
if (!response.data) { if (!response.data) {
this.$message.error('查询不到流程信息!'); this.$message.error("查询不到流程信息!");
return; return;
} }
// 设置流程信息 // 设置流程信息
this.processInstance = response.data; this.processInstance = response.data;
console.log(this.processInstance) console.log(this.processInstance);
// 设置表单信息 // 设置表单信息
if (this.processInstance.processDefinition.formType === 10) { if (this.processInstance.processDefinition.formType === 10) {
...@@ -560,25 +749,29 @@ export default { ...@@ -560,25 +749,29 @@ export default {
...JSON.parse(this.processInstance.processDefinition.formConf), ...JSON.parse(this.processInstance.processDefinition.formConf),
disabled: true, // 表单禁用 disabled: true, // 表单禁用
formBtns: false, // 按钮隐藏 formBtns: false, // 按钮隐藏
fields: decodeFields(this.processInstance.processDefinition.formFields) fields: decodeFields(
} this.processInstance.processDefinition.formFields
),
};
// 设置表单的值 // 设置表单的值
this.detailForm.fields.forEach(item => { this.detailForm.fields.forEach((item) => {
const val = this.processInstance.formVariables[item.__vModel__] const val = this.processInstance.formVariables[item.__vModel__];
if (val) { if (val) {
item.__config__.defaultValue = val item.__config__.defaultValue = val;
} }
}); });
} }
// 加载流程图 // 加载流程图
getProcessDefinitionBpmnXML(this.processInstance.processDefinition.id).then(response => { getProcessDefinitionBpmnXML(
this.bpmnXML = response.data this.processInstance.processDefinition.id
).then((response) => {
this.bpmnXML = response.data;
}); });
// 加载活动列表 // 加载活动列表
getActivityList({ getActivityList({
processInstanceId: this.processInstance.id processInstanceId: this.processInstance.id,
}).then(response => { }).then((response) => {
this.activityList = response.data; this.activityList = response.data;
}); });
...@@ -590,7 +783,7 @@ export default { ...@@ -590,7 +783,7 @@ export default {
this.tasksLoad = true; this.tasksLoad = true;
this.runningTasks = []; this.runningTasks = [];
this.auditForms = []; this.auditForms = [];
getTaskListByProcessInstanceId(this.id).then(response => { getTaskListByProcessInstanceId(this.id).then((response) => {
// 审批记录 // 审批记录
this.tasks = response.data; this.tasks = response.data;
// 排序,将未完成的排在前面,已完成的排在后面; // 排序,将未完成的排在前面,已完成的排在后面;
...@@ -610,17 +803,19 @@ export default { ...@@ -610,17 +803,19 @@ export default {
// 需要审核的记录 // 需要审核的记录
const userId = store.getters.userId; const userId = store.getters.userId;
this.tasks.forEach(task => { this.tasks.forEach((task) => {
if (task.result !== 1) { // 只有待处理才需要 if (task.result !== 1) {
// 只有待处理才需要
return; return;
} }
if (!task.assigneeUser || task.assigneeUser.id !== userId) { // 自己不是处理人 if (!task.assigneeUser || task.assigneeUser.id !== userId) {
// 自己不是处理人
return; return;
} }
this.runningTasks.push({...task}); this.runningTasks.push({ ...task });
this.auditForms.push({ this.auditForms.push({
comment: '' comment: "",
}) });
}); });
// 取消加载中 // 取消加载中
...@@ -637,10 +832,10 @@ export default { ...@@ -637,10 +832,10 @@ export default {
// 设置对应的表单 // 设置对应的表单
this.detailForm = { this.detailForm = {
...JSON.parse(row.formConf), ...JSON.parse(row.formConf),
fields: decodeFields(row.formFields) fields: decodeFields(row.formFields),
} };
} else if (row.formCustomCreatePath) { } else if (row.formCustomCreatePath) {
this.$router.push({path: row.formCustomCreatePath}); this.$router.push({ path: row.formCustomCreatePath });
// 这里暂时无需加载流程图,因为跳出到另外个 Tab; // 这里暂时无需加载流程图,因为跳出到另外个 Tab;
} }
}, },
...@@ -658,81 +853,87 @@ export default { ...@@ -658,81 +853,87 @@ export default {
const variables = params.values; const variables = params.values;
createProcessInstance({ createProcessInstance({
processDefinitionId: this.selectProcessInstance.id, processDefinitionId: this.selectProcessInstance.id,
variables: variables variables: variables,
}).then(response => {
this.$modal.msgSuccess("发起流程成功");
// 关闭当前窗口
this.$tab.closeOpenPage();
this.$router.go(-1);
}).catch(() => {
conf.disabled = false; // 表单开启
conf.formBtns = true; // 按钮展示
}) })
.then((response) => {
this.$modal.msgSuccess("发起流程成功");
// 关闭当前窗口
this.$tab.closeOpenPage();
this.$router.go(-1);
})
.catch(() => {
conf.disabled = false; // 表单开启
conf.formBtns = true; // 按钮展示
});
}, },
getDateStar(ms) { getDateStar(ms) {
return getDate(ms); return getDate(ms);
}, },
getTimelineItemIcon(item) { getTimelineItemIcon(item) {
if (item.result === 1) { if (item.result === 1) {
return 'el-icon-time'; return "el-icon-time";
} }
if (item.result === 2) { if (item.result === 2) {
return 'el-icon-check'; return "el-icon-check";
} }
if (item.result === 3) { if (item.result === 3) {
return 'el-icon-close'; return "el-icon-close";
} }
if (item.result === 4) { if (item.result === 4) {
return 'el-icon-remove-outline'; return "el-icon-remove-outline";
} }
return ''; return "";
}, },
getTimelineItemType(item) { getTimelineItemType(item) {
if (item.result === 1) { if (item.result === 1) {
return 'primary'; return "primary";
} }
if (item.result === 2) { if (item.result === 2) {
return 'success'; return "success";
} }
if (item.result === 3) { if (item.result === 3) {
return 'danger'; return "danger";
} }
if (item.result === 4) { if (item.result === 4) {
return 'info'; return "info";
} }
return ''; return "";
}, },
/** 处理审批通过和不通过的操作 */ /** 处理审批通过和不通过的操作 */
handleAudit(task, pass) { handleAudit(task, pass) {
const index = this.runningTasks.indexOf(task); const index = this.runningTasks.indexOf(task);
this.$refs['form' + index][0].validate(valid => { this.$refs["form" + index][0].validate((valid) => {
if (!valid) { if (!valid) {
return; return;
} }
const data = { const data = {
id: task.id, id: task.id,
comment: this.auditForms[index].comment, comment: this.auditForms[index].comment,
copyUserIds: this.auditForms[index].copyUserIds copyUserIds: this.auditForms[index].copyUserIds,
} };
this.loading = true this.loading = true;
if (pass) { if (pass) {
approveTask(data).then(response => { approveTask(data)
let p = this.matterNum .then((response) => {
//this.$store.commit('GET_MAATER', --p) let p = this.matterNum;
this.$modal.msgSuccess("审批通过成功!"); //this.$store.commit('GET_MAATER', --p)
this.getDetail(); // 获得最新详情 this.$modal.msgSuccess("审批通过成功!");
}).finally(() => { this.getDetail(); // 获得最新详情
this.loading = false })
}); .finally(() => {
this.loading = false;
});
} else { } else {
rejectTask(data).then(response => { rejectTask(data)
let p = this.matterNum .then((response) => {
//this.$store.commit('GET_MAATER', --p) let p = this.matterNum;
this.$modal.msgSuccess("审批不通过成功!"); //this.$store.commit('GET_MAATER', --p)
this.getDetail(); // 获得最新详情 this.$modal.msgSuccess("审批不通过成功!");
}).finally(() => { this.getDetail(); // 获得最新详情
this.loading = false })
}); .finally(() => {
this.loading = false;
});
} }
}); });
}, },
...@@ -746,13 +947,13 @@ export default { ...@@ -746,13 +947,13 @@ export default {
}, },
/** 提交转派审批人 */ /** 提交转派审批人 */
submitUpdateAssigneeForm() { submitUpdateAssigneeForm() {
this.$refs['updateAssigneeForm'].validate(valid => { this.$refs["updateAssigneeForm"].validate((valid) => {
if (!valid) { if (!valid) {
return; return;
} }
updateTaskAssignee(this.updateAssignee.form).then(response => { updateTaskAssignee(this.updateAssignee.form).then((response) => {
this.$modal.msgSuccess("转派任务成功!"); this.$modal.msgSuccess("转派任务成功!");
let p = this.matterNum let p = this.matterNum;
// this.$store.commit('GET_MAATER', --p) // this.$store.commit('GET_MAATER', --p)
this.updateAssignee.open = false; this.updateAssignee.open = false;
this.getDetail(); // 获得最新详情 this.getDetail(); // 获得最新详情
...@@ -779,8 +980,8 @@ export default { ...@@ -779,8 +980,8 @@ export default {
/** 处理审批退回的操作 */ /** 处理审批退回的操作 */
handleBack(task) { handleBack(task) {
this.$modal.msgError("暂不支持【退回】功能!"); this.$modal.msgError("暂不支持【退回】功能!");
} },
} },
}; };
</script> </script>
......
...@@ -66,11 +66,23 @@ ...@@ -66,11 +66,23 @@
<el-button icon="el-icon-refresh" @click="resetQuery">{{ <el-button icon="el-icon-refresh" @click="resetQuery">{{
$t("重置") $t("重置")
}}</el-button> }}</el-button>
<el-button type="primary" @click="handleQuery2">{{
$t("批量通过")
}}</el-button>
<el-button type="primary" @click="handleQuery3">{{
$t("批量不通过")
}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 列表 --> <!-- 列表 -->
<el-table v-loading="loading" :data="list"> <el-table
v-loading="loading"
:data="list"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center">
</el-table-column>
<el-table-column <el-table-column
:label="$t('流程编号')" :label="$t('流程编号')"
align="center" align="center"
...@@ -164,12 +176,28 @@ ...@@ -164,12 +176,28 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="审批意见" prop="comment">
<el-input
v-model="form.comment"
style="width: 300px"
placeholder="请输入审批意见"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getTodoTaskPage } from "@/api/bpm/task"; import { getTodoTaskPage } from "@/api/bpm/task";
import { cancelProcessInstance } from "@/api/bpm/processInstance"; import { cancelProcessInstance } from "@/api/bpm/processInstance";
import { approveTask2, rejectTask2 } from "@/api/bpm/task";
export default { export default {
//lanbm 2024-05-08 添加查询条件不清空优化 //lanbm 2024-05-08 添加查询条件不清空优化
name: "BpmTaskTodo", name: "BpmTaskTodo",
...@@ -193,6 +221,31 @@ export default { ...@@ -193,6 +221,31 @@ export default {
businessNo: null, businessNo: null,
category: null, category: null,
}, },
titleType: 1,
title: undefined,
open: false,
// 选中数组
ids: [],
BpmNameList: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 表单参数
form: {
//审批意见
comment: undefined,
},
// 表单校验
rules: {
comment: [
{
required: true,
message: this.$t("审批意见不能为空。"),
trigger: "blur",
},
],
},
}; };
}, },
created() { created() {
...@@ -224,6 +277,101 @@ export default { ...@@ -224,6 +277,101 @@ export default {
this.queryParams.pageNo = 1; this.queryParams.pageNo = 1;
this.getList(); this.getList();
}, },
handleQuery2() {
//批量通过 lanbm 2024-05-20 add
if (this.ids.length == 0) {
this.$message.error(this.$t("请选择需要批量通过的任务。"));
return;
}
let firstName = this.BpmNameList[0];
for (var i = 0; i < this.BpmNameList.length; i++) {
if (firstName != this.BpmNameList[i]) {
this.$message.error(this.$t("您选择的任务不全是同一类流程。"));
return;
}
}
this.form.comment="";
this.title = "批量通过";
this.titleType = 1;
this.open = true;
},
handleQuery3() {
//批量不通过 lanbm 2024-05-20 add
if (this.ids.length == 0) {
//this.modal.msgSuccess
this.$message.error(this.$t("请选择需要批量不通过的任务。"));
return;
}
let firstName = this.BpmNameList[0];
for (var i = 0; i < this.BpmNameList.length; i++) {
if (firstName != this.BpmNameList[i]) {
this.$message.error(this.$t("您选择的任务不全是同一类流程。"));
return;
}
}
this.form.comment="";
this.title = "批量不通过";
this.titleType = 2;
this.open = true;
},
submitForm() {
this.$refs["form"].validate((valid) => {
if (!valid) {
return;
}
//approveTask2
if (this.titleType == 1) {
let p1 = [];
for (var i = 0; i < this.ids.length; i++) {
var obj = {};
obj.id = this.ids[i];
obj.comment = this.form.comment;
p1.push(obj);
}
approveTask2(p1).then((response) => {
if (response.data == true) {
this.open = false;
this.$modal.msgSuccess(this.$t("批量处理成功"));
this.getList();
} else {
this.open = false;
this.$modal.msgSuccess(this.$t("批量处理失败"));
}
});
} else {
let p2 = [];
for (var i = 0; i < this.ids.length; i++) {
var obj = {};
obj.id = this.ids[i];
obj.comment = this.form.comment;
p2.push(obj);
}
rejectTask2(p2).then((response) => {
if (response.data == true) {
this.open = false;
this.$modal.msgSuccess(this.$t("批量处理成功"));
this.getList();
} else {
this.open = false;
this.$modal.msgSuccess(this.$t("批量处理失败"));
}
});
}
});
},
cancel() {
this.title = "";
this.open = false;
},
handleSelectionChange(selection) {
//表格多选函数 lanbm 2024-05-20 add
//row.processInstance.id
this.BpmNameList = selection.map((item) => item.processInstance.name);
this.ids = selection.map((item) => item.processInstance.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRangeCreateTime = []; this.dateRangeCreateTime = [];
......
<template> <template>
<div class="app-costForm shippingSea-dialog"> <div class="app-costForm shippingSea-dialog">
<el-form ref="costForm" :model="costObj" :rules="rules" label-width="80px"> <el-form ref="costForm" :model="costObj" :rules="rules" label-width="120px">
<el-form-item :label="$t('操作步骤')" prop="opStepType"> <el-form-item :label="$t('操作步骤')" prop="opStepType">
<el-select v-model="costObj.opStepType" :placeholder="$t('请选择操作步骤')"> <el-select
<el-option v-for="type in getDictDatas(DICT_TYPE[this.process])" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option> v-model="costObj.opStepType"
:placeholder="$t('请选择操作步骤')"
>
<el-option
v-for="type in getDictDatas(DICT_TYPE[this.process])"
:key="type.value"
:label="$l(type, 'label')"
:value="type.value"
></el-option>
</el-select> </el-select>
<!--<el-select v-if="flag=='seaAir'" v-model="costObj.opStepType" :placeholder="$t('请选择操作步骤')"> <!--<el-select v-if="flag=='seaAir'" v-model="costObj.opStepType" :placeholder="$t('请选择操作步骤')">
<el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option> <el-option v-for="type in this.getDictDatas(DICT_TYPE.BOX_SEA_AIR)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option>
...@@ -12,36 +19,78 @@ ...@@ -12,36 +19,78 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('费用类型')" prop="costType"> <el-form-item :label="$t('费用类型')" prop="costType">
<el-select v-model="costObj.costType" :placeholder="$t('请选择费用类型')"> <el-select
<el-option v-for="type in this.getDictDatas(DICT_TYPE.FEE_TYPE)" :key="type.value" :label="$l(type, 'label')" :value="type.value"></el-option> v-model="costObj.costType"
:placeholder="$t('请选择费用类型')"
>
<el-option
v-for="type in this.getDictDatas(DICT_TYPE.FEE_TYPE)"
:key="type.value"
:label="$l(type, 'label')"
:value="type.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('供应商')" prop="supplierId"> <el-form-item :label="$t('供应商')" prop="supplierId">
<el-select v-model="costObj.supplierId" :placeholder="$t('请选择供应商')"> <el-select
<el-option v-for="supplier in allSupplier" :key="supplier.id" :label="$l(supplier, 'company')" :value="supplier.id"></el-option> v-model="costObj.supplierId"
:placeholder="$t('请选择供应商')"
>
<el-option
v-for="supplier in allSupplier"
:key="supplier.id"
:label="$l(supplier, 'company')"
:value="supplier.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--lanbm 2024-05-17 添加字段-->
<el-form-item :label="$t('费用产生时间')" prop="freecsdate">
<el-date-picker
v-model="costObj.freecsdate"
style="width: 200px"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
type="datetime"
placeholder="费用产生时间"
/>
</el-form-item>
<el-row class="two-element-formItem"> <el-row class="two-element-formItem">
<el-form-item :label="$t('金额')" prop="price"> <el-form-item :label="$t('金额')" prop="price">
<el-input-number v-model="costObj.price" controls-position="right" :min="1"></el-input-number> <el-input-number
v-model="costObj.price"
controls-position="right"
:min="1"
></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="" label-width="0px" prop="priceUnit"> <el-form-item label="" label-width="0px" prop="priceUnit">
<el-select v-model="costObj.priceUnit" :placeholder="$t('请选择单位')"> <el-select
<el-option v-for="type in this.currencyList" :key="type.id" :label="$l(type, 'title')" :value="type.id"></el-option> v-model="costObj.priceUnit"
:placeholder="$t('请选择单位')"
>
<el-option
v-for="type in this.currencyList"
:key="type.id"
:label="$l(type, 'title')"
:value="type.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-form-item :label="$t('备注')"> <el-form-item :label="$t('备注')">
<el-input v-model="costObj.remarks" type="textarea" rows="2" :placeholder="$t('请输入备注')"></el-input> <el-input
v-model="costObj.remarks"
type="textarea"
rows="2"
:placeholder="$t('请输入备注')"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="operate-button"> <div class="operate-button">
<el-button type="primary" @click="submit">{{$t('确定')}}</el-button> <el-button type="primary" @click="submit">{{ $t("确定") }}</el-button>
<el-button @click="$emit('closeDialog')">{{$t('取消')}}</el-button> <el-button @click="$emit('closeDialog')">{{ $t("取消") }}</el-button>
</div> </div>
</div> </div>
</template> </template>
...@@ -51,7 +100,7 @@ import { getSupplierPage } from "@/api/ecw/supplier"; ...@@ -51,7 +100,7 @@ import { getSupplierPage } from "@/api/ecw/supplier";
import { createCost } from "@/api/ecw/box"; import { createCost } from "@/api/ecw/box";
import { serviceMsg } from "./shippingSea/utils"; import { serviceMsg } from "./shippingSea/utils";
import { getCurrencyList } from "@/api/ecw/currency"; import { getCurrencyList } from "@/api/ecw/currency";
import {getDictDatas} from "@/utils/dict"; import { getDictDatas } from "@/utils/dict";
export default { export default {
name: "costForm", name: "costForm",
...@@ -65,26 +114,59 @@ export default { ...@@ -65,26 +114,59 @@ export default {
currencyList: [], currencyList: [],
rules: { rules: {
opStepType: [{ required: true, message: this.$t("操作步骤不能为空"), trigger: "change" }], opStepType: [
costType: [{ required: true, message: this.$t("费用类型不能为空"), trigger: "change" }], {
supplierId: [{ required: true, message: this.$t("供应商不能为空"), trigger: "blur" }], required: true,
price: [{ required: true, message: this.$t("金额不能为空"), trigger: "blur" }], message: this.$t("操作步骤不能为空"),
priceUnit: [{ required: true, message: this.$t("金额单位不能为空"), trigger: "blur" }] trigger: "change",
},
],
costType: [
{
required: true,
message: this.$t("费用类型不能为空"),
trigger: "change",
},
],
supplierId: [
{
required: true,
message: this.$t("供应商不能为空"),
trigger: "blur",
},
],
price: [
{ required: true, message: this.$t("金额不能为空"), trigger: "blur" },
],
priceUnit: [
{
required: true,
message: this.$t("金额单位不能为空"),
trigger: "blur",
},
],
freeCsDate: [
{
required: true,
message: this.$t("费用产生时间不能为空"),
trigger: "blur",
},
],
}, },
// flag: 'sea' // flag: 'sea'
}; };
}, },
computed:{ computed: {
flag(){ flag() {
return this.$attrs.flag || 'sea' return this.$attrs.flag || "sea";
}, },
process(){ process() {
return { return {
'air': 'BOX_AIR_SHIPMENT_PROCESS', air: "BOX_AIR_SHIPMENT_PROCESS",
'sea': 'BOX_SHIPPING_PROCESS', sea: "BOX_SHIPPING_PROCESS",
'seaAir': 'BOX_SEA_AIR' seaAir: "BOX_SEA_AIR",
}[this.flag] }[this.flag];
} },
}, },
created() { created() {
// 供应商 // 供应商
...@@ -94,6 +176,7 @@ export default { ...@@ -94,6 +176,7 @@ export default {
}); });
const { costDetail } = this.$attrs; const { costDetail } = this.$attrs;
this.costObj = { ...costDetail }; this.costObj = { ...costDetail };
//币种获取接口 lanbm 2024-05-16 添加注释
getCurrencyList().then((res) => { getCurrencyList().then((res) => {
this.currencyList = res.data ?? []; this.currencyList = res.data ?? [];
}); });
......
<template> <template>
<div class="app-container shipping-detail"> <div class="app-container shipping-detail">
<el-row type="flex" style="margin-top: 15px; margin-bottom: 15px" justify="center"> <el-row
type="flex"
style="margin-top: 15px; margin-bottom: 15px"
justify="center"
>
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="22"> <el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="22">
<div style="display: flex; justify-content: space-between;align-items: flex-end;"> <div
<h2>{{$t('出货详情')}}</h2> style="
display: flex;
justify-content: space-between;
align-items: flex-end;
"
>
<h2>{{ $t("出货详情") }}</h2>
<div> <div>
<!-- <el-button size="small" @click="handleCommand('edit')">{{$t('编辑')}}</el-button> --> <!-- <el-button size="small" @click="handleCommand('edit')">{{$t('编辑')}}</el-button> -->
<el-button size="small" v-hasPermi="['shipment:box:action:sea']" @click="handleCommand('router')">{{$t('操作')}}</el-button> <el-button
<el-button type="primary" v-hasPermi="['shipment:box:action:error']" size="small" @click="handleCommand('error')">{{$t('异常登记')}}</el-button> size="small"
<el-button type="primary" v-hasPermi="['shipment:box:action:cost']" size="small" @click="handleCommand('cost')">{{$t('费用登记')}}</el-button> v-hasPermi="['shipment:box:action:sea']"
@click="handleCommand('router')"
>{{ $t("操作") }}</el-button
>
<el-button
type="primary"
v-hasPermi="['shipment:box:action:error']"
size="small"
@click="handleCommand('error')"
>{{ $t("异常登记") }}</el-button
>
<el-button
type="primary"
v-hasPermi="['shipment:box:action:cost']"
size="small"
@click="handleCommand('cost')"
>{{ $t("费用登记") }}</el-button
>
<!-- <el-button type="danger" size="small" @click="handleCommand('delete')">{{$t('删除')}}</el-button> --> <!-- <el-button type="danger" size="small" @click="handleCommand('delete')">{{$t('删除')}}</el-button> -->
</div> </div>
</div> </div>
<el-card style="margin-top: 15px"> <el-card style="margin-top: 15px">
<el-descriptions :column="4" border> <el-descriptions :column="4" border>
<el-descriptions-item :label="$t('自编号')"> <el-descriptions-item :label="$t('自编号')">
{{shipmentObj.selfNo}} {{ shipmentObj.selfNo }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')"> <el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="shipmentObj.transportType" /> <dict-tag
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
:value="shipmentObj.transportType"
/>
</el-descriptions-item> </el-descriptions-item>
<!-- <el-descriptions-item :label="$t('出货渠道')"> <!-- <el-descriptions-item :label="$t('出货渠道')">
{{getShipChannelName(shipmentObj.shippingChannelId)}} {{getShipChannelName(shipmentObj.shippingChannelId)}}
</el-descriptions-item> --> </el-descriptions-item> -->
<el-descriptions-item :label="$t('柜型')"> <el-descriptions-item :label="$t('柜型')">
{{getCabinetLabel(shipmentObj.cabinetId)}} {{ getCabinetLabel(shipmentObj.cabinetId) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('状态')"> <el-descriptions-item :label="$t('状态')">
{{shipmentObj.shipmentStatusText}} {{ shipmentObj.shipmentStatusText }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('总计')"> <el-descriptions-item :label="$t('总计')">
{{getBoxSum(shipmentObj.boxStatistics)}} {{ getBoxSum(shipmentObj.boxStatistics) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('始发地')"> <el-descriptions-item :label="$t('始发地')">
{{getCityName(shipmentObj.startWarehouseId)}} {{ getCityName(shipmentObj.startWarehouseId) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('目的地')"> <el-descriptions-item :label="$t('目的地')">
{{getCityName(shipmentObj.destWarehouseId)}} {{ getCityName(shipmentObj.destWarehouseId) }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="SO NO"> <el-descriptions-item label="SO NO">
{{shipmentObj.bookSeaInfo ? shipmentObj.bookSeaInfo.sono : '' }} {{ shipmentObj.bookSeaInfo ? shipmentObj.bookSeaInfo.sono : "" }}
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
...@@ -47,103 +77,321 @@ ...@@ -47,103 +77,321 @@
<el-tabs style="margin-top: 15px" type="border-card" value="detail"> <el-tabs style="margin-top: 15px" type="border-card" value="detail">
<el-tab-pane :label="$t('明细')" name="detail"> <el-tab-pane :label="$t('明细')" name="detail">
<div class="detail-pane"> <div class="detail-pane">
<div>{{$t('当前部分')}}</div> <div>{{ $t("当前部分") }}</div>
<el-select :placeholder="$t('请选择')" v-model="sectionId" @change="sectionChange"> <el-select
:placeholder="$t('请选择')"
v-model="sectionId"
@change="sectionChange"
>
<el-option key="0" :label="$t('全部')" value="0"></el-option> <el-option key="0" :label="$t('全部')" value="0"></el-option>
<el-option v-for="item in sectionList" :key="item.id" :label="item.title" :value="item.id"></el-option> <el-option
v-for="item in sectionList"
:key="item.id"
:label="item.title"
:value="item.id"
></el-option>
</el-select> </el-select>
<p class="box-weight"> <p class="box-weight">
{{getSectionInfo}} {{ getSectionInfo }}
</p> </p>
<div style="margin-left:30px;"> <div style="margin-left: 30px">
<el-button type="primary" v-hasPermi="['shipment:box:order:select']" size="small" @click="()=>updateStatus('selected')">{{$t('更新所选订单状态')}}</el-button> <el-button
<el-button type="primary" v-hasPermi="['shipment:box:order:all']" size="small" @click="()=>updateStatus('all')">{{$t('更新全部订单状态')}}</el-button> type="primary"
v-hasPermi="['shipment:box:order:select']"
size="small"
@click="() => updateStatus('selected')"
>{{ $t("更新所选订单状态") }}</el-button
>
<el-button
type="primary"
v-hasPermi="['shipment:box:order:all']"
size="small"
@click="() => updateStatus('all')"
>{{ $t("更新全部订单状态") }}</el-button
>
</div> </div>
<div class="document-status"> <div class="document-status">
<p>{{$t('单证状态')}}</p> <p>{{ $t("单证状态") }}</p>
<template v-for="(item, index) in getDocStatus(sectionObj.sectionOrderList)"> <template
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="item" :key="index" /> v-for="(item, index) in getDocStatus(
sectionObj.sectionOrderList
)"
>
<dict-tag
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
:value="item"
:key="index"
/>
</template> </template>
</div> </div>
</div> </div>
<el-table :data="sectionObj.sectionOrderList" style="width: 100%" border @selection-change="handleSelectionChange"> <el-table
<el-table-column type="selection" width="50" :selectable="selectable"></el-table-column>> :data="sectionObj.sectionOrderList"
<el-table-column align="center" :label="$t('序号')" width="50" prop="tidanNum" /> style="width: 100%"
<el-table-column prop="orderNo" :label="$t('订单号')" align="center"> border
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="50"
:selectable="selectable"
></el-table-column
>>
<el-table-column
align="center"
:label="$t('序号')"
width="50"
prop="tidanNum"
/>
<el-table-column
prop="orderNo"
:label="$t('订单号')"
align="center"
>
<template v-slot="scope"> <template v-slot="scope">
<a href="javascript:void(0)" @click="jumpOrderDetail(scope.row)">{{ scope.row.orderNo }}</a> <a
href="javascript:void(0)"
@click="jumpOrderDetail(scope.row)"
>{{ scope.row.orderNo }}</a
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="goodsList" :label="$t('货物信息')" width="230px" align="center"> <el-table-column
<template v-slot="{row}"> prop="goodsList"
:label="$t('货物信息')"
width="230px"
align="center"
>
<template v-slot="{ row }">
<section> <section>
<div v-for="(item, index) in row.goodsList" :key="index"> <div v-for="(item, index) in row.goodsList" :key="index">
{{index+1}}{{item.prodTitleZh}} {{ index + 1 }}{{ item.prodTitleZh }}
</div> </div>
</section> </section>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="num" :label="$t('计划箱数')" align="center"></el-table-column> <el-table-column
<el-table-column prop="installNum" :label="$t('实装箱数')" align="center"></el-table-column> prop="num"
<el-table-column prop="unloadNum" :label="$t('卸柜箱数')" align="center"></el-table-column> :label="$t('计划箱数')"
<el-table-column prop="destWarehouseName" :label="$t('提货点')" align="center"></el-table-column> align="center"
<el-table-column prop="volume" :label="$t('体积')" align="center"></el-table-column> ></el-table-column>
<el-table-column prop="weight" :label="$t('重量')" align="center"></el-table-column> <el-table-column
<el-table-column prop="totalWorth" :label="$t('货值')" align="center"></el-table-column> prop="installNum"
<el-table-column prop="customsType" :label="$t('报关方式')" align="center"> :label="$t('实装箱数')"
align="center"
></el-table-column>
<el-table-column
prop="unloadNum"
:label="$t('卸柜箱数')"
align="center"
></el-table-column>
<el-table-column
prop="destWarehouseName"
:label="$t('提货点')"
align="center"
></el-table-column>
<el-table-column
prop="volume"
:label="$t('体积')"
align="center"
></el-table-column>
<el-table-column
prop="weight"
:label="$t('重量')"
align="center"
></el-table-column>
<el-table-column
prop="totalWorth"
:label="$t('货值')"
align="center"
></el-table-column>
<el-table-column
prop="customsType"
:label="$t('报关方式')"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<div :class="scope.row.customsType !== 1 ? 'customsType-red' : ''"> <div
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" /> :class="
scope.row.customsType !== 1 ? 'customsType-red' : ''
"
>
<dict-tag
:type="DICT_TYPE.ECW_CUSTOMS_TYPE"
:value="scope.row.customsType"
/>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="customsFee" :label="$t('报关费用')" align="center"></el-table-column> <el-table-column
<el-table-column prop="" :label="$t('操作')" align="center" width="120px"> prop="customsFee"
:label="$t('报关费用')"
align="center"
></el-table-column>
<el-table-column
prop=""
:label="$t('操作')"
align="center"
width="120px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="small" :disabled="scope.row.abnormalDealStatus === 1" @click="()=>updateStatus('single', scope.row)">{{$t('更新状态')}}</el-button> <el-button
type="primary"
size="small"
:disabled="scope.row.abnormalDealStatus === 1"
@click="() => updateStatus('single', scope.row)"
>{{ $t("更新状态") }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('状态')" name="status"> <el-tab-pane :label="$t('状态')" name="status">
<div v-for="(item, index) in logList" :key="item.id" :class="`shipping-status ${index === 0 ? 'curr-status' : '' }`"> <div
v-for="(item, index) in logList"
:key="item.id"
:class="`shipping-status ${index === 0 ? 'curr-status' : ''}`"
>
<div class="status-line"></div> <div class="status-line"></div>
<div class="status-number">{{logList.length - index}}</div> <div class="status-number">{{ logList.length - index }}</div>
<div class="status-info"> <div class="status-info">
<div>{{$l(item, 'title')}} <el-button v-if="item.approvalId>0" type="text" @click="handleApproval(item.bpmProcessId)">{{$t('查看审批')}}</el-button></div>
<div> <div>
<p>{{formatDate(item.createTime)}}</p> {{ $l(item, "title") }}
<p>{{item.operator}}</p> <el-button
v-if="item.approvalId > 0"
type="text"
@click="handleApproval(item.bpmProcessId)"
>{{ $t("查看审批") }}</el-button
>
</div>
<div>
<p>{{ formatDate(item.createTime) }}</p>
<p>{{ item.operator }}</p>
</div> </div>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('费用')" name="fee"> <el-tab-pane :label="$t('费用')" name="fee">
<el-table :data="costList" style="width: 100%" border> <el-table :data="costList" style="width: 100%" border>
<el-table-column type="index" align="center" :label="$t('序号')" width="50" /> <el-table-column
<el-table-column prop="costType" :label="$t('费用类型')" align="center"> type="index"
align="center"
:label="$t('序号')"
width="50"
/>
<el-table-column
prop="costType"
:label="$t('费用类型')"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.FEE_TYPE" :value="scope.row.costType" /> <dict-tag
:type="DICT_TYPE.FEE_TYPE"
:value="scope.row.costType"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="supplierId" :label="$t('供应商')" align="center"> <el-table-column
prop="supplierId"
:label="$t('供应商')"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{getSupplier(scope.row.supplierId)}} {{ getSupplier(scope.row.supplierId) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="price" :label="$t('金额')" align="center"></el-table-column> <el-table-column
<el-table-column prop="payPrice" :label="$t('实付金额')" align="center"></el-table-column> prop="price"
<el-table-column prop="payTime" :label="$t('创建日期')" align="center"> :label="$t('金额')"
align="center"
></el-table-column>
<el-table-column
prop="priceUnitName"
:label="$t('币种')"
align="center"
></el-table-column>
<el-table-column
prop="payPrice"
:label="$t('实付金额')"
align="center"
></el-table-column>
<el-table-column
prop="payPriceBz"
:label="$t('实付币种')"
align="center"
></el-table-column>
<el-table-column
prop="payTime"
:label="$t('实付日期')"
align="center"
>
<!--实付日期 改为 创建日期 lanbm 2024-05-06 add--> <!--实付日期 改为 创建日期 lanbm 2024-05-06 add-->
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.payTime">{{formatDate(scope.row.payTime)}}</span> <span v-if="scope.row.payTime">{{
formatDate(scope.row.payTime)
}}</span>
</template>
</el-table-column>
<el-table-column
prop="payableNo"
:label="$t('付款单号')"
align="center"
>
<template slot-scope="scope">
<span
style="color: #1890ff"
@click="paymentDetail(scope.row)"
>{{ scope.row.payableNo }}</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="creator"
:label="$t('创建人')"
align="center"
></el-table-column>
<el-table-column
prop="createTime"
:label="$t('创建日期')"
align="center"
></el-table-column>
<el-table-column
prop="updater"
:label="$t('修改人')"
align="center"
></el-table-column>
<el-table-column
prop="updateTime"
:label="$t('修改日期')"
align="center"
></el-table-column>
<!--添加备注信息列 lanbm 2024-05-16 add-->
<el-table-column
prop="remarks"
:label="$t('备注')"
align="center"
></el-table-column>
<el-table-column :label="$t('操作')" align="center"> <el-table-column :label="$t('操作')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="small" @click="editCostClick(scope.row)" style="marginRight:10px;" v-hasPermi="['ecw:box-cost:update']">{{$t('编辑')}}</el-button> <el-button
<el-popconfirm :title="$t('确定是否删除')" @confirm="deleteCostClick(scope.row)"> type="primary"
<el-button type="danger" size="small" slot="reference" v-hasPermi="['ecw:box-cost:delete']">{{$t('删除')}}</el-button> size="small"
@click="editCostClick(scope.row)"
style="marginright: 10px"
v-hasPermi="['ecw:box-cost:update']"
>{{ $t("编辑") }}</el-button
>
<el-popconfirm
:title="$t('确定是否删除')"
@confirm="deleteCostClick(scope.row)"
>
<el-button
type="danger"
size="small"
slot="reference"
v-hasPermi="['ecw:box-cost:delete']"
>{{ $t("删除") }}</el-button
>
</el-popconfirm> </el-popconfirm>
</template> </template>
</el-table-column> </el-table-column>
...@@ -151,34 +399,76 @@ ...@@ -151,34 +399,76 @@
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('异常')" name="error"> <el-tab-pane :label="$t('异常')" name="error">
<el-table :data="errorList" style="width: 100%" border> <el-table :data="errorList" style="width: 100%" border>
<el-table-column type="index" align="center" :label="$t('序号')" width="50" /> <el-table-column
type="index"
align="center"
:label="$t('序号')"
width="50"
/>
<el-table-column prop="opStep" :label="$t('操作')" align="center"> <el-table-column prop="opStep" :label="$t('操作')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_PROCESS" :value="scope.row.opStep" /> <dict-tag
:type="DICT_TYPE.BOX_SHIPPING_PROCESS"
:value="scope.row.opStep"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="billAbnId" :label="$t('异常')" align="center"> <el-table-column
prop="billAbnId"
:label="$t('异常')"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :type="DICT_TYPE.BOX_SHIPPING_TICKET_EXCEPTION" :value="scope.row.billAbnId" /> <dict-tag
:type="DICT_TYPE.BOX_SHIPPING_TICKET_EXCEPTION"
:value="scope.row.billAbnId"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="abnDetail" :label="$t('异常描述')" align="center" width="300"></el-table-column> <el-table-column
<el-table-column prop="delayDays" :label="$t('异常延迟天数')" align="center"></el-table-column> prop="abnDetail"
<el-table-column prop="" :label="$t('异常时间')" align="center" width="200"> :label="$t('异常描述')"
align="center"
width="300"
></el-table-column>
<el-table-column
prop="delayDays"
:label="$t('异常延迟天数')"
align="center"
></el-table-column>
<el-table-column
prop=""
:label="$t('异常时间')"
align="center"
width="200"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.abnStartTime">{{formatDate(scope.row.abnStartTime)}} - </span> <span v-if="scope.row.abnStartTime"
<span v-if="scope.row.abnEndTime">{{formatDate(scope.row.abnEndTime)}}</span> >{{ formatDate(scope.row.abnStartTime) }} -
</span>
<span v-if="scope.row.abnEndTime">{{
formatDate(scope.row.abnEndTime)
}}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('表单')" name="download"> <el-tab-pane :label="$t('表单')" name="download">
<el-table :data="downloadList" style="width: 50%"> <el-table :data="downloadList" style="width: 50%">
<el-table-column prop="title" :label="$t('文件类型')"></el-table-column> <el-table-column
prop="title"
:label="$t('文件类型')"
></el-table-column>
<el-table-column prop="" :label="$t('下载链接')"> <el-table-column prop="" :label="$t('下载链接')">
<template slot-scope="scope"> <template slot-scope="scope">
<a v-if="scope.row.serviceName" href="javascript:void(0)" @click="downloadDetailFile(scope.row)" v-hasPermi="[`${scope.row.hasPermi}`]">{{$t('下载')}}</a> <a
<div v-else>{{$t('未完成')}}</div> v-if="scope.row.serviceName"
href="javascript:void(0)"
@click="downloadDetailFile(scope.row)"
v-hasPermi="[`${scope.row.hasPermi}`]"
>{{ $t("下载") }}</a
>
<div v-else>{{ $t("未完成") }}</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -188,18 +478,48 @@ ...@@ -188,18 +478,48 @@
</el-row> </el-row>
<!-- 对话框(添加 / 修改) --> <!-- 对话框(添加 / 修改) -->
<el-dialog :title="dialogConfig.title" :visible.sync="dialogConfig.visible" :width="dialogConfig.width" append-to-body class="shippingSea-dialog"> <el-dialog
:title="dialogConfig.title"
:visible.sync="dialogConfig.visible"
:width="dialogConfig.width"
append-to-body
class="shippingSea-dialog"
>
<template v-if="dialogConfig.type === 'edit'"> <template v-if="dialogConfig.type === 'edit'">
<editForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :warehouseList="warehouseList" :transportTypes="transportTypes" :cabinetList="cabinetList" /> <editForm
v-if="dialogConfig.visible"
@closeDialog="closeDialog"
:shipmentObj="shipmentObj"
:warehouseList="warehouseList"
:transportTypes="transportTypes"
:cabinetList="cabinetList"
/>
</template> </template>
<template v-if="dialogConfig.type === 'cost'"> <template v-if="dialogConfig.type === 'cost'">
<costForm v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :costDetail="costDetail" flag="sea" /> <costForm
v-if="dialogConfig.visible"
@closeDialog="closeDialog"
:shipmentObj="shipmentObj"
:costDetail="costDetail"
flag="sea"
/>
</template> </template>
<template v-if="dialogConfig.type === 'error'"> <template v-if="dialogConfig.type === 'error'">
<regError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :allUsers="allUsers" flag="sea" /> <regError
v-if="dialogConfig.visible"
@closeDialog="closeDialog"
:shipmentObj="shipmentObj"
:allUsers="allUsers"
flag="sea"
/>
</template> </template>
<template v-if="dialogConfig.type === 'updateError'"> <template v-if="dialogConfig.type === 'updateError'">
<updateError v-if="dialogConfig.visible" @closeDialog="closeDialog" :shipmentObj="shipmentObj" :errorInfo="errorInfo" /> <updateError
v-if="dialogConfig.visible"
@closeDialog="closeDialog"
:shipmentObj="shipmentObj"
:errorInfo="errorInfo"
/>
</template> </template>
</el-dialog> </el-dialog>
</div> </div>
...@@ -213,6 +533,7 @@ import { ...@@ -213,6 +533,7 @@ import {
getAbnormalList, getAbnormalList,
deleteCost, deleteCost,
deletebox, deletebox,
getPaymentId,
} from "@/api/ecw/box"; } from "@/api/ecw/box";
import { getChannelList } from "@/api/ecw/channel"; import { getChannelList } from "@/api/ecw/channel";
import { getCabinetPage } from "@/api/ecw/cabinet"; import { getCabinetPage } from "@/api/ecw/cabinet";
...@@ -231,6 +552,8 @@ import regError from "./regError.vue"; ...@@ -231,6 +552,8 @@ import regError from "./regError.vue";
import editForm from "./editForm.vue"; import editForm from "./editForm.vue";
import updateError from "./updateError.vue"; import updateError from "./updateError.vue";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
//lanbm 2024-05-16 add
import { getCurrencyList } from "@/api/ecw/currency";
export default { export default {
name: "EcwBoxQuery", name: "EcwBoxQuery",
...@@ -254,6 +577,11 @@ export default { ...@@ -254,6 +577,11 @@ export default {
const { data } = res; const { data } = res;
this.allUsers = data.list ?? []; this.allUsers = data.list ?? [];
}); });
//lanbm 2024-05-16 add
/* 不用此方式
getCurrencyList().then((res) => {
this.currencyList = res.data ?? [];
});*/
}, },
data() { data() {
return { return {
...@@ -299,27 +627,44 @@ export default { ...@@ -299,27 +627,44 @@ export default {
costDetail: {}, costDetail: {},
// 下载 // 下载
downloadList: [ downloadList: [
{ title: this.$t("预装单"), serviceName: "downloadPreloadGoodsList", hasPermi: "shipment:box:download:downloadPreloadGoodsList" }, {
{ title: this.$t("已装单"), serviceName: "downloadLoadGoodsList", hasPermi: "shipment:box:download:downloadLoadGoodsList" }, title: this.$t("预装单"),
{ title: this.$t("应收汇总表"), serviceName: "downloadReceivableList", hasPermi: "shipment:box:download:downloadReceivableList" }, serviceName: "downloadPreloadGoodsList",
hasPermi: "shipment:box:download:downloadPreloadGoodsList",
},
{
title: this.$t("已装单"),
serviceName: "downloadLoadGoodsList",
hasPermi: "shipment:box:download:downloadLoadGoodsList",
},
{
title: this.$t("应收汇总表"),
serviceName: "downloadReceivableList",
hasPermi: "shipment:box:download:downloadReceivableList",
},
{ {
title: this.$t("提货单"), title: this.$t("提货单"),
serviceName: "zipDownload", serviceName: "zipDownload",
fileFormat: "zip", fileFormat: "zip",
hasPermi: "shipment:box:download:zipDownload" hasPermi: "shipment:box:download:zipDownload",
}, },
{ {
title: "agent list", title: "agent list",
serviceName: "downloadAgentListFiles", serviceName: "downloadAgentListFiles",
type: "url", type: "url",
hasPermi: "shipment:box:download:downloadAgentListFiles" hasPermi: "shipment:box:download:downloadAgentListFiles",
},
{
title: "soncap",
serviceName: "downloadSoncapFiles",
type: "url",
hasPermi: "shipment:box:download:downloadSoncapFiles",
}, },
{ title: "soncap", serviceName: "downloadSoncapFiles", type: "url", hasPermi: "shipment:box:download:downloadSoncapFiles" },
{ {
title: this.$t("提单Copy"), title: this.$t("提单Copy"),
serviceName: "downloadLadingCopy", serviceName: "downloadLadingCopy",
type: "url", type: "url",
hasPermi: "shipment:box:download:downloadLadingCopy" hasPermi: "shipment:box:download:downloadLadingCopy",
}, },
], ],
// 选中行 // 选中行
...@@ -330,9 +675,19 @@ export default { ...@@ -330,9 +675,19 @@ export default {
errorType: "", errorType: "",
operate: "", operate: "",
}, },
//币种信息 lanbm 2024-05-16 add
currencyList: [],
}; };
}, },
methods: { methods: {
paymentDetail(row) {
//lanbm 2024-05-16跳转到付款单详情页面
const id = row.payableId;
getPaymentId(id).then((r) => {
let sId = r.data;
this.$router.push("/financial/paymentDetail?id=" + sId);
});
},
selectable(row, index) { selectable(row, index) {
if (row.abnormalDealStatus === 1) return false; if (row.abnormalDealStatus === 1) return false;
return true; return true;
...@@ -442,6 +797,7 @@ export default { ...@@ -442,6 +797,7 @@ export default {
}, },
// 获取费用 // 获取费用
getCost() { getCost() {
//lanbm 2024-05-16 添加注释
getCostList({ shipmentId: this.shipmentId }).then((res) => { getCostList({ shipmentId: this.shipmentId }).then((res) => {
this.costList = res.data; this.costList = res.data;
}); });
...@@ -574,11 +930,14 @@ export default { ...@@ -574,11 +930,14 @@ export default {
fileFormat ?? "xlsx" fileFormat ?? "xlsx"
); );
} }
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载')) this.$message.success(this.$t("已加入导出队列,请稍后在下载日志中下载"));
}, },
handleApproval(id) { handleApproval(id) {
this.$router.push({path: '/bpm/process-instance/detail', query: {id: id}}) this.$router.push({
} path: "/bpm/process-instance/detail",
query: { id: id },
});
},
}, },
computed: { computed: {
visitedViews() { visitedViews() {
...@@ -643,10 +1002,12 @@ export default { ...@@ -643,10 +1002,12 @@ export default {
} }
}, },
// 异常登记和费用登记用到的标识 // 异常登记和费用登记用到的标识
flag(){ flag() {
// 地址中有seaAir则表示海空联运,否则就是海运 // 地址中有seaAir则表示海空联运,否则就是海运
return this.$route.fullPath.toLowerCase().indexOf('seaair') > -1 ? 'seaAir' : 'air' return this.$route.fullPath.toLowerCase().indexOf("seaair") > -1
} ? "seaAir"
: "air";
},
}, },
}; };
</script> </script>
......
...@@ -142,12 +142,30 @@ ...@@ -142,12 +142,30 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="price" :label="$t('金额')" align="center"></el-table-column> <el-table-column prop="price" :label="$t('金额')" align="center"></el-table-column>
<!--lanbm 2024-05-16 修改-->
<el-table-column prop="priceUnitName" :label="$t('币种')" align="center"></el-table-column>
<el-table-column prop="payPrice" :label="$t('实付金额')" align="center"></el-table-column> <el-table-column prop="payPrice" :label="$t('实付金额')" align="center"></el-table-column>
<el-table-column prop="payPriceBz" :label="$t('实付币种')" align="center"></el-table-column>
<el-table-column prop="payTime" :label="$t('实付日期')" align="center"> <el-table-column prop="payTime" :label="$t('实付日期')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.payTime">{{formatDate(scope.row.payTime)}}</span> <span v-if="scope.row.payTime">{{formatDate(scope.row.payTime)}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="payableNo" :label="$t('付款单号')" align="center">
<template slot-scope="scope">
<span
style="color: #1890ff"
@click="paymentDetail(scope.row)"
>{{ scope.row.payableNo }}</span
>
</template>
</el-table-column>
<el-table-column prop="creator" :label="$t('创建人')" align="center"></el-table-column>
<el-table-column prop="createTime" :label="$t('创建日期')" align="center"></el-table-column>
<el-table-column prop="updater" :label="$t('修改人')" align="center"></el-table-column>
<el-table-column prop="updateTime" :label="$t('修改日期')" align="center"></el-table-column>
<!--添加备注信息列 lanbm 2024-05-16 add-->
<el-table-column prop="remarks" :label="$t('备注')" align="center"></el-table-column>
<el-table-column :label="$t('操作')" align="center"> <el-table-column :label="$t('操作')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="small" @click="editCostClick(scope.row)" style="marginRight:10px;" v-hasPermi="['ecw:box-cost:update']">{{$t('编辑')}}</el-button> <el-button type="primary" size="small" @click="editCostClick(scope.row)" style="marginRight:10px;" v-hasPermi="['ecw:box-cost:update']">{{$t('编辑')}}</el-button>
...@@ -241,7 +259,7 @@ import { ...@@ -241,7 +259,7 @@ import {
getCostList, getCostList,
getAbnormalList, getAbnormalList,
deleteCost, deleteCost,
deletebox, deletebox,getPaymentId
} from "@/api/ecw/box"; } from "@/api/ecw/box";
import { getChannelList } from "@/api/ecw/channel"; import { getChannelList } from "@/api/ecw/channel";
import { getCabinetPage } from "@/api/ecw/cabinet"; import { getCabinetPage } from "@/api/ecw/cabinet";
...@@ -404,6 +422,14 @@ export default { ...@@ -404,6 +422,14 @@ export default {
}; };
}, },
methods: { methods: {
paymentDetail(row) {
//lanbm 2024-05-16跳转到付款单详情页面
const id = row.payableId;
getPaymentId(id).then((r) => {
let sId = r.data;
this.$router.push("/financial/paymentDetail?id=" + sId);
});
},
getregprocess(val) { getregprocess(val) {
var data = '' var data = ''
switch(val){ switch(val){
...@@ -588,6 +614,7 @@ export default { ...@@ -588,6 +614,7 @@ export default {
}, },
// 获取费用 // 获取费用
getCost() { getCost() {
//空运费用 lanbm 2024-05-16
getCostList({ shipmentId: this.shipmentId }).then((res) => { getCostList({ shipmentId: this.shipmentId }).then((res) => {
this.costList = res.data; this.costList = res.data;
}); });
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<!-- 海运流程图 --> <!-- 海运流程图 在js脚本中写的固定流程环节 lanbm 2024-05-20 添加注释-->
<seaProcess :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :allLading="allLading" :warehouseList="warehouseList" flag="air" @getBoxInfo="getBoxInfo" /> <seaProcess :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :allLading="allLading" :warehouseList="warehouseList" flag="air" @getBoxInfo="getBoxInfo" />
<!-- 海运步骤图 --> <!-- 海运步骤图 -->
...@@ -45,7 +45,8 @@ import { getDockPage } from "@/api/ecw/dock"; ...@@ -45,7 +45,8 @@ import { getDockPage } from "@/api/ecw/dock";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
import { getLadingShipperPage } from "@/api/ecw/ladingShipper"; import { getLadingShipperPage } from "@/api/ecw/ladingShipper";
// 这里引入的数据切换语言后要刷新才生效,优化办法是label同时配备labelEn字段,然后再页面上用$l函数调用 // 这里引入的数据切换语言后要刷新才生效,优化办法是label同时配备labelEn字段,
// 然后再页面上用$l函数调用
import { airBaseData, airOneData, airNextData } from "./utils"; import { airBaseData, airOneData, airNextData } from "./utils";
/** /**
* 海运操作主页面 * 海运操作主页面
...@@ -124,6 +125,9 @@ export default { ...@@ -124,6 +125,9 @@ export default {
const { data } = res; const { data } = res;
this.shipmentObj = data ?? {}; this.shipmentObj = data ?? {};
this.seaBaseData = this.airBaseData() this.seaBaseData = this.airBaseData()
//发货方式:1、多票,2、单票 deliveryType
//目的港清关:1、我司清关 2、合作方清关 3、客户
//lanbm 2024-05-20 梳理提单补料逻辑
if(this.shipmentObj.destinationClearance==3&&this.shipmentObj.deliveryType==2){ if(this.shipmentObj.destinationClearance==3&&this.shipmentObj.deliveryType==2){
this.seaBaseData = this.airOneData() this.seaBaseData = this.airOneData()
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<!-- 海运流程图 --> <!-- 海运流程图 在js脚本中写的固定流程环节 -->
<seaProcess :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :allLading="allLading" :warehouseList="warehouseList" @getBoxInfo="getBoxInfo" /> <seaProcess :seaBaseData="seaBaseData" :shipmentObj="shipmentObj" :allSupplier="allSupplier" :allDocks="allDocks" :allUsers="allUsers" :allLading="allLading" :warehouseList="warehouseList" @getBoxInfo="getBoxInfo" />
<!-- 海运步骤图 --> <!-- 海运步骤图 -->
...@@ -45,7 +45,8 @@ import { getDockPage } from "@/api/ecw/dock"; ...@@ -45,7 +45,8 @@ import { getDockPage } from "@/api/ecw/dock";
import { listUser } from "@/api/system/user"; import { listUser } from "@/api/system/user";
import { getLadingShipperPage } from "@/api/ecw/ladingShipper"; import { getLadingShipperPage } from "@/api/ecw/ladingShipper";
// 这里引入的数据切换语言后要刷新才生效,优化办法是label同时配备labelEn字段,然后再页面上用$l函数调用 // 这里引入的数据切换语言后要刷新才生效,优化办法是label同时配备labelEn字段,
//然后再页面上用$l函数调用
import { seaBaseData } from "./utils"; import { seaBaseData } from "./utils";
/** /**
* 海运操作主页面 * 海运操作主页面
......
This source diff could not be displayed because it is too large. You can view the blob instead.
<template> <template>
<div class="app-container"> <div class="app-container">
<div slot="header" class="card-title">{{ $t('应付款') }}</div> <div slot="header" class="card-title">{{ $t("应付款") }}</div>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-card v-show="showSearch"> <el-card v-show="showSearch">
<el-form <el-form
...@@ -30,9 +30,6 @@ ...@@ -30,9 +30,6 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="订单号:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" :placeholder="$t('请输入订单号')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item :label="$t('始发仓')"> <el-form-item :label="$t('始发仓')">
<el-select <el-select
v-model="queryParams.departureId" v-model="queryParams.departureId"
...@@ -70,35 +67,38 @@ ...@@ -70,35 +67,38 @@
/> />
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row>
<!--lanbm 2024-05-17 add-->
<el-form-item label="时间节点" prop="dateType">
<el-select
v-model="queryParams.dateType"
:placeholder="$t('请选择时间类型')"
clearable
size="small"
>
<el-option
v-for="item in dateTypes"
:key="item.value"
:label="$l(item, 'label')"
:value="item.value"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="付款单号:" > <el-form-item label="" prop="dateRangeCreateTime">
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" :placeholder="$t('请输入付款单号')" clearable @keyup.enter.native="handleQuery"/> <el-date-picker
</el-form-item> --> v-model="queryParams.dateRangeCreateTime"
style="width: 300px"
<!-- <el-form-item label="状态:"> value-format="yyyy-MM-dd"
<dict-selector :type="DICT_TYPE.ECW_RECEIPT_STATE" v-model="queryParams.control" /> type="datetimerange"
</el-form-item> range-separator="-"
<el-form-item label="业务员:"> :start-placeholder="$t('开始日期')"
<el-select v-model="form.salesmanId" :placeholder="$t('请选择业务员')"> :end-placeholder="$t('结束日期')"
<el-option v-for="item in creatorData" :key="item.id" :label="item.nickname" :value="item.id"/> clearable
</el-select> />
</el-form-item> --> </el-form-item>
</el-row>
<!-- <el-row>
<el-form-item label="收款时间:" >
<el-date-picker
v-model="dateType"
type="datetimerange"
range-separator="到"
start-placeholder="请选择日期"
end-placeholder="请选择日期">
</el-date-picker>
</el-form-item>
</el-row> -->
<el-row> <el-row>
<!-- <el-form-item label="商品名称:" >
<el-input style="max-width: 188px;" v-model="queryParams.orderNo" :placeholder="$t('请输入商品名称')" clearable @keyup.enter.native="handleQuery"/>
</el-form-item> -->
<el-form-item :label="$t('供应商名称')"> <el-form-item :label="$t('供应商名称')">
<el-input <el-input
style="max-width: 188px" style="max-width: 188px"
...@@ -116,22 +116,44 @@ ...@@ -116,22 +116,44 @@
></dict-selector> ></dict-selector>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery">{{ $t('查找') }}</el-button> <el-button type="primary" @click="handleQuery">{{
$t("查找")
}}</el-button>
<el-button <el-button
style="margin-left: 10px" style="margin-left: 10px"
type="success" type="success"
v-hasPermi="['ecw:payable:create']" v-hasPermi="['ecw:payable:create']"
@click="handleAdd(0)" @click="handleAdd(0)"
>{{ $t('新增请款单') }}</el-button >{{ $t("新增付款单") }}</el-button
> >
<!--lanbm 2024-05-17修改此按钮名称-->
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
</el-card> </el-card>
<el-table v-loading="loadings" :data="list" border class="card"> <el-table v-loading="loadings" :data="list" border class="card">
<el-table-column :label="$t('自编号')" align="center" prop="payableNo" /> <el-table-column :label="$t('自编号')" align="center" prop="payableNo" />
<el-table-column :label="$t('货柜号')" align="center" prop="containerNo" /> <!--lanbm 2024-05-17 add-->
<el-table-column :label="$t('供应商')" align="center" prop="supplierName" /> <el-table-column
:label="$t('自编号状态')"
align="center"
prop="shipmentStatusText"
/>
<el-table-column
:label="$t('运输方式')"
align="center"
prop="transportTypeName"
/>
<el-table-column
:label="$t('货柜号')"
align="center"
prop="containerNo"
/>
<el-table-column
:label="$t('供应商')"
align="center"
prop="supplierName"
/>
<el-table-column :label="$t('费用类型')" align="center" prop="feeType"> <el-table-column :label="$t('费用类型')" align="center" prop="feeType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
...@@ -143,11 +165,30 @@ ...@@ -143,11 +165,30 @@
<el-table-column :label="$t('金额')" align="center" prop="totalAmount"> <el-table-column :label="$t('金额')" align="center" prop="totalAmount">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span> <span>{{ scope.row.totalAmount }}</span>
<span>{{getCurrencyLabel(scope.row.currencyId)}}</span> <span>{{ getCurrencyLabel(scope.row.currencyId) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column :label="$t('创建时间')" align="center" prop="channelName" /> <el-table-column
<el-table-column :label="$t('创建人')" align="center" prop="toDepartureId" /> --> :label="$t('费用产生时间')"
align="center"
prop="freecsdate"
/>
<!--lanbm 2024-05-17 添加字段 BaseDO -->
<el-table-column :label="$t('创建人')" align="center" prop="creator" />
<el-table-column
:label="$t('创建时间')"
align="center"
prop="createTime"
/>
<el-table-column :label="$t('修改人')" align="center" prop="updater" />
<el-table-column
:label="$t('修改时间')"
align="center"
prop="updateTime"
/>
<el-table-column :label="$t('备注')" align="center" prop="remark" />
<el-table-column <el-table-column
:label="$t('操作')" :label="$t('操作')"
align="center" align="center"
...@@ -155,14 +196,26 @@ ...@@ -155,14 +196,26 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:payable:edit']" v-hasPermi="['ecw:payable:edit']"
@click="editClick(scope.row)" @click="editClick(scope.row)"
>{{ $t('编辑') }}</el-button> >{{ $t("编辑") }}</el-button
<el-button size="mini" type="text" v-hasPermi="['ecw:payable:add']" @click="handleAdd(scope.row.id)" >
>{{ $t('请款') }}</el-button> <el-button
<el-button size="mini" type="text" v-hasPermi="['ecw:payable:delete']" @click="deleteClick(scope.row)">{{ $t('删除') }}</el-button> size="mini"
type="text"
v-hasPermi="['ecw:payable:add']"
@click="handleAdd(scope.row.id)"
>{{ $t("请款") }}</el-button
>
<el-button
size="mini"
type="text"
v-hasPermi="['ecw:payable:delete']"
@click="deleteClick(scope.row)"
>{{ $t("删除") }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -181,45 +234,97 @@ ...@@ -181,45 +234,97 @@
width="500px" width="500px"
append-to-body append-to-body
> >
<el-form ref="costForm" :model="costObj" label-width="80px"> <el-form ref="costForm" :model="costObj" label-width="120px">
<el-form-item :label="$t('操作步骤')"> <el-form-item :label="$t('操作步骤')">
<el-select v-model="costObj.stepsId" :placeholder="$t('请选择操作步骤')"> <el-select
<el-option v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)" :key="item.value" :label="item.label" :value="item.value"></el-option> v-model="costObj.stepsId"
:placeholder="$t('请选择操作步骤')"
>
<el-option
v-for="item in this.getDictDatas(DICT_TYPE.BOX_SHIPPING_PROCESS)"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('费用类型')"> <el-form-item :label="$t('费用类型')">
<el-select v-model="costObj.feeType" :placeholder="$t('请选择费用类型')"> <el-select
<el-option v-for="item in this.getDictDatas(DICT_TYPE.FEE_TYPE)" :key="item.value" :label="item.label" :value="item.value"></el-option> v-model="costObj.feeType"
:placeholder="$t('请选择费用类型')"
>
<el-option
v-for="item in this.getDictDatas(DICT_TYPE.FEE_TYPE)"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('供应商')"> <el-form-item :label="$t('供应商')">
<el-select v-model="costObj.supplierId" :placeholder="$t('请选择供应商')"> <el-select
<el-option v-for="supplier in allSupplier" :key="supplier.id" :label="supplier.companyZh" :value="supplier.id"></el-option> v-model="costObj.supplierId"
:placeholder="$t('请选择供应商')"
>
<el-option
v-for="supplier in allSupplier"
:key="supplier.id"
:label="supplier.companyZh"
:value="supplier.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--lanbm 2024-05-17 添加字段-->
<el-form-item :label="$t('费用产生时间')" prop="freecsdate">
<el-date-picker
v-model="costObj.freecsdate"
style="width: 200px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
type="datetime"
placeholder="费用产生时间"
/>
</el-form-item>
<el-row class="two-element"> <el-row class="two-element">
<el-form-item :label="$t('金额')"> <el-form-item :label="$t('金额')">
<el-input-number v-model="costObj.totalAmount" controls-position="right" :min="1"></el-input-number> <el-input-number
v-model="costObj.totalAmount"
controls-position="right"
:min="1"
></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="" label-width="0px"> <el-form-item label="" label-width="0px">
<el-select v-model="costObj.currencyId" :placeholder="$t('请选择单位')"> <el-select
<el-option v-for="item in currencyList" :key="item.id" :label="$i18n.locale=='zh_CN'?item.titleZh:item.titleEn" :value="item.id"></el-option> v-model="costObj.currencyId"
:placeholder="$t('请选择单位')"
>
<el-option
v-for="item in currencyList"
:key="item.id"
:label="$i18n.locale == 'zh_CN' ? item.titleZh : item.titleEn"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-form-item :label="$t('备注')"> <el-form-item :label="$t('备注')">
<el-input v-model="costObj.remark" type="textarea" rows="2" :placeholder="$t('请输入备注')"></el-input> <el-input
v-model="costObj.remark"
type="textarea"
rows="2"
:placeholder="$t('请输入备注')"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="operate-button"> <div slot="footer" class="operate-button">
<el-button type="primary" @click="submitEditForm">{{ $t('确定') }}</el-button> <el-button type="primary" @click="submitEditForm">{{
<el-button @click="cancelEditForm">{{ $t('取消') }}</el-button> $t("确定")
}}</el-button>
<el-button @click="cancelEditForm">{{ $t("取消") }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -229,10 +334,14 @@ ...@@ -229,10 +334,14 @@
import { userList } from "@/api/system/user"; import { userList } from "@/api/system/user";
import { DICT_TYPE } from "@/utils/dict"; import { DICT_TYPE } from "@/utils/dict";
import { getTradeCityList } from "@/api/ecw/region"; import { getTradeCityList } from "@/api/ecw/region";
import { getPayableList, deletePayable, updatePayable } from "@/api/ecw/financial" import {
getPayableList,
deletePayable,
updatePayable,
} from "@/api/ecw/financial";
import { getSupplierPage } from "@/api/ecw/supplier"; import { getSupplierPage } from "@/api/ecw/supplier";
import { getCurrencyPage } from "@/api/ecw/currency"; import { getCurrencyPage } from "@/api/ecw/currency";
import {getWarehouseList} from '@/api/ecw/warehouse' import { getWarehouseList } from "@/api/ecw/warehouse";
export default { export default {
name: "EcwFinancialPayable", name: "EcwFinancialPayable",
...@@ -256,10 +365,21 @@ export default { ...@@ -256,10 +365,21 @@ export default {
queryParams: { queryParams: {
page: 1, page: 1,
rows: 20, rows: 20,
dateRangeCreateTime: undefined,
}, },
allSupplier: [], allSupplier: [],
currencyList:[], currencyList: [],
warehouseList:[], warehouseList: [],
//lanbm 2024-05-17 add
dateTypes: [
{ value: "0", label: this.$t("费用产生时间") },
{ value: "1", label: this.$t("预装时间") },
{ value: "2", label: this.$t("装柜时间") },
{ value: "3", label: this.$t("起运时间") },
{ value: "4", label: this.$t("到港时间") },
{ value: "5", label: this.$t("清关时间") },
{ value: "6", label: this.$t("卸柜时间") },
],
}; };
}, },
computed: { computed: {
...@@ -269,24 +389,30 @@ export default { ...@@ -269,24 +389,30 @@ export default {
importCityList() { importCityList() {
return this.tradeCityList.filter((item) => item.type == 1); return this.tradeCityList.filter((item) => item.type == 1);
}, },
exportWarehouseList(){ exportWarehouseList() {
/* tradeType 1 进口,2出口,3进出口 */ /* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3) return this.warehouseList.filter(
(item) => item.tradeType == 2 || item.tradeType == 3
);
}, },
importWarehouseList(){ importWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3) return this.warehouseList.filter(
(item) => item.tradeType == 1 || item.tradeType == 3
);
}, },
}, },
activated(){ activated() {
this.handleQuery() this.handleQuery();
}, },
created() { created() {
let that = this; let that = this;
getWarehouseList().then(res => this.warehouseList = res.data) getWarehouseList().then((res) => (this.warehouseList = res.data));
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list) getCurrencyPage(this.params).then(
(res) => (this.currencyList = res.data.list)
);
userList("salesman").then((res) => (that.creatorData = res.data)); userList("salesman").then((res) => (that.creatorData = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data)); getTradeCityList().then((res) => (that.tradeCityList = res.data));
this.getList() this.getList();
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => { getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res; const { data } = res;
this.allSupplier = data.list; this.allSupplier = data.list;
...@@ -306,10 +432,13 @@ export default { ...@@ -306,10 +432,13 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
getCurrencyLabel(id){ getCurrencyLabel(id) {
var label = this.currencyList.filter(item=>item.id == id) var label = this.currencyList.filter((item) => item.id == id);
if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn if (label.length > 0)
return '' return this.$i18n.locale == "zh_CN"
? label[0].titleZh
: label[0].titleEn;
return "";
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
...@@ -329,67 +458,70 @@ export default { ...@@ -329,67 +458,70 @@ export default {
supplierId: this.costObj.supplierId, supplierId: this.costObj.supplierId,
totalAmount: this.costObj.totalAmount, totalAmount: this.costObj.totalAmount,
currencyId: this.costObj.currencyId, currencyId: this.costObj.currencyId,
remark: this.costObj.remark remark: this.costObj.remark,
} };
updatePayable(params).then(res => { updatePayable(params).then((res) => {
this.$modal.msgSuccess(this.$t('修改成功')); this.$modal.msgSuccess(this.$t("修改成功"));
this.getList(); this.getList();
this.open = false; this.open = false;
}) });
}, },
/** 取消按钮 */ /** 取消按钮 */
cancelEditForm() { cancelEditForm() {
this.open = false; this.open = false;
}, },
editClick(row) { editClick(row) {
row.stepsId = String(row.stepsId) row.stepsId = String(row.stepsId);
row.feeType = String(row.feeType) row.feeType = String(row.feeType);
row.currencyId = row.currencyId row.currencyId = row.currencyId;
console.log(row) console.log(row);
this.costObj = { ...row } this.costObj = { ...row };
this.open = true; this.open = true;
}, },
deleteClick(row) { deleteClick(row) {
const id = row.id; const id = row.id;
this.$modal.confirm(this.$t('是否确认删除该应付款')+'?').then(function() { this.$modal
return deletePayable(id); .confirm(this.$t("是否确认删除该应付款") + "?")
}).then(() => { .then(function () {
this.getList(); return deletePayable(id);
this.$modal.msgSuccess(this.$t('删除成功')); })
}).catch(() => {}); .then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("删除成功"));
})
.catch(() => {});
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.small-padding ::v-deep .el-button { .small-padding ::v-deep .el-button {
}
} // 页面内元素弹窗form控件宽度设置
// 页面内元素弹窗form控件宽度设置 ::v-deep .el-form-item__content {
::v-deep .el-form-item__content { > div:not(.el-input-number) {
> div:not(.el-input-number) { width: 100%;
width: 100%;
}
}
.operate-button {
text-align: center;
}
.two-element {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
}
}
.card {
margin-top: 20px;
}
.dialog-footer {
padding: 40px;
} }
.card-title { }
font-size: 18px; .operate-button {
font-weight: bold; text-align: center;
}
.two-element {
display: flex;
> :last-child {
width: 100%;
margin-left: 10px;
} }
}
.card {
margin-top: 20px;
}
.dialog-footer {
padding: 40px;
}
.card-title {
font-size: 18px;
font-weight: bold;
}
</style> </style>
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<div slot="header" class="card-title">{{ $t('付款单详情') }}{{id ? `-${form.paymentNo}` :''}}</div> <div slot="header" class="card-title">
{{ $t("付款单详情") }}{{ id ? `-${form.paymentNo}` : "" }}
</div>
<el-form <el-form
ref="form" ref="form"
:model="form" :model="form"
...@@ -86,18 +88,21 @@ ...@@ -86,18 +88,21 @@
/> />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('供应商银行账号')" style="width: 50%"> <el-descriptions-item
:label="$t('供应商银行账号')"
style="width: 50%"
>
<el-form-item <el-form-item
label="" label=""
label-width="0" label-width="0"
style="margin-bottom: 0" style="margin-bottom: 0"
prop="supplierBankAccount" prop="supplierBankAccount"
> >
<el-select v-model="form.supplierBankAccount" disabled> <el-select v-model="form.supplierBankAccount" disabled>
<el-option <el-option
v-for="item in bankData" v-for="item in bankData"
:key="item.id" :key="item.id"
:label="item.bankName + '(' + item.bankAccount+ ')'" :label="item.bankName + '(' + item.bankAccount + ')'"
:value="item.bankAccount" :value="item.bankAccount"
/> />
</el-select> </el-select>
...@@ -105,6 +110,23 @@ ...@@ -105,6 +110,23 @@
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :column="3" class="card" border> <el-descriptions :column="3" class="card" border>
<el-descriptions-item :label="$t('实际付款日期')">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="latestPayAt"
>
<el-date-picker
clearable
v-model="form.latestPayAt"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
type="date"
disabled
/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('最后付款日期')"> <el-descriptions-item :label="$t('最后付款日期')">
<el-form-item <el-form-item
label="" label=""
...@@ -135,13 +157,69 @@ ...@@ -135,13 +157,69 @@
/> />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('付款备注')">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="settlementType"
>
<el-input
v-model="form.reason"
type="text"
rows="2"
disabled
></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('付款人')">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="settlementType"
>
<el-input
v-model="form.fkren"
type="text"
rows="2"
disabled
></el-input>
</el-form-item>
</el-descriptions-item>
<!--lanbm 2024-05-17 添加字段-->
<el-descriptions-item :label="$t('核销时间')">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="settlementType"
>
<el-input
v-model="form.hexiaodate"
type="text"
rows="2"
disabled
></el-input>
</el-form-item>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-form> </el-form>
</el-card> </el-card>
<el-card class="card"> <el-card class="card">
<div slot="header" class="card-title">{{ $t('费用信息') }}</div> <div slot="header" class="card-title">{{ $t("费用信息") }}</div>
<el-table v-loading="loadings" :data="list" border :show-summary="!!list.length" :summary-method="getSummaries"> <el-table
<el-table-column :label="$t('自编号')" align="center" prop="payableNo" /> v-loading="loadings"
:data="list"
border
:show-summary="!!list.length"
:summary-method="getSummaries"
>
<el-table-column
:label="$t('自编号')"
align="center"
prop="payableNo"
/>
<el-table-column :label="$t('费用类型')" align="center" prop="feeType"> <el-table-column :label="$t('费用类型')" align="center" prop="feeType">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
...@@ -150,20 +228,40 @@ ...@@ -150,20 +228,40 @@
></dict-tag> ></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('发票号码')" align="center" prop="invoiceNumber" /> <el-table-column
<el-table-column :label="$t('应付金额')" align="center" prop="totalAmount" /> :label="$t('发票号码')"
align="center"
prop="invoiceNumber"
/>
<el-table-column
:label="$t('应付金额')"
align="center"
prop="totalAmount"
/>
<el-table-column :label="$t('币种')" align="center" prop="currencyId"> <el-table-column :label="$t('币种')" align="center" prop="currencyId">
<template slot-scope="scope"> <template slot-scope="scope">
{{getCurrencyLabel(scope.row.currencyId)}} {{ getCurrencyLabel(scope.row.currencyId) }}
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> --> <!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('汇率')" align="center" prop="exchangeRate" /> <el-table-column
<el-table-column :label="$t('税率')+'%'" align="center" prop="taxRate" /> :label="$t('汇率')"
<el-table-column :label="$t('价税合计')+'(RMB)'" align="center" prop="total" > align="center"
prop="exchangeRate"
/>
<el-table-column
:label="$t('税率') + '%'"
align="center"
prop="taxRate"
/>
<el-table-column
:label="$t('价税合计') + '(RMB)'"
align="center"
prop="total"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span>{{ scope.row.total = ((scope.row.totalAmount * scope.row.exchangeRate) + (scope.row.totalAmount * scope.row.exchangeRate) * (scope.row.taxRate/100)).toFixed(6) }}</span> --> <!-- <span>{{ scope.row.total = ((scope.row.totalAmount * scope.row.exchangeRate) + (scope.row.totalAmount * scope.row.exchangeRate) * (scope.row.taxRate/100)).toFixed(6) }}</span> -->
<span>{{scope.row.total}}</span> <span>{{ scope.row.total }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -185,9 +283,7 @@ ...@@ -185,9 +283,7 @@
:error="$t('账单号不能为空')" :error="$t('账单号不能为空')"
prop="accountNumber" prop="accountNumber"
> >
<el-input <el-input v-model="form.accountNumber" disabled></el-input>
v-model="form.accountNumber" disabled
></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('发票')"> <el-descriptions-item :label="$t('发票')">
...@@ -197,10 +293,7 @@ ...@@ -197,10 +293,7 @@
style="margin-bottom: 0" style="margin-bottom: 0"
prop="invoiceStatus" prop="invoiceStatus"
> >
<el-select <el-select v-model="form.invoiceStatus" disabled>
v-model="form.invoiceStatus"
disabled
>
<el-option :label="$t('未开票')" value="0" /> <el-option :label="$t('未开票')" value="0" />
<el-option :label="$t('已开票')" value="1" /> <el-option :label="$t('已开票')" value="1" />
</el-select> </el-select>
...@@ -211,7 +304,11 @@ ...@@ -211,7 +304,11 @@
</el-card> </el-card>
<div slot="footer" style="margin: 20px 0"> <div slot="footer" style="margin: 20px 0">
<!-- <el-button type="primary" @click="submitDraft">{{ $t('保 存') }}</el-button> --> <!-- <el-button type="primary" @click="submitDraft">{{ $t('保 存') }}</el-button> -->
<el-button type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{ $t('返回') }}</el-button> <el-button
type="primary"
@click="$store.dispatch('tagsView/delCurrentView')"
>{{ $t("返回") }}</el-button
>
</div> </div>
</div> </div>
</template> </template>
...@@ -224,14 +321,21 @@ import { getChannelList } from "@/api/ecw/channel"; ...@@ -224,14 +321,21 @@ import { getChannelList } from "@/api/ecw/channel";
import CustomerSelector from "@/components/CustomerSelector"; import CustomerSelector from "@/components/CustomerSelector";
import { listSimpleDepts } from "@/api/system/dept"; import { listSimpleDepts } from "@/api/system/dept";
import { getTradeCityList } from "@/api/ecw/region"; import { getTradeCityList } from "@/api/ecw/region";
import { getSupplierPage,getSupplier } from "@/api/ecw/supplier"; import { getSupplierPage, getSupplier } from "@/api/ecw/supplier";
import { getPayableList, getPayableInfoByIds, createPayment, getPaymentInfoByIds, getPaymentItem, updatePayment } from "@/api/ecw/financial" import {
getPayableList,
getPayableInfoByIds,
createPayment,
getPaymentInfoByIds,
getPaymentItem,
updatePayment,
} from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency"; import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision' import NP from "number-precision";
export default { export default {
name: "CreatPayment", name: "CreatPayment",
components: { components: {
CustomerSelector CustomerSelector,
}, },
data() { data() {
return { return {
...@@ -265,60 +369,48 @@ export default { ...@@ -265,60 +369,48 @@ export default {
}; };
}, },
async created() { async created() {
await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list) await getCurrencyPage(this.params).then(
(res) => (this.currencyList = res.data.list)
);
let that = this; let that = this;
if (that.$route.query.payableId && that.$route.query.payableId !== '0') { if (that.$route.query.payableId && that.$route.query.payableId !== "0") {
this.payableId = this.$route.query.payableId; this.payableId = this.$route.query.payableId;
getPayableInfoByIds({ id: this.payableId }).then(res => { getPayableInfoByIds({ id: this.payableId }).then((res) => {
this.list = [{...res.data}] this.list = [{ ...res.data }];
this.$set(this.form, 'supplierId', res.data.supplierId) this.$set(this.form, "supplierId", res.data.supplierId);
}) });
} }
if (that.$route.query.id && that.$route.query.id !== '0') { if (that.$route.query.id && that.$route.query.id !== "0") {
this.id = this.$route.query.id; this.id = this.$route.query.id;
getPaymentInfoByIds({ id: this.id }).then(res => { getPaymentInfoByIds({ id: this.id }).then((res) => {
this.form = { this.form = {
...res.data, ...res.data,
latestPayAt: this.parseTime(res.data.latestPayAt, '{y}-{m}-{d}'), latestPayAt: this.parseTime(res.data.latestPayAt, "{y}-{m}-{d}"),
applicationAt: this.parseTime(res.data.applicationAt, '{y}-{m}-{d}'), applicationAt: this.parseTime(res.data.applicationAt, "{y}-{m}-{d}"),
invoiceStatus: String(res.data.invoiceStatus), invoiceStatus: String(res.data.invoiceStatus),
} };
this.$set(this.form,'supplierBankAccount',res.data.supplierBankAccount) this.$set(
console.log(this.form) this.form,
}) "supplierBankAccount",
getPaymentItem({ id: this.id }).then(res => { res.data.supplierBankAccount
this.list = [...res.data] );
this.defaultList = [...res.data] console.log(this.form);
}) });
getPaymentItem({ id: this.id }).then((res) => {
this.list = [...res.data];
this.defaultList = [...res.data];
});
} }
listSimpleUsers().then((res) => (that.creatorData = res.data)); listSimpleUsers().then((res) => (that.creatorData = res.data));
getChannelList().then((res) => (that.channelList = res.data)); getChannelList().then((res) => (that.channelList = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data)); getTradeCityList().then((res) => (that.tradeCityList = res.data));
// getBankAccountPage(that.params).then(
// (res) => (that.bankData = res.data.list)
// );
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => { getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res; const { data } = res;
this.allSupplier = data.list; this.allSupplier = data.list;
this.selectChange(this.form.supplierId) this.selectChange(this.form.supplierId);
}); });
listSimpleDepts().then((res) => { listSimpleDepts().then((res) => {
that.deptData = res.data that.deptData = res.data;
// res.data.forEach((item) => {
// if (item.parentId == 0) {
// that.deptArr.push(item);
// } else {
// that.deptData.push(item);
// }
// });
// that.deptData.forEach((value) => {
// var dept = that.deptArr.filter((itt) => itt.id == value.parentId);
// if (dept.length > 0) {
// value.name = dept[0].name + " | " + value.name;
// }
// });
}); });
}, },
computed: { computed: {
...@@ -330,11 +422,14 @@ export default { ...@@ -330,11 +422,14 @@ export default {
}, },
}, },
methods: { methods: {
getCurrencyLabel(id){ getCurrencyLabel(id) {
var label = this.currencyList.filter(item=>item.id == id) var label = this.currencyList.filter((item) => item.id == id);
if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn if (label.length > 0)
return '' return this.$i18n.locale == "zh_CN"
}, ? label[0].titleZh
: label[0].titleEn;
return "";
},
getList() { getList() {
this.loading = true; this.loading = true;
// 处理查询参数 // 处理查询参数
...@@ -346,22 +441,24 @@ export default { ...@@ -346,22 +441,24 @@ export default {
this.total = response.data.total; this.total = response.data.total;
this.loading = false; this.loading = false;
this.$nextTick(() => { this.$nextTick(() => {
this.list.forEach(itm => { this.list.forEach((itm) => {
const t = this.orderData.find(v => v.id == itm.id) const t = this.orderData.find((v) => v.id == itm.id);
t && this.$refs.multipleTable.toggleRowSelection(t, true) t && this.$refs.multipleTable.toggleRowSelection(t, true);
}) });
}) });
}); });
}, },
getSummaries(param) { getSummaries(param) {
const { columns, data } = param; const { columns, data } = param;
const sums = new Array(columns.length).map(v => ''); const sums = new Array(columns.length).map((v) => "");
const index = sums.length - 1 const index = sums.length - 1;
sums[index - 1] = this.$t('价税合计大写') sums[index - 1] = this.$t("价税合计大写");
const t = data.map(v => v.total).reduce((prev, curr) => { const t = data
return parseFloat(prev) + parseFloat(curr); .map((v) => v.total)
}, 0) .reduce((prev, curr) => {
sums[index] = this.convertCurrency(t) return parseFloat(prev) + parseFloat(curr);
}, 0);
sums[index] = this.convertCurrency(t);
return sums; return sums;
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
...@@ -369,126 +466,148 @@ export default { ...@@ -369,126 +466,148 @@ export default {
this.open = true; this.open = true;
}, },
submitForm() { submitForm() {
this.$refs.form.validate ((valid)=>{ this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.$refs.forms.validate((val) => { this.$refs.forms.validate((val) => {
if (val) { if (val) {
const params = {...this.form} const params = { ...this.form };
if (this.list && this.list.length > 0) { if (this.list && this.list.length > 0) {
params.payableReqVOList = [...this.list] params.payableReqVOList = [...this.list];
}else{ } else {
this.$modal.msgError(this.$t('请选择供应商未付款项')); this.$modal.msgError(this.$t("请选择供应商未付款项"));
return return;
} }
if(!params.supplierBankAccount){ if (!params.supplierBankAccount) {
this.$modal.msgError(this.$t('请选择供应商银行账号')); this.$modal.msgError(this.$t("请选择供应商银行账号"));
return return;
} }
if (this.id && this.id !== '0') { if (this.id && this.id !== "0") {
updatePayment(params).then(res => { updatePayment(params).then((res) => {
this.$modal.msgSuccess(this.$t('修改成功')); this.$modal.msgSuccess(this.$t("修改成功"));
this.$router.back(); this.$router.back();
}) });
} else { } else {
createPayment(params).then(res => { createPayment(params).then((res) => {
this.$modal.msgSuccess(this.$t('新增成功')); this.$modal.msgSuccess(this.$t("新增成功"));
this.$router.back(); this.$router.back();
}) });
} }
} }
}) });
} }
}) });
}, },
submitDraft() { submitDraft() {
this.$refs.form.validate ((valid)=>{ this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
const params = {...this.form} const params = { ...this.form };
if (this.list && this.list.length > 0) { if (this.list && this.list.length > 0) {
params.payableReqVOList = [...this.list] params.payableReqVOList = [...this.list];
}else{ } else {
this.$modal.msgError(this.$t('请选择供应商未付款项')); this.$modal.msgError(this.$t("请选择供应商未付款项"));
return return;
} }
if(!params.supplierBankAccount){ if (!params.supplierBankAccount) {
this.$modal.msgError(this.$t('请选择供应商银行账号')); this.$modal.msgError(this.$t("请选择供应商银行账号"));
return return;
} }
if (this.id && this.id !== '0') { if (this.id && this.id !== "0") {
updatePayment(params).then(res => { updatePayment(params).then((res) => {
this.$modal.msgSuccess(this.$t('修改成功')); this.$modal.msgSuccess(this.$t("修改成功"));
this.$router.back(); this.$router.back();
}) });
} else { } else {
createPayment(params).then(res => { createPayment(params).then((res) => {
this.$modal.msgSuccess(this.$t('新增成功')); this.$modal.msgSuccess(this.$t("新增成功"));
this.$router.back(); this.$router.back();
}) });
} }
// console.log(params, '-----params---------') // console.log(params, '-----params---------')
} }
}) });
}, },
selectChangeBank(val){ selectChangeBank(val) {
this.$forceUpdate() this.$forceUpdate();
}, },
selectChange(val) { selectChange(val) {
this.bankData = [] this.bankData = [];
// this.form.supplierBankAccount='' // this.form.supplierBankAccount=''
if(val){ if (val) {
getSupplier(val).then((res)=>{ getSupplier(val).then((res) => {
this.bankData = res.data.bankList this.bankData = res.data.bankList;
var bank = this.bankData.find(item=>item.bankAccount==this.form.supplierBankAccount) var bank = this.bankData.find(
if(this.bankData.length==0||!bank) this.form.supplierBankAccount='' (item) => item.bankAccount == this.form.supplierBankAccount
}) );
if (this.bankData.length == 0 || !bank)
this.form.supplierBankAccount = "";
});
} }
const t = this.allSupplier.find(v => v.id == val) const t = this.allSupplier.find((v) => v.id == val);
t && (this.form.supplierName = t.companyZh) t && (this.form.supplierName = t.companyZh);
// t && (this.bankData = t.bankList) // t && (this.bankData = t.bankList)
}, },
handleQuery() { handleQuery() {
this.queryParams.page = 1; this.queryParams.page = 1;
this.getList() this.getList();
}, },
UStoRMB() { UStoRMB() {
return NP.divide(this.currencyList.find(v => v.titleEn === 'USD').huilv, 100).toFixed(6) return NP.divide(
this.currencyList.find((v) => v.titleEn === "USD").huilv,
100
).toFixed(6);
}, },
NANtoRMB() { NANtoRMB() {
return NP.divide(this.currencyList.find(v => v.titleEn === 'NGN').huilv, 100).toFixed(6) return NP.divide(
this.currencyList.find((v) => v.titleEn === "NGN").huilv,
100
).toFixed(6);
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val.map(v => { this.multipleSelection = val.map((v) => {
if(v.currencyId === 1) return Object.assign(v, { exchangeRate: this.UStoRMB() }) if (v.currencyId === 1)
if(v.currencyId === 2) return Object.assign(v, { exchangeRate: 1 }) return Object.assign(v, { exchangeRate: this.UStoRMB() });
if(v.currencyId === 3) return Object.assign(v, { exchangeRate: this.NANtoRMB() }) if (v.currencyId === 2) return Object.assign(v, { exchangeRate: 1 });
if (v.currencyId === 3)
return Object.assign(v, { exchangeRate: this.NANtoRMB() });
}); });
}, },
hiddenDialog() { hiddenDialog() {
this.open = false; this.open = false;
}, },
saveSelectList() { saveSelectList() {
if (this.id && this.id !== '0') { if (this.id && this.id !== "0") {
this.list = [...this.defaultList, ...this.multipleSelection] this.list = [...this.defaultList, ...this.multipleSelection];
} else { } else {
this.list = this.multipleSelection this.list = this.multipleSelection;
} }
this.open = false; this.open = false;
}, },
convertCurrency(money) { convertCurrency(money) {
//汉字的数字 //汉字的数字
var cnNums = new Array('', this.$t(''), this.$t(''), this.$t(''), this.$t(''), this.$t(''), this.$t(''), this.$t(''), this.$t(''), ''); var cnNums = new Array(
"",
this.$t(""),
this.$t(""),
this.$t(""),
this.$t(""),
this.$t(""),
this.$t(""),
this.$t(""),
this.$t(""),
""
);
//基本单位 //基本单位
var cnIntRadice = new Array('', this.$t(''), this.$t(''), ''); var cnIntRadice = new Array("", this.$t(""), this.$t(""), "");
//对应整数部分扩展单位 //对应整数部分扩展单位
var cnIntUnits = new Array('', this.$t(''), this.$t('亿'), ''); var cnIntUnits = new Array("", this.$t(""), this.$t("亿"), "");
//对应小数部分单位 //对应小数部分单位
var cnDecUnits = new Array('', this.$t(''), this.$t(''), ''); var cnDecUnits = new Array("", this.$t(""), this.$t(""), "");
//整数金额时后面跟的字符 //整数金额时后面跟的字符
var cnInteger = this.$t(''); var cnInteger = this.$t("");
//整型完以后的单位 //整型完以后的单位
var cnIntLast = this.$t(''); var cnIntLast = this.$t("");
//最大处理的数字 //最大处理的数字
var maxNum = 999999999999999.9999; var maxNum = 999999999999999.9999;
//金额整数部分 //金额整数部分
...@@ -496,52 +615,52 @@ export default { ...@@ -496,52 +615,52 @@ export default {
//金额小数部分 //金额小数部分
var decimalNum; var decimalNum;
//输出的中文金额字符串 //输出的中文金额字符串
var chineseStr = ''; var chineseStr = "";
//分离金额后用的数组,预定义 //分离金额后用的数组,预定义
var parts; var parts;
// 传入的参数为空情况 // 传入的参数为空情况
if(money === '') { if (money === "") {
return ''; return "";
} }
money = parseFloat(money) money = parseFloat(money);
if(money >= maxNum){ if (money >= maxNum) {
return '' return "";
} }
// 传入的参数为0情况 // 传入的参数为0情况
if (money === 0) { if (money === 0) {
chineseStr = cnNums[0] + cnIntLast + cnInteger; chineseStr = cnNums[0] + cnIntLast + cnInteger;
return chineseStr return chineseStr;
} }
// 转为字符串 // 转为字符串
money = money.toString(); money = money.toString();
// indexOf 检测某字符在字符串中首次出现的位置 返回索引值(从0 开始) -1 代表无 // indexOf 检测某字符在字符串中首次出现的位置 返回索引值(从0 开始) -1 代表无
if (money.indexOf('.') == -1) { if (money.indexOf(".") == -1) {
integerNum = money; integerNum = money;
decimalNum = '' decimalNum = "";
}else{ } else {
parts = money.split('.'); parts = money.split(".");
integerNum = parts[0]; integerNum = parts[0];
decimalNum = parts[1].substr(0,4); decimalNum = parts[1].substr(0, 4);
} }
//转换整数部分 //转换整数部分
if(parseInt(integerNum,10) > 0){ if (parseInt(integerNum, 10) > 0) {
let zeroCount = 0; let zeroCount = 0;
let IntLen = integerNum.length let IntLen = integerNum.length;
for(let i = 0; i < IntLen; i++){ for (let i = 0; i < IntLen; i++) {
let n = integerNum.substr(i,1); let n = integerNum.substr(i, 1);
let p = IntLen - i - 1; let p = IntLen - i - 1;
let q = p / 4; let q = p / 4;
let m = p % 4; let m = p % 4;
if( n == '0'){ if (n == "0") {
zeroCount ++ ; zeroCount++;
}else{ } else {
if(zeroCount > 0){ if (zeroCount > 0) {
chineseStr += cnNums[0] chineseStr += cnNums[0];
} }
zeroCount = 0; zeroCount = 0;
chineseStr += cnNums[parseInt(n)] + cnIntRadice[m]; chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
} }
if(m == 0 && zeroCount < 4){ if (m == 0 && zeroCount < 4) {
chineseStr += cnIntUnits[q]; chineseStr += cnIntUnits[q];
} }
} }
...@@ -549,53 +668,53 @@ export default { ...@@ -549,53 +668,53 @@ export default {
chineseStr += cnIntLast; chineseStr += cnIntLast;
} }
// 转换小数部分 // 转换小数部分
if(decimalNum != ''){ if (decimalNum != "") {
let decLen = decimalNum.length; let decLen = decimalNum.length;
for(let i = 0; i <decLen; i++){ for (let i = 0; i < decLen; i++) {
let n = decimalNum.substr(i,1); let n = decimalNum.substr(i, 1);
if(n != '0'){ if (n != "0") {
chineseStr += cnNums[Number(n)] + cnDecUnits[i] chineseStr += cnNums[Number(n)] + cnDecUnits[i];
} }
} }
} }
if(chineseStr == ''){ if (chineseStr == "") {
chineseStr += cnNums[0] + cnIntLast + cnInteger; chineseStr += cnNums[0] + cnIntLast + cnInteger;
}else if(decimalNum == ''){ } else if (decimalNum == "") {
chineseStr += cnInteger; chineseStr += cnInteger;
} }
return chineseStr return chineseStr;
}, },
openDialog() { openDialog() {
this.getList() this.getList();
}, },
oninput(num) { oninput(num) {
let str = num let str = num;
let len1 = str.substr(0, 1) let len1 = str.substr(0, 1);
let len2 = str.substr(1, 1) let len2 = str.substr(1, 1);
//如果第一位是0,第二位不是点,就用数字把点替换掉 //如果第一位是0,第二位不是点,就用数字把点替换掉
if (str.length > 1 && len1 == 0 && len2 != '.') { if (str.length > 1 && len1 == 0 && len2 != ".") {
str = str.substr(1, 1) str = str.substr(1, 1);
} }
//第一位不能是. //第一位不能是.
if (len1 == '.') { if (len1 == ".") {
str = '' str = "";
} }
//限制只能输入一个小数点 //限制只能输入一个小数点
if (str.indexOf('.') != -1) { if (str.indexOf(".") != -1) {
let str_ = str.substr(str.indexOf('.') + 1) let str_ = str.substr(str.indexOf(".") + 1);
if (str_.indexOf('.') != -1) { if (str_.indexOf(".") != -1) {
str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1) str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1);
} else { } else {
// if (str_.length > 2) { // if (str_.length > 2) {
// str = str.substr(0, str.indexOf('.') + 1) + str_.substr(0, 2) // str = str.substr(0, str.indexOf('.') + 1) + str_.substr(0, 2)
// } // }
} }
} }
//正则替换 //正则替换
str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点 str = str.replace(/[^\d^\.]+/g, ""); // 保留数字和小数点
// str = str.replace(/\.\d\d\d$/,'') // 小数点后只能输两位 // str = str.replace(/\.\d\d\d$/,'') // 小数点后只能输两位
return str return str;
} },
}, },
}; };
</script> </script>
......
...@@ -7,112 +7,89 @@ ...@@ -7,112 +7,89 @@
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
size="small" size="small"
label-width="150px" :inline="true"
label-width="100px"
class="card" class="card"
> >
<el-row :gutter="10"> <el-form-item :label="$t('付款单号')">
<el-col :span="4"> <el-input
<el-form-item :label="$t('付款单号')"> style="max-width: 188px"
<el-input v-model="queryParams.paymentNo"
clearable :placeholder="$t('请输入付款单号')"
style="max-width: 188px;" clearable
v-model="queryParams.paymentNo" @keyup.enter.native="handleQuery"
:placeholder="$t('请输入付款单号')" ></el-input>
clearable </el-form-item>
@keyup.enter.native="handleQuery" <el-form-item :label="$t('供应商')">
/> </el-form-item <el-select
></el-col> clearable
<el-col :span="4" v-model="queryParams.supplierId"
><el-form-item :label="$t('供应商')"> :placeholder="$t('请选择供应商')"
<el-select
clearable
v-model="queryParams.supplierId"
:placeholder="$t('请选择供应商')"
>
<el-option
v-for="supplier in allSupplier"
:key="supplier.id"
:label="supplier.companyZh"
:value="supplier.id"
></el-option>
</el-select> </el-form-item
></el-col>
<el-col :span="4"
><el-form-item :label="$t('业务员')">
<!-- <el-select v-model="form.salesmanId" :placeholder="$t('请选择业务员')">
<el-option
v-for="item in creatorData"
:key="item.id"
:label="item.nickname"
:value="item.id"
/>
</el-select> -->
<el-select
v-model="queryParams.salesmanName"
filterable
:placeholder="$t('请选择业务员')"
clearable
>
<el-option
v-for="item in creatorData"
:key="item.id"
:label="item.nickname"
:value="item.nickname"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6"
><el-form-item :label="$t('创建时间')">
<el-date-picker
v-model="queryParams.beginCreateTime"
type="datetimerange"
value-format="yyyy-MM-dd"
range-separator="到"
:start-placeholder="$t('请选择日期')"
:end-placeholder="$t('请选择日期')"
>
</el-date-picker> </el-form-item
></el-col>
</el-row>
<el-row :gutter="10">
<el-col :span="4">
<el-form-item :label="$t('状态')">
<dict-selector
clearable
:type="DICT_TYPE.ECW_PAYMENT_STATE"
v-model="queryParams.state"
/>
</el-form-item>
</el-col>
<el-col :span="4"
><el-form-item :label="$t('发票状态')">
<el-select
clearable
v-model="queryParams.invoiceStatus"
:placeholder="$t('请选择是否开票')"
>
<el-option :label="$t('未开票')" value="0" />
<el-option :label="$t('已开票')" value="1" />
</el-select> </el-form-item
></el-col>
<el-col :span="6"
><el-form-item>
<el-button type="primary" @click="handleQuery">{{
$t("查找")
}}</el-button>
<!--lanbm 2024-05-06 改 “新增请款单” 为 “新增付款单” -->
<el-button
style="margin-left: 10px"
type="success"
v-hasPermi="['ecw:paymentVoucher:create']"
@click="handleAdd(0)"
>{{ $t("新增付款单") }}</el-button
>
</el-form-item></el-col
> >
</el-row> <el-option
v-for="supplier in allSupplier"
:key="supplier.id"
:label="supplier.companyZh"
:value="supplier.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('业务员')">
<el-select
v-model="queryParams.salesmanName"
filterable
:placeholder="$t('请选择业务员')"
clearable
>
<el-option
v-for="item in creatorData"
:key="item.id"
:label="item.nickname"
:value="item.nickname"
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker
v-model="queryParams.beginCreateTime"
type="datetimerange"
value-format="yyyy-MM-dd"
range-separator="到"
:start-placeholder="$t('请选择日期')"
:end-placeholder="$t('请选择日期')"
>
</el-date-picker>
</el-form-item>
<el-form-item :label="$t('状态')">
<dict-selector
clearable
:type="DICT_TYPE.ECW_PAYMENT_STATE"
v-model="queryParams.state"
></dict-selector>
</el-form-item>
<el-form-item :label="$t('发票状态')">
<el-select
clearable
v-model="queryParams.invoiceStatus"
:placeholder="$t('请选择是否开票')"
>
<el-option :label="$t('未开票')" value="0" />
<el-option :label="$t('已开票')" value="1" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleQuery">{{
$t("查找")
}}</el-button>
<!--lanbm 2024-05-06 改 “新增请款单” 为 “新增付款单” -->
<el-button
style="margin-left: 10px"
type="success"
v-hasPermi="['ecw:paymentVoucher:create']"
@click="handleAdd(0)"
>{{ $t("新增付款单") }}
</el-button>
</el-form-item>
</el-form> </el-form>
</el-card> </el-card>
<el-table v-loading="loadings" :data="list" border class="card"> <el-table v-loading="loadings" :data="list" border class="card">
...@@ -143,6 +120,15 @@ ...@@ -143,6 +120,15 @@
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span> <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
:label="$t('实际付款日期')"
align="center"
prop="sjfkdate"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.sjfkdate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column <el-table-column
:label="$t('最后付款时间')" :label="$t('最后付款时间')"
align="center" align="center"
...@@ -261,8 +247,6 @@ ...@@ -261,8 +247,6 @@
> >
{{ $t("取消反核销") }}</el-button {{ $t("取消反核销") }}</el-button
> >
<!-- <el-button v-if="scope.row.state == 3" size="mini" type="text">{{ $t('开票') }}</el-button> -->
<el-button <el-button
v-if="[6, 4].includes(row.state)" v-if="[6, 4].includes(row.state)"
size="mini" size="mini"
...@@ -279,7 +263,6 @@ ...@@ -279,7 +263,6 @@
@click="deleteClick(row)" @click="deleteClick(row)"
>{{ $t("删除") }} >{{ $t("删除") }}
</el-button> </el-button>
<!-- <el-button size="mini" type="text" @click="open = true">{{ $t('导出订单') }}</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -328,13 +311,23 @@ ...@@ -328,13 +311,23 @@
:visible.sync="examineShow" :visible.sync="examineShow"
> >
<div class="cancel_content"> <div class="cancel_content">
<span>{{ $t("申请理由") }}</span> <!--lanbm 2024-05-17 修改-->
<span>{{ $t("付款备注") }}</span>
<el-input <el-input
type="textarea" type="textarea"
:rows="6" :rows="6"
v-model="cancelReason" v-model="cancelReason"
:placeholder="$t('请输入取消理由')" :placeholder="$t('请输入付款备注')"
></el-input> ></el-input>
<span>{{ $t("实际付款日期") }}</span>
<el-date-picker
v-model="sjfkdate"
style="width: 200px"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
type="datetime"
placeholder="实际付款日期"
/>
</div> </div>
<span slot="footer" class="dialog-footers"> <span slot="footer" class="dialog-footers">
<el-button type="primary" @click="cancelWriteOffClick()">{{ <el-button type="primary" @click="cancelWriteOffClick()">{{
...@@ -343,6 +336,31 @@ ...@@ -343,6 +336,31 @@
<el-button @click="examineShow = false">{{ $t("取消") }}</el-button> <el-button @click="examineShow = false">{{ $t("取消") }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog
width="30%"
@close="cancelReason = ''"
:title="examineTitle"
:visible.sync="fhxShow"
>
<div class="cancel_content">
<span>{{ $t("申请理由") }}</span>
<el-input
type="textarea"
:rows="6"
v-model="cancelReason"
:placeholder="$t('申请理由')"
></el-input>
</div>
<span slot="footer" class="dialog-footers">
<el-button type="primary" @click="cancelWriteOffClick2()">{{
$t("提交")
}}</el-button>
<el-button @click="cancelWriteOffClick2_Close">{{
$t("取消")
}}</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
...@@ -372,10 +390,14 @@ export default { ...@@ -372,10 +390,14 @@ export default {
data() { data() {
return { return {
examineShow: false, examineShow: false,
fhxShow: false,
textTip:undefined,
examineTitle: "", examineTitle: "",
examineIndex: 0, examineIndex: 0,
examineData: {}, examineData: {},
cancelReason: "", cancelReason: "",
//实际付款日期 lanbm 2024-05-17 add
sjfkdate: undefined,
open: false, open: false,
showSearch: true, showSearch: true,
loadings: false, loadings: false,
...@@ -386,11 +408,6 @@ export default { ...@@ -386,11 +408,6 @@ export default {
total: 0, total: 0,
dateType: [], dateType: [],
loading: "", loading: "",
// params: {
// page: 1,
// rows: 20,
// },
// 查询参数
queryParams: { queryParams: {
page: 1, page: 1,
rows: 20, rows: 20,
...@@ -417,7 +434,6 @@ export default { ...@@ -417,7 +434,6 @@ export default {
created() { created() {
let that = this; let that = this;
listSimpleUsers().then((res) => (that.creatorData = res.data)); listSimpleUsers().then((res) => (that.creatorData = res.data));
// userList("salesman").then((res) => (that.creatorData = res.data));
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => { getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res; const { data } = res;
this.allSupplier = data.list; this.allSupplier = data.list;
...@@ -535,8 +551,93 @@ export default { ...@@ -535,8 +551,93 @@ export default {
bridgeFn(index, title, row) { bridgeFn(index, title, row) {
this.examineIndex = index; this.examineIndex = index;
this.examineTitle = title; this.examineTitle = title;
this.textTip=title;//lanbm2024-05-16 add
this.examineData = row; this.examineData = row;
this.examineShow = true; if (index == 5) {
//核销
this.examineShow = true;
} else {
//lanbm 2024-05-17 add
this.fhxShow = true;
}
},
//lanbm 2024-05-17 add
cancelWriteOffClick2_Close() {
this.fhxShow = false;
},
cancelWriteOffClick2() {
//反核销对话框
if (!this.cancelReason) {
return this.$message.warning(this.$t("请输入申请理由!"));
}
let resolve = (val = this.$t("操作成功吗!")) => {
this.getList();
this.$message.success(val);
this.fhxShow = false;
};
let reject = () => {
this.fhxShow = false;
};
let { id: paymentId, paymentNo } = this.examineData;
let p = {
paymentId,
remark: this.cancelReason,
paymentNo,
reason: this.cancelReason,
//时间付款时间 lanbm 2024-05-17 add
sjfkdate: this.sjfkdate,
};
switch (this.examineIndex) {
case 1:
// 取消审核
cancelFinancePaymentApproval(p).then(
() => resolve(this.$t("取消付款单审核成功!")),
reject
);
break;
// 取消付款单反审核
case 2:
cancelFinancePaymentApprovalNo(p).then(
() => resolve(this.$t("取消付款单反审核成功!")),
reject
);
break;
case 3:
//取消付款单核销
cancelFinancePaymentWriteOffNo(p).then(
() => resolve(this.$t("取消付款单核销成功!")),
reject
);
break;
case 4:
// 反审核
paymentVerifyCancel(p).then(
() => resolve(this.$t("提交付款单反审核成功,请耐心等待审核结果!")),
reject
);
break;
case 5:
// 核销
paymentVerification(p).then(
() => resolve(this.$t("提交付款单核销成功,请耐心等待审核结果!")),
reject
);
break;
case 6:
// 反核销
paymentVerificationCancel(p).then(
() => resolve(this.$t("提交付款单反核销成功,请耐心等待审核结果!")),
reject
);
break;
case 7:
// 取消反核销
paymentCancelFinancePaymentWriteOffNo(p).then(
() => resolve(this.$t("取消付款单反核销成功!")),
reject
);
break;
}
}, },
cancelWriteOffClick() { cancelWriteOffClick() {
if (!this.cancelReason) { if (!this.cancelReason) {
...@@ -556,6 +657,8 @@ export default { ...@@ -556,6 +657,8 @@ export default {
remark: this.cancelReason, remark: this.cancelReason,
paymentNo, paymentNo,
reason: this.cancelReason, reason: this.cancelReason,
//时间付款时间 lanbm 2024-05-17 add
sjfkdate: this.sjfkdate,
}; };
switch (this.examineIndex) { switch (this.examineIndex) {
case 1: case 1:
......
<template> <template>
<div class="app-container"> <div class="app-container">
<div slot="header" class="card-title">{{ $t('收款单') }}</div> <div slot="header" class="card-title">{{ $t("收款单") }}</div>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-card v-show="showSearch" class="card"> <el-card v-show="showSearch" class="card">
<el-form <el-form
...@@ -74,48 +74,87 @@ ...@@ -74,48 +74,87 @@
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="handleQuery">{{ $t('查找') }}</el-button> <el-button type="primary" @click="handleQuery">{{
$t("查找")
}}</el-button>
<el-button type="primary" @click="handleQuery2">{{
$t("批量反审核")
}}</el-button>
<el-button type="primary" @click="handleQuery3">{{
$t("批量反核销")
}}</el-button>
<el-button type="primary" @click="handleQuery3">{{
$t("批量核销")
}}</el-button>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
</el-card> </el-card>
<el-table v-loading="loadings" :data="list" border class="card"> <el-table v-loading="loadings" :data="list" border class="card">
<el-table-column :label="$t('序号')" align="center" prop="id" type="index"> <el-table-column
:label="$t('序号')"
align="center"
prop="id"
type="index"
>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span> <span>{{ scope.$index + 1 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('收款单号')" align="center" prop="receiptNo" /> <el-table-column
<!-- <template slot-scope="scope"> --> :label="$t('收款单号')"
<!-- <span style="color: #1890ff;" @click="verificationCancelClick(scope.row)">{{scope.row.receiptNo}}</span> --> align="center"
<!-- </template> --> prop="receiptNo"
/>
<!-- <template slot-scope="scope"> -->
<!-- <span style="color: #1890ff;" @click="verificationCancelClick(scope.row)">{{scope.row.receiptNo}}</span> -->
<!-- </template> -->
<!-- </el-table-column> --> <!-- </el-table-column> -->
<el-table-column :label="$t('客户名称')" align="center" prop="customerName" /> <el-table-column
:label="$t('客户名称')"
align="center"
prop="customerName"
/>
<el-table-column :label="$t('创建日期')" align="center" prop="createTime"> <el-table-column :label="$t('创建日期')" align="center" prop="createTime">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('实收日期')" align="center" prop="payedAt"> <el-table-column :label="$t('实收日期')" align="center" prop="payedAt">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.payedAt, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.payedAt, "{y}-{m}-{d}") }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('业务员')" align="center" prop="salesmanName" /> <el-table-column
:label="$t('业务员')"
align="center"
prop="salesmanName"
/>
<el-table-column :label="$t('状态')" align="center"> <el-table-column :label="$t('状态')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:type="DICT_TYPE.ECW_RECEIPT_STATE" :type="DICT_TYPE.ECW_RECEIPT_STATE"
:value="scope.row.state" :value="scope.row.state"
/> />
<span v-if="scope.row.remark&&(scope.row.state==1 || scope.row.state ==3 || scope.row.state==8)" :title="scope.row.remark"><i class="el-icon-question"></i></span> <span
v-if="
scope.row.remark &&
(scope.row.state == 1 ||
scope.row.state == 3 ||
scope.row.state == 8)
"
:title="scope.row.remark"
><i class="el-icon-question"></i
></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('是否开票')" align="center"> <el-table-column :label="$t('是否开票')" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.openInvoice === 0 ? $t('') : $t('') }} {{ scope.row.openInvoice === 0 ? $t("") : $t("") }}
</template> </template>
</el-table-column> </el-table-column>
<!--lanbm 2024-05-14 add-->
<el-table-column :label="$t('明细状态')" align="center" prop="mxStatus" />
<el-table-column <el-table-column
:label="$t('操作')" :label="$t('操作')"
align="center" align="center"
...@@ -127,14 +166,15 @@ ...@@ -127,14 +166,15 @@
type="text" type="text"
v-hasPermi="['ecw:voucher:see']" v-hasPermi="['ecw:voucher:see']"
@click="verificationCancelClick(scope.row)" @click="verificationCancelClick(scope.row)"
>{{ $t('查看')}}</el-button> >{{ $t("查看") }}</el-button
>
<el-button <el-button
v-if="scope.row.state === 0" v-if="scope.row.state === 0"
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:voucher:edit']" v-hasPermi="['ecw:voucher:edit']"
@click="handleAdd(scope.row.id)" @click="handleAdd(scope.row.id)"
>{{ $t('编辑') }}</el-button >{{ $t("编辑") }}</el-button
> >
<!-- <el-button <!-- <el-button
v-if="scope.row.state == " v-if="scope.row.state == "
...@@ -144,60 +184,71 @@ ...@@ -144,60 +184,71 @@
>{{ $t('核销') }}</el-button >{{ $t('核销') }}</el-button
> --> > -->
<el-button <el-button
v-if="scope.row.state == 4 || scope.row.state == 5 || scope.row.state == 6" v-if="
scope.row.state == 4 ||
scope.row.state == 5 ||
scope.row.state == 6
"
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']" v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="writeOffShow(2,scope.$index)" @click="writeOffShow(2, scope.$index)"
>{{ $t('反核销') }}</el-button >{{ $t("反核销") }}</el-button
> >
<el-button <el-button
v-if="scope.row.state == 1" v-if="scope.row.state == 1"
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:voucher:deApproval']" v-hasPermi="['ecw:voucher:deApproval']"
@click="writeOffShow(1,scope.$index)" @click="writeOffShow(1, scope.$index)"
>{{ $t('反审核') }}</el-button >{{ $t("反审核") }}</el-button
> >
<el-button <el-button
v-if="scope.row.state == 7" v-if="scope.row.state == 7"
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:vocher:cancelAppoval']" v-hasPermi="['ecw:vocher:cancelAppoval']"
@click="cancelClick(scope.$index,1)" @click="cancelClick(scope.$index, 1)"
>{{ $t('取消审核') }}</el-button >{{ $t("取消审核") }}</el-button
> >
<el-button <el-button
v-if="scope.row.state == 11" v-if="scope.row.state == 11"
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:vocher:cancelWriteOfflNo']" v-hasPermi="['ecw:vocher:cancelWriteOfflNo']"
@click="cancelClick(scope.$index,3)" @click="cancelClick(scope.$index, 3)"
>{{ $t('取消反核销审核') }}</el-button >{{ $t("取消反核销审核") }}</el-button
> >
<el-button <el-button
v-if="scope.row.state == 10" v-if="scope.row.state == 10"
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:vocher:cancelWriteOffAll']" v-hasPermi="['ecw:vocher:cancelWriteOffAll']"
@click="cancelClick(scope.$index,4)" @click="cancelClick(scope.$index, 4)"
>{{ $t('取消全部核销审核') }}</el-button >{{ $t("取消全部核销审核") }}</el-button
> >
<el-button <el-button
v-if="scope.row.state == 9" v-if="scope.row.state == 9"
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:vocher:cancelAppovalNo']" v-hasPermi="['ecw:vocher:cancelAppovalNo']"
@click="cancelClick(scope.$index,2)" @click="cancelClick(scope.$index, 2)"
>{{ $t('取消反审核') }}</el-button >{{ $t("取消反审核") }}</el-button
> >
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
v-if="scope.row.state == 9 || scope.row.state == 7 || scope.row.state == 11|| scope.row.state == 10" v-if="
scope.row.state == 9 ||
scope.row.state == 7 ||
scope.row.state == 11 ||
scope.row.state == 10
"
v-hasPermi="['ecw:voucher:cancelWriteOff']" v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="$router.push(`/bpm/process-instance/detail?id=`+scope.row.bmpId)" @click="
>{{ $t('审核详情') }}</el-button $router.push(`/bpm/process-instance/detail?id=` + scope.row.bmpId)
"
>{{ $t("审核详情") }}</el-button
> >
<el-button <el-button
v-if="scope.row.state == 5" v-if="scope.row.state == 5"
...@@ -205,25 +256,55 @@ ...@@ -205,25 +256,55 @@
type="text" type="text"
v-hasPermi="['ecw:voucher:ballot']" v-hasPermi="['ecw:voucher:ballot']"
@click="openInvoice(scope.row.id)" @click="openInvoice(scope.row.id)"
>{{ $t('开票') }}</el-button >{{ $t("开票") }}</el-button
>
<el-button
v-if="
scope.row.state == 1 ||
scope.row.state == 2 ||
scope.row.state == 3
"
v-hasPermi="['ecw:voucher:payment']"
size="mini"
type="text"
@click="verificationCancelClick(scope.row)"
>{{ $t("收款") }}</el-button
>
<el-button
v-if="scope.row.state == 0"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:delete']"
@click="deleteClick(scope.row)"
>{{ $t("删除") }}</el-button
> >
<el-button v-if="scope.row.state == 1 || scope.row.state == 2 || scope.row.state == 3" v-hasPermi="['ecw:voucher:payment']" size="mini" type="text" @click="verificationCancelClick(scope.row)">{{ $t('收款') }}</el-button>
<el-button v-if="scope.row.state == 0" size="mini" type="text" v-hasPermi="['ecw:voucher:delete']" @click="deleteClick(scope.row)">{{ $t('删除') }}</el-button>
<el-button <el-button
v-if="scope.row.state != 0 && scope.row.state != 7 && scope.row.state != 11 && scope.row.state != 8 && scope.row.state != 9" v-if="
scope.row.state != 0 &&
scope.row.state != 7 &&
scope.row.state != 11 &&
scope.row.state != 8 &&
scope.row.state != 9
"
size="mini" size="mini"
type="text" type="text"
@click="toprint(scope.row.id)" @click="toprint(scope.row.id)"
v-hasPermi="['ecw:voucher:print']" v-hasPermi="['ecw:voucher:print']"
>{{ $t('打印') }}</el-button >{{ $t("打印") }}</el-button
> >
<el-button <el-button
v-if="scope.row.state != 0 && scope.row.state != 7 && scope.row.state != 11 && scope.row.state != 8 && scope.row.state != 9" v-if="
scope.row.state != 0 &&
scope.row.state != 7 &&
scope.row.state != 11 &&
scope.row.state != 8 &&
scope.row.state != 9
"
size="mini" size="mini"
type="text" type="text"
v-hasPermi="['ecw:voucher:derive']" v-hasPermi="['ecw:voucher:derive']"
@click="exportReceipt(scope.row.id)" @click="exportReceipt(scope.row.id)"
>{{ $t('导出账单') }}</el-button >{{ $t("导出账单") }}</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
...@@ -249,7 +330,12 @@ ...@@ -249,7 +330,12 @@
<i class="el-icon-close" @click="cancel"></i> <i class="el-icon-close" @click="cancel"></i>
</div> --> </div> -->
<div class="dialog-footer"> <div class="dialog-footer">
<el-button type="primary" style="width: 130px" @click="submitForm(1)" v-loading="downloading">{{ $t('国内账单') }}</el-button <el-button
type="primary"
style="width: 130px"
@click="submitForm(1)"
v-loading="downloading"
>{{ $t("国内账单") }}</el-button
> >
<el-button <el-button
plain plain
...@@ -262,30 +348,47 @@ ...@@ -262,30 +348,47 @@
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:title="writeOffType==1?$t('收款单反审核'):$t('收款单反核销')" :title="writeOffType == 1 ? $t('收款单反审核') : $t('收款单反核销')"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="30%"> width="30%"
<div class="cancel_content"> >
<span>{{$t('申请理由')}}</span> <div class="cancel_content">
<el-input type="textarea" :rows ="6" v-model="reason" :placeholder="$t('请输入理由')"></el-input> <span>{{ $t("申请理由") }}</span>
</div> <el-input
type="textarea"
:rows="6"
v-model="reason"
:placeholder="$t('请输入理由')"
></el-input>
</div>
<span slot="footer" class="dialog-footers"> <span slot="footer" class="dialog-footers">
<el-button v-if="writeOffType==1" type="primary" @click="writeOffClick()">{{$t('提交反审核')}}</el-button> <el-button
<el-button v-else type="primary" @click="writeOffClick()">{{$t('提交反核销')}}</el-button> v-if="writeOffType == 1"
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button> type="primary"
@click="writeOffClick()"
>{{ $t("提交反审核") }}</el-button
>
<el-button v-else type="primary" @click="writeOffClick()">{{
$t("提交反核销")
}}</el-button>
<el-button @click="dialogVisible = false">{{ $t("取消") }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog <el-dialog :title="cancelTitle" :visible.sync="cancelShow" width="30%">
:title="cancelTitle" <div class="cancel_content">
:visible.sync="cancelShow" <span>{{ $t("申请理由") }}</span>
width="30%"> <el-input
<div class="cancel_content"> type="textarea"
<span>{{$t('申请理由')}}</span> :rows="6"
<el-input type="textarea" :rows ="6" v-model="cancelReason" :placeholder="$t('请输入取消理由')"></el-input> v-model="cancelReason"
</div> :placeholder="$t('请输入取消理由')"
></el-input>
</div>
<span slot="footer" class="dialog-footers"> <span slot="footer" class="dialog-footers">
<el-button type="primary" @click="cancelWriteOffClick()">{{$t('提交')}}</el-button> <el-button type="primary" @click="cancelWriteOffClick()">{{
<el-button @click="cancelShow = false">{{$t('取消')}}</el-button> $t("提交")
}}</el-button>
<el-button @click="cancelShow = false">{{ $t("取消") }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -306,7 +409,7 @@ import { ...@@ -306,7 +409,7 @@ import {
cancelFinanceReceiptApproval, cancelFinanceReceiptApproval,
cancelFinanceReceiptApprovalNo, cancelFinanceReceiptApprovalNo,
cancelFinanceReceiptWriteOffNo, cancelFinanceReceiptWriteOffNo,
cancelFinanceReceiptWriteOff cancelFinanceReceiptWriteOff,
} from "@/api/ecw/financial"; } from "@/api/ecw/financial";
export default { export default {
...@@ -326,9 +429,7 @@ export default { ...@@ -326,9 +429,7 @@ export default {
total: 0, total: 0,
dateType: [], dateType: [],
loading: "", loading: "",
params: { params: {},
},
// 查询参数 // 查询参数
queryParams: { queryParams: {
page: 1, page: 1,
...@@ -348,20 +449,20 @@ export default { ...@@ -348,20 +449,20 @@ export default {
productRecord: null, productRecord: null,
followUpSalesmanId: null, followUpSalesmanId: null,
}, },
dateFilter:[], dateFilter: [],
downloading: false, // 导出状态 downloading: false, // 导出状态
dialogVisible:false, dialogVisible: false,
reason:'', reason: "",
writeOffType:1, writeOffType: 1,
writeOffIndex:0, writeOffIndex: 0,
cancelShow:false, cancelShow: false,
cancelTitle:'', cancelTitle: "",
cancelReason:'', cancelReason: "",
cancelIndex:0, cancelIndex: 0,
selectIndex:0 selectIndex: 0,
}; };
}, },
activated(){ activated() {
this.getList(); this.getList();
}, },
created() { created() {
...@@ -373,13 +474,13 @@ export default { ...@@ -373,13 +474,13 @@ export default {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;
this.params = {} this.params = {};
for(var key in this.queryParams){ for (var key in this.queryParams) {
if(this.queryParams[key]){ if (this.queryParams[key]) {
this.params[key] = this.queryParams[key] this.params[key] = this.queryParams[key];
} }
} }
console.log(this.params) console.log(this.params);
// 处理查询参数 // 处理查询参数
let params = { ...this.params }; let params = { ...this.params };
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime"); this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
...@@ -390,22 +491,22 @@ export default { ...@@ -390,22 +491,22 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
changeCustomerId(e){ changeCustomerId(e) {
this.$set(this.queryParams,'customerId',e.id) this.$set(this.queryParams, "customerId", e.id);
}, },
verificationClick(row) { verificationClick(row) {
const id = row.id; const id = row.id;
return this.$router.push("receiptDetail?id=" + id); return this.$router.push("receiptDetail?id=" + id);
// this.$modal // this.$modal
// .confirm("您确认要核销吗?") // .confirm("您确认要核销吗?")
// .then(function () { // .then(function () {
// return receiptVerification(id); // return receiptVerification(id);
// }) // })
// .then(() => { // .then(() => {
// this.getList(); // this.getList();
// this.$modal.msgSuccess("核销成功"); // this.$modal.msgSuccess("核销成功");
// }) // })
// .catch(() => {}); // .catch(() => {});
}, },
verificationCancelClick(row) { verificationCancelClick(row) {
const id = row.id; const id = row.id;
...@@ -422,114 +523,141 @@ export default { ...@@ -422,114 +523,141 @@ export default {
// .catch(() => {}); // .catch(() => {});
}, },
//显示取消审核弹窗 //显示取消审核弹窗
cancelClick(index,type){ cancelClick(index, type) {
this.selectIndex = index this.selectIndex = index;
this.cancelIndex = type this.cancelIndex = type;
this.cancelReason = '' this.cancelReason = "";
if(this.cancelIndex==1){ if (this.cancelIndex == 1) {
this.cancelTitle = this.$t('取消审核') this.cancelTitle = this.$t("取消审核");
}else if(this.cancelIndex == 2){ } else if (this.cancelIndex == 2) {
this.cancelTitle = this.$t('取消反审核') this.cancelTitle = this.$t("取消反审核");
}else if(this.cancelIndex == 3){ } else if (this.cancelIndex == 3) {
this.cancelTitle = this.$t('取消反核销审核') this.cancelTitle = this.$t("取消反核销审核");
}else{ } else {
this.cancelTitle = this.$t('取消全部核销审核') this.cancelTitle = this.$t("取消全部核销审核");
} }
this.cancelShow = true this.cancelShow = true;
}, },
//取消审核 //取消审核
cancelWriteOffClick(){ cancelWriteOffClick() {
if(!this.cancelReason){ if (!this.cancelReason) {
this.$modal.msgError(this.$t('请输入申请理由')); this.$modal.msgError(this.$t("请输入申请理由"));
return return;
} }
var receiptId = this.list[this.selectIndex].id var receiptId = this.list[this.selectIndex].id;
if(this.cancelIndex==1){ if (this.cancelIndex == 1) {
cancelFinanceReceiptApproval({receiptId:receiptId,remark:this.cancelReason}).then(res=>{ cancelFinanceReceiptApproval({
this.cancelShow = false receiptId: receiptId,
this.getList(); remark: this.cancelReason,
this.$message.success(this.$t("提交成功")); }).then((res) => {
this.cancelShow = false;
}); this.getList();
}else if(this.cancelIndex ==2){ this.$message.success(this.$t("提交成功"));
cancelFinanceReceiptApprovalNo({receiptId:receiptId,remark:this.cancelReason}).then(res=>{ });
this.cancelShow = false } else if (this.cancelIndex == 2) {
this.getList(); cancelFinanceReceiptApprovalNo({
this.$message.success(this.$t("提交成功")); receiptId: receiptId,
remark: this.cancelReason,
}); }).then((res) => {
}else if(this.cancelIndex ==3){ this.cancelShow = false;
cancelFinanceReceiptWriteOffNo({receiptId:receiptId,remark:this.cancelReason}).then(res=>{ this.getList();
this.cancelShow = false this.$message.success(this.$t("提交成功"));
this.getList(); });
this.$message.success(this.$t("提交成功")); } else if (this.cancelIndex == 3) {
cancelFinanceReceiptWriteOffNo({
}); receiptId: receiptId,
}else{ remark: this.cancelReason,
cancelFinanceReceiptWriteOff({receiptId:receiptId,remark:this.cancelReason}).then(res=>{ }).then((res) => {
this.cancelShow = false this.cancelShow = false;
this.getList(); this.getList();
this.$message.success(this.$t("提交成功")); this.$message.success(this.$t("提交成功"));
});
}); } else {
cancelFinanceReceiptWriteOff({
receiptId: receiptId,
remark: this.cancelReason,
}).then((res) => {
this.cancelShow = false;
this.getList();
this.$message.success(this.$t("提交成功"));
});
} }
}, },
writeOffClick(){ writeOffClick() {
if(!this.reason){ if (!this.reason) {
this.$modal.msgError(this.$t('请输入申请理由')); this.$modal.msgError(this.$t("请输入申请理由"));
return return;
} }
const receiptIdData = this.list[this.writeOffIndex] const receiptIdData = this.list[this.writeOffIndex];
if(this.writeOffType==1){ if (this.writeOffType == 1) {
// this.$alert() // this.$alert()
// .confirm(this.$t('您确认要反审核吗')+'?') // .confirm(this.$t('您确认要反审核吗')+'?')
// .then(()=>{ // .then(()=>{
financeApproveNo({receiptId:receiptIdData.id,receiptNo:receiptIdData.receiptNo,remark:this.reason}).then(res=>{ financeApproveNo({
this.getList(); receiptId: receiptIdData.id,
this.$message.success(this.$t("提交成功")); receiptNo: receiptIdData.receiptNo,
this.dialogVisible = false remark: this.reason,
// this.$store.dispatch('tagsView/delCurrentView') }).then((res) => {
}); this.getList();
// }) this.$message.success(this.$t("提交成功"));
// .catch(() => {this.dialogVisible = false}); this.dialogVisible = false;
}else{ // this.$store.dispatch('tagsView/delCurrentView')
});
// })
// .catch(() => {this.dialogVisible = false});
} else {
// this.$modal // this.$modal
// .confirm(this.$t('您确认要反核销吗')+'?') // .confirm(this.$t('您确认要反核销吗')+'?')
// .then(()=>{ // .then(()=>{
financeReceiptWriteOffNo({receiptId:receiptIdData.id,receiptNo:receiptIdData.receiptNo,remark:this.reason}).then(res=>{ financeReceiptWriteOffNo({
this.getList(); receiptId: receiptIdData.id,
this.$message.success(this.$t("提交成功")); receiptNo: receiptIdData.receiptNo,
this.dialogVisible = false remark: this.reason,
// this.$store.dispatch('tagsView/delCurrentView') }).then((res) => {
}); this.getList();
// }) this.$message.success(this.$t("提交成功"));
// .catch(() => {this.dialogVisible = false}); this.dialogVisible = false;
// this.$store.dispatch('tagsView/delCurrentView')
});
// })
// .catch(() => {this.dialogVisible = false});
} }
}, },
deleteClick(row) { deleteClick(row) {
const id = row.id; const id = row.id;
this.$modal.confirm(this.$t('是否确认删除该收款单')+'?').then(function() { this.$modal
return deleteReceipt(id); .confirm(this.$t("是否确认删除该收款单") + "?")
}).then(() => { .then(function () {
this.getList(); return deleteReceipt(id);
this.$modal.msgSuccess(this.$t('删除成功')); })
}).catch(() => {}); .then(() => {
this.getList();
this.$modal.msgSuccess(this.$t("删除成功"));
})
.catch(() => {});
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
if(this.dateFilter&&this.dateFilter.length>0){ if (this.dateFilter && this.dateFilter.length > 0) {
this.queryParams.beginCreateTime = this.dateFilter[0] this.queryParams.beginCreateTime = this.dateFilter[0];
this.queryParams.endCreateTime = this.dateFilter[1] this.queryParams.endCreateTime = this.dateFilter[1];
}else{ } else {
this.queryParams.beginCreateTime = '' this.queryParams.beginCreateTime = "";
this.queryParams.endCreateTime = '' this.queryParams.endCreateTime = "";
} }
this.queryParams.page = 1; this.queryParams.page = 1;
this.getList(); this.getList();
}, },
handleQuery2() {
//批量反审核 lanbm 2024-05-14 add
},
handleQuery3() {
//批量反核销 lanbm 2024-05-14 add
},
handleQuery4() {
//批量核销 lanbm 2024-05-14 add
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd(id) { handleAdd(id) {
return this.$router.push("creatCollection?id=" + id); return this.$router.push("creatCollection?id=" + id);
...@@ -545,19 +673,23 @@ export default { ...@@ -545,19 +673,23 @@ export default {
this.exportId = id; this.exportId = id;
}, },
//显示反审核反核销弹窗 //显示反审核反核销弹窗
writeOffShow(type,index){ writeOffShow(type, index) {
this.writeOffType = type this.writeOffType = type;
this.writeOffIndex = index this.writeOffIndex = index;
this.reason = '' this.reason = "";
this.dialogVisible = true this.dialogVisible = true;
}, },
submitForm(type) { submitForm(type) {
this.downloading = true this.downloading = true;
receiptExportExcel({ id: this.exportId, billType: type }).then((response) => { receiptExportExcel({ id: this.exportId, billType: type })
this.$download.excel(response, `${type === 1 ? this.$t('国内账单') : "Debite_note"}.xls`); .then((response) => {
this.$download.excel(
response,
`${type === 1 ? this.$t("国内账单") : "Debite_note"}.xls`
);
this.open = false; this.open = false;
} })
).finally(() => this.downloading = false) .finally(() => (this.downloading = false));
}, },
/** 取消按钮 */ /** 取消按钮 */
// cancel() { // cancel() {
...@@ -579,7 +711,7 @@ export default { ...@@ -579,7 +711,7 @@ export default {
justify-content: space-between; justify-content: space-between;
height: 160px; height: 160px;
} }
.dialog-footers{ .dialog-footers {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
...@@ -588,13 +720,13 @@ export default { ...@@ -588,13 +720,13 @@ export default {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
} }
.cancel_content{ .cancel_content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.cancel_content span{ .cancel_content span {
font-size: 16px; font-size: 16px;
font-weight:600; font-weight: 600;
margin-bottom:10px margin-bottom: 10px;
} }
</style> </style>
...@@ -64,7 +64,6 @@ ...@@ -64,7 +64,6 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
...@@ -118,7 +117,6 @@ export default { ...@@ -118,7 +117,6 @@ export default {
created(){ created(){
this.show = true this.show = true
if(!this.order && this.orderId){ if(!this.order && this.orderId){
getOrder(this.orderId).then(res => { getOrder(this.orderId).then(res => {
this.orderDetail = res.data this.orderDetail = res.data
......
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item :label="$t('商品编码')" prop="productCode"> <el-form-item :label="$t('商品编码')" prop="productCode">
......
<template> <template>
<div style="padding: 20px"> <div style="padding: 20px">
<header style="display: flex;justify-content: space-between;align-items: center;"> <header
<h1 style="font-weight: 600;font-size: 20px">{{$t('会员详情')}}</h1> style="display: flex; justify-content: space-between; align-items: center"
>
<h1 style="font-weight: 600; font-size: 20px">{{ $t("会员详情") }}</h1>
<div> <div>
<el-button type="primary" v-has-permi="['member:certificate']" @click="guarantee(details)">{{ $t('保函证书') }}</el-button> <el-button
<el-button type="primary" v-has-permi="['member:log']" @click="operationLogFn(details)">{{ $t('操作日志') }}</el-button> type="primary"
<el-button type="primary" v-has-permi="['member:id-card']" @click="identityFn(details , '1')">{{ $t('身份证') }}</el-button> v-has-permi="['member:certificate']"
<el-button type="primary" v-has-permi="['member:business-license']" @click="identityFn(details, '2')">{{ $t('营业执照') }}</el-button> @click="guarantee(details)"
<el-button type="danger" v-has-permi="['member:delete']" @click="deleteFn(details)">{{ $t('删除') }}</el-button> >{{ $t("保函证书") }}</el-button
>
<el-button
type="primary"
v-has-permi="['member:log']"
@click="operationLogFn(details)"
>{{ $t("操作日志") }}</el-button
>
<el-button
type="primary"
v-has-permi="['member:id-card']"
@click="identityFn(details, '1')"
>{{ $t("身份证") }}</el-button
>
<el-button
type="primary"
v-has-permi="['member:business-license']"
@click="identityFn(details, '2')"
>{{ $t("营业执照") }}</el-button
>
<el-button
type="danger"
v-has-permi="['member:delete']"
@click="deleteFn(details)"
>{{ $t("删除") }}</el-button
>
</div> </div>
</header> </header>
<el-descriptions :title="$t('公司信息')" :column="4" border> <!--lanbm 2024-05-15 修改信息显示BUG-->
<el-descriptions-item :label="$t('会员编号')">{{ details.id }}</el-descriptions-item> <el-descriptions :title="$t('基础信息')" :column="4" border>
<el-descriptions-item :label="$t('会员昵称')">{{ details.nickname }}</el-descriptions-item> <el-descriptions-item :label="$t('会员编号')">{{
<el-descriptions-item :label="$t('英文名称')">{{ details.englishName }}</el-descriptions-item> details.id
<el-descriptions-item :label="$t('真实姓名')">{{ details.identityName || '-' }}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item :label="$t('联系方式')"><span <el-descriptions-item :label="$t('会员昵称')">{{
style="margin-right: 10px;">+{{ details.areaCode }}</span><span>{{ details.mobile }}</span> details.nickname
}}</el-descriptions-item>
<el-descriptions-item :label="$t('英文名称')">{{
details.englishName
}}</el-descriptions-item>
<el-descriptions-item :label="$t('真实姓名')">{{
details.identityName || "-"
}}</el-descriptions-item>
<el-descriptions-item :label="$t('联系方式')"
><span style="margin-right: 10px">+{{ details.areaCode }}</span
><span>{{ details.mobile }}</span>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('绑定邮箱')">{{ details.email }}</el-descriptions-item> <el-descriptions-item :label="$t('绑定邮箱')">{{
<el-descriptions-item :label="$t('生日')">{{ details.birthday }}</el-descriptions-item> details.email
<el-descriptions-item :label="$t('性别')">{{ }}</el-descriptions-item>
details.gender === 0 ? '' : details.gender === 1 ? '' : '保密' <el-descriptions-item :label="$t('生日')">{{
details.birthday
}}</el-descriptions-item>
<el-descriptions-item :label="$t('性别')"
>{{
details.gender === 0 ? "" : details.gender === 1 ? "" : "保密"
}} }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('地址')">{{ details.address }}</el-descriptions-item> <el-descriptions-item :label="$t('地址')">{{
<el-descriptions-item :label="$t('部门')">{{details.department}}</el-descriptions-item> details.address
<el-descriptions-item :label="$t('职位')">{{details.jobPosition}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{details.createTime}}</el-descriptions-item> <el-descriptions-item :label="$t('部门')">{{
<el-descriptions-item :label="$t('上次登录')">{{details.loginDate}}</el-descriptions-item> details.department
}}</el-descriptions-item>
<el-descriptions-item :label="$t('职位')">{{
details.jobPosition
}}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">{{
details.createTime
}}</el-descriptions-item>
<el-descriptions-item :label="$t('上次登录')">{{
details.loginDate
}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions style="margin-top: 20px" :title="$t('基础信息')" :column="4" border> <!--lanbm 2024-05-15 修改信息显示BUG-->
<el-descriptions-item :label="$t('公司名称')">{{details.enterpriseName}}</el-descriptions-item> <el-descriptions
<el-descriptions-item :label="$t('公司英文名称')">{{details.enterpriseNameEn}}</el-descriptions-item> style="margin-top: 20px"
<el-descriptions-item :label="$t('档口')">{{details.enterpriseStall}}</el-descriptions-item> :title="$t('公司信息')"
<el-descriptions-item :label="$t('品牌')">{{details.enterpriseBrand}}</el-descriptions-item> :column="4"
<el-descriptions-item :label="$t('公司地址')">{{details.enterpriseAddress}}</el-descriptions-item> border
<el-descriptions-item :label="$t('公司简介')">{{details.enterpriseDesc}}</el-descriptions-item> >
<el-descriptions-item :label="$t('公司名称')">{{
details.enterpriseName
}}</el-descriptions-item>
<el-descriptions-item :label="$t('公司英文名称')">{{
details.enterpriseNameEn
}}</el-descriptions-item>
<el-descriptions-item :label="$t('档口')">{{
details.enterpriseStall
}}</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">{{
details.enterpriseBrand
}}</el-descriptions-item>
<el-descriptions-item :label="$t('公司地址')">{{
details.enterpriseAddress
}}</el-descriptions-item>
<el-descriptions-item :label="$t('公司简介')">{{
details.enterpriseDesc
}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions style="margin-top: 20px" :title="$t('认证信息')" :column="4" border> <el-descriptions
<el-descriptions-item :label="$t('成交')">{{details.customerStatus === 3 ? '成交' : '未成交' }}</el-descriptions-item> style="margin-top: 20px"
:title="$t('认证信息')"
:column="4"
border
>
<el-descriptions-item :label="$t('成交')">{{
details.customerStatus === 3 ? "成交" : "未成交"
}}</el-descriptions-item>
<el-descriptions-item :label="$t('认证')"> <el-descriptions-item :label="$t('认证')">
<span v-if="details.identityAuditStatus === 2 && details.enterpriseAuditStatus === 2" >{{ $t('双认证') }}</span> <span
<span v-else-if="details.identityAuditStatus === 2 && details.enterpriseAuditStatus !== 2 " >{{ $t('身份证') }}</span> v-if="
<span v-else-if="details.identityAuditStatus !== 2 && details.enterpriseAuditStatus === 2 " >{{ $t('企业') }}</span> details.identityAuditStatus === 2 &&
<span v-else-if="details.identityAuditStatus !== 2 && details.enterpriseAuditStatus !== 2 " >{{ $t('') }}</span> details.enterpriseAuditStatus === 2
"
>{{ $t("双认证") }}</span
>
<span
v-else-if="
details.identityAuditStatus === 2 &&
details.enterpriseAuditStatus !== 2
"
>{{ $t("身份证") }}</span
>
<span
v-else-if="
details.identityAuditStatus !== 2 &&
details.enterpriseAuditStatus === 2
"
>{{ $t("企业") }}</span
>
<span
v-else-if="
details.identityAuditStatus !== 2 &&
details.enterpriseAuditStatus !== 2
"
>{{ $t("") }}</span
>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('身份证认证状态')">{{ details.identityAuditStatus !== null ? $l(getDictDatas(this.DICT_TYPE.AUDIT_STATUS).find(i => i.value == details.identityAuditStatus),'label') : ''}}</el-descriptions-item> <el-descriptions-item :label="$t('身份证认证状态')">{{
<el-descriptions-item :label="$t('身份证认证状态')">{{details.enterpriseAuditStatus !== null ? $l(getDictDatas(this.DICT_TYPE.AUDIT_STATUS).find(i => i.value == details.enterpriseAuditStatus),'label' ) : '' }}</el-descriptions-item> details.identityAuditStatus !== null
? $l(
getDictDatas(this.DICT_TYPE.AUDIT_STATUS).find(
(i) => i.value == details.identityAuditStatus
),
"label"
)
: ""
}}</el-descriptions-item>
<el-descriptions-item :label="$t('营业执照认证状态')">{{
details.enterpriseAuditStatus !== null
? $l(
getDictDatas(this.DICT_TYPE.AUDIT_STATUS).find(
(i) => i.value == details.enterpriseAuditStatus
),
"label"
)
: ""
}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-dialog <el-dialog
title="保函/证书" title="保函/证书"
:visible.sync="guaranteeShow" :visible.sync="guaranteeShow"
:before-close="()=>{guaranteeUrl = ''; guaranteeShow = false;}" :before-close="
width="50%"> () => {
guaranteeUrl = '';
guaranteeShow = false;
}
"
width="50%"
>
<el-form> <el-form>
<el-form-item :label="$t('保函/证书')"> <el-form-item :label="$t('保函/证书')">
<el-row :gutter="20" type="flex" justify="center"> <el-row :gutter="20" type="flex" justify="center">
...@@ -62,30 +186,38 @@ ...@@ -62,30 +186,38 @@
<el-input v-model="guaranteeUrl"></el-input> <el-input v-model="guaranteeUrl"></el-input>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<div style="height: 45px;overflow: hidden;"> <div style="height: 45px; overflow: hidden">
<file-upload v-model="guaranteeUrl" :fileType="['png', 'jpg', 'jpeg','pdf']" :limit="1" <file-upload
:isShowTip="false"></file-upload> v-model="guaranteeUrl"
:fileType="['png', 'jpg', 'jpeg', 'pdf']"
:limit="1"
:isShowTip="false"
></file-upload>
</div> </div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<div>{{ $t('可上传图片,pdf文档') }}</div> <div>{{ $t("可上传图片,pdf文档") }}</div>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="text-align: center;"> <div style="text-align: center">
<el-button @click="setGuarantee">{{ $t('保 存') }}</el-button> <el-button @click="setGuarantee">{{ $t("保 存") }}</el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:title="$t('操作日志')" :title="$t('操作日志')"
:visible.sync="operationLogShow" :visible.sync="operationLogShow"
width="50%"> width="50%"
>
<el-table :data="operationLogList"> <el-table :data="operationLogList">
<el-table-column :label="$t('标题')" prop="title"></el-table-column> <el-table-column :label="$t('标题')" prop="title"></el-table-column>
<el-table-column :label="$t('操作内容')" prop="content"></el-table-column> <el-table-column
:label="$t('操作内容')"
prop="content"
></el-table-column>
<el-table-column :label="$t('操作人')" prop="userId"> <el-table-column :label="$t('操作人')" prop="userId">
<template v-slot="{row}"> <template v-slot="{ row }">
{{ details.identityName }} {{ details.identityName }}
</template> </template>
</el-table-column> </el-table-column>
...@@ -96,75 +228,154 @@ ...@@ -96,75 +228,154 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作ip')" prop="ip"></el-table-column> <el-table-column :label="$t('操作ip')" prop="ip"></el-table-column>
</el-table> </el-table>
<pagination v-show="totalLog > 0" :total="totalLog" :page.sync="operationLogFrom.page" <pagination
:limit.sync="operationLogFrom.row" v-show="totalLog > 0"
@pagination="getOperationLogList"/> :total="totalLog"
:page.sync="operationLogFrom.page"
:limit.sync="operationLogFrom.row"
@pagination="getOperationLogList"
/>
</el-dialog> </el-dialog>
<el-dialog <el-dialog :title="$t('认证')" :visible.sync="attestationShow" width="80%">
:title="$t('认证')"
:visible.sync="attestationShow"
width="80%">
<div class="details"> <div class="details">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane :label="$t('身份证')" name="1"> <el-tab-pane :label="$t('身份证')" name="1">
<div style="padding:0 40px;box-sizing: border-box;"> <div style="padding: 0 40px; box-sizing: border-box">
<el-form :disabled="[2,3].includes(IdDetails.status) && modifyIdCard" ref="formId" label-position="left" <el-form
label-width="100px" :rules="rulesId" :model="IdDetails"> :disabled="[2, 3].includes(IdDetails.status) && modifyIdCard"
ref="formId"
label-position="left"
label-width="100px"
:rules="rulesId"
:model="IdDetails"
>
<el-form-item :label="$t('姓名')" prop="name"> <el-form-item :label="$t('姓名')" prop="name">
<el-input v-model="IdDetails.name"></el-input> <el-input v-model="IdDetails.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('证件类型')" prop="cardType"> <el-form-item :label="$t('证件类型')" prop="cardType">
<dict-selector v-model="IdDetails.cardType" :type="DICT_TYPE.CERTIFICATE_TYPE"></dict-selector> <dict-selector
v-model="IdDetails.cardType"
:type="DICT_TYPE.CERTIFICATE_TYPE"
></dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('证件号码')" prop="cardNumber"> <el-form-item :label="$t('证件号码')" prop="cardNumber">
<el-input v-model="IdDetails.cardNumber"></el-input> <el-input v-model="IdDetails.cardNumber"></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('证件正面照')" prop="img1"> <el-form-item :label="$t('证件正面照')" prop="img1">
<div> <div>
<el-input readonly style="margin-bottom: 20px" v-model="IdDetails.img1"></el-input> <el-input
<ImageUpload :isShowTip="false" v-model="IdDetails.img1" :limit="1"></ImageUpload> readonly
style="margin-bottom: 20px"
v-model="IdDetails.img1"
></el-input>
<ImageUpload
:isShowTip="false"
v-model="IdDetails.img1"
:limit="1"
></ImageUpload>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('证件背面照')" prop="img2"> <el-form-item :label="$t('证件背面照')" prop="img2">
<div> <div>
<el-input readonly style="margin-bottom: 20px" v-model="IdDetails.img2"></el-input> <el-input
<ImageUpload :isShowTip="false" :limit="1" v-model="IdDetails.img2"></ImageUpload> readonly
style="margin-bottom: 20px"
v-model="IdDetails.img2"
></el-input>
<ImageUpload
:isShowTip="false"
:limit="1"
v-model="IdDetails.img2"
></ImageUpload>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('审核状态')" v-if="modifyIdCard && IdDetails.status !== 0 "> <el-form-item
:label="$t('审核状态')"
v-if="modifyIdCard && IdDetails.status !== 0"
>
{{ {{
getDictDatas(DICT_TYPE.AUDIT_STATUS)[IdDetails.status] ? getDictDatas(DICT_TYPE.AUDIT_STATUS)[IdDetails.status].label : '' getDictDatas(DICT_TYPE.AUDIT_STATUS)[IdDetails.status]
? getDictDatas(DICT_TYPE.AUDIT_STATUS)[IdDetails.status]
.label
: ""
}} }}
</el-form-item> </el-form-item>
<el-form-item :label="$t('审核时间')" v-if="[2,3].includes(IdDetails.status) && modifyIdCard"> <el-form-item
:label="$t('审核时间')"
v-if="[2, 3].includes(IdDetails.status) && modifyIdCard"
>
{{ parseTime(IdDetails.auditTime) }} {{ parseTime(IdDetails.auditTime) }}
</el-form-item> </el-form-item>
<el-form-item v-if="modifyIdCard && IdDetails.status !== 0" :label="$t('审核备注')"> <el-form-item
<el-input v-model="IdDetails.auditRemark" :disabled="IdDetails.status === 3" v-if="modifyIdCard && IdDetails.status !== 0"
type="textarea"></el-input> :label="$t('审核备注')"
>
<el-input
v-model="IdDetails.auditRemark"
:disabled="IdDetails.status === 3"
type="textarea"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div v-if="IdDetails.status === 1" style="text-align: center;margin-top: 20px;"> <div
<el-button type="primary" @click="idCardAuditFn(2)">{{ $t('审核通过') }}</el-button> v-if="IdDetails.status === 1"
<el-button type="primary" @click="idCardAuditFn(3)">{{ $t('审核不通过') }}</el-button> style="text-align: center; margin-top: 20px"
<el-button @click="attestationShow = false">{{ $t('取 消') }}</el-button> >
<el-button type="primary" @click="idCardAuditFn(2)">{{
$t("审核通过")
}}</el-button>
<el-button type="primary" @click="idCardAuditFn(3)">{{
$t("审核不通过")
}}</el-button>
<el-button @click="attestationShow = false">{{
$t("取 消")
}}</el-button>
</div> </div>
<div v-if="IdDetails.status === 2 || IdDetails.status === 3" style="text-align: center;margin-top: 20px;"> <div
<el-button type="primary" v-if="modifyIdCard" @click="modifyIdCard = false;">{{ $t('修 改') }} v-if="IdDetails.status === 2 || IdDetails.status === 3"
style="text-align: center; margin-top: 20px"
>
<el-button
type="primary"
v-if="modifyIdCard"
@click="modifyIdCard = false"
>{{ $t("修 改") }}
</el-button> </el-button>
<el-button type="primary" v-else @click="setMemberUserUpdateIdCard">{{ $t('提交审核') }}</el-button> <el-button
<el-button @click="attestationShow = false">{{ $t('取 消') }}</el-button> type="primary"
v-else
@click="setMemberUserUpdateIdCard"
>{{ $t("提交审核") }}</el-button
>
<el-button @click="attestationShow = false">{{
$t("取 消")
}}</el-button>
</div> </div>
<div v-if="IdDetails.status === 0" style="text-align: center;margin-top: 20px;"> <div
<el-button type="primary" @click="submitId">{{ $t('上 传') }}</el-button> v-if="IdDetails.status === 0"
<el-button @click="attestationShow = false">{{ $t('取 消') }}</el-button> style="text-align: center; margin-top: 20px"
>
<el-button type="primary" @click="submitId">{{
$t("上 传")
}}</el-button>
<el-button @click="attestationShow = false">{{
$t("取 消")
}}</el-button>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="$t('营业执照')" name="2"> <el-tab-pane :label="$t('营业执照')" name="2">
<div style="width: 500px;padding:0 40px;box-sizing: border-box;"> <div style="width: 500px; padding: 0 40px; box-sizing: border-box">
<el-form :disabled="modifyLicense && [2,3].includes(enterpriseFrom.status)" :rules="rulesEnterprise" <el-form
:model="enterpriseFrom" label-position="left" ref="formEnter" label-width="100px"> :disabled="
modifyLicense && [2, 3].includes(enterpriseFrom.status)
"
:rules="rulesEnterprise"
:model="enterpriseFrom"
label-position="left"
ref="formEnter"
label-width="100px"
>
<el-form-item :label="$t('企业名称')" prop="name"> <el-form-item :label="$t('企业名称')" prop="name">
<el-input v-model="enterpriseFrom.name"></el-input> <el-input v-model="enterpriseFrom.name"></el-input>
</el-form-item> </el-form-item>
...@@ -176,40 +387,102 @@ ...@@ -176,40 +387,102 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('证件照')" prop="img1"> <el-form-item :label="$t('证件照')" prop="img1">
<div> <div>
<el-input readonly style="margin-bottom: 20px" v-model="enterpriseFrom.img1"></el-input> <el-input
<ImageUpload :isShowTip="false" :limit="1" v-model="enterpriseFrom.img1"></ImageUpload> readonly
style="margin-bottom: 20px"
v-model="enterpriseFrom.img1"
></el-input>
<ImageUpload
:isShowTip="false"
:limit="1"
v-model="enterpriseFrom.img1"
></ImageUpload>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('附件')"> <el-form-item :label="$t('附件')">
<el-input readonly v-model="enterpriseFrom.img2"></el-input> <el-input readonly v-model="enterpriseFrom.img2"></el-input>
<ImageUpload :isShowTip="false" :limit="1" v-model="enterpriseFrom.img2"></ImageUpload> <ImageUpload
:isShowTip="false"
:limit="1"
v-model="enterpriseFrom.img2"
></ImageUpload>
</el-form-item> </el-form-item>
<el-form-item v-if="modifyLicense && enterpriseFrom.status !== 0 " :label="$t('审核状态')"> <el-form-item
{{ getDictDatas(DICT_TYPE.AUDIT_STATUS)[enterpriseFrom.status].label }} v-if="modifyLicense && enterpriseFrom.status !== 0"
:label="$t('审核状态')"
>
{{
getDictDatas(DICT_TYPE.AUDIT_STATUS)[enterpriseFrom.status]
.label
}}
</el-form-item> </el-form-item>
<el-form-item v-if="[2,3].includes(enterpriseFrom.status) && modifyLicense " :label="$t('审核时间')"> <el-form-item
v-if="[2, 3].includes(enterpriseFrom.status) && modifyLicense"
:label="$t('审核时间')"
>
{{ parseTime(enterpriseFrom.auditTime) }} {{ parseTime(enterpriseFrom.auditTime) }}
</el-form-item> </el-form-item>
<el-form-item v-if="modifyLicense && enterpriseFrom.status !== 0" :label="$t('审核备注')"> <el-form-item
<el-input v-model="enterpriseFrom.auditRemark" :disabled="enterpriseFrom.status === 3" v-if="modifyLicense && enterpriseFrom.status !== 0"
type="textarea"></el-input> :label="$t('审核备注')"
>
<el-input
v-model="enterpriseFrom.auditRemark"
:disabled="enterpriseFrom.status === 3"
type="textarea"
></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div v-if="enterpriseFrom.status === 1" style="text-align: center;margin-top: 20px;"> <div
<el-button type="primary" @click="certificateVerificationFn(2)">{{ $t('审核通过') }}</el-button> v-if="enterpriseFrom.status === 1"
<el-button type="primary" @click="certificateVerificationFn(3)">{{ $t('审核不通过') }}</el-button> style="text-align: center; margin-top: 20px"
<el-button @click="attestationShow = false">{{ $t('取 消') }}</el-button> >
<el-button
type="primary"
@click="certificateVerificationFn(2)"
>{{ $t("审核通过") }}</el-button
>
<el-button
type="primary"
@click="certificateVerificationFn(3)"
>{{ $t("审核不通过") }}</el-button
>
<el-button @click="attestationShow = false">{{
$t("取 消")
}}</el-button>
</div> </div>
<div v-if="enterpriseFrom.status === 2 || enterpriseFrom.status === 3" <div
style="text-align: center;margin-top: 20px;"> v-if="
<el-button type="primary" v-if="modifyLicense" @click="modifyLicense = false">{{ $t('修 改') }} enterpriseFrom.status === 2 || enterpriseFrom.status === 3
"
style="text-align: center; margin-top: 20px"
>
<el-button
type="primary"
v-if="modifyLicense"
@click="modifyLicense = false"
>{{ $t("修 改") }}
</el-button> </el-button>
<el-button type="primary" v-else @click="setMemberUserUpdateEnterprise">{{ $t('提交审核') }}</el-button> <el-button
<el-button @click="attestationShow = false">{{ $t('取 消') }}</el-button> type="primary"
v-else
@click="setMemberUserUpdateEnterprise"
>{{ $t("提交审核") }}</el-button
>
<el-button @click="attestationShow = false">{{
$t("取 消")
}}</el-button>
</div> </div>
<div v-if="enterpriseFrom.status === 0" style="text-align: center;margin-top: 20px;"> <div
<el-button type="primary" @click="submit">{{ $t('上 传') }}</el-button> v-if="enterpriseFrom.status === 0"
<el-button @click="attestationShow = false">{{ $t('取 消') }}</el-button> style="text-align: center; margin-top: 20px"
>
<el-button type="primary" @click="submit">{{
$t("上 传")
}}</el-button>
<el-button @click="attestationShow = false">{{
$t("取 消")
}}</el-button>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
...@@ -220,122 +493,185 @@ ...@@ -220,122 +493,185 @@
</template> </template>
<script> <script>
import { import {
createAuditIdCard, deleteUser, createAuditIdCard,
deleteUser,
memberGetAuthEnterpriseInfo, memberGetAuthEnterpriseInfo,
memberGetAuthIdcardInfo, memberGetAuthIdcardInfo,
memberUserAuditEnterprise, memberUserAuditEnterprise,
memberUserAuditIdCard, memberUserAuditIdCard,
memberUserGet, memberUserUpdateEnterprise, memberUserGet,
memberUserUpdateEnterprise,
memberUserUpdateIdCard, memberUserUpdateIdCard,
operationLogApi, seTupdateBackletter, userCreateAuditEnterprise operationLogApi,
seTupdateBackletter,
userCreateAuditEnterprise,
} from "@/api/member/user"; } from "@/api/member/user";
import FileUpload from "@/components/FileUpload/index.vue"; import FileUpload from "@/components/FileUpload/index.vue";
import ImageUpload from "@/components/ImageUpload/index.vue"; import ImageUpload from "@/components/ImageUpload/index.vue";
import {DICT_TYPE, getDictDatas} from "@/utils/dict"; import { DICT_TYPE, getDictDatas } from "@/utils/dict";
export default { export default {
name: "memberDetails", name: "memberDetails",
components: {ImageUpload, FileUpload}, components: { ImageUpload, FileUpload },
data() { data() {
return { return {
// 表单校验 // 表单校验
rulesId: { rulesId: {
name: [{required: true, message: this.$t('用户昵称不能为空'), trigger: "blur"}], name: [
cardType: [{required: true, message: this.$t('证件类型不能为空'), trigger: "blur"}], {
cardNumber: [{required: true, message: this.$t('证件号码不能为空'), trigger: "blur"}], required: true,
img1: [{required: true, message: this.$t('身份正面照不能为空'), trigger: ['blur', 'change']}], message: this.$t("用户昵称不能为空"),
img2: [{required: true, message: this.$t('身份正面照不能为空'), trigger: ['blur', 'change']}], trigger: "blur",
},
],
cardType: [
{
required: true,
message: this.$t("证件类型不能为空"),
trigger: "blur",
},
],
cardNumber: [
{
required: true,
message: this.$t("证件号码不能为空"),
trigger: "blur",
},
],
img1: [
{
required: true,
message: this.$t("身份正面照不能为空"),
trigger: ["blur", "change"],
},
],
img2: [
{
required: true,
message: this.$t("身份正面照不能为空"),
trigger: ["blur", "change"],
},
],
}, },
rulesEnterprise: { rulesEnterprise: {
name: [{required: true, message: this.$t('企业名称不能为空'), trigger: "blur"}], name: [
legalName: [{required: true, message: this.$t('企业法人不能为空'), trigger: "blur"}], {
cardNumber: [{required: true, message: this.$t('证件号码不能为空'), trigger: "blur"}], required: true,
img1: [{required: true, message: this.$t('证件照不能为空'), trigger: ['blur', 'change']}], message: this.$t("企业名称不能为空"),
trigger: "blur",
},
],
legalName: [
{
required: true,
message: this.$t("企业法人不能为空"),
trigger: "blur",
},
],
cardNumber: [
{
required: true,
message: this.$t("证件号码不能为空"),
trigger: "blur",
},
],
img1: [
{
required: true,
message: this.$t("证件照不能为空"),
trigger: ["blur", "change"],
},
],
}, },
getDictDatas, getDictDatas,
DICT_TYPE, DICT_TYPE,
details: { details: {
"address": "", address: "",
"areaCode": "", areaCode: "",
"avatar": "", avatar: "",
"backLetterImg": "", backLetterImg: "",
"birthday": "", birthday: "",
"createTime": "", createTime: "",
"customerStatus": "", customerStatus: "",
"department": "", department: "",
"email": "", email: "",
"englishName": "", englishName: "",
"enterpriseAddress": "", enterpriseAddress: "",
"enterpriseAuditCreateTime": "", enterpriseAuditCreateTime: "",
"enterpriseAuditRemark": "", enterpriseAuditRemark: "",
"enterpriseAuditStatus": "", enterpriseAuditStatus: "",
"enterpriseAuditTime": "", enterpriseAuditTime: "",
"enterpriseBrand": "", enterpriseBrand: "",
"enterpriseDesc": "", enterpriseDesc: "",
"enterpriseName": "", enterpriseName: "",
"enterpriseNameEn": "", enterpriseNameEn: "",
"enterpriseStall": "", enterpriseStall: "",
"enterpriseWebsite": "", enterpriseWebsite: "",
"gender": "", gender: "",
"groupCount": "", groupCount: "",
"id": "", id: "",
"identityAuditCreateTime": "", identityAuditCreateTime: "",
"identityAuditRemark": "", identityAuditRemark: "",
"identityAuditStatus": "", identityAuditStatus: "",
"identityAuditTime": "", identityAuditTime: "",
"identityName": "", identityName: "",
"isDeal": "", isDeal: "",
"isSimplePassword": "", isSimplePassword: "",
"jobPosition": "", jobPosition: "",
"loginDate": "", loginDate: "",
"loginIp": "", loginIp: "",
"mobile": "", mobile: "",
"nickname": "", nickname: "",
"password": "", password: "",
"registDate": "", registDate: "",
"registerIp": "", registerIp: "",
"status": "" status: "",
}, },
publicObj: {}, publicObj: {},
guaranteeShow: false, guaranteeShow: false,
guaranteeUrl: '', guaranteeUrl: "",
operationLogFrom: { operationLogFrom: {
page: 1, page: 1,
row: 10, row: 10,
userId: undefined userId: undefined,
}, },
attestationShow: false, attestationShow: false,
modifyLicense: false, modifyLicense: false,
modifyIdCard: true,//修改身份证 modifyIdCard: true, //修改身份证
IdDetails: {}, IdDetails: {},
enterpriseFrom: {}, enterpriseFrom: {},
operationLogShow: false, operationLogShow: false,
activeName: "1", activeName: "1",
operationLogList: [], operationLogList: [],
totalLog: 0, totalLog: 0,
} };
}, },
created() { created() {
this.getDetails() this.getDetails();
}, },
methods: { methods: {
deleteFn(row) { deleteFn(row) {
const nickname = row.nickname; const nickname = row.nickname;
this.$modal.confirm(`${this.$t('是否确认删除昵称为{nickname}的会员?', {nickname})}`).then(function () { this.$modal
return deleteUser(row.id) .confirm(
}).then(res => { `${this.$t("是否确认删除昵称为{nickname}的会员?", { nickname })}`
this.$message.success(this.$t('删除成功')) )
this.$router.back() .then(function () {
}).catch(() => { return deleteUser(row.id);
// this.$message.success(this.$t('删除失败')) })
} .then((res) => {
) this.$message.success(this.$t("删除成功"));
this.$router.back();
})
.catch(() => {
// this.$message.success(this.$t('删除失败'))
});
}, },
getDetails() { getDetails() {
memberUserGet({id: this.$route.params.id}).then(r => { memberUserGet({ id: this.$route.params.id }).then((r) => {
console.log(r, 'rrrr') console.log(r, "rrrr");
this.details = r.data this.details = r.data;
}) });
}, },
// 保函证书 // 保函证书
guarantee(row) { guarantee(row) {
...@@ -347,19 +683,18 @@ export default { ...@@ -347,19 +683,18 @@ export default {
operationLogFn(row) { operationLogFn(row) {
this.publicObj = row; this.publicObj = row;
this.operationLogFrom.page = 1; this.operationLogFrom.page = 1;
this.operationLogFrom.userId = row.id this.operationLogFrom.userId = row.id;
this.operationLogShow = true; this.operationLogShow = true;
this.operationLogList = []; this.operationLogList = [];
this.getOperationLogList(); this.getOperationLogList();
}, },
getOperationLogList() { getOperationLogList() {
operationLogApi(this.operationLogFrom).then(r => { operationLogApi(this.operationLogFrom).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.operationLogList = r.data.list this.operationLogList = r.data.list;
this.totalLog = r.data.total this.totalLog = r.data.total;
} }
}) });
}, },
identityFn(row, val) { identityFn(row, val) {
this.attestationShow = true; this.attestationShow = true;
...@@ -380,51 +715,51 @@ export default { ...@@ -380,51 +715,51 @@ export default {
}, },
getIdentityDetails() { getIdentityDetails() {
this.resetId(); this.resetId();
memberGetAuthIdcardInfo({userId: this.publicObj.id}).then(r => { memberGetAuthIdcardInfo({ userId: this.publicObj.id }).then((r) => {
if (r.code === 0 && !!r.data) { if (r.code === 0 && !!r.data) {
this.IdDetails = r.data this.IdDetails = r.data;
} }
}) });
}, },
getEnterpriseFn() { getEnterpriseFn() {
this.resetEnterprise(); this.resetEnterprise();
memberGetAuthEnterpriseInfo({userId: this.publicObj.id}).then(r => { memberGetAuthEnterpriseInfo({ userId: this.publicObj.id }).then((r) => {
if (r.code === 0 && !!r.data) { if (r.code === 0 && !!r.data) {
this.enterpriseFrom = r.data this.enterpriseFrom = r.data;
} }
}) });
}, },
//身份证审核 //身份证审核
idCardAuditFn(val) { idCardAuditFn(val) {
let p = { let p = {
auditStatus: val, auditStatus: val,
userCardAuthId: this.IdDetails.id, userCardAuthId: this.IdDetails.id,
auditRemark: this.IdDetails.auditRemark auditRemark: this.IdDetails.auditRemark,
} };
memberUserAuditIdCard(p).then(r => { memberUserAuditIdCard(p).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.$message.success(this.$t('修改成功')); this.$message.success(this.$t("修改成功"));
this.getList() this.getList();
this.getIdentityDetails() this.getIdentityDetails();
} }
}) });
}, },
// 企业证书审核 // 企业证书审核
certificateVerificationFn(val) { certificateVerificationFn(val) {
let p = { let p = {
auditStatus: val, auditStatus: val,
userEnterpriseAuthId: this.enterpriseFrom.id, userEnterpriseAuthId: this.enterpriseFrom.id,
auditRemark: this.enterpriseFrom.auditRemark auditRemark: this.enterpriseFrom.auditRemark,
} };
memberUserAuditEnterprise(p).then(r => { memberUserAuditEnterprise(p).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.getList() this.getList();
this.getEnterpriseFn(); this.getEnterpriseFn();
} }
}) });
}, },
setMemberUserUpdateIdCard() { setMemberUserUpdateIdCard() {
this.$refs.formId.validate(async valid => { this.$refs.formId.validate(async (valid) => {
if (valid) { if (valid) {
let p = { let p = {
cardNumber: this.IdDetails.cardNumber, cardNumber: this.IdDetails.cardNumber,
...@@ -435,21 +770,21 @@ export default { ...@@ -435,21 +770,21 @@ export default {
userCardAuthId: this.IdDetails.id, userCardAuthId: this.IdDetails.id,
auditPass: true, auditPass: true,
}; };
memberUserUpdateIdCard(p).then(r => { memberUserUpdateIdCard(p).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.$message.success(this.$t('修改成功')) this.$message.success(this.$t("修改成功"));
if (p.auditPass === true) { if (p.auditPass === true) {
this.getIdentityDetails() this.getIdentityDetails();
} }
this.getList() this.getList();
this.modifyIdCard = true; this.modifyIdCard = true;
} }
}) });
} }
}) });
}, },
setMemberUserUpdateEnterprise() { setMemberUserUpdateEnterprise() {
this.$refs.formEnter.validate(async valid => { this.$refs.formEnter.validate(async (valid) => {
if (valid) { if (valid) {
let p = { let p = {
cardNumber: this.enterpriseFrom.cardNumber, cardNumber: this.enterpriseFrom.cardNumber,
...@@ -459,19 +794,19 @@ export default { ...@@ -459,19 +794,19 @@ export default {
name: this.enterpriseFrom.name, name: this.enterpriseFrom.name,
userEnterpriseAuthId: this.enterpriseFrom.id, userEnterpriseAuthId: this.enterpriseFrom.id,
auditPass: true, auditPass: true,
} };
memberUserUpdateEnterprise(p).then(r => { memberUserUpdateEnterprise(p).then((r) => {
if (r.code === 0) { if (r.code === 0) {
if (p.auditPass === true) { if (p.auditPass === true) {
this.getEnterpriseFn(); this.getEnterpriseFn();
} }
this.getList() this.getList();
this.modifyLicense = true; this.modifyLicense = true;
this.$message.success(this.$t('修改成功')); this.$message.success(this.$t("修改成功"));
} }
}) });
} }
}) });
}, },
submit() { submit() {
let p = { let p = {
...@@ -481,20 +816,20 @@ export default { ...@@ -481,20 +816,20 @@ export default {
legalName: this.enterpriseFrom.legalName, legalName: this.enterpriseFrom.legalName,
name: this.enterpriseFrom.name, name: this.enterpriseFrom.name,
userEnterpriseAuthId: this.enterpriseFrom.id, userEnterpriseAuthId: this.enterpriseFrom.id,
userId: this.publicObj.id userId: this.publicObj.id,
} };
userCreateAuditEnterprise(p).then(r => { userCreateAuditEnterprise(p).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.$message.success(this.$t('添加成功!')); this.$message.success(this.$t("添加成功!"));
this.enterpriseFrom.status = 2 this.enterpriseFrom.status = 2;
this.enterpriseFrom.auditTime = new Date().getTime() this.enterpriseFrom.auditTime = new Date().getTime();
this.getEnterpriseFn(); this.getEnterpriseFn();
this.getList() this.getList();
} }
}) });
}, },
submitId() { submitId() {
this.$refs.formId.validate(async valid => { this.$refs.formId.validate(async (valid) => {
if (valid) { if (valid) {
let p = { let p = {
cardNumber: this.IdDetails.cardNumber, cardNumber: this.IdDetails.cardNumber,
...@@ -503,19 +838,19 @@ export default { ...@@ -503,19 +838,19 @@ export default {
img2: this.IdDetails.img2, img2: this.IdDetails.img2,
name: this.IdDetails.name, name: this.IdDetails.name,
status: 2, status: 2,
userId: this.publicObj.id userId: this.publicObj.id,
}; };
createAuditIdCard(p).then(r => { createAuditIdCard(p).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.$message.success(this.$t('添加成功!')); this.$message.success(this.$t("添加成功!"));
this.IdDetails.status = 2 this.IdDetails.status = 2;
this.IdDetails.auditTime = new Date().getTime() this.IdDetails.auditTime = new Date().getTime();
this.getIdentityDetails(); this.getIdentityDetails();
this.getList() this.getList();
} }
}) });
} }
}) });
}, },
/** 表单重置 */ /** 表单重置 */
resetId() { resetId() {
...@@ -528,11 +863,11 @@ export default { ...@@ -528,11 +863,11 @@ export default {
id: 0, id: 0,
img1: undefined, img1: undefined,
img2: undefined, img2: undefined,
name: '', name: "",
status: 0, status: 0,
userId: 0 userId: 0,
} };
},//清空身份证 }, //清空身份证
resetEnterprise() { resetEnterprise() {
this.enterpriseFrom = { this.enterpriseFrom = {
auditRemark: undefined, auditRemark: undefined,
...@@ -545,21 +880,23 @@ export default { ...@@ -545,21 +880,23 @@ export default {
legalName: undefined, legalName: undefined,
name: undefined, name: undefined,
status: 0, status: 0,
userId: undefined userId: undefined,
} };
},//清空企业 }, //清空企业
setGuarantee() { setGuarantee() {
seTupdateBackletter({userId: this.publicObj.id, backLetter: this.guaranteeUrl}).then(r => { seTupdateBackletter({
userId: this.publicObj.id,
backLetter: this.guaranteeUrl,
}).then((r) => {
if (r.code === 0) { if (r.code === 0) {
this.publicObj.backLetterImg = this.guaranteeUrl; this.publicObj.backLetterImg = this.guaranteeUrl;
this.guaranteeShow = false; this.guaranteeShow = false;
this.$message.success(this.$t('保存成功')); this.$message.success(this.$t("保存成功"));
} }
}) });
}, },
} },
} };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="120px"
>
<el-form-item label="收款单编号" prop="fuhao">
<el-input
v-model="queryParams.receiptNo"
placeholder="收款单编号"
clearable
/>
</el-form-item>
<el-form-item label="订单号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
placeholder="订单号"
clearable
/>
</el-form-item>
<el-form-item label="提单号" prop="tidanNo">
<el-input
v-model="queryParams.tidanNo"
placeholder="提单号"
clearable
/>
</el-form-item>
<el-form-item label="创建人" prop="fuhao">
<el-input
v-model="queryParams.fuhao"
placeholder="创建人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="fuhao">
<el-date-picker
v-model="queryParams.sDate"
type="month"
style="width: 150px"
value-format="yyyy-MM"
clearable
placeholder="请输起始月"
/>
<el-date-picker
v-model="queryParams.eDate"
type="month"
style="width: 150px"
value-format="yyyy-MM"
clearable
placeholder="请输截止月"
/>
</el-form-item>
<el-form-item label="提交审批时间" prop="titleZh">
<el-date-picker
v-model="queryParams.sDate"
type="month"
style="width: 150px"
value-format="yyyy-MM"
clearable
placeholder="请输起始月"
/>
<el-date-picker
v-model="queryParams.eDate"
type="month"
style="width: 150px"
value-format="yyyy-MM"
clearable
placeholder="请输截止月"
/>
</el-form-item>
<el-form-item label="审批通过时间" prop="titleZh">
<el-date-picker
v-model="queryParams.sDate"
type="month"
style="width: 150px"
value-format="yyyy-MM"
clearable
placeholder="请输起始月"
/>
<el-date-picker
v-model="queryParams.eDate"
type="month"
style="width: 150px"
value-format="yyyy-MM"
clearable
placeholder="请输截止月"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
@click="handleAdd"
v-hasPermi="['report:vz:create']"
>
{{ $t("批量提交审核") }}</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
v-show="false"
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['my:test:export']"
>
{{ $t("导出") }}</el-button
>
</el-col>
<el-col :span="1.5"> </el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table
ref="multipleTable"
v-loading="loading"
:data="list"
border
row-key="id"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50" :reserve-selection="true">
</el-table-column>
<el-table-column
:label="$t('序号')"
type="index"
align="center"
width="50"
></el-table-column>
<el-table-column
:label="$t('收款单编号')"
align="center"
prop="receiptNo"
>
<template slot-scope="scope">
<span style="color: #1890ff" @click="paymentDetail1(scope.row)">{{
scope.row.receiptNo
}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('订单编号')" align="center" prop="orderNo">
<template slot-scope="scope">
<span style="color: #1890ff" @click="paymentDetail2(scope.row)">{{
scope.row.orderNo
}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('提单编号')" align="center" prop="tidanNo">
<template slot-scope="scope">
<span style="color: #1890ff" @click="paymentDetail3(scope.row)">{{
scope.row.tidanNo
}}</span>
</template>
</el-table-column>
<el-table-column
:label="$t('收款账户')"
align="center"
prop="accountName"
/>
<el-table-column :label="$t('实收金额')" align="center" prop="amount" />
<el-table-column :label="$t('实收币种')" align="center" prop="marks">
<template slot-scope="scope">
{{ getCurrencyLabel(scope.row.currencyId) }}
</template>
</el-table-column>
<el-table-column :label="$t('汇率')" align="center" prop="rate" />
<el-table-column align="center" prop="writeOffAmount">
<template #header>
{{ $t("兑核销基准金额") }}{{ getCurrencyLabel(showCurrencyId) }}
</template>
</el-table-column>
<el-table-column :label="$t('实收日期')" align="center" prop="amountDate">
</el-table-column>
<el-table-column :label="$t('水单号')" align="center" prop="billNo" />
<el-table-column :label="$t('水单附件')" align="center" prop="attr">
<template slot-scope="scope" v-if="scope.row.attr">
<div v-for="(v, i) in scope.row.attr" :key="i">
<el-link :href="v.url" type="primary" target="_blank">{{
v.name
}}</el-link>
</div>
</template>
</el-table-column>
<el-table-column :label="$t('状态')" align="center" prop="status">
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.RECEIPT_ITEM_STATE"
:value="scope.row.status"
/>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" width="200">
<template slot-scope="scope">
<el-button
v-if="scope.row.status == 0"
v-hasPermi="['ecw:payment:detail:delete']"
type="text"
@click="deleteClick(scope.row)"
>{{ $t("删除") }}</el-button
>
<el-button
v-if="scope.row.status == 0"
type="text"
@click="detailClick(scope.row)"
v-hasPermi="['ecw:payment:detail:detail']"
>{{ $t("详情") }}</el-button
>
<el-button
v-if="scope.row.status == 0"
type="text"
@click="
$router.push(`bankDetail?id=` + id + `&bankId=` + scope.row.id)
"
v-hasPermi="['ecw:payment:detail:writeOff']"
>{{ $t("核销") }}</el-button
>
<el-button
v-if="scope.row.status == 1"
type="text"
@click="showCancel(scope.$index)"
v-hasPermi="['ecw:payment:detail:cancelWriteOff']"
>{{ $t("反核销") }}</el-button
>
<el-button
v-if="scope.row.status == 0"
type="text"
@click="editClick(scope.row)"
v-hasPermi="['ecw:payment:detail:bankEdit']"
>{{ $t("编辑") }}</el-button
>
<el-button
v-if="scope.row.status == 2"
type="text"
@click="cancelClick(scope.$index, 1)"
v-hasPermi="['ecw:payment:detail:cancelDetailApproval']"
>{{ $t("取消审核") }}</el-button
>
<el-button
v-if="scope.row.status == 3"
type="text"
@click="cancelClick(scope.$index, 2)"
v-hasPermi="['ecw:payment:detail:cancelWriteOffNo']"
>{{ $t("取消反核销审核") }}</el-button
>
<el-button
v-if="scope.row.status == 3 || scope.row.status == 2"
type="text"
@click="
$router.push(`/bpm/process-instance/detail?id=` + scope.row.bmpId)
"
v-hasPermi="['ecw:payment:detail:approval']"
>{{ $t("审核详情") }}</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="1V=" prop="vz">
<el-input v-model="form.vz" placeholder="" style="width: 100px" />
<el-input
v-model="form.fuhao"
style="width: 100px"
placeholder="基础单位"
readonly="true"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { getPageList, test } from "@/api/report/bankReceiptDetail";
import Treeselect from "@riophae/vue-treeselect";
import "@/assets/styles/vue-treeselect.css";
//弹出消息框
import { MessageBox } from "element-ui";
//日期库函数
import dayjs from "dayjs";
import { getCurrencyPage } from "@/api/ecw/currency";
//2024-05-14 银行收款明细列表
export default {
name: "ReportBankReceiptDetailsIndex",
components: {
Treeselect,
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
list: [],
// 弹出层标题
title: "",
//是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10,
receiptNo: undefined, //收款单编号
orderNo: undefined, //订单编号
tidanNo: undefined, //提单编号
},
currencyList: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 表单参数
form: {},
// 表单校验
rules: {
vz: [
{
required: true,
message: this.$t("V值不能为空"),
trigger: "blur",
},
],
},
};
},
async created() {
// 获取汇率
await getCurrencyPage(this.params).then(
(res) => (this.currencyList = res.data.list)
);
this.getList();
},
computed: {
showCurrencyId() {
let fieldList = [];
let groupList = [];
this.list.map((element) => {
if (fieldList.indexOf(element["currencyId"]) === -1) {
fieldList.push(element["currencyId"]);
}
});
for (let i = 0; i < fieldList.length; i++) {
let arr = this.list.filter((element) => {
return element["currencyId"] === fieldList[i];
});
groupList.push({
currencyId: arr[0].currencyId,
list: arr,
});
}
if (groupList.length === 1) return groupList[0].currencyId;
else return 1;
},
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
// 执行查询
getPageList(params).then((response) => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
id: undefined,
titleZh: undefined, //运输方式
fuhao: undefined, //基础单位
vz: undefined, //v值
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
/*
this.reset();
this.open = true;
this.title = "添加V值";*/
test(1).then((response) => {
alert(response.data);
});
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id;
getModel(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改V值";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (!valid) {
return;
}
// 修改的提交
if (this.form.id != null) {
update(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
create(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
paymentDetail1(row) {
//到收款单详情 lanbm 2024-05-18 add
const id = row.receiptId;
return this.$router.push("/financial/receiptDetail?id=" + id);
},
paymentDetail2(row) {
//到订单详情 lanbm 2024-05-18 add
const id = row.id;
return this.$router.push("/financial/receiptDetail?id=" + id);
},
paymentDetail3(row) {
//到提档详情 lanbm 2024-05-18 add
const id = row.id;
return this.$router.push("/financial/receiptDetail?id=" + id);
},
getCurrencyLabel(id) {
let label = this.currencyList.filter((item) => item.id == id);
if (label.length > 0)
return this.$i18n.locale == "zh_CN"
? label[0].titleZh
: label[0].titleEn;
return "";
},
handleSelectionChange(selection) {
//表格多选函数 lanbm 2024-05-20 add
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal
.confirm("是否确认删除选中数据项?")
.then(function () {
return del(id);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
// 执行导出
this.$modal
.confirm("是否确认导出所有测试数据项?")
.then(() => {
this.exportLoading = true;
return exportExcel(params);
})
.then((response) => {
this.$download.excel(response, "${table.classComment}.xls");
this.exportLoading = false;
})
.catch(() => {});
},
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id: node.id,
label: node.name,
children: node.children,
};
},
},
};
</script>
\ No newline at end of file
...@@ -465,12 +465,9 @@ ...@@ -465,12 +465,9 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<WarehouseDetail <WarehouseDetail-detail :order="order" :orderItemId="showWarehouseInItemId"
:orderId="showWarehouseInItemId" v-if="showWarehouseInItemId" @close="showWarehouseInItemId=null">
:type="type" </WarehouseDetail-detail>
v-if="showWarehouseInItemId"
@close="showWarehouseInItemId = null"
></WarehouseDetail>
</div> </div>
</template> </template>
...@@ -484,6 +481,7 @@ import { getListPage, exportExcel,getStatisticalSummary } from "@/api/report/sal ...@@ -484,6 +481,7 @@ import { getListPage, exportExcel,getStatisticalSummary } from "@/api/report/sal
import { getCurUserPermission } from "@/api/report/EcwReportPermission"; import { getCurUserPermission } from "@/api/report/EcwReportPermission";
import { getAllChannelList, getChannelList } from "@/api/ecw/channel"; import { getAllChannelList, getChannelList } from "@/api/ecw/channel";
import { listSimpleDepts } from "@/api/system/dept"; import { listSimpleDepts } from "@/api/system/dept";
import {getOrder} from "@/api/ecw/order";
//入仓记录页面 //入仓记录页面
import WarehouseDetail from "@/views/ecw/order/components/WarehouseDetail"; import WarehouseDetail from "@/views/ecw/order/components/WarehouseDetail";
...@@ -563,6 +561,7 @@ export default { ...@@ -563,6 +561,7 @@ export default {
objEcwReportPermission: {}, objEcwReportPermission: {},
DeptEx: { id: undefined, name: undefined, parentId: undefined }, DeptEx: { id: undefined, name: undefined, parentId: undefined },
showWarehouseInItemId: undefined, showWarehouseInItemId: undefined,
order: null,
type: 1, type: 1,
StatisticalSummary:{ StatisticalSummary:{
sumBox:0, sumBox:0,
...@@ -685,9 +684,10 @@ export default { ...@@ -685,9 +684,10 @@ export default {
}, },
// 显示入仓记录 // 显示入仓记录
showWarehouseLogs(row, type) { showWarehouseLogs(row, type) {
debugger; getOrder(row.orderId).then((response) => {
this.type = type; this.order = response.data;
this.showWarehouseInItemId = row.orderId; this.showWarehouseInItemId = row.orderItemId;
});
}, },
/** 查询部门下拉树结构 + 岗位下拉 */ /** 查询部门下拉树结构 + 岗位下拉 */
getTreeselect() { getTreeselect() {
......
...@@ -45,7 +45,11 @@ ...@@ -45,7 +45,11 @@
:normalizer="normalizer" :normalizer="normalizer"
/> />
</el-form-item> </el-form-item>
<el-form-item label="客户经理" prop="salesmanid" v-show="showCustomsManage"> <el-form-item
label="客户经理"
prop="salesmanid"
v-show="showCustomsManage"
>
<user-selector <user-selector
manage manage
v-model="queryParams.salesmanid" v-model="queryParams.salesmanid"
...@@ -71,8 +75,12 @@ ...@@ -71,8 +75,12 @@
<div class="card-panel-text"> <div class="card-panel-text">
{{ $t("业绩总览 Total") }} {{ $t("业绩总览 Total") }}
</div> </div>
<div class="card-panel-num">{{ allsumvolume }}</div> <div class="card-panel-num">
<div style="text-align: right">同比:13%</div> {{ SalesReportCountList1.curValue }}V
</div>
<div style="text-align: right">
同比:{{ SalesReportCountList1.tbShow }}
</div>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -85,8 +93,12 @@ ...@@ -85,8 +93,12 @@
<div class="card-panel-text"> <div class="card-panel-text">
{{ $t("海运拼柜") }} {{ $t("海运拼柜") }}
</div> </div>
<div class="card-panel-num">{{ sumvolume1 }}</div> <div class="card-panel-num">
<div style="text-align: right">同比:13%</div> {{ SalesReportCountList2.curValue }}M3
</div>
<div style="text-align: right">
同比:{{ SalesReportCountList2.tbShow }}
</div>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -99,8 +111,12 @@ ...@@ -99,8 +111,12 @@
<div class="card-panel-text"> <div class="card-panel-text">
{{ $t("专线空运") }} {{ $t("专线空运") }}
</div> </div>
<div class="card-panel-num">{{ sumweight3 }}</div> <div class="card-panel-num">
<div style="text-align: right">同比:13%</div> {{ SalesReportCountList3.curValue }}KG
</div>
<div style="text-align: right">
同比:{{ SalesReportCountList3.tbShow }}
</div>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -115,8 +131,12 @@ ...@@ -115,8 +131,12 @@
<div class="card-panel-text"> <div class="card-panel-text">
{{ $t("成交总览 Total") }} {{ $t("成交总览 Total") }}
</div> </div>
<div class="card-panel-num">{{ sumCustomerCount }}</div> <div class="card-panel-num">
<div style="text-align: right">同比:13%</div> {{ sumCustomerObject.sumCustomerCount }}
</div>
<div style="text-align: right">
同比:{{ sumCustomerObject.tbShow }}
</div>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -129,8 +149,12 @@ ...@@ -129,8 +149,12 @@
<div class="card-panel-text"> <div class="card-panel-text">
{{ $t("首次成交") }} {{ $t("首次成交") }}
</div> </div>
<div class="card-panel-num">{{ fisCustomerCount }}</div> <div class="card-panel-num">
<div style="text-align: right">同比:13%</div> {{ fisCustomerObject.sumCustomerCount }}
</div>
<div style="text-align: right">
同比:{{ fisCustomerObject.tbShow }}
</div>
</div> </div>
</div> </div>
</el-col> </el-col>
...@@ -150,7 +174,10 @@ import Treeselect from "@riophae/vue-treeselect"; ...@@ -150,7 +174,10 @@ import Treeselect from "@riophae/vue-treeselect";
import "@/assets/styles/vue-treeselect.css"; import "@/assets/styles/vue-treeselect.css";
import { listSimpleDepts } from "@/api/system/dept"; import { listSimpleDepts } from "@/api/system/dept";
//报表权限接口 //报表权限接口
import { getCurUserPermission,getDeptChild } from "@/api/report/EcwReportPermission"; import {
getCurUserPermission,
getDeptChild,
} from "@/api/report/EcwReportPermission";
import { import {
SalesReportCount, SalesReportCount,
FirstCustomerCount, FirstCustomerCount,
...@@ -184,8 +211,12 @@ function getLastYear() { ...@@ -184,8 +211,12 @@ function getLastYear() {
let year = date.getFullYear(); let year = date.getFullYear();
return year.toString(); return year.toString();
} }
function goPage() {
alert(11);
}
//2024-05-01合并 //2024-05-01合并
//https://2zmzrd.axshare.com 报表原型地址
export default { export default {
name: "ReportSalesreportIndex", name: "ReportSalesreportIndex",
components: { components: {
...@@ -205,7 +236,7 @@ export default { ...@@ -205,7 +236,7 @@ export default {
}, },
height: { height: {
type: String, type: String,
default: "500px", default: "1000px",
}, },
autoResize: { autoResize: {
type: Boolean, type: Boolean,
...@@ -220,16 +251,17 @@ export default { ...@@ -220,16 +251,17 @@ export default {
exportLoading: false, exportLoading: false,
// 显示搜索条件 // 显示搜索条件
showSearch: true, showSearch: true,
showCustomsManage: true,//是否显示客户经理查询条件 showCustomsManage: true, //是否显示客户经理查询条件
showDept: true,//是否显示部门查询条件 showDept: true, //是否显示部门查询条件
chart: null, chart: null,
allsumvolume: undefined, //总V值 SalesReportCountList3: {},
sumvolume1: undefined, //海运拼柜 SalesReportCountList2: {},
sumweight3: undefined, //专线空运 SalesReportCountList1: {},
sumCustomerCount: undefined, //成交客户总数 salesReportRespAll: [],
fisCustomerCount: undefined, //首次成交客户户数 sumCustomerObject: {}, //成交客户总数
fisCustomerObject: {}, //首次成交客户户数
dateRangeCreateTime: [], dateRangeCreateTime: [],
SalesReportRespShow:[], SalesReportRespShow: [],
queryParams: { queryParams: {
salesmanid: undefined, //销售经理 salesmanid: undefined, //销售经理
deptid: undefined, //部门 deptid: undefined, //部门
...@@ -261,66 +293,214 @@ export default { ...@@ -261,66 +293,214 @@ export default {
//this.deptData.add //this.deptData.add
}); });
}, },
getCustomerTargetCount() {
CustomerTargetCount(this.queryParams).then((response) => {
this.sumCustomerCount = response.data;
});
},
getSalesReportCount() { getSalesReportCount() {
//获取运输方式统计数 lanbm 2024-04-01 add //获取运输方式统计数 lanbm 2024-04-01 add
//数据遍历参考地址
//https://blog.csdn.net/weixin_49826079/article/details/132172368
SalesReportCount(this.queryParams).then((response) => { SalesReportCount(this.queryParams).then((response) => {
//业绩总览 this.SalesReportCountList1 = response.data[0];
this.allsumvolume = response.data.allsumvolume; this.SalesReportCountList2 = response.data[1];
//海运拼柜 this.SalesReportCountList3 = response.data[2];
this.sumvolume1 = response.data.sumvolume1;
//专线空运
this.sumweight3 = response.data.sumweight3;
}); });
}, },
getSalesReportCount() { getCustomerTargetCount() {
//获取运输方式统计数 lanbm 2024-04-01 add CustomerTargetCount(this.queryParams).then((response) => {
SalesReportCount(this.queryParams).then((response) => { this.sumCustomerObject = response.data;
//业绩总览
this.allsumvolume = response.data.allsumvolume;
//海运拼柜
this.sumvolume1 = response.data.sumvolume1;
//专线空运
this.sumweight3 = response.data.sumweight3;
}); });
}, },
getFirstCustomerCount() { getFirstCustomerCount() {
//获取首次成交客户数 lanbm 2024-04-01 add //获取首次成交客户数 lanbm 2024-04-01 add
FirstCustomerCount(this.queryParams).then((response) => { FirstCustomerCount(this.queryParams).then((response) => {
//首次成交客户数 //首次成交客户数
this.fisCustomerCount = response.data; this.fisCustomerObject = response.data;
}); });
}, },
initChart() { // 柱状图
var chartDom = this.$refs["mainBar"]; createChart() {
this.chart = echarts.init(chartDom, "macarons");
this.setOptions();
},
setOptions() {
this.loading = true;
getEChartData(this.queryParams).then((response) => { getEChartData(this.queryParams).then((response) => {
this.chart.setOption({ //图表参考网址
//https://blog.csdn.net/m0_65983287/article/details/133909409
let salesReportRespAll1 = response.data.salesReportRespAll;
var chartDom = this.$refs["mainBar"];
this.chart = echarts.init(chartDom, "macarons");
this.chart.on("click", (params) => {
if (this.isRight() == false) return;
let p = {};
if (params.componentType === "title") {
this.$router.push({
path: "/report/sales_analysis",
query: p,
});
return;
}
/*
this.queryParams.salesmanid = parseInt(
this.resultList[params.dataIndex].salesmanid
);
this.queryParams.number = this.resultList[params.dataIndex].number;
Object.assign(p, this.queryParams);*/
this.$router.push({
path: "/report/sales_analysis",
query: p,
});
});
this.option = {
title: { title: {
text: "月度业绩分布", text: "月度业绩分布", //主标题
link: "", //主标题链接
target: "self", //窗口打开方式self本窗口,blank新窗口
textStyle: {
//color: "skyblue", //主标题颜色
fontSize: "20", //主标题大小
},
subtext: "更多...", //副标题
sublink: "javascript:goPage()", //副标题链接
subtarget: "self", //self/blank
subtextStyle: {
//color: "#0f0",
fontSize: "10",
textAlign: "right",
},
left: "left", //位置
show: true, //是否显示true/false
textAlign: "left", //水平对齐:auto/left,right,center
textVerticalAlign: "auto", //垂直对齐:auto,top,middle,bottom
}, },
legend: {}, tooltip: {
grid: { trigger: "axis",
left: "3%", axisPointer: {
right: "4%", type: "shadow",
bottom: "3%", },
containLabel: true, formatter: function (params) {
//params 是一个数组,数组中每个元素代表一个系列的数据信息
var result = "";
params.forEach(function (item) {
let vR = salesReportRespAll1.filter(
(r) => r.strMonth === item.name
);
result ="统计月份:"+ item.name + "<br/>";
result +=
"Total:" +
vR[0].curValue +
" 同比:" +
vR[0].tbShow +
",环比:" +
vR[0].hbShow +
"<br/>";
result +=
"海运拼柜:" +
vR[0].curValue1 +
" 同比:" +
vR[0].tbShow1 +
",环比:" +
vR[0].hbShow1 +
"<br/>";
result +=
"专线空运:" +
vR[0].curValue3 +
" 同比:" +
vR[0].tbShow3 +
",环比:" +
vR[0].hbShow3 +
"<br/>";
});
return result;
},
}, },
legend: {},
xAxis: { xAxis: {
type: "value", type: "value",
boundaryGap: [0, 0.5], boundaryGap: [0, 0.5],
}, },
yAxis: response.data.objyAxis, yAxis: {
series: response.data.obSseries, type: "category",
}); data: response.data.objyAxis.data,
axisLabel: {
showMaxLabel: true,
interval: 0,
rotate: 0,
},
},
grid: {
show: false,
top: "5%",
right: "5%",
bottom: "5%",
left: "10%",
},
series: [
{
name: "Total",
data: response.data.obSseries[0].data,
type: "bar",
barGap: "0px",
label: {
show: true,
position: "right", //在上方显示
textStyle: {
//数值样式
fontSize: "16px",
color: "#999",
},
formatter: function (d) {
return d.data;
},
},
},
{
name: "海运拼柜",
data: response.data.obSseries[1].data,
type: "bar",
barGap: "0px",
label: {
show: true,
position: "right", //在上方显示
textStyle: {
//数值样式
fontSize: "16px",
color: "##999",
},
formatter: function (d) {
/*
let sum =
(
(d.data / (d.data + res[d.dataIndex].maleCount)) *
100
).toFixed(2) + "%";
*/
return d.data;
},
},
},
{
name: "专线空运",
data: response.data.obSseries[2].data,
type: "bar",
barGap: "0px",
label: {
show: true,
position: "right", //在上方显示
textStyle: {
//数值样式
fontSize: "16px",
color: "##999",
},
formatter: function (d) {
/*
let sum =
(
(d.data / (d.data + res[d.dataIndex].maleCount)) *
100
).toFixed(2) + "%";
*/
return d.data;
},
},
},
],
};
this.option && this.chart.setOption(this.option);
}); });
}, },
isChinese() { isChinese() {
...@@ -357,11 +537,11 @@ export default { ...@@ -357,11 +537,11 @@ export default {
//获取成交客户数,出重结果 //获取成交客户数,出重结果
this.getCustomerTargetCount(); this.getCustomerTargetCount();
//获取权限后再初始化统计图表 //获取权限后再初始化统计图表
this.initChart(); //this.initChart();
this.createChart();
this.loading = false; this.loading = false;
}); });
}, },
getList() {},
resetQuery() { resetQuery() {
this.queryParams = { this.queryParams = {
salesmanid: undefined, //销售经理 salesmanid: undefined, //销售经理
...@@ -408,7 +588,9 @@ export default { ...@@ -408,7 +588,9 @@ export default {
} }
return true; return true;
}, },
handleAdd() {}, handleAdd() {
alert(1);
},
handleExport() {}, handleExport() {},
/** 查询部门下拉树结构 + 岗位下拉 */ /** 查询部门下拉树结构 + 岗位下拉 */
getTreeselect() { getTreeselect() {
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
> >
{{ $t("新增") }}</el-button {{ $t("新增") }}</el-button
> >
<el-button type="primary" @click="test" v-show="true">测试</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
...@@ -64,7 +65,7 @@ ...@@ -64,7 +65,7 @@
type="primary" type="primary"
plain plain
icon="el-icon-plus" icon="el-icon-plus"
v-show="true" v-show="false"
size="mini" size="mini"
@click="TestFun" @click="TestFun"
> >
...@@ -353,12 +354,19 @@ export default { ...@@ -353,12 +354,19 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}, },
test() {
//单元测试函数
var p = 12;
test(p).then((response) => {
this.$modal.msgSuccess("测试成功");
});
},
TestFun() { TestFun() {
var bR= dayjs('2024-05-11').isBefore(dayjs('2024-05-12')); var bR = dayjs("2024-05-11").isBefore(dayjs("2024-05-12"));
alert(bR); alert(bR);
//获取当前日期 //获取当前日期
var now = dayjs().format('YYYY-MM-DD dddd HH:mm:ss.SSS A'); var now = dayjs().format("YYYY-MM-DD dddd HH:mm:ss.SSS A");
MessageBox(now); MessageBox(now);
//dayjs("2019-01-25").toArray(); // [ 2019, 0, 25, 0, 0, 0, 0 ] //dayjs("2019-01-25").toArray(); // [ 2019, 0, 25, 0, 0, 0, 0 ]
var dJs = dayjs("2019-01-25").toJSON(); //'2019-01-25T02:00:00.000Z' var dJs = dayjs("2019-01-25").toJSON(); //'2019-01-25T02:00:00.000Z'
......
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