parent
8327a16bc0
commit
21d2a029e1
@ -1,516 +1,409 @@
|
||||
<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="请输入" clearable :style='{"width":"100%"}' :disabled="true">
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="业务日期"
|
||||
prop="businessDate" >
|
||||
<el-date-picker v-model="dataForm.businessDate"
|
||||
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="businessDate">
|
||||
<el-date-picker v-model="dataForm.businessDate"
|
||||
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="customerName">
|
||||
<el-input v-model="dataForm.customerName"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="金额"
|
||||
prop="amount" >
|
||||
<el-input-number v-model="dataForm.amount"
|
||||
placeholder="数字文本" :step="1" >
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="金额"
|
||||
prop="amount">
|
||||
<el-input v-model="dataForm.amount "
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
|
||||
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="数量"
|
||||
prop="quantity" >
|
||||
<el-input-number v-model="dataForm.quantity"
|
||||
placeholder="数字文本" :step="1" >
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品数量"
|
||||
prop="quantity">
|
||||
<el-input v-model="dataForm.quantity"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
|
||||
|
||||
</el-input-number>
|
||||
</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="invoiceQuantity">
|
||||
<el-input v-model="dataForm.invoiceQuantity"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="备注"
|
||||
prop="remark" >
|
||||
<el-input v-model="dataForm.remark"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="客户税号"
|
||||
prop="customerTaxNo">
|
||||
<el-input v-model="dataForm.customerTaxNo"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
|
||||
|
||||
</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="customerAddress">
|
||||
<el-input v-model="dataForm.customerAddress"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="发票金额"
|
||||
prop="invoiceAmount" >
|
||||
<el-input-number v-model="dataForm.invoiceAmount"
|
||||
placeholder="数字文本" :step="1" >
|
||||
</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%"}' :disabled="true">
|
||||
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id"
|
||||
:disabled="item.disabled"></el-option>
|
||||
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="发票数量"
|
||||
prop="invoiceQuantity" >
|
||||
<el-input-number v-model="dataForm.invoiceQuantity"
|
||||
placeholder="数字文本" :step="1" >
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注"
|
||||
prop="remark">
|
||||
<el-input v-model="dataForm.remark"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="销售订单号"
|
||||
prop="salesOrderId" >
|
||||
<popupSelect v-model="dataForm.salesOrderId"
|
||||
placeholder="请选择" clearable field="salesOrderId" interfaceId="398359995269352069" :columnOptions="salesOrderIdcolumnOptions" propsValue="id" relationField="document_no" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="发票金额"
|
||||
prop="invoiceAmount">
|
||||
<el-input v-model="dataForm.invoiceAmount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' :disabled="true">
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="合同名称"
|
||||
prop="contractId" >
|
||||
<popupSelect v-model="dataForm.contractId"
|
||||
placeholder="请选择" clearable field="contractId" interfaceId="398361758806411909" :columnOptions="contractIdcolumnOptions" propsValue="id" relationField="contract_name" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="销售订单号"
|
||||
prop="salesOrderNo">
|
||||
<el-input v-model="dataForm.salesOrderNo"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="客户"
|
||||
prop="customerId" >
|
||||
<popupSelect v-model="dataForm.customerId"
|
||||
placeholder="请选择" clearable field="customerId" interfaceId="398362084892576389" :columnOptions="customerIdcolumnOptions" propsValue="id" relationField="supplier_nm" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="合同名称"
|
||||
prop="contractName">
|
||||
<el-input v-model="dataForm.contractName"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activezbtwpv" 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.arinvoices_item1List" size='mini' >
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="materialId" label="物料">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.materialId"
|
||||
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="397736371898382533" :columnOptions="arinvoices_item1materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
|
||||
popupWidth="800px"
|
||||
>
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="quantity" label="数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.quantity"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unitPrice" label="单价">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.unitPrice"
|
||||
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="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="taxRate" label="税率 ">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.taxRate"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taxAmount" label="税额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxAmount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amountNotTax" label="不含税金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amountNotTax"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注信息">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.remark"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</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="delarinvoices_item1List(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addarinvoices_item1List()">
|
||||
<el-button type="text" icon="el-icon-plus">添加</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane >
|
||||
<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.arinvoices_item0List" size='mini' >
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="invoiceCode" label="发票代码">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.invoiceCode"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoiceNo" label="发票号码">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.invoiceNo"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoiceQuantity" label="发票数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.invoiceQuantity"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="involceAmount" label="发票金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.involceAmount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taxRate" label="税率 ">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.taxRate"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taxAmount" label="税额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxAmount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amountNotTax" label="不含税金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amountNotTax"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoiceStatus" label="发票状态">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.invoiceStatus"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in invoiceStatusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-select>
|
||||
</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="invoiceDate" label="开票日期">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.invoiceDate"
|
||||
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="delarinvoices_item0List(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addarinvoices_item0List()">
|
||||
<el-button type="text" icon="el-icon-plus">添加</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane >
|
||||
</el-tabs>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单据状态 "
|
||||
prop="status">
|
||||
<el-select v-model="dataForm.status"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
|
||||
:disabled="item.disabled"></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="制单人"
|
||||
prop="creatorUserName">
|
||||
<el-input v-model="dataForm.creatorUserName"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activewkrlwe" tab-position="top" class="mb-20">
|
||||
<el-tab-pane label="应收明细">
|
||||
</el-tab-pane>
|
||||
<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.arinvoices_item0List" size='mini'>
|
||||
<el-table-column type="index" width="50" label="序号" align="center"/>
|
||||
<el-table-column prop="invoiceCode" label="发票代码">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.invoiceCode"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoiceNo" label="发票号码">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.invoiceNo"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taxRate" label="税率 ">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.taxRate"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName"
|
||||
:value="item.id" :disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taxAmount" label="税额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxAmount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amountNotTax" label="不含税金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amountNotTax"
|
||||
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="remark" label="备注信息">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.remark"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</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="delarinvoices_item0List(scope.$index)">删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addarinvoices_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>
|
||||
</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 : '',
|
||||
businessDate : '',
|
||||
amount : 0,
|
||||
quantity : 0,
|
||||
currency : "0",
|
||||
remark : '',
|
||||
status : "0",
|
||||
invoiceAmount : 0,
|
||||
invoiceQuantity : 0,
|
||||
salesOrderId : "",
|
||||
contractId : "",
|
||||
customerId : "",
|
||||
arinvoices_item1List:[],
|
||||
arinvoices_item0List:[],
|
||||
},
|
||||
activezbtwpv:'0',
|
||||
rules:
|
||||
{
|
||||
},
|
||||
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
|
||||
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
|
||||
salesOrderIdcolumnOptions:[ {"label":"销售订单号","value":"document_no"}, {"label":"合同","value":"contractName"}, {"label":"客户名称","value":"supplier_nm"}, {"label":"金额","value":"price"}, {"label":"数量","value":"num"},],
|
||||
contractIdcolumnOptions:[ {"label":"合同编码","value":"contract_code"}, {"label":"合同名称","value":"contract_name"},],
|
||||
customerIdcolumnOptions:[ {"label":"客户编码","value":"supplier_cd"}, {"label":"客户名称","value":"supplier_nm"}, {"label":"地址","value":"address"},],
|
||||
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
|
||||
arinvoices_item1materialIdcolumnOptions:[ {"label":"物料编码","value":"item_code"}, {"label":"物料名称","value":"item_name"}, {"label":"单位","value":"primary_unit_of_measure"}, {"label":"可采购","value":"purchase_flag_name"}, {"label":"可销售","value":"sales_flag_name"},],
|
||||
taxRateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
|
||||
taxRateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
|
||||
invoiceStatusOptions:[{"fullName":"正常","id":"0"},{"fullName":"红冲","id":"1"},{"fullName":"作废","id":"2"}],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
arinvoices_item1Exist() {
|
||||
let isOk = true;
|
||||
for(let i=0;i<this.dataForm.arinvoices_item1List.length;i++){
|
||||
const e = this.dataForm.arinvoices_item1List[i];
|
||||
}
|
||||
return isOk;
|
||||
},
|
||||
arinvoices_item0Exist() {
|
||||
let isOk = true;
|
||||
for(let i=0;i<this.dataForm.arinvoices_item0List.length;i++){
|
||||
const e = this.dataForm.arinvoices_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/arinvoices/Arinvoices/'+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.arinvoices_item1Exist()) return
|
||||
if (!this.arinvoices_item0Exist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data =this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/arinvoices/Arinvoices',
|
||||
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/arinvoices/Arinvoices/'+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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
addarinvoices_item1List(){
|
||||
let item = {
|
||||
materialId:undefined,
|
||||
quantity:undefined,
|
||||
unitPrice:undefined,
|
||||
amount:undefined,
|
||||
taxRate:undefined,
|
||||
taxAmount:undefined,
|
||||
amountNotTax:undefined,
|
||||
remark:undefined,
|
||||
}
|
||||
this.dataForm.arinvoices_item1List.push(item)
|
||||
},
|
||||
delarinvoices_item1List(index) {
|
||||
this.dataForm.arinvoices_item1List.splice(index, 1);
|
||||
},
|
||||
addarinvoices_item0List(){
|
||||
let item = {
|
||||
invoiceCode:undefined,
|
||||
invoiceNo:undefined,
|
||||
invoiceQuantity:undefined,
|
||||
involceAmount:undefined,
|
||||
taxRate:undefined,
|
||||
taxAmount:undefined,
|
||||
amountNotTax:undefined,
|
||||
invoiceStatus:undefined,
|
||||
creatorUserName:undefined,
|
||||
invoiceDate:undefined,
|
||||
}
|
||||
this.dataForm.arinvoices_item0List.push(item)
|
||||
},
|
||||
delarinvoices_item0List(index) {
|
||||
this.dataForm.arinvoices_item0List.splice(index, 1);
|
||||
},
|
||||
dataList(){
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
for(let i=0;i<_data.arinvoices_item1List.length;i++){
|
||||
var _list = _data.arinvoices_item1List[i];
|
||||
}
|
||||
for(let i=0;i<_data.arinvoices_item0List.length;i++){
|
||||
var _list = _data.arinvoices_item0List[i];
|
||||
}
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
for(let i=0;i<_dataAll.arinvoices_item1List.length;i++){
|
||||
var _list = _dataAll.arinvoices_item1List[i];
|
||||
}
|
||||
for(let i=0;i<_dataAll.arinvoices_item0List.length;i++){
|
||||
var _list = _dataAll.arinvoices_item0List[i];
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
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: '',
|
||||
businessDate: '',
|
||||
customerName: '',
|
||||
amount: '',
|
||||
quantity: '',
|
||||
invoiceQuantity: '',
|
||||
customerTaxNo: '',
|
||||
customerAddress: '',
|
||||
currency: '0',
|
||||
remark: '',
|
||||
invoiceAmount: '',
|
||||
salesOrderNo: '',
|
||||
contractName: '',
|
||||
status: '0',
|
||||
creatorUserName: '',
|
||||
arinvoices_item0List: []
|
||||
},
|
||||
activewkrlwe: '1',
|
||||
rules:
|
||||
{},
|
||||
currencyOptions: [{ 'fullName': '人民币', 'id': '0' }, { 'fullName': '美元', 'id': '1' }, {
|
||||
'fullName': '英镑',
|
||||
'id': '2'
|
||||
}],
|
||||
statusOptions: [{ 'fullName': '已保存', 'id': '0' }, { 'fullName': '审批中', 'id': '1' }, {
|
||||
'fullName': '已审批',
|
||||
'id': '2'
|
||||
}],
|
||||
|
||||
taxRateOptions: [{ 'fullName': '13', 'id': '0' }, { 'fullName': '9', 'id': '1' }, {
|
||||
'fullName': '6',
|
||||
'id': '2'
|
||||
}, { 'fullName': '5', 'id': '3' }, { 'fullName': '3', 'id': '4' }, { 'fullName': '0', 'id': '5' }]
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
arinvoices_item0Exist() {
|
||||
let isOk = true
|
||||
for (let i = 0; i < this.dataForm.arinvoices_item0List.length; i++) {
|
||||
const e = this.dataForm.arinvoices_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/arinvoices/Arinvoices/' + 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.arinvoices_item0Exist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data = this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/arinvoices/Arinvoices',
|
||||
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/arinvoices/Arinvoices/' + 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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
addarinvoices_item0List() {
|
||||
let item = {
|
||||
invoiceCode: undefined,
|
||||
invoiceNo: undefined,
|
||||
taxRate: undefined,
|
||||
taxAmount: undefined,
|
||||
amountNotTax: undefined,
|
||||
creatorUserName: undefined
|
||||
}
|
||||
this.dataForm.arinvoices_item0List.push(item)
|
||||
},
|
||||
delarinvoices_item0List(index) {
|
||||
this.dataForm.arinvoices_item0List.splice(index, 1)
|
||||
},
|
||||
dataList() {
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm))
|
||||
for (let i = 0; i < _data.arinvoices_item0List.length; i++) {
|
||||
var _list = _data.arinvoices_item0List[i]
|
||||
}
|
||||
return _data
|
||||
},
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
for (let i = 0; i < _dataAll.arinvoices_item0List.length; i++) {
|
||||
var _list = _dataAll.arinvoices_item0List[i]
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -1,295 +1,317 @@
|
||||
<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-date-picker v-model="query.businessDate" type="daterange"
|
||||
value-format="timestamp" format="yyyy-MM-dd" start-placeholder="开始日期"
|
||||
end-placeholder="结束日期" >
|
||||
</el-date-picker>
|
||||
</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" border>
|
||||
<el-table-column prop="businessDate" label="业务日期" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="documentNo" label="单据编号" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="customerId" label="客户" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="amount" label="金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="quantity" 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="invoiceAmount" label="发票金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="invoiceQuantity" label="发票数量" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="salesOrderId" label="销售订单号" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="contractId" 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="remark" label="备注" width="0" align="left"
|
||||
/>
|
||||
<el-table-column label="操作" fixed="right"
|
||||
width="150" >
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text"
|
||||
@click="addOrUpdateHandle(scope.row.id)" >编辑
|
||||
</el-button>
|
||||
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
||||
</el-button>
|
||||
<el-button type="text"
|
||||
@click="goDetail(scope.row.id)">详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
|
||||
</div>
|
||||
<div class="JNPF-common-layout-center">
|
||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||
<el-form @submit.native.prevent>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单据编号">
|
||||
<el-input v-model="query.documentNo" placeholder="请输入" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div class="JNPF-common-layout-main JNPF-flex-main">
|
||||
<div class="JNPF-common-head">
|
||||
<div>
|
||||
<el-button type="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="text" icon="el-icon-plus" @click="1">编辑
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-plus" @click="1">查看
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-plus" @click="1">审核
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-plus" @click="1">弃审
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-plus" @click="1">提交
|
||||
</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="customerName" label="客户名称" sortable width="150" align="center" fixed="left"
|
||||
/>
|
||||
<el-table-column prop="amount" label="金额" width="120" sortable align="center"
|
||||
/>
|
||||
<el-table-column prop="quantity" 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="invoiceAmount" label="发票金额" sortable width="120" align="center"
|
||||
/>
|
||||
<el-table-column prop="invoiceQuantity" label="发票数量" sortable width="120" align="center"
|
||||
/>
|
||||
<el-table-column prop="salesOrderNo" label="销售订单号" sortable width="200" align="center"
|
||||
/>
|
||||
<el-table-column prop="contractName" label="合同名称" sortable width="200" 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="creatorUserName" label="制单人" width="120" sortable align="center"
|
||||
/>
|
||||
<el-table-column label="操作" fixed="right" align="center"
|
||||
width="200">
|
||||
<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>-->
|
||||
<el-button type="text"
|
||||
@click="goDetail">撤回申请
|
||||
</el-button>
|
||||
<el-button type="text"
|
||||
@click="goDetail">审核
|
||||
</el-button>
|
||||
<el-button type="text"
|
||||
@click="goDetail">弃审
|
||||
</el-button>
|
||||
<el-button type="text"
|
||||
@click="goDetail">提交
|
||||
</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,
|
||||
businessDate: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: 'businessDate', label: '业务日期'},
|
||||
{prop: 'documentNo', label: '单据编号'},
|
||||
{prop: 'customerId', label: '客户'},
|
||||
{prop: 'amount', label: '金额'},
|
||||
{prop: 'quantity', label: '数量'},
|
||||
{prop: 'currency', label: '币别 '},
|
||||
{prop: 'invoiceAmount', label: '发票金额'},
|
||||
{prop: 'invoiceQuantity', label: '发票数量'},
|
||||
{prop: 'salesOrderId', label: '销售订单号'},
|
||||
{prop: 'contractId', label: '合同名称'},
|
||||
{prop: 'status', label: '单据状态 '},
|
||||
{prop: 'remark', label: '备注'},
|
||||
],
|
||||
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
|
||||
},
|
||||
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/arinvoices/Arinvoices/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: 'quantity', label: '数量' },
|
||||
{ prop: 'currency', label: '币别 ' },
|
||||
{ prop: 'invoiceAmount', label: '发票金额' },
|
||||
{ prop: 'invoiceQuantity', label: '发票数量' },
|
||||
{ prop: 'salesOrderNo', label: '销售订单号' },
|
||||
{ prop: 'contractName', label: '合同名称' },
|
||||
{ prop: 'status', label: '单据状态 ' },
|
||||
{ prop: 'creatorUserName', label: '制单人' }
|
||||
],
|
||||
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/arinvoices/Arinvoices/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/arinvoices/Arinvoices/${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/arinvoices/Arinvoices/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/arinvoices/Arinvoices/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/arinvoices/Arinvoices/${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/arinvoices/Arinvoices/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/arinvoices/Arinvoices/Actions/Export`,
|
||||
method: 'GET',
|
||||
data: query
|
||||
}).then(res => {
|
||||
if (!res.data.url) return
|
||||
this.jnpf.downloadFile(res.data.url)
|
||||
this.$refs.ExportBox.visible = false
|
||||
this.exportBoxVisible = false
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.listQuery = {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: 'desc',
|
||||
sidx: ''
|
||||
}
|
||||
this.initData()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,419 +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="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="业务类型" 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="salesId" >
|
||||
<popupSelect v-model="dataForm.salesId"
|
||||
placeholder="请选择" clearable field="salesId" interfaceId="392956668264114117" :columnOptions="salesIdcolumnOptions" propsValue="id" relationField="document_no" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
hasPage :pageSize="20" >
|
||||
</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="customerId" >
|
||||
<popupSelect v-model="dataForm.customerId"
|
||||
placeholder="请选择" clearable field="customerId" interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id" relationField="supplier_nm" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
hasPage :pageSize="20" >
|
||||
</popupSelect>
|
||||
</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="customerName">
|
||||
<el-input v-model="dataForm.customerName" 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="date" format="yyyy-MM-dd" value-format="timestamp" >
|
||||
</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-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-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-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activezlqlfb" 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="vehicleId" label="车牌号">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.vehicleId"
|
||||
placeholder="请选择" clearable :field="'vehicleId'+scope.$index" interfaceId="398732963950472005" :columnOptions="receiptout_item0vehicleIdcolumnOptions" propsValue="id" relationField="ticketno" popupType="dialog"
|
||||
popupWidth="800px"
|
||||
hasPage :pageSize="20" >
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="materialId" label="物料名称">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.materialId"
|
||||
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="398719564478785669" :columnOptions="receiptout_item0materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
|
||||
popupWidth="800px"
|
||||
>
|
||||
</popupSelect>
|
||||
</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="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id" relationField="areaname" popupType="dialog"
|
||||
popupWidth="800px"
|
||||
>
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouseId" label="仓库名称">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.warehouseId"
|
||||
placeholder="请选择" clearable :field="'reservoirareaId'+scope.$index" interfaceId="399117969575232581" :columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id" relationField="name" popupType="dialog"
|
||||
popupWidth="800px">
|
||||
</popupSelect>
|
||||
</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="poundType" label="磅单类型">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.poundType"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<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="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-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' 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",
|
||||
salesId : "XS002",
|
||||
amount : '',
|
||||
currency : "0",
|
||||
num : '',
|
||||
customerId : '',
|
||||
remark : '',
|
||||
issueDate : '',
|
||||
status : "0",
|
||||
creatorTime : "",
|
||||
creatorUserName : "",
|
||||
lastModifyTime : "",
|
||||
lastModifyUserName : "",
|
||||
receiptout_item0List:[],
|
||||
},
|
||||
activezlqlfb:'0',
|
||||
rules:
|
||||
{
|
||||
type: [
|
||||
{
|
||||
required: true,
|
||||
message: '请至少选择一个',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
salesId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请至少选择一个',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
},
|
||||
typeOptions:[{"fullName":"销售出库","id":"0"},{"fullName":"购销出库","id":"1"}],
|
||||
salesIdcolumnOptions:[ {"label":"单据编号","value":"document_no"}, {"label":"币别","value":"currency"}, {"label":"客户名称","value":"customer_name"},],
|
||||
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
|
||||
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
|
||||
|
||||
receiptout_item0vehicleIdcolumnOptions:[ {"label":"车辆号","value":"ticketno"}, {"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_item0materialIdcolumnOptions:[ {"label":"物料编码","value":"item_code"}, {"label":"物料名称","value":"item_name"}, {"label":"单位","value":"primary_unit_of_measure"}, {"label":"默认入库区","value":"in_area"}, {"label":"默认出库区","value":"out_area"},],
|
||||
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"}],
|
||||
poundTypeOptions:[{"fullName":"贸易","id":"0"},{"fullName":"自加工","id":"1"},{"fullName":"委外","id":"2"},{"fullName":"倒运","id":"3"}],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
import request from '@/utils/request'
|
||||
import {
|
||||
getDataInterfaceRes
|
||||
} from '@/api/systemData/dataInterface'
|
||||
import {
|
||||
getDictionaryDataSelector
|
||||
} from '@/api/systemData/dictionary'
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
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: [],
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
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/receipout/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/receipout/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/receipout/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 = {
|
||||
vehicleId:undefined,
|
||||
materialId:undefined,
|
||||
reservoirareaId:undefined,
|
||||
warehouseId:undefined,
|
||||
deliveryNum:undefined,
|
||||
unit:undefined,
|
||||
price:undefined,
|
||||
rate:undefined,
|
||||
amount:undefined,
|
||||
rateAmount:undefined,
|
||||
batchNo:undefined,
|
||||
poundType: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
|
||||
},
|
||||
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": "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"
|
||||
}],
|
||||
|
||||
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] = '';
|
||||
}
|
||||
});
|
||||
|
||||
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 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,303 +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>
|
||||
<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" border>
|
||||
<el-table-column prop="documentNo" label="单据编号" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="customerId" 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="salesId" 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,
|
||||
},
|
||||
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: 'customerId', label: '客户名称'},
|
||||
{prop: 'amount', label: '出库金额'},
|
||||
{prop: 'num', label: '出库数量'},
|
||||
{prop: 'currency', label: '币别'},
|
||||
{prop: 'issueDate', label: '出库日期'},
|
||||
{prop: 'salesId', 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/receipout/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/receipout/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/receipout/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/receipout/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>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,562 +0,0 @@
|
||||
<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-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="业务日期"
|
||||
prop="businessDate" >
|
||||
<el-date-picker v-model="dataForm.businessDate"
|
||||
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="amount" >
|
||||
<el-input-number v-model="dataForm.amount"
|
||||
placeholder="数字文本" :step="1" >
|
||||
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="数量"
|
||||
prop="quantity" >
|
||||
<el-input-number v-model="dataForm.quantity"
|
||||
placeholder="数字文本" :step="1" >
|
||||
|
||||
</el-input-number>
|
||||
</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="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" disabled></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="发票金额"
|
||||
prop="invoiceAmount" >
|
||||
<el-input-number v-model="dataForm.invoiceAmount"
|
||||
placeholder="数字文本" :step="1" >
|
||||
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="发票数量"
|
||||
prop="invoiceQuantity" >
|
||||
<el-input-number v-model="dataForm.invoiceQuantity"
|
||||
placeholder="数字文本" :step="1" >
|
||||
|
||||
</el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="销售订单号"
|
||||
prop="salesOrderId" >
|
||||
<popupSelect v-model="dataForm.salesOrderId"
|
||||
placeholder="请选择" clearable field="salesOrderId" interfaceId="398359995269352069" :columnOptions="salesOrderIdcolumnOptions" propsValue="id" relationField="document_no" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
>
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="合同名称"
|
||||
prop="contractId" >
|
||||
<popupSelect v-model="dataForm.contractId"
|
||||
placeholder="请选择" clearable field="contractId" interfaceId="398361758806411909" :columnOptions="contractIdcolumnOptions" propsValue="id" relationField="contract_name" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
>
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="客户"
|
||||
prop="customerId" >
|
||||
<popupSelect v-model="dataForm.customerId"
|
||||
placeholder="请选择" clearable field="customerId" interfaceId="398362084892576389" :columnOptions="customerIdcolumnOptions" propsValue="id" relationField="supplier_nm" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
>
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activezbtwpv" 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.arinvoices_item1List" size='mini' >
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="materialId" label="物料">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.materialId"
|
||||
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="397736371898382533" :columnOptions="arinvoices_item1materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
|
||||
popupWidth="800px" disabled
|
||||
>
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="quantity" label="数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.quantity"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unitPrice" label="单价">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.unitPrice"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
|
||||
</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%"}' disabled>
|
||||
<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="amount" label="金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taxRate" label="税率 ">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.taxRate"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}' disabled @change="computeAmount">
|
||||
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taxAmount" label="税额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxAmount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amountNotTax" label="不含税金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amountNotTax"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="remark" label="备注信息">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.remark"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
|
||||
</el-input>
|
||||
</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="delarinvoices_item1List(scope.$index)" disabled>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addarinvoices_item1List()">
|
||||
<el-button type="text" icon="el-icon-plus" disabled>添加</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane >
|
||||
<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.arinvoices_item0List" size='mini' >
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="invoiceCode" label="发票代码">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.invoiceCode"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoiceNo" label="发票号码">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.invoiceNo"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoiceQuantity" label="发票数量">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.invoiceQuantity"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' @change="invoiceQuantitySum">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="involceAmount" label="发票金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.involceAmount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' @change="involceAmountSum">
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taxRate" label="税率 ">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.taxRate"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}' @change="rateCompute">
|
||||
<el-option v-for="(item, index) in taxRateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="taxAmount" label="税额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.taxAmount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amountNotTax" label="不含税金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amountNotTax"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="invoiceStatus" label="发票状态">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.invoiceStatus"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in invoiceStatusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
</el-select>
|
||||
</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="invoiceDate" label="开票日期">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.invoiceDate"
|
||||
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="delarinvoices_item0List(scope.$index)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addarinvoices_item0List()">
|
||||
<el-button type="text" icon="el-icon-plus">添加</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane >
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false"> 取 消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> 确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
isDetail: false,
|
||||
dataForm: {
|
||||
documentNo : '',
|
||||
businessDate : '',
|
||||
amount : 0,
|
||||
quantity : 0,
|
||||
currency : "0",
|
||||
remark : '',
|
||||
status : "0",
|
||||
invoiceAmount : 0,
|
||||
invoiceQuantity : 0,
|
||||
salesOrderId : "",
|
||||
contractId : "",
|
||||
customerId : "",
|
||||
arinvoices_item1List:[],
|
||||
arinvoices_item0List:[],
|
||||
},
|
||||
activezbtwpv:'0',
|
||||
rules:
|
||||
{
|
||||
},
|
||||
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
|
||||
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
|
||||
salesOrderIdcolumnOptions:[ {"label":"销售订单号","value":"document_no"},
|
||||
{"label":"合同","value":"contractName"}, {"label":"客户名称","value":"customer"},
|
||||
{"label":"金额","value":"price"}, {"label":"数量","value":"num"},
|
||||
],
|
||||
contractIdcolumnOptions:[ {"label":"合同编码","value":"contract_code"}, {"label":"合同名称","value":"contract_name"},],
|
||||
customerIdcolumnOptions:[ {"label":"客户编码","value":"supplier_cd"}, {"label":"客户名称","value":"supplier_nm"}, {"label":"地址","value":"address"},],
|
||||
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
|
||||
arinvoices_item1materialIdcolumnOptions:[ {"label":"物料编码","value":"item_code"}, {"label":"物料名称","value":"item_name"}, {"label":"单位","value":"primary_unit_of_measure"}, {"label":"可采购","value":"purchase_flag_name"}, {"label":"可销售","value":"sales_flag_name"},],
|
||||
taxRateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
|
||||
// taxRateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
|
||||
invoiceStatusOptions:[{"fullName":"正常","id":"0"},{"fullName":"红冲","id":"1"},{"fullName":"作废","id":"2"}],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
invoiceQuantitySum(){
|
||||
debugger
|
||||
let sum = 0;
|
||||
for (let i =0;i<this.dataForm.arinvoices_item0List.length;i++){
|
||||
sum = sum + this.dataForm.arinvoices_item0List[i].invoiceQuantity
|
||||
}
|
||||
this.dataForm.invoiceQuantity = sum
|
||||
debugger
|
||||
},
|
||||
involceAmountSum(){
|
||||
let sum = 0;
|
||||
for (let i =0;i<this.dataForm.arinvoices_item0List.length;i++){
|
||||
sum = sum + this.dataForm.arinvoices_item0List[i].involceAmount
|
||||
}
|
||||
this.dataForm.invoiceAmount = sum
|
||||
},
|
||||
rateCompute(){
|
||||
for (let i = 0;i<this.dataForm.arinvoices_item0List.length;i++) {
|
||||
this.taxRateOptions.find((item) => {
|
||||
if (this.dataForm.arinvoices_item0List[i].taxRate == item.id) {
|
||||
this.dataForm.arinvoices_item0List[i].taxAmount = this.dataForm.arinvoices_item0List[i].involceAmount*item.fullName/100
|
||||
this.dataForm.arinvoices_item0List[i].amountNotTax = this.dataForm.arinvoices_item0List[i].involceAmount - this.dataForm.arinvoices_item0List[i].taxAmount
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
computeAmount(){
|
||||
for (let i = 0;i<this.dataForm.arinvoices_item1List.length;i++) {
|
||||
this.taxRateOptions.find((item) => {
|
||||
if (this.dataForm.arinvoices_item1List[i].taxRate == item.id) {
|
||||
this.dataForm.arinvoices_item1List[i].taxAmount = this.dataForm.arinvoices_item1List[i].amount*item.fullName/100
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
arinvoices_item1Exist() {
|
||||
let isOk = true;
|
||||
for(let i=0;i<this.dataForm.arinvoices_item1List.length;i++){
|
||||
const e = this.dataForm.arinvoices_item1List[i];
|
||||
}
|
||||
return isOk;
|
||||
},
|
||||
arinvoices_item0Exist() {
|
||||
let isOk = true;
|
||||
for(let i=0;i<this.dataForm.arinvoices_item0List.length;i++){
|
||||
const e = this.dataForm.arinvoices_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(list) {
|
||||
debugger
|
||||
this.visible = true;
|
||||
let amount = 0;
|
||||
let num = 0;
|
||||
this.dataForm.contractId = list[0].contractId;
|
||||
this.dataForm.customerId = list[0].customerId;
|
||||
debugger
|
||||
this.dataForm.salesOrderId = list[0].id;
|
||||
this.dataForm.arinvoices_item1List = list[0].list;
|
||||
for (let i = 0;i<list[0].list.length;i++){
|
||||
this.dataForm.arinvoices_item1List[i].quantity = list[0].list[i].settlement;
|
||||
this.dataForm.arinvoices_item1List[i].amount = list[0].list[i].price;
|
||||
this.dataForm.arinvoices_item1List[i].taxRate = list[0].list[i].rate;
|
||||
this.dataForm.arinvoices_item1List[i].amountNotTax = list[0].list[i].noPrice;
|
||||
this.dataForm.arinvoices_item1List[i].unit = list[0].list[i].poundEntity.unit;
|
||||
amount = amount + list[0].list[i].price;
|
||||
num = num + list[0].list[i].quantity;
|
||||
// this.dataForm.arinvoices_item1List[i].taxAmount = list[0].list[i].price*list[0].list[i].rate
|
||||
this.taxRateOptions.find((item) => {
|
||||
if (this.dataForm.arinvoices_item1List[i].taxRate == item.id) {
|
||||
this.dataForm.arinvoices_item1List[i].taxAmount = this.dataForm.arinvoices_item1List[i].amount*item.fullName/100
|
||||
}
|
||||
})
|
||||
}
|
||||
this.dataForm.amount = amount;
|
||||
this.dataForm.quantity = num;
|
||||
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.arinvoices_item1Exist()) return
|
||||
if (!this.arinvoices_item0Exist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data =this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/arinvoices/Arinvoices',
|
||||
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/arinvoices/Arinvoices/'+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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
addarinvoices_item1List(){
|
||||
let item = {
|
||||
materialId:undefined,
|
||||
quantity:undefined,
|
||||
unitPrice:undefined,
|
||||
amount:undefined,
|
||||
taxRate:undefined,
|
||||
taxAmount:undefined,
|
||||
amountNotTax:undefined,
|
||||
remark:undefined,
|
||||
}
|
||||
this.dataForm.arinvoices_item1List.push(item)
|
||||
},
|
||||
delarinvoices_item1List(index) {
|
||||
this.dataForm.arinvoices_item1List.splice(index, 1);
|
||||
},
|
||||
addarinvoices_item0List(){
|
||||
let item = {
|
||||
invoiceCode:undefined,
|
||||
invoiceNo:undefined,
|
||||
invoiceQuantity:undefined,
|
||||
involceAmount:undefined,
|
||||
taxRate:undefined,
|
||||
taxAmount:undefined,
|
||||
amountNotTax:undefined,
|
||||
invoiceStatus:undefined,
|
||||
creatorUserName:undefined,
|
||||
invoiceDate:undefined,
|
||||
}
|
||||
this.dataForm.arinvoices_item0List.push(item)
|
||||
},
|
||||
delarinvoices_item0List(index) {
|
||||
this.dataForm.arinvoices_item0List.splice(index, 1);
|
||||
},
|
||||
dataList(){
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
for(let i=0;i<_data.arinvoices_item1List.length;i++){
|
||||
var _list = _data.arinvoices_item1List[i];
|
||||
}
|
||||
for(let i=0;i<_data.arinvoices_item0List.length;i++){
|
||||
var _list = _data.arinvoices_item0List[i];
|
||||
}
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
for(let i=0;i<_dataAll.arinvoices_item1List.length;i++){
|
||||
var _list = _dataAll.arinvoices_item1List[i];
|
||||
}
|
||||
for(let i=0;i<_dataAll.arinvoices_item0List.length;i++){
|
||||
var _list = _dataAll.arinvoices_item0List[i];
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
@ -1,400 +0,0 @@
|
||||
<template xmlns:pointer-events="http://www.w3.org/1999/xhtml">
|
||||
<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="customerId" >
|
||||
<popupSelect v-model="dataForm.customerId"
|
||||
placeholder="请选择" clearable field="customerId" interfaceId="393371066040385285" :columnOptions="customerIdcolumnOptions" propsValue="id" relationField="supplier_nm" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
>
|
||||
|
||||
</popupSelect>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="收款金额"
|
||||
prop="amountCollected" >
|
||||
<el-input v-model="dataForm.amountCollected"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="收款账户"
|
||||
prop="collectionCount" >
|
||||
<el-input v-model="dataForm.collectionCount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="收款银行"
|
||||
prop="collectionBank" >
|
||||
<el-input v-model="dataForm.collectionBank"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="收款类型 "
|
||||
prop="paymentType" >
|
||||
<el-select v-model="dataForm.paymentType"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in paymentTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="币别 "
|
||||
prop="currency" >
|
||||
<el-select v-model="dataForm.currency"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in currencyOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="结算类型"
|
||||
prop="settlementType" >
|
||||
<el-select v-model="dataForm.settlementType"
|
||||
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
||||
<el-option v-for="(item, index) in settlementTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
||||
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="备注信息"
|
||||
prop="remark" >
|
||||
<el-input v-model="dataForm.remark"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" >
|
||||
<el-form-item label="收款凭证"
|
||||
prop="voucher" >
|
||||
<JNPF-UploadFz v-model="dataForm.voucher"
|
||||
:fileSize="5" sizeUnit="MB" :limit="9" buttonText="点击上传" >
|
||||
|
||||
</JNPF-UploadFz>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8" >-->
|
||||
<!-- <el-form-item label="单据状态 "-->
|
||||
<!-- prop="status" >-->
|
||||
<!-- <el-select v-model="dataForm.status"-->
|
||||
<!-- placeholder="请选择" clearable :style='{"width":"100%"}'>-->
|
||||
<!-- <el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>-->
|
||||
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="8" >-->
|
||||
<!-- <el-form-item label="制单人"-->
|
||||
<!-- prop="creatorUserName" >-->
|
||||
<!-- <el-input v-model="dataForm.creatorUserName"-->
|
||||
<!-- placeholder="请输入" clearable :style='{"width":"100%"}'>-->
|
||||
|
||||
<!-- </el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-col>-->
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activexidaok" tab-position="top" class="mb-20">
|
||||
<el-tab-pane label="收款明细">
|
||||
<el-col :span="24" >
|
||||
<el-form-item label-width="0">
|
||||
<div class="JNPF-common-title">
|
||||
<h2></h2>
|
||||
</div>
|
||||
<el-table :data="dataForm.collection_item0List" size='mini' >
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<el-table-column prop="amount" label="收款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' @change="amountSum">
|
||||
</el-input>
|
||||
</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%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amountCollected" label="已收款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.amountCollected"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="salesorderId" label="销售订单">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.salesorderId"
|
||||
placeholder="请选择" clearable :field="'salesorderId'+scope.$index" interfaceId="399077559599480261" :columnOptions="collection_item0salesorderIdcolumnOptions" propsValue="id" relationField="document_no" popupType="dialog"
|
||||
popupWidth="800px" disabled
|
||||
>
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="contractId" label="合同编码">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.contractId"
|
||||
placeholder="请选择" clearable :field="'deleteTime'+scope.$index" interfaceId="398848549678332037" :columnOptions="collection_item0deleteTimecolumnOptions" propsValue="id" relationField="contract_code" popupType="dialog"
|
||||
popupWidth="800px" disabled
|
||||
>
|
||||
</popupSelect>
|
||||
</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":"100%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="advanceAmount" label="垫资金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.advanceAmount"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="rate" label="税额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.rate"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="notPrice" label="不含税金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.notPrice"
|
||||
placeholder="请输入" clearable :style='{"width":"100%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorTime" label="业务日期">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.creatorTime"
|
||||
placeholder="请选择" clearable :style='{"width":"200%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" disabled>
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="50" >
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delcollection_item0List(scope.$index)" disabled>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addcollection_item0List()" >
|
||||
<el-button type="text" icon="el-icon-plus" disabled>添加</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane >
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false"> 取 消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> 确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
isDetail: false,
|
||||
dataForm: {
|
||||
documentNo : '',
|
||||
customerId : "",
|
||||
contractId : "",
|
||||
amountCollected : '',
|
||||
collectionCount : '',
|
||||
collectionBank : '',
|
||||
paymentType : "0",
|
||||
currency : "0",
|
||||
settlementType : "0",
|
||||
remark : '',
|
||||
voucher : [],
|
||||
status : "0",
|
||||
creatorUserName : '',
|
||||
collection_item0List:[],
|
||||
},
|
||||
activexidaok:'0',
|
||||
rules:
|
||||
{
|
||||
},
|
||||
customerIdcolumnOptions:[ {"label":"客户编码","value":"supplier_cd"}, {"label":"客户名称","value":"supplier_nm"}, {"label":"客户地点名称","value":"supplier_site_code"}, {"label":"客户等级","value":"customer_level"},],
|
||||
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"}],
|
||||
|
||||
collection_item0salesorderIdcolumnOptions:[ {"label":"销售订单编号","value":"document_no"},],
|
||||
collection_item0deleteTimecolumnOptions:[ {"label":"合同编号","value":"contract_code"}, {"label":"合同名称","value":"contract_name"}, {"label":"客户名称","value":"name"},],
|
||||
taxRateOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
amountSum(){
|
||||
let sum = 0;
|
||||
for (let i = 0;i<this.dataForm.collection_item0List.length;i++){
|
||||
sum = sum + parseFloat(this.dataForm.collection_item0List[i].amount);
|
||||
}
|
||||
this.dataForm.amountCollected = sum;
|
||||
},
|
||||
collection_item0Exist() {
|
||||
let isOk = true;
|
||||
for(let i=0;i<this.dataForm.collection_item0List.length;i++){
|
||||
const e = this.dataForm.collection_item0List[i];
|
||||
}
|
||||
return isOk;
|
||||
},
|
||||
clearData(data){
|
||||
for (let key in data) {
|
||||
if (data[key] instanceof Array) {
|
||||
data[key] = [];
|
||||
} else if (data[key] instanceof Object) {
|
||||
this.clearData(data[key]);
|
||||
} else {
|
||||
data[key] = "";
|
||||
}
|
||||
}
|
||||
},
|
||||
init(list) {
|
||||
this.visible = true;
|
||||
this.dataForm.customerId = list[0].customerId;
|
||||
this.dataForm.contractId = list[0].contractId;
|
||||
this.dataForm.collection_item0List = list;
|
||||
debugger
|
||||
for (let i = 0;i<list.length;i++){
|
||||
this.dataForm.collection_item0List[i].salesorderId = list[i].id;
|
||||
this.dataForm.collection_item0List[i].rate = list[i].price - list[i].notPrice;
|
||||
debugger
|
||||
}
|
||||
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.collection_item0Exist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data =this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/collection/Collection',
|
||||
method: 'post',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
})
|
||||
}else{
|
||||
request({
|
||||
url: '/api/collection/Collection/'+this.dataForm.id,
|
||||
method: 'PUT',
|
||||
data: _data
|
||||
}).then((res) => {
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success',
|
||||
duration: 1000,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refresh', true)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
addcollection_item0List(){
|
||||
let item = {
|
||||
amount:undefined,
|
||||
creatorUserId:undefined,
|
||||
creatorUserName:undefined,
|
||||
salesorderId:undefined,
|
||||
deleteTime:undefined,
|
||||
lastModifyUserName:undefined,
|
||||
taxRate:undefined,
|
||||
lastModifyTime:undefined,
|
||||
deleteUserId:undefined,
|
||||
deleteUserName:undefined,
|
||||
creatorTime:undefined,
|
||||
}
|
||||
this.dataForm.collection_item0List.push(item)
|
||||
},
|
||||
delcollection_item0List(index) {
|
||||
this.dataForm.collection_item0List.splice(index, 1);
|
||||
},
|
||||
dataList(){
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
_data.voucher = JSON.stringify(_data.voucher)
|
||||
for(let i=0;i<_data.collection_item0List.length;i++){
|
||||
var _list = _data.collection_item0List[i];
|
||||
}
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll){
|
||||
let _dataAll =dataAll
|
||||
_dataAll.voucher = JSON.parse( _dataAll.voucher)
|
||||
for(let i=0;i<_dataAll.collection_item0List.length;i++){
|
||||
var _list = _dataAll.collection_item0List[i];
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
@ -1,485 +1,386 @@
|
||||
<template>
|
||||
<div class="JNPF-common-layout">
|
||||
<div class="JNPF-common-layout">
|
||||
|
||||
<div class="JNPF-common-layout-center">
|
||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||
<el-form @submit.native.prevent>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单据编号">
|
||||
<el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单据状态 ">
|
||||
<el-select v-model="query.status" placeholder="请选择"
|
||||
clearable>
|
||||
<el-option v-for="(item, index) in statusOptions" :key="index"
|
||||
:label="item.fullName" :value="item.id"
|
||||
:disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div class="JNPF-common-layout-main JNPF-flex-main">
|
||||
<div class="JNPF-common-head">
|
||||
<div>
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">新增
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="delivery()" >发货
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="invoicesEntry()" >发票录入
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="collection()" >回款
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-check" @click="archive()" >归档
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-check" @click="materialBack()" >退货
|
||||
</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" border>
|
||||
<el-table-column prop="documentNo" label="单据编号" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="erpNo" label="ERP订单号" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="contractId" label="合同名称" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="customerId" label="客户名称" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="price" label="金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="num" label="重量" width="0" align="left"
|
||||
/>
|
||||
<el-table-column label="币别" width="0" prop="currency" algin="left"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amountCollected" label="已回款金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="invoiceNum" label="发票数量" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="invoiceAmount" label="发票金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="advanceAmount" label="垫资金额" width="0" align="left"
|
||||
/>
|
||||
<el-table-column prop="creatorTime" 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="creatorUserName" label="制单人" width="0" align="left"
|
||||
/>
|
||||
<el-table-column label="操作" fixed="right"
|
||||
width="150" >
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text"
|
||||
@click="addOrUpdateHandle(scope.row.id)" >编辑
|
||||
</el-button>
|
||||
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
||||
</el-button>
|
||||
<el-button type="text"
|
||||
@click="goDetail(scope.row.id)">详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/>
|
||||
</div>
|
||||
<div class="JNPF-common-layout-center">
|
||||
<el-row class="JNPF-common-search-box" :gutter="16">
|
||||
<el-form @submit.native.prevent>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单据编号">
|
||||
<el-input v-model="query.documentNo" placeholder="请输入" clearable> </el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单据状态 ">
|
||||
<el-select v-model="query.status" placeholder="请选择" clearable>
|
||||
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id"
|
||||
:disabled="item.disabled"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
|
||||
<el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<div class="JNPF-common-layout-main JNPF-flex-main">
|
||||
<div class="JNPF-common-head">
|
||||
<div>
|
||||
<el-button type="text" icon="el-icon-plus" @click="addOrUpdateHandle()">新增
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-download" @click="exportData()">导出
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">批量删除
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-check" @click="exportData()">发货
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-close" @click="exportData()">发票录入
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-check" @click="exportData()">回款
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-close" @click="exportData()">归档
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-check" @click="exportData()">退货
|
||||
</el-button>
|
||||
</div>
|
||||
<div class="JNPF-common-head-right">
|
||||
<el-tooltip effect="dark" content="刷新" placement="top">
|
||||
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" @click="reset()" />
|
||||
</el-tooltip>
|
||||
<screenfull isContainer />
|
||||
</div>
|
||||
</div>
|
||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
|
||||
<JNPF-Form2 v-if="formVisible" ref="JNPFForm2" @refresh="refresh"/>
|
||||
<JNPF-Form3 v-if="formVisible" ref="JNPFForm3" @refresh="refresh"/>
|
||||
<JNPF-Form4 v-if="formVisible" ref="JNPFForm4" @refresh="refresh"/>
|
||||
<JNPF-Form5 v-if="formVisible" ref="JNPFForm5" @refresh="refresh"/>
|
||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/>
|
||||
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/>
|
||||
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c :hasNO="false"
|
||||
@selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
|
||||
<el-table-column prop="documentNo" label="单据编号" sortable fixed="left" width="200" align="center" />
|
||||
<el-table-column prop="costomerName" label="客户名称" sortable fixed="left" width="150" align="center" />
|
||||
<el-table-column prop="price" label="金额" sortable width="150" align="center" />
|
||||
<el-table-column prop="num" label="数量" sortable width="150" align="center" />
|
||||
<el-table-column label="币别" width="100" sortable prop="currency" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.currency | dynamicText(currencyOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amountCollected" sortable label="已回款金额" width="150" align="center" />
|
||||
<el-table-column prop="invoiceNum" sortable label="发票数量" width="150" align="center" />
|
||||
<el-table-column prop="invoiceAmount" sortable label="发票金额" width="150" align="center" />
|
||||
<el-table-column label="来源系统" width="150" sortable prop="sourceSystem" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.sourceSystem | dynamicText(sourceSystemOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态 " width="150" sortable prop="status" align="center" >
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.status | dynamicText(statusOptions) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="creatorUserName" label="制单人" sortable width="150" align="center" />
|
||||
<el-table-column label="操作" fixed="right" width="150" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="addOrUpdateHandle(scope.row.id)">编辑
|
||||
</el-button>
|
||||
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">删除
|
||||
</el-button>
|
||||
<el-button type="text" @click="goDetail(scope.row.id)">详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</JNPF-table>
|
||||
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
|
||||
@pagination="initData" />
|
||||
</div>
|
||||
</div>
|
||||
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
|
||||
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
|
||||
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import {getDictionaryDataSelector} from '@/api/systemData/dictionary'
|
||||
import JNPFForm from './Form'
|
||||
import JNPFForm2 from './arinvoicesForm'
|
||||
import JNPFForm3 from './receiptoutForm'
|
||||
import JNPFForm4 from './salebackForm'
|
||||
import JNPFForm5 from './collectionForm'
|
||||
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,JNPFForm2,JNPFForm3,JNPFForm4,JNPFForm5, ExportBox,Detail},
|
||||
data() {
|
||||
return {
|
||||
detailVisible: false,
|
||||
query: {
|
||||
documentNo:undefined,
|
||||
status:undefined,
|
||||
},
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
list: [],
|
||||
listLoading: true,
|
||||
multipleSelection: [], total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
},
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [
|
||||
{prop: 'documentNo', label: '单据编号'},
|
||||
{prop: 'erpNo', label: 'ERP订单号'},
|
||||
{prop: 'contractId', label: '合同名称'},
|
||||
{prop: 'customerId', label: '客户名称'},
|
||||
{prop: 'price', label: '金额'},
|
||||
{prop: 'num', label: '重量'},
|
||||
{prop: 'currency', label: '币别'},
|
||||
{prop: 'amountCollected', label: '已回款金额'},
|
||||
{prop: 'invoiceNum', label: '发票数量'},
|
||||
{prop: 'invoiceAmount', label: '发票金额'},
|
||||
{prop: 'advanceAmount', label: '垫资金额'},
|
||||
{prop: 'creatorTime', label: '制单时间'},
|
||||
{prop: 'status', label: '单据状态 '},
|
||||
{prop: 'creatorUserName', label: '制单人'},
|
||||
],
|
||||
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"},{"fullName":"待回款","id":"3"},{"fullName":"回款中","id":"4"},{"fullName":"归档","id":"5"}],
|
||||
statusProps:{"label":"fullName","value":"id"},
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
JNPFForm,
|
||||
ExportBox,
|
||||
Detail
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
detailVisible: false,
|
||||
query: {
|
||||
documentNo: undefined,
|
||||
status: undefined,
|
||||
},
|
||||
computed: {
|
||||
menuId() {
|
||||
return this.$route.meta.modelId || ''
|
||||
}
|
||||
treeProps: {
|
||||
children: 'children',
|
||||
label: 'fullName',
|
||||
value: 'id'
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
list: [],
|
||||
listLoading: true,
|
||||
multipleSelection: [],
|
||||
total: 0,
|
||||
listQuery: {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
},
|
||||
methods: {
|
||||
delivery(){
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
request({
|
||||
url: `/api/saleorder/Saleorderitem/delivery/${ids}`,
|
||||
method: 'post'
|
||||
}).then(res => {
|
||||
const list = [];
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
let _data = res.data[i]
|
||||
list.push(_data)
|
||||
debugger
|
||||
}
|
||||
if (list.length>0) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm3.init(list)
|
||||
})
|
||||
}else{
|
||||
this.$message({
|
||||
message: '未找到符合条件数据',
|
||||
type: 'error',
|
||||
duration: 1000
|
||||
})
|
||||
}
|
||||
})
|
||||
formVisible: false,
|
||||
exportBoxVisible: false,
|
||||
columnList: [{
|
||||
prop: 'documentNo',
|
||||
label: '单据编号'
|
||||
},
|
||||
invoicesEntry(){
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
request({
|
||||
url: `/api/saleorder/Saleorderitem/invoiceentry/${ids}`,
|
||||
method: 'post'
|
||||
}).then(res => {
|
||||
const list = [];
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
// res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
|
||||
// 10) : '';
|
||||
let _data = res.data[i]
|
||||
list.push(_data)
|
||||
}
|
||||
if (list.length>0) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm2.init(list)
|
||||
})
|
||||
}else{
|
||||
this.$message({
|
||||
message: '未找到符合条件数据',
|
||||
type: 'error',
|
||||
duration: 1000
|
||||
})
|
||||
}
|
||||
})
|
||||
{
|
||||
prop: 'costomerName',
|
||||
label: '客户名称'
|
||||
},
|
||||
collection(){
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
request({
|
||||
url: `/api/saleorder/Saleorderitem/collection/${ids}`,
|
||||
method: 'post'
|
||||
}).then(res => {
|
||||
const list = [];
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
// res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
|
||||
// 10) : '';
|
||||
let _data = res.data[i]
|
||||
list.push(_data)
|
||||
debugger
|
||||
}
|
||||
if (list.length > 0) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm5.init(list)
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
message: '未找到符合条件数据',
|
||||
type: 'error',
|
||||
duration: 1000
|
||||
})
|
||||
}
|
||||
})
|
||||
{
|
||||
prop: 'price',
|
||||
label: '金额'
|
||||
},
|
||||
archive(){
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
request({
|
||||
url: `/api/saleorder/Saleorderitem/archive/${ids}`,
|
||||
method: 'post'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
{
|
||||
prop: 'num',
|
||||
label: '数量'
|
||||
},
|
||||
materialBack(){
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
request({
|
||||
url: `/api/saleorder/Saleorderitem/materialback/${ids}`,
|
||||
method: 'post'
|
||||
}).then(res => {
|
||||
const list = [];
|
||||
for (let i = 0; i < res.data.length; i++) {
|
||||
// res.data.list[i].creatorTime = res.data.list[i].creatorTime ? res.data.list[i].creatorTime.substring(0,
|
||||
// 10) : '';
|
||||
let _data = res.data[i]
|
||||
list.push(_data)
|
||||
debugger
|
||||
}
|
||||
if (list.length > 0) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm4.init(list)
|
||||
})
|
||||
} else {
|
||||
this.$message({
|
||||
message: '未找到符合条件数据',
|
||||
type: 'error',
|
||||
duration: 1000
|
||||
})
|
||||
}
|
||||
})
|
||||
{
|
||||
prop: 'currency',
|
||||
label: '币别'
|
||||
},
|
||||
goDetail(id){
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(id)
|
||||
})
|
||||
},
|
||||
sortChange({column, prop, order}) {
|
||||
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
|
||||
this.listQuery.sidx = !order ? '' : prop
|
||||
this.initData()
|
||||
},
|
||||
initData() {
|
||||
this.listLoading = true;
|
||||
let _query = {
|
||||
...this.listQuery,
|
||||
...this.query,
|
||||
menuId:this.menuId
|
||||
};
|
||||
request({
|
||||
url: `/api/saleorder/Saleorderitem/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
|
||||
{
|
||||
prop: 'amountCollected',
|
||||
label: '已回款金额'
|
||||
},
|
||||
{
|
||||
prop: 'invoiceNum',
|
||||
label: '发票数量'
|
||||
},
|
||||
{
|
||||
prop: 'invoiceAmount',
|
||||
label: '发票金额'
|
||||
},
|
||||
{
|
||||
prop: 'sourceSystem',
|
||||
label: '来源系统'
|
||||
},
|
||||
{
|
||||
prop: 'status',
|
||||
label: '单据状态 '
|
||||
},
|
||||
{
|
||||
prop: 'creatorUserName',
|
||||
label: '制单人'
|
||||
},
|
||||
],
|
||||
currencyOptions: [{
|
||||
"fullName": "人民币",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "美元",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "英镑",
|
||||
"id": "2"
|
||||
}],
|
||||
currencyProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
sourceSystemOptions: [{
|
||||
"fullName": "人工创建",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "商城平台",
|
||||
"id": "1"
|
||||
}],
|
||||
sourceSystemProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
statusOptions: [{
|
||||
"fullName": "已保存",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "开票中",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "付款申请",
|
||||
"id": "2"
|
||||
}, {
|
||||
"fullName": "待回款",
|
||||
"id": "3"
|
||||
}, {
|
||||
"fullName": "回款中",
|
||||
"id": "4"
|
||||
}, {
|
||||
"fullName": "归档",
|
||||
"id": "5"
|
||||
}],
|
||||
statusProps: {
|
||||
"label": "fullName",
|
||||
"value": "id"
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
menuId() {
|
||||
return this.$route.meta.modelId || ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
goDetail(id) {
|
||||
this.detailVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.Detail.init(id)
|
||||
})
|
||||
},
|
||||
sortChange({
|
||||
column,
|
||||
prop,
|
||||
order
|
||||
}) {
|
||||
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
|
||||
this.listQuery.sidx = !order ? '' : prop
|
||||
this.initData()
|
||||
},
|
||||
initData() {
|
||||
this.listLoading = true;
|
||||
let _query = {
|
||||
...this.listQuery,
|
||||
...this.query,
|
||||
menuId: this.menuId
|
||||
};
|
||||
request({
|
||||
url: `/api/saleorder/Saleorder/getList`,
|
||||
method: 'post',
|
||||
data: _query
|
||||
}).then(res => {
|
||||
var _list = [];
|
||||
for (let i = 0; i < res.data.list.length; i++) {
|
||||
let _data = res.data.list[i];
|
||||
_list.push(_data)
|
||||
}
|
||||
this.list = _list
|
||||
this.total = res.data.pagination.total
|
||||
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDel(id) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/saleorder/Saleorderitem/${id}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
const res = val.map(item => item.id)
|
||||
this.multipleSelection = res
|
||||
},
|
||||
handleBatchRemoveDel() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/saleorder/Saleorderitem/batchRemove/${ids}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
addOrUpdateHandle(id, isDetail) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm.init(id, isDetail)
|
||||
})
|
||||
},
|
||||
exportData() {
|
||||
this.exportBoxVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ExportBox.init(this.columnList)
|
||||
})
|
||||
},
|
||||
download(data) {
|
||||
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
|
||||
request({
|
||||
url: `/api/saleorder/Saleorderitem/Actions/Export`,
|
||||
method: 'GET',
|
||||
data: query
|
||||
}).then(res => {
|
||||
if (!res.data.url) return
|
||||
this.jnpf.downloadFile(res.data.url)
|
||||
this.$refs.ExportBox.visible = false
|
||||
this.exportBoxVisible = false
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.listQuery = {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
}
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
handleDel(id) {
|
||||
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/saleorder/Saleorder/${id}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {});
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
const res = val.map(item => item.id)
|
||||
this.multipleSelection = res
|
||||
},
|
||||
handleBatchRemoveDel() {
|
||||
if (!this.multipleSelection.length) {
|
||||
this.$message({
|
||||
type: 'error',
|
||||
message: '请选择一条数据',
|
||||
duration: 1500,
|
||||
})
|
||||
return
|
||||
}
|
||||
const ids = this.multipleSelection.join()
|
||||
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
request({
|
||||
url: `/api/saleorder/Saleorder/batchRemove/${ids}`,
|
||||
method: 'DELETE'
|
||||
}).then(res => {
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: res.msg,
|
||||
onClose: () => {
|
||||
this.initData()
|
||||
}
|
||||
});
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
addOrUpdateHandle(id, isDetail) {
|
||||
this.formVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.JNPFForm.init(id, isDetail)
|
||||
})
|
||||
},
|
||||
exportData() {
|
||||
this.exportBoxVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ExportBox.init(this.columnList)
|
||||
})
|
||||
},
|
||||
download(data) {
|
||||
let query = {
|
||||
...data,
|
||||
...this.listQuery,
|
||||
...this.query,
|
||||
menuId: this.menuId
|
||||
}
|
||||
request({
|
||||
url: `/api/saleorder/Saleorder/Actions/Export`,
|
||||
method: 'GET',
|
||||
data: query
|
||||
}).then(res => {
|
||||
if (!res.data.url) return
|
||||
this.jnpf.downloadFile(res.data.url)
|
||||
this.$refs.ExportBox.visible = false
|
||||
this.exportBoxVisible = false
|
||||
})
|
||||
},
|
||||
search() {
|
||||
this.listQuery = {
|
||||
currentPage: 1,
|
||||
pageSize: 20,
|
||||
sort: "desc",
|
||||
sidx: "",
|
||||
}
|
||||
this.initData()
|
||||
},
|
||||
refresh(isrRefresh) {
|
||||
this.formVisible = false
|
||||
if (isrRefresh) this.reset()
|
||||
},
|
||||
reset() {
|
||||
for (let key in this.query) {
|
||||
this.query[key] = undefined
|
||||
}
|
||||
this.search()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,429 +0,0 @@
|
||||
<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-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="salesId" >
|
||||
<popupSelect v-model="dataForm.salesId"
|
||||
placeholder="请选择" clearable field="salesId" interfaceId="392956668264114117" :columnOptions="salesIdcolumnOptions" propsValue="id" relationField="document_no" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
hasPage :pageSize="20" >
|
||||
|
||||
</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-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="customerId" >
|
||||
<popupSelect v-model="dataForm.customerId"
|
||||
placeholder="请选择" clearable field="customerId" interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id" relationField="supplier_nm" popupType="dialog"
|
||||
popupTitle="选择数据" popupWidth="800px"
|
||||
hasPage :pageSize="20" >
|
||||
</popupSelect>
|
||||
</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-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="activezlqlfb" 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="vehicleId" label="车牌号">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.vehicleId"
|
||||
placeholder="请选择" clearable :field="'vehicleId'+scope.$index" interfaceId="398732963950472005" :columnOptions="receiptout_item0vehicleIdcolumnOptions" propsValue="id" relationField="ticketno" popupType="dialog"
|
||||
popupWidth="800px"
|
||||
hasPage :pageSize="20" disabled>
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="materialId" label="物料名称">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.materialId"
|
||||
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="398719564478785669" :columnOptions="receiptout_item0materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
|
||||
popupWidth="800px" disabled
|
||||
>
|
||||
</popupSelect>
|
||||
</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="381404161809350213" :columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id" relationField="areaname" popupType="dialog"
|
||||
popupWidth="800px" @change="areaSelect"
|
||||
>
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouseId" label="仓库名称">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.warehouseId"
|
||||
placeholder="请选择" clearable :field="'reservoirareaId'+scope.$index" interfaceId="399117969575232581" :columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id" relationField="name" popupType="dialog"
|
||||
popupWidth="800px" disabled>
|
||||
</popupSelect>
|
||||
</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%"}' disabled>
|
||||
</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%"}' disabled>
|
||||
<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%"}' disabled>
|
||||
</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%"}' disabled>
|
||||
<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%"}' disabled>
|
||||
</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%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="batchNo" label="批次号">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.batchNo"
|
||||
placeholder="系统自动生成" readonly>
|
||||
</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":"100%"}' disabled>
|
||||
<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="delreceiptout_item0List(scope.$index)" disabled>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addreceiptout_item0List()" disabled="">
|
||||
<el-button type="text" icon="el-icon-plus" disabled >添加</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane >
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false"> 取 消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> 确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
||||
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
loading: false,
|
||||
isDetail: false,
|
||||
dataForm: {
|
||||
documentNo : '',
|
||||
type : "0",
|
||||
salesId : "",
|
||||
amount : '',
|
||||
currency : "0",
|
||||
num : '',
|
||||
customerId : '',
|
||||
remark : '',
|
||||
issueDate : '',
|
||||
status : "0",
|
||||
creatorTime : "",
|
||||
creatorUserName : "",
|
||||
lastModifyTime : "",
|
||||
lastModifyUserName : "",
|
||||
receiptout_item0List:[],
|
||||
},
|
||||
activezlqlfb:'0',
|
||||
rules:
|
||||
{
|
||||
type: [
|
||||
{
|
||||
required: true,
|
||||
message: '请至少选择一个',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
salesId: [
|
||||
{
|
||||
required: true,
|
||||
message: '请至少选择一个',
|
||||
trigger: 'change'
|
||||
},
|
||||
],
|
||||
},
|
||||
typeOptions:[{"fullName":"销售出库","id":"0"},{"fullName":"购销出库","id":"1"}],
|
||||
salesIdcolumnOptions:[ {"label":"单据编号","value":"document_no"}, {"label":"币别","value":"currency"}, {"label":"客户名称","value":"customer_name"},],
|
||||
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
|
||||
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
|
||||
customerIdcolumnOptions:[ {"label":"客户编码","value":"supplier_cd"}, {"label":"客户名称","value":"supplier_nm"}, {"label":"联系人","value":"contact_name"}, {"label":"地址","value":"address"},],
|
||||
receiptout_item0vehicleIdcolumnOptions:[ {"label":"车辆号","value":"ticketno"}],
|
||||
receiptout_item0materialIdcolumnOptions:[ {"label":"物料编码","value":"item_code"}, {"label":"物料名称","value":"item_name"}, {"label":"单位","value":"primary_unit_of_measure"}, {"label":"默认入库区","value":"in_area"}, {"label":"默认出库区","value":"out_area"},],
|
||||
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"}],
|
||||
poundTypeOptions:[{"fullName":"贸易","id":"0"},{"fullName":"自加工","id":"1"},{"fullName":"委外","id":"2"},{"fullName":"倒运","id":"3"}],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
areaSelect(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.warehouse_id
|
||||
}
|
||||
}
|
||||
},
|
||||
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(list) {
|
||||
this.visible = true;
|
||||
this.dataForm.amount = list[0].price;
|
||||
this.dataForm.num = list[0].num;
|
||||
this.dataForm.salesId = list[0].id;
|
||||
this.dataForm.customerId = list[0].customerId;
|
||||
debugger
|
||||
this.dataForm.receiptout_item0List = list[0].list;
|
||||
for (let i = 0;i<list[0].list.length;i++){
|
||||
this.dataForm.receiptout_item0List[i].amount = list[0].list[i].price;
|
||||
this.dataForm.receiptout_item0List[i].price = list[0].list[i].unitPrice;
|
||||
this.dataForm.receiptout_item0List[i].deliveryNum = list[0].list[i].settlement;
|
||||
this.dataForm.receiptout_item0List[i].unit = list[0].list[i].poundEntity.unit;
|
||||
this.dataForm.receiptout_item0List[i].poundType = list[0].list[i].poundEntity.poundType;
|
||||
debugger
|
||||
this.rateOptions.find((item) => {
|
||||
if (this.dataForm.receiptout_item0List[i].rate == item.id) {
|
||||
this.dataForm.receiptout_item0List[i].rateAmount = this.dataForm.receiptout_item0List[i].amount*item.fullName/100
|
||||
debugger
|
||||
}
|
||||
})
|
||||
}
|
||||
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/receipout/Receiptout/saleordercreate',
|
||||
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/receipout/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 = {
|
||||
vehicleId:undefined,
|
||||
materialId:undefined,
|
||||
reservoirareaId:undefined,
|
||||
warehouseId:undefined,
|
||||
deliveryNum:undefined,
|
||||
unit:undefined,
|
||||
price:undefined,
|
||||
rate:undefined,
|
||||
amount:undefined,
|
||||
rateAmount:undefined,
|
||||
batchNo:undefined,
|
||||
poundType: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,461 +0,0 @@
|
||||
<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="请输入" clearable
|
||||
:style='{"width":"100%"}' :disabled="true">
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="销售订单" prop="salesOrderId">
|
||||
<popupSelect v-model="dataForm.salesOrderId" placeholder="请选择" clearable
|
||||
field="salesOrderId" interfaceId="383568951197606085"
|
||||
:columnOptions="salesOrderIdcolumnOptions" :excludeFields="excludeFields" propsValue="id" relationField="document_no"
|
||||
popupType="dialog" popupTitle="选择数据" popupWidth="800px" @change="popupSelectChange">
|
||||
|
||||
</popupSelect>
|
||||
</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="refundAmount" >
|
||||
<el-input v-model="dataForm.refundAmount" readonly clearable :style='{"width":"100%"}' :disabled="true">
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="退货数量" prop="refundNum" >
|
||||
<el-input v-model="dataForm.refundNum" readonly clearable :style='{"width":"100%"}' :disabled="true">
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
||||
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="activeqkzogz" 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.saleback_item0List" size='mini'>
|
||||
<el-table-column type="index" width="50" label="序号" align="center" />
|
||||
<!-- <el-table-column prop="licenseNum" label="车牌号">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <popupSelect v-model="scope.row.licenseNum" placeholder="请选择"-->
|
||||
<!-- clearable :field="'licenseNum'+scope.$index"-->
|
||||
<!-- interfaceId="383568082196537541" :bissId="dataForm.salesOrderId" :excludeFields="excludeFields"-->
|
||||
<!-- :columnOptions="saleback_item0licenseNumcolumnOptions"-->
|
||||
<!-- propsValue="license_num" relationField="license_num"-->
|
||||
<!-- popupType="dialog" popupWidth="800px" @change="popupSelectChange2">-->
|
||||
<!-- </popupSelect>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column prop="vehicleId" label="车辆ID">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.vehicleId"
|
||||
placeholder="请选择" clearable :field="'vehicleId'+scope.$index" interfaceId="400554150653457925"
|
||||
:bissId="dataForm.salesOrderId" :columnOptions="salesback_item0vehicleIdcolumnOptions" propsValue="id"
|
||||
relationField="ticketno" popupType="dialog" @change="popupSelectChange2"
|
||||
popupWidth="800px">
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="materialId" label="物料名称">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.materialId"
|
||||
placeholder="请选择" clearable :field="'materialId'+scope.$index" interfaceId="381037852907038533" :columnOptions="jg_salesback_item0materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
|
||||
popupWidth="800px" disabled>
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="settlement" label="结算重量 ">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.settlement" placeholder="请输入" clearable
|
||||
:style='{"width":"100%"}' disabled>
|
||||
</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%"}' disabled>
|
||||
<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%"}' disabled>
|
||||
</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%"}' disabled>
|
||||
<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%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="notAmount" label="税额">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable
|
||||
:style='{"width":"100%"}' disabled>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="businessId" label="业务员">
|
||||
<template slot-scope="scope">
|
||||
<popupSelect v-model="scope.row.businessId"
|
||||
placeholder="请选择" clearable :field="'businessId'+scope.$index" interfaceId="ebcc44be142e43b795c0d769abd6d25a" :columnOptions="jg_salesback_item0businessIdcolumnOptions" propsValue="F_Id" relationField="F_RealName" popupType="dialog"
|
||||
popupWidth="800px" disabled>
|
||||
</popupSelect>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="pountType" label="磅单类型 ">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.pountType" placeholder="请选择" clearable
|
||||
:style='{"width":"100%"}' disabled>
|
||||
<el-option v-for="(item, index) in pountTypeOptions"
|
||||
: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="delsaleback_item0List(scope.$index)" >删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="table-actions" @click="addsaleback_item0List()">
|
||||
<el-button type="text" icon="el-icon-plus" >添加</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</template>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false"> 取 消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()" v-if="!isDetail"> 确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import request from '@/utils/request'
|
||||
import {
|
||||
getDataInterfaceRes
|
||||
} from '@/api/systemData/dataInterface'
|
||||
import {
|
||||
getDictionaryDataSelector
|
||||
} from '@/api/systemData/dictionary'
|
||||
export default {
|
||||
components: {},
|
||||
props: [],
|
||||
data() {
|
||||
return {
|
||||
excludeFields: [],
|
||||
visible: false,
|
||||
loading: false,
|
||||
isDetail: false,
|
||||
dataForm: {
|
||||
documentNo: '',
|
||||
salesOrderId: "",
|
||||
currency: "0",
|
||||
refundAmount: '',
|
||||
refundNum: '',
|
||||
remark: '',
|
||||
actualAmount: '',
|
||||
status: "0",
|
||||
creatorTime: "",
|
||||
creatorUserName: "",
|
||||
saleback_item0List: [],
|
||||
jg_salesorder: {
|
||||
contractName: '',
|
||||
costomerName: '',
|
||||
},
|
||||
// jnpf_jg_salesorder_jnpf_contractName: '',
|
||||
// jnpf_jg_salesorder_jnpf_costomerName: '',
|
||||
},
|
||||
activeqkzogz: '0',
|
||||
rules: {},
|
||||
salesOrderIdcolumnOptions: [{
|
||||
"label": "ID",
|
||||
"value": "id"
|
||||
}, {
|
||||
"label": "销售订单号",
|
||||
"value": "document_no"
|
||||
}, {
|
||||
"label": "合同名称",
|
||||
"value": "contract_name"
|
||||
}, {
|
||||
"label": "客户名称",
|
||||
"value": "costomer_name"
|
||||
}, {
|
||||
"label": "币别",
|
||||
"value": "currency"
|
||||
}, {
|
||||
"label": "状态",
|
||||
"value": "status"
|
||||
}, ],
|
||||
currencyOptions: [{
|
||||
"fullName": "人民币",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "美元",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "英镑",
|
||||
"id": "2"
|
||||
}],
|
||||
statusOptions: [{
|
||||
"fullName": "已保存",
|
||||
"id": "0"
|
||||
}, {
|
||||
"fullName": "审批中",
|
||||
"id": "1"
|
||||
}, {
|
||||
"fullName": "已审批",
|
||||
"id": "2"
|
||||
}],
|
||||
salesback_item0vehicleIdcolumnOptions:[ {"label":"车牌号","value":"ticketno"},
|
||||
{"label":"物料名称","value":"material_name"},
|
||||
{"label":"结算重量","value":"settlement"},
|
||||
{"label":"计量单位","value":"unit"},
|
||||
{"label":"采购单价","value":"unit_price"},
|
||||
{"label":"税率","value":"rate"},
|
||||
{"label":"应退金额","value":"price"},
|
||||
{"label":"税额","value":"no_price"},
|
||||
{"label":"业务员","value":"business_id"},
|
||||
{"label":"磅单类型","value":"pound_type"},],
|
||||
|
||||
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"
|
||||
}],
|
||||
pountTypeOptions: [{"fullName":"贸易","id":"0"},{"fullName":"自加工","id":"1"},{"fullName":"委外","id":"2"},{"fullName":"倒运","id":"3"}],
|
||||
jg_salesback_item0businessIdcolumnOptions:[ {"label":"人员名称","value":"F_RealName"}, {"label":"人员职位","value":"F_FullName"},],
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {},
|
||||
mounted() {},
|
||||
methods: {
|
||||
popupSelectChange2(a, b){
|
||||
debugger
|
||||
var excludeFields = [];
|
||||
for (let i = 0; i < this.dataForm.saleback_item0List.length; i++) {
|
||||
excludeFields.push(this.dataForm.saleback_item0List[i].vehicleId);
|
||||
if(a == this.dataForm.saleback_item0List[i].vehicleId){
|
||||
this.dataForm.saleback_item0List[i].materialId = b.material_id;
|
||||
this.dataForm.saleback_item0List[i].settlement = b.settlement;
|
||||
this.dataForm.saleback_item0List[i].unit = b.unit;
|
||||
this.dataForm.saleback_item0List[i].price = b.sales_price;
|
||||
this.dataForm.saleback_item0List[i].rate = b.rate;
|
||||
this.dataForm.saleback_item0List[i].amount = b.sales_price * b.settlement;
|
||||
this.dataForm.saleback_item0List[i].pountUser = b.business_id;
|
||||
this.dataForm.saleback_item0List[i].pountType = b.pound_type;
|
||||
this.dataForm.saleback_item0List[i].businessId = b.business_id;
|
||||
this.rateOptions.find((item) => {
|
||||
if (this.dataForm.saleback_item0List[i].rate == item.id) {
|
||||
this.dataForm.saleback_item0List[i].notAmount = this.dataForm.saleback_item0List[i].amount*item.fullName/100
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
this.excludeFields = excludeFields;
|
||||
},
|
||||
popupSelectChange(e,d){
|
||||
this.dataForm.currency = d.currency;
|
||||
this.excludeFields = [];
|
||||
this.dataForm.saleback_item0List = [];
|
||||
},
|
||||
saleback_item0Exist() {
|
||||
let isOk = true;
|
||||
for (let i = 0; i < this.dataForm.saleback_item0List.length; i++) {
|
||||
const e = this.dataForm.saleback_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(list) {
|
||||
this.visible = true;
|
||||
this.dataForm.salesOrderId = list[0].id;
|
||||
this.dataForm.refundAmount = list[0].price;
|
||||
this.dataForm.refundNum = list[0].num;
|
||||
// this.dataForm.saleback_item0List = list[0].list;
|
||||
// for (let i = 0;i<list[0].list.length;i++){
|
||||
// this.dataForm.saleback_item0List[i].salesorderItem0Id = list[0].list[i].id;
|
||||
// this.dataForm.saleback_item0List[i].unit = list[0].list[i].poundEntity.unit;
|
||||
// this.dataForm.saleback_item0List[i].businessId = list[0].list[i].poundEntity.businessId;
|
||||
// this.dataForm.saleback_item0List[i].pountType = list[0].list[i].poundEntity.poundType;
|
||||
// this.dataForm.saleback_item0List[i].amount = list[0].list[i].price;
|
||||
// this.dataForm.saleback_item0List[i].price = list[0].list[i].unitPrice;
|
||||
// this.rateOptions.find((item) => {
|
||||
// if (this.dataForm.saleback_item0List[i].rate == item.id) {
|
||||
// this.dataForm.saleback_item0List[i].notAmount = this.dataForm.saleback_item0List[i].amount*item.fullName/100
|
||||
// }
|
||||
// })
|
||||
// debugger
|
||||
// }
|
||||
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs['elForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.saleback_item0Exist()) return
|
||||
this.request()
|
||||
}
|
||||
})
|
||||
},
|
||||
request() {
|
||||
var _data = this.dataList()
|
||||
if (!this.dataForm.id) {
|
||||
request({
|
||||
url: '/api/saleback/Saleback',
|
||||
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/saleback/Saleback/' + 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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
addsaleback_item0List() {
|
||||
let item = {
|
||||
licenseNum: undefined,
|
||||
materialName: undefined,
|
||||
settlement: undefined,
|
||||
unit: undefined,
|
||||
price: undefined,
|
||||
rate: undefined,
|
||||
amount: undefined,
|
||||
notAmount: undefined,
|
||||
pountUser: undefined,
|
||||
pountType: undefined,
|
||||
}
|
||||
this.dataForm.saleback_item0List.push(item)
|
||||
},
|
||||
delsaleback_item0List(index) {
|
||||
this.dataForm.saleback_item0List.splice(index, 1);
|
||||
},
|
||||
dataList() {
|
||||
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
||||
// _data.jg_salesorder.contractName = _data.jnpf_jg_salesorder_jnpf_contractName
|
||||
// _data.jg_salesorder.costomerName = _data.jnpf_jg_salesorder_jnpf_costomerName
|
||||
for (let i = 0; i < _data.saleback_item0List.length; i++) {
|
||||
var _list = _data.saleback_item0List[i];
|
||||
}
|
||||
return _data;
|
||||
},
|
||||
dataInfo(dataAll) {
|
||||
let _dataAll = dataAll
|
||||
// _dataAll.jnpf_jg_salesorder_jnpf_contractName = _dataAll.jg_salesorder.contractName
|
||||
// _dataAll.jnpf_jg_salesorder_jnpf_costomerName = _dataAll.jg_salesorder.costomerName
|
||||
for (let i = 0; i < _dataAll.saleback_item0List.length; i++) {
|
||||
var _list = _dataAll.saleback_item0List[i];
|
||||
}
|
||||
this.dataForm = _dataAll
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
Loading…
Reference in new issue