commit
5a496e868a
File diff suppressed because it is too large
Load Diff
@ -1,441 +1,487 @@
|
||||
<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="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="供应商" 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-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-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="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="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="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="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="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-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-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="结算类型"
|
||||
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="结算类型" 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-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="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-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' >
|
||||
<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":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="creatorUserId" label="申请金额">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-input v-model="scope.row.creatorUserId"-->
|
||||
<!-- placeholder="请输入" clearable :style='{"width":"100%"}'>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="creatorUserName" label="订单金额">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-input v-model="scope.row.creatorUserName"-->
|
||||
<!-- placeholder="请输入" clearable :style='{"width":"100%"}'>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="lastModifyUserId" label="已付金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.payPrice"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lastModifyUserName" label="订单编号">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.documentNo"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lastModifyTime" label="合同编码">
|
||||
<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="deleteUserId" label="重量">
|
||||
<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="deleteTime" label="垫资金额">
|
||||
<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="orgnizeId" label="税额">
|
||||
<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="departmentId" label="不含税金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.notAmount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</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":"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="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-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>
|
||||
<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="申请金额">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-input v-model="scope.row.creatorUserId"-->
|
||||
<!-- placeholder="请输入" clearable :style='{"width":"100%"}'>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="creatorUserName" label="订单金额">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-input v-model="scope.row.creatorUserName"-->
|
||||
<!-- placeholder="请输入" clearable :style='{"width":"100%"}'>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="lastModifyUserId" label="已付金额" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="payPrice" label="已付金额" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.payPrice" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="documentNo" label="订单编号" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.documentNo" placeholder="请输入" clearable
|
||||
:style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="lastModifyTime" 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="deleteUserId" 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="deleteTime" 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="orgnizeId" 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="departmentId" label="不含税金额" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</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">
|
||||
</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>
|
||||
</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: {
|
||||
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"}],
|
||||
|
||||
}
|
||||
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: {
|
||||
documentno: '',
|
||||
suppliername: '',
|
||||
paymenttype: "0",
|
||||
paymentaccount: '',
|
||||
paymentbank: '',
|
||||
paymentamount: '',
|
||||
collectionaccount: '',
|
||||
collectionbank: '',
|
||||
requestedamount: '',
|
||||
duedate: '',
|
||||
currency: "0",
|
||||
settlementtype: "0",
|
||||
paymentno: '',
|
||||
remark: '',
|
||||
status: "0",
|
||||
payment_item0List: [],
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
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(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/payment/Payment/'+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', {})
|
||||
activeivpzpd: '0',
|
||||
rules: {
|
||||
suppliername: [],
|
||||
paymentaccount: [],
|
||||
paymentamount: [{
|
||||
required: true,
|
||||
message: '请输入付款金额',
|
||||
trigger: 'blur'
|
||||
},
|
||||
// 表单提交
|
||||
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
|
||||
{
|
||||
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: {},
|
||||
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))) {
|
||||
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;
|
||||
},
|
||||
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(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/payment/Payment/' + 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.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>
|
||||
|
@ -1,326 +1,427 @@
|
||||
<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="paymentno" label="来源单号" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="documentno" label="单据编号" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="suppliername" 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="paymentamount" label="付款金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="requestedamount" label="申请金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="paymentaccount" label="付款账户" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="paymentbank" 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 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 prop="paymentno" label="来源单号" fixed="left" sortable width="200" align="center" />
|
||||
<el-table-column prop="documentno" label="单据编号" fixed="left" sortable width="200" align="center" />
|
||||
<el-table-column prop="suppliername" label="供应商" fixed="left" sortable width="150" align="center" />
|
||||
<el-table-column label="币别 " width="80" prop="currency" sortable align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="paymentamount" label="付款金额" sortable width="140" align="center" />
|
||||
<el-table-column prop="requestedamount" label="申请金额" sortable width="140" align="center" />
|
||||
<el-table-column prop="paymentaccount" label="付款账户" sortable width="140" align="center" />
|
||||
<el-table-column prop="paymentbank" label="付款银行" sortable width="150" align="center" />
|
||||
<el-table-column label="付款类型" sortable width="140" prop="paymenttype" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.paymenttype | dynamicText(paymenttypeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="结算类型" sortable width="140" prop="settlementtype" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.settlementtype | dynamicText(settlementtypeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态" sortable width="140" prop="status" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status | dynamicText(statusOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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,
|
||||
},
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
list: [],
|
||||
listLoading: true,
|
||||
multipleSelection: [], total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "businessdate",
|
||||
},
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [
|
||||
{prop: 'paymentno', label: '来源单号'},
|
||||
{prop: 'documentno', label: '单据编号'},
|
||||
{prop: 'suppliername', label: '供应商'},
|
||||
{prop: 'currency', label: '币别 '},
|
||||
{prop: 'paymentamount', label: '付款金额'},
|
||||
{prop: 'requestedamount', label: '申请金额'},
|
||||
{prop: 'paymentaccount', label: '付款账户'},
|
||||
{prop: 'paymentbank', label: '付款银行'},
|
||||
{prop: 'paymenttype', label: '付款类型'},
|
||||
{prop: 'settlementtype', label: '结算类型'},
|
||||
{prop: 'status', 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: "businessdate",
|
||||
},
|
||||
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/payment/Payment/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/payment/Payment/${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/payment/Payment/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
|
||||
}
|
||||
let id = this.multipleSelection.join()
|
||||
let param = {};
|
||||
param = this.list.find(function(param) {
|
||||
debugger
|
||||
return param.id == id;
|
||||
})
|
||||
request({
|
||||
url: `/api/payment/Payment/confirmprice`,
|
||||
method: 'POST',
|
||||
data: param
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [{
|
||||
prop: 'paymentno',
|
||||
label: '来源单号'
|
||||
},
|
||||
{
|
||||
prop: 'documentno',
|
||||
label: '单据编号'
|
||||
},
|
||||
{
|
||||
prop: 'suppliername',
|
||||
label: '供应商'
|
||||
},
|
||||
{
|
||||
prop: 'currency',
|
||||
label: '币别 '
|
||||
},
|
||||
{
|
||||
prop: 'paymentamount',
|
||||
label: '付款金额'
|
||||
},
|
||||
{
|
||||
prop: 'requestedamount',
|
||||
label: '申请金额'
|
||||
},
|
||||
{
|
||||
prop: 'paymentaccount',
|
||||
label: '付款账户'
|
||||
},
|
||||
{
|
||||
prop: 'paymentbank',
|
||||
label: '付款银行'
|
||||
},
|
||||
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/payment/Payment/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: "businessdate",
|
||||
}
|
||||
{
|
||||
prop: 'paymenttype',
|
||||
label: '付款类型'
|
||||
},
|
||||
{
|
||||
prop: 'settlementtype',
|
||||
label: '结算类型'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
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/payment/Payment/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/payment/Payment/${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/payment/Payment/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/payment/Payment/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/payment/Payment/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: "businessdate",
|
||||
}
|
||||
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>
|
||||
|
@ -1,433 +1,580 @@
|
||||
<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="type" >
|
||||
<el-select v-model="dataForm.type"
|
||||
placeholder="请选择业务类型" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in typeOptions" :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="业务类型" required prop="type">
|
||||
<el-select v-model="dataForm.type" placeholder="请选择业务类型" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in typeOptions" :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="souceno" >
|
||||
<popupSelect v-model="dataForm.souceno"
|
||||
placeholder="请选择" clearable field="souceno" interfaceId="392931756640102277" :columnOptions="soucenocolumnOptions" propsValue="document_no" relationField="document_no" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px" @change="popupSelect"
|
||||
>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="来源单号" required prop="souceno">
|
||||
<popupSelect v-model="dataForm.souceno" placeholder="请选择" clearable field="souceno"
|
||||
interfaceId="392931756640102277" :columnOptions="soucenocolumnOptions" propsValue="document_no"
|
||||
relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
|
||||
@change="popupSelect">
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="入库金额"
|
||||
prop="receiptamount" >
|
||||
<el-input v-model="dataForm.receiptamount"
|
||||
placeholder="请输入入库金额" readonly>
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="入库金额" prop="receiptamount">
|
||||
<el-input v-model="dataForm.receiptamount" placeholder="请输入入库金额" readonly>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="币别"
|
||||
prop="currency" >
|
||||
<el-select v-model="dataForm.currency"
|
||||
placeholder="请选择币别" readonly>
|
||||
<el-option v-for="(item, index) in currencyOptions" :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="currency">
|
||||
<el-select v-model="dataForm.currency" placeholder="请选择币别" readonly>
|
||||
<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="receiptnum" >
|
||||
<el-input v-model="dataForm.receiptnum"
|
||||
placeholder="请输入入库数量" readonly>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="入库数量" prop="receiptnum">
|
||||
<el-input v-model="dataForm.receiptnum" placeholder="请输入入库数量" readonly>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="供应商名称"
|
||||
prop="suppliername" >
|
||||
<el-input v-model="dataForm.suppliername"
|
||||
placeholder="请输入供应商名称" readonly>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="供应商名称" prop="suppliername">
|
||||
<el-input v-model="dataForm.suppliername" placeholder="请输入供应商名称" readonly>
|
||||
|
||||
</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="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="12" >-->
|
||||
<!-- <el-form-item label="入库日期"-->
|
||||
<!-- prop="warehousingdate" >-->
|
||||
<!-- <el-date-picker v-model="dataForm.warehousingdate"-->
|
||||
<!-- placeholder="请选择入库日期" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >-->
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12" >-->
|
||||
<!-- <el-form-item label="入库日期"-->
|
||||
<!-- prop="warehousingdate" >-->
|
||||
<!-- <el-date-picker v-model="dataForm.warehousingdate"-->
|
||||
<!-- placeholder="请选择入库日期" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >-->
|
||||
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12" >-->
|
||||
<!-- <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-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="12" >-->
|
||||
<!-- <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="activevpzhms" 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.receiptin_item0List" size='mini' >
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="licenseno" label="车牌号">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.licenseno"
|
||||
placeholder="请选择" clearable :field="'licenseno'+scope.$index" :bissId="dataForm.souceno" interfaceId="392933121244325765" :columnOptions="receiptin_item0licensenocolumnOptions" propsValue="license_num" relationField="license_num" popupType="dialog"
|
||||
popupWidth="800px" @change="popupSelect2"
|
||||
>
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="materialname" label="物料名称">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.materialname"
|
||||
placeholder="请输入" :disabled="true">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="reservoirareaId" label="库区名称">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.reservoirareaId"
|
||||
placeholder="请选择" clearable :field="'reservoirareaId'+scope.$index" interfaceId="392939299932268421" :columnOptions="receiptin_item0reservoirareaIdcolumnOptions" propsValue="id" relationField="areaname" popupType="dialog"
|
||||
popupWidth="800px" @change="popupSelect3"
|
||||
>
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouseId" label="仓库名称">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.warehouseId"
|
||||
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num" 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="unit" label="计量单位">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.unit"
|
||||
placeholder="请选择" clearable :style='{"width":"200%"}'>
|
||||
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" 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="rate" label="税率">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.rate"
|
||||
placeholder="请选择" clearable :style='{"width":"200%"}'>
|
||||
<el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="rateamount" label="税额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.rateamount"
|
||||
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="batchno" label="批次号">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.batchno"
|
||||
placeholder="请输入" clearable :style='{"width":"200%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="poundType" label="磅单类型">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.poundType"
|
||||
placeholder="请选择" clearable :style='{"width":"200%"}'>
|
||||
<el-option v-for="(item, index) in poundTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-select>
|
||||
</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="delreceiptin_item0List(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addreceiptin_item0List()">
|
||||
<el-button type="text" icon="el-icon-plus">添加</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane >
|
||||
</el-tabs>
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activevpzhms" 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.receiptin_item0List" size='mini' show-summary :summary-method="getSummaries">
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="licenseno" width="140" label="车牌号" align="center">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.licenseno" placeholder="请选择" clearable
|
||||
:field="'licenseno'+scope.$index"
|
||||
interfaceId="392933121244325765" :columnOptions="receiptin_item0licensenocolumnOptions"
|
||||
propsValue="license_num" relationField="license_num" popupType="dialog" popupWidth="1000px" popupTitle="选择车牌"
|
||||
:bissId="dataForm.souceno" :excludeFields="excludeFields"
|
||||
@change="popupSelect2">
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="materialname" width="140" label="物料名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.materialname" placeholder="请输入" :disabled="true">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="reservoirareaId" width="140" label="库区名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.reservoirareaId" placeholder="请选择" clearable
|
||||
:field="'reservoirareaId'+scope.$index" interfaceId="392939299932268421"
|
||||
:columnOptions="receiptin_item0reservoirareaIdcolumnOptions" propsValue="id"
|
||||
relationField="areaname" popupType="dialog" popupWidth="800px" @change="popupSelect3">
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouseId" width="140" label="仓库名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.warehouseId" placeholder="请输入" clearable :disabled="true" >
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num" width="140" label="入库数量" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.num" placeholder="请输入" clearable @input="inputChange()" :disabled="true">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" width="140" label="计量单位" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.unit" placeholder="请选择" clearable :disabled="true">
|
||||
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" width="140" label="单价" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.price" placeholder="请输入" clearable :disabled="true">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rate" width="140" label="税率" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.rate" placeholder="请选择" clearable :disabled="true">
|
||||
<el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amount" width="140" label="金额" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amount" placeholder="请输入" clearable @input="inputChange()" :disabled="true">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rateamount" width="140" label="税额" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.rateamount" placeholder="请输入" clearable :disabled="true">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="batchno" width="140" label="批次号" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.batchno" placeholder="请输入" clearable :disabled="true">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="poundType" width="140" label="磅单类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.poundType" placeholder="请选择" clearable :disabled="true">
|
||||
<el-option v-for="(item, index) in poundTypeOptions" :key="index" :label="item.fullName"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</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="delreceiptin_item0List(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addreceiptin_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: {
|
||||
documentno : '',
|
||||
type : "",
|
||||
souceno : "",
|
||||
receiptamount : '',
|
||||
currency : "0",
|
||||
receiptnum : '',
|
||||
suppliername : '',
|
||||
remark : '',
|
||||
warehousingdate : '',
|
||||
status : "0",
|
||||
creatorTime : "",
|
||||
creatorUserName : "",
|
||||
receiptin_item0List:[],
|
||||
},
|
||||
activevpzhms:'0',
|
||||
rules:
|
||||
{
|
||||
receiptamount: [
|
||||
],
|
||||
receiptnum: [
|
||||
],
|
||||
},
|
||||
typeOptions:[{"fullName":"采购入库","id":"0"},{"fullName":"购销入库","id":"1"}],
|
||||
soucenocolumnOptions:[ {"label":"采购订单","value":"document_no"}, {"label":"供应商名称","value":"supplier_name"}, {"label":"币别","value":"currency"},],
|
||||
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
|
||||
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
|
||||
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: '',
|
||||
type: "",
|
||||
souceno: "",
|
||||
receiptamount: 0,
|
||||
currency: "0",
|
||||
receiptnum: 0,
|
||||
suppliername: '',
|
||||
remark: '',
|
||||
warehousingdate: '',
|
||||
status: "0",
|
||||
creatorTime: "",
|
||||
creatorUserName: "",
|
||||
receiptin_item0List: [],
|
||||
},
|
||||
activevpzhms: '0',
|
||||
rules: {},
|
||||
typeOptions: [{
|
||||
"fullName": "采购入库",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "购销入库",
|
||||
"id": "1"
|
||||
}],
|
||||
soucenocolumnOptions: [{
|
||||
"label": "采购订单",
|
||||
"value": "document_no"
|
||||
}, {
|
||||
"label": "供应商名称",
|
||||
"value": "supplier_name"
|
||||
}, {
|
||||
"label": "币别",
|
||||
"value": "currencyLabel"
|
||||
}, ],
|
||||
currencyOptions: [{
|
||||
"fullName": "人民币",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "美元",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "英镑",
|
||||
"id": "2"
|
||||
}],
|
||||
statusOptions: [{
|
||||
"fullName": "已保存",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "审批中",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "已审批",
|
||||
"id": "2"
|
||||
}],
|
||||
|
||||
receiptin_item0licensenocolumnOptions:[ {"label":"车牌号","value":"license_num"}, {"label":"物料名称","value":"material_name"}, {"label":"库区名称","value":"in_area"}, {"label":"仓库名称","value":"name"}, {"label":"入库数量","value":"settlement"}, {"label":"计量单位","value":"unit"}, {"label":"单价","value":"price"}, {"label":"税率","value":"rate"}, {"label":"金额","value":"amount"}, {"label":"批次号","value":"poundlist_id"}, {"label":"磅单类型","value":"pount_type"},],
|
||||
receiptin_item0reservoirareaIdcolumnOptions:[ {"label":"库区编码","value":"areacode"}, {"label":"库区名称","value":"areaname"}, {"label":"最高库存","value":"maximum"}, {"label":"安全库存","value":"safety"}, {"label":"最低库存","value":"minimum"}, {"label":"计量单位","value":"unit"}, {"label":"仓库名称","value":"name"},],
|
||||
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
|
||||
rateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
|
||||
poundTypeOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
|
||||
receiptin_item0licensenocolumnOptions: [{
|
||||
"label": "车牌号",
|
||||
"value": "license_num"
|
||||
}, {
|
||||
"label": "物料名称",
|
||||
"value": "material_name"
|
||||
}, {
|
||||
"label": "库区名称",
|
||||
"value": "in_area"
|
||||
}, {
|
||||
"label": "仓库名称",
|
||||
"value": "name"
|
||||
}, {
|
||||
"label": "入库数量",
|
||||
"value": "settlement"
|
||||
}, {
|
||||
"label": "计量单位",
|
||||
"value": "unit"
|
||||
}, {
|
||||
"label": "单价",
|
||||
"value": "price"
|
||||
}, {
|
||||
"label": "税率",
|
||||
"value": "rate"
|
||||
}, {
|
||||
"label": "金额",
|
||||
"value": "amount"
|
||||
}, {
|
||||
"label": "批次号",
|
||||
"value": "poundlist_id"
|
||||
}, {
|
||||
"label": "磅单类型",
|
||||
"value": "pount_type"
|
||||
}, ],
|
||||
receiptin_item0reservoirareaIdcolumnOptions: [{
|
||||
"label": "库区编码",
|
||||
"value": "areacode"
|
||||
}, {
|
||||
"label": "库区名称",
|
||||
"value": "areaname"
|
||||
}, {
|
||||
"label": "最高库存",
|
||||
"value": "maximum"
|
||||
}, {
|
||||
"label": "安全库存",
|
||||
"value": "safety"
|
||||
}, {
|
||||
"label": "最低库存",
|
||||
"value": "minimum"
|
||||
}, {
|
||||
"label": "计量单位",
|
||||
"value": "unit"
|
||||
}, {
|
||||
"label": "仓库名称",
|
||||
"value": "name"
|
||||
}, ],
|
||||
unitOptions: [{
|
||||
"fullName": "吨",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "千克",
|
||||
"id": "1"
|
||||
}],
|
||||
rateOptions: [{
|
||||
"fullName": "13",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "9",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "6",
|
||||
"id": "2"
|
||||
}, {
|
||||
"fullName": "5",
|
||||
"id": "3"
|
||||
}, {
|
||||
"fullName": "3",
|
||||
"id": "4"
|
||||
}, {
|
||||
"fullName": "0",
|
||||
"id": "5"
|
||||
}],
|
||||
poundTypeOptions: [{
|
||||
"fullName": "吨",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "千克",
|
||||
"id": "1"
|
||||
}],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
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 === 5 || index === 9 || index === 10)) {
|
||||
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;
|
||||
},
|
||||
inputChange(value){
|
||||
var num = 0;
|
||||
var amount = 0;
|
||||
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
|
||||
num = num + parseFloat(this.dataForm.receiptin_item0List[i].num);
|
||||
amount = amount + parseFloat(this.dataForm.receiptin_item0List[i].amount);
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
popupSelect(e,d){
|
||||
this.dataForm.currency = d.currency;
|
||||
this.dataForm.suppliername = d.supplier_name;
|
||||
},
|
||||
popupSelect2(a, b){
|
||||
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
|
||||
if(a == this.dataForm.receiptin_item0List[i].licenseno){
|
||||
this.dataForm.receiptin_item0List[i].materialname = b.material_name;
|
||||
this.dataForm.receiptin_item0List[i].reservoirareaId = b.in_area;
|
||||
this.dataForm.receiptin_item0List[i].warehouseId = b.name;
|
||||
this.dataForm.receiptin_item0List[i].num = b.settlement;
|
||||
this.dataForm.receiptin_item0List[i].unit = b.unit;
|
||||
this.dataForm.receiptin_item0List[i].price = b.price;
|
||||
this.dataForm.receiptin_item0List[i].rate = b.rate;
|
||||
this.dataForm.receiptin_item0List[i].amount = b.amount;
|
||||
this.dataForm.receiptin_item0List[i].batchno = b.poundlist_id;
|
||||
this.dataForm.receiptin_item0List[i].poundType = b.pound_type;
|
||||
this.dataForm.receiptin_item0List[i].rateamount = b.amount*b.rate;
|
||||
this.dataForm.receiptamount = parseFloat(this.dataForm.receiptamount) + parseFloat(b.amount);
|
||||
this.dataForm.receiptnum = parseFloat(this.dataForm.receiptnum) + parseFloat(b.settlement);
|
||||
this.dataForm.receiptamount = amount;
|
||||
this.dataForm.receiptnum = num;
|
||||
},
|
||||
popupSelect(e, d) {
|
||||
this.dataForm.currency = d.currency;
|
||||
this.dataForm.suppliername = d.supplier_name;
|
||||
this.excludeFields = [];
|
||||
this.dataForm.receiptin_item0List = [];
|
||||
},
|
||||
popupSelect2(a, b) {
|
||||
var excludeFields = [];
|
||||
var num = 0;
|
||||
var amount = 0;
|
||||
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
|
||||
excludeFields.push(this.dataForm.receiptin_item0List[i].licenseno);
|
||||
if (a == this.dataForm.receiptin_item0List[i].licenseno) {
|
||||
this.dataForm.receiptin_item0List[i].licenseno = b.license_num;
|
||||
this.dataForm.receiptin_item0List[i].materialname = b.material_name;
|
||||
this.dataForm.receiptin_item0List[i].reservoirareaId = b.in_area;
|
||||
this.dataForm.receiptin_item0List[i].warehouseId = b.name;
|
||||
this.dataForm.receiptin_item0List[i].num = b.settlement;
|
||||
this.dataForm.receiptin_item0List[i].unit = b.unit;
|
||||
this.dataForm.receiptin_item0List[i].price = b.price;
|
||||
this.dataForm.receiptin_item0List[i].rate = b.rate;
|
||||
this.dataForm.receiptin_item0List[i].amount = b.amount;
|
||||
this.dataForm.receiptin_item0List[i].batchno = b.poundlist_id;
|
||||
this.dataForm.receiptin_item0List[i].poundType = b.pound_type;
|
||||
this.rateOptions.forEach((column, index) => {
|
||||
if(column.id == b.rate){
|
||||
this.dataForm.receiptin_item0List[i].rateamount = b.amount * column.fullName;
|
||||
}
|
||||
}
|
||||
},
|
||||
popupSelect3(j,k){
|
||||
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
|
||||
if (j == this.dataForm.receiptin_item0List[i].reservoirareaId){
|
||||
this.dataForm.receiptin_item0List[i].warehouseId = k.name;
|
||||
});
|
||||
}
|
||||
num = num + parseFloat(this.dataForm.receiptin_item0List[i].num);
|
||||
amount = amount + parseFloat(this.dataForm.receiptin_item0List[i].amount);
|
||||
}
|
||||
this.dataForm.receiptamount = amount;
|
||||
this.dataForm.receiptnum = num;
|
||||
this.excludeFields = excludeFields;
|
||||
},
|
||||
popupSelect3(j, k) {
|
||||
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
|
||||
if (j == this.dataForm.receiptin_item0List[i].reservoirareaId) {
|
||||
this.dataForm.receiptin_item0List[i].warehouseId = k.name;
|
||||
}
|
||||
}
|
||||
},
|
||||
receiptin_item0Exist() {
|
||||
let isOk = true;
|
||||
for (let i = 0; i < this.dataForm.receiptin_item0List.length; i++) {
|
||||
const e = this.dataForm.receiptin_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 if (data[key] instanceof Number) {
|
||||
data[key] = 0;
|
||||
} 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/receiptin/Receiptin/' + this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
});
|
||||
} else {
|
||||
this.clearData(this.dataForm)
|
||||
this.dataForm.receiptamount = 0.0;
|
||||
this.dataForm.receiptnum = 0.0;
|
||||
}
|
||||
});
|
||||
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.receiptin_item0Exist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data = this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/receiptin/Receiptin',
|
||||
method: 'post',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
}
|
||||
},
|
||||
receiptin_item0Exist() {
|
||||
let isOk = true;
|
||||
for(let i=0;i<this.dataForm.receiptin_item0List.length;i++){
|
||||
const e = this.dataForm.receiptin_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/receiptin/Receiptin/'+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.receiptin_item0Exist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data =this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/receiptin/Receiptin',
|
||||
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/receiptin/Receiptin/'+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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
addreceiptin_item0List(){
|
||||
let item = {
|
||||
licenseno:undefined,
|
||||
materialname:undefined,
|
||||
reservoirareaId:undefined,
|
||||
warehouseId:undefined,
|
||||
num:undefined,
|
||||
unit:undefined,
|
||||
price:undefined,
|
||||
rate:undefined,
|
||||
amount:undefined,
|
||||
rateamount:undefined,
|
||||
batchno:undefined,
|
||||
poundType:undefined,
|
||||
}
|
||||
this.dataForm.receiptin_item0List.push(item)
|
||||
},
|
||||
delreceiptin_item0List(index) {
|
||||
this.dataForm.receiptin_item0List.splice(index, 1);
|
||||
},
|
||||
dataList(){
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
for(let i=0;i<_data.receiptin_item0List.length;i++){
|
||||
var _list = _data.receiptin_item0List[i];
|
||||
}
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
for(let i=0;i<_dataAll.receiptin_item0List.length;i++){
|
||||
var _list = _dataAll.receiptin_item0List[i];
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
} else {
|
||||
request({
|
||||
url: '/api/receiptin/Receiptin/' + 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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
addreceiptin_item0List() {
|
||||
let item = {
|
||||
licenseno: undefined,
|
||||
materialname: undefined,
|
||||
reservoirareaId: undefined,
|
||||
warehouseId: undefined,
|
||||
num: undefined,
|
||||
unit: undefined,
|
||||
price: undefined,
|
||||
rate: undefined,
|
||||
amount: undefined,
|
||||
rateamount: undefined,
|
||||
batchno: undefined,
|
||||
poundType: undefined,
|
||||
}
|
||||
this.dataForm.receiptin_item0List.push(item)
|
||||
},
|
||||
delreceiptin_item0List(index) {
|
||||
this.dataForm.receiptin_item0List.splice(index, 1);
|
||||
},
|
||||
dataList() {
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
for (let i = 0; i < _data.receiptin_item0List.length; i++) {
|
||||
var _list = _data.receiptin_item0List[i];
|
||||
}
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
for (let i = 0; i < _dataAll.receiptin_item0List.length; i++) {
|
||||
var _list = _dataAll.receiptin_item0List[i];
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -1,303 +1,380 @@
|
||||
<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="suppliername" label="供应商名称" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="receiptamount" label="入库金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="receiptnum" 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="warehousingdate" label="入库日期" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="souceno" label="来源单号" width="0" align="left"
|
||||
/>
|
||||
<el-table-column label="业务类型" width="0" prop="type" algin="left"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.type | dynamicText(typeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" width="0" align="left"
|
||||
/>
|
||||
<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="creatorTime" label="创建日期" width="0" align="left"
|
||||
/>
|
||||
<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>
|
||||
</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 width="200" align="center" fixed="left" />
|
||||
<el-table-column prop="suppliername" label="供应商名称" sortable width="150" align="center" fixed="left" />
|
||||
<el-table-column prop="receiptamount" label="入库金额" sortable width="120" align="center" />
|
||||
<el-table-column prop="receiptnum" label="入库数量" sortable width="120" align="center" />
|
||||
<el-table-column prop="currency" label="币别" sortable width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehousingdate" sortable label="入库日期" width="120" align="center" />
|
||||
<el-table-column prop="souceno" sortable label="来源单号" width="200" align="center" />
|
||||
<el-table-column prop="type" sortable label="业务类型" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.type | dynamicText(typeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" sortable label="备注" width="120" align="center" />
|
||||
<el-table-column prop="status" sortable label="单据状态" width="120" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status | dynamicText(statusOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorTime" sortable label="创建日期" width="120" align="center" />
|
||||
<el-table-column prop="creatorUserName" sortable label="创建人" width="120" 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: "creatorTime",
|
||||
},
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [
|
||||
{prop: 'documentno', label: '单据编号'},
|
||||
{prop: 'suppliername', label: '供应商名称'},
|
||||
{prop: 'receiptamount', label: '入库金额'},
|
||||
{prop: 'receiptnum', label: '入库数量'},
|
||||
{prop: 'currency', label: '币别'},
|
||||
{prop: 'warehousingdate', label: '入库日期'},
|
||||
{prop: 'souceno', label: '来源单号'},
|
||||
{prop: 'type', label: '业务类型'},
|
||||
{prop: 'remark', label: '备注'},
|
||||
{prop: 'status', label: '单据状态'},
|
||||
{prop: 'creatorTime', label: '创建日期'},
|
||||
{prop: 'creatorUserName', label: '创建人'},
|
||||
],
|
||||
typeOptions:[{"fullName":"采购入库","id":"0"},{"fullName":"购销入库","id":"1"}],
|
||||
typeProps:{"label":"fullName","value":"id"},
|
||||
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
|
||||
currencyProps:{"label":"fullName","value":"id"},
|
||||
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
|
||||
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: "creatorTime",
|
||||
},
|
||||
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/receiptin/Receiptin/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: 'suppliername',
|
||||
label: '供应商名称'
|
||||
},
|
||||
{
|
||||
prop: 'receiptamount',
|
||||
label: '入库金额'
|
||||
},
|
||||
{
|
||||
prop: 'receiptnum',
|
||||
label: '入库数量'
|
||||
},
|
||||
{
|
||||
prop: 'currency',
|
||||
label: '币别'
|
||||
},
|
||||
{
|
||||
prop: 'warehousingdate',
|
||||
label: '入库日期'
|
||||
},
|
||||
{
|
||||
prop: 'souceno',
|
||||
label: '来源单号'
|
||||
},
|
||||
{
|
||||
prop: 'type',
|
||||
label: '业务类型'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '单据状态'
|
||||
},
|
||||
{
|
||||
prop: 'creatorTime',
|
||||
label: '创建日期'
|
||||
},
|
||||
{
|
||||
prop: 'creatorUserName',
|
||||
label: '创建人'
|
||||
},
|
||||
],
|
||||
typeOptions: [{
|
||||
"fullName": "采购入库",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "购销入库",
|
||||
"id": "1"
|
||||
}],
|
||||
typeProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
currencyOptions: [{
|
||||
"fullName": "人民币",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "美元",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "英镑",
|
||||
"id": "2"
|
||||
}],
|
||||
currencyProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
statusOptions: [{
|
||||
"fullName": "已保存",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "审批中",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "已审批",
|
||||
"id": "2"
|
||||
}],
|
||||
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/receiptin/Receiptin/getList`,
|
||||
method: 'post',
|
||||
data: _query
|
||||
}).then(res => {
|
||||
var _list = [];
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
|
||||
10) : '';
|
||||
res.data.list[i].warehousingdate = res.data.list[i].warehousingdate ? res.data.list[i].warehousingdate
|
||||
.substring(0, 10) : '';
|
||||
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/receiptin/Receiptin/${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/receiptin/Receiptin/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/receiptin/Receiptin/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: "creatorTime",
|
||||
}
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDel(id) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/receiptin/Receiptin/${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/receiptin/Receiptin/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/receiptin/Receiptin/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: "creatorTime",
|
||||
}
|
||||
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>
|
||||
|
@ -1,446 +1,574 @@
|
||||
<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-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="type" >
|
||||
<el-select v-model="dataForm.type"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in typeOptions" :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="type">
|
||||
<el-select v-model="dataForm.type" placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in typeOptions" :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="sourceNo" >
|
||||
<popupSelect v-model="dataForm.sourceNo"
|
||||
placeholder="请选择" clearable field="sourceNo" interfaceId="392956668264114117" :columnOptions="sourceNocolumnOptions" propsValue="document_no" relationField="document_no" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
hasPage :pageSize="20" @change="popupSelectChangeSourceNo" >
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="来源单号" prop="sourceNo">
|
||||
<popupSelect v-model="dataForm.sourceNo" placeholder="请选择" clearable field="sourceNo"
|
||||
interfaceId="392956668264114117" :columnOptions="sourceNocolumnOptions" propsValue="document_no"
|
||||
relationField="document_no" popupType="dialog" popupTitle="选择数据" popupWidth="800px" hasPage
|
||||
:pageSize="20" @change="popupSelectChangeSourceNo">
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="出库金额"
|
||||
prop="amount" >
|
||||
<el-input v-model="dataForm.amount"
|
||||
placeholder="请输入出库金额" readonly clearable :style='{"width":"100%"}'>
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出库金额" prop="amount">
|
||||
<el-input v-model="dataForm.amount" placeholder="请输入出库金额" readonly clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</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-input>
|
||||
</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="num" >
|
||||
<el-input v-model="dataForm.num"
|
||||
placeholder="请输入出库数量" readonly clearable :style='{"width":"100%"}'>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出库数量" prop="num">
|
||||
<el-input v-model="dataForm.num" placeholder="请输入出库数量" readonly clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="客户名称"
|
||||
prop="customerName" >
|
||||
<el-input v-model="dataForm.customerName"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-input v-model="dataForm.customerName" 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="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="12" >
|
||||
<el-form-item label="出库日期"
|
||||
prop="issueDate" >
|
||||
<el-date-picker v-model="dataForm.issueDate"
|
||||
placeholder="请选择出库日期" clearable :style='{"width":"100%"}' type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp" >
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="出库日期" prop="issueDate">
|
||||
<el-date-picker v-model="dataForm.issueDate" placeholder="请选择出库日期" clearable :style='{"width":"100%"}'
|
||||
type="datetime" format="yyyy-MM-dd HH:mm:ss" value-format="timestamp">
|
||||
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<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-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<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="activefqhgdj" 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.receiptout_item0List" size='mini' >
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="licenseNo" label="车牌号">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.licenseNo"
|
||||
placeholder="请选择" clearable :field="'licenseNo'+scope.$index" interfaceId="392933248017164229" :bissId="dataForm.sourceNo" :columnOptions="receiptout_item0licenseNocolumnOptions" propsValue="license_num" relationField="license_num" popupType="dialog"
|
||||
popupWidth="800px"
|
||||
hasPage :pageSize="20" @change="popupSelectlicenseNo" >
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="materialName" label="物料名称">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.materialName"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="reservoirareaId" label="库区id">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.reservoirareaId"
|
||||
placeholder="请选择" clearable :field="'reservoirareaId'+scope.$index" interfaceId="392939299932268421" :columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id" relationField="areaname" popupType="dialog"
|
||||
popupWidth="800px" @change="popupSelectChangeReservoirarea"
|
||||
>
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouseId" label="仓库id">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.warehouseId"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deliveryNum" label="出库数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.deliveryNum"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="计量单位">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.unit"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="单价">
|
||||
<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="rate" label="税率">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.rate"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amount" label="金额">
|
||||
<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="rateAmount" label="税额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.rateAmount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="batchNo" label="批次号">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.batchNo"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deleteUserId" label="磅单类型">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.deleteUserId"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in deleteUserIdOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-select>
|
||||
</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="delreceiptout_item0List(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addreceiptout_item0List()">
|
||||
<el-button type="text" icon="el-icon-plus">添加</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane >
|
||||
</el-tabs>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activefqhgdj" 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.receiptout_item0List" size='mini' show-summary :summary-method="getSummaries">
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="licenseNo" width="140" label="车牌号" align="center">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.licenseNo" placeholder="请选择" clearable
|
||||
:field="'licenseNo'+scope.$index" interfaceId="392933248017164229"
|
||||
:bissId="dataForm.sourceNo" :excludeFields="excludeFields" :columnOptions="receiptout_item0licenseNocolumnOptions"
|
||||
propsValue="license_num" relationField="license_num" popupType="dialog" popupWidth="800px"
|
||||
hasPage :pageSize="20" @change="popupSelectlicenseNo">
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="materialName" label="物料名称" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.materialName" placeholder="请输入" clearable :disabled="true">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="reservoirareaId" label="库区名称" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.reservoirareaId" placeholder="请选择" clearable
|
||||
:field="'reservoirareaId'+scope.$index" interfaceId="392939299932268421"
|
||||
:columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id"
|
||||
relationField="areaname" popupType="dialog" popupWidth="800px"
|
||||
@change="popupSelectChangeReservoirarea">
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouseId" label="仓库名称" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.warehouseId" placeholder="请输入" clearable :disabled="true"
|
||||
:style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deliveryNum" label="出库数量" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.deliveryNum" placeholder="请输入" clearable :disabled="true"
|
||||
:style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="计量单位" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.unit" placeholder="请选择" clearable :style='{"width":"100%"}' :disabled="true">
|
||||
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="单价" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.price" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rate" label="税率(%)" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.rate" placeholder="请选择" clearable :style='{"width":"100%"}' :disabled="true">
|
||||
<el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amount" label="金额" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amount" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rateAmount" label="税额" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.rateAmount" placeholder="请输入" clearable :disabled="true"
|
||||
:style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="batchNo" label="批次号" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.batchNo" placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true" >
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="deleteUserId" label="磅单类型" width="140" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.deleteUserId" placeholder="请选择" clearable :disabled="true"
|
||||
:style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in deleteUserIdOptions" :key="index" :label="item.fullName"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</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="delreceiptout_item0List(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addreceiptout_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: {
|
||||
documentNo : '',
|
||||
type : "0",
|
||||
sourceNo : "XS002",
|
||||
amount : '',
|
||||
currency : "0",
|
||||
num : '',
|
||||
customerName : '',
|
||||
remark : '',
|
||||
issueDate : '',
|
||||
status : "0",
|
||||
creatorTime : "",
|
||||
creatorUserName : "",
|
||||
lastModifyTime : "",
|
||||
lastModifyUserName : "",
|
||||
receiptout_item0List:[],
|
||||
},
|
||||
activefqhgdj:'0',
|
||||
rules:
|
||||
{
|
||||
type: [
|
||||
{
|
||||
required: true,
|
||||
message: '请至少选择一个',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
sourceNo: [
|
||||
{
|
||||
required: true,
|
||||
message: '请至少选择一个',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
},
|
||||
typeOptions:[{"fullName":"销售出库","id":"0"},{"fullName":"购销出库","id":"1"}],
|
||||
sourceNocolumnOptions:[ {"label":"单据编号","value":"document_no"}, {"label":"币别","value":"currency"}, {"label":"客户名称","value":"costomer_name"},],
|
||||
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
|
||||
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
|
||||
|
||||
receiptout_item0licenseNocolumnOptions:[ {"label":"车辆号","value":"license_no"}, {"label":"库区名称","value":"out_area"}, {"label":"物料名称","value":"material_name"}, {"label":"出库数量","value":"settlement"}, {"label":"计量单位","value":"unit"}, {"label":"含税单价","value":"unit_price"}, {"label":"税率","value":"rate"}, {"label":"金额","value":"price"}, {"label":"批次号","value":"poundlist_id"}, {"label":"磅单类型","value":"pound_type"},],
|
||||
receiptout_item0reservoirareaIdcolumnOptions:[ {"label":"库区名称","value":"areaname"}, {"label":"最高库存","value":"maximum"}, {"label":"安全库存","value":"safety"}, {"label":"最低库存","value":"minimum"}, {"label":"仓库名称","value":"name"},],
|
||||
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
|
||||
rateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
|
||||
deleteUserIdOptions:[{"fullName":"贸易","id":"0"},{"fullName":"其它","id":"1"}],
|
||||
}
|
||||
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: '',
|
||||
type: "0",
|
||||
sourceNo: "XS002",
|
||||
amount: '',
|
||||
currency: "0",
|
||||
num: '',
|
||||
customerName: '',
|
||||
remark: '',
|
||||
issueDate: '',
|
||||
status: "0",
|
||||
creatorTime: "",
|
||||
creatorUserName: "",
|
||||
lastModifyTime: "",
|
||||
lastModifyUserName: "",
|
||||
receiptout_item0List: [],
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
activefqhgdj: '0',
|
||||
rules: {
|
||||
type: [{
|
||||
required: true,
|
||||
message: '请至少选择一个',
|
||||
trigger: 'change'
|
||||
}, ],
|
||||
sourceNo: [{
|
||||
required: true,
|
||||
message: '请至少选择一个',
|
||||
trigger: 'change'
|
||||
}, ],
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
popupSelectChangeSourceNo(e,d){
|
||||
this.dataForm.customerName = d.costomer_name;
|
||||
this.dataForm.currency = d.currency;
|
||||
},
|
||||
popupSelectlicenseNo(a, b){
|
||||
for (let i = 0; i < this.dataForm.receiptout_item0List.length; i++) {
|
||||
if(a == this.dataForm.receiptout_item0List[i].licenseNo){
|
||||
this.dataForm.receiptout_item0List[i].materialName = b.material_name;
|
||||
this.dataForm.receiptout_item0List[i].deliveryNum = b.settlement;
|
||||
this.dataForm.receiptout_item0List[i].unit = b.unit;
|
||||
this.dataForm.receiptout_item0List[i].price = b.unit_price;
|
||||
this.dataForm.receiptout_item0List[i].rate = b.rate;
|
||||
this.dataForm.receiptout_item0List[i].amount = b.price;
|
||||
this.dataForm.receiptout_item0List[i].batchNo = b.poundlist_id;
|
||||
this.dataForm.receiptout_item0List[i].deleteUserId = b.pound_type;
|
||||
this.dataForm.receiptout_item0List[i].rateAmount = b.price * b.rate;
|
||||
typeOptions: [{
|
||||
"fullName": "销售出库",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "购销出库",
|
||||
"id": "1"
|
||||
}],
|
||||
sourceNocolumnOptions: [{
|
||||
"label": "单据编号",
|
||||
"value": "document_no"
|
||||
}, {
|
||||
"label": "币别",
|
||||
"value": "currencyLabel"
|
||||
}, {
|
||||
"label": "客户名称",
|
||||
"value": "costomer_name"
|
||||
}, ],
|
||||
currencyOptions: [{
|
||||
"fullName": "人民币",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "美元",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "英镑",
|
||||
"id": "2"
|
||||
}],
|
||||
statusOptions: [{
|
||||
"fullName": "已保存",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "审批中",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "已审批",
|
||||
"id": "2"
|
||||
}],
|
||||
|
||||
this.dataForm.receiptout_item0List[i].reservoirareaId = b.out_area;
|
||||
receiptout_item0licenseNocolumnOptions: [{
|
||||
"label": "车辆号",
|
||||
"value": "license_num"
|
||||
}, {
|
||||
"label": "库区名称",
|
||||
"value": "out_area"
|
||||
}, {
|
||||
"label": "物料名称",
|
||||
"value": "material_name"
|
||||
}, {
|
||||
"label": "出库数量",
|
||||
"value": "settlement"
|
||||
}, {
|
||||
"label": "计量单位",
|
||||
"value": "unit"
|
||||
}, {
|
||||
"label": "含税单价",
|
||||
"value": "unit_price"
|
||||
}, {
|
||||
"label": "税率",
|
||||
"value": "rate"
|
||||
}, {
|
||||
"label": "金额",
|
||||
"value": "price"
|
||||
}, {
|
||||
"label": "批次号",
|
||||
"value": "poundlist_id"
|
||||
}, {
|
||||
"label": "磅单类型",
|
||||
"value": "pound_type"
|
||||
}, ],
|
||||
receiptout_item0reservoirareaIdcolumnOptions: [{
|
||||
"label": "库区名称",
|
||||
"value": "areaname"
|
||||
}, {
|
||||
"label": "最高库存",
|
||||
"value": "maximum"
|
||||
}, {
|
||||
"label": "安全库存",
|
||||
"value": "safety"
|
||||
}, {
|
||||
"label": "最低库存",
|
||||
"value": "minimum"
|
||||
}, {
|
||||
"label": "仓库名称",
|
||||
"value": "name"
|
||||
}, ],
|
||||
unitOptions: [{
|
||||
"fullName": "吨",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "千克",
|
||||
"id": "1"
|
||||
}],
|
||||
rateOptions: [{
|
||||
"fullName": "13",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "9",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "6",
|
||||
"id": "2"
|
||||
}, {
|
||||
"fullName": "5",
|
||||
"id": "3"
|
||||
}, {
|
||||
"fullName": "3",
|
||||
"id": "4"
|
||||
}, {
|
||||
"fullName": "0",
|
||||
"id": "5"
|
||||
}],
|
||||
deleteUserIdOptions: [{
|
||||
"fullName": "贸易",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "其它",
|
||||
"id": "1"
|
||||
}],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
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 === 5 || index === 9 || index === 10)) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}
|
||||
},
|
||||
}, 0);
|
||||
} else {
|
||||
sums[index] = '';
|
||||
}
|
||||
});
|
||||
|
||||
popupSelectChangeReservoirarea(a,b){
|
||||
for (let i = 0; i < this.dataForm.receiptout_item0List.length; i++) {
|
||||
if(a == this.dataForm.receiptout_item0List[i].reservoirareaId){
|
||||
this.dataForm.receiptout_item0List[i].warehouseId = b.name;
|
||||
return sums;
|
||||
},
|
||||
popupSelectChangeSourceNo(e, d) {
|
||||
this.dataForm.customerName = d.costomer_name;
|
||||
this.dataForm.currency = d.currency;
|
||||
this.excludeFields = [];
|
||||
this.dataForm.receiptout_item0List = [];
|
||||
},
|
||||
popupSelectlicenseNo(a, b) {
|
||||
var excludeFields = [];
|
||||
var num = 0;
|
||||
var amount = 0;
|
||||
for (let i = 0; i < this.dataForm.receiptout_item0List.length; i++) {
|
||||
excludeFields.push(this.dataForm.receiptout_item0List[i].licenseNo);
|
||||
if (a == this.dataForm.receiptout_item0List[i].licenseNo) {
|
||||
this.dataForm.receiptout_item0List[i].materialName = b.material_name;
|
||||
this.dataForm.receiptout_item0List[i].deliveryNum = b.settlement;
|
||||
this.dataForm.receiptout_item0List[i].unit = b.unit;
|
||||
this.dataForm.receiptout_item0List[i].price = b.unit_price;
|
||||
this.dataForm.receiptout_item0List[i].rate = b.rate;
|
||||
this.dataForm.receiptout_item0List[i].amount = b.price;
|
||||
this.dataForm.receiptout_item0List[i].batchNo = b.poundlist_id;
|
||||
this.dataForm.receiptout_item0List[i].deleteUserId = b.pound_type;
|
||||
this.dataForm.receiptout_item0List[i].rateAmount = b.price * b.rate;
|
||||
this.dataForm.receiptout_item0List[i].reservoirareaId = b.out_area;
|
||||
}
|
||||
num = num + parseFloat(this.dataForm.receiptout_item0List[i].deliveryNum);
|
||||
amount = amount + parseFloat(this.dataForm.receiptout_item0List[i].amount);
|
||||
}
|
||||
this.dataForm.amount = amount;
|
||||
this.dataForm.num = num;
|
||||
this.excludeFields = excludeFields;
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
popupSelectChangeReservoirarea(a, b) {
|
||||
for (let i = 0; i < this.dataForm.receiptout_item0List.length; i++) {
|
||||
if (a == this.dataForm.receiptout_item0List[i].reservoirareaId) {
|
||||
this.dataForm.receiptout_item0List[i].warehouseId = b.name;
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
receiptout_item0Exist() {
|
||||
let isOk = true;
|
||||
for(let i=0;i<this.dataForm.receiptout_item0List.length;i++){
|
||||
const e = this.dataForm.receiptout_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/example/Receiptout/'+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.receiptout_item0Exist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data =this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/example/Receiptout',
|
||||
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/example/Receiptout/'+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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
addreceiptout_item0List(){
|
||||
let item = {
|
||||
licenseNo:undefined,
|
||||
materialName:undefined,
|
||||
reservoirareaId:undefined,
|
||||
warehouseId:undefined,
|
||||
deliveryNum:undefined,
|
||||
unit:undefined,
|
||||
price:undefined,
|
||||
rate:undefined,
|
||||
amount:undefined,
|
||||
rateAmount:undefined,
|
||||
batchNo:undefined,
|
||||
deleteUserId:undefined,
|
||||
}
|
||||
this.dataForm.receiptout_item0List.push(item)
|
||||
},
|
||||
delreceiptout_item0List(index) {
|
||||
this.dataForm.receiptout_item0List.splice(index, 1);
|
||||
},
|
||||
dataList(){
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
for(let i=0;i<_data.receiptout_item0List.length;i++){
|
||||
var _list = _data.receiptout_item0List[i];
|
||||
}
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
for(let i=0;i<_dataAll.receiptout_item0List.length;i++){
|
||||
var _list = _dataAll.receiptout_item0List[i];
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
receiptout_item0Exist() {
|
||||
let isOk = true;
|
||||
for (let i = 0; i < this.dataForm.receiptout_item0List.length; i++) {
|
||||
const e = this.dataForm.receiptout_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 if (data[key] instanceof Number) {
|
||||
data[key] = 0;
|
||||
} 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/example/Receiptout/' + this.dataForm.id,
|
||||
method: 'get'
|
||||
}).then(res => {
|
||||
this.dataInfo(res.data)
|
||||
this.loading = false
|
||||
});
|
||||
} else {
|
||||
this.clearData(this.dataForm)
|
||||
this.dataForm.amount = 0.0;
|
||||
this.dataForm.num = 0.0;
|
||||
}
|
||||
});
|
||||
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.receiptout_item0Exist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data = this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/example/Receiptout',
|
||||
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/example/Receiptout/' + 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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
addreceiptout_item0List() {
|
||||
let item = {
|
||||
licenseNo: undefined,
|
||||
materialName: undefined,
|
||||
reservoirareaId: undefined,
|
||||
warehouseId: undefined,
|
||||
deliveryNum: undefined,
|
||||
unit: undefined,
|
||||
price: undefined,
|
||||
rate: undefined,
|
||||
amount: undefined,
|
||||
rateAmount: undefined,
|
||||
batchNo: undefined,
|
||||
deleteUserId: undefined,
|
||||
}
|
||||
this.dataForm.receiptout_item0List.push(item)
|
||||
},
|
||||
delreceiptout_item0List(index) {
|
||||
this.dataForm.receiptout_item0List.splice(index, 1);
|
||||
},
|
||||
dataList() {
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
for (let i = 0; i < _data.receiptout_item0List.length; i++) {
|
||||
var _list = _data.receiptout_item0List[i];
|
||||
}
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
for (let i = 0; i < _dataAll.receiptout_item0List.length; i++) {
|
||||
var _list = _dataAll.receiptout_item0List[i];
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -1,309 +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.type" placeholder="请选择"
|
||||
clearable>
|
||||
<el-option v-for="(item, index) in typeOptions" :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 label="客户名称">
|
||||
<el-input v-model="query.customerName" 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>
|
||||
</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 prop="amount" 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="issueDate" label="出库日期" width="0" align="left"
|
||||
sortable="custom" />
|
||||
<el-table-column prop="sourceNo" label="来源单号" width="0" align="left"
|
||||
/>
|
||||
<el-table-column label="业务类型" width="0" prop="type" algin="left"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.type | dynamicText(typeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" width="0" align="left"
|
||||
/>
|
||||
<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="creatorTime" label="创建时间" width="0" align="left"
|
||||
/>
|
||||
<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.type" placeholder="请选择" clearable>
|
||||
<el-option v-for="(item, index) in typeOptions" :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 label="客户名称">
|
||||
<el-input v-model="query.customerName" 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>
|
||||
</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="单据编号" width="200" sortable align="center" fixed="left" />
|
||||
<el-table-column prop="customerName" label="客户名称" width="150" sortable align="center" fixed="left" />
|
||||
<el-table-column prop="amount" label="出库金额" width="120" sortable align="center" />
|
||||
<el-table-column prop="num" label="出库数量" width="120" sortable 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="issueDate" label="出库日期" width="120" sortable align="center" sortable="custom" />
|
||||
<el-table-column prop="sourceNo" label="来源单号" width="200" sortable align="center" />
|
||||
<el-table-column label="业务类型" width="120" sortable prop="type" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.type | dynamicText(typeOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注" width="120" sortable align="center" />
|
||||
<el-table-column label="单据状态" width="120" sortable prop="status" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status | dynamicText(statusOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorTime" label="创建时间" width="120" sortable align="center" />
|
||||
<el-table-column prop="creatorUserName" label="创建人名称" width="120" sortable 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,
|
||||
type:undefined,
|
||||
customerName: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: 'amount', label: '出库金额'},
|
||||
{prop: 'num', label: '出库数量'},
|
||||
{prop: 'currency', label: '币别'},
|
||||
{prop: 'issueDate', label: '出库日期'},
|
||||
{prop: 'sourceNo', label: '来源单号'},
|
||||
{prop: 'type', label: '业务类型'},
|
||||
{prop: 'remark', label: '备注'},
|
||||
{prop: 'status', label: '单据状态'},
|
||||
{prop: 'creatorTime', label: '创建时间'},
|
||||
{prop: 'creatorUserName', label: '创建人名称'},
|
||||
],
|
||||
typeOptions:[{"fullName":"销售出库","id":"0"},{"fullName":"购销出库","id":"1"}],
|
||||
typeProps:{"label":"fullName","value":"id"},
|
||||
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
|
||||
currencyProps:{"label":"fullName","value":"id"},
|
||||
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
|
||||
statusProps:{"label":"fullName","value":"id"},
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
JNPFForm,
|
||||
ExportBox,
|
||||
Detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detailVisible: false,
|
||||
query: {
|
||||
documentNo: undefined,
|
||||
type: undefined,
|
||||
customerName: 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/example/Receiptout/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: 'amount',
|
||||
label: '出库金额'
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
label: '出库数量'
|
||||
},
|
||||
{
|
||||
prop: 'currency',
|
||||
label: '币别'
|
||||
},
|
||||
{
|
||||
prop: 'issueDate',
|
||||
label: '出库日期'
|
||||
},
|
||||
{
|
||||
prop: 'sourceNo',
|
||||
label: '来源单号'
|
||||
},
|
||||
{
|
||||
prop: 'type',
|
||||
label: '业务类型'
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '单据状态'
|
||||
},
|
||||
{
|
||||
prop: 'creatorTime',
|
||||
label: '创建时间'
|
||||
},
|
||||
{
|
||||
prop: 'creatorUserName',
|
||||
label: '创建人名称'
|
||||
},
|
||||
],
|
||||
typeOptions: [{
|
||||
"fullName": "销售出库",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "购销出库",
|
||||
"id": "1"
|
||||
}],
|
||||
typeProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
currencyOptions: [{
|
||||
"fullName": "人民币",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "美元",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "英镑",
|
||||
"id": "2"
|
||||
}],
|
||||
currencyProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
statusOptions: [{
|
||||
"fullName": "已保存",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "审批中",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "已审批",
|
||||
"id": "2"
|
||||
}],
|
||||
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/example/Receiptout/getList`,
|
||||
method: 'post',
|
||||
data: _query
|
||||
}).then(res => {
|
||||
var _list = [];
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
|
||||
10) : '';
|
||||
res.data.list[i].issueDate = res.data.list[i].issueDate ? res.data.list[i].issueDate
|
||||
.substring(0, 10) : '';
|
||||
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/example/Receiptout/${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/example/Receiptout/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/example/Receiptout/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/example/Receiptout/${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/example/Receiptout/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/example/Receiptout/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