Commit 004606fd authored by 邓春圆's avatar 邓春圆

佣金付款单,付款单按钮

parent a51650ae
...@@ -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({
...@@ -375,6 +392,14 @@ export function paymentVerificationCancel(id) { ...@@ -375,6 +392,14 @@ export function paymentVerificationCancel(id) {
method: 'GET' method: 'GET'
}) })
} }
// 取消付款单反核销
export function paymentCancelFinancePaymentWriteOffNo(params){
return request({
url:'ecw/payment/cancelFinancePaymentWriteOffNo',
method:'get',
params
})
}
// 反审核付款单 // 反审核付款单
export function paymentVerifyCancel(id) { export function paymentVerifyCancel(id) {
...@@ -598,3 +623,21 @@ export function commissionPaymentCancelFinancePaymentWriteOffNo(data){ ...@@ -598,3 +623,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
})
}
...@@ -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">
...@@ -71,26 +71,30 @@ ...@@ -71,26 +71,30 @@
</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"
...@@ -100,17 +104,17 @@ ...@@ -100,17 +104,17 @@
</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-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" @click="deleteFn(row)" v-if="[0,2].includes(row.state)" > {{$t('删除')}}</el-button>
<el-button type="text" v-if="[3,4].includes(row.state)" >{{$t('审核详情')}}</el-button> <el-button type="text" v-if="[7,3].includes(row.state)" >{{$t('审核详情')}}</el-button>
<el-button type="text" v-if="[1,3,5].includes(row.state)" @click="bridgeFn('取消审核',7, row, '取消审核' )" >{{$t('取消审核')}}</el-button> <el-button type="text" v-if="[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-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-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-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-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-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-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-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 +136,14 @@ ...@@ -132,13 +136,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 +154,12 @@ import { ...@@ -149,9 +154,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));
...@@ -164,6 +172,7 @@ export default { ...@@ -164,6 +172,7 @@ export default {
state:null, state:null,
salesmanName:null, salesmanName:null,
searchKey:null, searchKey:null,
paymentNo:null,
page:1, page:1,
rows:10, rows:10,
}, },
...@@ -235,25 +244,33 @@ export default { ...@@ -235,25 +244,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;
} }
} }
......
...@@ -86,11 +86,11 @@ ...@@ -86,11 +86,11 @@
</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,17 +98,21 @@ ...@@ -98,17 +98,21 @@
></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>
<el-table-column :label="$t('应付生成时间')"></el-table-column> <el-table-column align="center" :label="$t('应付生成时间')"></el-table-column>
<el-table-column :label="$t('状态')"> <el-table-column align="center" :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 type="text" @click="$router.push({path:'/financial/commission-requestFunds',query:{payableId:row.id}})" >{{$t('请款')}}</el-button>
</template> </template>
...@@ -129,6 +133,7 @@ import {getWarehouseList} from "@/api/ecw/warehouse"; ...@@ -129,6 +133,7 @@ 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";
export default { export default {
// 应付款佣金 // 应付款佣金
...@@ -137,6 +142,7 @@ export default { ...@@ -137,6 +142,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 +172,8 @@ export default { ...@@ -166,7 +172,8 @@ export default {
state:'' state:''
}, },
list:[], list:[],
total:0 total:0,
currencyList:[],
} }
}, },
computed:{ computed:{
...@@ -184,7 +191,12 @@ export default { ...@@ -184,7 +191,12 @@ export default {
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('客户')">
...@@ -113,34 +114,19 @@ ...@@ -113,34 +114,19 @@
</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-input v-model="form.customerAccountType" ></el-input>
</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 +137,7 @@ ...@@ -151,6 +137,7 @@
prop="latestPayAt" prop="latestPayAt"
required required
:error="$t('最后付款日期不能为空')" :error="$t('最后付款日期不能为空')"
:datafld="interdict"
> >
<el-date-picker <el-date-picker
clearable clearable
...@@ -184,6 +171,7 @@ ...@@ -184,6 +171,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 +194,7 @@ ...@@ -206,7 +194,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 +206,12 @@ ...@@ -218,12 +206,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 +231,7 @@ ...@@ -243,6 +231,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('账单号')">
...@@ -283,18 +272,19 @@ ...@@ -283,18 +272,19 @@
</el-form> </el-form>
</el-card> </el-card>
<div slot="header" class="bpm-title">{{ $t('审核流程') }}</div> <div slot="header" class="bpm-title">{{ $t('审核流程') }}</div>
{{form.copyUserList}}
<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 +444,12 @@ import { ...@@ -454,7 +444,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 +494,7 @@ export default { ...@@ -499,6 +494,7 @@ export default {
warehouseList: [], warehouseList: [],
selectedUsers: [], selectedUsers: [],
dialogVisible: false, dialogVisible: false,
interdict:false,
}; };
}, },
async created() { async created() {
...@@ -515,9 +511,10 @@ export default { ...@@ -515,9 +511,10 @@ 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,
...@@ -528,7 +525,8 @@ export default { ...@@ -528,7 +525,8 @@ export default {
this.$set(this.form, 'customerBankAccount', res.data.customerBankAccount) this.$set(this.form, 'customerBankAccount', res.data.customerBankAccount)
}) })
getPaymentItem({id: this.id}).then(res => { getCommissionPayableList({ids: [this.id]}).then(res => {
console.log(res.data,'res.data')
this.list = [...res.data] this.list = [...res.data]
this.defaultList = [...res.data] this.defaultList = [...res.data]
}) })
...@@ -586,7 +584,7 @@ export default { ...@@ -586,7 +584,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 +640,12 @@ export default { ...@@ -642,12 +640,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();
}) })
} }
} }
......
<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>
...@@ -154,16 +154,17 @@ ...@@ -154,16 +154,17 @@
<el-button type="text" v-if="[5].includes(row.state)" @click="bridgeFn(3, '取消付款单核销',row)" >{{ $t('取消核销审核') }}</el-button> <el-button type="text" v-if="[5].includes(row.state)" @click="bridgeFn(3, '取消付款单核销',row)" >{{ $t('取消核销审核') }}</el-button>
<el-button v-if="[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:print']"
@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 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;
} }
} }
}, },
......
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