Commit a27f27e2 authored by 我在何方's avatar 我在何方
parents 0c057654 afaa1a90
...@@ -379,3 +379,19 @@ export function changeCustomerAir(data){ ...@@ -379,3 +379,19 @@ export function changeCustomerAir(data){
}) })
} }
//获得客户日志
export function getCustomerOperatelogPage(params){
return request({
url:'/customer/operate-log/page',
method:'get',
params
})
}
// 获得客户日志详情
export function getCustomerOperatelog(params){
return request({
url:'customer/operate-log/get',
method:'get',
params
})
}
...@@ -316,6 +316,22 @@ export function getPaymentInfoByIds(query) { ...@@ -316,6 +316,22 @@ export function getPaymentInfoByIds(query) {
params: query params: query
}) })
} }
// 获得佣金付款单
export function getCommissionPayment(params){
return request({
url:'/ecw/commission-payment/get',
method:'get',
params
})
}
// 获得佣金付款单列表
export function getCommissionPayableList(params){
return request({
url:'/ecw/commission-payable/list',
method:'get',
params
})
}
// 获得付款单付款明细 // 获得付款单付款明细
export function getPaymentItem(query) { export function getPaymentItem(query) {
...@@ -326,6 +342,7 @@ export function getPaymentItem(query) { ...@@ -326,6 +342,7 @@ export function getPaymentItem(query) {
}) })
} }
// 更新付款单 // 更新付款单
export function updatePayment(data) { export function updatePayment(data) {
return request({ return request({
...@@ -361,26 +378,37 @@ export function paymentVerify(query) { ...@@ -361,26 +378,37 @@ export function paymentVerify(query) {
} }
// 核销付款单 // 核销付款单
export function paymentVerification(id) { export function paymentVerification(data) {
return request({ return request({
url: '/ecw/payment/verification/' + id, url: '/ecw/payment/verification',
method: 'GET' method: 'post',
data
}) })
} }
// 反核销付款单 // 反核销付款单
export function paymentVerificationCancel(id) { export function paymentVerificationCancel(data) {
return request({ return request({
url: '/ecw/payment/verificationCancel/' + id, url: '/ecw/payment/verificationCancel',
method: 'GET' method: 'post',
data
})
}
// 取消付款单反核销
export function paymentCancelFinancePaymentWriteOffNo(params){
return request({
url:'ecw/payment/cancelFinancePaymentWriteOffNo',
method:'get',
params
}) })
} }
// 反审核付款单 // 反审核付款单
export function paymentVerifyCancel(id) { export function paymentVerifyCancel(data) {
return request({ return request({
url: '/ecw/payment/verifyCancel/' + id, url: '/ecw/payment/verifyCancel',
method: 'GET' method: 'post',
data
}) })
} }
...@@ -598,3 +626,21 @@ export function commissionPaymentCancelFinancePaymentWriteOffNo(data){ ...@@ -598,3 +626,21 @@ export function commissionPaymentCancelFinancePaymentWriteOffNo(data){
data, data,
}) })
} }
//取消付款单审核
export function commissionPaymentCancelFinancePaymentApproval(data){
return request({
url:'/ecw/commission-payment/cancelFinancePaymentApproval',
method:'post',
data
})
}
//根据流程主键获取付款单流程审核信息
export function commissionPaymentGetPaymentApprove(params){
return request({
url:'/ecw/commission-payment/getPaymentApprove',
method:'get',
params
})
}
...@@ -152,6 +152,7 @@ export const DICT_TYPE = { ...@@ -152,6 +152,7 @@ export const DICT_TYPE = {
CUSTOMER_CREDIT_RULE_TYPE: 'customer_credit_rule_type', CUSTOMER_CREDIT_RULE_TYPE: 'customer_credit_rule_type',
CUSTOMER_LEVEL_RULE_TYPE: 'customer_level_rule_type', CUSTOMER_LEVEL_RULE_TYPE: 'customer_level_rule_type',
CUSTOMER_ESOURCE_TYPE:'customer_resource_type',//客户资源类型 CUSTOMER_ESOURCE_TYPE:'customer_resource_type',//客户资源类型
CUSTOMER_OPERATE_TYPE:'customer_operate_type',
// order // order
ORDER_TYPE: 'order_type', // 订单类型 ORDER_TYPE: 'order_type', // 订单类型
PRODUCT_RECORD_ATTRIBUTE: 'product_record_attribute', //产品备案属性 PRODUCT_RECORD_ATTRIBUTE: 'product_record_attribute', //产品备案属性
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px"> <el-form ref="agentForm" :model="agentObj" :rules="rules" label-width="120px">
<el-form-item :label="$t('代理商Agent')" prop="agentId"> <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-item>
</el-form> </el-form>
<el-row class="operate-button"> <el-row class="operate-button">
......
...@@ -26,7 +26,7 @@ export default { ...@@ -26,7 +26,7 @@ export default {
getSuppliers() { getSuppliers() {
if (!this.companyType) return this.allSupplier; if (!this.companyType) return this.allSupplier;
return this.allSupplier.filter((item) => return this.allSupplier.filter((item) =>
item.companyTypes.includes(this.companyType) item.areaType == 1
); );
}, },
}, },
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<el-form ref="subMaterialForm" :model="subMaterialObj" label-width="140px"> <el-form ref="subMaterialForm" :model="subMaterialObj" label-width="140px">
<el-form-item :label="$t('代理商AGENT')"> <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>
<el-form-item :label="$t('提单号M/BL NO.')" class="two-element"> <el-form-item :label="$t('提单号M/BL NO.')" class="two-element">
<el-input v-model="subMaterialObj.blMblNo" :placeholder="$t('请输入提单号')"></el-input> <el-input v-model="subMaterialObj.blMblNo" :placeholder="$t('请输入提单号')"></el-input>
...@@ -24,19 +24,22 @@ ...@@ -24,19 +24,22 @@
<userSelect v-model="subMaterialObj.shipperId" :placeholder="$t('请选择托运人')" :allUsers="this.$attrs.allUsers" /> <userSelect v-model="subMaterialObj.shipperId" :placeholder="$t('请选择托运人')" :allUsers="this.$attrs.allUsers" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('收货人')"> <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>
<el-form-item :label="$t('通知方')"> <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>
<el-form-item label="Mark & No."> <el-form-item label="Mark & No.">
<el-input v-model="subMaterialObj.markNo" placeholder="请输入Mark & No."></el-input> <el-input v-model="subMaterialObj.markNo" placeholder="请输入Mark & No."></el-input>
</el-form-item> </el-form-item>
<el-form-item :label="$t('包装数量与单位')" class="two-element"> <el-form-item :label="$t('包装数量与单位')" class="two-element">
<el-input v-model="subMaterialObj.packageNum" :placeholder="$t('请输入包装数量')"></el-input> <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-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>
<el-form-item :label="$t('毛重(KGS)')"> <el-form-item :label="$t('毛重(KGS)')">
<el-input v-model="subMaterialObj.kgs" :placeholder="$t('请输入毛重') + '(KGS)'"></el-input> <el-input v-model="subMaterialObj.kgs" :placeholder="$t('请输入毛重') + '(KGS)'"></el-input>
...@@ -78,6 +81,7 @@ import userSelect from "./common/userSelect.vue"; ...@@ -78,6 +81,7 @@ import userSelect from "./common/userSelect.vue";
import { getUnitList } from "@/api/ecw/unit"; import { getUnitList } from "@/api/ecw/unit";
import { getCabinetPage } from "@/api/ecw/cabinet"; import { getCabinetPage } from "@/api/ecw/cabinet";
import { billCreate } from "@/api/ecw/boxSea"; import { billCreate } from "@/api/ecw/boxSea";
import { getSupplier } from "@/api/ecw/supplier";
import { formatNumberString, constantDict, serviceMsg } from "../utils"; import { formatNumberString, constantDict, serviceMsg } from "../utils";
/** /**
...@@ -120,7 +124,6 @@ export default { ...@@ -120,7 +124,6 @@ export default {
} }
} }
}); });
const voName = this.$attrs.currNode.voName; const voName = this.$attrs.currNode.voName;
let oldData = { ...this.shipmentObj[voName] }; let oldData = { ...this.shipmentObj[voName] };
oldData = formatNumberString(oldData, ["issueType"]); oldData = formatNumberString(oldData, ["issueType"]);
...@@ -128,8 +131,24 @@ export default { ...@@ -128,8 +131,24 @@ export default {
...oldData, ...oldData,
packageUnit: oldData.packageUnit === 0 ? undefined : oldData.packageUnit, packageUnit: oldData.packageUnit === 0 ? undefined : oldData.packageUnit,
}; };
this.$set(this.subMaterialObj,'agentId',this.shipmentObj.agentInfo?.agentId||undefined)
this.getSup(this.subMaterialObj.agentId)
}, },
methods: { 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) { onSubmit(operateType) {
this.$refs["subMaterialForm"].validate((valid) => { this.$refs["subMaterialForm"].validate((valid) => {
......
<template>
<div style="padding: 20px">
<el-card :title="'客户操作日志'">
<el-descriptions border :column="3">
<el-descriptions-item label="订单编号"><el-input v-model="queryForm.orderNo"></el-input></el-descriptions-item>
<el-descriptions-item label="操作人"><el-input v-model="queryForm.operator"></el-input></el-descriptions-item>
<el-descriptions-item label="老客户经理"><el-input v-model="queryForm.oldCustomerService"></el-input></el-descriptions-item>
<el-descriptions-item label="客户编号"><el-input v-model="queryForm.number"></el-input></el-descriptions-item>
<el-descriptions-item label="新客户经理"><el-input v-model="queryForm.newCustomerService"></el-input></el-descriptions-item>
<el-descriptions-item label="客户名称"><el-input v-model="queryForm.name"></el-input></el-descriptions-item>
<el-descriptions-item label="新的预计进入公海的时间">
<el-date-picker
v-model="newEstimateEnterOpenSeaTimeArr"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right">
</el-date-picker>
</el-descriptions-item>
<el-descriptions-item label="老的预计进入公海的时间">
<el-date-picker
v-model="newEstimateEnterOpenSeaTimeArr"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
align="right">
</el-date-picker>
</el-descriptions-item>
<el-descriptions-item>
<el-button @click="getList">搜索</el-button>
<el-button @click="initialize">重置</el-button>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-table style="margin-top: 30px" :data="list">
<el-table-column label="订单编号" prop="orderNo"></el-table-column>
<el-table-column label="客户编号" prop="number"></el-table-column>
<el-table-column label="客户名称" prop="name"></el-table-column>
<el-table-column label="新客户经理" prop="newCustomerService">
<template v-slot="{row}">
{{row.newCustomerService ? row.newCustomerService : '/'}}
</template>
</el-table-column>
<el-table-column label="老客户经理" prop="oldCustomerService">
<template v-slot="{row}">
{{row.oldCustomerService ? row.oldCustomerService : '/'}}
</template>
</el-table-column>
<el-table-column label="操作类型">
<template v-slot="{row}">
<dict-tag :type="DICT_TYPE.CUSTOMER_OPERATE_TYPE" :value="row.operateType"></dict-tag>
</template>
</el-table-column>
<el-table-column label="操作人" prop="operator">
<template v-slot="{row}">
{{operatorFn(row.operator)}}
</template>
</el-table-column>
<el-table-column label="新的预计入公海时间">
<template v-slot="{row}">
{{parseTime(row.newEstimateEnterOpenSeaTime)}}
</template>
</el-table-column>
<el-table-column label="老的预计入公海时间" >
<template v-slot="{row}">
{{parseTime(row.oldEstimateEnterOpenSeaTime)}}
</template>
</el-table-column>
<el-table-column label="操作">
<template v-slot="{row}">
<el-button type="text" @click="getCustomerLog(row.id)">
详情
</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryForm.page" :limit.sync="queryForm.rows"
@pagination="getList"/>
<el-dialog title="客户日志" :visible.sync="show">
<el-form>
<el-form-item label="订单编号:">
{{dataLog.dataLog ? dataLog.dataLog :'/'}}
</el-form-item>
<el-form-item label="客户编号:">
{{dataLog.number}}
</el-form-item>
<el-form-item label="客户名称:">
{{dataLog.name}}
</el-form-item>
<el-form-item label="新客户经理:">
{{dataLog.newEstimateEnterOpenSeaTime ? dataLog.newEstimateEnterOpenSeaTime : '/'}}
</el-form-item>
<el-form-item label="老客户经理:">
{{dataLog.oldEstimateEnterOpenSeaTime ? dataLog.oldEstimateEnterOpenSeaTime : '/'}}
</el-form-item>
<el-form-item label="操作类型:">
<dict-tag :type="DICT_TYPE.CUSTOMER_OPERATE_TYPE" :value="dataLog.operateType"></dict-tag>
</el-form-item>
<el-form-item label="操作人:">
{{operatorFn(dataLog.operator)}}
</el-form-item>
<el-form-item label="新预计进入公海时间:">
{{parseTime(dataLog.newEstimateEnterOpenSeaTime)}}
</el-form-item>
<el-form-item label="老的预计进入公海时间:">
{{parseTime(dataLog.oldEstimateEnterOpenSeaTime)}}
</el-form-item>
<el-form-item label="更新json:">
{{dataLog.updateBody}}
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script>
import {getCustomerOperatelog, getCustomerOperatelogPage} from "@/api/ecw/customer";
import {parseTime} from "../../../utils/ruoyi";
import Template from "@/views/cms/template/index.vue";
import {DICT_TYPE} from "@/utils/dict";
import {listAllSimpl} from "@/api/system/user";
export default {
name: "customerLog",
computed: {
DICT_TYPE() {
return DICT_TYPE
},
operatorFn(){
return (val)=>{
return this.allSimplList.find(item => item.id == val)?.nickname
}
}
},
components: {Template},
created() {
this.initialize()
this.getList()
listAllSimpl().then(r => {
this.allSimplList = r.data
})
},
data(){
return {
queryForm:{},
newEstimateEnterOpenSeaTimeArr:[],
oldEstimateEnterOpenSeaTimeArr:[],
list:[],
total:0,
show:false,
allSimplList:[],
dataLog:{}
}
},
methods:{
parseTime,
initialize(){
this.queryForm = {
page:1,
rows:10,
name:null,
oldCustomerService:null,
newCustomerService:null,
operateType:null,
operator:null,
orderNo:null,
newEstimateEnterOpenSeaTime:null,
beginNewEstimateEnterOpenSeaTime:null,
beginOldEstimateEnterOpenSeaTime:null,
endNewEstimateEnterOpenSeaTime:null,
endOldEstimateEnterOpenSeaTime:null,
}
},
getList(){
this.queryForm.beginNewEstimateEnterOpenSeaTime = this.newEstimateEnterOpenSeaTimeArr[0] || ''
this.queryForm.endNewEstimateEnterOpenSeaTime = this.newEstimateEnterOpenSeaTimeArr[1] || ''
this.beginOldEstimateEnterOpenSeaTime = this.oldEstimateEnterOpenSeaTimeArr[0] || ''
this.endOldEstimateEnterOpenSeaTime = this.oldEstimateEnterOpenSeaTimeArr[1] || ''
getCustomerOperatelogPage(this.queryForm).then(r => {
this.list = r.data.list;
this.total = r.data.total;
})
},
getCustomerLog(val){
getCustomerOperatelog({id:val}).then(r =>{
this.dataLog = r.data
this.show = true;
})
}
}
}
</script>
<style scoped>
</style>
...@@ -413,6 +413,99 @@ ...@@ -413,6 +413,99 @@
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<el-card>
<div slot="header" class="clearfix">
<span>{{$t('银行信息')}}</span>
<el-button style="float: right;" size="small" type="primary" @click="addBankData">+</el-button>
</div>
<el-form ref="bankForm" :model="form">
<el-table border :data="form.customerBankAccounts">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column>
<div slot="header">
账户名称 <span style="color: red;">*</span>
</div>
<template v-slot="{row,$index}">
<el-form-item :rules="{required:true,message:'请输入账户名称'}" :prop="'customerBankAccounts.'+ $index +'.baAccountName'">
<el-input size="mini" v-model="row.baAccountName"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="币别">
<div slot="header">
币别 <span style="color: red;">*</span>
</div>
<template v-slot="{row,$index}">
<el-form-item :prop="'customerBankAccounts.'+ $index +'.currency'" :rules="{required:true,message:'请输入币别'}" >
<el-select v-model="row.currency">
<el-option v-for="(item) in currecyList" :label="$l(item,'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="银行名称">
<div slot="header">
银行名称 <span style="color: red;">*</span>
</div>
<template v-slot="{row,$index}">
<el-form-item :prop="'customerBankAccounts.'+ $index +'.baBankName'" :rules="{required:true,message:'银行名称'}">
<el-input v-model="row.baBankName" size="mini"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="银行账户">
<div slot="header">
银行账户 <span style="color: red;">*</span>
</div>
<template v-slot="{row,$index}">
<el-form-item :prop="`customerBankAccounts.${$index}.baAccountNum`" :rules="{required:true,message:'请输入银行账户'}">
<el-input v-model="row.baAccountNum" size="mini"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="银行代码">
<template v-slot="{row}">
<el-form-item prop="baSwiftCode">
<el-input v-model="row.baSwiftCode" size="mini"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="账户类型">
<template v-slot="{row}">
<el-form-item>
<el-select v-model="row.baType">
<el-option value="1" label="公账"></el-option>
<el-option value="2" label="私账" ></el-option>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="状态">
<template v-slot="{row}">
<el-form-item>
<el-select v-model="row.status">
<el-option value="0" label="停用"></el-option>
<el-option value="1" label="正常"></el-option>
</el-select>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="银行地址">
<template v-slot="{row}">
<el-form-item prop="baBankAdd">
<el-input v-model="row.baBankAdd" size="mini"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="操作">
<template v-slot="{$index}">
<el-button @click="deleteBankData($index)">删除</el-button>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
<div style="text-align: center"> <div style="text-align: center">
<el-button type="primary" @click="submitForm">{{$t('确 定')}}</el-button> <el-button type="primary" @click="submitForm">{{$t('确 定')}}</el-button>
<el-button @click="cancel">{{$t('取 消')}}</el-button> <el-button @click="cancel">{{$t('取 消')}}</el-button>
...@@ -450,6 +543,7 @@ import Template from "@/views/cms/template"; ...@@ -450,6 +543,7 @@ import Template from "@/views/cms/template";
import {validatorMobile} from "@/api/ecw/validate" import {validatorMobile} from "@/api/ecw/validate"
// import {customerDropDownList} from "@/api/ecw/customerCommissionInfo"; // import {customerDropDownList} from "@/api/ecw/customerCommissionInfo";
import MemberSelector from '@/components/MemberSelector' import MemberSelector from '@/components/MemberSelector'
import {getCurrencyList} from "@/api/ecw/currency";
export default { export default {
name: "edit", name: "edit",
...@@ -461,7 +555,10 @@ export default { ...@@ -461,7 +555,10 @@ export default {
MemberSelector MemberSelector
}, },
created() { created() {
this.isCustomerServiceConfirmed = this.$route.query.isCustomerServiceConfirmed ? true : false getCurrencyList().then(response => {
this.currecyList = response.data;
})
this.isCustomerServiceConfirmed = this.$route.query.isCustomerServiceConfirmed ? true : false
this.getCustomerSelect() this.getCustomerSelect()
this.reset() this.reset()
// this.getUserMemberUserFn() // this.getUserMemberUserFn()
...@@ -589,11 +686,34 @@ export default { ...@@ -589,11 +686,34 @@ export default {
memberList:[],//会员列表 memberList:[],//会员列表
selectMemberList:[],//选中会员列表 selectMemberList:[],//选中会员列表
serviceNetworkList:[], //网点列表 serviceNetworkList:[], //网点列表
allSimplList:[] allSimplList:[],
currecyList:[]
} }
}, },
methods: { methods: {
deleteBankData(index){
if(this.form.customerBankAccounts.length === 1){
this.$message.warning('至少添加一条银行卡号信息');
}else {
this.form.customerBankAccounts.splice(index, 1);
}
},
//添加银行卡
addBankData(){
let p = {
baAccountName: "",
baAccountNum: "",
baBankAdd: "",
baBankName: "",
baSwiftCode: "",
baType: null,
status: null,
currency:'',
};
this.form.customerBankAccounts = [...this.form.customerBankAccounts,p]
},
/* getUserMemberUserFn(val){ /* getUserMemberUserFn(val){
userMemberUserList({pageNo:1,pageSize:100,searchKey:val}).then(r => { userMemberUserList({pageNo:1,pageSize:100,searchKey:val}).then(r => {
this.memberList = r.data.list this.memberList = r.data.list
...@@ -672,8 +792,10 @@ export default { ...@@ -672,8 +792,10 @@ export default {
} }
this.$refs["contactForm"].validate((valid1,err1) => { this.$refs["contactForm"].validate((valid1,err1) => {
this.$refs["form"].validate((valid2,err2) => { this.$refs["form"].validate((valid2,err2) => {
if (!valid1 || !valid2) { this.$refs.bankForm.validate((valid3,err3)=>{
this.$showFormValidateErrors({...err1,...err2}) console.log(valid3,'valid3')
if (!valid1 || !valid2 || !valid3) {
this.$showFormValidateErrors({...err1,...err2,...err3})
return; return;
} }
if (this.form.customerContacts.length === 0){ if (this.form.customerContacts.length === 0){
...@@ -731,6 +853,7 @@ export default { ...@@ -731,6 +853,7 @@ export default {
}) })
}); });
}) })
})
}, },
/** 表单重置 */ /** 表单重置 */
reset() { reset() {
...@@ -776,12 +899,15 @@ export default { ...@@ -776,12 +899,15 @@ export default {
isShowTidanPrice:true, isShowTidanPrice:true,
carName:undefined, carName:undefined,
carNo:undefined, carNo:undefined,
customerBankAccounts:[]
}; };
this.form.createTime = (new Date()).getTime() this.form.createTime = (new Date()).getTime()
this.resetForm("form"); this.resetForm("form");
this.addBankData()
}, },
getCustomer(id) { getCustomer(id) {
return getCustomer(id).then(response => { return getCustomer(id).then(response => {
console.log(response,'response')
this.form = { ...this.form, ...response.data, id: this.customerId,transportType: response.data.transportType.split(',') }; this.form = { ...this.form, ...response.data, id: this.customerId,transportType: response.data.transportType.split(',') };
this.open = true; this.open = true;
this.title = this.$t('修改客户'); this.title = this.$t('修改客户');
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
<el-image v-show="!!customer.picture" :src="customer.picture" style="width: 100px;height: 100px"></el-image> <el-image v-show="!!customer.picture" :src="customer.picture" style="width: 100px;height: 100px"></el-image>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('备注')">{{ customer.remarks }}</el-descriptions-item> <el-descriptions-item :label="$t('备注')">{{ customer.remarks }}</el-descriptions-item>
<el-descriptions-item :label="$t('新老客户')">{{ customer.isNew ?$t('新客户') : $t('老客户') }}</el-descriptions-item>
<el-descriptions-item v-if="permissions.includes('ecw:customer:query-card')" :label="$t('身份证姓名')">{{ customer.carName }}</el-descriptions-item> <el-descriptions-item v-if="permissions.includes('ecw:customer:query-card')" :label="$t('身份证姓名')">{{ customer.carName }}</el-descriptions-item>
<el-descriptions-item v-if="permissions.includes('ecw:customer:query-card')" :label="$t('身份证号码')">{{ customer.carNo }}</el-descriptions-item> <el-descriptions-item v-if="permissions.includes('ecw:customer:query-card')" :label="$t('身份证号码')">{{ customer.carNo }}</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('信用等级')">{{ customer }}</el-descriptions-item>--> <!-- <el-descriptions-item :label="$t('信用等级')">{{ customer }}</el-descriptions-item>-->
...@@ -108,6 +109,30 @@ ...@@ -108,6 +109,30 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-card style="margin-top: 15px;">
<h3>{{$t('银行账户')}}</h3>
<el-table :data="customer.customerBankBackVOList" border>
<el-table-column label="编号"></el-table-column>
<el-table-column label="账户名称" prop="accountName"></el-table-column>
<el-table-column label="币别">
<template>
</template>
</el-table-column>
<el-table-column label="银行名称" prop="bankName"></el-table-column>
<el-table-column label="银行账户" prop="bankAccount"></el-table-column>
<el-table-column label="银行代码" prop="bankCode"></el-table-column>
<el-table-column label="账户类型">
<template></template>
</el-table-column>
<el-table-column label="状态">
<template v-slot="{row}">
{{row.status ? '正常' :'停用'}}
</template>
</el-table-column>
<el-table-column label="银行地址" prop="bankAddress"></el-table-column>
</el-table>
</el-card>
<el-tabs v-model="activeName" style="margin-top: 15px" type="border-card"> <el-tabs v-model="activeName" style="margin-top: 15px" type="border-card">
<el-tab-pane name="order" :label="$t('订单')"> <el-tab-pane name="order" :label="$t('订单')">
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<el-row :gutter="30"> <el-row :gutter="30">
<el-col :span="7"> <el-col :span="7">
<el-form-item :label="$t('付款单号')"> <el-form-item :label="$t('付款单号')">
<el-input></el-input> <el-input v-model="queryParams.paymentNo"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
...@@ -57,60 +57,65 @@ ...@@ -57,60 +57,65 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item :label="$t('订单编号')"> <el-form-item :label="$t('账单号')">
<el-input></el-input> <el-input v-model="queryParams.accountNumber"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item> <el-form-item>
<el-button type="primary" @click="getList">{{$t('查找')}}</el-button> <el-button type="primary" @click="getList">{{$t('查找')}}</el-button>
<el-button type="primary">{{$t('新增请款单')}}</el-button> <el-button type="primary" @click="$router.push({path:'/financial/commission-requestFunds',query:{payableId:0}})" v-has-permi="['ecw:commission-Payment:add']" >{{$t('新增请款单')}}</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-card> </el-card>
<el-table :data="list" style="margin-top: 30px"> <el-table border :data="list" style="margin-top: 30px">
<el-table-column type="index" :label="$t('序号')"></el-table-column> <el-table-column align="center" type="index" :label="$t('序号')"></el-table-column>
<el-table-column prop="customerId" :label="$t('付款单号')"></el-table-column> <el-table-column align="center" prop="paymentNo" :label="$t('付款单号')">
<el-table-column prop="customerName" :label="$t('客户')"></el-table-column> <template v-slot="{row}">
<el-table-column :label="$t('创建时间')"> <router-link :to="{path:'/financial/commission-requestFunds',query:{[[0].includes(row.state) ? 'id' : 'lookId' ]:row.id}}">{{row.paymentNo}} </router-link>
</template>
</el-table-column>
<el-table-column align="center" prop="customerName" :label="$t('客户')"></el-table-column>
<el-table-column align="center" :label="$t('创建时间')">
<template v-slot="{row}"> <template v-slot="{row}">
{{parseTime(row.createTime)}} {{parseTime(row.createTime)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('最后付款时间')"> <el-table-column align="center" :label="$t('最后付款时间')">
<template v-slot="{row}"> <template v-slot="{row}">
{{parseTime(row.latestPayAt)}} {{parseTime(row.latestPayAt)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="invoiceStatus" :label="$t('发票')"> <el-table-column align="center" prop="invoiceStatus" :label="$t('发票')">
<template v-slot="{row}"> <template v-slot="{row}">
{{row.invoiceStatus ? $t('已开票') : $t('未开票')}} {{row.invoiceStatus ? $t('已开票') : $t('未开票')}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('状态')" prop="state" > <el-table-column align="center" :label="$t('状态')" prop="state" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag <dict-tag
:type="DICT_TYPE.ECW_PAYMENT_STATE" :type="DICT_TYPE.ECW_PAYMENT_STATE"
:value="scope.row.state" :value="scope.row.state"
/> />
<span v-if="scope.row.state == 2 " :title="scope.row.remark"><i class="el-icon-question"></i></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')"> <el-table-column :label="$t('操作')">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button type="text" v-if="[0,2].includes(row.state)" >{{$t('编辑')}}</el-button> <el-button type="text" v-has-permi="['ecw:commission-Payment:edit']" v-if="[0,2].includes(row.state)" @click="$router.push({path:'/financial/commission-requestFunds',query:{id:row.id}})" >{{$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-has-permi="['ecw:commission-Payment:delete']" @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-has-permi="['ecw:commission-Payment:details']" v-if="[7,3,1].includes(row.state)" @click="$router.push({path:'/bpm/process-instance/detail',query:{id:row.bmpId}})" >{{$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-has-permi="['ecw:commission-Payment:Unapprove']" v-if="[1].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-has-permi="['ecw:commission-Payment:De-approval']" v-if="[4,].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-has-permi="['ecw:commission-Payment:Write-off']" v-if="[4,].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-has-permi="['ecw:commission-Payment:print']" v-if="[4,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-has-permi="['ecw:commission-Payment:CancelWrite-off']" v-if="[6,].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" v-has-permi="['ecw:commission-Payment:CancelDe-approval']" v-if="[3].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" v-has-permi="['ecw:commission-Payment:CancelWrite-off']" v-if="[5].includes(row.state)" @click="bridgeFn('取消付款单核销',5, row, '取消付款单核销' )" > {{$t('取消核销')}} </el-button>
<el-button type="text" @click="bridgeFn('取消付款反单核销',6, row, '取消付款反单核销' )" > {{$t('取消反核销')}} </el-button> <el-button type="text" v-has-permi="['ecw:commission-Payment:CancelCancellingWrite-off']" v-if="[7].includes(row.state)" @click="bridgeFn('取消付款单反核销',6, row, '取消付款单反核销' )" > {{$t('取消反核销')}} </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -132,13 +137,14 @@ ...@@ -132,13 +137,14 @@
<el-button @click="paymentShow = false">{{ $t('取消') }}</el-button> <el-button @click="paymentShow = false">{{ $t('取消') }}</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- <commission-payment-details :id="6"></commission-payment-details>-->
</div> </div>
</template> </template>
<script> <script>
import {listSimpleUsers} from "@/api/system/user"; import {listSimpleUsers} from "@/api/system/user";
import { import {
commissionPaymentCancelFinancePaymentApproval,
commissionPaymentCancelFinancePaymentApprovalNo, commissionPaymentCancelFinancePaymentApprovalNo,
commissionPaymentCancelFinancePaymentWriteOff, commissionPaymentCancelFinancePaymentWriteOff,
commissionPaymentCancelFinancePaymentWriteOffNo, commissionPaymentCancelFinancePaymentWriteOffNo,
...@@ -149,9 +155,12 @@ import { ...@@ -149,9 +155,12 @@ import {
commissionPaymentVerifyCancel commissionPaymentVerifyCancel
} from "@/api/ecw/financial"; } from "@/api/ecw/financial";
import {parseTime} from "../../../utils/ruoyi"; import {parseTime} from "../../../utils/ruoyi";
import Template from "@/views/cms/template/index.vue";
import commissionPaymentDetails from "@/views/ecw/financial/components/commissionPaymentDetails.vue";
export default { export default {
name: "commission-Payment", name: "commission-Payment",
components: {Template,commissionPaymentDetails},
created() { created() {
// 业务员 // 业务员
listSimpleUsers().then((res) => (this.creatorData = res.data)); listSimpleUsers().then((res) => (this.creatorData = res.data));
...@@ -160,10 +169,13 @@ export default { ...@@ -160,10 +169,13 @@ export default {
data(){ data(){
return { return {
queryParams:{ queryParams:{
accountNumber:null,
invoiceStatus:null, invoiceStatus:null,
state:null, state:null,
salesmanName:null, salesmanName:null,
searchKey:null, searchKey:null,
paymentNo:null,
page:1, page:1,
rows:10, rows:10,
}, },
...@@ -235,25 +247,33 @@ export default { ...@@ -235,25 +247,33 @@ export default {
} }
switch (this.paymentIndex){ switch (this.paymentIndex){
case 1: case 1:
// 反审核佣金付款单
commissionPaymentVerifyCancel(p).then(resolve, reject) commissionPaymentVerifyCancel(p).then(resolve, reject)
break; break;
case 2: case 2:
// 佣金付款单核销
commissionPaymentVerification(p).then(resolve, reject) commissionPaymentVerification(p).then(resolve, reject)
break; break;
case 3: case 3:
// 付款单反核销申请
commissionPaymentVerificationCancel(p).then(resolve, reject) commissionPaymentVerificationCancel(p).then(resolve, reject)
break; break;
case 4: case 4:
// 取消付款单反审核
commissionPaymentCancelFinancePaymentApprovalNo(p).then(resolve, reject) commissionPaymentCancelFinancePaymentApprovalNo(p).then(resolve, reject)
break; break;
case 5: case 5:
// 取消付款单核销
commissionPaymentCancelFinancePaymentWriteOff(p).then(resolve, reject) commissionPaymentCancelFinancePaymentWriteOff(p).then(resolve, reject)
break break
case 6: case 6:
// 取消付款单反核销
commissionPaymentCancelFinancePaymentWriteOffNo(p).then(resolve, reject) commissionPaymentCancelFinancePaymentWriteOffNo(p).then(resolve, reject)
break break;
case 7: case 7:
// 取消付款单审核
commissionPaymentCancelFinancePaymentApproval(p).then(resolve, reject)
break;
} }
} }
......
...@@ -80,17 +80,17 @@ ...@@ -80,17 +80,17 @@
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" @click="getList">{{$t('查找')}}</el-button> <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-button v-has-permi="['ecw:commission-payable:add']" type="primary" @click="$router.push({path:'/financial/commission-requestFunds',query:{payableId:0}})" >{{$t('新增请款单')}}</el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
</el-card> </el-card>
<el-table :data="list" style="margin-top: 30px"> <el-table border :data="list" style="margin-top: 30px">
<el-table-column :label="$t('订单编号')" prop="orderNo" ></el-table-column> <el-table-column align="center" :label="$t('订单编号')" prop="orderNo" ></el-table-column>
<el-table-column :label="$t('客户名称')" prop="customerName" ></el-table-column> <el-table-column align="center" :label="$t('客户名称')" prop="customerName" ></el-table-column>
<el-table-column :label="$t('订单编号')" prop="payableNo" ></el-table-column> <el-table-column align="center" :label="$t('订单编号')" prop="payableNo" ></el-table-column>
<el-table-column :label="$t('佣金类型')"> <el-table-column align="center" :label="$t('佣金类型')">
<template v-slot="{row}"> <template v-slot="{row}">
<dict-tag <dict-tag
:type="DICT_TYPE.COMMISSION_TYPE" :type="DICT_TYPE.COMMISSION_TYPE"
...@@ -98,19 +98,27 @@ ...@@ -98,19 +98,27 @@
></dict-tag> ></dict-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('金额')" prop="totalAmount"> <el-table-column align="center" :label="$t('金额')" prop="totalAmount">
<template slot-scope="scope">
<span>{{ scope.row.totalAmount }}</span>
<span>{{getCurrencyLabel(scope.row.currencyId)}}</span>
</template>
</el-table-column>
<el-table-column align="center" :label="$t('应付生成时间')">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
</template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('应付生成时间')"></el-table-column> <el-table-column align="center" :label="$t('状态')">
<el-table-column :label="$t('状态')">
<template v-slot="{row}"> <template v-slot="{row}">
{{$t(STATE.find(r => r.value === row.state).title)}} {{$t(STATE.find(r => r.value === row.state).title)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('付款单号')" prop="paymentNo"></el-table-column> <el-table-column align="center" :label="$t('付款单号')" prop="paymentNo"></el-table-column>
<el-table-column :label="$t('备注')" prop="remark" ></el-table-column> <el-table-column :label="$t('备注')" prop="remark" ></el-table-column>
<el-table-column :label="$t('操作')"> <el-table-column align="center" :label="$t('操作')">
<template v-slot="{row}"> <template v-slot="{row}">
<el-button type="text" @click="$router.push({path:'/financial/commission-requestFunds',query:{payableId:row.id}})" >{{$t('请款')}}</el-button> <el-button v-has-permi="['ecw:commission-payable:funds']" v-if="!row.state" type="text" @click="$router.push({path:'/financial/commission-requestFunds',query:{payableId:row.id}})" >{{$t('请款')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -129,6 +137,8 @@ import {getWarehouseList} from "@/api/ecw/warehouse"; ...@@ -129,6 +137,8 @@ import {getWarehouseList} from "@/api/ecw/warehouse";
import item from "@/layout/components/Sidebar/Item.vue"; import item from "@/layout/components/Sidebar/Item.vue";
import {payablePage} from "@/api/ecw/financial"; import {payablePage} from "@/api/ecw/financial";
import Template from "@/views/cms/template/index.vue"; import Template from "@/views/cms/template/index.vue";
import {getCurrencyPage} from "@/api/ecw/currency";
import {parseTime} from "../../../utils/ruoyi";
export default { export default {
// 应付款佣金 // 应付款佣金
...@@ -137,6 +147,7 @@ export default { ...@@ -137,6 +147,7 @@ export default {
created() { created() {
getWarehouseList().then(res => this.warehouseList = res.data) getWarehouseList().then(res => this.warehouseList = res.data)
this.getList() this.getList()
getCurrencyPage().then(res => this.currencyList = res.data.list)
}, },
data(){ data(){
return { return {
...@@ -166,7 +177,8 @@ export default { ...@@ -166,7 +177,8 @@ export default {
state:'' state:''
}, },
list:[], list:[],
total:0 total:0,
currencyList:[],
} }
}, },
computed:{ computed:{
...@@ -179,12 +191,18 @@ export default { ...@@ -179,12 +191,18 @@ export default {
}, },
}, },
methods:{ methods:{
parseTime,
getList(){ getList(){
payablePage(this.queryParams).then(r =>{ payablePage(this.queryParams).then(r =>{
this.list = r.data.list this.list = r.data.list
this.total = r.data.total this.total = r.data.total
}) })
} },
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> </script>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
:model="form" :model="form"
label-width="120px" label-width="120px"
label-position="left" label-position="left"
:disabled="interdict"
> >
<el-descriptions :column="3" class="card" border> <el-descriptions :column="3" class="card" border>
<el-descriptions-item :label="$t('客户')"> <el-descriptions-item :label="$t('客户')">
...@@ -96,6 +97,13 @@ ...@@ -96,6 +97,13 @@
/> />
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('客户的账户名称')" >
<el-form-item label-width="0" prop="customerBankAccountName">
<el-select v-model="form.customerBankAccount" >
<el-option @click.native="getBankInfo(item)" v-for="(item) in bankAccountList" :value="item.baAccountNum" :label="item.baAccountNum + (item.baAccountName)" ></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('账户名称')" > <el-descriptions-item :label="$t('账户名称')" >
<el-form-item label-width="0" :rules="{message:$t('账户名称不能为空'),required:true,}" prop="customerBankAccountName"> <el-form-item label-width="0" :rules="{message:$t('账户名称不能为空'),required:true,}" prop="customerBankAccountName">
<el-input v-model="form.customerBankAccountName" ></el-input> <el-input v-model="form.customerBankAccountName" ></el-input>
...@@ -113,34 +121,22 @@ ...@@ -113,34 +121,22 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('银行代码')" > <el-descriptions-item :label="$t('银行代码')" >
<el-form-item label-width="0" > <el-form-item label-width="0" >
<el-input></el-input> <el-input v-model="form.customerBankCode" ></el-input>
</el-form-item> </el-form-item>
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('账户类型')" > <el-descriptions-item :label="$t('账户类型')" >
<el-form-item label-width="0"> <el-form-item label-width="0">
<el-input></el-input> <el-select v-model="form.customerAccountType">
<el-option value="0" label="停用"></el-option>
<el-option value="1" label="正常"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :column="3" :label="$t('银行地址')" >
<el-form-item label-width="0">
<el-input style="width: 30%;" v-model="form.customerBankAddress" ></el-input>
</el-form-item> </el-form-item>
</el-descriptions-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>
<el-descriptions :column="3" class="card" border> <el-descriptions :column="3" class="card" border>
<el-descriptions-item :label="$t('最后付款日期')"> <el-descriptions-item :label="$t('最后付款日期')">
...@@ -151,6 +147,7 @@ ...@@ -151,6 +147,7 @@
prop="latestPayAt" prop="latestPayAt"
required required
:error="$t('最后付款日期不能为空')" :error="$t('最后付款日期不能为空')"
:datafld="interdict"
> >
<el-date-picker <el-date-picker
clearable clearable
...@@ -184,6 +181,7 @@ ...@@ -184,6 +181,7 @@
<div slot="header" class="card-title">{{ $t('费用信息') }}</div> <div slot="header" class="card-title">{{ $t('费用信息') }}</div>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
:disabled="interdict"
type="primary" type="primary"
plain plain
icon="el-icon-plus" icon="el-icon-plus"
...@@ -206,7 +204,7 @@ ...@@ -206,7 +204,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('发票号码')" align="center" prop="invoiceNumber"> <el-table-column :label="$t('发票号码')" align="center" prop="invoiceNumber">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.invoiceNumber"></el-input> <el-input :disabled="interdict" v-model="scope.row.invoiceNumber"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('应付金额')" align="center" prop="totalAmount"/> <el-table-column :label="$t('应付金额')" align="center" prop="totalAmount"/>
...@@ -218,12 +216,12 @@ ...@@ -218,12 +216,12 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('汇率')" align="center" prop="exchangeRate"> <el-table-column :label="$t('汇率')" align="center" prop="exchangeRate">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.exchangeRate"></el-input> <el-input :disabled="interdict" v-model="scope.row.exchangeRate"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('税率')+'%'" align="center" prop="taxRate"> <el-table-column :label="$t('税率')+'%'" align="center" prop="taxRate">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.taxRate" <el-input :disabled="interdict" v-model="scope.row.taxRate"
@keyup.native="scope.row.taxRate = oninput(scope.row.taxRate)"></el-input> @keyup.native="scope.row.taxRate = oninput(scope.row.taxRate)"></el-input>
</template> </template>
</el-table-column> </el-table-column>
...@@ -243,6 +241,7 @@ ...@@ -243,6 +241,7 @@
label-width="120px" label-width="120px"
label-position="left" label-position="left"
style="width: 50%" style="width: 50%"
:disabled="interdict"
> >
<el-descriptions :column="1" class="card" border> <el-descriptions :column="1" class="card" border>
<el-descriptions-item :label="$t('账单号')"> <el-descriptions-item :label="$t('账单号')">
...@@ -286,15 +285,15 @@ ...@@ -286,15 +285,15 @@
<work-flow xmlkey="merge_order" v-model="form.copyUserList"></work-flow> <work-flow xmlkey="merge_order" v-model="form.copyUserList"></work-flow>
<div slot="footer" style="margin: 20px 0"> <div slot="footer" style="margin: 20px 0">
<el-button type="primary" @click="submitForm(1)">{{ $t('提交申请') }}</el-button> <el-button type="primary" v-if="!interdict" @click="submitForm(1)">{{ $t('提交申请') }}</el-button>
<el-button type="primary" @click="submitForm(0)">{{ $t('保存草稿') }}</el-button> <el-button type="primary" v-if="!interdict" @click="submitForm(0)">{{ $t('保存草稿') }}</el-button>
<el-button v-if="orderData.inWarehouseState==207" type="primary" <!-- <el-button v-if="orderData.inWarehouseState==207" type="primary"-->
@click="$router.push(`/bpm/process-instance/detail?id=`+orderApprovalBackVO.applyingFormId)"> <!-- @click="$router.push(`/bpm/process-instance/detail?id=`+orderApprovalBackVO.applyingFormId)">-->
{{ $t('审核中') }} <!-- {{ $t('审核中') }}-->
</el-button> <!-- </el-button>-->
<el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="dialogVisible = true"> <!-- <el-button v-if="orderData.inWarehouseState==207" plain type="primary" @click="dialogVisible = true">-->
{{ $t('取消审核') }} <!-- {{ $t('取消审核') }}-->
</el-button> <!-- </el-button>-->
<el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{ $t('返回') }}</el-button> <el-button plain type="primary" @click="$store.dispatch('tagsView/delCurrentView')">{{ $t('返回') }}</el-button>
</div> </div>
<el-dialog <el-dialog
...@@ -454,7 +453,12 @@ import { ...@@ -454,7 +453,12 @@ import {
getPaymentInfoByIds, getPaymentInfoByIds,
getPaymentItem, getPaymentItem,
updatePayment, updatePayment,
payablePage, commissionPayment, commissionPaymentUpdate, getCommissionPayable payablePage,
commissionPayment,
commissionPaymentUpdate,
getCommissionPayable,
getCommissionPayment,
getCommissionPaymentList, getCommissionPayableList
} from "@/api/ecw/financial" } from "@/api/ecw/financial"
import {getCurrencyPage} from "@/api/ecw/currency"; import {getCurrencyPage} from "@/api/ecw/currency";
import NP from 'number-precision' import NP from 'number-precision'
...@@ -499,6 +503,8 @@ export default { ...@@ -499,6 +503,8 @@ export default {
warehouseList: [], warehouseList: [],
selectedUsers: [], selectedUsers: [],
dialogVisible: false, dialogVisible: false,
interdict:false,
bankAccountList:[],
}; };
}, },
async created() { async created() {
...@@ -515,23 +521,25 @@ export default { ...@@ -515,23 +521,25 @@ export default {
this.$set(this.form, 'customerId', res.data.customerId) this.$set(this.form, 'customerId', res.data.customerId)
}) })
} }
if (that.$route.query.id && that.$route.query.id !== '0') { if ((that.$route.query.id && that.$route.query.id !== '0') || (that.$route.query.lookId && that.$route.query.lookId !== '0') ) {
this.id = this.$route.query.id; this.id = this.$route.query.id || this.$route.query.lookId;
getPaymentInfoByIds({id: this.id}).then(res => { if(!!this.$route.query.lookId) this.interdict = true;
getCommissionPayment({id: this.id}).then(res => {
this.form = { this.form = {
copyUserList:[], copyUserList:[],
...res.data, ...res.data,
latestPayAt: this.parseTime(res.data.latestPayAt, '{y}-{m}-{d}'), latestPayAt: this.parseTime(res.data.latestPayAt, '{y}-{m}-{d} {h}:{i}:{s}'),
applicationAt: this.parseTime(res.data.applicationAt, '{y}-{m}-{d}'), applicationAt: this.parseTime(res.data.applicationAt, '{y}-{m}-{d} {h}:{i}:{s}'),
invoiceStatus: String(res.data.invoiceStatus), invoiceStatus: String(res.data.invoiceStatus),
} }
this.$set(this.form, 'customerBankAccount', res.data.customerBankAccount) this.$set(this.form, 'customerBankAccount', res.data.customerBankAccount)
}) this.list = [...res.data.payableBackVOList]
getPaymentItem({id: this.id}).then(res => { this.defaultList = [...res.data.payableBackVOList]
this.list = [...res.data] });
this.defaultList = [...res.data] // getCommissionPayableList({ids: [this.id]}).then(res => {
}) // console.log(res.data,'res.data')
//
// })
} }
listSimpleUsers().then((res) => (that.creatorData = res.data)); listSimpleUsers().then((res) => (that.creatorData = res.data));
getChannelList().then((res) => (that.channelList = res.data)); getChannelList().then((res) => (that.channelList = res.data));
...@@ -586,7 +594,7 @@ export default { ...@@ -586,7 +594,7 @@ export default {
getList() { getList() {
this.loading = true; this.loading = true;
// 处理查询参数 // 处理查询参数
let params = {...this.queryParams}; let params = {...this.queryParams,state:0};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime"); this.addBeginAndEndTime(params, this.dateRangeCreateTime, "createTime");
// 执行查询 // 执行查询
payablePage(params).then((response) => { payablePage(params).then((response) => {
...@@ -642,12 +650,12 @@ export default { ...@@ -642,12 +650,12 @@ export default {
if (this.id && this.id !== '0') { if (this.id && this.id !== '0') {
commissionPaymentUpdate(params).then(res => { commissionPaymentUpdate(params).then(res => {
this.$modal.msgSuccess(this.$t('修改成功')); this.$modal.msgSuccess(this.$t('修改成功'));
// this.$router.back(); this.$router.back();
}) })
} else { } else {
commissionPayment(params).then(res => { commissionPayment(params).then(res => {
this.$modal.msgSuccess(this.$t('新增成功')); this.$modal.msgSuccess(this.$t('新增成功'));
// this.$router.back(); this.$router.back();
}) })
} }
} }
...@@ -664,9 +672,12 @@ export default { ...@@ -664,9 +672,12 @@ export default {
selectChange(val) { selectChange(val) {
if(val){ if(val){
getCustomer(val).then(r => { getCustomer(val).then(r => {
this.$set(this.form, 'customerBank',r.data.bank ) this.form.customerName = r.data.name
this.$set(this.form, 'customerBankAccount',r.data.bankNumber ) this.bankAccountList = r.data.customerBankAccountBackVOList
this.$set(this.form, 'customerBankAccountName',r.data.name ) // this.$set(this.form, 'customerBank',r.data.bank )
// this.$set(this.form, 'customerBankAccount',r.data.bankNumber )
// this.$set(this.form, 'customerBankAccountName',r.data.name )
if(this.bankAccountList.length) this.getBankInfo(this.bankAccountList[0])
}) })
} }
...@@ -685,6 +696,22 @@ export default { ...@@ -685,6 +696,22 @@ export default {
// t && (this.form.supplierName = t.companyZh) // t && (this.form.supplierName = t.companyZh)
// t && (this.bankData = t.bankList) // t && (this.bankData = t.bankList)
}, },
getBankInfo(val){
let {baAccountName,baAccountNum,baBankAdd,baBankName,baSwiftCode,baType,status} = val
// this.form.customerAccountType = baType; //账户类型
this.$set(this.form, 'customerAccountType', baType)
// this.form.customerBank = baBankName; //客户银行
this.$set(this.form, 'customerBank', baBankName)
// this.form.customerBankAccount = baAccountNum; // 客户银行账号
this.$set(this.form, 'customerBankAccount', baAccountNum)
// this.form.customerBankAccountName = customerBankAccountName; //客户银行账户名
this.$set(this.form, 'customerBankAccountName', baAccountName )
// this.form.customerBankAddress = customerBankAddress; // 银行地址
this.$set(this.form, 'customerBankAddress', baBankAdd)
// this.form.customerBankAddress = customerBankCode; // 银行代码
this.$set(this.form, 'customerBankCode', baSwiftCode)
},
handleQuery() { handleQuery() {
this.queryParams.page = 1; this.queryParams.page = 1;
this.getList() this.getList()
...@@ -836,6 +863,7 @@ export default { ...@@ -836,6 +863,7 @@ export default {
watch:{ watch:{
'form.customerId'(val){ 'form.customerId'(val){
this.selectChange(val) this.selectChange(val)
} }
} }
}; };
......
<template>
<div>
<el-descriptions :column="5" size="mini">
<el-descriptions-item label="付款单">{{record.paymentNo}}</el-descriptions-item>
<el-descriptions-item label="客户名称">{{record.customerName}}</el-descriptions-item>
<el-descriptions-item label="创建时间">{{parseTime(record.createTime)}}</el-descriptions-item>
<el-descriptions-item label="业务员">{{record.salesmanName}}</el-descriptions-item>
<el-descriptions-item label="付款金额">{{record.totalAmount}}rmb</el-descriptions-item>
</el-descriptions>
<router-link :to="{path:'/financial/commission-requestFunds',query:{lookId: this.id}}">
<el-button>查看详情</el-button>
</router-link>
</div>
</template>
<script>
import {getCommissionPayment} from "@/api/ecw/financial";
import {parseTime} from "../../../../utils/ruoyi";
export default {
name: "commissionPaymentDetails",
methods: {parseTime},
props:{
id:{
type:[Number, String],
default:()=>0
},
},
data(){
return {
record:{}
}
},
watch:{
id:{
handler:function (newVal){
getCommissionPayment({id:newVal}).then(r => {
console.log(r.data, '审批')
this.record = r.data;
})
},
immediate:true,
}
}
}
</script>
<style scoped lang="scss">
</style>
...@@ -146,24 +146,25 @@ ...@@ -146,24 +146,25 @@
v-hasPermi="['ecw:paymentVoucher:edit']" type="text">{{ $t('编辑') }} v-hasPermi="['ecw:paymentVoucher:edit']" type="text">{{ $t('编辑') }}
</el-button> </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 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)"> <el-button v-has-permi="['ecw:paymentVoucher:Unapprove']" type="text" v-if="[1].includes(row.state)" @click="bridgeFn(1, '取消审核',row)">
{{ $t('取消审核') }} {{ $t('取消审核') }}
</el-button> </el-button>
<el-button type="text" v-if="[1,7].includes(row.state)">{{ $t('审核详情') }}</el-button> <el-button type="text" v-has-permi="['ecw:paymentVoucher:details']" v-if="[7,3,1].includes(row.state)" @click="$router.push({path:'/bpm/process-instance/detail',query:{id:row.bmpId}})" >{{ $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-has-permi="['ecw:paymentVoucher:Cancel-De-approval']" v-if="[3].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-has-permi="['ecw:paymentVoucher:Cancel-Write-off']" type="text" v-if="[5].includes(row.state)" @click="bridgeFn(3, '取消付款单核销',row)" >{{ $t('取消核销审核') }}</el-button>
<el-button v-if="[4].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:print']" <el-button v-if="[4].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:De-approval']"
@click="verifyCancelClick(row)">{{ $t('反审核') }} @click="bridgeFn(4, '反审核',row)">{{ $t('反审核') }}
</el-button> </el-button>
<el-button v-if="[4].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:writeOff']" <el-button v-if="[4].includes(row.state)" size="mini" type="text" v-hasPermi="['ecw:paymentVoucher:writeOff']"
@click="verificationClick(row)">{{ $t('核销') }} @click="bridgeFn(5, '核销',row)">{{ $t('核销') }}
</el-button> </el-button>
<el-button v-if="[6].includes(row.state)" size="mini" type="text" <el-button v-if="[6].includes(row.state)" size="mini" type="text"
v-hasPermi="['ecw:paymentVoucher:cancelWriteOff']" @click="verificationCancelClick(row)"> v-hasPermi="['ecw:paymentVoucher:cancelWriteOff']" @click="bridgeFn(6, '反核销',row)">
{{ $t('反核销') }} {{ $t('反核销') }}
</el-button> </el-button>
<el-button v-hasPermi="['ecw:paymentVoucher:Cancel-Cancelling-Write-off']" v-if="[7].includes(row.state)" size="mini" type="text" @click="bridgeFn(7, '取消付款单反核销',row)" > {{ $t('取消反核销') }}</el-button>
<!-- <el-button v-if="scope.row.state == 3" size="mini" type="text">{{ $t('开票') }}</el-button> --> <!-- <el-button v-if="scope.row.state == 3" size="mini" type="text">{{ $t('开票') }}</el-button> -->
<el-button v-if="[6,4].includes(row.state)" size="mini" type="text" @click="toprint(row.id)" <el-button v-if="[6,4].includes(row.state)" size="mini" type="text" @click="toprint(row.id)"
...@@ -244,7 +245,7 @@ import { ...@@ -244,7 +245,7 @@ import {
cancelFinancePaymentApproval, cancelFinancePaymentApproval,
cancelFinancePaymentApprovalNo, cancelFinancePaymentApprovalNo,
cancelFinancePaymentWriteOff, cancelFinancePaymentWriteOff,
cancelFinancePaymentWriteOffNo cancelFinancePaymentWriteOffNo, paymentCancelFinancePaymentWriteOffNo
} from "@/api/ecw/financial" } from "@/api/ecw/financial"
export default { export default {
...@@ -417,8 +418,8 @@ export default { ...@@ -417,8 +418,8 @@ export default {
let loserFn = () => { let loserFn = () => {
this.examineShow = false; this.examineShow = false;
} }
let {id: paymentId} = this.examineData let {id: paymentId,paymentNo} = this.examineData
let p = {paymentId, remark: this.cancelReason} let p = {paymentId, remark: this.cancelReason, paymentNo, reason:this.cancelReason }
switch (this.examineIndex) { switch (this.examineIndex) {
case 1: case 1:
// 取消审核 // 取消审核
...@@ -431,7 +432,25 @@ export default { ...@@ -431,7 +432,25 @@ export default {
case 3: case 3:
//取消付款单核销 //取消付款单核销
cancelFinancePaymentWriteOffNo(p).then(successFn,loserFn) cancelFinancePaymentWriteOffNo(p).then(successFn,loserFn)
break;
case 4: case 4:
// 反审核
paymentVerifyCancel(p).then(successFn,loserFn)
break;
case 5:
// 核销
paymentVerification(p).then(successFn,loserFn);
break;
case 6:
// 反核销
paymentVerificationCancel(p).then(successFn,loserFn)
break;
case 7:
// 取消反核销
paymentCancelFinancePaymentWriteOffNo(p).then(successFn,loserFn)
break;
} }
} }
}, },
......
<template>
<div class="app-container" >
<div id="print" style="font-size: 18px;">
<div style="text-align: center;font-weight: bold;font-size: 20px;">{{ $t('佣金付款单') }}</div>
<div style="margin-top: 20px;">
<div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('付款单号') }}</div><span>{{ form.paymentNo || '-' }}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('最后付款日') }}</div> <span>{{ form.latestPayAt || '-' }}</span></div>
</div>
<div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('申请日期') }}</div> <span>{{ form.applicationAt || '-' }}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('结算方式') }}</div><span> <dict-tag
:type="DICT_TYPE.CUSTOMER_BALANCE"
v-model="form.settlementType"
/></span></div>
</div>
<div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('客户名称') }}</div><span>{{ form.customerName || '-' }}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('银行户名') }}</div><span>{{ form.customerBankAccountName || '-' }}</span></div>
</div>
<div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('银行名称') }}</div><span>{{ form.customerBank|| '-' }}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('银行账号') }}</div><span>{{ form.customerBankAccount || '-' }}</span></div>
</div>
<!-- <div style="display: flex;width: 80%;align-items: center;margin-bottom: 10px;">
<div style="flex:1"><div style="width: 120px;text-align: right;">{{ $t('水单号:') }}</div><span>{{form?form.accountBank:''}}</span></div>
<div style="flex:1"><div style="width: 120px;text-align: right;">{{ $t('手续费:') }}</div><span>{{form?form.accountBank:''}}</span></div>
</div> -->
<div style="display: flex;width: 80%;align-items: center;">
<div style="flex:1"><div style="width: 120px;text-align: right;display:inline-block;">{{ $t('备注') }}</div><span>{{ form.notes || '-' }}</span></div>
</div>
</div>
<table border="1" style="margin-top: 20px;width: 100%;text-align: center;border-collapse: collapse;line-height: 2 ">
<tr>
<th style="width: 6%;">{{ $t('序号') }}</th>
<th style="width: 11%;">{{ $t('自编号') }}</th>
<th style="width: 15%;">{{ $t('佣金类型') }}</th>
<th style="width: 10%;">{{ $t('币种') }}</th>
<th style="width: 10%;">{{ $t('汇率') }}</th>
<th style="width:10%;">{{ $t('税率') }}</th>
<th style="width: 15%;">{{ $t('发票号') }}</th>
<th style="width: 10%;">{{ $t('应付金额') }}</th>
<th style="width: 10%;">{{ $t('申请金额') }}</th>
</tr>
<tr v-for="(item, index) in list" :key="index">
<td>{{ index + 1 }}</td>
<td>{{ item.payableNo }}</td>
<td>
<dict-tag
:type="DICT_TYPE.COMMISSION_TYPE"
:value="item.feeType"
></dict-tag>
</td>
<td>{{getCurrencyLabel(item.currencyId)}}
<!-- <dict-tag :type="DICT_TYPE.BOX_SHIPPING_PRICE_UNIT" :value="item.currencyId" /> -->
</td>
<td>{{ item.exchangeRate }}</td>
<td>{{ item.taxRate }}</td>
<td>{{ item.invoiceNumber }}</td>
<td>{{ item.totalAmount }}</td>
<td>{{ item.total }}</td>
</tr>
<tr>
<td colspan="2">{{ $t('合计(大写)') }}</td>
<td colspan="2">{{ convertCurrency(totalMoney()) }}</td>
<td colspan="2">{{ $t('合计付款') }}</td>
<td>{{ totalMoney() }}</td>
</tr>
</table>
<div style="margin-top: 20px;">
<div style="display: flex;width: 100%;align-items: center;">
<div style="flex:1"><span style="width: 120px;">{{ $t('主管') }}</span></div>
<div style="flex:1"><span style="width: 120px;">{{ $t('会计') }}</span></div>
<div style="flex:1"><span style="width: 120px;">{{ $t('出纳') }}</span></div>
<div style="flex:1"><span style="width: 120px;">{{ $t('经手人') }}</span></div>
</div>
</div>
</div>
<div slot="footer" class="card">
<el-button type="primary" @click="print">{{ $t('确订打印') }}</el-button>
</div>
</div>
</template>
<script>
import { userList } from "@/api/system/user"
import {DICT_TYPE} from '@/utils/dict'
import CustomerSelector from '@/components/CustomerSelector'
import { getBankAccountPage } from "@/api/ecw/bankAccount";
import { listSimpleDepts } from "@/api/system/dept"
// import { getReceipt} from "@/api/ecw/receipt";
import {
getCommissionPayableList,
getCommissionPayment,
getPaymentInfoByIds,
getPaymentItem
} from "@/api/ecw/financial"
import { getCurrencyPage } from "@/api/ecw/currency";
import lodop from '@/utils/lodop'
export default {
name: "PrintVoucher",
components: {
CustomerSelector
},
data() {
return {
loadings: false,
form:{},
title:this.$t('收款单'),
creatorData:[],
list:[],
fileList:[],
bankData:[],
params:{
page:1,
rows:20,
},
// deptData:[],
// deptArr:[],
id:0,
currencyList:[]
}
},
created() {
let that = this
if(that.$route.query.id){
that.id = that.$route.query.id
that.getCollectionData()
}
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
userList('salesman').then(res =>that.creatorData = res.data)
getBankAccountPage(that.params).then(res =>that.bankData = res.data.list)
// 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
// }
// })
// })
},
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 ''
},
getCollectionData(){
let that = this
getCommissionPayment({id:that.id}).then(res =>{
console.log(res.data,'res.data')
that.form = {
...res.data,
latestPayAt: this.parseTime(res.data.latestPayAt, '{y}-{m}-{d}'),
applicationAt: this.parseTime(res.data.applicationAt, '{y}-{m}-{d}')
}
})
getCommissionPayableList({ ids: [this.id] }).then(res => {
console.log(res,'resddd');
this.list = [...res.data]
})
},
print(){
lodop().then(LODOP => {
LODOP.PRINT_INIT();
LODOP.SET_PRINT_STYLE("FontSize",18);
LODOP.SET_PRINT_STYLE("Bold",1);
// LODOP.ADD_PRINT_TEXT(50,231,260,39,"打印页面部分内容");
// var stylePrint = "<style>table th,td{padding:0;margin:0;border:1px solid #000000;border-collapse:collapse;}</style>"
var htmlContent = "<body>"+document.getElementById("print").innerHTML+"</body>"
LODOP.ADD_PRINT_HTM("6mm", "6mm", "RightMargin:6mm", "BottomMargin:6mm", htmlContent);
LODOP.PRINT();
// this.$alert('已发起打印任务');
// LODOP.PREVIEW(); // 预览
/* LODOP.PRINTA(); // 选择打印机
// 直接打印 */
console.log('打印哦')
}).catch(err => {
console.error('lodop异常', err)
alert(this.$t('请检查LODOP打印控件是否安装并启动'));
})
},
findBank(val) {
const t = this.bankData.find(v => v.id == val)
console.log(t)
return t || {}
},
totalMoney() {
const t = this.list.map(v => v.total).reduce((prev, curr) => {
return parseFloat(prev) + parseFloat(curr);
}, 0)
return t
},
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
},
},
}
</script>
<style scoped id="printStyle">
.card{
margin-top: 20px;
}
.dialog-footer{
padding: 40px;
}
.card-title{
font-size: 18px;
font-weight: bold;
text-align: center;
}
.header{
display: flex;
align-items: center;
justify-content: space-between;
}
.lastRow{
border-top:1px solid #dfe6ec;
display: flex;
width: 100%;
height: 44px;
text-align: center;
align-items: center;
}
.lastRow div{
height: 44px;
line-height: 44px;
border-right:1px solid #dfe6ec;
}
</style>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<span>{{ $t('') }}</span>(cm) <span>{{ $t('') }}</span>(cm)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge1" :prop="!tableData[$index].id && $index + '.boxGauge1'"> <el-form-item :rules="tableFormRules.boxGauge1" :prop="$index + '.boxGauge1'">
<el-input 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> </el-form-item>
</template> </template>
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<span>{{ $t('') }}</span>(cm) <span>{{ $t('') }}</span>(cm)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge2" :prop="!tableData[$index].id && $index + '.boxGauge2'"> <el-form-item :rules="tableFormRules.boxGauge2" :prop="$index + '.boxGauge2'">
<el-input 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> </el-form-item>
</template> </template>
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<span>{{ $t('') }}</span>(cm) <span>{{ $t('') }}</span>(cm)
</template> </template>
<template v-slot="{r,c,$index}"> <template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge3" :prop="!tableData[$index].id && $index + '.boxGauge3'"> <el-form-item :rules="tableFormRules.boxGauge3" :prop="$index + '.boxGauge3'">
<el-input 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> </el-form-item>
</template> </template>
......
...@@ -734,7 +734,7 @@ export default { ...@@ -734,7 +734,7 @@ export default {
this.form.priceStepList.forEach(item => { this.form.priceStepList.forEach(item => {
let notEmptyFields = ['startNum', 'endNum', 'weightUnit'] let notEmptyFields = ['startNum', 'endNum', 'weightUnit']
notEmptyFields.forEach(field => { notEmptyFields.forEach(field => {
if(!item[field] || item[field].toString().trim() == ''){ if(item[field].toString().trim() == ''){
stepPriceEmpty = true stepPriceEmpty = true
} }
}) })
......
...@@ -255,6 +255,7 @@ ...@@ -255,6 +255,7 @@
<el-form-item :label="$t('港口优势条件')" prop="portConditions" label-width="250"> <el-form-item :label="$t('港口优势条件')" prop="portConditions" label-width="250">
<dict-selector v-model="formData.resourceVO.portConditions" type="port_conditions" /> <dict-selector v-model="formData.resourceVO.portConditions" type="port_conditions" />
</el-form-item> </el-form-item>
<el-button style="margin-left: 30px;" type="text" v-hasPermi="['ecw:dock:create']" @click="portVisible=true">{{$t('新增港口')}}</el-button>
</div> </div>
<div> <div>
<el-form-item :label="$t('订舱公司')" prop="bookCompany" label-width="250"> <el-form-item :label="$t('订舱公司')" prop="bookCompany" label-width="250">
...@@ -305,6 +306,7 @@ ...@@ -305,6 +306,7 @@
<el-option v-for="(item) in airPort" :key="item.id" :label="$l(item, 'title')" :value="item.id"></el-option> <el-option v-for="(item) in airPort" :key="item.id" :label="$l(item, 'title')" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-button style="margin-left: 30px;" type="text" v-hasPermi="['ecw:dock:create']" @click="portVisible=true">{{$t('新增港口')}}</el-button>
</div> </div>
<div> <div>
<el-form-item :label="$t('空运优势航空公司')" prop="airCompany" label-width="250"> <el-form-item :label="$t('空运优势航空公司')" prop="airCompany" label-width="250">
...@@ -519,10 +521,78 @@ ...@@ -519,10 +521,78 @@
>{{ $t('返回') }}</el-button> >{{ $t('返回') }}</el-button>
</div> </div>
</el-dialog> </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> </div>
</template> </template>
<script> <script>
import { createSupplier, updateSupplier, getSupplier, createFileNo, updateFileNo, getFileNoPage} from "@/api/ecw/supplier"; import { createSupplier, updateSupplier, getSupplier, createFileNo, updateFileNo, getFileNoPage} from "@/api/ecw/supplier";
import { createDock } from "@/api/ecw/dock";
import upload from '@/components/ImageUpload' import upload from '@/components/ImageUpload'
import { getListTree } from "@/api/ecw/region"; import { getListTree } from "@/api/ecw/region";
import AreaSelector from '@/components/AreaSelector' import AreaSelector from '@/components/AreaSelector'
...@@ -531,6 +601,7 @@ import Selector from '@/components/Selector' ...@@ -531,6 +601,7 @@ import Selector from '@/components/Selector'
import {validatePwd} from '@/api/ecw/busiPwd' import {validatePwd} from '@/api/ecw/busiPwd'
import SuppliersSelector from '@/components/SuppliersSelector' import SuppliersSelector from '@/components/SuppliersSelector'
import { getDockPage } from "@/api/ecw/dock"; import { getDockPage } from "@/api/ecw/dock";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
export default { export default {
components: {upload, AreaSelector, Selector, SuppliersSelector}, components: {upload, AreaSelector, Selector, SuppliersSelector},
props: [], props: [],
...@@ -598,7 +669,16 @@ export default { ...@@ -598,7 +669,16 @@ export default {
baNo: [{required: true,message: this.$t('请输入BA NO'),trigger: 'blur'}], baNo: [{required: true,message: this.$t('请输入BA NO'),trigger: 'blur'}],
}, },
showFileNoDialog: false, 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: { computed: {
...@@ -613,6 +693,26 @@ export default { ...@@ -613,6 +693,26 @@ export default {
let country = this.treeList.find(item => item.id == this.fileNoForm.country) let country = this.treeList.find(item => item.id == this.fileNoForm.country)
return country && country.children || [] 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: { watch: {
'formData.country'(country){ 'formData.country'(country){
...@@ -637,10 +737,7 @@ export default { ...@@ -637,10 +737,7 @@ export default {
getCurrencyList().then(res => { getCurrencyList().then(res => {
this.currencyList = res.data this.currencyList = res.data
}) })
// 码头 this.getDock()
getDockPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
this.allDocks = res.data.list;
});
this.getFile() this.getFile()
// 回显数据需要在加载了地区数据之后,否则无法正常回显 // 回显数据需要在加载了地区数据之后,否则无法正常回显
...@@ -702,6 +799,12 @@ export default { ...@@ -702,6 +799,12 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
getDock() {
// 码头
getDockPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
this.allDocks = res.data.list;
});
},
strToArray(val) { strToArray(val) {
if(!val || val == '') { if(!val || val == '') {
return [] return []
...@@ -875,7 +978,52 @@ export default { ...@@ -875,7 +978,52 @@ export default {
resourceVO: {}, resourceVO: {},
externalVO: {} 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