Commit f5d52a6c authored by 邓春圆's avatar 邓春圆

Merge branch 'dev-financial' into dev1.6

# Conflicts:
#	src/views/ecw/customer/query.vue
parents 14eb87b7 74138e8a
...@@ -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', //产品备案属性
......
<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,6 +555,9 @@ export default { ...@@ -461,6 +555,9 @@ export default {
MemberSelector MemberSelector
}, },
created() { created() {
getCurrencyList().then(response => {
this.currecyList = response.data;
})
this.isCustomerServiceConfirmed = this.$route.query.isCustomerServiceConfirmed ? true : false this.isCustomerServiceConfirmed = this.$route.query.isCustomerServiceConfirmed ? true : false
this.getCustomerSelect() this.getCustomerSelect()
this.reset() this.reset()
...@@ -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,32 @@ ...@@ -108,6 +109,32 @@
</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 style="margin-top: 15px" type="border-card">
<el-tab-pane :label="$t('订单')">
<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].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>
......
<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].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;
} }
} }
}, },
......
This diff is collapsed.
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