版本回滚!

product
巴卫 2 years ago
parent 8327a16bc0
commit 21d2a029e1

@ -2,7 +2,7 @@
<el-dialog title="详情"
:close-on-click-modal="false" append-to-body
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
width="1000px">
width="800px">
<el-row :gutter="15" class="">
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
@ -15,7 +15,13 @@
<el-col :span="8" >
<el-form-item label="业务日期"
prop="businessDate" >
<p>{{jnpf.dateFormat(dataForm.businessDate)}}</p>
<p>{{dataForm.businessDate}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="客户名称"
prop="customerName" >
<p>{{dataForm.customerName}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
@ -30,6 +36,24 @@
<p>{{dataForm.quantity}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="发票数量"
prop="invoiceQuantity" >
<p>{{dataForm.invoiceQuantity}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="客户税号"
prop="customerTaxNo" >
<p>{{dataForm.customerTaxNo}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="客户地址"
prop="customerAddress" >
<p>{{dataForm.customerAddress}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="币别 "
prop="currency" >
@ -42,12 +66,6 @@
<p>{{dataForm.remark}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="单据状态 "
prop="status" >
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="发票金额"
prop="invoiceAmount" >
@ -55,87 +73,32 @@
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="发票数量"
prop="invoiceQuantity" >
<p>{{dataForm.invoiceQuantity}}</p>
<el-form-item label="销售订单号"
prop="salesOrderNo" >
<p>{{dataForm.salesOrderNo}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="销售订单号"
prop="salesOrderId" >
<p>{{dataForm.salesOrderId}}</p>
<el-form-item label="合同名称"
prop="contractName" >
<p>{{dataForm.contractName}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="合同名称"
prop="contractId" >
<p>{{dataForm.contractId}}</p>
<el-form-item label="单据状态 "
prop="status" >
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="客户"
prop="customerId" >
<p>{{dataForm.customerId}}</p>
<el-form-item label="制单人"
prop="creatorUserName" >
<p>{{dataForm.creatorUserName}}</p>
</el-form-item>
</el-col>
<el-col :span="24">
<el-tabs v-model="activezbtwpv" tab-position="top" class="mb-20">
<el-tabs v-model="activewkrlwe" 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">
<p>{{scope.row.materialId}}</p>
</template>
</el-table-column>
<el-table-column prop="quantity" label="数量">
<template slot-scope="scope">
<p>{{scope.row.quantity}}</p>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价">
<template slot-scope="scope">
<p>{{scope.row.unitPrice}}</p>
</template>
</el-table-column>
<el-table-column prop="unit" label="单位">
<template slot-scope="scope">
<p>{{scope.row.unit | dynamicText(unitOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="amount" label="金额">
<template slot-scope="scope">
<p>{{scope.row.amount}}</p>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率 ">
<template slot-scope="scope">
<p>{{ scope.row.taxRate | dynamicText(taxRateOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="taxAmount" label="税额">
<template slot-scope="scope">
<p>{{scope.row.taxAmount}}</p>
</template>
</el-table-column>
<el-table-column prop="amountNotTax" label="不含税金额">
<template slot-scope="scope">
<p>{{scope.row.amountNotTax}}</p>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注信息">
<template slot-scope="scope">
<p>{{scope.row.remark}}</p>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
</el-tab-pane >
<el-tab-pane label="发票明细">
<el-col :span="24" >
@ -154,16 +117,6 @@
<template slot-scope="scope">
<p>{{scope.row.invoiceNo}}</p>
</template>
</el-table-column>
<el-table-column prop="invoiceQuantity" label="发票数量">
<template slot-scope="scope">
<p>{{scope.row.invoiceQuantity}}</p>
</template>
</el-table-column>
<el-table-column prop="involceAmount" label="发票金额">
<template slot-scope="scope">
<p>{{scope.row.involceAmount}}</p>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率 ">
<template slot-scope="scope">
@ -179,22 +132,19 @@
<template slot-scope="scope">
<p>{{scope.row.amountNotTax}}</p>
</template>
</el-table-column>
<el-table-column prop="invoiceStatus" label="发票状态">
<template slot-scope="scope">
<p>{{ scope.row.invoiceStatus | dynamicText(invoiceStatusOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="开票人">
<template slot-scope="scope">
<p>{{scope.row.creatorUserName}}</p>
</template>
</el-table-column>
<el-table-column prop="invoiceDate" label="开票日期">
<template slot-scope="scope">
<p>{{jnpf.dateFormat(scope.row.invoiceDate)}}</p>
<el-table-column prop="remark" label="备注信息">
<template slot-scope="scope">
<p>{{scope.row.remark}}</p>
</template>
</el-table-column>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
@ -226,26 +176,26 @@
id :'',
documentNo : '',
businessDate : '',
amount : 0,
quantity : 0,
customerName : '',
amount : '',
quantity : '',
invoiceQuantity : '',
customerTaxNo : '',
customerAddress : '',
currency : "0",
remark : '',
invoiceAmount : '',
salesOrderNo : '',
contractName : '',
status : "0",
invoiceAmount : 0,
invoiceQuantity : 0,
salesOrderId : "",
contractId : "",
customerId : "",
arinvoices_item1List:[],
creatorUserName : '',
arinvoices_item0List:[],
},
activezbtwpv:'0',
activewkrlwe:'1',
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
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: {},
@ -257,12 +207,8 @@
methods: {
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];
_list.invoiceDate = _list.invoiceDate ? jnpf.dateFormat(_list.invoiceDate) : ''
}
this.dataForm = _dataAll
},

@ -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>

@ -7,67 +7,61 @@
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
<el-col :span="8" >
<el-form-item label="单据编号"
<el-form-item label="单据编号"
prop="documentNo" >
<p>{{dataForm.documentNo}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="客户名称"
prop="customerId" >
<p>{{dataForm.customerId}}</p>
<el-form-item label="客户名称"
prop="customerName" >
<p>{{dataForm.customerName}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="合同名称"
prop="contractId" >
<p>{{dataForm.contractId}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="收款金额"
<el-form-item label="收款金额"
prop="amountCollected" >
<p>{{dataForm.amountCollected}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="收款账户"
<el-form-item label="收款账户"
prop="collectionCount" >
<p>{{dataForm.collectionCount}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="收款银行"
<el-form-item label="收款银行"
prop="collectionBank" >
<p>{{dataForm.collectionBank}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="收款类型 "
<el-form-item label="收款类型 "
prop="paymentType" >
<p>{{ dataForm.paymentType | dynamicText(paymentTypeOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="币别 "
<el-form-item label="币别 "
prop="currency" >
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="结算类型"
<el-form-item label="结算类型"
prop="settlementType" >
<p>{{ dataForm.settlementType | dynamicText(settlementTypeOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="备注信息"
<el-form-item label="备注信息"
prop="remark" >
<p>{{dataForm.remark}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="收款凭证"
<el-form-item label="收款凭证"
prop="voucher" >
<JNPF-UploadFz v-model="dataForm.voucher"
disabled
@ -76,13 +70,13 @@
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="单据状态 "
<el-form-item label="单据状态 "
prop="status" >
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="制单人"
<el-form-item label="制单人"
prop="creatorUserName" >
<p>{{dataForm.creatorUserName}}</p>
</el-form-item>
@ -102,49 +96,49 @@
<p>{{scope.row.amount}}</p>
</template>
</el-table-column>
<el-table-column prop="price" label="订单金额">
<el-table-column prop="creatorUserId" label="订单金额">
<template slot-scope="scope">
<p>{{scope.row.price}}</p>
<p>{{scope.row.creatorUserId}}</p>
</template>
</el-table-column>
<el-table-column prop="amountCollected" label="已收款金额">
<el-table-column prop="creatorUserName" label="已收款金额">
<template slot-scope="scope">
<p>{{scope.row.amountCollected}}</p>
<p>{{scope.row.creatorUserName}}</p>
</template>
</el-table-column>
<el-table-column prop="salesorderId" label="销售订单编号">
<el-table-column prop="deleteTime" label="删除时间">
<template slot-scope="scope">
<p>{{scope.row.salesorderId}}</p>
<p>{{scope.row.deleteTime}}</p>
</template>
</el-table-column>
<el-table-column prop="contractCode" label="合同编号">
<el-table-column prop="lastModifyUserId" label="合同编号">
<template slot-scope="scope">
<p>{{scope.row.contractCode}}</p>
<p>{{scope.row.lastModifyUserId}}</p>
</template>
</el-table-column>
<el-table-column prop="num" label="重量">
<el-table-column prop="lastModifyUserName" label="重量">
<template slot-scope="scope">
<p>{{scope.row.num}}</p>
<p>{{scope.row.lastModifyUserName}}</p>
</template>
</el-table-column>
<!-- <el-table-column prop="taxRate" label="税率">-->
<!-- <template slot-scope="scope">-->
<!-- <p>{{ scope.row.taxRate | dynamicText(taxRateOptions) }}</p>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="advanceAmount" label="垫资金额">
<el-table-column prop="taxRate" label="税率">
<template slot-scope="scope">
<p>{{scope.row.advanceAmount}}</p>
<p>{{ scope.row.taxRate | dynamicText(taxRateOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="rate" label="税额">
<el-table-column prop="lastModifyTime" label="垫资金额">
<template slot-scope="scope">
<p>{{scope.row.rate}}</p>
<p>{{scope.row.lastModifyTime}}</p>
</template>
</el-table-column>
<el-table-column prop="notPrice" label="不含税金额">
<el-table-column prop="deleteUserId" label="税额">
<template slot-scope="scope">
<p>{{scope.row.notPrice}}</p>
<p>{{scope.row.deleteUserId}}</p>
</template>
</el-table-column>
<el-table-column prop="deleteUserName" label="不含税金额">
<template slot-scope="scope">
<p>{{scope.row.deleteUserName}}</p>
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="业务日期">
@ -181,8 +175,6 @@
printId: '',
dataForm: {
id :'',
customerId: '',
contractId: '',
documentNo : '',
customerName : '',
amountCollected : '',

@ -12,24 +12,14 @@
</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="customerNamecolumnOptions" propsValue="id"
<el-form-item label="客户名称" prop="customerName">
<popupSelect v-model="dataForm.customerName" placeholder="请选择" clearable field="customerName"
interfaceId="393371066040385285" :columnOptions="customerNamecolumnOptions" propsValue="supplier_nm"
relationField="supplier_nm" popupType="dialog" popupTitle="选择数据" popupWidth="800px"
@change="popupSelect">
</popupSelect>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="合同名称" prop="contractId">
<popupSelect v-model="dataForm.contractId" placeholder="请选择" clearable field="contractId"
interfaceId="399835312982972805" :bissId="dataForm.code" :columnOptions="contractNamecolumnOptions" 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="amountCollected">
<el-input v-model="dataForm.amountCollected" placeholder="请输入" clearable :style='{"width":"100%"}'>
@ -137,17 +127,13 @@
</el-input>
</template>
</el-table-column>
<<<<<<< HEAD
<el-table-column prop="salesorderId" label="销售订单编号" align="center" >
=======
<el-table-column prop="deleteTime" label="销售订单编号" align="center" >
>>>>>>> 6b66ea0276198dd5eb24cd6f115f6e164cbd7df3
<template slot-scope="scope">
<popupSelect v-model="scope.row.salesorderId" placeholder="请选择" clearable
<popupSelect v-model="scope.row.documentNo" placeholder="请选择" clearable
:field="'deleteTime'+scope.$index" interfaceId="393372436705378053"
:columnOptions="jg_collection_item0deleteTimecolumnOptions" propsValue="id"
:columnOptions="jg_collection_item0deleteTimecolumnOptions" propsValue="document_no"
relationField="document_no" popupType="dialog" popupWidth="800px"
:bissId="dataForm.customerId" @change="popupSelect2">
:bissId="dataForm.customerCode" @change="popupSelect2">
</popupSelect>
</template>
</el-table-column>
@ -239,12 +225,9 @@
loading: false,
isDetail: false,
dataForm: {
code: '',
customerCode: '',
documentNo: '',
customerName: '',
customerId: '',
contractId: '',
amountCollected: '',
collectionCount: '',
collectionBank: '',
@ -272,13 +255,6 @@
"label": "客户等级",
"value": "customer_level"
}, ],
contractNamecolumnOptions: [{
"label": "合同编码",
"value": "contract_code"
}, {
"label": "合同名称",
"value": "contract_name"
} ],
jg_collection_item0deleteTimecolumnOptions: [{
"label": "销售订单ID",
"value": "id"
@ -394,9 +370,7 @@
mounted() {},
methods: {
popupSelect(e, d) {
debugger
this.dataForm.code = d.id;
debugger
this.dataForm.customerCode = d.id;
},
popupSelect2(a, b) {
for (let i = 0; i < this.dataForm.collection_item0List.length; i++) {

@ -30,7 +30,7 @@
</el-button>
<el-button type="text" icon="el-icon-close" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-check" @click="commit()">
<el-button type="text" icon="el-icon-check" @click="exportData()">
</el-button>
<el-button type="text" icon="el-icon-check" @click="confirmprice()">
</el-button>
@ -46,8 +46,7 @@
@selection-change="handleSelectionChange" border>
<el-table-column type="index" width="50" label="序号" fixed="left" align="center" />
<el-table-column prop="documentNo" label="单据编号" fixed="left" sortable width="200" align="center" />
<el-table-column prop="customerId" label="客户名称" fixed="left" sortable width="200" align="center" />
<el-table-column prop="contractId" label="合同名称" fixed="left" sortable width="200" align="center" />
<el-table-column prop="customerName" label="客户名称" fixed="left" sortable width="200" align="center" />
<el-table-column label="币别 " width="80" sortable prop="currency" align="center" >
<template slot-scope="scope">
{{ scope.row.currency | dynamicText(currencyOptions) }}
@ -145,13 +144,9 @@
label: '单据编号'
},
{
prop: 'customerId',
prop: 'customerName',
label: '客户名称'
},
{
prop: 'contractId',
label: '合同名称'
},
{
prop: 'currency',
label: '币别 '
@ -351,38 +346,6 @@
})
}).catch(() => {})
},
commit(){
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
if (this.multipleSelection.length === 1) {
let ids = this.multipleSelection.join()
request({
url: `/api/collection/Collection/commit/${ids}`,
method: 'POST',
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}
if (this.multipleSelection.length > 1){
this.$message({
type: 'error',
message: '请选择单条数据',
duration: 1500
})
}
},
confirmprice() {
if (!this.multipleSelection.length) {
this.$message({
@ -394,9 +357,27 @@
}
let ids = this.multipleSelection.join()
if (this.multipleSelection.length === 1) {
let info = {}
info = this.list.find(function(info) {
return info.id == ids
})
if (info.status != 2) {
this.$message({
type: 'error',
message: '审核中,请先通过审核',
duration: 1500
})
return
}
let param = {};
param = this.list.find(function(param) {
debugger
return param.id == id;
})
request({
url: `/api/collection/Collection/confirmprice/${ids}`,
url: `/api/collection/Collection/confirmprice`,
method: 'POST',
data: param
}).then(res => {
this.$message({
type: 'success',

@ -491,96 +491,6 @@
this.$emit('refresh', true)
}
})
<<<<<<< HEAD
},
request2() {
var _data = this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/poundlist/Poundlist',
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/poundlist/Poundlist/' + 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)
}
})
})
}
},
request() {
var _data =this.dataList()
if (!this.dataForm.id) {
request({
url: '/api/poundlist/Poundlist',
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/poundlist/Poundlist/'+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)
}
})
})
}
},
dataList(){
var _data = JSON.parse(JSON.stringify(this.dataForm));
_data.poundPictures = JSON.stringify(_data.poundPictures)
_data.vehiclePictures = JSON.stringify(_data.vehiclePictures)
return _data;
},
dataInfo(dataAll){
let _dataAll =dataAll
_dataAll.poundPictures = JSON.parse( _dataAll.poundPictures)
_dataAll.vehiclePictures = JSON.parse( _dataAll.vehiclePictures)
this.dataForm = _dataAll
},
},
}
=======
})
}
},
@ -598,5 +508,4 @@
},
},
}
>>>>>>> 6b66ea0276198dd5eb24cd6f115f6e164cbd7df3
</script>

@ -1,424 +1,6 @@
<template>
<div class="JNPF-common-layout">
<<<<<<< HEAD
<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-date-picker v-model="query.poundDate" 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 label="磅单号">
<el-input v-model="query.poundlistNo" 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-check" @click="createSale()" >生成销售
</el-button>
</div>
<div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/>
</el-tooltip>
<screenfull isContainer/>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange">
<el-table-column prop="vehicleId" label="车牌号" width="0" align="left"
/>
<el-table-column prop="customerId" label="客户" width="0" align="left"
/>
<el-table-column prop="salesId" label="销售合同" width="0" align="left"
/>
<el-table-column prop="supplierName" label="供应商" width="0" align="left"
/>
<el-table-column prop="purchaseId" label="采购合同" width="0" align="left"
/>
<el-table-column prop="materialId" label="物料名称" width="0" align="left"
/>
<el-table-column label="是否垫资" width="0" prop="advance" algin="left"
>
<template slot-scope="scope">
{{ scope.row.advance | dynamicText(advanceOptions) }}
</template>
</el-table-column>
<el-table-column label="单位" width="0" prop="unit" algin="left"
>
<template slot-scope="scope">
{{ scope.row.unit | dynamicText(unitOptions) }}
</template>
</el-table-column>
<el-table-column prop="grossWeight" label="毛重" width="0" align="left"
/>
<el-table-column prop="tareWeight" label="皮重" width="0" align="left"
/>
<el-table-column prop="buckleWeight" label="扣重" width="0" align="left"
/>
<el-table-column prop="netWeight" label="净重" width="0" align="left"
/>
<el-table-column prop="settlement" label="结算重量" width="0" align="left"
/>
<el-table-column prop="purchasePrice" label="采购单价" width="0" align="left"
/>
<el-table-column prop="salesPrice" label="销售价格" width="0" align="left"
/>
<el-table-column prop="inputDate" label="进项票日期" width="0" align="left"
/>
<el-table-column prop="outputDate" label="销项票日期" width="0" align="left"
/>
<el-table-column prop="payDate" label="付款日期" width="0" align="left"
/>
<el-table-column prop="paymentDate" label="回款日期" width="0" align="left"
/>
<el-table-column prop="poundDate" label="磅单日期" width="0" align="left"
/>
<el-table-column prop="businessId" label="业务员" width="0" align="left"
/>
<el-table-column prop="remark" label="备注" width="0" align="left"
/>
<el-table-column prop="poundPictures" label="磅单图片" width="150" align="center">
<template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.poundPictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000">
<img :src="`/dev${item.url}`" width="100%" />
<img
slot="reference"
:src="`/dev${item.url}`"
:alt="`/dev${item.url}`"
style="max-height: 70px;max-width: 70px; padding: 5px"
/>
</el-popover>
</span>
</template>
</el-table-column>
<el-table-column prop="vehiclePictures" label="车辆图片" width="150" align="center">
<template slot-scope="scope">
<span v-for="(item,index) in JSON.parse(scope.row.vehiclePictures)" :key="index">
<el-popover placement="bottom" trigger="click" width="1000">
<img :src="`/dev${item.url}`" width="100%" />
<img
slot="reference"
:src="`/dev${item.url}`"
:alt="`/dev${item.url}`"
style="max-height: 70px;max-width: 70px; padding: 5px"
/>
</el-popover>
</span>
</template>
</el-table-column>
<!-- <el-table-column prop="poundlistNo" label="磅单号" width="0" align="left"-->
<!--/>-->
<!-- <el-table-column label="运输类型" width="0" prop="transportType" algin="left"-->
<!--&gt;-->
<!-- <template slot-scope="scope">-->
<!-- {{ scope.row.transportType | dynamicText(transportTypeOptions) }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="transportPrice" label="运费" width="0" align="left"-->
<!--/>-->
<!-- <el-table-column prop="naturalId" 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>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/>
<JNPF-Form3 v-if="formVisible" ref="JNPFForm3" @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 JNPFForm3 from './salesForm'
import ExportBox from './ExportBox'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default {
components: {JNPFForm,JNPFForm3, ExportBox,Detail},
data() {
return {
detailVisible: false,
query: {
poundDate:undefined,
poundlistNo: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: 'vehicleId', label: '车牌号'},
{prop: 'customerId', label: '客户名称'},
{prop: 'salesId', label: '销售合同'},
{prop: 'supplierName', label: '供应商名称'},
{prop: 'purchaseId', label: '采购合同'},
{prop: 'materialId', label: '物料名称'},
{prop: 'advance', label: '是否垫资'},
{prop: 'unit', label: '单位'},
{prop: 'grossWeight', label: '毛重'},
{prop: 'tareWeight', label: '皮重'},
{prop: 'buckleWeight', label: '扣重'},
{prop: 'netWeight', label: '净重'},
{prop: 'settlement', label: '结算重量'},
{prop: 'purchasePrice', label: '采购单价'},
{prop: 'salesPrice', label: '销售价格'},
{prop: 'inputDate', label: '进项票日期'},
{prop: 'outputDate', label: '销项票日期'},
{prop: 'payDate', label: '付款日期'},
{prop: 'paymentDate', label: '回款日期'},
{prop: 'poundDate', label: '磅单日期'},
{prop: 'businessId', label: '业务员'},
{prop: 'remark', label: '备注'},
{prop: 'poundlistNo', label: '磅单号'},
{prop: 'transportType', label: '运输类型'},
{prop: 'transportPrice', label: '运费'},
{prop: 'naturalId', label: '自然人'},
],
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
unitProps:{"label":"fullName","value":"id"},
transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}],
transportTypeProps:{"label":"fullName","value":"id"},
advanceOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
advanceProps:{"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/poundlist/Poundlist/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/poundlist/Poundlist/${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/poundlist/Poundlist/batchRemove/${ids}`,
method: 'DELETE'
}).then(res => {
this.$message({
type: 'success',
message: res.msg,
onClose: () => {
this.initData()
}
});
})
}).catch(() => {
})
},
createSale(){
if (!this.multipleSelection.length) {
this.$message({
type: 'error',
message: '请选择一条数据',
duration: 1500,
})
return
}
const ids = this.multipleSelection.join()
request({
url: `/api/poundlist/Poundlist/createsale/${ids}`,
method: 'post'
}).then(res => {
var 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.list = _list
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm3.init(list)
})
}else {
this.$message({
message: '未找到符合条件数据',
type: 'error',
duration: 1000
})
}
// this.$message({
// type: 'success',
// message: res.msg,
// onClose: () => {
// this.initData()
// }
// });
})
},
addOrUpdateHandle(id, isDetail) {
this.formVisible = true
this.$nextTick(() => {
this.$refs.JNPFForm.init(id, isDetail)
})
},
exportData() {
this.exportBoxVisible = true
this.$nextTick(() => {
this.$refs.ExportBox.init(this.columnList)
})
},
download(data) {
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId}
request({
url: `/api/poundlist/Poundlist/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()
}
=======
<div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent>
@ -809,7 +391,6 @@ width="150" >
duration: 1500,
})
return
>>>>>>> 6b66ea0276198dd5eb24cd6f115f6e164cbd7df3
}
var statusFlag = true;
var purchaseIdArr = [];

@ -20,8 +20,8 @@
</el-col>
<el-col :span="8" >
<el-form-item label="来源单号"
prop="salesId" >
<p>{{dataForm.salesId}}</p>
prop="sourceNo" >
<p>{{dataForm.sourceNo}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
@ -42,12 +42,12 @@
<p>{{dataForm.num}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="客户"
prop="customerId" >
<p>{{dataForm.customerId}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="客户名称"
prop="customerName" >
<p>{{dataForm.customerName}}</p>
</el-form-item>
</el-col>
<el-col :span="16" >
<el-form-item label="备注"
prop="remark" >
@ -67,31 +67,31 @@
</el-form-item>
</el-col>
<el-col :span="24">
<el-tabs v-model="activezlqlfb" tab-position="top" class="mb-20">
<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>
<!-- <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="车牌号">
<el-table-column prop="licenseNo" label="车牌号">
<template slot-scope="scope">
<p>{{scope.row.vehicleId}}</p>
<p>{{scope.row.licenseNo}}</p>
</template>
</el-table-column>
<el-table-column prop="materialId" label="物料名称">
<el-table-column prop="materialName" label="物料名称">
<template slot-scope="scope">
<p>{{scope.row.materialId}}</p>
<p>{{scope.row.materialName}}</p>
</template>
</el-table-column>
<el-table-column prop="reservoirareaId" label="库区名称">
<el-table-column prop="reservoirareaId" label="库区id">
<template slot-scope="scope">
<p>{{scope.row.reservoirareaId}}</p>
</template>
</el-table-column>
<el-table-column prop="warehouseId" label="仓库名称">
<el-table-column prop="warehouseId" label="仓库id">
<template slot-scope="scope">
<p>{{scope.row.warehouseId}}</p>
</template>
@ -131,9 +131,9 @@
<p>{{scope.row.batchNo}}</p>
</template>
</el-table-column>
<el-table-column prop="poundType" label="磅单类型">
<el-table-column prop="deleteUserId" label="磅单类型">
<template slot-scope="scope">
<p>{{ scope.row.poundType | dynamicText(poundTypeOptions) }}</p>
<p>{{ scope.row.deleteUserId | dynamicText(deleteUserIdOptions) }}</p>
</template>
</el-table-column>
</el-table>
@ -167,7 +167,7 @@
id :'',
documentNo : '',
type : "0",
salesId : "XS002",
sourceNo : "XS002",
amount : '',
currency : "0",
num : '',
@ -181,14 +181,14 @@
lastModifyUserName : "",
receiptout_item0List:[],
},
activezlqlfb:'0',
activefqhgdj:'0',
typeOptions:[{"fullName":"销售出库","id":"0"},{"fullName":"购销出库","id":"1"}],
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"审批中","id":"1"},{"fullName":"已审批","id":"2"}],
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"}],
deleteUserIdOptions:[{"fullName":"贸易","id":"0"},{"fullName":"其它","id":"1"}],
}
},
computed: {},
@ -213,7 +213,7 @@
if(this.dataForm.id){
this.loading = true
request({
url: '/api/receipout/Receiptout/detail/'+this.dataForm.id,
url: '/api/example/Receiptout/detail/'+this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)

@ -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>

@ -7,80 +7,80 @@
<el-form ref="elForm" :model="dataForm" size="small" label-width="100px" label-position="right" >
<template v-if="!loading">
<el-col :span="8" >
<el-form-item label="单据编号"
<el-form-item label="单据编号"
prop="documentNo" >
<p>{{dataForm.documentNo}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="销售订单"
<el-form-item label="销售订单"
prop="salesOrderId" >
<p>{{dataForm.salesOrderId}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="币别"
<el-form-item label="币别"
prop="currency" >
<p>{{ dataForm.currency | dynamicText(currencyOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="退款金额"
<el-form-item label="退款金额"
prop="refundAmount" >
<p>{{dataForm.refundAmount}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="退货数量"
<el-form-item label="退货数量"
prop="refundNum" >
<p>{{dataForm.refundNum}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="备注"
<el-form-item label="备注"
prop="remark" >
<p>{{dataForm.remark}}</p>
</el-form-item>
</el-col>
<!-- <el-col :span="8" >-->
<!-- <el-form-item label="合同名称"-->
<!-- prop="jnpf_jg_salesorder_jnpf_contractName" >-->
<!-- <p>{{dataForm.jnpf_jg_salesorder_jnpf_contractName}}</p>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8" >-->
<!-- <el-form-item label="客户名称"-->
<!-- prop="jnpf_jg_salesorder_jnpf_costomerName" >-->
<!-- <p>{{dataForm.jnpf_jg_salesorder_jnpf_costomerName}}</p>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8" >-->
<!-- <el-form-item label="实退金额"-->
<!-- prop="actualAmount" >-->
<!-- <p>{{dataForm.actualAmount}}</p>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8" >-->
<!-- <el-form-item label="单据状态 "-->
<!-- prop="status" >-->
<!-- <p>{{ dataForm.status | dynamicText(statusOptions) }} </p>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8" >-->
<!-- <el-form-item label="创建时间"-->
<!-- prop="creatorTime" >-->
<!-- <p>{{dataForm.creatorTime}}</p>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8" >-->
<!-- <el-form-item label="创建人"-->
<!-- prop="creatorUserName" >-->
<!-- <p>{{dataForm.creatorUserName}}</p>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="8" >
<el-form-item label="合同名称"
prop="jnpf_jg_salesorder_jnpf_contractName" >
<p>{{dataForm.jnpf_jg_salesorder_jnpf_contractName}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="客户名称"
prop="jnpf_jg_salesorder_jnpf_costomerName" >
<p>{{dataForm.jnpf_jg_salesorder_jnpf_costomerName}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="实退金额"
prop="actualAmount" >
<p>{{dataForm.actualAmount}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="单据状态 "
prop="status" >
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="创建时间"
prop="creatorTime" >
<p>{{dataForm.creatorTime}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="创建人"
prop="creatorUserName" >
<p>{{dataForm.creatorUserName}}</p>
</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-tab-pane label="商品信息">
<el-col :span="24" >
<el-form-item label-width="0">
<div class="JNPF-common-title">
@ -88,14 +88,14 @@
</div>
<el-table :data="dataForm.saleback_item0List" size='mini' >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="vehicleId" label="车牌号">
<el-table-column prop="licenseNum" label="车牌号">
<template slot-scope="scope">
<p>{{scope.row.vehicleId}}</p>
<p>{{scope.row.licenseNum}}</p>
</template>
</el-table-column>
<el-table-column prop="materialId" label="物料名称">
<el-table-column prop="materialName" label="物料名称">
<template slot-scope="scope">
<p>{{scope.row.materialId}}</p>
<p>{{scope.row.materialName}}</p>
</template>
</el-table-column>
<el-table-column prop="settlement" label="结算重量 ">
@ -128,11 +128,11 @@
<p>{{scope.row.notAmount}}</p>
</template>
</el-table-column>
<el-table-column prop="businessId" label="业务员">
<template slot-scope="scope">
<p>{{scope.row.businessId}}</p>
<el-table-column prop="pountUser" label="业务员">
<template slot-scope="scope">
<p>{{scope.row.pountUser}}</p>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="pountType" label="磅单类型 ">
<template slot-scope="scope">
<p>{{ scope.row.pountType | dynamicText(pountTypeOptions) }}</p>
@ -178,13 +178,13 @@
creatorTime : "",
creatorUserName : "",
saleback_item0List:[],
// jg_salesorder:
// {
// contractName:'',
// costomerName:'',
// },
// jnpf_jg_salesorder_jnpf_contractName:'',
// jnpf_jg_salesorder_jnpf_costomerName:'',
jg_salesorder:
{
contractName:'',
costomerName:'',
},
jnpf_jg_salesorder_jnpf_contractName:'',
jnpf_jg_salesorder_jnpf_costomerName:'',
},
activeqkzogz:'0',
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
@ -204,13 +204,12 @@
methods: {
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
_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
debugger
},
init(id) {

@ -64,37 +64,6 @@
</div>
<el-table :data="dataForm.saleback_item0List" size='mini'>
<el-table-column type="index" width="50" label="序号" align="center" />
<<<<<<< HEAD
<!-- <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">
</popupSelect>
</template>
</el-table-column>
=======
<el-table-column prop="licenseNum" label="车牌号">
<template slot-scope="scope">
<popupSelect v-model="scope.row.licenseNum" placeholder="请选择"
@ -113,7 +82,6 @@
</el-input>
</template>
</el-table-column>
>>>>>>> 6b66ea0276198dd5eb24cd6f115f6e164cbd7df3
<el-table-column prop="settlement" label="结算重量 ">
<template slot-scope="scope">
<el-input v-model="scope.row.settlement" placeholder="请输入" clearable
@ -162,14 +130,13 @@
</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">
</popupSelect>
</template>
</el-table-column>
<el-table-column prop="pountUser" label="业务员">
<template slot-scope="scope">
<el-input v-model="scope.row.pountUser" placeholder="请输入" clearable
:style='{"width":"100%"}'>
</el-input>
</template>
</el-table-column>
<el-table-column prop="pountType" label="磅单类型 ">
<template slot-scope="scope">
<el-select v-model="scope.row.pountType" placeholder="请选择" clearable
@ -233,12 +200,12 @@
creatorTime: "",
creatorUserName: "",
saleback_item0List: [],
// jg_salesorder: {
// contractName: '',
// costomerName: '',
// },
// jnpf_jg_salesorder_jnpf_contractName: '',
// jnpf_jg_salesorder_jnpf_costomerName: '',
jg_salesorder: {
contractName: '',
costomerName: '',
},
jnpf_jg_salesorder_jnpf_contractName: '',
jnpf_jg_salesorder_jnpf_costomerName: '',
},
activeqkzogz: '0',
rules: {},
@ -281,19 +248,6 @@
"fullName": "已审批",
"id": "2"
}],
<<<<<<< HEAD
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"},],
=======
>>>>>>> 6b66ea0276198dd5eb24cd6f115f6e164cbd7df3
saleback_item0licenseNumcolumnOptions: [{
"label": "车牌号",
@ -359,7 +313,6 @@
"fullName": "其他",
"id": "1"
}],
jg_salesback_item0businessIdcolumnOptions:[ {"label":"人员名称","value":"F_RealName"}, {"label":"人员职位","value":"F_FullName"},],
}
},
computed: {},
@ -370,24 +323,6 @@
popupSelectChange2(a, b){
var excludeFields = [];
for (let i = 0; i < this.dataForm.saleback_item0List.length; i++) {
<<<<<<< HEAD
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
}
})
=======
excludeFields.push(this.dataForm.saleback_item0List[i].licenseNo);
if(a == this.dataForm.saleback_item0List[i].licenseNum){
this.dataForm.saleback_item0List[i].materialName = b.material_name;
@ -399,10 +334,8 @@
this.dataForm.saleback_item0List[i].notAmount = b.not_amount;
this.dataForm.saleback_item0List[i].pountUser = b.pound_user;
this.dataForm.saleback_item0List[i].pountType = b.pound_type;
>>>>>>> 6b66ea0276198dd5eb24cd6f115f6e164cbd7df3
}
}
let price =
this.excludeFields = excludeFields;
},
popupSelectChange(e,d){
@ -440,7 +373,6 @@
url: '/api/saleback/Saleback/' + this.dataForm.id,
method: 'get'
}).then(res => {
debugger
this.dataInfo(res.data)
this.loading = false
});
@ -515,8 +447,8 @@
},
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
_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];
}
@ -524,14 +456,12 @@
},
dataInfo(dataAll) {
let _dataAll = dataAll
debugger
// _dataAll.jnpf_jg_salesorder_jnpf_contractName = _dataAll.jg_salesorder.contractName
// _dataAll.jnpf_jg_salesorder_jnpf_costomerName = _dataAll.jg_salesorder.costomerName
_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
debugger
},
},
}

@ -42,10 +42,10 @@
/>
<el-table-column prop="salesOrderId" label="销售订单" width="200" align="center"sortable fixed="left"
/>
<!-- <el-table-column prop="jg_salesorder.contractName" label="合同名称" width="120"sortable align="center"-->
<!-- />-->
<!-- <el-table-column prop="jg_salesorder.costomerName" label="客户名称" width="200" sortable align="center"-->
<!-- />-->
<el-table-column prop="jg_salesorder.contractName" label="合同名称" width="120"sortable align="center"
/>
<el-table-column prop="jg_salesorder.costomerName" label="客户名称" width="200" sortable align="center"
/>
<el-table-column prop="refundAmount" label="退款金额" width="120" align="center" sortable
/>
<el-table-column prop="actualAmount" label="实退金额" width="120" align="center" sortable
@ -131,8 +131,8 @@
columnList: [
{ prop: 'documentNo', label: '单据编号' },
{ prop: 'salesOrderId', label: '销售订单' },
// { prop: 'jg_salesorder.contractName', label: '' },
// { prop: 'jg_salesorder.costomerName', label: '' },
{ prop: 'jg_salesorder.contractName', label: '合同名称' },
{ prop: 'jg_salesorder.costomerName', label: '客户名称' },
{ prop: 'refundAmount', label: '退款金额' },
{ prop: 'actualAmount', label: '实退金额' },
{ prop: 'currency', label: '币别' },

@ -14,14 +14,8 @@
</el-col>
<el-col :span="8" >
<el-form-item label="合同名称"
prop="contractId" >
<p>{{dataForm.contractId}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="客户名称"
prop="customerId" >
<p>{{dataForm.customerId}}</p>
prop="contractName" >
<p>{{dataForm.contractName}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
@ -43,7 +37,7 @@
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="量"
<el-form-item label="量"
prop="num" >
<p>{{dataForm.num}}</p>
</el-form-item>
@ -60,12 +54,18 @@
<p>{{dataForm.notPrice}}</p>
</el-form-item>
</el-col>
<el-col :span="16" >
<el-col :span="8" >
<el-form-item label="备注信息"
prop="remark" >
<p>{{dataForm.remark}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="客户名称"
prop="costomerName" >
<p>{{dataForm.costomerName}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="已回款金额"
prop="amountCollected" >
@ -85,15 +85,15 @@
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="单据状态 "
prop="status" >
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
<el-form-item label="来源系统"
prop="sourceSystem" >
<p>{{ dataForm.sourceSystem | dynamicText(sourceSystemOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="ERP订单号"
prop="erpNo" >
<p>{{dataForm.erpNo}}</p>
<el-form-item label="单据状态 "
prop="status" >
<p>{{ dataForm.status | dynamicText(statusOptions) }} </p>
</el-form-item>
</el-col>
<el-col :span="8" >
@ -102,14 +102,8 @@
<p>{{dataForm.creatorUserName}}</p>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item label="制单时间"
prop="creatorTime" >
<p>{{dataForm.creatorTime}}</p>
</el-form-item>
</el-col>
<el-col :span="24">
<el-tabs v-model="activemtmitd" tab-position="top" class="mb-20">
<el-tabs v-model="activexvlbvm" tab-position="top" class="mb-20">
<el-tab-pane label="磅单信息">
<el-col :span="24" >
<el-form-item label-width="0">
@ -118,14 +112,14 @@
</div>
<el-table :data="dataForm.salesorder_item0List" size='mini' >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="vehicleId" label="车号">
<el-table-column prop="licenseNum" label="车牌号">
<template slot-scope="scope">
<p>{{scope.row.vehicleId}}</p>
<p>{{scope.row.licenseNum}}</p>
</template>
</el-table-column>
<el-table-column prop="materialId" label="物料名称">
<el-table-column prop="materialName" label="物料名称">
<template slot-scope="scope">
<p>{{scope.row.materialId}}</p>
<p>{{scope.row.materialName}}</p>
</template>
</el-table-column>
<el-table-column prop="poundType" label="类型">
@ -148,7 +142,7 @@
<p>{{ scope.row.advance | dynamicText(advanceOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="unitPrice" label="单价">
<el-table-column prop="unitPrice" label="含税单价">
<template slot-scope="scope">
<p>{{scope.row.unitPrice}}</p>
</template>
@ -173,11 +167,20 @@
<p>{{scope.row.noPrice}}</p>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注">
<template slot-scope="scope">
<p>{{scope.row.remark}}</p>
<el-table-column prop="poundPictures" label="磅单图片">
<template slot-scope="scope">
<!-- <p>{{scope.row.poundPictures}}</p>-->
<JNPF-UploadImg v-model="scope.row.poundPictures"
disabled
detailed :fileSize="500" sizeUnit="MB" :limit="9" >
</JNPF-UploadImg>
</template>
</el-table-column>
</el-table-column>
<el-table-column prop="vehiclePictures" label="车辆图片">
<template slot-scope="scope">
<p>{{scope.row.vehiclePictures}}</p>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
@ -200,64 +203,41 @@
<p>{{jnpf.dateFormat(scope.row.issueDate)}}</p>
</template>
</el-table-column>
<el-table-column prop="vehicleId" label="车牌号">
<template slot-scope="scope">
<p>{{scope.row.vehicleId}}</p>
</template>
</el-table-column>
<el-table-column prop="materialId" label="物料名称">
<el-table-column prop="num" label="出库数量">
<template slot-scope="scope">
<p>{{scope.row.materialId}}</p>
<p>{{scope.row.num}}</p>
</template>
</el-table-column>
<el-table-column prop="reservoirareaId" label="库区名称">
<template slot-scope="scope">
<p>{{scope.row.reservoirareaId}}</p>
</template>
</el-table-column>
<el-table-column prop="warehouseId" label="仓库名称">
<template slot-scope="scope">
<p>{{scope.row.warehouseId}}</p>
</template>
</el-table-column>
<el-table-column prop="deliveryNum" label="出库重量">
<template slot-scope="scope">
<p>{{scope.row.deliveryNum}}</p>
</template>
</el-table-column>
<el-table-column prop="unit" label="计量单位">
<template slot-scope="scope">
<p>{{ scope.row.unit | dynamicText(jnpf_jg_collection_jnpf_collectionCountOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="price" label="单价">
<template slot-scope="scope">
<p>{{scope.row.price}}</p>
</template>
</el-table-column>
<el-table-column prop="rate" label="税率">
<template slot-scope="scope">
<p>{{ scope.row.rate | dynamicText(deleteUserNameOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="amount" label="金额">
<el-table-column prop="amount" label="出库金额">
<template slot-scope="scope">
<p>{{scope.row.amount}}</p>
</template>
</el-table-column>
<el-table-column prop="rateAmount" label="税额">
</el-table>
</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.collectionsoitemList" size='mini' >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="paymentType" label="收款类型 ">
<template slot-scope="scope">
<p>{{scope.row.rateAmount}}</p>
<p>{{ scope.row.paymentType | dynamicText(paymentTypeOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="batchNo" label="批次号">
<el-table-column prop="amountCollected" label="收款金额">
<template slot-scope="scope">
<p>{{scope.row.batchNo}}</p>
<p>{{scope.row.amountCollected}}</p>
</template>
</el-table-column>
<el-table-column prop="poundType" label="磅单类型">
<el-table-column prop="remark" label="备注">
<template slot-scope="scope">
<p>{{ scope.row.poundType | dynamicText(customerNameOptions) }}</p>
<p>{{scope.row.remark}}</p>
</template>
</el-table-column>
</el-table>
@ -282,10 +262,15 @@
<p>{{scope.row.invoiceCode}}</p>
</template>
</el-table-column>
<el-table-column prop="involceAmount" label="金额">
<el-table-column prop="involceAmount" label="发票金额">
<template slot-scope="scope">
<p>{{scope.row.involceAmount}}</p>
</template>
</el-table-column>
<el-table-column prop="invoiceQuantity" label="发票数量">
<template slot-scope="scope">
<p>{{scope.row.invoiceQuantity}}</p>
</template>
</el-table-column>
<el-table-column prop="taxRate" label="税率 ">
<template slot-scope="scope">
@ -307,17 +292,17 @@
<p>{{ scope.row.invoiceStatus | dynamicText(invoiceStatusOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="invoiceDate" label="开票日期">
<el-table-column prop="creatorUserName" label="开票人">
<template slot-scope="scope">
<p>{{jnpf.dateFormat(scope.row.invoiceDate)}}</p>
<p>{{scope.row.creatorUserName}}</p>
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="开票人">
<el-table-column prop="invoiceDate" label="开票日期">
<template slot-scope="scope">
<p>{{scope.row.creatorUserName}}</p>
<p>{{jnpf.dateFormat(scope.row.invoiceDate)}}</p>
</template>
</el-table-column>
<el-table-column prop="attachMent" label="发票文件">
<el-table-column prop="attachMent" label="发票附件 ">
<template slot-scope="scope">
<JNPF-UploadFz v-model="scope.row.attachMent"
disabled
@ -329,47 +314,7 @@
</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.collectionsoitemList" size='mini' >
<el-table-column type="index" width="50" label="序号" align="center" />
<el-table-column prop="documentNo" label="收款单号">
<template slot-scope="scope">
<p>{{scope.row.documentNo}}</p>
</template>
</el-table-column>
<el-table-column prop="businessDate" label="收款时间">
<template slot-scope="scope">
<p>{{jnpf.dateFormat(scope.row.businessDate)}}</p>
</template>
</el-table-column>
<el-table-column prop="amountCollected" label="收款金额">
<template slot-scope="scope">
<p>{{scope.row.amountCollected}}</p>
</template>
</el-table-column>
<el-table-column prop="paymentType" label="收款方式">
<template slot-scope="scope">
<p>{{ scope.row.paymentType | dynamicText(settlementTypeOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注">
<template slot-scope="scope">
<p>{{scope.row.remark}}</p>
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="创建人">
<template slot-scope="scope">
<p>{{scope.row.creatorUserName}}</p>
</template>
</el-table-column>
</el-table>
</el-form-item>
</el-col>
<el-tab-pane label="费用信息">
</el-tab-pane >
<el-tab-pane label="退货信息">
<el-col :span="24" >
@ -383,11 +328,6 @@
<template slot-scope="scope">
<p>{{scope.row.documentNo}}</p>
</template>
</el-table-column>
<el-table-column prop="creatorTime" label="退货日期">
<template slot-scope="scope">
<p>{{jnpf.dateFormat(scope.row.creatorTime)}}</p>
</template>
</el-table-column>
<el-table-column prop="refundNum" label="退货数量">
<template slot-scope="scope">
@ -399,9 +339,9 @@
<p>{{scope.row.refundAmount}}</p>
</template>
</el-table-column>
<el-table-column prop="creatorUserName" label="退货人">
<el-table-column prop="creatorTime" label="退货日期">
<template slot-scope="scope">
<p>{{scope.row.creatorUserName}}</p>
<p>{{jnpf.dateFormat(scope.row.creatorTime)}}</p>
</template>
</el-table-column>
</el-table>
@ -420,6 +360,11 @@
<template slot-scope="scope">
<p>{{scope.row.documentno}}</p>
</template>
</el-table-column>
<el-table-column prop="settlementtype" label="付款方式">
<template slot-scope="scope">
<p>{{ scope.row.settlementtype | dynamicText(settlementtypeOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="duedate" label="付款日期">
<template slot-scope="scope">
@ -430,11 +375,6 @@
<template slot-scope="scope">
<p>{{scope.row.paymentamount}}</p>
</template>
</el-table-column>
<el-table-column prop="settlementtype" label="付款方式">
<template slot-scope="scope">
<p>{{ scope.row.settlementtype | dynamicText(settlementtypeOptions) }}</p>
</template>
</el-table-column>
<el-table-column prop="remark" label="备注">
<template slot-scope="scope">
@ -444,6 +384,8 @@
</el-table>
</el-form-item>
</el-col>
</el-tab-pane >
<el-tab-pane label="补充信息">
</el-tab-pane >
</el-tabs>
</el-col>
@ -471,8 +413,7 @@
dataForm: {
id :'',
documentNo : '',
contractCode : "",
costomerCode : "",
contractName : "",
currency : "0",
contractNo : '',
advanceAmount : '',
@ -480,34 +421,32 @@
price : '',
notPrice : '',
remark : '',
costomerName : '',
amountCollected : '',
invoiceNum : '',
invoiceAmount : '',
sourceSystem : "0",
status : "0",
erpNo : '',
creatorUserName : "",
creatorTime : "",
salesorder_item0List:[],
receiptoutsoitemList:[],
arinvoices_item0soitemList:[],
collectionsoitemList:[],
arinvoices_item0soitemList:[],
salesbacksoitemList:[],
paymentsoitemList:[],
},
activemtmitd:'1',
activexvlbvm:'0',
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
sourceSystemOptions:[{"fullName":"人工创建","id":"0"},{"fullName":"商城平台","id":"1"}],
statusOptions:[{"fullName":"已保存","id":"0"},{"fullName":"开票中","id":"1"},{"fullName":"付款申请","id":"2"},{"fullName":"待回款","id":"3"},{"fullName":"回款中","id":"4"},{"fullName":"归档","id":"5"}],
poundTypeOptions:[{"fullName":"贸易","id":"0"},{"fullName":"其他","id":"1"}],
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
advanceOptions:[{"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"}],
jnpf_jg_collection_jnpf_collectionCountOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
deleteUserNameOptions:[{"fullName":"13","id":"0"},{"fullName":"9","id":"1"},{"fullName":"6","id":"2"},{"fullName":"5","id":"3"},{"fullName":"3","id":"4"},{"fullName":"0","id":"5"}],
customerNameOptions:[{"fullName":"贸易","id":"0"},{"fullName":"自加工","id":"1"},{"fullName":"委外","id":"2"},{"fullName":"倒运","id":"3"}],
paymentTypeOptions:[{"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"}],
invoiceStatusOptions:[{"fullName":"正常","id":"0"},{"fullName":"红冲","id":"1"},{"fullName":"作废","id":"2"}],
settlementTypeOptions:[{"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"}],
}
},
@ -527,15 +466,14 @@
var _list = _dataAll.receiptoutsoitemList[i];
_list.issueDate = _list.issueDate ? jnpf.dateFormat(_list.issueDate) : ''
}
for(let i=0;i<_dataAll.collectionsoitemList.length;i++){
var _list = _dataAll.collectionsoitemList[i];
}
for(let i=0;i<_dataAll.arinvoices_item0soitemList.length;i++){
var _list = _dataAll.arinvoices_item0soitemList[i];
_list.invoiceDate = _list.invoiceDate ? jnpf.dateFormat(_list.invoiceDate) : ''
_list.attachMent = _list.attachMent? JSON.parse(_list.attachMent):[]
}
for(let i=0;i<_dataAll.collectionsoitemList.length;i++){
var _list = _dataAll.collectionsoitemList[i];
_list.businessDate = _list.businessDate ? jnpf.dateFormat(_list.businessDate) : ''
}
for(let i=0;i<_dataAll.salesbacksoitemList.length;i++){
var _list = _dataAll.salesbacksoitemList[i];
_list.creatorTime = _list.creatorTime ? jnpf.dateFormat(_list.creatorTime) : ''
@ -554,7 +492,7 @@
if(this.dataForm.id){
this.loading = true
request({
url: '/api/saleorder/Saleorderitem/detail/'+this.dataForm.id,
url: '/api/saleorder/Saleorder/detail/'+this.dataForm.id,
method: 'get'
}).then(res => {
this.dataInfo(res.data)

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…
Cancel
Save