commit
4fde231057
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.mapper.PaymentdocItem0Mapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.mapper.PaymentdocItem1Mapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.mapper.PaymentdocItem2Mapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="jnpf.mapper.PaymentdocMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
File diff suppressed because it is too large
Load Diff
@ -1,458 +1,513 @@
|
||||
<template>
|
||||
<div class="JNPF-common-layout">
|
||||
<div class="JNPF-common-layout-center">
|
||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||
<el-form @submit.native.prevent>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单据编号">
|
||||
<el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="query.supplierName" placeholder="请输入" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div class="JNPF-common-layout-main JNPF-flex-main">
|
||||
<div class="JNPF-common-head">
|
||||
<div>
|
||||
<!-- <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增
|
||||
</el-button> -->
|
||||
</div>
|
||||
<div class="JNPF-common-head-right">
|
||||
<el-tooltip effect="dark" content="刷新" placement="top">
|
||||
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="reset()" />
|
||||
</el-tooltip>
|
||||
<screenfull isContainer />
|
||||
</div>
|
||||
</div>
|
||||
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false" border>
|
||||
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
|
||||
<el-table-column prop="documentNo" label="单据编号" fixed="left" width="200" align="center" sortable="custom" />
|
||||
<!-- <el-table-column prop="purchaseId" label="采购订单" width="200" align="center" sortable="custom" />
|
||||
<div class="JNPF-common-layout">
|
||||
<div class="JNPF-common-layout-center">
|
||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||
<el-form @submit.native.prevent>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单据编号">
|
||||
<el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="供应商">
|
||||
<el-input v-model="query.supplierName" placeholder="请输入" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div class="JNPF-common-layout-main JNPF-flex-main">
|
||||
<div class="JNPF-common-head">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="stopPayment()">终止
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="JNPF-common-head-right">
|
||||
<el-tooltip effect="dark" content="刷新" placement="top">
|
||||
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
|
||||
@click="reset()" />
|
||||
</el-tooltip>
|
||||
<screenfull isContainer />
|
||||
</div>
|
||||
</div>
|
||||
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange'
|
||||
@selection-change="handleSelectionChange" has-c :hasNO="false" border>
|
||||
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
|
||||
<el-table-column prop="documentNo" label="单据编号" fixed="left" width="200" align="center"
|
||||
sortable="custom" />
|
||||
<el-table-column label="是否提交" width="100" prop="isSubmit" align="center" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isSubmit | dynamicText(isPayOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否终止" width="100" prop="isStop" align="center" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isStop | dynamicText(isPayOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="purchaseId" label="采购订单" width="200" align="center" sortable="custom" />
|
||||
<el-table-column prop="contractId" label="合同" width="150" align="center" sortable="custom" />
|
||||
<el-table-column prop="supplierId" label="供应商" width="200" align="center" sortable="custom" /> -->
|
||||
<el-table-column label="付款类型" width="150" fixed="left" prop="paymentType" align="center" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.paymentType | dynamicText(paymentTypeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="businessDate" label="业务日期" width="150" align="center" sortable="custom" />
|
||||
<el-table-column label="币别" width="150" prop="currency" align="center" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算类型" width="150" prop="settlementType" align="center" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.settlementType | dynamicText(settlementTypeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="supplierName" label="供应商" width="200" align="center" sortable="custom" />
|
||||
<el-table-column prop="ramount" label="申请金额" width="150" align="center" sortable="custom" />
|
||||
<el-table-column prop="paymentAmount" label="付款金额" width="150" align="center" sortable="custom" />
|
||||
<el-table-column prop="unpaymentAmount" label="未付款金额" width="150" align="center" sortable="custom" />
|
||||
<el-table-column prop="collectionAccount" label="收款账户" width="150" align="center" sortable="custom" />
|
||||
<el-table-column prop="colectionBank" label="收款银行" width="150" align="center" sortable="custom" />
|
||||
<el-table-column prop="dueDate" label="应付日期" width="150" align="center" sortable="custom" />
|
||||
<el-table-column label="是否付款" width="150" prop="docStatus" align="center" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.docStatus | dynamicText(isPayOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" width="150" align="center" sortable="custom" />
|
||||
<el-table-column prop="flowState" label="状态" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.flowState==1">等待审核</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.flowState==2">审核通过</el-tag>
|
||||
<el-tag type="danger" v-else-if="scope.row.flowState==3">审核驳回</el-tag>
|
||||
<el-tag type="info" v-else-if="scope.row.flowState==4">流程撤回</el-tag>
|
||||
<el-tag type="info" v-else-if="scope.row.flowState==5">审核终止</el-tag>
|
||||
<el-tag type="warning" v-else>等待提交</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-has="'btn_edit'" type="text" :disabled="[1,2,4,5].indexOf(scope.row.flowState)>-1"
|
||||
@click="addOrUpdateHandle(scope.row.id)">编辑
|
||||
</el-button>
|
||||
<el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn" :disabled="!!scope.row.flowState"
|
||||
@click="handleDel(scope.row.id)">删除
|
||||
</el-button>
|
||||
<el-button size="mini" v-has="'btn_detail'" type="text" :disabled="!scope.row.flowState"
|
||||
@click="addOrUpdateHandle(scope.row.id,scope.row.flowState)">详情</el-button>
|
||||
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
|
||||
@click="fukuanHandle(scope.row.id,scope.row.flowState, scope.row.docStatus)">付款</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
|
||||
@pagination="initData" />
|
||||
</div>
|
||||
</div>
|
||||
<FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
|
||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
|
||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
|
||||
</div>
|
||||
<el-table-column label="付款类型" width="150" fixed="left" prop="paymentType" align="center"
|
||||
sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.paymentType | dynamicText(paymentTypeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="businessDate" label="业务日期" width="150" align="center" sortable="custom" />
|
||||
<el-table-column label="币别" width="150" prop="currency" align="center" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算类型" width="150" prop="settlementType" align="center" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.settlementType | dynamicText(settlementTypeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="supplierName" label="供应商" width="200" align="center" sortable="custom" />
|
||||
<el-table-column prop="ramount" label="申请金额" width="150" align="center" sortable="custom" />
|
||||
<el-table-column prop="paymentAmount" label="已付款金额" width="150" align="center" sortable="custom" />
|
||||
<el-table-column prop="unpaymentAmount" label="未付款金额" width="150" align="center"
|
||||
sortable="custom" />
|
||||
<el-table-column prop="collectionAccount" label="收款账户" width="150" align="center"
|
||||
sortable="custom" />
|
||||
<el-table-column prop="colectionBank" label="收款银行" width="150" align="center" sortable="custom" />
|
||||
<el-table-column prop="dueDate" label="应付日期" width="150" align="center" sortable="custom" />
|
||||
<el-table-column prop="remark" label="备注" width="150" align="center" sortable="custom" />
|
||||
<el-table-column prop="flowState" label="状态" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.flowState==1">等待审核</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.flowState==2">审核通过</el-tag>
|
||||
<el-tag type="danger" v-else-if="scope.row.flowState==3">审核驳回</el-tag>
|
||||
<el-tag type="info" v-else-if="scope.row.flowState==4">流程撤回</el-tag>
|
||||
<el-tag type="info" v-else-if="scope.row.flowState==5">审核终止</el-tag>
|
||||
<el-tag type="warning" v-else>等待提交</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-has="'btn_edit'" type="text"
|
||||
:disabled="[1,2,4,5].indexOf(scope.row.flowState)>-1"
|
||||
@click="addOrUpdateHandle(scope.row.id)">编辑
|
||||
</el-button>
|
||||
<el-button type="text" v-has="'btn_remove'" class="JNPF-table-delBtn"
|
||||
:disabled="!!scope.row.flowState" @click="handleDel(scope.row)">删除
|
||||
</el-button>
|
||||
<el-button size="mini" v-has="'btn_detail'" type="text" :disabled="!scope.row.flowState"
|
||||
@click="addOrUpdateHandle(scope.row.id,scope.row.flowState)">详情</el-button>
|
||||
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
|
||||
@click="fukuanHandle(scope.row.id,scope.row.flowState, scope.row.isSubmit, scope.row.isStop)">付款
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
|
||||
@pagination="initData" />
|
||||
</div>
|
||||
</div>
|
||||
<FlowBox v-if="flowVisible" ref="FlowBox" @close="colseFlow" />
|
||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
|
||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import {
|
||||
getDictionaryDataSelector
|
||||
} from '@/api/systemData/dictionary'
|
||||
import FlowBox from '@/views/workFlow/components/FlowBox'
|
||||
import JNPFForm from './paymentForm'
|
||||
import ExportBox from './ExportBox'
|
||||
import {
|
||||
getDataInterfaceRes
|
||||
} from '@/api/systemData/dataInterface'
|
||||
import request from '@/utils/request'
|
||||
import {
|
||||
getDictionaryDataSelector
|
||||
} from '@/api/systemData/dictionary'
|
||||
import FlowBox from '@/views/workFlow/components/FlowBox'
|
||||
import JNPFForm from './paymentForm'
|
||||
import ExportBox from './ExportBox'
|
||||
import {
|
||||
getDataInterfaceRes
|
||||
} from '@/api/systemData/dataInterface'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
FlowBox,
|
||||
JNPFForm,
|
||||
ExportBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
formVisible: false,
|
||||
query: {
|
||||
documentNo: undefined,
|
||||
},
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
list: [],
|
||||
listLoading: true,
|
||||
total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
},
|
||||
flowVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [{
|
||||
prop: 'documentNo',
|
||||
label: '单据编号'
|
||||
},
|
||||
{
|
||||
prop: 'purchaseId',
|
||||
label: '采购订单'
|
||||
},
|
||||
{
|
||||
prop: 'contractId',
|
||||
label: '合同'
|
||||
},
|
||||
{
|
||||
prop: 'supplierId',
|
||||
label: '供应商'
|
||||
},
|
||||
{
|
||||
prop: 'paymentType',
|
||||
label: '付款类型'
|
||||
},
|
||||
{
|
||||
prop: 'businessDate',
|
||||
label: '业务日期'
|
||||
},
|
||||
{
|
||||
prop: 'currency',
|
||||
label: '币别'
|
||||
},
|
||||
{
|
||||
prop: 'settlementType',
|
||||
label: '结算类型'
|
||||
},
|
||||
{
|
||||
prop: 'ramount',
|
||||
label: '申请金额'
|
||||
},
|
||||
{
|
||||
prop: 'paymentAmount',
|
||||
label: '付款金额'
|
||||
},
|
||||
{
|
||||
prop: 'unpaymentAmount',
|
||||
label: '未付款金额'
|
||||
},
|
||||
{
|
||||
prop: 'collectionAccount',
|
||||
label: '收款账户'
|
||||
},
|
||||
{
|
||||
prop: 'colectionBank',
|
||||
label: '收款银行'
|
||||
},
|
||||
{
|
||||
prop: 'dueDate',
|
||||
label: '应付日期'
|
||||
},
|
||||
{
|
||||
prop: 'isPay',
|
||||
label: '是否付款'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注'
|
||||
},
|
||||
],
|
||||
paymentTypeOptions: [{
|
||||
"fullName": "货款",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "运费",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "仓储",
|
||||
"id": "2"
|
||||
}],
|
||||
paymentTypeProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
currencyOptions: [{
|
||||
"fullName": "人民币",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "美元",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "英镑",
|
||||
"id": "2"
|
||||
}],
|
||||
currencyProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
settlementTypeOptions: [{
|
||||
"fullName": "现金",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "赊购",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "网银",
|
||||
"id": "2"
|
||||
}, {
|
||||
"fullName": "银企直连",
|
||||
"id": "3"
|
||||
}, {
|
||||
"fullName": "银票",
|
||||
"id": "4"
|
||||
}, {
|
||||
"fullName": "商票",
|
||||
"id": "5"
|
||||
}],
|
||||
settlementTypeProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
isPayOptions: [{
|
||||
"fullName": "否",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "否",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "否",
|
||||
"id": "2"
|
||||
}, {
|
||||
"fullName": "是",
|
||||
"id": "3"
|
||||
}],
|
||||
isPayProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
statusOptions: [{
|
||||
"fullName": "已保存",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "审批中",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "已审批",
|
||||
"id": "2"
|
||||
}, {
|
||||
"fullName": "已付款",
|
||||
"id": "3"
|
||||
}],
|
||||
statusProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
menuId() {
|
||||
return this.$route.meta.modelId || ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
sortChange({
|
||||
column,
|
||||
prop,
|
||||
order
|
||||
}) {
|
||||
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
|
||||
this.listQuery.sidx = !order ? '' : prop
|
||||
this.initData()
|
||||
},
|
||||
initData() {
|
||||
this.listLoading = true;
|
||||
let _query = {
|
||||
...this.listQuery,
|
||||
...this.query,
|
||||
menuId: this.menuId
|
||||
};
|
||||
request({
|
||||
url: `/api/paymentdoc/Paymentdoc/getList`,
|
||||
method: 'post',
|
||||
data: _query
|
||||
}).then(res => {
|
||||
var _list = [];
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
let _data = res.data.list[i];
|
||||
_list.push(_data)
|
||||
}
|
||||
this.list = _list
|
||||
this.total = res.data.pagination.total
|
||||
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDel(id) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/paymentdoc/Paymentdoc/${id}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
fukuanHandle(id, flowState, docStatus){
|
||||
if(flowState == 2){
|
||||
if(docStatus != 3){
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
export default {
|
||||
components: {
|
||||
FlowBox,
|
||||
JNPFForm,
|
||||
ExportBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
multipleSelection: [],
|
||||
multipleSelectionItem: [],
|
||||
formVisible: false,
|
||||
query: {
|
||||
documentNo: undefined,
|
||||
},
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
list: [],
|
||||
listLoading: true,
|
||||
total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
},
|
||||
flowVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [{
|
||||
prop: 'documentNo',
|
||||
label: '单据编号'
|
||||
},
|
||||
{
|
||||
prop: 'purchaseId',
|
||||
label: '采购订单'
|
||||
},
|
||||
{
|
||||
prop: 'contractId',
|
||||
label: '合同'
|
||||
},
|
||||
{
|
||||
prop: 'supplierId',
|
||||
label: '供应商'
|
||||
},
|
||||
{
|
||||
prop: 'paymentType',
|
||||
label: '付款类型'
|
||||
},
|
||||
{
|
||||
prop: 'businessDate',
|
||||
label: '业务日期'
|
||||
},
|
||||
{
|
||||
prop: 'currency',
|
||||
label: '币别'
|
||||
},
|
||||
{
|
||||
prop: 'settlementType',
|
||||
label: '结算类型'
|
||||
},
|
||||
{
|
||||
prop: 'ramount',
|
||||
label: '申请金额'
|
||||
},
|
||||
{
|
||||
prop: 'paymentAmount',
|
||||
label: '付款金额'
|
||||
},
|
||||
{
|
||||
prop: 'unpaymentAmount',
|
||||
label: '未付款金额'
|
||||
},
|
||||
{
|
||||
prop: 'collectionAccount',
|
||||
label: '收款账户'
|
||||
},
|
||||
{
|
||||
prop: 'colectionBank',
|
||||
label: '收款银行'
|
||||
},
|
||||
{
|
||||
prop: 'dueDate',
|
||||
label: '应付日期'
|
||||
},
|
||||
{
|
||||
prop: 'isPay',
|
||||
label: '是否付款'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注'
|
||||
},
|
||||
],
|
||||
paymentTypeOptions: [{
|
||||
"fullName": "货款",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "运费",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "仓储",
|
||||
"id": "2"
|
||||
}],
|
||||
paymentTypeProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
currencyOptions: [{
|
||||
"fullName": "人民币",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "美元",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "英镑",
|
||||
"id": "2"
|
||||
}],
|
||||
currencyProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
settlementTypeOptions: [{
|
||||
"fullName": "现金",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "赊购",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "网银",
|
||||
"id": "2"
|
||||
}, {
|
||||
"fullName": "银企直连",
|
||||
"id": "3"
|
||||
}, {
|
||||
"fullName": "银票",
|
||||
"id": "4"
|
||||
}, {
|
||||
"fullName": "商票",
|
||||
"id": "5"
|
||||
}],
|
||||
settlementTypeProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
isPayOptions: [{
|
||||
"fullName": "否",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "是",
|
||||
"id": "1"
|
||||
}],
|
||||
isPayProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
statusOptions: [{
|
||||
"fullName": "已保存",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "审批中",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "已审批",
|
||||
"id": "2"
|
||||
}, {
|
||||
"fullName": "已付款",
|
||||
"id": "3"
|
||||
}],
|
||||
statusProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
menuId() {
|
||||
return this.$route.meta.modelId || ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
stopPayment() {
|
||||
var statusFlag = true;
|
||||
this.multipleSelectionItem.forEach((item, index) => {
|
||||
if (item.isSubmit == '1' || item.isStop == '1') {
|
||||
statusFlag = false;
|
||||
}
|
||||
});
|
||||
if (!statusFlag) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '存在待提交的付款申请单无法终止',
|
||||
duration: 1000
|
||||
});
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
this.$confirm('您确定要终止这些数据吗, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: '/api/paymentdoc/Paymentdoc/' + id,
|
||||
method: 'get'
|
||||
url: `/api/paymentdoc/Paymentdoc/batchtopPayment/${ids}`,
|
||||
method: 'post'
|
||||
}).then(res => {
|
||||
this.$refs.JNPFForm.init(res.data)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelectionItem = val
|
||||
const res = val.map(item => item.id)
|
||||
this.multipleSelection = res
|
||||
},
|
||||
sortChange({
|
||||
column,
|
||||
prop,
|
||||
order
|
||||
}) {
|
||||
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
|
||||
this.listQuery.sidx = !order ? '' : prop
|
||||
this.initData()
|
||||
},
|
||||
initData() {
|
||||
this.listLoading = true;
|
||||
let _query = {
|
||||
...this.listQuery,
|
||||
...this.query,
|
||||
menuId: this.menuId
|
||||
};
|
||||
request({
|
||||
url: `/api/paymentdoc/Paymentdoc/getList`,
|
||||
method: 'post',
|
||||
data: _query
|
||||
}).then(res => {
|
||||
var _list = [];
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
let _data = res.data.list[i];
|
||||
_list.push(_data)
|
||||
}
|
||||
this.list = _list
|
||||
this.total = res.data.pagination.total
|
||||
|
||||
this.listLoading = false
|
||||
})
|
||||
}else{
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '该订单已提交付款',
|
||||
duration: 1000
|
||||
});
|
||||
return
|
||||
}
|
||||
},
|
||||
handleDel(row) {
|
||||
if(row.isStop == '1' || row.isSubmit == '1' || row.paymentAmount > 0){
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '已终止或者提交付款的单据无法删除',
|
||||
duration: 1000
|
||||
});
|
||||
return
|
||||
}
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/paymentdoc/Paymentdoc/${row.id}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
fukuanHandle(id, flowState, isSubmit, isStop) {
|
||||
if (flowState == 2) {
|
||||
if (isSubmit == 0 && isStop == 0) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
request({
|
||||
url: '/api/paymentdoc/Paymentdoc/paymentcocToPaymen/' + id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.$refs.JNPFForm.init(res.data)
|
||||
})
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '该订单已提交付款并生成付款单',
|
||||
duration: 1000
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
}else{
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请耐心等待审批结束',
|
||||
duration: 1000
|
||||
});
|
||||
return
|
||||
}
|
||||
} else {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请耐心等待审批结束',
|
||||
duration: 1000
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
},
|
||||
addOrUpdateHandle(id, flowState) {
|
||||
let data = {
|
||||
id: id || '',
|
||||
enCode: 'paymentdoc',
|
||||
flowId: '398482034802139205',
|
||||
formType: 1,
|
||||
opType: flowState ? 0 : '-1',
|
||||
status: flowState
|
||||
}
|
||||
this.flowVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.FlowBox.init(data)
|
||||
})
|
||||
},
|
||||
exportData() {
|
||||
this.exportBoxVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ExportBox.init(this.columnList)
|
||||
})
|
||||
},
|
||||
download(data) {
|
||||
let query = {
|
||||
...data,
|
||||
...this.listQuery,
|
||||
...this.query,
|
||||
menuId: this.menuId
|
||||
}
|
||||
request({
|
||||
url: `/api/paymentdoc/Paymentdoc/Actions/Export`,
|
||||
method: 'GET',
|
||||
data: query
|
||||
}).then(res => {
|
||||
if (!res.data.url) return
|
||||
this.jnpf.downloadFile(res.data.url)
|
||||
this.$refs.ExportBox.visible = false
|
||||
this.exportBoxVisible = false
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.listQuery = {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
}
|
||||
this.initData()
|
||||
},
|
||||
colseFlow(isrRefresh) {
|
||||
this.flowVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.listQuery = {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
}
|
||||
this.initData()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
addOrUpdateHandle(id, flowState) {
|
||||
let data = {
|
||||
id: id || '',
|
||||
enCode: 'paymentdoc',
|
||||
flowId: '398482034802139205',
|
||||
formType: 1,
|
||||
opType: flowState ? 0 : '-1',
|
||||
status: flowState
|
||||
}
|
||||
this.flowVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.FlowBox.init(data)
|
||||
})
|
||||
},
|
||||
exportData() {
|
||||
this.exportBoxVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ExportBox.init(this.columnList)
|
||||
})
|
||||
},
|
||||
download(data) {
|
||||
let query = {
|
||||
...data,
|
||||
...this.listQuery,
|
||||
...this.query,
|
||||
menuId: this.menuId
|
||||
}
|
||||
request({
|
||||
url: `/api/paymentdoc/Paymentdoc/Actions/Export`,
|
||||
method: 'GET',
|
||||
data: query
|
||||
}).then(res => {
|
||||
if (!res.data.url) return
|
||||
this.jnpf.downloadFile(res.data.url)
|
||||
this.$refs.ExportBox.visible = false
|
||||
this.exportBoxVisible = false
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.listQuery = {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
}
|
||||
this.initData()
|
||||
},
|
||||
colseFlow(isrRefresh) {
|
||||
this.flowVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.listQuery = {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
}
|
||||
this.initData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in new issue