parent
79d87eb781
commit
b94dd215b6
@ -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.invoices.mapper.InvoicesItem0Mapper">
|
||||
|
||||
|
||||
|
||||
</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.invoices.mapper.InvoicesItem1Mapper">
|
||||
|
||||
|
||||
|
||||
</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.paymentdoc.mapper.PaymentdocItem0Mapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<el-dialog title="导出数据" :close-on-click-modal="false" :visible.sync="visible"
|
||||
class="JNPF-dialog JNPF-dialog_center" lock-scroll width="600px">
|
||||
<el-form label-position="top" label-width="80px">
|
||||
<el-form-item label="数据选择">
|
||||
<el-radio-group v-model="type">
|
||||
<el-radio :label="0">当前页面数据</el-radio>
|
||||
<el-radio :label="1">全部页面数据</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="导出字段">
|
||||
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll"
|
||||
@change="handleCheckAllChange">全选</el-checkbox>
|
||||
<el-checkbox-group v-model="columns" @change="handleCheckedChange">
|
||||
<el-checkbox v-for="item in columnList" :label="item.prop" :key="item.prop">
|
||||
{{item.label}}
|
||||
</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible=false">取 消</el-button>
|
||||
<el-button type="primary" @click="downLoad">导 出</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
btnLoading: false,
|
||||
type: 0,
|
||||
columns: [],
|
||||
checkAll: true,
|
||||
isIndeterminate: false,
|
||||
columnList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init(columnList) {
|
||||
this.visible = true
|
||||
this.checkAll = true
|
||||
this.isIndeterminate = false
|
||||
this.columnList = columnList
|
||||
this.columns = columnList.map(o => o.prop)
|
||||
},
|
||||
handleCheckAllChange(val) {
|
||||
this.columns = val ? this.columnList.map(o => o.prop) : [];
|
||||
this.isIndeterminate = false;
|
||||
},
|
||||
handleCheckedChange(value) {
|
||||
let checkedCount = value.length;
|
||||
this.checkAll = checkedCount === this.columnList.length;
|
||||
this.isIndeterminate = checkedCount > 0 && checkedCount < this.columnList.length;
|
||||
},
|
||||
downLoad() {
|
||||
this.$emit('download', { dataType: this.type, selectKey: this.columns.join(',') })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
>>> .el-dialog__body {
|
||||
padding: 20px !important;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,404 @@
|
||||
<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>
|
||||
<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'>
|
||||
<el-table-column prop="documentNo" label="单据编号" width="200" align="center" sortable="custom" />
|
||||
<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" prop="paymentType" algin="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" algin="center" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算类型" width="150" prop="settlementType" algin="center" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.settlementType | dynamicText(settlementTypeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="isPay" algin="center" sortable="custom">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.isPay | 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 type="text" :disabled="[1,2,4,5].indexOf(scope.row.flowState)>-1"
|
||||
@click="addOrUpdateHandle(scope.row.id)">编辑
|
||||
</el-button>
|
||||
<el-button type="text" class="JNPF-table-delBtn" :disabled="!!scope.row.flowState"
|
||||
@click="handleDel(scope.row.id)">删除
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" :disabled="!scope.row.flowState"
|
||||
@click="addOrUpdateHandle(scope.row.id,scope.row.flowState)">详情</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" />
|
||||
<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 ExportBox from './ExportBox'
|
||||
import {
|
||||
getDataInterfaceRes
|
||||
} from '@/api/systemData/dataInterface'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
FlowBox,
|
||||
ExportBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
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: {
|
||||
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(() => {});
|
||||
},
|
||||
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()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.listQuery = {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
}
|
||||
this.initData()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -0,0 +1,502 @@
|
||||
<template>
|
||||
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
|
||||
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1500px">
|
||||
<el-row :gutter="15" class="">
|
||||
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
|
||||
<template v-if="!loading">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据编号" prop="documentno">
|
||||
<el-input v-model="dataForm.documentno" placeholder="系统自动生成" readonly>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="供应商" required prop="suppliername">
|
||||
<el-input v-model="dataForm.suppliername" placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="付款类型" prop="paymenttype">
|
||||
<el-select v-model="dataForm.paymenttype" placeholder="请选择付款类型" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in paymenttypeOptions" :key="index" :label="item.fullName"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="付款账户" prop="paymentaccount">
|
||||
<el-input v-model="dataForm.paymentaccount" placeholder="请输入付款账户" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="付款银行" prop="paymentbank">
|
||||
<el-input v-model="dataForm.paymentbank" placeholder="请输入付款银行" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="付款金额" prop="paymentamount">
|
||||
<el-input v-model="dataForm.paymentamount" placeholder="请输入付款金额" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收款账户" prop="collectionaccount">
|
||||
<el-input v-model="dataForm.collectionaccount" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收款银行" prop="collectionbank">
|
||||
<el-input v-model="dataForm.collectionbank" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="申请金额" prop="requestedamount">
|
||||
<el-input v-model="dataForm.requestedamount" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="应付日期" prop="duedate">
|
||||
<el-date-picker v-model="dataForm.duedate" placeholder="请选择" clearable :style='{"width":"100%"}'
|
||||
type="date" format="yyyy-MM-dd" value-format="timestamp">
|
||||
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="币别 " prop="currency">
|
||||
<el-select v-model="dataForm.currency" placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"
|
||||
:disabled="item.disabled"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="结算类型" required prop="settlementtype">
|
||||
<el-select v-model="dataForm.settlementtype" placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in settlementtypeOptions" :key="index" :label="item.fullName"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="来源单号" prop="paymentno">
|
||||
<el-input v-model="dataForm.paymentno" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据状态" prop="status">
|
||||
<el-select v-model="dataForm.status" placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
|
||||
:disabled="item.disabled"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activeivpzpd" tab-position="top" class="mb-20">
|
||||
<el-tab-pane label="申请明细">
|
||||
<el-col :span="24">
|
||||
<el-form-item label-width="0">
|
||||
<div class="JNPF-common-title">
|
||||
<h2></h2>
|
||||
</div>
|
||||
<el-table :data="dataForm.payment_item0List" size='mini' show-summary
|
||||
:summary-method="getSummaries">
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="amount" width="150" label="付款金额" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="requestAmount" width="150" label="申请金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.requestAmount" placeholder="请输入" clearable
|
||||
:style='{"width":"100%"}' readonly>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="allAmount" width="150" label="订单金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.allAmount" placeholder="请输入" clearable
|
||||
:style='{"width":"100%"}' readonly>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="payPrice" width="150" label="已付金额" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="documentNo" width="150" label="订单编号" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.documentNo" placeholder="请输入" clearable
|
||||
:style='{"width":"100%"}' readonly>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="contractNo" width="150" label="合同编码" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.contractNo" placeholder="请输入" clearable
|
||||
:style='{"width":"100%"}' readonly>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num" width="150" label="结算重量" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.num" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="advanceAmount" width="150" label="垫资金额" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.advanceAmount" placeholder="请输入" clearable
|
||||
:style='{"width":"100%"}' readonly>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rate" width="150" label="税额" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.rate" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="notAmount" width="150" label="不含税金额" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable :style='{"width":"100%"}' readonly>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorTime" label="业务日期" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.creatorTime" placeholder="请选择" clearable
|
||||
:style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" readonly>
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="50" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" class="JNPF-table-delBtn"
|
||||
@click="delpayment_item0List(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addpayment_item0List()">
|
||||
<el-button type="text" icon="el-icon-plus">添加</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false"> 取 消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> 确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import {
|
||||
getDataInterfaceRes
|
||||
} from '@/api/systemData/dataInterface'
|
||||
import {
|
||||
getDictionaryDataSelector
|
||||
} from '@/api/systemData/dictionary'
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
excludeFields: [],
|
||||
visible: false,
|
||||
loading: false,
|
||||
isDetail: false,
|
||||
dataForm: {
|
||||
documentno: '',
|
||||
suppliername: '',
|
||||
paymenttype: "0",
|
||||
paymentaccount: '',
|
||||
paymentbank: '',
|
||||
paymentamount: '',
|
||||
collectionaccount: '',
|
||||
collectionbank: '',
|
||||
requestedamount: '',
|
||||
duedate: '',
|
||||
currency: "0",
|
||||
settlementtype: "0",
|
||||
paymentno: '',
|
||||
remark: '',
|
||||
status: "0",
|
||||
payment_item0List: [],
|
||||
},
|
||||
activeivpzpd: '0',
|
||||
rules: {
|
||||
suppliername: [],
|
||||
paymentaccount: [],
|
||||
paymentamount: [{
|
||||
required: true,
|
||||
message: '请输入付款金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
pattern: /^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$/,
|
||||
message: '请输入正确的金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
],
|
||||
},
|
||||
paymenttypeOptions: [{
|
||||
"fullName": "贷款",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "运费",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "仓储",
|
||||
"id": "2"
|
||||
}],
|
||||
currencyOptions: [{
|
||||
"fullName": "人民币",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "美元",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "英镑",
|
||||
"id": "2"
|
||||
}],
|
||||
settlementtypeOptions: [{
|
||||
"fullName": "现金",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "赊购",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "网银",
|
||||
"id": "2"
|
||||
}, {
|
||||
"fullName": "银企直连",
|
||||
"id": "3"
|
||||
}, {
|
||||
"fullName": "银票",
|
||||
"id": "4"
|
||||
}, {
|
||||
"fullName": "商票",
|
||||
"id": "5"
|
||||
}],
|
||||
statusOptions: [{
|
||||
"fullName": "已保存",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "审批中",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "已审批",
|
||||
"id": "2"
|
||||
}, {
|
||||
"fullName": "已付款",
|
||||
"id": "3"
|
||||
}],
|
||||
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
dataForm: {
|
||||
deep: true,
|
||||
handler: function() {
|
||||
|
||||
this.popupSelect()
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
getSummaries(param) {
|
||||
const {
|
||||
columns,
|
||||
data
|
||||
} = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '合计';
|
||||
return;
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (!values.every(value => isNaN(value)) && (index === 1 || index === 2 || index === 5 || index === 6 ||
|
||||
index === 7 || index === 8)) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
} else {
|
||||
sums[index] = '';
|
||||
}
|
||||
});
|
||||
|
||||
return sums;
|
||||
},
|
||||
|
||||
popupSelect() {
|
||||
let amount = 0
|
||||
for (let i = 0; i < this.dataForm.payment_item0List.length; i++) {
|
||||
amount = amount + parseFloat(this.dataForm.payment_item0List[i].amount);
|
||||
}
|
||||
parseFloat(this.dataForm.paymentamount = amount)
|
||||
},
|
||||
|
||||
payment_item0Exist() {
|
||||
let isOk = true;
|
||||
for (let i = 0; i < this.dataForm.payment_item0List.length; i++) {
|
||||
const e = this.dataForm.payment_item0List[i];
|
||||
}
|
||||
return isOk;
|
||||
},
|
||||
clearData(data) {
|
||||
for (let key in data) {
|
||||
if (data[key] instanceof Array) {
|
||||
data[key] = [];
|
||||
} else if (data[key] instanceof Object) {
|
||||
this.clearData(data[key]);
|
||||
} else {
|
||||
data[key] = "";
|
||||
}
|
||||
}
|
||||
},
|
||||
init(paymentdoc) {
|
||||
this.dataForm.id = '';
|
||||
this.visible = true;
|
||||
this.dataForm.paymenttype = paymentdoc.paymentType
|
||||
this.dataForm.requestedamount = paymentdoc.ramount
|
||||
this.dataForm.paymentamount = paymentdoc.ramount
|
||||
this.dataForm.collectionaccount = paymentdoc.collectionAccount
|
||||
this.dataForm.collectionbank = paymentdoc.colectionBank
|
||||
this.dataForm.duedate = paymentdoc.dueDate
|
||||
this.dataForm.currency = paymentdoc.currency
|
||||
this.dataForm.settlementtype = paymentdoc.settlementType
|
||||
this.dataForm.paymentno = paymentdoc.documentNo
|
||||
paymentdoc.paymentdocitem0List.forEach((item, index) => {
|
||||
item.requestAmount = item.amount;
|
||||
item.paymentdocitemId = item.id;
|
||||
item.id = '';
|
||||
});
|
||||
this.dataForm.payment_item0List = paymentdoc.paymentdocitem0List
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.payment_item0Exist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data = this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/payment/Payment',
|
||||
method: 'post',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
})
|
||||
} else {
|
||||
request({
|
||||
url: '/api/payment/Payment/' + this.dataForm.id,
|
||||
method: 'PUT',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
addpayment_item0List() {
|
||||
let item = {
|
||||
amount: undefined,
|
||||
creatorUserId: undefined,
|
||||
creatorUserName: undefined,
|
||||
lastModifyUserId: undefined,
|
||||
lastModifyUserName: undefined,
|
||||
lastModifyTime: undefined,
|
||||
deleteUserId: undefined,
|
||||
deleteTime: undefined,
|
||||
orgnizeId: undefined,
|
||||
departmentId: undefined,
|
||||
creatorTime: undefined,
|
||||
}
|
||||
this.dataForm.payment_item0List.push(item)
|
||||
},
|
||||
delpayment_item0List(index) {
|
||||
this.dataForm.payment_item0List.splice(index, 1);
|
||||
},
|
||||
dataList() {
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
for (let i = 0; i < _data.payment_item0List.length; i++) {
|
||||
var _list = _data.payment_item0List[i];
|
||||
}
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
for (let i = 0; i < _dataAll.payment_item0List.length; i++) {
|
||||
var _list = _dataAll.payment_item0List[i];
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue