commit
f6ff1f3a9a
@ -1,426 +1,511 @@
|
||||
<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="1000px">
|
||||
<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-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="客户名称"
|
||||
prop="customerName" >
|
||||
<popupSelect v-model="dataForm.customerName"
|
||||
placeholder="请选择" clearable field="customerName" interfaceId="393371066040385285" :columnOptions="customerNamecolumnOptions" propsValue="supplier_nm" relationField="supplier_nm" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px" @change="popupSelect"
|
||||
>
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="收款金额"
|
||||
prop="amountCollected" >
|
||||
<el-input v-model="dataForm.amountCollected"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<popupSelect v-model="dataForm.customerName" placeholder="请选择" clearable field="customerName"
|
||||
interfaceId="393371066040385285" :columnOptions="customerNamecolumnOptions" propsValue="supplier_nm"
|
||||
relationField="supplier_nm" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
|
||||
@change="popupSelect">
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收款金额" prop="amountCollected">
|
||||
<el-input v-model="dataForm.amountCollected" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="收款账户"
|
||||
prop="collectionCount" >
|
||||
<el-input v-model="dataForm.collectionCount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收款账户" prop="collectionCount">
|
||||
<el-input v-model="dataForm.collectionCount" 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="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="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-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="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="币别 " 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="结算类型"
|
||||
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="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="remark" >
|
||||
<el-input v-model="dataForm.remark"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<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="voucher" >
|
||||
<JNPF-UploadFz v-model="dataForm.voucher"
|
||||
:fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传" >
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="收款凭证" prop="voucher">
|
||||
<JNPF-UploadFz v-model="dataForm.voucher" :fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传">
|
||||
|
||||
</JNPF-UploadFz>
|
||||
</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>
|
||||
</JNPF-UploadFz>
|
||||
</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="8" >
|
||||
<el-form-item label="制单人"
|
||||
prop="creatorUserName" >
|
||||
<el-input v-model="dataForm.creatorUserName"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="制单人" prop="creatorUserName">
|
||||
<el-input v-model="dataForm.creatorUserName" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activeojnisi" 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.collection_item0List" size='mini' >
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="amount" label="收款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amount"
|
||||
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorUserId" label="订单金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.price"
|
||||
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorUserName" label="已收款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amountCollected"
|
||||
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deleteTime" label="销售订单编号">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.documentNo"
|
||||
placeholder="请选择" clearable :field="'deleteTime'+scope.$index" interfaceId="393372436705378053" :columnOptions="jg_collection_item0deleteTimecolumnOptions" propsValue="document_no" relationField="document_no" popupType="dialog"
|
||||
popupWidth="800px" :bissId="dataForm.customerCode" @change="popupSelect2"
|
||||
>
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lastModifyUserId" label="合同编号">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.contractCode"
|
||||
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lastModifyUserName" label="重量">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.num"
|
||||
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="taxRate" label="税率">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-select v-model="scope.row.taxRate"-->
|
||||
<!-- placeholder="请选择" clearable :style='{"width":"100%"}'>-->
|
||||
<!-- <el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="lastModifyTime" label="垫资金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.advanceAmount"
|
||||
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deleteUserId" label="税额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.rate"
|
||||
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deleteUserName" label="不含税金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.notPrice"
|
||||
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorTime" label="业务日期">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.creatorTime"
|
||||
placeholder="请选择" clearable :style='{"width":"200%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="50" >
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delcollection_item0List(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addcollection_item0List()">
|
||||
<el-button type="text" icon="el-icon-plus">添加</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane >
|
||||
</el-tabs>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activeojnisi" 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.collection_item0List" size='mini' show-summary>
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="amount" 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="creatorUserId" label="订单金额" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.price" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorUserName" label="已收款金额" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amountCollected" placeholder="请输入" clearable
|
||||
:style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deleteTime" label="销售订单编号" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.documentNo" placeholder="请选择" clearable
|
||||
:field="'deleteTime'+scope.$index" interfaceId="393372436705378053"
|
||||
:columnOptions="jg_collection_item0deleteTimecolumnOptions" propsValue="document_no"
|
||||
relationField="document_no" popupType="dialog" popupWidth="800px"
|
||||
:bissId="dataForm.customerCode" @change="popupSelect2">
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lastModifyUserId" label="合同编号" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.contractCode" placeholder="请输入" clearable
|
||||
:style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lastModifyUserName" label="数量" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.num" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="taxRate" label="税率">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-select v-model="scope.row.taxRate"-->
|
||||
<!-- placeholder="请选择" clearable :style='{"width":"100%"}'>-->
|
||||
<!-- <el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="lastModifyTime" label="垫资金额" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.advanceAmount" placeholder="请输入" clearable
|
||||
:style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deleteUserId" label="税额" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.rate" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deleteUserName" label="不含税金额" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.notPrice" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorTime" label="业务日期" align="center" >
|
||||
<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">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="50">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" class="JNPF-table-delBtn"
|
||||
@click="delcollection_item0List(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addcollection_item0List()">
|
||||
<el-button type="text" icon="el-icon-plus">添加</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</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>
|
||||
<el-button @click="visible = false"> 取 消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> 确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</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 {
|
||||
visible: false,
|
||||
loading: false,
|
||||
isDetail: false,
|
||||
dataForm: {
|
||||
customerCode : '',
|
||||
documentNo : '',
|
||||
customerName : '',
|
||||
amountCollected : '',
|
||||
collectionCount : '',
|
||||
collectionBank : '',
|
||||
paymentType : "0",
|
||||
currency : "0",
|
||||
settlementType : "0",
|
||||
remark : '',
|
||||
voucher : [],
|
||||
status : "0",
|
||||
creatorUserName : '',
|
||||
collection_item0List:[],
|
||||
},
|
||||
activeojnisi:'0',
|
||||
rules:
|
||||
{
|
||||
},
|
||||
customerNamecolumnOptions:[ {"label":"客户编码","value":"supplier_cd"}, {"label":"客户名称","value":"supplier_nm"}, {"label":"客户地点名称","value":"supplier_site_code"}, {"label":"客户等级","value":"customer_level"},],
|
||||
jg_collection_item0deleteTimecolumnOptions:[ {"label":"销售订单ID","value":"id"},{"label":"销售订单编号","value":"document_no"}, {"label":"合同编号","value":"contract_code"},
|
||||
{"label":"订单金额","value":"price"}, {"label":"已收款金额","value":"amount_collected"},
|
||||
{"label":"重量","value":"num"}, {"label":"垫资金额","value":"advance_amount"},
|
||||
{"label":"税额","value":"rate"}, {"label":"不含税金额","value":"not_price"}, {"label":"业务日期","value":"creator_time"},],
|
||||
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"}],
|
||||
|
||||
taxRateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
import request from '@/utils/request'
|
||||
import {
|
||||
getDataInterfaceRes
|
||||
} from '@/api/systemData/dataInterface'
|
||||
import {
|
||||
getDictionaryDataSelector
|
||||
} from '@/api/systemData/dictionary'
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
isDetail: false,
|
||||
dataForm: {
|
||||
customerCode: '',
|
||||
documentNo: '',
|
||||
customerName: '',
|
||||
amountCollected: '',
|
||||
collectionCount: '',
|
||||
collectionBank: '',
|
||||
paymentType: "0",
|
||||
currency: "0",
|
||||
settlementType: "0",
|
||||
remark: '',
|
||||
voucher: [],
|
||||
status: "0",
|
||||
creatorUserName: '',
|
||||
collection_item0List: [],
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
popupSelect(e,d){
|
||||
this.dataForm.customerCode = d.id;
|
||||
activeojnisi: '0',
|
||||
rules: {},
|
||||
customerNamecolumnOptions: [{
|
||||
"label": "客户编码",
|
||||
"value": "supplier_cd"
|
||||
}, {
|
||||
"label": "客户名称",
|
||||
"value": "supplier_nm"
|
||||
}, {
|
||||
"label": "客户地点名称",
|
||||
"value": "supplier_site_code"
|
||||
}, {
|
||||
"label": "客户等级",
|
||||
"value": "customer_level"
|
||||
}, ],
|
||||
jg_collection_item0deleteTimecolumnOptions: [{
|
||||
"label": "销售订单ID",
|
||||
"value": "id"
|
||||
}, {
|
||||
"label": "销售订单编号",
|
||||
"value": "document_no"
|
||||
}, {
|
||||
"label": "合同编号",
|
||||
"value": "contract_code"
|
||||
},
|
||||
popupSelect2(a,b) {
|
||||
for (let i = 0; i < this.dataForm.collection_item0List.length; i++) {
|
||||
if (a == this.dataForm.collection_item0List[i].documentNo) {
|
||||
this.dataForm.collection_item0List[i].id = b.id;
|
||||
this.dataForm.collection_item0List[i].price = b.price;
|
||||
this.dataForm.collection_item0List[i].amountCollected = b.amount_collected;
|
||||
this.dataForm.collection_item0List[i].contractCode = b.contract_code;
|
||||
this.dataForm.collection_item0List[i].num = b.num;
|
||||
this.dataForm.collection_item0List[i].advanceAmount = b.advance_amount;
|
||||
this.dataForm.collection_item0List[i].rate = b.rate;
|
||||
this.dataForm.collection_item0List[i].notPrice = b.not_price;
|
||||
this.dataForm.collection_item0List[i].creatorTime = b.creator_time;
|
||||
}
|
||||
}
|
||||
{
|
||||
"label": "订单金额",
|
||||
"value": "price"
|
||||
}, {
|
||||
"label": "已收款金额",
|
||||
"value": "amount_collected"
|
||||
},
|
||||
collection_item0Exist() {
|
||||
let isOk = true;
|
||||
for(let i=0;i<this.dataForm.collection_item0List.length;i++){
|
||||
const e = this.dataForm.collection_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(id, isDetail) {
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.isDetail = isDetail || false;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['elForm'].resetFields();
|
||||
if(this.dataForm.id){
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/collection/Collection/'+this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
});
|
||||
}else{
|
||||
this.clearData(this.dataForm)
|
||||
}
|
||||
});
|
||||
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.collection_item0Exist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data =this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/collection/Collection',
|
||||
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/collection/Collection/'+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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
addcollection_item0List(){
|
||||
let item = {
|
||||
amount:undefined,
|
||||
creatorUserId:undefined,
|
||||
creatorUserName:undefined,
|
||||
deleteTime:undefined,
|
||||
lastModifyUserId:undefined,
|
||||
lastModifyUserName:undefined,
|
||||
taxRate:undefined,
|
||||
lastModifyTime:undefined,
|
||||
deleteUserId:undefined,
|
||||
deleteUserName:undefined,
|
||||
creatorTime:undefined,
|
||||
}
|
||||
this.dataForm.collection_item0List.push(item)
|
||||
},
|
||||
delcollection_item0List(index) {
|
||||
this.dataForm.collection_item0List.splice(index, 1);
|
||||
},
|
||||
dataList(){
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
_data.voucher = JSON.stringify(_data.voucher)
|
||||
for(let i=0;i<_data.collection_item0List.length;i++){
|
||||
var _list = _data.collection_item0List[i];
|
||||
}
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
_dataAll.voucher = JSON.parse( _dataAll.voucher)
|
||||
for(let i=0;i<_dataAll.collection_item0List.length;i++){
|
||||
var _list = _dataAll.collection_item0List[i];
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
},
|
||||
}
|
||||
{
|
||||
"label": "重量",
|
||||
"value": "num"
|
||||
}, {
|
||||
"label": "垫资金额",
|
||||
"value": "advance_amount"
|
||||
},
|
||||
{
|
||||
"label": "税额",
|
||||
"value": "rate"
|
||||
}, {
|
||||
"label": "不含税金额",
|
||||
"value": "not_price"
|
||||
}, {
|
||||
"label": "业务日期",
|
||||
"value": "creator_time"
|
||||
},
|
||||
],
|
||||
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"
|
||||
}],
|
||||
|
||||
taxRateOptions: [{
|
||||
"fullName": "13",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "9",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "6",
|
||||
"id": "2"
|
||||
}, {
|
||||
"fullName": "5",
|
||||
"id": "3"
|
||||
}, {
|
||||
"fullName": "3",
|
||||
"id": "4"
|
||||
}, {
|
||||
"fullName": "0",
|
||||
"id": "5"
|
||||
}],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
popupSelect(e, d) {
|
||||
this.dataForm.customerCode = d.id;
|
||||
},
|
||||
popupSelect2(a, b) {
|
||||
for (let i = 0; i < this.dataForm.collection_item0List.length; i++) {
|
||||
if (a == this.dataForm.collection_item0List[i].documentNo) {
|
||||
this.dataForm.collection_item0List[i].id = b.id;
|
||||
this.dataForm.collection_item0List[i].price = b.price;
|
||||
this.dataForm.collection_item0List[i].amountCollected = b.amount_collected;
|
||||
this.dataForm.collection_item0List[i].contractCode = b.contract_code;
|
||||
this.dataForm.collection_item0List[i].num = b.num;
|
||||
this.dataForm.collection_item0List[i].advanceAmount = b.advance_amount;
|
||||
this.dataForm.collection_item0List[i].rate = b.rate;
|
||||
this.dataForm.collection_item0List[i].notPrice = b.not_price;
|
||||
this.dataForm.collection_item0List[i].creatorTime = b.creator_time;
|
||||
}
|
||||
}
|
||||
},
|
||||
collection_item0Exist() {
|
||||
let isOk = true;
|
||||
for (let i = 0; i < this.dataForm.collection_item0List.length; i++) {
|
||||
const e = this.dataForm.collection_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(id, isDetail) {
|
||||
this.dataForm.id = id || 0;
|
||||
this.visible = true;
|
||||
this.isDetail = isDetail || false;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['elForm'].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
this.loading = true
|
||||
request({
|
||||
url: '/api/collection/Collection/' + this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
});
|
||||
} else {
|
||||
this.clearData(this.dataForm)
|
||||
}
|
||||
});
|
||||
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.collection_item0Exist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data = this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/collection/Collection',
|
||||
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/collection/Collection/' + 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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
addcollection_item0List() {
|
||||
let item = {
|
||||
amount: undefined,
|
||||
creatorUserId: undefined,
|
||||
creatorUserName: undefined,
|
||||
deleteTime: undefined,
|
||||
lastModifyUserId: undefined,
|
||||
lastModifyUserName: undefined,
|
||||
taxRate: undefined,
|
||||
lastModifyTime: undefined,
|
||||
deleteUserId: undefined,
|
||||
deleteUserName: undefined,
|
||||
creatorTime: undefined,
|
||||
}
|
||||
this.dataForm.collection_item0List.push(item)
|
||||
},
|
||||
delcollection_item0List(index) {
|
||||
this.dataForm.collection_item0List.splice(index, 1);
|
||||
},
|
||||
dataList() {
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
_data.voucher = JSON.stringify(_data.voucher)
|
||||
for (let i = 0; i < _data.collection_item0List.length; i++) {
|
||||
var _list = _data.collection_item0List[i];
|
||||
}
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
_dataAll.voucher = JSON.parse(_dataAll.voucher)
|
||||
for (let i = 0; i < _dataAll.collection_item0List.length; i++) {
|
||||
var _list = _dataAll.collection_item0List[i];
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -1,323 +1,423 @@
|
||||
<template>
|
||||
<div class="JNPF-common-layout">
|
||||
<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>
|
||||
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="confirmprice()">认款
|
||||
</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 @selection-change="handleSelectionChange">
|
||||
<el-table-column prop="documentNo" label="单据编号" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="customerName" label="客户名称" width="0" align="left"
|
||||
/>
|
||||
<el-table-column label="币别 " width="0" prop="currency" algin="left"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amountCollected" label="收款金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="collectionCount" label="收款账户" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="collectionBank" label="收款银行" width="0" align="left"
|
||||
/>
|
||||
<el-table-column label="收款类型 " width="0" prop="paymentType" algin="left"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.paymentType | dynamicText(paymentTypeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算类型" width="0" prop="settlementType" algin="left"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.settlementType | dynamicText(settlementTypeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态 " width="0" prop="status" algin="left"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status | dynamicText(statusOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorUserName" label="制单人" width="0" align="left"
|
||||
/>
|
||||
<el-table-column label="操作" fixed="right"
|
||||
width="150" >
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text"
|
||||
@click="addOrUpdateHandle(scope.row.id)" >编辑
|
||||
</el-button>
|
||||
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
||||
</el-button>
|
||||
<el-button type="text"
|
||||
@click="goDetail(scope.row.id)">详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
|
||||
</div>
|
||||
<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="text" icon="el-icon-plus" @click="addOrUpdateHandle()">新增
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-download" @click="exportData()">导出
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-check" @click="exportData()">审核
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-close" @click="exportData()">弃审
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-check" @click="exportData()">提交
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-check" @click="confirmprice()">认款
|
||||
</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-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
|
||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
|
||||
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
|
||||
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
|
||||
@selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
|
||||
<el-table-column prop="documentNo" label="单据编号" fixed="left" sortable width="200" align="center" />
|
||||
<el-table-column prop="customerName" label="客户名称" fixed="left" sortable width="200" align="center" />
|
||||
<el-table-column label="币别 " width="80" sortable prop="currency" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amountCollected" sortable label="收款金额" width="150" align="center" />
|
||||
<el-table-column prop="collectionCount" sortable label="收款账户" width="150" align="center" />
|
||||
<el-table-column prop="collectionBank" sortable label="收款银行" width="150" align="center" />
|
||||
<el-table-column label="收款类型" sortable width="150" prop="paymentType" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.paymentType | dynamicText(paymentTypeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算类型" sortable width="150" prop="settlementType" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.settlementType | dynamicText(settlementTypeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态" sortable width="150" prop="status" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status | dynamicText(statusOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorUserName" sortable label="制单人" width="150" align="center" />
|
||||
<el-table-column label="操作" fixed="right" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">编辑
|
||||
</el-button>
|
||||
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
||||
</el-button>
|
||||
<el-button type="text" @click="goDetail(scope.row.id)">详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
|
||||
@pagination="initData" />
|
||||
</div>
|
||||
</div>
|
||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
|
||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
|
||||
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
|
||||
import JNPFForm from './Form'
|
||||
import ExportBox from './ExportBox'
|
||||
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
|
||||
import Detail from './Detail'
|
||||
import request from '@/utils/request'
|
||||
import {
|
||||
getDictionaryDataSelector
|
||||
} from '@/api/systemData/dictionary'
|
||||
import JNPFForm from './Form'
|
||||
import ExportBox from './ExportBox'
|
||||
import {
|
||||
getDataInterfaceRes
|
||||
} from '@/api/systemData/dataInterface'
|
||||
import Detail from './Detail'
|
||||
|
||||
export default {
|
||||
components: {JNPFForm, ExportBox,Detail},
|
||||
data() {
|
||||
return {
|
||||
detailVisible: false,
|
||||
query: {
|
||||
documentNo:undefined,
|
||||
},
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
list: [],
|
||||
listLoading: true,
|
||||
multipleSelection: [], total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
},
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [
|
||||
{prop: 'documentNo', label: '单据编号'},
|
||||
{prop: 'customerName', label: '客户名称'},
|
||||
{prop: 'currency', label: '币别 '},
|
||||
{prop: 'amountCollected', label: '收款金额'},
|
||||
{prop: 'collectionCount', label: '收款账户'},
|
||||
{prop: 'collectionBank', label: '收款银行'},
|
||||
{prop: 'paymentType', label: '收款类型 '},
|
||||
{prop: 'settlementType', label: '结算类型'},
|
||||
{prop: 'status', label: '单据状态 '},
|
||||
{prop: 'creatorUserName', 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"},
|
||||
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"},{"fullName":"已付款","id":"3"}],
|
||||
statusProps:{"label":"fullName","value":"id"},
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
JNPFForm,
|
||||
ExportBox,
|
||||
Detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detailVisible: false,
|
||||
query: {
|
||||
documentNo: undefined,
|
||||
},
|
||||
computed: {
|
||||
menuId() {
|
||||
return this.$route.meta.modelId || ''
|
||||
}
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
list: [],
|
||||
listLoading: true,
|
||||
multipleSelection: [],
|
||||
total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
},
|
||||
methods: {
|
||||
goDetail(id){
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(id)
|
||||
})
|
||||
},
|
||||
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/collection/Collection/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
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [{
|
||||
prop: 'documentNo',
|
||||
label: '单据编号'
|
||||
},
|
||||
{
|
||||
prop: 'customerName',
|
||||
label: '客户名称'
|
||||
},
|
||||
{
|
||||
prop: 'currency',
|
||||
label: '币别 '
|
||||
},
|
||||
{
|
||||
prop: 'amountCollected',
|
||||
label: '收款金额'
|
||||
},
|
||||
{
|
||||
prop: 'collectionCount',
|
||||
label: '收款账户'
|
||||
},
|
||||
{
|
||||
prop: 'collectionBank',
|
||||
label: '收款银行'
|
||||
},
|
||||
{
|
||||
prop: 'paymentType',
|
||||
label: '收款类型 '
|
||||
},
|
||||
{
|
||||
prop: 'settlementType',
|
||||
label: '结算类型'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '单据状态 '
|
||||
},
|
||||
{
|
||||
prop: 'creatorUserName',
|
||||
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"
|
||||
},
|
||||
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: {
|
||||
goDetail(id) {
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(id)
|
||||
})
|
||||
},
|
||||
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/collection/Collection/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/collection/Collection/${id}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
const res = val.map(item => item.id)
|
||||
this.multipleSelection = res
|
||||
},
|
||||
handleBatchRemoveDel() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/collection/Collection/batchRemove/${ids}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
confirmprice(){
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDel(id) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/collection/Collection/${id}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
let id = this.multipleSelection.join()
|
||||
let param = {};
|
||||
param = this.list.find(function(param) {
|
||||
debugger
|
||||
return param.id == id;
|
||||
})
|
||||
request({
|
||||
url: `/api/collection/Collection/confirmprice`,
|
||||
method: 'POST',
|
||||
data: param
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
addOrUpdateHandle(id, isDetail) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm.init(id, isDetail)
|
||||
})
|
||||
},
|
||||
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/collection/Collection/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: "",
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
const res = val.map(item => item.id)
|
||||
this.multipleSelection = res
|
||||
},
|
||||
handleBatchRemoveDel() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/collection/Collection/batchRemove/${ids}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.search()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
confirmprice() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
let id = this.multipleSelection.join()
|
||||
let param = {};
|
||||
param = this.list.find(function(param) {
|
||||
debugger
|
||||
return param.id == id;
|
||||
})
|
||||
request({
|
||||
url: `/api/collection/Collection/confirmprice`,
|
||||
method: 'POST',
|
||||
data: param
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
addOrUpdateHandle(id, isDetail) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm.init(id, isDetail)
|
||||
})
|
||||
},
|
||||
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/collection/Collection/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()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,300 +1,386 @@
|
||||
<template>
|
||||
<div class="JNPF-common-layout">
|
||||
<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-select v-model="query.status" placeholder="请选择"
|
||||
clearable>
|
||||
<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="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>
|
||||
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除
|
||||
</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 @selection-change="handleSelectionChange">
|
||||
<el-table-column prop="documentNo" label="单据编号" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="costomerName" label="客户名称" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="price" label="金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="num" label="数量" width="0" align="left"
|
||||
/>
|
||||
<el-table-column label="币别" width="0" prop="currency" algin="left"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amountCollected" label="已回款金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="invoiceNum" label="发票数量" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="invoiceAmount" label="发票金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column label="来源系统" width="0" prop="sourceSystem" algin="left"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.sourceSystem | dynamicText(sourceSystemOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态 " width="0" prop="status" algin="left"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status | dynamicText(statusOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorUserName" label="制单人" width="0" align="left"
|
||||
/>
|
||||
<el-table-column label="操作" fixed="right"
|
||||
width="150" >
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text"
|
||||
@click="addOrUpdateHandle(scope.row.id)" >编辑
|
||||
</el-button>
|
||||
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
||||
</el-button>
|
||||
<el-button type="text"
|
||||
@click="goDetail(scope.row.id)">详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
|
||||
</div>
|
||||
<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-select v-model="query.status" placeholder="请选择" clearable>
|
||||
<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="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="text" icon="el-icon-plus" @click="addOrUpdateHandle()">新增
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-download" @click="exportData()">导出
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-check" @click="exportData()">发货
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-close" @click="exportData()">发票录入
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-check" @click="exportData()">回款
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-close" @click="exportData()">归档
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-check" @click="exportData()">退货
|
||||
</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-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
|
||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
|
||||
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
|
||||
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
|
||||
@selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
|
||||
<el-table-column prop="documentNo" label="单据编号" sortable fixed="left" width="200" align="center" />
|
||||
<el-table-column prop="costomerName" label="客户名称" sortable fixed="left" width="150" align="center" />
|
||||
<el-table-column prop="price" label="金额" sortable width="150" align="center" />
|
||||
<el-table-column prop="num" label="数量" sortable width="150" align="center" />
|
||||
<el-table-column label="币别" width="100" sortable prop="currency" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amountCollected" sortable label="已回款金额" width="150" align="center" />
|
||||
<el-table-column prop="invoiceNum" sortable label="发票数量" width="150" align="center" />
|
||||
<el-table-column prop="invoiceAmount" sortable label="发票金额" width="150" align="center" />
|
||||
<el-table-column label="来源系统" width="150" sortable prop="sourceSystem" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.sourceSystem | dynamicText(sourceSystemOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态 " width="150" sortable prop="status" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status | dynamicText(statusOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorUserName" label="制单人" sortable width="150" align="center" />
|
||||
<el-table-column label="操作" fixed="right" width="150" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">编辑
|
||||
</el-button>
|
||||
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
||||
</el-button>
|
||||
<el-button type="text" @click="goDetail(scope.row.id)">详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
|
||||
@pagination="initData" />
|
||||
</div>
|
||||
</div>
|
||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
|
||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
|
||||
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
|
||||
import JNPFForm from './Form'
|
||||
import ExportBox from './ExportBox'
|
||||
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
|
||||
import Detail from './Detail'
|
||||
import request from '@/utils/request'
|
||||
import {
|
||||
getDictionaryDataSelector
|
||||
} from '@/api/systemData/dictionary'
|
||||
import JNPFForm from './Form'
|
||||
import ExportBox from './ExportBox'
|
||||
import {
|
||||
getDataInterfaceRes
|
||||
} from '@/api/systemData/dataInterface'
|
||||
import Detail from './Detail'
|
||||
|
||||
export default {
|
||||
components: {JNPFForm, ExportBox,Detail},
|
||||
data() {
|
||||
return {
|
||||
detailVisible: false,
|
||||
query: {
|
||||
documentNo:undefined,
|
||||
status:undefined,
|
||||
},
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
list: [],
|
||||
listLoading: true,
|
||||
multipleSelection: [], total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
},
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [
|
||||
{prop: 'documentNo', label: '单据编号'},
|
||||
{prop: 'costomerName', label: '客户名称'},
|
||||
{prop: 'price', label: '金额'},
|
||||
{prop: 'num', label: '数量'},
|
||||
{prop: 'currency', label: '币别'},
|
||||
{prop: 'amountCollected', label: '已回款金额'},
|
||||
{prop: 'invoiceNum', label: '发票数量'},
|
||||
{prop: 'invoiceAmount', label: '发票金额'},
|
||||
{prop: 'sourceSystem', label: '来源系统'},
|
||||
{prop: 'status', label: '单据状态 '},
|
||||
{prop: 'creatorUserName', label: '制单人'},
|
||||
],
|
||||
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
|
||||
currencyProps:{"label":"fullName","value":"id"},
|
||||
sourceSystemOptions:[{"fullName":"人工创建","id":"0"},{"fullName":"商城平台","id":"1"}],
|
||||
sourceSystemProps:{"label":"fullName","value":"id"},
|
||||
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"开票中","id":"1"},{"fullName":"付款申请","id":"2"},{"fullName":"待回款","id":"3"},{"fullName":"回款中","id":"4"},{"fullName":"归档","id":"5"}],
|
||||
statusProps:{"label":"fullName","value":"id"},
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
JNPFForm,
|
||||
ExportBox,
|
||||
Detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detailVisible: false,
|
||||
query: {
|
||||
documentNo: undefined,
|
||||
status: undefined,
|
||||
},
|
||||
computed: {
|
||||
menuId() {
|
||||
return this.$route.meta.modelId || ''
|
||||
}
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
list: [],
|
||||
listLoading: true,
|
||||
multipleSelection: [],
|
||||
total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
},
|
||||
methods: {
|
||||
goDetail(id){
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(id)
|
||||
})
|
||||
},
|
||||
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/saleorder/Saleorder/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
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [{
|
||||
prop: 'documentNo',
|
||||
label: '单据编号'
|
||||
},
|
||||
{
|
||||
prop: 'costomerName',
|
||||
label: '客户名称'
|
||||
},
|
||||
{
|
||||
prop: 'price',
|
||||
label: '金额'
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
label: '数量'
|
||||
},
|
||||
{
|
||||
prop: 'currency',
|
||||
label: '币别'
|
||||
},
|
||||
{
|
||||
prop: 'amountCollected',
|
||||
label: '已回款金额'
|
||||
},
|
||||
{
|
||||
prop: 'invoiceNum',
|
||||
label: '发票数量'
|
||||
},
|
||||
{
|
||||
prop: 'invoiceAmount',
|
||||
label: '发票金额'
|
||||
},
|
||||
{
|
||||
prop: 'sourceSystem',
|
||||
label: '来源系统'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '单据状态 '
|
||||
},
|
||||
{
|
||||
prop: 'creatorUserName',
|
||||
label: '制单人'
|
||||
},
|
||||
],
|
||||
currencyOptions: [{
|
||||
"fullName": "人民币",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "美元",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "英镑",
|
||||
"id": "2"
|
||||
}],
|
||||
currencyProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
sourceSystemOptions: [{
|
||||
"fullName": "人工创建",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "商城平台",
|
||||
"id": "1"
|
||||
}],
|
||||
sourceSystemProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
statusOptions: [{
|
||||
"fullName": "已保存",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "开票中",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "付款申请",
|
||||
"id": "2"
|
||||
}, {
|
||||
"fullName": "待回款",
|
||||
"id": "3"
|
||||
}, {
|
||||
"fullName": "回款中",
|
||||
"id": "4"
|
||||
}, {
|
||||
"fullName": "归档",
|
||||
"id": "5"
|
||||
}],
|
||||
statusProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
menuId() {
|
||||
return this.$route.meta.modelId || ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
goDetail(id) {
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(id)
|
||||
})
|
||||
},
|
||||
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/saleorder/Saleorder/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/saleorder/Saleorder/${id}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
const res = val.map(item => item.id)
|
||||
this.multipleSelection = res
|
||||
},
|
||||
handleBatchRemoveDel() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/saleorder/Saleorder/batchRemove/${ids}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
addOrUpdateHandle(id, isDetail) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm.init(id, isDetail)
|
||||
})
|
||||
},
|
||||
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/saleorder/Saleorder/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.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDel(id) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/saleorder/Saleorder/${id}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
const res = val.map(item => item.id)
|
||||
this.multipleSelection = res
|
||||
},
|
||||
handleBatchRemoveDel() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/saleorder/Saleorder/batchRemove/${ids}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
addOrUpdateHandle(id, isDetail) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm.init(id, isDetail)
|
||||
})
|
||||
},
|
||||
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/saleorder/Saleorder/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()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in new issue