Commit e94e2994 authored by dragondean@qq.com's avatar dragondean@qq.com
parents 01b7b634 b44291dd
......@@ -273,6 +273,14 @@ export function getPayableInfoByIds(query) {
params: query
})
}
//获取佣金应付款详情
export function getCommissionPayable(params){
return request({
url:'/ecw/commission-payable/get',
method:"get",
params
})
}
// 创建付款单
export function createPayment(data) {
......@@ -282,6 +290,14 @@ export function createPayment(data) {
data: data
})
}
// 创建佣金订单
export function commissionPayment(data){
return request({
url:'/ecw/commission-payment/create',
method:'post',
data
})
}
// 获取付款单列表
export function getPaymentList(query) {
......@@ -318,6 +334,14 @@ export function updatePayment(data) {
data: data
})
}
// 更新佣金付款单
export function commissionPaymentUpdate(data){
return request({
url:'/ecw/commission-payment/update',
method:'put',
data
})
}
// 删除付款单
export function deletePayment(id) {
......@@ -359,3 +383,218 @@ export function paymentVerifyCancel(id) {
method: 'GET'
})
}
//获取佣金应付款
export function payablePage(params){
return request({
url:'/ecw/commission-payable/page',
method:'get',
params
})
}
//获取佣金付款单
export function commissionPaymentPage(params){
return request({
url:'/ecw/commission-payment/page',
method:'get',
params
})
}
// 根据流程主键获取付款单流程审核信息
export function getPaymentApprove(id) {
return request({
url: '/ecw/payment/getPaymentApprove?id='+id,
method: 'GET'
})
}
// 根据流程主键获取收款单流程审核信息
export function getReceiptApprove(id) {
return request({
url: '/ecw/receipt/getReceiptApprove?id='+id,
method: 'GET'
})
}
// 收款单核销
export function financeReceiptWriteOff(query) {
return request({
url: '/ecw/receipt/financeReceiptWriteOff',
method: 'POST',
data: query
})
}
// 收款单银行明细核销
export function financeReceiptItemWriteOff(query) {
return request({
url: '/ecw/receipt-item/financeReceiptItemWriteOff',
method: 'POST',
data: query
})
}
// 收款单银行明细核销反审核
export function financeReceiptItemWriteOffNo(query) {
return request({
url: '/ecw/receipt-item/financeReceiptItemWriteOffNo',
method: 'POST',
data: query
})
}
// 收款单反审核
export function financeApproveNo(query) {
return request({
url: '/ecw/receipt/financeApproveNo',
method: 'POST',
data: query
})
}
// 收款单反核销
export function financeReceiptWriteOffNo(query) {
return request({
url: '/ecw/receipt/financeReceiptWriteOffNo',
method: 'POST',
data: query
})
}
// 收款单取消审核
export function cancelFinanceReceiptApproval(query) {
return request({
url: '/ecw/receipt/cancelFinanceReceiptApproval',
method: 'POST',
data: query
})
}
// 取消收款单反审核
export function cancelFinanceReceiptApprovalNo(query) {
return request({
url: '/ecw/receipt/cancelFinanceReceiptApprovalNo',
method: 'POST',
data: query
})
}
// 取消收款单反核销
export function cancelFinanceReceiptWriteOffNo(query) {
return request({
url: '/ecw/receipt/cancelFinanceReceiptWriteOffNo',
method: 'POST',
data: query
})
}
// 取消收款明细核销
export function cancelFinanceReceiptItemWriteOff(query) {
return request({
url: '/ecw/receipt-item/cancelFinanceReceiptItemWriteOff',
method: 'POST',
data: query
})
}
// 取消收款明细反核销
export function cancelFinanceReceiptItemWriteOffNo(query) {
return request({
url: '/ecw/receipt-item/cancelFinanceReceiptItemWriteOffNo',
method: 'POST',
data: query
})
}
// 取消审核
export function cancelFinancePaymentApproval(data){
return request({
url:'/ecw/payment/cancelFinancePaymentApproval',
method:'post',
data
})
}
// 取消付款单反审核
export function cancelFinancePaymentApprovalNo(data){
return request({
url:'/ecw/payment/cancelFinancePaymentApprovalNo',
method:'post',
data
})
}
// 取消付款单核销
export function cancelFinancePaymentWriteOff(data){
return request({
url:'/ecw/payment/cancelFinancePaymentWriteOff',
method:'post',
data
})
}
export function cancelFinancePaymentWriteOffNo(data){
return request({
url:'/ecw/payment/cancelFinancePaymentWriteOffNo',
method:'post',
data
})
}
//删除佣金付款单
export function commissionPaymentDelete(params){
return request({
url:'/ecw/commission-payment/delete',
method:'delete',
params
})
}
//反审核佣金付款单
export function commissionPaymentVerifyCancel(data){
return request({
url:'/ecw/commission-payment/verifyCancel',
method:'post',
data
})
}
// 佣金付款单核销
export function commissionPaymentVerification(data){
return request({
url:'/ecw/commission-payment/verification',
method:'post',
data
})
}
//付款单反核销申请
export function commissionPaymentVerificationCancel(data){
return request({
url:'/ecw/commission-payment/verificationCancel',
method:'post',
data
})
}
// 取消付款单反审核
export function commissionPaymentCancelFinancePaymentApprovalNo(data){
return request({
url:'/ecw/commission-payment/cancelFinancePaymentApprovalNo',
method:'post',
data
})
}
// 取消付款单核销
export function commissionPaymentCancelFinancePaymentWriteOff(data){
return request({
url:'/ecw/commission-payment/cancelFinancePaymentWriteOff',
method:'post',
data
})
}
// 取消付款单反核销
export function commissionPaymentCancelFinancePaymentWriteOffNo(data){
return request({
url:'/ecw/commission-payment/cancelFinancePaymentWriteOffNo',
method:'post',
data,
})
}
......@@ -212,6 +212,15 @@ export function saveOrUpdateOrderLocation(data){
})
}
// 入仓修改储位
export function updateWarehouseInLocation(data){
return request({
url: '/order/location/update-warehouse-in-location',
method: 'put',
data
})
}
// 获取入仓修改审批单详情-审批使用
export function getWarehouseUpdateApprovalInfo(id) {
return request({
......@@ -664,4 +673,4 @@ export function operateLogPage(params){
method: 'get',
params: params
})
}
\ No newline at end of file
}
<template>
<div>
<div class="area-code">{{ selected.join(', ') }}</div>
<el-button v-show="!readonly" type="primary" size="mini" @click="handleOpen">选择</el-button>
<el-dialog
title="提示"
:visible.sync="dialogVisible"
width="30%"
append-to-body
:before-close="handleClose">
<el-tabs v-model="activeName" type="card" @tab-click="activeWarehouse = {}">
<el-tab-pane :label="item.name" :name="'' + index" v-for="(item, index) in area" :key="index">
<div>
<div style="text-align: center">{{$t('区域')}}</div>
<div style="background-color: #efefef;padding: 10px 10px 0;border: #dcdcdc solid 1px;border-radius: 2px">
<el-row :gutter="20">
<el-col :span="12" v-for="warehouse in item.children" :key="warehouse.id">
<div
class="warehouse-block"
:class="{'warehouse-block-selected': warehouse.selected, 'warehouse-block-active': warehouse.id === activeWarehouse.id}"
@click="handleSelectWarehouse(warehouse)"
>
{{ warehouse.name }}
</div>
</el-col>
</el-row>
</div>
</div>
<div>
<div style="text-align: center">{{$t('仓位')}}</div>
<div class="position-group">
<div class="position" v-for="position in activeWarehouse.positionList" :key="position.id" @click="handleSelectPosition(position)">
<template v-if="position.children">
<div
class="position-item"
v-for="item in position.children"
:key="item.id"
@click.stop="handleSelectPositionChild(item)"
:class="{'position-item-active': item.selected}">
{{ item.code }}
</div>
</template>
<template v-else>
<div
class="position-item"
:class="{'position-item-active': position.selected}">
{{ position.code }}
</div>
</template>
</div>
</div>
</div>
<el-divider></el-divider>
{{$t('已选择')}}:{{ selected.join(', ') }}
<el-divider></el-divider>
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="handleSave">确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {getByWarehouseId} from "@/api/ecw/warehouseArea"
import { updateWarehouseInLocation } from "@/api/ecw/order"
export default {
name: "WarehouseAreaSelect",
props: {
value: {
type: Array,
default: () => []
},
orderId: Number,
orderItemId: Number,
// 入仓记录id
warehouseInId: Number,
warehouseId: {
type: Number,
default: undefined
},
// 是否入仓修改
isEditing: {
type: Boolean,
default: false
},
readonly: {
type: Boolean,
default: false
}
},
data() {
return {
dialogVisible: false,
activeName: '0',
activeWarehouse: {},
area: [],
}
},
mounted() {
this.initArea()
},
computed: {
// code array
selected() {
const result = []
this.area?.forEach(e => {
// 仓库
e.children?.forEach(f => {
// 区域
if (f.selected) result.push(f.code)
else f.positionList?.forEach(g => {
// 位置
if (g.selected) result.push(f.code + g.code)
else if(g.children) g.children?.forEach(k => {
// 子位置
if (k.selected) result.push(f.code + k.code)
})
})
})
})
return result
},
inputValue(){
const result = []
this.area?.forEach(e => {
// 仓库
e.children?.forEach(f => {
// 区域
if (f.selected) result.push({
orderId: this.orderId,
wareId: f.pid,
areaId: f.id
})
else {
f.positionList?.forEach(g => {
// 位置
if (g.selected) result.push({
orderId: this.orderId,
wareId: g.domainId,
areaId: g.areaId,
locationId: g.id
})
else g.children?.forEach(k => {
// 子位置
if (k.selected) result.push({
orderId: this.orderId,
wareId: k.domainId,
areaId: k.areaId,
locationId: k.id
})
})
})
}
})
})
return result
}
},
methods: {
handleOpen(){
this.dialogVisible = true
this.initArea()
},
handleSave(){
this.$emit('input', this.inputValue)
this.dialogVisible = false
if (this.isEditing) {
this.$nextTick(() => {
const data = this.inputValue.map(e => {
return {
...e,
orderItemId: this.orderItemId,
warehouseInId: this.warehouseInId
}
})
updateWarehouseInLocation(data)
})
}
},
handleClose() {
this.dialogVisible = false
},
handleSelectWarehouse(warehouse) {
this.activeWarehouse = warehouse
if (!!warehouse.selected) {
warehouse.selected = false
return
} else if(this.activeWarehouseId !== warehouse.id) {
this.activeWarehouseId = warehouse.id
if (this.inputValue.find(e => e.areaId === warehouse.id)){
return
}
}
warehouse.selected = true
// 区域被选,清空该区域下的位置
if(warehouse.positionList) warehouse.positionList?.forEach(g => {
g.selected = false
g.children?.forEach(k => {
k.selected = false
})
})
},
handleSelectPositionChild(position) {
if (!!position.selected) {
position.selected = false
// 反选位置时,检查父区域下是否所有位置被反选,若是,选父区域
const parentAre = this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId)
if (!parentAre.selected) {
// 检查父区域下是否所有位置被反选
let hasSelected = false
parentAre.positionList?.forEach(g => {
// 位置
g.children?.forEach(k => {
// 子位置
if (k.selected) hasSelected = true
})
})
// 所有子位置被反选,选父区域
if (!hasSelected) parentAre.selected = true
}
} else {
position.selected = true
// 选位置时,父区域反选
this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId).selected = false
}
},
handleSelectPosition(position) {
if (!!position.selected) {
position.selected = false
} else {
position.selected = true
// 选位置时,父区域反选
this.area.find(e => e.id === position.domainId).children.find(f => f.id === position.areaId).selected = false
}
},
initArea(){
return getByWarehouseId({ warehouseId: this.warehouseId }).then(r => {
const area = r.data
area.forEach(e => {
// 仓库
e.children?.forEach(f => {
// 区域
f.selected = this.isSelected(e.id, f.id)
if(f.positionList) f.positionList.forEach(g => {
// 位置
g.selected = this.isSelected(e.id, f.id, g.id)
g.children?.forEach(k => {
// 子位置
k.selected = this.isSelected(e.id, f.id, k.id)
})
})
})
})
this.area = area
})
},
// 用于储位回显选中
isSelected(warehouse, area, position = 0){
return !!this.value.find(e => warehouse === e.wareId && area === e.areaId && position === e.locationId)
},
}
}
</script>
<style scoped>
.area-code{
display: inline-block;
margin-right: 15px;
}
.warehouse-block{
background-color: white;
border-radius: 5px;
height: 42px;
line-height: 42px;
text-align: center;
margin-bottom: 15px;
cursor: pointer;
transition: 0.5s;
box-shadow: #bfbfbf 3px 3px 14px 0;
user-select: none;
}
.warehouse-block:hover{
opacity: 0.9;
transition: 0.5s;
transform: scale(1.02);
box-shadow: #8f8f8f 7px 5px 14px 0;
}
.warehouse-block-active{
box-shadow: #b1a4cb 7px 5px 14px 0;
transform: scale(1.04);
background-color: #9ab7e1;
color: #ffffff;
}
.warehouse-block-selected{
color: #ffffff;
background-color: #4085e3;
}
.position-group{
display: flex;
background-color: #EFEFEF;
border: 1px #EFEFEF solid;
gap: 1px;
min-height: 64px;
flex-flow: wrap;
}
.position{
width: calc(20% - 1px);
height: 64px;
display: flex;
flex-direction: column;
gap: 1px;
user-select: none;
}
.position-item{
width: 100%;
background-color: #FFFFFF;
flex: 1;
cursor: pointer;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
}
.position-item:hover{
background-color: #d7dbe3;
}
.position-item-active{
background-color: #4085e3;
color: white;
}
.position-item-active:hover{
background-color: #4085e3;
opacity: 0.8;
}
</style>
......@@ -194,6 +194,7 @@ export const DICT_TYPE = {
ORDER_SPECIAL_NEEDS:'order_special_needs', // 订单特殊需求
ORDER_ABNORMAL_STATE:'order_abnormal_state',
TARGET_TYPE:'target_type',//部门业绩目标类型
RECEIPT_ITEM_STATE:'receipt_item_state',//收款单明细状态
// ========== 出货模块 ==========
BOX_SHIPPING_TRAILER_STATUS: 'shipping_trailer_status', // 拖车状态
BOX_SHIPPING_CUSTOMS_TYPE: 'shipping_customs_type', // 报关方式
......
......@@ -339,6 +339,48 @@ export default {
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//付款单审核
finance_payment_approve:{
component: () => import('@/views/ecw/financial/components/PaymentApproval'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单审核
finance_receipt_approve:{
component: () => import('@/views/ecw/financial/components/CollectionApproval'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单核销
finance_receipt_write_off:{
component: () => import('@/views/ecw/financial/components/CollectionWriteoff'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单反核销审核
finance_receipt_write_off_no:{
component: () => import('@/views/ecw/financial/components/CollectionApproval'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单核销反审核
finance_receipt_approve_no:{
component: () => import('@/views/ecw/financial/components/CollectionApproval'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单银行实收明细核销
finance_receipt_item_write_off:{
component: () => import('@/views/ecw/financial/components/CollectionBankDetail'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
//收款单银行实收反核销
finance_receipt_item_write_off_no:{
component: () => import('@/views/ecw/financial/components/CollectionBankDetail'),
id: this.processInstance.businessKey,
path: this.processInstance.processDefinition?.formCustomViewPath
},
}
console.log('formCustomViewPath', this.processInstance.processDefinition.formCustomViewPath.trim())
return map[this.processInstance.processDefinition.formCustomViewPath.trim()]
......
......@@ -2,7 +2,7 @@
<div>
<el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px">
<el-form-item :label="$t('代理商Agent')" prop="agentId">
<supplierSelect v-model="agentObj.agentId" :companyType="'1'" :placeholder="$t('请选择代理商')" :allSupplier="this.$attrs.allSupplier" />
<supplierSelect v-model="agentObj.agentId" :companyType="'1'" :areaType="1" :placeholder="$t('请选择代理商')" :allSupplier="this.$attrs.allSupplier" />
</el-form-item>
</el-form>
<el-row class="operate-button">
......
......@@ -26,7 +26,7 @@ export default {
getSuppliers() {
if (!this.companyType) return this.allSupplier;
return this.allSupplier.filter((item) =>
item.companyTypes.includes(this.companyType)
item.areaType == 1
);
},
},
......
......@@ -2,7 +2,7 @@
<div>
<el-form ref="subMaterialForm" :model="subMaterialObj" label-width="140px">
<el-form-item :label="$t('代理商AGENT')">
<supplierSelect v-model="subMaterialObj.agentId" :companyType="'1'" :placeholder="$t('请选择供应商')" :allSupplier="this.$attrs.allSupplier" />
<supplierSelect v-model="subMaterialObj.agentId" :placeholder="$t('请选择供应商')" :allSupplier="this.$attrs.allSupplier" disabled />
</el-form-item>
<el-form-item :label="$t('提单号M/BL NO.')" class="two-element">
<el-input v-model="subMaterialObj.blMblNo" :placeholder="$t('请输入提单号')"></el-input>
......@@ -24,19 +24,22 @@
<userSelect v-model="subMaterialObj.shipperId" :placeholder="$t('请选择托运人')" :allUsers="this.$attrs.allUsers" />
</el-form-item>
<el-form-item :label="$t('收货人')">
<userSelect v-model="subMaterialObj.consigneeId" :placeholder="$t('请选择收货人')" :allUsers="this.$attrs.allUsers" />
<el-input v-model="subMaterialObj.consigneeName"></el-input>
<!-- <userSelect v-model="subMaterialObj.consigneeId" :placeholder="$t('请选择收货人')" :allUsers="this.$attrs.allUsers" /> -->
</el-form-item>
<el-form-item :label="$t('通知方')">
<userSelect v-model="subMaterialObj.notifyingId" :placeholder="$t('请选择通知方')" :allUsers="this.$attrs.allUsers" />
<el-input v-model="subMaterialObj.notifyingName"></el-input>
<!-- <userSelect v-model="subMaterialObj.notifyingId" :placeholder="$t('请选择通知方')" :allUsers="this.$attrs.allUsers" /> -->
</el-form-item>
<el-form-item label="Mark & No.">
<el-input v-model="subMaterialObj.markNo" placeholder="请输入Mark & No."></el-input>
</el-form-item>
<el-form-item :label="$t('包装数量与单位')" class="two-element">
<el-input v-model="subMaterialObj.packageNum" :placeholder="$t('请输入包装数量')"></el-input>
<el-select v-model="subMaterialObj.packageUnit" :placeholder="$t('请选择单位')">
<!-- <el-select v-model="subMaterialObj.packageUnit" :placeholder="$t('请选择单位')">
<el-option v-for="unit in units" :key="unit.id" :value="unit.id" :label="$l(unit, 'title')"></el-option>
</el-select>
</el-select> -->
<el-input v-model="subMaterialObj.packageUnit" :placeholder="$t('请输入包装单位')"></el-input>
</el-form-item>
<el-form-item :label="$t('毛重(KGS)')">
<el-input v-model="subMaterialObj.kgs" :placeholder="$t('请输入毛重') + '(KGS)'"></el-input>
......@@ -78,6 +81,7 @@ import userSelect from "./common/userSelect.vue";
import { getUnitList } from "@/api/ecw/unit";
import { getCabinetPage } from "@/api/ecw/cabinet";
import { billCreate } from "@/api/ecw/boxSea";
import { getSupplier } from "@/api/ecw/supplier";
import { formatNumberString, constantDict, serviceMsg } from "../utils";
/**
......@@ -120,7 +124,6 @@ export default {
}
}
});
const voName = this.$attrs.currNode.voName;
let oldData = { ...this.shipmentObj[voName] };
oldData = formatNumberString(oldData, ["issueType"]);
......@@ -128,8 +131,24 @@ export default {
...oldData,
packageUnit: oldData.packageUnit === 0 ? undefined : oldData.packageUnit,
};
this.$set(this.subMaterialObj,'agentId',this.shipmentObj.agentInfo?.agentId||undefined)
this.getSup(this.subMaterialObj.agentId)
},
methods: {
getSup(id) {
getSupplier(id).then(response => {
if(response.data.externalBackVO){
this.$set(this.subMaterialObj,'consigneeName',response.data.externalBackVO?.receiveCompanyName||'/')
this.$set(this.subMaterialObj,'notifyingName',response.data.externalBackVO?.notifyCompanyName||'/')
this.$set(this.subMaterialObj,'packageNum',response.data.externalBackVO?.packNum)
this.$set(this.subMaterialObj,'packageUnit',response.data.externalBackVO?.packUnit)
this.$set(this.subMaterialObj,'goodsDesc',response.data.externalBackVO?.goodName+response.data.externalBackVO?.fromNo+response.data.externalBackVO?.baNo)
if(this.subMaterialObj.goodsDesc == null){
this.$set(this.subMaterialObj,'goodsDesc','/')
}
}
})
},
/** 提交 */
onSubmit(operateType) {
this.$refs["subMaterialForm"].validate((valid) => {
......
......@@ -13,7 +13,7 @@
</div>
</el-form-item>
<el-form-item :label="$t('收款账户')" prop="accountNo">
<span>{{ addForm.accountNo }}</span>
<span>{{ addForm.accountNo+'('+addForm.accountName+')' }}</span>
</el-form-item>
<el-form-item :label="$t('实收日期')" prop="amountDate">
<span>{{ addForm.amountDate }}</span>
......@@ -23,14 +23,7 @@
<span>{{ addForm.amount }}</span>
</el-form-item>
<el-form-item label-width="0px" prop="currencyId">
<el-select v-model="addForm.currencyId" :disabled="true">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="$i18n.locale=='zh_CN'?item.titleZh:item.titleEn"
:value="item.id"
/>
</el-select>
<span>({{getCurrencyLabel(showCurrencyId)}})</span>
</el-form-item>
</div>
<el-form-item
......@@ -69,7 +62,7 @@
</template>
<script>
import { getReceivableItem ,getInvoicingItem,getReceiptAccountList,getReceiptInfoByIds} from "@/api/ecw/financial";
import { getReceivableItem ,getInvoicingItem,getReceiptAccountList,getReceiptInfoByIds,financeReceiptItemWriteOff} from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency";
import WorkFlow from '@/components/WorkFlow/'
import NP from 'number-precision'
......@@ -134,6 +127,17 @@
if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn
return ''
},
submitForm(){
this.$modal
.confirm(this.$t('您确认要提交审核吗'+'?'))
.then(() => {
financeReceiptItemWriteOff({receiptId:this.id,receiptNo:this.form.receiptNo,receiptItemId:this.bankId}).then(res=>{
this.$message.success(this.$t("提交成功"));
this.$store.dispatch('tagsView/delCurrentView')
});
})
.catch(() => {});
},
handleAddReceiptItem() {
this.surplusData = []
......
<template>
<div style="padding: 20px">
<el-card class="box-card">
<div slot="header" class="clearfix" style="font-size: 20px;">
{{$t('佣金付款单')}}
</div>
<el-form label-width="80px" label-position="left">
<el-row :gutter="30">
<el-col :span="7">
<el-form-item :label="$t('付款单号')">
<el-input></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('客户')">
<el-input v-model="queryParams.searchKey"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('状态')">
<dict-selector :type="DICT_TYPE.ECW_PAYMENT_STATE" v-model="queryParams.state" />
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item :label="$t('业务员')">
<el-select v-model="queryParams.salesmanName" :placeholder="$t('请选择业务员')">
<el-option
v-for="item in creatorData"
:key="item.id"
:label="item.nickname"
:value="item.nickname"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="30">
<el-col :span="7">
<el-form-item :label="$t('创建时间')">
<el-date-picker
v-model="selectDate"
type="datetimerange"
range-separator="至"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('发票状态')">
<el-select
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 :label="$t('订单编号')">
<el-input></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<el-button type="primary" @click="getList">{{$t('查找')}}</el-button>
<el-button type="primary">{{$t('新增请款单')}}</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-table :data="list" style="margin-top: 30px">
<el-table-column type="index" :label="$t('序号')"></el-table-column>
<el-table-column prop="customerId" :label="$t('付款单号')"></el-table-column>
<el-table-column prop="customerName" :label="$t('客户')"></el-table-column>
<el-table-column :label="$t('创建时间')">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
</template>
</el-table-column>
<el-table-column :label="$t('最后付款时间')">
<template v-slot="{row}">
{{parseTime(row.latestPayAt)}}
</template>
</el-table-column>
<el-table-column prop="invoiceStatus" :label="$t('发票')">
<template v-slot="{row}">
{{row.invoiceStatus ? $t('已开票') : $t('未开票')}}
</template>
</el-table-column>
<el-table-column :label="$t('状态')" prop="state" >
<template slot-scope="scope">
<dict-tag
:type="DICT_TYPE.ECW_PAYMENT_STATE"
:value="scope.row.state"
/>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{row}">
<el-button type="text" v-if="[0,2].includes(row.state)" >{{$t('编辑')}}</el-button>
<el-button type="text" @click="deleteFn(row)" v-if="[0,2].includes(row.state)" > {{$t('删除')}}</el-button>
<el-button type="text" v-if="[3,4].includes(row.state)" >{{$t('审核详情')}}</el-button>
<el-button type="text" v-if="[1,3,5].includes(row.state)" @click="bridgeFn('取消审核',7, row, '取消审核' )" >{{$t('取消审核')}}</el-button>
<el-button type="text" v-if="[5,6].includes(row.state)" @click="bridgeFn('付款单反审核', 1, row, '提交反审核',)" >{{$t('反审核')}}</el-button>
<el-button type="text" v-if="[5].includes(row.state)" @click="bridgeFn('付款单核销申请', 2, row, '提交核销')" >{{$t('核销')}}</el-button>
<el-button type="text" v-if="[5,6].includes(row.state)" >{{$t('打印')}}</el-button>
<el-button type="text" v-if="[8].includes(row.state)" @click="bridgeFn('付款单反核销申请', 3, row, '提交方核销')" >{{$t('反核销')}}</el-button>
<el-button type="text" v-if="[4,7].includes(row.state)" @click="bridgeFn('取消反核销',4, row, '提交取消反核销' )" >{{$t('取消反核销')}}</el-button>
<el-button type="text" @click="bridgeFn('取消付款单核销',5, row, '取消付款单核销' )" > {{$t('取消核销')}} </el-button>
<el-button type="text" @click="bridgeFn('取消付款反单核销',6, row, '取消付款反单核销' )" > {{$t('取消反核销')}} </el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<!--对话框 审核 -->
<el-dialog width="30%" :title="paymentTitle" :visible.sync="paymentShow">
<div class="cancel_content">
<span>{{ $t('申请理由') }}</span>
<el-input type="textarea" :rows="6" v-model="paymentValue" :placeholder="$t('请输入取消理由')"></el-input>
</div>
<span slot="footer" class="dialog-footers">
<el-button type="primary" @click="cancelWriteOffClick()">{{ $t(butTitle) }}</el-button>
<el-button @click="paymentShow = false">{{ $t('取消') }}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {listSimpleUsers} from "@/api/system/user";
import {
commissionPaymentCancelFinancePaymentApprovalNo,
commissionPaymentCancelFinancePaymentWriteOff,
commissionPaymentCancelFinancePaymentWriteOffNo,
commissionPaymentDelete,
commissionPaymentPage,
commissionPaymentVerification,
commissionPaymentVerificationCancel,
commissionPaymentVerifyCancel
} from "@/api/ecw/financial";
import {parseTime} from "../../../utils/ruoyi";
export default {
name: "commission-Payment",
created() {
// 业务员
listSimpleUsers().then((res) => (this.creatorData = res.data));
this.getList();
},
data(){
return {
queryParams:{
invoiceStatus:null,
state:null,
salesmanName:null,
searchKey:null,
page:1,
rows:10,
},
selectDate:[],
creatorData:[],
list:[],
total:0,
paymentRow:{},
paymentIndex:0,
paymentTitle:'',
butTitle:'',
paymentShow:false,
paymentValue:''
}
},
methods:{
parseTime,
getList(){
commissionPaymentPage(this.queryParams).then(r => {
this.list = r.data.list
this.total = r.data.total
})
},
// 删除
deleteFn(row){
this.$confirm(this.$t('是否删除此条佣金付款单'), this.$t('提示'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
}).then(() => {
commissionPaymentDelete({id:row.id}).then(r => {
this.$message({
type: 'success',
message:this.$t('删除成功!')
});
this.getList();
})
}).catch(() => {
this.$message({
type: 'info',
message: this.$t('已取消删除')
});
});
},
bridgeFn(title, index ,row, butTitle = '提交'){
this.paymentTitle = title;
this.butTitle = butTitle;
this.paymentIndex = index;
this.paymentRow = row;
this.paymentShow = true;
},
//提交
cancelWriteOffClick(){
if(!this.paymentValue) return this.$message.warning(this.$t('请输入理由!'))
let resolve = ()=>{
this.getList();
this.paymentShow = false;
this.paymentValue = ''
this.$message.success(this.$t('操作成功!'));
}
let reject = ()=>{
this.paymentShow = false;
}
let p = {
"paymentId": this.paymentRow.id,
"paymentNo": this.paymentRow.paymentNo,
"remark":this.paymentValue,
}
switch (this.paymentIndex){
case 1:
commissionPaymentVerifyCancel(p).then(resolve, reject)
break;
case 2:
commissionPaymentVerification(p).then(resolve, reject)
break;
case 3:
commissionPaymentVerificationCancel(p).then(resolve, reject)
break;
case 4:
commissionPaymentCancelFinancePaymentApprovalNo(p).then(resolve, reject)
break;
case 5:
commissionPaymentCancelFinancePaymentWriteOff(p).then(resolve, reject)
break
case 6:
commissionPaymentCancelFinancePaymentWriteOffNo(p).then(resolve, reject)
break
case 7:
}
}
}
}
</script>
<style scoped>
</style>
<template>
<div style="padding: 20px">
<el-card class="box-card">
<div slot="header" class="clearfix" style="font-size: 20px;">
{{$t('应付款佣金')}}
</div>
<el-form label-width="80px" inline>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item :label="$t('订单号')">
<el-input v-model="queryParams.orderNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('客户')">
<el-input v-model="queryParams.customerName"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('始发仓')">
<el-select
v-model="queryParams.startWarehouseId"
:placeholder="$t('请选择始发仓')"
clearable
>
<el-option
v-for="item in exportWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('目的仓')">
<el-select
v-model="queryParams.destWarehouseId"
:placeholder="$t('请选择目的仓')"
clearable
>
<el-option
v-for="item in importWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="6">
<el-form-item :label="$t('运输方式')">
<dict-selector
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportId"
formatter="number"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('佣金类型')">
<dict-selector
:type="DICT_TYPE.COMMISSION_TYPE"
v-model="queryParams.feeType"
formatter="number"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item :label="$t('状态')">
<el-select clearable v-model="queryParams.state">
<el-option v-for="(item) in STATE" :label="$t(item.title)" :value="item.value" :key="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
<el-button type="primary" @click="getList">{{$t('查找')}}</el-button>
<el-button type="primary" @click="$router.push({path:'/financial/commission-requestFunds',query:{payableId:0}})" >{{$t('新增请款单')}}</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<el-table :data="list" style="margin-top: 30px">
<el-table-column :label="$t('订单编号')" prop="orderNo" ></el-table-column>
<el-table-column :label="$t('客户名称')" prop="customerName" ></el-table-column>
<el-table-column :label="$t('订单编号')" prop="payableNo" ></el-table-column>
<el-table-column :label="$t('佣金类型')">
<template v-slot="{row}">
<dict-tag
:type="DICT_TYPE.COMMISSION_TYPE"
:value="row.feeType"
></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('金额')" prop="totalAmount">
</el-table-column>
<el-table-column :label="$t('应付生成时间')"></el-table-column>
<el-table-column :label="$t('状态')">
<template v-slot="{row}">
{{$t(STATE.find(r => r.value === row.state).title)}}
</template>
</el-table-column>
<el-table-column :label="$t('付款单号')" prop="paymentNo"></el-table-column>
<el-table-column :label="$t('备注')" prop="remark" ></el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{row}">
<el-button type="text" @click="$router.push({path:'/financial/commission-requestFunds',query:{payableId:row.id}})" >{{$t('请款')}}</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
</div>
</template>
<script>
import {getWarehouseList} from "@/api/ecw/warehouse";
import item from "@/layout/components/Sidebar/Item.vue";
import {payablePage} from "@/api/ecw/financial";
import Template from "@/views/cms/template/index.vue";
export default {
// 应付款佣金
name: "commission-payable",
components: {Template},
created() {
getWarehouseList().then(res => this.warehouseList = res.data)
this.getList()
},
data(){
return {
STATE:[
{
value:0,
title:'未付款',
},
{
value:1,
title:'付款中',
},
{
value:2,
title:'已付款',
}
],
warehouseList:[],
queryParams:{
rows:10,
page:1,
orderNo:'',
customerName:'',
startWarehouseId:'',
destWarehouseId:'',
feeType:'',
state:''
},
list:[],
total:0
}
},
computed:{
exportWarehouseList(){
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
},
methods:{
getList(){
payablePage(this.queryParams).then(r =>{
this.list = r.data.list
this.total = r.data.total
})
}
},
}
</script>
<style scoped>
</style>
<template>
<div class="app-container">
<el-card>
<div slot="header" class="card-title">{{ $t('请款单') }}</div>
<el-form
ref="form"
:model="form"
label-width="120px"
label-position="left"
>
<el-descriptions :column="3" class="card" border>
<el-descriptions-item :label="$t('客户')">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="customerId"
:rules="{ required: true, trigger: ['blur', 'change'] }"
:error="$t('客户不能为空')"
>
<customer-selector v-model="form.customerId" @change="consignor = $event" />
<!-- <el-select-->
<!-- v-model="form.customerId"-->
<!-- :placeholder="$t('请选择客户')"-->
<!-- filterable-->
<!-- @change="selectChange(form.customerId)"-->
<!-- :filter-method="getUserList"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="supplier in allSupplier"-->
<!-- :key="supplier.id"-->
<!-- :label="supplier.name"-->
<!-- :value="supplier.id"-->
<!-- ></el-option>-->
<!-- </el-select>-->
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('部门')">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="departmentId"
required
:error="$t('部门不能为空')"
>
<el-select
v-model="form.departmentId"
style="width: 300px"
:placeholder="$t('请选择部门')"
>
<el-option
v-for="item in deptData"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('业务员')">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="salesmanName"
required
:error="$t('业务员不能为空')"
>
<el-select v-model="form.salesmanName" :placeholder="$t('请选择业务员')">
<el-option
v-for="item in creatorData"
:key="item.id"
:label="item.nickname"
:value="item.nickname"
/>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('申请日期')">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="applicationAt"
required
:error="$t('申请日期不能为空')"
>
<el-date-picker
clearable
v-model="form.applicationAt"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
type="datetime"
:placeholder="$t('选择申请日期')"
/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('账户名称')" >
<el-form-item label-width="0" :rules="{message:$t('账户名称不能为空'),required:true,}" prop="customerBankAccountName">
<el-input v-model="form.customerBankAccountName" ></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('银行名称')" >
<el-form-item label-width="0" :rules="{ required:true,message:$t('银行名称不能为空')}" prop="customerBank" >
<el-input v-model="form.customerBank"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('银行账户')" >
<el-form-item label-width="0" :rules="{required:true, message:$t('银行账户不能为空'),}" prop="customerBankAccount" >
<el-input v-model="form.customerBankAccount" ></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('银行代码')" >
<el-form-item label-width="0" >
<el-input></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('账户类型')" >
<el-form-item label-width="0">
<el-input></el-input>
</el-form-item>
</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('客户银行账号')" style="width: 50%">-->
<!-- <el-form-item-->
<!-- label=""-->
<!-- label-width="0"-->
<!-- style="margin-bottom: 0"-->
<!-- prop="customerBankAccount"-->
<!-- >-->
<!-- <el-input style="width: 50%;" v-model="form.customerBankAccount">-->
<!-- </el-input>-->
<!--&lt;!&ndash; <el-select v-model="form.supplierBankAccount" @change="selectChangeBank"&ndash;&gt;-->
<!--&lt;!&ndash; :placeholder="$t('请选择收款账户')">&ndash;&gt;-->
<!--&lt;!&ndash; <el-option&ndash;&gt;-->
<!--&lt;!&ndash; v-for="item in bankData"&ndash;&gt;-->
<!--&lt;!&ndash; :key="item.id"&ndash;&gt;-->
<!--&lt;!&ndash; :label="item.bankName + '(' + item.bankAccount+ ')'"&ndash;&gt;-->
<!--&lt;!&ndash; :value="item.bankAccount"&ndash;&gt;-->
<!--&lt;!&ndash; />&ndash;&gt;-->
<!--&lt;!&ndash; </el-select>&ndash;&gt;-->
<!-- </el-form-item>-->
<!-- </el-descriptions-item>-->
</el-descriptions>
<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"
required
:error="$t('最后付款日期不能为空')"
>
<el-date-picker
clearable
v-model="form.latestPayAt"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd HH:mm:ss"
type="datetime"
:placeholder="$t('选择最后付款日期')"
/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('结算方式')">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
required
:error="$t('选择结算方式')"
prop="settlementType"
>
<dict-selector
:type="DICT_TYPE.CUSTOMER_BALANCE"
v-model="form.settlementType"
/>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-card>
<el-card class="card">
<div slot="header" class="card-title">{{ $t('费用信息') }}</div>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
style="padding: 10px; margin-bottom: 10px"
>{{ $t('添加未付供应商款项') }}
</el-button
>
</el-col>
<el-table 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">
<template v-slot="{row}">
<dict-tag
:type="DICT_TYPE.COMMISSION_TYPE"
:value="row.feeType"
></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('发票号码')" align="center" prop="invoiceNumber">
<template slot-scope="scope">
<el-input v-model="scope.row.invoiceNumber"></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('应付金额')" align="center" prop="totalAmount"/>
<el-table-column :label="$t('币种')" align="center" prop="currencyId">
<template slot-scope="scope">
{{ getCurrencyLabel(scope.row.currencyId) }}
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
<el-table-column :label="$t('汇率')" align="center" prop="exchangeRate">
<template slot-scope="scope">
<el-input v-model="scope.row.exchangeRate"></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('税率')+'%'" align="center" prop="taxRate">
<template slot-scope="scope">
<el-input v-model="scope.row.taxRate"
@keyup.native="scope.row.taxRate = oninput(scope.row.taxRate)"></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('价税合计(RMB)')" align="center" prop="total">
<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(2)
}}</span>
<!-- <span>{{scope.row.total}}</span> -->
</template>
</el-table-column>
</el-table>
<el-form
ref="forms"
:model="form"
label-width="120px"
label-position="left"
style="width: 50%"
>
<el-descriptions :column="1" class="card" border>
<el-descriptions-item :label="$t('账单号')">
<el-form-item
label=""
label-width="0"
style="margin-bottom: 0"
prop="accountNumber"
:rules="[
{ required: true, message:$t('账单号不能为空'), trigger: 'blur' },
]"
>
<el-input
v-model="form.accountNumber"
:placeholder="$t('请输入账单号')"
></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="invoiceStatus"
required
:error="$t('请选择是否开票')"
>
<el-select
v-model="form.invoiceStatus"
:placeholder="$t('请选择是否开票')"
>
<el-option :label="$t('未开票')" value="0"/>
<el-option :label="$t('已开票')" value="1"/>
</el-select>
</el-form-item>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-card>
<div slot="header" class="bpm-title">{{ $t('审核流程') }}</div>
<work-flow xmlkey="merge_order" v-model="form.copyUserList"></work-flow>
<div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="submitForm(1)">{{ $t('提交申请') }}</el-button>
<el-button type="primary" @click="submitForm(0)">{{ $t('保存草稿') }}</el-button>
<el-button v-if="orderData.inWarehouseState==207" type="primary"
@click="$router.push(`/bpm/process-instance/detail?id=`+orderApprovalBackVO.applyingFormId)">
{{ $t('审核中') }}
</el-button>
<el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="dialogVisible = true">
{{ $t('取消审核') }}
</el-button>
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{ $t('返回') }}</el-button>
</div>
<el-dialog
:visible.sync="open"
:title="$t('添加未付客户款项')"
width="80%"
append-to-body
@open="openDialog"
>
<div>
<!-- <div slot="header" class="card-title">{{ $t('添加未收客户款项') }}</div> -->
<!-- 搜索工作栏 -->
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
label-width="80px"
>
<!-- <el-row> -->
<el-form-item :label="$t('客户')">
<customer-selector
v-model="queryParams.customerId"
@change="consignor = $event"
/>
</el-form-item>
<el-form-item :label="$t('始发仓')">
<el-select
v-model="queryParams.departureId"
:placeholder="$t('请选择始发仓')"
clearable
>
<el-option
v-for="item in exportWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')">
<el-select
v-model="queryParams.objectiveId"
:placeholder="$t('请选择目的仓')"
clearable
>
<el-option
v-for="item in importWarehouseList"
:label="$l(item, 'title')"
:value="item.id"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('运输方式')">
<dict-selector
:type="DICT_TYPE.ECW_TRANSPORT_TYPE"
v-model="queryParams.transportId"
formatter="number"
/>
</el-form-item>
<!-- </el-row> -->
<el-form-item :label="$t('出货渠道')">
<el-select
v-model="queryParams.channelId"
:placeholder="$t('请选择出货渠道')"
>
<el-option
v-for="item in channelList"
:label="item.nameZh"
:value="item.channelId"
:key="item.channelId"
></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('订单号')" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
:placeholder="$t('请输入订单号')"
clearable
/>
</el-form-item>
<el-form-item :label="$t('业务编号')" prop="selfNo">
<el-input
v-model="queryParams.selfNo"
:placeholder="$t('请输入业务编号')"
clearable
@blur="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery"
>{{ $t('查询') }}
</el-button
>
</el-form-item>
</el-form>
<el-table
ref="multipleTable"
v-loading="loading"
:data="orderData"
border
@selection-change="handleSelectionChange"
row-key="id"
>
<el-table-column type="selection" width="55" :reserve-selection="true"></el-table-column>
<el-table-column :label="$t('订单编号')" prop="orderNo"></el-table-column>
<el-table-column :label="$t('客户名称')" prop="customerName"></el-table-column>
<el-table-column :label="$t('订单编号')" prop="payableNo"></el-table-column>
<el-table-column :label="$t('佣金类型')">
<template v-slot="{row}">
<dict-tag
:type="DICT_TYPE.COMMISSION_TYPE"
:value="row.feeType"
></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('金额')" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}{{ getCurrencyLabel(scope.row.currencyId) }}</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<!-- </el-card> -->
<div slot="footer" style="margin: 20px 0; text-align: center;">
<el-button type="primary" @click="saveSelectList">{{ $t('确认添加') }}</el-button>
<el-button @click="hiddenDialog">{{ $t('取消') }}</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import {listSimpleUsers} from "@/api/system/user";
import {DICT_TYPE} from "@/utils/dict";
import {getToken} from "@/utils/auth";
import {getChannelList} from "@/api/ecw/channel";
import CustomerSelector from "@/components/CustomerSelector";
import {listSimpleDepts} from "@/api/system/dept";
import {getTradeCityList} from "@/api/ecw/region";
import {getSupplierPage, getSupplier} from "@/api/ecw/supplier";
import {
getPayableList,
getPayableInfoByIds,
getPaymentInfoByIds,
getPaymentItem,
updatePayment,
payablePage, commissionPayment, commissionPaymentUpdate, getCommissionPayable
} from "@/api/ecw/financial"
import {getCurrencyPage} from "@/api/ecw/currency";
import NP from 'number-precision'
import {getWarehouseList} from '@/api/ecw/warehouse'
import WorkFlow from '@/components/WorkFlow/'
import {getCustomer, getCustomerPage} from "@/api/ecw/customer";
export default {
name: "commission-requestFunds",
components: {
CustomerSelector, WorkFlow
},
data() {
return {
id: 0,
payableId: 0,
orderData: [],
total: 0,
loadings: false,
open: false,
form: {},
creatorData: [],
list: [],
defaultList: [],
channelList: [],
loading: "",
bankData: [],
params: {
page: 1,
rows: 20,
},
deptData: [],
deptArr: [],
queryParams: {
page: 1,
rows: 20,
},
multipleSelection: [],
tradeCityList: [],
allSupplier: [],
currencyList: [],
warehouseList: [],
selectedUsers: [],
dialogVisible: false,
};
},
async created() {
await getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
getWarehouseList().then(res => this.warehouseList = res.data)
let that = this;
if (that.$route.query.payableId && that.$route.query.payableId !== '0') {
this.payableId = this.$route.query.payableId;
// 获取详情
getCommissionPayable({id: this.payableId}).then(res => {
this.handleSelectionChange([res.data])
this.selectChange(this.form.customerId)
this.list = this.multipleSelection
this.$set(this.form, 'customerId', res.data.customerId)
})
}
if (that.$route.query.id && that.$route.query.id !== '0') {
this.id = this.$route.query.id;
getPaymentInfoByIds({id: this.id}).then(res => {
this.form = {
copyUserList:[],
...res.data,
latestPayAt: this.parseTime(res.data.latestPayAt, '{y}-{m}-{d}'),
applicationAt: this.parseTime(res.data.applicationAt, '{y}-{m}-{d}'),
invoiceStatus: String(res.data.invoiceStatus),
}
this.$set(this.form, 'customerBankAccount', res.data.customerBankAccount)
})
getPaymentItem({id: this.id}).then(res => {
this.list = [...res.data]
this.defaultList = [...res.data]
})
}
listSimpleUsers().then((res) => (that.creatorData = res.data));
getChannelList().then((res) => (that.channelList = 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) => {
// const { data } = res;
// this.allSupplier = data.list;
// this.selectChange(this.form.supplierId)
// });
listSimpleDepts().then((res) => {
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;
}
});
});
this.getUserList();
},
computed: {
expoerCityList() {
return this.tradeCityList.filter((item) => item.type == 2);
},
importCityList() {
return this.tradeCityList.filter((item) => item.type == 1);
},
exportWarehouseList() {
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList() {
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
},
methods: {
getCurrencyLabel(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
return ''
},
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行查询
payablePage(params).then((response) => {
this.orderData = response.data.list;
this.total = response.data.total;
this.loading = false;
this.$nextTick(() => {
this.list.forEach(itm => {
const t = this.orderData.find(v => v.id == itm.id)
t && this.$refs.multipleTable.toggleRowSelection(t, true)
})
})
});
},
getUserList(val) {
getCustomerPage({pageNo: 1, pageSize: 20, name: val}).then(r => {
this.allSupplier = r.data.list
})
},
getSummaries(param) {
console.log(param)
const {columns, data} = param;
const sums = new Array(columns.length).map(v => '');
const index = sums.length - 1
sums[index - 1] = this.$t('价税合计大写')
const t = data.map(v => v.total).reduce((prev, curr) => {
return parseFloat(prev) + parseFloat(curr);
}, 0)
sums[index] = this.convertCurrency(t)
return sums;
},
/** 新增按钮操作 */
handleAdd() {
this.open = true;
},
submitForm(val) {
this.form.addType = val;
this.$refs.form.validate((valid) => {
if (valid) {
this.$refs.forms.validate((val) => {
if (val) {
const params = {...this.form}
if (this.list && this.list.length > 0) {
params.commissionPayableReqVOList = [...this.list]
} else {
this.$modal.msgError(this.$t('请选择客户未付款项'));
return
}
if (!params.customerBankAccount) {
this.$modal.msgError(this.$t('请前往客户档案编辑银行账号!'));
return
}
if (this.id && this.id !== '0') {
commissionPaymentUpdate(params).then(res => {
this.$modal.msgSuccess(this.$t('修改成功'));
// this.$router.back();
})
} else {
commissionPayment(params).then(res => {
this.$modal.msgSuccess(this.$t('新增成功'));
// this.$router.back();
})
}
}
})
}
})
},
selectChangeBank(val) {
this.$forceUpdate()
// var bank = this.bankData.find(item => item.bankAccount == this.form.supplierBankAccount)
// this.form.supplierBank = bank.bankName
// this.form.supplierBankAccountName = bank.accountName
},
selectChange(val) {
if(val){
getCustomer(val).then(r => {
this.$set(this.form, 'customerBank',r.data.bank )
this.$set(this.form, 'customerBankAccount',r.data.bankNumber )
this.$set(this.form, 'customerBankAccountName',r.data.name )
})
}
// this.bankData = []
// // this.form.supplierBankAccount=''
// if (val) {
// getSupplier(val).then((res) => {
// this.bankData = res.data.bankList
// var bank = this.bankData.find(item => item.bankAccount == this.form.supplierBankAccount)
// if (this.bankData.length == 0 || !bank) this.form.supplierBankAccount = ''
// })
// }
//
// const t = this.allSupplier.find(v => v.id == val)
//
// t && (this.form.supplierName = t.companyZh)
// t && (this.bankData = t.bankList)
},
handleQuery() {
this.queryParams.page = 1;
this.getList()
},
UStoRMB() {
return NP.divide(this.currencyList.find(v => v.titleEn === 'USD').huilv, 100).toFixed(6)
},
NANtoRMB() {
return NP.divide(this.currencyList.find(v => v.titleEn === 'NGN').huilv, 100).toFixed(6)
},
handleSelectionChange(val) {
this.multipleSelection = val.map(v => {
var rate = NP.divide(this.currencyList.find(vs => vs.id === v.currencyId).huilv, 100).toFixed(6)
return Object.assign(v, {exchangeRate: rate})
});
},
hiddenDialog() {
this.open = false;
},
saveSelectList() {
if (this.id && this.id !== '0') {
this.list = [...this.defaultList, ...this.multipleSelection]
} else {
this.list = this.multipleSelection
}
this.open = false;
},
convertCurrency(money) {
//汉字的数字
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 cnIntUnits = new Array('', this.$t(''), this.$t('亿'), '');
//对应小数部分单位
var cnDecUnits = new Array('', this.$t(''), this.$t(''), '');
//整数金额时后面跟的字符
var cnInteger = this.$t('');
//整型完以后的单位
var cnIntLast = this.$t('');
//最大处理的数字
var maxNum = 999999999999999.9999;
//金额整数部分
var integerNum;
//金额小数部分
var decimalNum;
//输出的中文金额字符串
var chineseStr = '';
//分离金额后用的数组,预定义
var parts;
// 传入的参数为空情况
if (money === '') {
return '';
}
money = parseFloat(money)
if (money >= maxNum) {
return ''
}
// 传入的参数为0情况
if (money === 0) {
chineseStr = cnNums[0] + cnIntLast + cnInteger;
return chineseStr
}
// 转为字符串
money = money.toString();
// indexOf 检测某字符在字符串中首次出现的位置 返回索引值(从0 开始) -1 代表无
if (money.indexOf('.') == -1) {
integerNum = money;
decimalNum = ''
} else {
parts = money.split('.');
integerNum = parts[0];
decimalNum = parts[1].substr(0, 4);
}
//转换整数部分
if (parseInt(integerNum, 10) > 0) {
let zeroCount = 0;
let IntLen = integerNum.length
for (let i = 0; i < IntLen; i++) {
let n = integerNum.substr(i, 1);
let p = IntLen - i - 1;
let q = p / 4;
let m = p % 4;
if (n == '0') {
zeroCount++;
} else {
if (zeroCount > 0) {
chineseStr += cnNums[0]
}
zeroCount = 0;
chineseStr += cnNums[parseInt(n)] + cnIntRadice[m];
}
if (m == 0 && zeroCount < 4) {
chineseStr += cnIntUnits[q];
}
}
// 最后+ 元
chineseStr += cnIntLast;
}
// 转换小数部分
if (decimalNum != '') {
let decLen = decimalNum.length;
for (let i = 0; i < decLen; i++) {
let n = decimalNum.substr(i, 1);
if (n != '0') {
chineseStr += cnNums[Number(n)] + cnDecUnits[i]
}
}
}
if (chineseStr == '') {
chineseStr += cnNums[0] + cnIntLast + cnInteger;
} else if (decimalNum == '') {
chineseStr += cnInteger;
}
return chineseStr
},
openDialog() {
this.getList()
},
oninput(num) {
let str = num
let len1 = str.substr(0, 1)
let len2 = str.substr(1, 1)
//如果第一位是0,第二位不是点,就用数字把点替换掉
if (str.length > 1 && len1 == 0 && len2 != '.') {
str = str.substr(1, 1)
}
//第一位不能是.
if (len1 == '.') {
str = ''
}
//限制只能输入一个小数点
if (str.indexOf('.') != -1) {
let str_ = str.substr(str.indexOf('.') + 1)
if (str_.indexOf('.') != -1) {
str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
} else {
// if (str_.length > 2) {
// str = str.substr(0, str.indexOf('.') + 1) + str_.substr(0, 2)
// }
}
}
//正则替换
str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
// str = str.replace(/\.\d\d\d$/,'') // 小数点后只能输两位
return str
}
},
watch:{
'form.customerId'(val){
this.selectChange(val)
}
}
};
</script>
<style scoped>
.card {
margin-top: 20px;
}
.dialog-footer {
padding: 40px;
}
.card-title {
font-size: 18px;
font-weight: bold;
}
.bpm-title {
font-size: 20px;
font-weight: bold;
color: #666;
margin: 20px 0;
}
</style>
<template>
<div class="app-container">
<el-descriptions :column="5" >
<el-descriptions-item :label="$t('收款单编号')">{{ form.receiptNo }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户')">{{ form.customerName }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">
<template >
<span>{{ parseTime(form.createTime, '{y}-{m}-{d}') }}</span>
</template></el-descriptions-item>
<el-descriptions-item :label="$t('业务员')">{{ form.salesmanName }}</el-descriptions-item>
<el-descriptions-item :label="$t('期望收款金额')">
<template>
<div v-for="itemAmount in collectionAmount" :key="itemAmount.currencyNameZh">{{ itemAmount.amount}}{{$i18n.locale=='zh_CN'?itemAmount.currencyNameZh:itemAmount.currencyNameEn}}</div>
</template>
</el-descriptions-item>
</el-descriptions>
<div class="btn">
<el-button
size="mini"
type="primary"
@click="$router.push('/financial/receiptDetail?id=' + receiptId)"
>{{ $t('查看收款单')}}</el-button>
</div>
</div>
</template>
<script>
import {
getReceiptInfoByIds,
getInvoicingItem,
getReceiptAccountList,
getReceiptApprove
} from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision'
export default {
props:{
id: [String, Number]
},
data() {
return {
form: {},
collectionAmount: [],
currencyList:[],
list:[],
receiptId:0
}
},
watch:{
id(){
this.getCurrencyData()
},
currencyList(){
this.getData()
},
form(){
this.getListData()
},
list(){
this.getCollectionData()
}
},
created() {
if(this.id){
this.getCurrencyData()
}
},
methods: {
getData(){
console.log(this.id)
getReceiptApprove(this.id).then(res => {
if(res.data.receiptId){
this.receiptId = res.data.receiptId
this.getReceiptInfo()
}
})
},
// 获取汇率
getCurrencyData(){
getCurrencyPage(this.params).then(res => {this.currencyList = res.data.list})
},
getReceiptInfo(){
getReceiptInfoByIds({ id: this.receiptId }).then(res => {
this.form = res.data
})
},
getListData(){
getInvoicingItem({ id: this.receiptId }).then(res => {
this.list = [...res.data]
})
},
getCollectionData(){
getReceiptAccountList({ id: this.receiptId }).then(res => {
var n
// 收款总计
var amountList =[]
this.currencyList.forEach((item,index)=>{
var nairaListByList = this.list.filter(v => v.currencyId === item.id)
if(nairaListByList.length>0){
var discountNaira = nairaListByList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
n = res.data.find(v => v.currencyId == item.id)
n && (n.discountTotal = discountNaira)
}
var dollarList = res.data.filter(v => v.collectionCurrencyId == item.id)
if(dollarList.length>0){
var dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0).toFixed(2)
amountList.push({currencyId:item.id,currencyNameEn:item.titleEn,currencyNameZh:item.titleZh,amount:dollar})
}
})
this.$set(this,'collectionAmount',amountList)
})
}
}
}
</script>
<style scoped lang="scss">
.btn{
margin-top: 20px;
}
.app-container {
::v-deep .el-descriptions-item__label {
font-size:16px;
font-weight:600;
}
::v-deep .el-descriptions-item__content {
font-size:16px;
font-weight:600;
}
}
</style>
<template>
<div class="app-container">
<el-descriptions :column="4" >
<el-descriptions-item :label="$t('收款单编号')">{{ form.receiptNo }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户')">{{ form.customerName }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">
<template >
<span>{{ parseTime(form.createTime, '{y}-{m}-{d}') }}</span>
</template></el-descriptions-item>
<el-descriptions-item :label="$t('业务员')">{{ form.salesmanName }}</el-descriptions-item>
</el-descriptions>
<div class="btn">
<el-table ref="multipleTable" :data="detailed" border row-key="id">
<!-- <el-table-column :label="$t('序号')" type="index" align="center" width="50"></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>
</div>
<div class="btn">
<el-button
size="mini"
type="primary"
@click="$router.push('/financial/receiptDetail?id=' + receiptId)"
>{{ $t('查看收款单')}}</el-button>
<el-button
size="mini"
type="primary"
@click="openAddDialog=true"
>{{ $t('查看银行实收明细')}}</el-button>
</div>
<el-dialog v-if="openAddDialog" :visible.sync="openAddDialog" :title="this.$t('银行实收明细详情')" width="50%" append-to-body>
<div style="padding: 0 24px">
<el-form ref="addForm" :model="addForm" label-width="250px">
<el-form-item :label="$t('收款单号')+':'">{{ form.receiptNo }}</el-form-item>
<el-form-item :label="$t('剩余应收金额')+':'">
<template >
<div v-if="surplusData.length==0">0</div>
<div v-else>
<div v-for="(amount, currency) in surplusData" :key="currency">
<span v-if="amount"> {{amount}}{{getCurrencyLabel(currency)}}</span>
</div>
</div>
</template>
</el-form-item>
<el-form-item :label="$t('收款账户')+':'" prop="accountNo">
<span>{{ addForm.accountNo }}</span>
</el-form-item>
<el-form-item :label="$t('实收日期')+':'" prop="amountDate">
<span>{{ addForm.amountDate }}</span>
</el-form-item>
<div style="display: flex;">
<el-form-item :label="$t('实收')+':'" prop="amount"><span>{{ addForm.amount }}</span></el-form-item>
<el-form-item
label-width="0px"
prop="currencyId"
>
<el-select
v-model="addForm.currencyId"
:placeholder="$t('请选择')"
:disabled="true"
@change="val => currencyIdChange(val)"
>
<el-option
v-for="item in currencyList"
:key="item.id"
:label="$i18n.locale=='zh_CN'?item.titleZh:item.titleEn"
:value="item.id"
/>
</el-select>
<!-- <dict-selector v-if="!isView" :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" v-model="addForm.currencyId" @change="val => currencyIdChange(val)"/> -->
<!-- <span v-else>{{ addForm.currencyId }}</span> -->
<!-- <dict-tag v-else :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="addForm.currencyId" /> -->
</el-form-item>
</div>
<el-form-item
v-if="showCurrencyId != addForm.currencyId"
prop="rate"
>
<template slot="label">
<span :title="$t('实收币种与核销基准币种一样时,无需填写汇率,不一样需要填写汇率')">{{ $t('兑核销基准币种汇率') }}{{getCurrencyLabel(showCurrencyId)}}</span>
</template>
<span>{{ addForm.rate}}</span>
</el-form-item>
<el-form-item
v-if="showCurrencyId != addForm.currencyId"
>
<template slot="label">
{{ $t('兑核销基准币种金额') }}{{getCurrencyLabel(showCurrencyId)}}:
</template>
<span>{{ addForm.writeOffAmount?parseFloat(addForm.writeOffAmount).toFixed(6):'' }}</span>
</el-form-item>
<el-form-item
:label="$t('水单附件')+':'"
prop="attr"
>
<div v-if="addForm.attr.length>0">
<div v-for="(v, i) in addForm.attr" :key="i"><el-link :href="v.url" type="primary" target="_blank">{{ v.name }}</el-link></div>
</div>
<div v-else>{{$t('')}}</div>
</el-form-item>
<el-form-item :label="$t('水单号')+':'" prop="billNo">
<span>{{ addForm.billNo }}</span>
</el-form-item>
</el-form>
</div>
</el-dialog>
</div>
</template>
<script>
import { getCustomer } from '@/api/ecw/customer'
import {
getReceiptInfoByIds,
getReceivableItem,
getInvoicingItem,
getReceiptAccountList,
getReceiptApprove
} from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision'
export default {
props:{
id: [String, Number],
},
data() {
return {
form: {},
currencyList:[],
list:[],
detailed: [],
showCurrencyId:0,
surplusData:[],
openAddDialog:false,
collectionAmount: [],
addForm:{},
receiptId:0,
receiptItemId:0
}
},
watch:{
id(){
this.getCurrencyData()
},
currencyList(){
this.getData()
},
form(){
this.getList()
this.getListData()
},
},
created() {
if(this.id){
this.getCurrencyData()
}
},
methods: {
getData(){
getReceiptApprove(this.id).then(res => {
if(res.data.receiptId){
this.receiptId = res.data.receiptId
this.receiptItemId = res.data.receiptItemId
this.getReceiptInfo()
}
})
},
// 获取汇率
getCurrencyData(){
getCurrencyPage(this.params).then(res => {this.currencyList = res.data.list})
},
getList() {
getReceivableItem({ id: this.receiptId }).then(res => {
res.data = res.data.map(v => ({
...v,
amountDate: this.parseTime(v.amountDate, '{y}-{m}-{d}'),
accountNo: +v.accountNo,
rate:parseFloat(v.rate).toFixed(6),
attr: v.attr ? v.attr.split(',').map(t => ({ name: t.slice(t.lastIndexOf('/') + 1), url: t })) : []
}))
this.addForm = res.data.find(v=>v.id==this.receiptItemId)
this.detailed = []
this.detailed.push(this.addForm)
this.getCollectionData()
})
},
getReceiptInfo(){
getReceiptInfoByIds({ id: this.receiptId }).then(res => {
this.form = res.data
getCustomer(this.form.customerId).then(res => {
this.form.customerName = res?.data?.name
})
})
},
getCurrencyLabel(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
return ''
},
getListData(){
getInvoicingItem({ id: this.receiptId }).then(res => {
this.list = [...res.data]
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
})
}
this.showCurrencyId = 1
if (groupList.length === 1) this.showCurrencyId = groupList[0].currencyId
})
},
getCollectionData(){
getReceiptAccountList({ id: this.receiptId }).then(res => {
var n
// 收款总计
var amountList =[]
this.currencyList.forEach((item,index)=>{
var nairaListByList = this.list.filter(v => v.currencyId === item.id)
if(nairaListByList.length>0){
var discountNaira = nairaListByList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
n = res.data.find(v => v.currencyId == item.id)
n && (n.discountTotal = discountNaira)
}
var dollarList = res.data.filter(v => v.collectionCurrencyId == item.id)
if(dollarList.length>0){
var dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0).toFixed(2)
amountList.push({currencyId:item.id,currencyNameEn:item.titleEn,currencyNameZh:item.titleZh,amount:dollar})
}
})
this.$set(this,'collectionAmount',amountList)
this.handleAddReceiptItem()
})
},
handleAddReceiptItem() {
// 已收
let recepted = []
this.detailed.forEach(item => {
if(!recepted[item.currencyId]){
recepted[item.currencyId] = item.amount
}else recepted[item.currencyId] = NP.plus(recepted[item.currencyId], item.amount)
})
// 应收
let collom = []
// 从期望收费金额中提取应收币种和金额
this.collectionAmount.forEach(item => {
collom[item.currencyId] = item.amount
})
console.log(recepted)
recepted.forEach((amount,currency)=>{
if(amount){
if(collom[currency]){
if((collom[currency]-amount)!=0) this.surplusData[currency] = +parseFloat((collom[currency]-amount).toPrecision(12))
}else{
this.surplusData[currency] = -amount
}
}
})
console.log(collom)
collom.forEach((amount,currency)=>{
if(amount){
if(!this.surplusData[currency]){
if(recepted[currency]){
if((amount-recepted[currency])!=0) this.surplusData[currency] = +parseFloat((amount-recepted[currency]).toPrecision(12))
}else{
this.surplusData[currency] = amount
}
}
}
})
console.log(this.surplusData)
},
}
}
</script>
<style scoped lang="scss">
.btn{
margin-top: 20px;
}
.app-container {
::v-deep .el-descriptions-item__label {
font-size:16px;
font-weight:600;
}
::v-deep .el-descriptions-item__content {
font-size:16px;
font-weight:600;
}
}
</style>
<template>
<div>
<div class="app-container">
<el-descriptions :column="5" >
<el-descriptions-item :label="$t('收款单编号')">{{ form.receiptNo }}</el-descriptions-item>
<el-descriptions-item :label="$t('客户')">{{ form.customerName }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">
<template >
<span>{{ parseTime(form.createTime, '{y}-{m}-{d}') }}</span>
</template></el-descriptions-item>
<el-descriptions-item :label="$t('业务员')">{{ form.salesmanName }}</el-descriptions-item>
<el-descriptions-item :label="$t('期望收款金额')">
<template>
<div v-for="itemAmount in collectionAmount" :key="itemAmount.currencyNameZh">{{$i18n.locale=='zh_CN'?itemAmount.currencyNameZh:itemAmount.currencyNameEn}}: {{ itemAmount.amount}}</div>
</template>
</el-descriptions-item>
</el-descriptions>
</div>
<el-descriptions :column="3" border>
<el-descriptions-item >
<template slot="label">
{{ $t('实收已核销总金额') }}
<span :title="$t('所有银行收款明细中状态为已核销的实收金额,币种根据实收币种分类统计')"><i class="el-icon-question"></i></span>
</template>
<template v-if="!Object.keys(writeOffTotal).length">
0
</template>
<div v-else>
<div v-for="(amount, currency) in writeOffTotal" :key="currency">
{{amount}}{{getCurrencyLabel(currency)}}
</div>
</div>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
{{ $t('核销基准币种已核销总金额') }}{{getCurrencyLabel(showCurrencyId)}}
<span :title="$t('为了方便统计收款单核销比例,将所有银行收款明细中状态为已核销的实收金额,转换为核销基准币种的金额累加')"><i class="el-icon-question"></i></span>
</template>
{{ writeOffAmount}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
{{ $t('总核销比例') }}{{getCurrencyLabel(showCurrencyId)}}
<span :title="$t('总核销比例=核销基准币种已核销总金额/核销基准币种应收总金额')"><i class="el-icon-question"></i></span>
</template>
{{ WriteOffProportion }}%
</el-descriptions-item>
</el-descriptions>
<div class="btn">
<el-button
size="mini"
type="primary"
@click="$router.push('/financial/receiptDetail?id=' + receiptId)"
>{{ $t('查看收款单')}}</el-button>
</div>
</div>
</template>
<script>
import { getCustomer } from '@/api/ecw/customer'
import {
getReceiptInfoByIds,
getInvoicingItem,
getReceiptAccountList,
getReceivableItem,
getReceiptApprove
} from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision'
export default {
props:{
id: [String, Number]
},
data() {
return {
form: {},
collectionAmount: [],
currencyList:[],
list:[],
writeOffAmounts:0,
detailed:[],
showCurrencyId:0,
receiptId:0
}
},
watch:{
id(){
this.getCurrencyData()
},
currencyList(){
this.getData()
},
form(){
this.getListData()
},
list(){
this.getList()
this.getCollectionData()
}
},
created() {
if(this.id){
this.getCurrencyData()
}
},
computed: {
// 已核销总金额
writeOffTotal(){
let total = {}
this.detailed.forEach(item => {
if(item.status){
if(!total[item.currencyId]){
total[item.currencyId] = item.amount
}else total[item.currencyId] = NP.plus(total[item.currencyId], item.amount)
}
})
return total
},
// 已核销总金额
writeOffAmount(){
let total = 0
this.detailed.forEach(item => {
if(item.status){
total = NP.plus(total, item.writeOffAmount)
}
})
return total.toFixed(2)
},
WriteOffProportion(){
let total = 0
if(!this.writeOffAmounts) return 0
let amountTotal = this.writeOffAmounts
this.detailed.forEach(item => {
if(item.status){
total = NP.plus(total, item.writeOffAmount)
}
})
let portion = NP.divide(total,amountTotal)
return (portion*100).toFixed(2)
}
},
methods: {
getData(){
getReceiptApprove(this.id).then(res => {
if(res.data.receiptId){
this.receiptId = res.data.receiptId
this.getReceiptInfo()
}
})
},
getList() {
getReceivableItem({ id: this.receiptId }).then(res => {
this.detailed = res.data.map(v => ({
...v,
amountDate: this.parseTime(v.amountDate, '{y}-{m}-{d}'),
accountNo: +v.accountNo,
rate:parseFloat(v.rate).toFixed(6),
attr: v.attr ? v.attr.split(',').map(t => ({ name: t.slice(t.lastIndexOf('/') + 1), url: t })) : []
}))
})
},
// 获取汇率
getCurrencyData(){
getCurrencyPage(this.params).then(res => {this.currencyList = res.data.list})
},
getReceiptInfo(){
getReceiptInfoByIds({ id: this.receiptId }).then(res => {
this.form = res.data
getCustomer(this.form.customerId).then(res => {
this.form.customerName = res?.data?.name
})
})
},
getListData(){
getInvoicingItem({ id: this.receiptId }).then(res => {
this.list = [...res.data]
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
})
}
this.showCurrencyId = 1
if (groupList.length === 1) this.showCurrencyId = groupList[0].currencyId
})
},
getCollectionData(){
getReceiptAccountList({ id: this.receiptId }).then(res => {
var n
// 收款总计
var amountList =[]
this.currencyList.forEach((item,index)=>{
var nairaListByList = this.list.filter(v => v.currencyId === item.id)
if(nairaListByList.length>0){
var discountNaira = nairaListByList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
n = res.data.find(v => v.currencyId == item.id)
n && (n.discountTotal = discountNaira)
}
var dollarList = res.data.filter(v => v.collectionCurrencyId == item.id)
if(dollarList.length>0){
var dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.collectionAmount), 0).toFixed(2)
amountList.push({currencyId:item.id,currencyNameEn:item.titleEn,currencyNameZh:item.titleZh,amount:dollar})
}
})
this.writeOffAmounts = res.data.reduce((total, currentValue) => NP.plus(total, currentValue.writeOffAmount || 0), 0),
console.log(this.writeOffAmounts)
this.$set(this,'collectionAmount',amountList)
})
},
getCurrencyLabel(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
return ''
},
}
}
</script>
<style scoped lang="scss">
.btn{
margin-top: 20px;
}
.app-container {
::v-deep .el-descriptions-item__label {
font-size:16px;
font-weight:600;
}
::v-deep .el-descriptions-item__content {
font-size:16px;
font-weight:600;
}
}
</style>
<template>
<div class="app-container">
<el-descriptions :column="5" >
<el-descriptions-item :label="$t('付款单编号')">{{ form.paymentNo }}</el-descriptions-item>
<el-descriptions-item :label="$t('供应商名称')">{{ form.supplierName }}</el-descriptions-item>
<el-descriptions-item :label="$t('创建时间')">
<template >
<span>{{ parseTime(form.createTime, '{y}-{m}-{d}') }}</span>
</template></el-descriptions-item>
<el-descriptions-item :label="$t('业务员')">{{ form.salesmanName }}</el-descriptions-item>
<el-descriptions-item :label="$t('付款金额')">{{paymentMoney}}{{$t('人民币')}}</el-descriptions-item>
</el-descriptions>
<div class="btn">
<el-button
size="mini"
type="primary"
@click="$router.push('/financial/paymentDetail?id=' + paymentId)"
>{{ $t('查看付款单')}}</el-button>
</div>
</div>
</template>
<script>
import {
getPaymentApprove,
getPaymentInfoByIds,
getPaymentItem
} from "@/api/ecw/financial";
export default {
props:{
id: [String, Number]
},
data() {
return {
form: {},
list:[],
paymentId:0,
paymentMoney:0
}
},
watch:{
id(){
this.getData()
},
form(){
this.getListData()
},
},
created() {
if(this.id){
this.getData()
}
},
methods: {
getData(){
getPaymentApprove(this.id).then(res => {
if(res.data.paymentId){
this.paymentId = res.data.paymentId
this.getPayableInfo()
}
})
},
getPayableInfo(){
getPaymentInfoByIds({ id: this.paymentId }).then(res => {
this.form = res.data
})
},
getListData(){
getPaymentItem({ id: this.paymentId }).then(res => {
this.list = [...res.data]
const t = this.list.map(v => v.total).reduce((prev, curr) => {
return parseFloat(prev) + parseFloat(curr);
}, 0)
this.paymentMoney = t
})
},
}
}
</script>
<style scoped lang="scss">
.btn{
margin-top: 20px;
}
.app-container {
::v-deep .el-descriptions-item__label {
font-size:16px;
font-weight:600;
}
::v-deep .el-descriptions-item__content {
font-size:16px;
font-weight:600;
}
}
</style>
......@@ -13,12 +13,11 @@
<!-- <el-descriptions :column="3" border>-->
<!-- <el-descriptions-item > -->
<el-form-item
:label="$t('客户')"
style="margin-bottom: 0;margin-top: 20px;"
prop="customerId"
:span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('客户不能为空') }"
>
<span style="margin-right:20px"><span style="color: #ff4949;">*</span>{{$t('客户')}}</span>
<customer-selector
v-model="form.customerId"
@change="customerChange"
......@@ -27,12 +26,11 @@
<!-- </el-descriptions-item>
<el-descriptions-item > -->
<el-form-item
:label="$t('部门')"
style="margin-bottom: 0;margin-top: 20px;"
prop="departmentId"
:span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('部门不能为空') }"
>
<span style="margin-right:20px"><span style="color: #ff4949;">*</span>{{$t('部门')}}:</span>
<el-select
v-model="form.departmentId"
style="width: 300px"
......@@ -47,12 +45,11 @@
</el-select>
</el-form-item>
<el-form-item
:label="$t('业务员')"
style="margin-bottom: 0;margin-top: 20px;"
prop="salesmanId"
:span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('业务员不能为空') }"
>
<span style="margin-right:20px"><span style="color: #ff4949;">*</span>{{$t('业务员')}}:</span>
<el-select v-model="form.salesmanId" filterable :placeholder="$t('请选择业务员')" @change="v => form.salesmanName = creatorData.find(t => t.id === v).nickname">
<el-option
v-for="item in creatorData"
......@@ -78,11 +75,12 @@
<!-- </el-descriptions-item>
<el-descriptions-item > -->
<el-form-item
:label="$t('备注')"
:label="$t('备注')+':'"
style="margin-bottom: 0;margin-top: 20px;"
label-width="55px"
prop="remark"
>
<el-input v-model="form.remark" :placeholder="$t('备注')"></el-input>
<el-input style="display:inline-block;" v-model="form.remark" :placeholder="$t('备注')"></el-input>
</el-form-item>
<!-- </el-descriptions-item> -->
<!-- </el-descriptions> -->
......@@ -100,7 +98,7 @@
>{{ $t('添加未收客户款项') }}</el-button
>
</el-col>
<el-table v-loading="loadings" :data="list" border>
<el-table v-loading="loadings" :data="list" border :key="isUpdate">
<el-table-column :label="$t('订单号')" align="center" prop="orderNo" />
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('品名')" align="center" prop="title">
......@@ -128,13 +126,23 @@
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
<el-table-column :label="$t('总金额')" align="center" prop="totalAmount">
<el-table-column :label="$t('税率%')" align="center" prop="totalAmount">
<template slot-scope="scope">
<el-input type="text" v-model="scope.row.taxPoint" @input="changeTaxRate(scope.row,scope.$index)"></el-input>
</template>
</el-table-column>
<el-table-column :label="$t('不含税金额')" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('含税金额')" align="center" prop="taxAmount">
<template slot-scope="scope">
<span>{{ scope.row.taxAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
</el-table-column>
<el-table-column :label="$t('优惠金额')" align="center">
<template slot-scope="scope">
<span> {{ scope.row.discountTotal ? `${scope.row.discountTotal}`:0}}</span>
......@@ -153,12 +161,10 @@
<!-- <el-descriptions :column="2" border class="card">
<el-descriptions-item > -->
<el-form-item
:label="$t('是否需要开票')+':'"
style="margin-bottom: 0;margin-top: 20px;"
prop="openInvoice"
required
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('请选择是否需要开票') }"
>
<span style="margin-right:20px"><span style="color: #ff4949;">*</span>{{$t('是否需要开票')}}:</span>
<el-select
v-model="form.openInvoice"
:placeholder="$t('请选择是否需要开票')"
......@@ -180,6 +186,7 @@
</el-descriptions-item>
</el-descriptions> -->
</el-card>
<el-card v-if="showInvoice" class="card">
<div slot="header" class="card-title">{{ $t('开票资料') }}</div>
<el-descriptions :column="3" border>
......@@ -395,10 +402,21 @@
</el-descriptions>
</el-card>
</el-form>
<div slot="footer" style="margin: 20px 0">
<!-- <div slot="footer" style="margin: 20px 0">
<el-button v-if="id==0||form.state==0" type="primary" :loading="saveBtnLoading" @click="submitForm(1)">{{ $t('保存草稿') }}</el-button>
<el-button v-else type="primary" :loading="saveBtnLoading" @click="$store.dispatch('tagsView/delCurrentView')">{{ $t('返回') }}</el-button>
<el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id&&form.state!=0 ? $t('修改') : $t('新增收款单') }}</el-button>
</div> -->
<div slot="header" class="bpm-title">{{ $t('审核流程') }}</div>
<work-flow xmlkey="merge_order" v-model="form.copyUserList"></work-flow>
<div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="submitForm(0)">{{$t('提交申请')}}</el-button>
<el-button v-if="id==0||form.state==0" type="primary" :loading="saveBtnLoading" @click="submitForm(1)">{{ $t('保存草稿') }}</el-button>
<el-button v-if="orderData.inWarehouseState==207" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+orderApprovalBackVO.applyingFormId)">{{$t('审核中')}}</el-button>
<!-- <el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="dialogVisible = true">{{$t('取消审核')}}</el-button> -->
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
<!-- <el-button type="primary" :loading="saveBtnLoading" @click="submitForm(0)">{{ id&&form.state!=0 ? $t('修改') : $t('新增收款单') }}</el-button> -->
</div>
<el-dialog
:visible.sync="open"
......@@ -614,13 +632,13 @@
</el-table-column>
<el-table-column :label="$t('总金额')" align="center" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
<span>{{ scope.row.taxAmount }}{{getCurrencyLabel(scope.row.currencyId)}}</span>
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="scope.row.currencyId" /> -->
</template>
</el-table-column>
</el-table>
<el-form-item :label="$t('总金额')">
{{ selectListRow.totalAmount }}{{getCurrencyLabel(selectListRow.currencyId)}}
{{ selectListRow.taxAmount }}{{getCurrencyLabel(selectListRow.currencyId)}}
</el-form-item>
<el-form-item :label="$t('优惠金额')">
<el-input v-model="discountForm.discountTotal" type="number" min="0" :max="selectListRow.totalAmount" @input="checkDiscount" style="width: 300px" ></el-input>
......@@ -631,7 +649,7 @@
<el-input v-model="discountForm.discountRemark" type="textarea" style="width: 300px"></el-input>
</el-form-item>
<el-form-item :label="$t('优惠后')">
{{ (selectListRow.totalAmount - (discountForm.discountTotal || 0)).toFixed(2)}}
{{ (selectListRow.taxAmount - (discountForm.discountTotal || 0)).toFixed(2)}}
{{getCurrencyLabel(selectListRow.currencyId)}}
</el-form-item>
<el-form-item v-if="opnotice" :label="$t('操作人')">
......@@ -667,11 +685,12 @@ import ret from "bluebird/js/release/util";
import dayjs from "dayjs";
import { getUserProfile } from "@/api/system/user";
import {getWarehouseList} from '@/api/ecw/warehouse'
import WorkFlow from '@/components/WorkFlow/'
export default {
name: "CreatCollection",
components: {
CustomerSelector,
CustomerSelector,WorkFlow
},
data() {
return {
......@@ -718,7 +737,10 @@ export default {
selectListRow: {},
selectListIndex: 0,
flag: false,
warehouseList:[]
warehouseList:[],
selectedUsers:[],
dialogVisible:false,
isUpdate:false
};
},
async created() {
......@@ -732,6 +754,11 @@ export default {
if (that.$route.query.orderId) {
await getFirstReceivableListByOrderId({id:that.$route.query.orderId}).then(response => {
this.list = [...response.data]
this.list.map(v=>{
if(!v.taxPoint){
v.taxAmount = v.totalAmount
}
})
getOrder(that.$route.query.orderId).then(response => {
// console.log(response.data)
if(response.data.customerId) this.$set(this.form,'customerId',response.data.customerId)
......@@ -743,11 +770,16 @@ export default {
this.id = this.$route.query.id;
console.log(this.id)
getReceiptInfoByIds({ id: this.id }).then(res => {
res.data.rateValidateDate = dayjs(res.data.rateValidateDate).format('YYYY-MM-DD HH:mm:ss')
if(res.data.rateValidateDate) res.data.rateValidateDate = dayjs(res.data.rateValidateDate).format('YYYY-MM-DD HH:mm:ss')
this.form = Object.assign({}, this.form, res.data)
})
await getInvoicingItem({ id: this.id }).then(res => {
this.list = [...res.data]
this.list.map(v=>{
if(!v.taxPoint){
v.taxAmount = v.totalAmount
}
})
})
getReceiptAccountList({ id: this.id }).then(res => {
if (res.data.length > 0) {
......@@ -786,6 +818,11 @@ export default {
this.receiptId = this.$route.query.receiptId;
getReceivableInfoByIds({ id: this.receiptId }).then(res => {
this.list = [{...res.data}]
this.list.map(v=>{
if(!v.taxPoint){
v.taxAmount = v.totalAmount
}
})
this.calculation()
getOrder(res.data.orderId).then(response => {
......@@ -919,6 +956,25 @@ export default {
this.$set(this.form, 'receiptAccountList', [...this.form.receiptAccountList])
}, 100)
},
//明细改变税率
changeTaxRate(row,index){
var regs=/^\d+$/;
if(row.taxPoint&&!regs.test(row.taxPoint)){
row.taxPoint = 0
this.$modal.msgError(this.$t('输入税率格式不对'));
}
if(row.taxPoint){
var amout = NP.times(NP.divide(row.taxPoint,100), row.totalAmount)
row.taxAmount = NP.plus(row.totalAmount,amout)
}else{
row.taxAmount = row.totalAmount
}
this.list[index] = {...row}
let dataArrTemp = JSON.stringify(this.list);
this.list= JSON.parse(dataArrTemp);
this.calculation()
},
calculation() {
const copyList = this.form.receiptAccountList
this.form.receiptAccountList = []
......@@ -926,7 +982,7 @@ export default {
var dollarList = this.list.filter(v => v.currencyId === item.id)
if(dollarList.length>0){
let dollar,discountDollar
dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.totalAmount || 0), 0)
dollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.taxAmount || 0), 0)
discountDollar = dollarList.reduce((total, currentValue) => NP.plus(total, currentValue.discountTotal || 0), 0)
var t = copyList.find(v => v.currencyId == item.id)
this.form.receiptAccountList.push(
......@@ -1133,6 +1189,8 @@ export default {
discountRemark: this.discountForm.discountRemark,
orderNo: this.selectListRow.orderNo,
orderId: this.selectListRow.orderId,
taxPoint:this.selectListRow.taxPoint,
taxAmount:this.selectListRow.taxAmount,
}
updateReceivableDiscountById(params).then(res => {
if (this.selectListRow.discountTotal) {
......@@ -1182,6 +1240,7 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.multipleSelection = this.list
this.open = true;
},
hiddenDialog() {
......@@ -1190,9 +1249,27 @@ export default {
submitForm(addType) {
const params = {...this.form}
params.addType = addType
// params.receiptAccountList = params.receiptAccountList.map(v => Object.assign(v, { }))
if(!params.customerId){
this.saveBtnLoading = false
this.$modal.msgError(this.$t('客户不能为空'));
return
}
if(!params.departmentId){
this.saveBtnLoading = false
this.$modal.msgError(this.$t('部门不能为空'));
return
}
if(!params.salesmanId){
this.saveBtnLoading = false
this.$modal.msgError(this.$t('业务员不能为空'));
return
}
if(!params.openInvoice){
this.saveBtnLoading = false
this.$modal.msgError(this.$t('请选择是否需要开票'));
return
}
if (this.list && this.list.length > 0) {
params.receivableVOList = this.list
}else{
......@@ -1244,8 +1321,9 @@ export default {
this.saveBtnLoading = true
params.receiptAccountList.splice(params.receiptAccountList.length - 1,1)
if (this.id && this.id != 0) {
params.updateType = 0
updateReceipt(params).then(res => {
this.$modal.msgSuccess(this.$t('修改成功'));
this.$modal.msgSuccess(this.$t('提交成功'));
this.$store.dispatch('tagsView/delCurrentView')
}).finally(() => {
this.saveBtnLoading = false
......@@ -1268,7 +1346,8 @@ export default {
this.saveBtnLoading = true
params.receiptAccountList.splice(params.receiptAccountList.length - 1,1)
if (this.id && this.id != 0) {
if(params.state==0) params.state = 1
// if(params.state==0) params.state = 1
params.updateType = 1
updateReceipt(params).then(res => {
this.$modal.msgSuccess(this.$t('修改成功'));
this.$store.dispatch('tagsView/delCurrentView')
......@@ -1290,8 +1369,33 @@ export default {
handleSelectionChange(val) {
this.multipleSelection = val;
},
removedup(arr, batch) {
if (!Array.isArray(arr)) {
return arr;
}
if (arr.length == 0) {
return [];
}
let obj = {};
let uniqueArr = arr.reduce(function (total, item) {
obj[item[batch]] ? '' : (obj[item[batch]] = true && total.push(item));
return total;
}, []);
return uniqueArr;
},
saveSelectList() {
this.list = this.multipleSelection
this.multipleSelection.map(v=>{
if(!v.taxPoint){
v.taxAmount = v.totalAmount
}
})
if(this.list.length>0){
this.list = this.list.concat(this.multipleSelection)
this.list = this.removedup(this.list,'id')
}else{
this.list = this.multipleSelection
}
this.open = false;
this.calculation()
},
......@@ -1332,4 +1436,10 @@ export default {
width: 30%;
}
}
.bpm-title{
font-size: 20px;
font-weight: bold;
color:#666;
margin:20px 0;
}
</style>
......@@ -248,17 +248,35 @@
</el-descriptions>
</el-form>
</el-card>
<!-- <div slot="header" class="bpm-title">{{ $t('审核流程') }}</div>
<work-flow xmlkey="merge_order" v-model="selectedUsers"></work-flow>
<div slot="header" class="bpm-title">{{ $t('审核流程') }}</div>
<work-flow xmlkey="merge_order" v-model="form.copyUserList"></work-flow>
<div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="submitForm(0)">{{$t('提交审核')}}</el-button>
<el-button type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{ $t('关闭') }}</el-button>
</div> -->
<div slot="footer" style="margin: 20px 0">
<el-button v-if="id==0||form.state==0" type="primary" @click="submitForm(1)">{{$t('提交申请')}}</el-button>
<el-button v-if="id==0||form.state==0" type="primary" @click="submitForm(0)">{{ $t('保存草稿') }}</el-button>
<el-button v-if="form.state==1" type="primary" @click="$router.push(`/bpm/process-instance/detail?id=`+bpmId)">{{$t('审核中')}}</el-button>
<!-- <el-button v-if="form.state==1" plain type="primary" @click="dialogVisible = true">{{$t('取消审核')}}</el-button> -->
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</div>
<!-- <div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="submitDraft">{{ $t('保 存') }}</el-button>
<el-button type="primary" @click="submitForm">{{id==0?$t('新增'):$t('编辑')}}</el-button>
</div>
</div> -->
<el-dialog
:title="$t('提示')"
:visible.sync="dialogVisible"
width="30%">
<span class="cancel_notice">{{$t('付款单申请正在审核中,你确定取消付款单申请吗?')}}</span>
<div class="cancel_content">
<span>{{$t('取消原因:')}}</span>
<el-input v-model="reason" :placeholder="$t('请输入取消原因')"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
<el-button type="primary" @click="cancelApproval">{{$t('确定')}}</el-button>
</span>
</el-dialog>
<el-dialog
:visible.sync="open"
:title="$t('添加未付供应商款项')"
......@@ -455,6 +473,7 @@ export default {
channelList: [],
loading: "",
bankData: [],
reason:'',
params: {
page: 1,
rows: 20,
......@@ -470,7 +489,8 @@ export default {
allSupplier: [],
currencyList: [],
warehouseList:[],
selectedUsers:[]
selectedUsers:[],
dialogVisible:false
};
},
async created() {
......@@ -587,12 +607,13 @@ export default {
handleAdd() {
this.open = true;
},
submitForm() {
submitForm(addType) {
this.$refs.form.validate ((valid)=>{
if (valid) {
this.$refs.forms.validate((val) => {
if (val) {
const params = {...this.form}
params.addType = addType
if (this.list && this.list.length > 0) {
params.payableReqVOList = [...this.list]
}else{
......@@ -605,7 +626,7 @@ export default {
}
if (this.id && this.id !== '0') {
updatePayment(params).then(res => {
this.$modal.msgSuccess(this.$t('修改成功'));
this.$modal.msgSuccess(this.$t('申请成功'));
this.$router.back();
})
} else {
......@@ -696,6 +717,9 @@ export default {
this.list = this.multipleSelection
}
this.open = false;
},
cancelApproval(){
},
convertCurrency(money) {
//汉字的数字
......
......@@ -53,20 +53,21 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('状态')">
<dict-selector :type="DICT_TYPE.ECW_PAYMENT_STATE" v-model="queryParams.state" />
<dict-selector :type="DICT_TYPE.PAYMENT_STATE" v-model="queryParams.state"/>
</el-form-item>
</el-row>
<el-row :span="24">
<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="form.salesmanId" filterable :placeholder="$t('请选择业务员')" @change="v => form.salesmanName = creatorData.find(t => t.id === v).nickname">
<!-- <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="form.salesmanId" filterable :placeholder="$t('请选择业务员')"
@change="v => form.salesmanName = creatorData.find(t => t.id === v).nickname">
<el-option
v-for="item in creatorData"
:key="item.id"
......@@ -90,8 +91,8 @@
v-model="queryParams.invoiceStatus"
:placeholder="$t('请选择是否开票')"
>
<el-option :label="$t('未开票')" value="0" />
<el-option :label="$t('已开票')" value="1" />
<el-option :label="$t('未开票')" value="0"/>
<el-option :label="$t('已开票')" value="1"/>
</el-select>
</el-form-item>
<el-form-item>
......@@ -106,12 +107,12 @@
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('付款单号')" align="center" prop="paymentNo" >
<template slot-scope="scope">
<span style="color: #1890ff;" @click="paymentDetail(scope.row)">{{scope.row.paymentNo}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('供应商')" align="center" prop="supplierName" />
<el-table-column :label="$t('付款单号')" align="center" prop="paymentNo">
<template slot-scope="scope">
<span style="color: #1890ff;" @click="paymentDetail(scope.row)">{{ scope.row.paymentNo }}</span>
</template>
</el-table-column>
<el-table-column :label="$t('供应商')" align="center" prop="supplierName"/>
<el-table-column :label="$t('创建时间')" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
......@@ -140,18 +141,37 @@
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" @click="handleAdd(scope.row.id)" v-hasPermi="['ecw:paymentVoucher:edit']" type="text">{{ $t('编辑') }}</el-button>
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" v-hasPermi="['ecw:paymentVoucher:process']" type="text" @click="examineClick(scope.row.id)">{{ $t('审核') }}</el-button>
<template v-slot="{row}">
<el-button v-if="[0,2].includes(row.state)" size="mini" @click="handleAdd(row.id)"
v-hasPermi="['ecw:paymentVoucher:edit']" type="text">{{ $t('编辑') }}
</el-button>
<!-- <el-button v-if="[1,3].includes(row.state)" size="mini" v-hasPermi="['ecw:paymentVoucher:process']" type="text" @click="examineClick(scope.row.id)">{{ $t('审核') }}</el-button>-->
<el-button type="text" v-if="[1].includes(row.state)" @click="bridgeFn(1, '取消审核',row)">
{{ $t('取消审核') }}
</el-button>
<el-button type="text" v-if="[1,7].includes(row.state)">{{ $t('审核详情') }}</el-button>
<el-button type="text" v-if="[4,7].includes(row.state)" @click="bridgeFn(2, '取消付款单反审核',row)" >{{ $t('取消反审核') }}</el-button>
<el-button type="text" v-if="[5].includes(row.state)" @click="bridgeFn(3, '取消付款单核销',row)" >{{ $t('取消核销审核') }}</el-button>
<el-button v-if="scope.row.state == 2" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:print']" @click="verifyCancelClick(scope.row)">{{ $t('反审核') }}</el-button>
<el-button v-if="scope.row.state == 2" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:writeOff']" @click="verificationClick(scope.row)">{{ $t('核销') }}</el-button>
<el-button v-if="[4].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:print']"
@click="verifyCancelClick(row)">{{ $t('反审核') }}
</el-button>
<el-button v-if="[4].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:writeOff']"
@click="verificationClick(row)">{{ $t('核销') }}
</el-button>
<el-button v-if="scope.row.state == 4" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:cancelWriteOff']" @click="verificationCancelClick(scope.row)">{{ $t('反核销') }}</el-button>
<el-button v-if="[6].includes(row.state)" size="mini" type="text"
v-hasPermi="['ecw:paymentVoucher:cancelWriteOff']" @click="verificationCancelClick(row)">
{{ $t('反核销') }}
</el-button>
<!-- <el-button v-if="scope.row.state == 3" size="mini" type="text">{{ $t('开票') }}</el-button> -->
<el-button size="mini" type="text" @click="toprint(scope.row.id)" v-hasPermi="['ecw:paymentVoucher:print']">{{ $t('打印') }}</el-button>
<el-button v-if="scope.row.state == 1 || scope.row.state == 3" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:delete']" @click="deleteClick(scope.row)">{{ $t('删除') }}</el-button>
<el-button v-if="[6,4].includes(row.state)" size="mini" type="text" @click="toprint(row.id)"
v-hasPermi="['ecw:paymentVoucher:print']">{{ $t('打印') }}
</el-button>
<el-button v-if="[0,2].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:delete']"
@click="deleteClick(row)">{{ $t('删除') }}
</el-button>
<!-- <el-button size="mini" type="text" @click="open = true">{{ $t('导出订单') }}</el-button> -->
</template>
</el-table-column>
......@@ -182,26 +202,50 @@
</div>
<div class="dialog-footer">
<el-button type="primary" style="width: 130px" @click="submitForm"
>{{ $t('国内账单') }}</el-button
>{{ $t('国内账单') }}
</el-button
>
<el-button
plain
type="primary"
style="width: 130px; margin: 0"
@click="submitForm"
>Debite note</el-button
>Debite note
</el-button
>
</div>
</el-dialog>
<!--对话框 审核 -->
<el-dialog width="30%" :title="examineTitle" :visible.sync="examineShow">
<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="cancelWriteOffClick()">{{ $t('提交') }}</el-button>
<el-button @click="examineShow = false">{{ $t('取消') }}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { userList,listSimpleUsers } from "@/api/system/user";
import { DICT_TYPE } from "@/utils/dict";
import {userList, listSimpleUsers} from "@/api/system/user";
import {DICT_TYPE} from "@/utils/dict";
import CustomerSelector from "@/components/CustomerSelector";
import { getSupplierPage } from "@/api/ecw/supplier";
import { getPaymentList, deletePayment, paymentVerification, paymentVerificationCancel, paymentVerifyCancel } from "@/api/ecw/financial"
import {getSupplierPage} from "@/api/ecw/supplier";
import {
getPaymentList,
deletePayment,
paymentVerification,
paymentVerificationCancel,
paymentVerifyCancel,
cancelFinancePaymentApproval,
cancelFinancePaymentApprovalNo,
cancelFinancePaymentWriteOff,
cancelFinancePaymentWriteOffNo
} from "@/api/ecw/financial"
export default {
name: "EcwFinancialPaymentvoucher",
......@@ -210,6 +254,11 @@ export default {
},
data() {
return {
examineShow: false,
examineTitle: '',
examineIndex: 0,
examineData: {},
cancelReason: '',
open: false,
showSearch: true,
loadings: false,
......@@ -245,15 +294,15 @@ export default {
},
};
},
activated(){
activated() {
this.handleQuery()
},
created() {
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) => {
const { data } = res;
getSupplierPage({pageNo: "1", pageSize: "10000"}).then((res) => {
const {data} = res;
this.allSupplier = data.list;
});
this.getList()
......@@ -263,7 +312,7 @@ export default {
getList() {
this.loading = true;
// 处理查询参数
let params = { ...this.queryParams };
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.queryParams.beginCreateTime, "createTime");
// 执行查询
getPaymentList(params).then((response) => {
......@@ -272,7 +321,7 @@ export default {
this.loading = false;
});
},
paymentDetail(row){
paymentDetail(row) {
const id = row.id;
return this.$router.push("paymentDetail?id=" + id);
},
......@@ -302,39 +351,43 @@ export default {
},
deleteClick(row) {
const id = row.id;
this.$modal.confirm(this.$t('是否确认删除该付款单')+'?').then(function() {
this.$modal.confirm(this.$t('是否确认删除该付款单') + '?').then(function () {
return deletePayment(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('删除成功'));
}).catch(() => {});
}).catch(() => {
});
},
verificationClick(row) {
const id = row.id;
this.$modal.confirm(this.$t('您确认要核销吗')+'?').then(function() {
this.$modal.confirm(this.$t('您确认要核销吗') + '?').then(function () {
return paymentVerification(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('核销成功'));
}).catch(() => {});
}).catch(() => {
});
},
verificationCancelClick(row) {
const id = row.id;
this.$modal.confirm(this.$t('您确认要反核销吗')+'?').then(function() {
this.$modal.confirm(this.$t('您确认要反核销吗') + '?').then(function () {
return paymentVerificationCancel(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('反核销成功'));
}).catch(() => {});
}).catch(() => {
});
},
verifyCancelClick(row) {
const id = row.id;
this.$modal.confirm(this.$t('您确认要反审核吗')+'?').then(function() {
this.$modal.confirm(this.$t('您确认要反审核吗') + '?').then(function () {
return paymentVerifyCancel(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('反审核成功'));
}).catch(() => {});
}).catch(() => {
});
},
toprint(id) {
return this.$router.push("printPaymentVoucher?id=" + id);
......@@ -346,14 +399,50 @@ export default {
cancel() {
this.open = false;
},
bridgeFn(index, title, row) {
this.examineIndex = index;
this.examineTitle = title;
this.examineData = row;
this.examineShow = true;
},
cancelWriteOffClick() {
if(!this.cancelReason){
return this.$message.warning(this.$t('请输入申请理由!'))
}
let successFn = () => {
this.getList();
this.$message('取消成功');
this.examineShow = false;
}
let loserFn = () => {
this.examineShow = false;
}
let {id: paymentId} = this.examineData
let p = {paymentId, remark: this.cancelReason}
switch (this.examineIndex) {
case 1:
// 取消审核
cancelFinancePaymentApproval(p).then(successFn,loserFn)
break
case 2:
// 取消付款单反审核
cancelFinancePaymentApprovalNo(p).then(successFn,loserFn)
break
case 3:
//取消付款单核销
cancelFinancePaymentWriteOffNo(p).then(successFn,loserFn)
case 4:
}
}
},
};
</script>
<style scoped>
<style scoped>
.card {
margin-top: 20px;
}
.dialog-footer {
padding: 30px;
display: flex;
......@@ -362,6 +451,7 @@ export default {
justify-content: space-between;
height: 160px;
}
.card-title {
font-size: 18px;
font-weight: bold;
......
......@@ -180,7 +180,7 @@
<span v-if="scope.row.type !== 'total'">{{ scope.row.collectionRate }}</span>
<span v-else>{{ $t('期望收费金额') }}
<span :title="$t('导出账单给客户时显示的收款金额与币种')"><i class="el-icon-question"></i></span>
</span>
</span>
</template>
</el-table-column>
......@@ -218,8 +218,8 @@
<el-card class="card">
<div slot="header" class="card-title">{{ $t('银行收款明细') }}</div>
<div>
<el-button type="primary" plain size="mini" @click="batchVerification" v-hasPermi="['ecw:payment:detail:batchWriteOff']" style="padding: 10px; margin-bottom: 10px">{{ $t('批量核销') }}</el-button>
<el-button type="primary" plain size="mini" @click="handleAddReceiptItem" v-hasPermi="['ecw:payment:detail:addBank']" style="padding: 10px; margin-bottom: 10px">{{ $t('添加收款明细') }}</el-button>
<el-button type="primary" v-if="form.state!=7&&form.state!=0" plain size="mini" @click="batchVerification" v-hasPermi="['ecw:payment:detail:batchWriteOff']" style="padding: 10px; margin-bottom: 10px">{{ $t('批量核销') }}</el-button>
<el-button type="primary" v-if="form.state!=7&&form.state!=0" plain size="mini" @click="handleAddReceiptItem" v-hasPermi="['ecw:payment:detail:addBank']" style="padding: 10px; margin-bottom: 10px">{{ $t('添加收款明细') }}</el-button>
</div>
<el-table ref="multipleTable" :data="detailed" border row-key="id" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="50" :reserve-selection="true"> </el-table-column>
......@@ -251,16 +251,22 @@
</el-table-column>
<el-table-column :label="$t('状态')" align="center" prop="status">
<template slot-scope="scope">
<span>{{ scope.row.status == 0 ? $t('待核销') : $t('已核销') }}</span>
<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 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="verificationClick(scope.row)" v-hasPermi="['ecw:payment:detail:writeOff']">{{ $t('核销') }}</el-button>
<el-button v-if="scope.row.status == 1" type="text" @click="verificationCancelClick(scope.row)" v-hasPermi="['ecw:payment:detail:cancelWriteOff']">{{ $t('反核销') }}</el-button>
<el-button v-if="scope.row.status == 0 || scope.row.status == 1" 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:writeOff']">{{ $t('审核详情') }}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -306,9 +312,11 @@
</el-descriptions>
</el-card>
<div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="toEdit" v-hasPermi="['ecw:payment:detail:edit']">{{ $t('编辑') }}</el-button>
<el-button type="primary" @click="verificationAll" v-hasPermi="['ecw:payment:detail:allWriteOff']">{{ $t('全部核销') }}</el-button>
<el-button v-if="form.state!=7" type="primary" @click="toEdit" v-hasPermi="['ecw:payment:detail:edit']">{{ $t('编辑') }}</el-button>
<el-button v-if="form.state==7||form.state==0" plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
<el-button v-else type="primary" @click="verificationAll" v-hasPermi="['ecw:payment:detail:allWriteOff']">{{ $t('全部核销') }}</el-button>
</div>
<el-dialog v-if="openAddDialog" :visible.sync="openAddDialog" :title="dialogTitle" width="50%" append-to-body>
<div style="padding: 0 24px">
<el-form ref="addForm" :model="addForm" label-width="250px">
......@@ -328,7 +336,7 @@
<el-select v-if="!isView" v-model="addForm.accountId" :placeholder="$t('请选择收款账户')" style="width: 220px" @change="accountChange">
<el-option v-for="item in bankData" :key="item.id" :label="item.baAccountName + '(' + item.baAccountNum + ')'" :value="item.id" />
</el-select>
<span v-else>{{ addForm.accountNo }}</span>
<span v-else>{{ addForm.accountNo+'('+addForm.accountName+')' }}</span>
</el-form-item>
<el-form-item
:label="$t('实收日期')"
......@@ -437,6 +445,32 @@
</div>
</div>
</el-dialog>
<el-dialog
:title="$t('收款单银行实收明细反核销-未提交')"
:visible.sync="dialogVisible"
width="30%">
<div class="cancel_content">
<span>{{$t('申请理由')}}</span>
<el-input type="textarea" :rows ="6" v-model="reason" :placeholder="$t('请输入理由')"></el-input>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="verificationCancelClick()">{{$t('提交反核销')}}</el-button>
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
</span>
</el-dialog>
<el-dialog
:title="$t('取消审核')"
:visible.sync="cancelShow"
width="30%">
<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-footer">
<el-button type="primary" @click="cancelWriteOffClick()">{{$t('提交')}}</el-button>
<el-button @click="cancelShow = false">{{$t('取消')}}</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -446,6 +480,7 @@ import { getBankAccountPage } from "@/api/ecw/bankAccount";
import { getToken } from "@/utils/auth";
import { listSimpleDepts } from "@/api/system/dept";
import { getCustomer } from '@/api/ecw/customer'
import {
getReceiptInfoByIds,
getInvoicingItem,
......@@ -457,13 +492,18 @@ import {
updateReceiptItem,
receiptItemBatchVerification,
receiptItemAllVerification,
getReceiptAccountList
getReceiptAccountList,
financeReceiptWriteOff,
financeReceiptItemWriteOffNo,
cancelFinanceReceiptItemWriteOff,
cancelFinanceReceiptItemWriteOffNo
} from "@/api/ecw/financial";
import { getCurrencyPage } from "@/api/ecw/currency";
import NP from 'number-precision'
export default {
data() {
return {
uploadFileUrl: process.env.VUE_APP_BASE_API + "/app-api/file/upload", // 上传的图片服务器地址
......@@ -501,7 +541,13 @@ export default {
rmbAmount: 0,
nairaAmount: 0
},
surplusData:[]
surplusData:[],
dialogVisible:false,
reason:'',
cancelShow:false,
cancelTitle:'',
cancelReason:'',
cancelType:1
}
},
computed: {
......@@ -790,6 +836,43 @@ export default {
NANtoRMB() {
return NP.divide(this.currencyList.find(v => v.titleEn === 'NGN').huilv, 100)
},
//显示反核销弹窗
showCancel(index){
this.selectIndex = index
this.reason = ''
this.dialogVisible = true
},
//取消审核弹窗
cancelClick(index,type){
this.selectIndex = index
this.cancelType = type
this.cancelReason = ''
this.cancelShow = true
},
//取消审核
cancelWriteOffClick(){
if(!this.cancelReason){
this.$modal.msgError(this.$t('请输入申请理由'));
return
}
var receiptItemId = this.detailed[this.selectIndex].id
if(this.cancelType==1){
cancelFinanceReceiptItemWriteOff({receiptItemId:receiptItemId,remark:this.cancelReason}).then(res=>{
this.cancelShow = false
this.getList()
this.$message.success(this.$t("提交成功"));
});
}else{
cancelFinanceReceiptItemWriteOffNo({receiptItemId:receiptItemId,remark:this.cancelReason}).then(res=>{
this.cancelShow = false
this.getList()
this.$message.success(this.$t("提交成功"));
});
}
},
currencyIdChange(val) {
val = Number(val)
let rate
......@@ -887,18 +970,23 @@ export default {
})
.catch(() => {});
},
verificationCancelClick(row) {
const id = row.id;
//银行明细反核销
verificationCancelClick() {
if(!this.reason){
this.$modal.msgError(this.$t('请输入申请理由'));
return
}
const id = this.detailed[this.selectIndex].id
this.$modal
.confirm(this.$t('您确认要反核销吗')+'?')
.then(function () {
return receiptItemVerificationCancel(id);
.then(()=>{
financeReceiptItemWriteOffNo({receiptId:this.id,receiptNo:this.form.receiptNo,receiptItemId:id,remark:this.reason}).then(res=>{
this.getList();
this.$message.success(this.$t("提交成功"));
this.dialogVisible = false
});
})
.then(() => {
this.getList();
this.$modal.msgSuccess(this.$t('反核销成功'));
})
.catch(() => {});
.catch(() => {this.dialogVisible = false});
},
handleSelectionChange(val) {
this.multipleSelection = val;
......@@ -931,7 +1019,7 @@ export default {
this.$modal
.confirm(this.$t('您确认要全部核销吗'+'?'))
.then(() => {
return receiptItemAllVerification(this.id);
return financeReceiptWriteOff({receiptId:this.id,receiptNo:this.form.receiptNo});
})
.then(() => {
this.$modal.msgSuccess(this.$t('核销成功'));
......@@ -1064,4 +1152,15 @@ export default {
width: 22%;
}
}
.cancel_content{
display: flex;
// align-items: center;
flex-direction: column;
// padding-top: 20px;
}
.cancel_content span{
font-size: 16px;
font-weight:600;
margin-bottom:10px
}
</style>
......@@ -245,6 +245,7 @@
:limit.sync="queryParams.rows"
@pagination="getList"
/>
</div>
</template>
......@@ -260,7 +261,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse'
export default {
name: "EcwFinancialReceivable",
components: {
CustomerSelector,
CustomerSelector
},
data() {
return {
......
......@@ -97,6 +97,7 @@
:type="DICT_TYPE.ECW_RECEIPT_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>
</template>
</el-table-column>
<el-table-column :label="$t('是否开票')" align="center">
......@@ -117,7 +118,7 @@
@click="verificationCancelClick(scope.row)"
>{{ $t('查看')}}</el-button>
<el-button
v-if="scope.row.state === 0 || scope.row.state == 1 || scope.row.state == 2 || scope.row.state == 3"
v-if="scope.row.state === 0"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:edit']"
......@@ -136,9 +137,49 @@
size="mini"
type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="verificationCancelClick(scope.row)"
@click="writeOffShow(2,scope.$index)"
>{{ $t('反核销') }}</el-button
>
<el-button
v-if="scope.row.state == 1"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="writeOffShow(1,scope.$index)"
>{{ $t('反审核') }}</el-button
>
<el-button
v-if="scope.row.state == 7"
size="mini"
type="text"
v-hasPermi="['ecw:vocher:cancelAppoval']"
@click="cancelClick(scope.$index,1)"
>{{ $t('取消审核') }}</el-button
>
<el-button
v-if="scope.row.state == 11"
size="mini"
type="text"
v-hasPermi="['ecw:vocher:cancelWriteOfflNo']"
@click="cancelClick(scope.$index,3)"
>{{ $t('取消反核销审核') }}</el-button
>
<el-button
v-if="scope.row.state == 9"
size="mini"
type="text"
v-hasPermi="['ecw:vocher:cancelAppovalNo']"
@click="cancelClick(scope.$index,2)"
>{{ $t('取消反审核') }}</el-button
>
<el-button
size="mini"
type="text"
v-if="scope.row.state == 9 || scope.row.state == 7 || scope.row.state == 11|| scope.row.state == 10"
v-hasPermi="['ecw:voucher:cancelWriteOff']"
@click="$router.push(`/bpm/process-instance/detail?id=`+scope.row.bmpId)"
>{{ $t('审核详情') }}</el-button
>
<el-button
v-if="scope.row.state == 5"
size="mini"
......@@ -148,9 +189,9 @@
>{{ $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="[0,1,2].indexOf(scope.row.state) > -1" size="mini" type="text" v-hasPermi="['ecw:voucher:delete']" @click="deleteClick(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 != 0"
v-if="scope.row.state != 0 && scope.row.state != 7 && scope.row.state != 11 && scope.row.state != 8 && scope.row.state != 9"
size="mini"
type="text"
@click="toprint(scope.row.id)"
......@@ -158,7 +199,7 @@
>{{ $t('打印') }}</el-button
>
<el-button
v-if="scope.row.state != 0"
v-if="scope.row.state != 0 && scope.row.state != 7 && scope.row.state != 11 && scope.row.state != 8 && scope.row.state != 9"
size="mini"
type="text"
v-hasPermi="['ecw:voucher:derive']"
......@@ -201,6 +242,33 @@
>
</div>
</el-dialog>
<el-dialog
:title="writeOffType==1?$t('收款单反审核'):$t('收款单反核销')"
:visible.sync="dialogVisible"
width="30%">
<div class="cancel_content">
<span>{{$t('申请理由')}}</span>
<el-input type="textarea" :rows ="6" v-model="reason" :placeholder="$t('请输入理由')"></el-input>
</div>
<span slot="footer" class="dialog-footers">
<el-button v-if="writeOffType==1" 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>
</el-dialog>
<el-dialog
:title="cancelTitle"
:visible.sync="cancelShow"
width="30%">
<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="cancelWriteOffClick()">{{$t('提交')}}</el-button>
<el-button @click="cancelShow = false">{{$t('取消')}}</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -213,7 +281,12 @@ import {
// receiptVerification,
// receiptVerificationCancel,
receiptExportExcel,
deleteReceipt
deleteReceipt,
financeReceiptWriteOffNo,
financeApproveNo,
cancelFinanceReceiptApproval,
cancelFinanceReceiptApprovalNo,
cancelFinanceReceiptWriteOffNo
} from "@/api/ecw/financial";
export default {
......@@ -258,6 +331,15 @@ export default {
},
dateFilter:[],
downloading: false, // 导出状态
dialogVisible:false,
reason:'',
writeOffType:1,
writeOffIndex:0,
cancelShow:false,
cancelTitle:'',
cancelReason:'',
cancelIndex:0,
selectIndex:0
};
},
activated(){
......@@ -313,6 +395,84 @@ export default {
// })
// .catch(() => {});
},
//显示取消审核弹窗
cancelClick(index,type){
this.selectIndex = index
this.cancelIndex = type
this.cancelReason = ''
if(this.cancelIndex==1){
this.cancelTitle = this.$t('取消审核')
}else if(this.cancelIndex == 2){
this.cancelTitle = this.$t('取消反审核')
}else{
this.cancelTitle = this.$t('取消反核销审核')
}
this.cancelShow = true
},
//取消审核
cancelWriteOffClick(){
if(!this.cancelReason){
this.$modal.msgError(this.$t('请输入申请理由'));
return
}
var receiptId = this.list[this.selectIndex].id
if(this.cancelIndex==1){
cancelFinanceReceiptApproval({receiptId:receiptId,remark:this.cancelReason}).then(res=>{
this.cancelShow = false
this.getList();
this.$message.success(this.$t("提交成功"));
});
}else if(this.cancelIndex ==2){
cancelFinanceReceiptApprovalNo({receiptId:receiptId,remark:this.cancelReason}).then(res=>{
this.cancelShow = false
this.getList();
this.$message.success(this.$t("提交成功"));
});
}else{
cancelFinanceReceiptWriteOffNo({receiptId:receiptId,remark:this.cancelReason}).then(res=>{
this.cancelShow = false
this.getList();
this.$message.success(this.$t("提交成功"));
});
}
},
writeOffClick(){
if(!this.reason){
this.$modal.msgError(this.$t('请输入申请理由'));
return
}
const receiptIdData = this.list[this.writeOffIndex]
if(this.writeOffType==1){
this.$modal
.confirm(this.$t('您确认要反审核吗')+'?')
.then(()=>{
financeApproveNo({receiptId:receiptIdData.id,receiptNo:receiptIdData.receiptNo,remark:this.reason}).then(res=>{
this.getList();
this.$message.success(this.$t("提交成功"));
this.dialogVisible = false
// this.$store.dispatch('tagsView/delCurrentView')
});
})
.catch(() => {this.dialogVisible = false});
}else{
this.$modal
.confirm(this.$t('您确认要反核销吗')+'?')
.then(()=>{
financeReceiptWriteOffNo({receiptId:receiptIdData.id,receiptNo:receiptIdData.receiptNo,remark:this.reason}).then(res=>{
this.getList();
this.$message.success(this.$t("提交成功"));
this.dialogVisible = false
// this.$store.dispatch('tagsView/delCurrentView')
});
})
.catch(() => {this.dialogVisible = false});
}
},
deleteClick(row) {
const id = row.id;
this.$modal.confirm(this.$t('是否确认删除该收款单')+'?').then(function() {
......@@ -349,6 +509,13 @@ export default {
this.open = true;
this.exportId = id;
},
//显示反审核反核销弹窗
writeOffShow(type,index){
this.writeOffType = type
this.writeOffIndex = index
this.reason = ''
this.dialogVisible = true
},
submitForm(type) {
this.downloading = true
receiptExportExcel({ id: this.exportId, billType: type }).then((response) => {
......@@ -377,8 +544,22 @@ export default {
justify-content: space-between;
height: 160px;
}
.dialog-footers{
display: flex;
align-items: center;
justify-content: space-between;
}
.card-title {
font-size: 18px;
font-weight: bold;
}
.cancel_content{
display: flex;
flex-direction: column;
}
.cancel_content span{
font-size: 16px;
font-weight:600;
margin-bottom:10px
}
</style>
......@@ -5,7 +5,7 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item :label="$t('日期筛选')">
<dict-selector defaultable :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" class="w-100 mr-10" />
<el-date-picker v-model="dateFilter" type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"></el-date-picker>
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" value-format="yyyy-MM-dd HH:mm:ss" @change="handleQuery"></el-date-picker>
</el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发地')" clearable @change="handleQuery">
......@@ -46,7 +46,7 @@
<el-form-item :label="$t('报关方式')" prop="customsType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('唛头')" prop="marks">
<el-input v-model="queryParams.marks" :placeholder="$t('唛头')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
......@@ -70,7 +70,7 @@
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
......@@ -108,7 +108,7 @@
<dict-tag v-else :type="DICT_TYPE.CONTROL_GOODS_STATUS" :value="row.cargoControlStatus" />
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="150px">
<template slot-scope="scope">
<!--控货中,已入仓-->
......@@ -136,7 +136,7 @@
<!-- <el-button type="text" size="mini" @click="toDetail(scope.row)" >{{$t('查看')}}</el-button> -->
<el-button type="text" size="mini" @click="cargoTransfer(scope.row)" v-hasPermi="['ecw:cargo_control:cargo_transfer']">{{$t('调货')}}</el-button>
<el-button type="text" size="mini" @click="showFallbackOrder=scope.row" v-if="scope.row.isReleaseAfterGoods" v-hasPermi="['ecw:cargo_control:fallback']">{{$t('反复核')}}</el-button>
</template>
</template>
<el-button type="text" size="mini" @click="toDetail(scope.row)" v-hasPermi="['ecw:cargo_control:show']">{{$t('查看')}}</el-button>
</template>
</el-table-column>
......@@ -262,7 +262,7 @@ export default {
this.resetForm("queryForm");
this.handleQuery();
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
......
......@@ -36,6 +36,14 @@
<el-table-column :label="$t('入仓时间')" prop="inTime" >
<template slot-scope="{row}">{{row.inTime|parseTime}}</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" >
<template slot-scope="{row}">
<warehouse-area-select
v-model="row.orderLocationBackVOList"
readonly
:order-id="orderId"></warehouse-area-select>
</template>
</el-table-column>
</el-table>
</el-dialog>
</template>
......@@ -43,7 +51,11 @@
import { getOrder, getOrderWarehouseIn } from '@/api/ecw/order'
import { DICT_TYPE } from '@/utils/dict'
import { parseTime } from '@/utils/ruoyi'
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
export default {
components: {
WarehouseAreaSelect
},
filters: {parseTime},
props:{
order: Object, // order 和 orderId 二选一
......@@ -73,7 +85,7 @@ export default {
return this.$l(this.orderItem, 'prodTitle') + ' - ' + this.$t('入仓记录')
}
},
created(){
this.show = true
if(!this.order && this.orderId){
......@@ -95,4 +107,4 @@ export default {
}
}
}
</script>
\ No newline at end of file
</script>
......@@ -200,6 +200,14 @@
</template>
</template>
</el-table-column>
<el-table-column prop="" :label="$t('储位')">
<template slot-scope="{row}">
<warehouse-area-select
v-model="row.warehouseInInfoVO.orderLocationBackVOList"
readonly
:order-id="orderId"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column prop="" :label="$t('快递单号')">
<template slot-scope="{row}">
{{ row.expressNo }}
......@@ -325,7 +333,7 @@
</div>
</el-col>
</el-row>
<div v-if="feeDetail && feeDetail.coupons && feeDetail.coupons.length" class="page-title">优惠详情</div>
<el-table v-if="feeDetail && feeDetail.coupons && feeDetail.coupons.length" :data="feeDetail.coupons">
<el-table-column label="优惠ID" prop="couponId"></el-table-column>
......@@ -369,11 +377,12 @@ import {listByIds} from '@/api/ecw/region'
import WarehouseDetail from './components/WarehouseDetail';
import {getProductBrank} from '@/api/ecw/productBrank'
import { parseTime } from '@/utils/ruoyi';
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
export default {
name: "detail",
components: {
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect
},
filters: {
customsTypeFilter(e, customsTypeList) {
......
......@@ -189,6 +189,7 @@
<el-button v-else-if="scope.row.orderExceptionType=='order_no_quote_exception'" v-hasPermi="['ecw:exception:noQuote']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_bulky_cargo_exception'" v-hasPermi="['ecw:exception:bulkyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -126,6 +126,7 @@
<el-button v-else-if="scope.row.orderExceptionType=='order_no_quote_exception'" v-hasPermi="['ecw:exception:noQuote']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_bulky_cargo_exception'" v-hasPermi="['ecw:exception:bulkyCargo']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
</template>
</el-table-column>
</el-table>
......
......@@ -11,11 +11,13 @@
<el-descriptions border :column="2">
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
{{ warehousing.prodTitleZh }}
<product-selector v-if="!order.parentOrderId" v-model="form.prodId" @change="onProductChange0"/>
<span v-else>{{ warehousing.prodTitleZh }}</span>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
{{ warehousing.prodTitleEn }}
<product-selector v-if="!order.parentOrderId" lang="En" v-model="form.prodId" @change="onProductChange0"/>
<span v-else>{{ warehousing.prodTitleEn }}</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template>
......@@ -75,16 +77,10 @@
<span style="color: red">*</span>{{ $t('箱数') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.cartonsNum" :prop="$index + '.cartonsNum'">
<span v-if="tableData[$index].id && !edit">
{{ tableData[$index].cartonsNum }}
{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, tableData[$index].specificationType) }}
</span>
<template v-else>
<el-input v-model="tableData[$index].cartonsNum" placeholder="" @blur="handleVolume($index)">
<el-input v-model="tableData[$index].cartonsNum" placeholder="" @blur="handleVolume($index)">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, tableData[$index].specificationType) }}</span>
</el-input>
<dict-selector :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="tableData[$index].specificationType" @change="handleVolume($index)"></dict-selector>
</template>
<dict-selector :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="tableData[$index].specificationType" @change="handleVolume($index)"></dict-selector>
</el-form-item>
</template>
</el-table-column>
......@@ -93,8 +89,7 @@
<span style="color: red">*</span>{{ $t('包装类型') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="tableData[$index].id && !edit">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, tableData[$index].unit) }}</span>
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="tableData[$index].unit"></dict-selector>
<dict-selector :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="tableData[$index].unit"></dict-selector>
</el-form-item>
</template>
</el-table-column>
......@@ -104,8 +99,7 @@
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge1" :prop="!tableData[$index].id && $index + '.boxGauge1'">
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else type="number" v-model="tableData[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
<el-input type="number" v-model="tableData[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
......@@ -115,8 +109,7 @@
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge2" :prop="!tableData[$index].id && $index + '.boxGauge2'">
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else type="number" v-model="tableData[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
<el-input type="number" v-model="tableData[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
......@@ -126,8 +119,7 @@
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge3" :prop="!tableData[$index].id && $index + '.boxGauge3'">
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].boxGauge ? tableData[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else type="number" v-model="tableData[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
<el-input type="number" v-model="tableData[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
......@@ -137,8 +129,7 @@
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.volume" :prop="$index + '.volume'">
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].volume }}</span>
<el-input v-else v-model="tableData[$index].volume" placeholder="" type="number"></el-input>
<el-input v-model="tableData[$index].volume" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
......@@ -148,16 +139,14 @@
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.weight" :prop="$index + '.weight'">
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].weight }}</span>
<el-input v-else v-model="tableData[$index].weight" placeholder="" type="number"></el-input>
<el-input v-model="tableData[$index].weight" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('数量')" width="130px">
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.quantityAll" :prop="$index + '.quantityAll'">
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].quantityAll }}</span>
<el-input v-else v-model.number="tableData[$index].quantityAll" placeholder="">
<el-input v-model.number="tableData[$index].quantityAll" placeholder="">
<template slot="append">{{ $t('') }}</template>
</el-input>
</el-form-item>
......@@ -166,11 +155,21 @@
<el-table-column :label="$t('快递单号')">
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="tableData[$index].id && !edit">{{ tableData[$index].expressNo }}</span>
<el-input v-else v-model="tableData[$index].expressNo" placeholder=""></el-input>
<el-input v-model="tableData[$index].expressNo" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }">
<warehouse-area-select
v-model="tableData[$index].orderLocationBackVOList"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="tableData[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
</el-table>
</el-form>
......@@ -339,6 +338,18 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }">
<warehouse-area-select
v-model="tableData1[$index].orderLocationBackVOList"
:readonly="tableData1[$index].id && !edit"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="tableData1[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
......@@ -378,6 +389,7 @@ import { getFeeTypeByOrderProduct, getProductBrankPage } from '@/api/ecw/product
import WorkFlow from "@/components/WorkFlow"
import ProductSelector from "@/components/ProductSelector"
import {cancelProcessInstance} from "@/api/bpm/processInstance"
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
export default {
name: 'editDialog',
......@@ -385,10 +397,15 @@ export default {
components: {
dictSelector,
WorkFlow,
ProductSelector
ProductSelector,
WarehouseAreaSelect
},
props: {
order: {
type: Object,
default: undefined
},
orderId: {
type: Number,
default: undefined
......@@ -505,6 +522,33 @@ export default {
},
opened(val) {
if (val) {
this.form1 = {
"brand": undefined,
"brandType": 0,
"inTime": "",
"material": "",
"orderId": 0,
"orderItemId": 0,
"orderNo": "",
"orderWarehouseInItemDoList": [],
"prodAttrIds": "",
"prodId": '',
"prodTitleEn": "",
"prodTitleZh": "",
"prodType": 0,
"type": 1,
feeType: 0,
recordMode: undefined
}
this.form.orderWarehouseInItemDoList = []
this.form1.orderWarehouseInItemDoList = []
this.activeName = 'first'
if (!this.edit){
this.handleAdd()
this.handleAdd(1)
}
this.form.prodId = this.warehousing.prodId
this.form.material = this.warehousing.material
if (this.warehousing.brand && this.warehousing.brand !== 0){
this.form.brand = this.warehousing.brand.toString() || ''
......@@ -527,16 +571,10 @@ export default {
},
warehousing(newVal, oldVal){
if(newVal.orderItemId !== oldVal.orderItemId){
this.form.orderWarehouseInItemDoList = []
this.form1.orderWarehouseInItemDoList = []
this.activeName = 'first'
if (!this.edit){
this.handleAdd()
this.handleAdd(1)
}
}
}
},
methods: {
getProductBrandPage(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => {
......@@ -566,6 +604,11 @@ export default {
this.form1.prodTitleZh = product.titleZh
this.form1.prodTitleEn = product.titleEn
},
onProductChange0(product){
this.form.prodTitleZh = product.titleZh
this.form.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form.brand))
},
handleTabs(){
if (this.activeName === 'first'){
this.getProductBrandPage(this.warehousing.brandName)
......@@ -599,15 +642,16 @@ export default {
}, 0)
},
handleSubmit() {
const orderWarehouseInItemDoList = [
...this.warehousing.orderWarehouseInBackItemDoList,
...this.form.orderWarehouseInItemDoList.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3
}
})
]
// const orderWarehouseInItemDoList = [
// ...this.warehousing.orderWarehouseInBackItemDoList,
// ...this.form.orderWarehouseInItemDoList.map(e => {
// return {
// ...e,
// boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
// orderLocationCreateReqVOList: e.orderLocationBackVOList
// }
// })
// ]
if (this.activeName !== "first"){
// 添加非填单货物
this.$refs['form1'].validate(valid => {
......@@ -624,7 +668,8 @@ export default {
orderWarehouseInItemDoList: this.form1.orderWarehouseInItemDoList.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
})
}).then(r => {
......@@ -654,11 +699,12 @@ export default {
num: this.warehousing.num,
volume: (+this.warehousing.volume)?.toFixed(2) || '',
weight: (+this.warehousing.weight)?.toFixed(2) || '',
prodId: this.warehousing.prodId,
prodId: this.form.prodId,
"orderWarehouseInUpdateItemDoList": this.tableData.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
}),
copyUserId: this.selectedUsers
......@@ -671,14 +717,20 @@ export default {
}
})
} else {
// 首次入仓
// 首次入仓、入仓补充
return orderWarehouseIn({
...this.form,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
orderWarehouseInItemDoList
orderWarehouseInItemDoList: this.tableData.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
}),
}).then(r => {
if (r.data) {
this.$message.success('入仓成功')
......@@ -701,14 +753,24 @@ export default {
(val === 1 ? this.form1 : this.form).orderWarehouseInItemDoList.pop()
},
handleAdd(val = 0) {
let cartonsNum = '';
if (val !== 1) {
let cartonsNum = ''
let orderLocationBackVOList = []
if (val !== 1) { // 货物入仓
let hasCartonsNum = 0
this.tableData.forEach(e => {
hasCartonsNum += e.cartonsNum
})
cartonsNum = this.warehousing.num - hasCartonsNum
// orderLocationBackVOList = this.tableData.length
// ? this.tableData[this.tableData.length - 1].orderLocationBackVOList
// : []
} else { // 添加新品名
// orderLocationBackVOList = this.tableData1.length
// ? this.tableData1[this.tableData1.length - 1].orderLocationBackVOList
// : []
}
const form = val === 1 ? this.form1 : this.form
form.orderWarehouseInItemDoList.push({
"boxGauge1": this.isJiyun ? 0 : '',
......@@ -720,7 +782,8 @@ export default {
"unit": "1",
"volume": '',
"weight": '',
specificationType: '1'
specificationType: '1',
orderLocationBackVOList
})
}
},
......@@ -736,9 +799,9 @@ export default {
return this.brandList.find(e => e.id === this.form1.brand) || ''
},
tableData() {
if (!this.edit){
return [...this.warehousing.orderWarehouseInBackItemDoList, ...this.form.orderWarehouseInItemDoList]
}
// if (!this.edit){
// return [...this.warehousing.orderWarehouseInBackItemDoList, ...this.form.orderWarehouseInItemDoList]
// }
// 入仓修改的时候
this.form.orderWarehouseInItemDoList = this.warehousing.orderWarehouseInBackItemDoList
......@@ -801,6 +864,9 @@ export default {
}
}
return ''
},
warehouseId(){
return this.order?.logisticsInfoDto?.startWarehouseId
}
}
}
......
......@@ -4,7 +4,7 @@
<order-base-info :order="order"></order-base-info>
<div style="margin-top: 20px">
<div style="margin-top: 20px;display: none">
<span>{{$t('储位')}}{{ ($refs.area ? $refs.area.selected : []).join(',') }}</span>
<el-button type="primary" size="mini" @click="areaVisible = true" style="margin-left: 15px">{{$t('选择')}}</el-button>
</div>
......@@ -153,7 +153,7 @@
<warehouse-area-dialog ref="area" :visible.sync="areaVisible" v-model="form.orderLocationCreateReqVOList"
:order-id="orderId" :warehouse-id="warehouseId" :is-editing="isEdit"></warehouse-area-dialog>
<edit-dialog :title="title" :order-id="order.orderId" :visible.sync="warehousingVisible" :warehousing="warehousing" :edit="isEdit" :is-jiyun="order.type.indexOf('1') !== -1"></edit-dialog>
<edit-dialog :order="order" :title="title" :order-id="order.orderId" :visible.sync="warehousingVisible" :warehousing="warehousing" :edit="isEdit" :is-jiyun="order.type && order.type.indexOf('1') !== -1"></edit-dialog>
<!-- 完成入仓 -->
<el-dialog
......
......@@ -26,7 +26,7 @@
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
type="daterange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{ $t('搜索') }}</el-button>
......
......@@ -255,6 +255,7 @@
<el-form-item :label="$t('港口优势条件')" prop="portConditions" label-width="250">
<dict-selector v-model="formData.resourceVO.portConditions" type="port_conditions" />
</el-form-item>
<el-button style="margin-left: 30px;" type="text" v-hasPermi="['ecw:dock:create']" @click="portVisible=true">{{$t('新增港口')}}</el-button>
</div>
<div>
<el-form-item :label="$t('订舱公司')" prop="bookCompany" label-width="250">
......@@ -305,6 +306,7 @@
<el-option v-for="(item) in airPort" :key="item.id" :label="$l(item, 'title')" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-button style="margin-left: 30px;" type="text" v-hasPermi="['ecw:dock:create']" @click="portVisible=true">{{$t('新增港口')}}</el-button>
</div>
<div>
<el-form-item :label="$t('空运优势航空公司')" prop="airCompany" label-width="250">
......@@ -519,10 +521,78 @@
>{{ $t('返回') }}</el-button>
</div>
</el-dialog>
<!-- 对话框(添加港口) -->
<el-dialog :title="$t('新增港口')" :visible.sync="portVisible" width="500px" append-to-body>
<el-form ref="portForm" :model="portForm" :rules="portRules" label-width="80px">
<el-form-item :label="$t('中文名称')" prop="titleZh">
<el-input v-model="portForm.titleZh" :placeholder="$t('请输入中文名称')" />
</el-form-item>
<el-form-item :label="$t('英文名称')" prop="titleEn">
<el-input v-model="portForm.titleEn" :placeholder="$t('请输入英文名称')" />
</el-form-item>
<el-form-item :label="$t('排序')" prop="sort">
<el-input v-model="portForm.sort" :placeholder="$t('请输入排序')" />
</el-form-item>
<el-form-item :label="$t('国家')" prop="countryId">
<el-select v-model="portForm.countryId" :placeholder="$t('请选择国家')" @change="changeCountry">
<el-option
v-for="item in treeList"
:key="item.id"
:label="$l(item,'title')"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('省')" prop="provinceId">
<el-select v-model="portForm.provinceId" :placeholder="$t('请选择省')" @change="changeProvince">
<el-option
v-for="item in portProvinceList"
:key="item.id"
:label="$l(item,'title')"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('城市')" prop="cityId">
<el-select v-model="portForm.cityId" :placeholder="$t('请选择城市')" @change="changeCity">
<el-option
v-for="item in portCityList"
:key="item.id"
:label="$l(item,'title')"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('港口类型')" prop="portType">
<el-select v-model="portForm.portType" :placeholder="$t('请选择')">
<el-option v-for="dict in portTypeDatas" :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('码头编号')" prop="number">
<el-input v-model="portForm.number" :placeholder="$t('请输入码头编号')" />
</el-form-item>
<el-form-item :label="$t('码头类型')" prop="type">
<el-input v-model="portForm.type" :placeholder="$t('请输入码头类型')" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="addPort">{{$t('确 定')}}</el-button>
<el-button @click="portVisible=false">{{$t('取 消')}}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { createSupplier, updateSupplier, getSupplier, createFileNo, updateFileNo, getFileNoPage} from "@/api/ecw/supplier";
import { createDock } from "@/api/ecw/dock";
import upload from '@/components/ImageUpload'
import { getListTree } from "@/api/ecw/region";
import AreaSelector from '@/components/AreaSelector'
......@@ -531,6 +601,7 @@ import Selector from '@/components/Selector'
import {validatePwd} from '@/api/ecw/busiPwd'
import SuppliersSelector from '@/components/SuppliersSelector'
import { getDockPage } from "@/api/ecw/dock";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
export default {
components: {upload, AreaSelector, Selector, SuppliersSelector},
props: [],
......@@ -598,7 +669,16 @@ export default {
baNo: [{required: true,message: this.$t('请输入BA NO'),trigger: 'blur'}],
},
showFileNoDialog: false,
addFileNoShow: false
addFileNoShow: false,
portForm: {},
portVisible: false,
// 表单校验
portRules: {
titleZh: [{ required: true, message: this.$t("中文名称不能为空"), trigger: "blur" }],
titleEn: [{ required: true, message: this.$t("英文名称不能为空"), trigger: "blur" }],
sort: [{ required: true, message: this.$t("排序不能为空"), trigger: "blur" }]
},
portTypeDatas: getDictDatas(DICT_TYPE.ECW_PORT_TYPE)
}
},
computed: {
......@@ -613,6 +693,26 @@ export default {
let country = this.treeList.find(item => item.id == this.fileNoForm.country)
return country && country.children || []
},
portProvinceList(){
if(!this.portForm.countryId) return []
let country = this.treeList.find(item => item.id == this.portForm.countryId)
return country && country.children || []
},
portCityList(){
if(!this.portProvinceList.length) return []
let province = this.portProvinceList.find(item => item.id == this.portForm.provinceId)
return province && province.children || []
},
portTypeName() {
return portType => {
for(let index in this.portTypeDatas) {
let portTypeItem = this.portTypeDatas[index];
if(portTypeItem.value == portType) {
return this.$l(portTypeItem,'label');
}
}
}
},
},
watch: {
'formData.country'(country){
......@@ -637,10 +737,7 @@ export default {
getCurrencyList().then(res => {
this.currencyList = res.data
})
// 码头
getDockPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
this.allDocks = res.data.list;
});
this.getDock()
this.getFile()
// 回显数据需要在加载了地区数据之后,否则无法正常回显
......@@ -702,6 +799,12 @@ export default {
},
mounted() {},
methods: {
getDock() {
// 码头
getDockPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
this.allDocks = res.data.list;
});
},
strToArray(val) {
if(!val || val == '') {
return []
......@@ -875,7 +978,52 @@ export default {
resourceVO: {},
externalVO: {}
}
}
},
changeCountry(countryId) {
for(let index in this.treeList) {
let country = this.treeList[index];
if(country.id == countryId) {
this.portForm.countryZh = country.titleZh;
this.portForm.countryEn = country.titleEn;
return;
}
}
},
changeProvince(provinceId) {
for(let index in this.portProvinceList) {
let province = this.portProvinceList[index];
if(province.id == provinceId) {
this.portForm.provinceZh = province.titleZh;
this.portForm.provinceEn = province.titleEn;
return;
}
}
},
changeCity(cityId) {
for(let index in this.portCityList) {
let city = this.portCityList[index];
if(city.id == cityId) {
this.portForm.cityZh = city.titleZh;
this.portForm.cityEn = city.titleEn;
return;
}
}
},
addPort() {
this.$refs["portForm"].validate(valid => {
if (!valid) {
return;
}
// 添加的提交
createDock(this.portForm).then(response => {
this.$modal.msgSuccess(this.$t("新增成功"));
this.portVisible = false;
this.getDock()
});
});
},
}
}
......
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