|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
<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">
|
|
|
|
|
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">
|
|
|
|
@ -19,7 +19,9 @@
|
|
|
|
|
<el-form-item label="合同名称"
|
|
|
|
|
prop="contractName">
|
|
|
|
|
<popupSelect v-model="dataForm.contractName"
|
|
|
|
|
placeholder="请选择" clearable field="contractName" interfaceId="390143765857220229" :columnOptions="contractNamecolumnOptions" propsValue="contract_name" relationField="contract_name" popupType="dialog"
|
|
|
|
|
placeholder="请选择" clearable field="contractName" interfaceId="390143765857220229"
|
|
|
|
|
:excludeFields="excludeFields" :columnOptions="contractNamecolumnOptions"
|
|
|
|
|
propsValue="contract_name" relationField="contract_name" popupType="dialog"
|
|
|
|
|
popupTitle="选择数据" popupWidth="800px" @change="popupSelectChange">
|
|
|
|
|
|
|
|
|
|
</popupSelect>
|
|
|
|
@ -39,7 +41,8 @@
|
|
|
|
|
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-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>
|
|
|
|
@ -89,15 +92,7 @@
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="16" >
|
|
|
|
|
<el-form-item label="备注信息"
|
|
|
|
|
prop="remark" >
|
|
|
|
|
<el-input v-model="dataForm.remark"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="制单人"
|
|
|
|
|
prop="creatorUserName">
|
|
|
|
@ -157,11 +152,21 @@
|
|
|
|
|
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-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="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="24">
|
|
|
|
|
<el-tabs v-model="activedhrfmu" tab-position="top" class="mb-20">
|
|
|
|
|
<el-tab-pane label="磅单信息">
|
|
|
|
@ -175,8 +180,11 @@
|
|
|
|
|
<el-table-column prop="licenseNum" label="车牌号">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<popupSelect v-model="scope.row.licenseNum"
|
|
|
|
|
placeholder="请选择" clearable :field="'licenseNum'+scope.$index" interfaceId="389754644018016581"
|
|
|
|
|
:bissId="dataForm.contractCode" :columnOptions="purchaseorder_item0licenseNumcolumnOptions" propsValue="license_no"
|
|
|
|
|
placeholder="请选择" clearable :field="'licenseNum'+scope.$index"
|
|
|
|
|
interfaceId="389754644018016581"
|
|
|
|
|
:bissId="dataForm.contractCode" :excludeFields="excludeFields"
|
|
|
|
|
:columnOptions="purchaseorder_item0licenseNumcolumnOptions"
|
|
|
|
|
propsValue="license_no"
|
|
|
|
|
relationField="license_no" popupType="dialog" @change="popupSelectChange2"
|
|
|
|
|
popupWidth="800px"
|
|
|
|
|
>
|
|
|
|
@ -186,80 +194,85 @@
|
|
|
|
|
<el-table-column prop="materialName" label="物料名称">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.materialName"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"300%"}'>
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"300%"}' :disabled="true">
|
|
|
|
|
</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 :style='{"width":"300%"}'>
|
|
|
|
|
<el-option v-for="(item, index) in pountTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"300%"}' :disabled="true">
|
|
|
|
|
<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 prop="netWeight" label="净重">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.netWeight"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"300%"}'>
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"300%"}' :disabled="true">
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="unit" label="单位 ">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.unit"
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"200%"}'>
|
|
|
|
|
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"200%"}' :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="advance" label="是否垫资 ">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.advance"
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
|
|
|
|
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' :disabled="true">
|
|
|
|
|
<el-option v-for="(item, index) in advanceOptions" :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="单价">
|
|
|
|
|
<el-table-column prop="price" label="单价" :disabled="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.price"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"300%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="settlement" label="结算重量 ">
|
|
|
|
|
<el-table-column prop="settlement" label="结算重量 " :disabled="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.settlement"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"300%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="rate" label="税率 ">
|
|
|
|
|
<el-table-column prop="rate" label="税率 " :disabled="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-select v-model="scope.row.rate"
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' ref="rateRef" @change="Addsum">
|
|
|
|
|
<el-option v-for="(item, index) in rateOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' ref="rateRef"
|
|
|
|
|
@change="Addsum">
|
|
|
|
|
<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":"300%"}' >
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"300%"}' :disabled="true">
|
|
|
|
|
</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":"300%"}'
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"300%"}' :disabled="true"
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
</el-input>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="remark" label="备注">
|
|
|
|
|
<el-table-column prop="remark" label="备注" :disabled="true">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.remark"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"300%"}'>
|
|
|
|
@ -268,7 +281,8 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="poundPictures" label="磅单图片">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<JNPF-UploadImg v-model="scope.row.poundPictures" :fileSize="500" sizeUnit="MB" :limit="9">
|
|
|
|
|
<JNPF-UploadImg v-model="scope.row.poundPictures" :fileSize="500" sizeUnit="MB" :limit="9"
|
|
|
|
|
:disabled="true">
|
|
|
|
|
|
|
|
|
|
</JNPF-UploadImg>
|
|
|
|
|
<!-- <el-input v-model="scope.row.poundPictures"-->
|
|
|
|
@ -279,13 +293,15 @@
|
|
|
|
|
<el-table-column prop="vehiclePictures" label="车辆图片">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.vehiclePictures"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"300%"}'>
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"300%"}' :disabled="true">
|
|
|
|
|
</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="delpurchaseorder_item0List(scope.$index)">删除</el-button>
|
|
|
|
|
<el-button size="mini" type="text" class="JNPF-table-delBtn"
|
|
|
|
|
@click="delpurchaseorder_item0List(scope.$index)">删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -565,8 +581,6 @@
|
|
|
|
|
</el-tab-pane >-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-tabs>
|
|
|
|
|
</el-col>
|
|
|
|
|
</template>
|
|
|
|
@ -582,11 +596,13 @@
|
|
|
|
|
import request from '@/utils/request'
|
|
|
|
|
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
|
|
|
|
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {},
|
|
|
|
|
props: [],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
excludeFields: [],
|
|
|
|
|
bissId: 'HT001',
|
|
|
|
|
visible: false,
|
|
|
|
|
loading: false,
|
|
|
|
@ -594,27 +610,27 @@
|
|
|
|
|
dataForm: {
|
|
|
|
|
documentNo: '',
|
|
|
|
|
contractCode: '',
|
|
|
|
|
contractName : "",
|
|
|
|
|
contractName: '',
|
|
|
|
|
supplierName: '',
|
|
|
|
|
currency : "0",
|
|
|
|
|
currency: '0',
|
|
|
|
|
contractNo: '',
|
|
|
|
|
advanceAmount: '',
|
|
|
|
|
num: '',
|
|
|
|
|
amount: '',
|
|
|
|
|
notAmount: '',
|
|
|
|
|
remark: '',
|
|
|
|
|
creatorUserName : "",
|
|
|
|
|
creatorTime : "",
|
|
|
|
|
creatorUserName: '',
|
|
|
|
|
creatorTime: '',
|
|
|
|
|
erpNo: '',
|
|
|
|
|
payPrice: '',
|
|
|
|
|
invoiceNum: '',
|
|
|
|
|
invoiceAmount: '',
|
|
|
|
|
status : "0",
|
|
|
|
|
status: '0',
|
|
|
|
|
purchaseorder_item0List: [],
|
|
|
|
|
invoices_item0itemList: [],
|
|
|
|
|
paymentitemList: [],
|
|
|
|
|
purchasebackitemList: [],
|
|
|
|
|
collectionitemList:[],
|
|
|
|
|
collectionitemList: []
|
|
|
|
|
},
|
|
|
|
|
activedhrfmu: '4',
|
|
|
|
|
rules:
|
|
|
|
@ -622,27 +638,67 @@
|
|
|
|
|
contractName: [
|
|
|
|
|
{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择',
|
|
|
|
|
message: '请选择合同名称',
|
|
|
|
|
trigger: 'change'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
// documentNo: [
|
|
|
|
|
// {
|
|
|
|
|
// required: true,
|
|
|
|
|
// message: '请选择单据编号',
|
|
|
|
|
// trigger: 'change'
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
contractNamecolumnOptions:[ {"label":"合同编码","value":"contract_code"}, {"label":"合同名称","value":"contract_name"}, {"label":"合同类型","value":"contract_type"}, {"label":"供应商/客户名称","value":"name"}],
|
|
|
|
|
currencyOptions:[{"fullName":"人民币","id":"0"},{"fullName":"美元","id":"1"},{"fullName":"英镑","id":"2"}],
|
|
|
|
|
statusOptions:[{"fullName":"待开票","id":"0"},{"fullName":"开票中","id":"1"},{"fullName":"付款中","id":"2"},{"fullName":"归档","id":"3"}],
|
|
|
|
|
contractNamecolumnOptions: [{ 'label': '合同编码', 'value': 'contract_code' }, {
|
|
|
|
|
'label': '合同名称',
|
|
|
|
|
'value': 'contract_name'
|
|
|
|
|
}, { 'label': '合同类型', 'value': 'contract_type' }, { 'label': '供应商/客户名称', 'value': 'name' }],
|
|
|
|
|
currencyOptions: [{ 'fullName': '人民币', 'id': '0' }, { 'fullName': '美元', 'id': '1' }, {
|
|
|
|
|
'fullName': '英镑',
|
|
|
|
|
'id': '2'
|
|
|
|
|
}],
|
|
|
|
|
statusOptions: [{ 'fullName': '待开票', 'id': '0' }, { 'fullName': '开票中', 'id': '1' }, {
|
|
|
|
|
'fullName': '付款中',
|
|
|
|
|
'id': '2'
|
|
|
|
|
}, { 'fullName': '归档', 'id': '3' }],
|
|
|
|
|
|
|
|
|
|
purchaseorder_item0licenseNumcolumnOptions:[ {"label":"车牌号","value":"license_no"}, {"label":"物料名称","value":"material_name"},{"label":"磅单类型","value":"pound_type"},{"label":"净重","value":"net_weight"},
|
|
|
|
|
{"label":"计量单位","value":"unit"}, {"label":"是否垫资","value":"advance"},{"label":"采购单价","value":"purchase_price"},
|
|
|
|
|
{"label":"结算重量","value":"settlement"}, {"label":"税率","value":"rate"}, {"label":"备注","value":"remark"},
|
|
|
|
|
{"label":"磅单图片","value":"pound_pictures"},{"label":"车辆图片","value":"vehicle_pictures"}, ],
|
|
|
|
|
pountTypeOptions:[{"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"}],
|
|
|
|
|
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"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
|
|
|
|
|
settlementTypeOptions:[{"fullName":"现金","id":"0"},{"fullName":"赊购","id":"1"},{"fullName":"网银","id":"2"},{"fullName":"银企直连","id":"3"},{"fullName":"银票","id":"4"},{"fullName":"商票","id":"5"}],
|
|
|
|
|
purchaseorder_item0licenseNumcolumnOptions: [{ 'label': '车牌号', 'value': 'license_no' }, {
|
|
|
|
|
'label': '物料名称',
|
|
|
|
|
'value': 'material_name'
|
|
|
|
|
}, { 'label': '磅单类型', 'value': 'pound_type' }, { 'label': '净重', 'value': 'net_weight' },
|
|
|
|
|
{ 'label': '计量单位', 'value': 'unit' }, { 'label': '是否垫资', 'value': 'advance' }, {
|
|
|
|
|
'label': '采购单价',
|
|
|
|
|
'value': 'purchase_price'
|
|
|
|
|
},
|
|
|
|
|
{ 'label': '结算重量', 'value': 'settlement' }, { 'label': '税率', 'value': 'rate' }, {
|
|
|
|
|
'label': '备注',
|
|
|
|
|
'value': 'remark'
|
|
|
|
|
},
|
|
|
|
|
{ 'label': '磅单图片', 'value': 'pound_pictures' }, { 'label': '车辆图片', 'value': 'vehicle_pictures' }],
|
|
|
|
|
pountTypeOptions: [{ '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' }],
|
|
|
|
|
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'
|
|
|
|
|
}, { 'fullName': '银企直连', 'id': '3' }, { 'fullName': '银票', 'id': '4' }, { 'fullName': '商票', 'id': '5' }],
|
|
|
|
|
settlementTypeOptions: [{ 'fullName': '现金', 'id': '0' }, { 'fullName': '赊购', 'id': '1' }, {
|
|
|
|
|
'fullName': '网银',
|
|
|
|
|
'id': '2'
|
|
|
|
|
}, { 'fullName': '银企直连', 'id': '3' }, { 'fullName': '银票', 'id': '4' }, { 'fullName': '商票', 'id': '5' }]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {},
|
|
|
|
@ -650,119 +706,140 @@
|
|
|
|
|
dataForm: {
|
|
|
|
|
deep: true,
|
|
|
|
|
handler: function() {
|
|
|
|
|
this.amountSum();
|
|
|
|
|
this.notAmountSum();
|
|
|
|
|
this.settlementSum();
|
|
|
|
|
this.advanceSum();
|
|
|
|
|
this.amountSum()
|
|
|
|
|
this.notAmountSum()
|
|
|
|
|
this.settlementSum()
|
|
|
|
|
this.advanceSum()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
},
|
|
|
|
|
mounted() {},
|
|
|
|
|
mounted() {
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
Addsum() {
|
|
|
|
|
for (let i = 0; i < this.dataForm.purchaseorder_item0List.length; i++) {
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].notAmount = this.dataForm.purchaseorder_item0List[i].amount * this.dataForm.purchaseorder_item0List[i].rate;
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].notAmount = this.dataForm.purchaseorder_item0List[i].amount * this.dataForm.purchaseorder_item0List[i].rate
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
amountSum() {
|
|
|
|
|
for (let i = 0; i < this.dataForm.purchaseorder_item0List.length; i++) {
|
|
|
|
|
this.dataForm.amount = this.dataForm.purchaseorder_item0List.reduce((sum,e) => sum + Number(e.amount || 0),0);
|
|
|
|
|
this.dataForm.amount = this.dataForm.purchaseorder_item0List.reduce((sum, e) => sum + Number(e.amount || 0), 0)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
settlementSum() {
|
|
|
|
|
for (let i = 0; i < this.dataForm.purchaseorder_item0List.length; i++) {
|
|
|
|
|
this.dataForm.num = this.dataForm.purchaseorder_item0List.reduce((sum,e) => sum + Number(e.settlement || 0),0);
|
|
|
|
|
this.dataForm.num = this.dataForm.purchaseorder_item0List.reduce((sum, e) => sum + Number(e.settlement || 0), 0)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
notAmountSum() {
|
|
|
|
|
for (let i = 0; i < this.dataForm.purchaseorder_item0List.length; i++) {
|
|
|
|
|
this.dataForm.notAmount = this.dataForm.purchaseorder_item0List.reduce((sum,e) => sum + Number(e.notAmount || 0),0);
|
|
|
|
|
this.dataForm.notAmount = this.dataForm.purchaseorder_item0List.reduce((sum, e) => sum + Number(e.notAmount || 0), 0)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
advanceSum() {
|
|
|
|
|
let sum = 0;
|
|
|
|
|
let sum = 0
|
|
|
|
|
for (let i = 0; i < this.dataForm.purchaseorder_item0List.length; i++) {
|
|
|
|
|
|
|
|
|
|
if (this.dataForm.purchaseorder_item0List[i].advance == 1) {
|
|
|
|
|
sum = sum + this.dataForm.purchaseorder_item0List[i].amount;
|
|
|
|
|
sum = sum + parseFloat(this.dataForm.purchaseorder_item0List[i].amount)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.advanceAmount = sum;
|
|
|
|
|
parseFloat(this.dataForm.advanceAmount = sum)
|
|
|
|
|
},
|
|
|
|
|
popupSelectChange(e, d) {
|
|
|
|
|
this.dataForm.supplierName = d.name;
|
|
|
|
|
this.dataForm.contractCode = d.contract_code;
|
|
|
|
|
this.dataForm.supplierName = d.name
|
|
|
|
|
this.dataForm.contractCode = d.contract_code
|
|
|
|
|
this.excludeFields = []
|
|
|
|
|
this.dataForm.purchaseorder_item0List = []
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
popupSelectChange2(a, b) {
|
|
|
|
|
var excludeFields = []
|
|
|
|
|
var num = 0
|
|
|
|
|
var amount = 0
|
|
|
|
|
var notAmount = 0
|
|
|
|
|
for (let i = 0; i < this.dataForm.purchaseorder_item0List.length; i++) {
|
|
|
|
|
excludeFields.push(this.dataForm.purchaseorder_item0List[i].licenseNum)
|
|
|
|
|
if (a == this.dataForm.purchaseorder_item0List[i].licenseNum) {
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].materialName = b.material_name;
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].settlement = b.settlement;
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].netWeight = b.net_weight;
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].unit = b.unit;
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].advance = b.advance;
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].price = b.purchase_price;
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].rate = b.rate;
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].remark = b.remark;
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].poundPictures = b.pound_pictures;
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].vehiclePictures = b.vehicle_pictures;
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].pountType = b.pound_type;
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].materialName = b.material_name
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].settlement = b.settlement
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].netWeight = b.net_weight
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].unit = b.unit
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].advance = b.advance
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].price = b.purchase_price
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].rate = b.rate
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].remark = b.remark
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].poundPictures = b.pound_pictures
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].vehiclePictures = b.vehicle_pictures
|
|
|
|
|
this.dataForm.purchaseorder_item0List[i].pountType = b.pound_type
|
|
|
|
|
}
|
|
|
|
|
// if(advance==1){
|
|
|
|
|
// advanceAmount = parseFloat(this.dataForm.advanceAmount) + parseFloat(this.dataForm.purchaseorder_item0List[i].amount);
|
|
|
|
|
// }
|
|
|
|
|
num = num + parseFloat(this.dataForm.purchaseorder_item0List[i].settlement)
|
|
|
|
|
amount = amount + parseFloat(this.dataForm.purchaseorder_item0List[i].amount)
|
|
|
|
|
notAmount = notAmount + parseFloat(this.dataForm.purchaseorder_item0List[i].notAmount)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.amount = amount
|
|
|
|
|
this.dataForm.num = num
|
|
|
|
|
this.excludeFields = excludeFields
|
|
|
|
|
},
|
|
|
|
|
purchaseorder_item0Exist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
let isOk = true
|
|
|
|
|
for (let i = 0; i < this.dataForm.purchaseorder_item0List.length; i++) {
|
|
|
|
|
const e = this.dataForm.purchaseorder_item0List[i];
|
|
|
|
|
const e = this.dataForm.purchaseorder_item0List[i]
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
return isOk
|
|
|
|
|
},
|
|
|
|
|
invoices_item0itemExist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
let isOk = true
|
|
|
|
|
for (let i = 0; i < this.dataForm.invoices_item0itemList.length; i++) {
|
|
|
|
|
const e = this.dataForm.invoices_item0itemList[i];
|
|
|
|
|
const e = this.dataForm.invoices_item0itemList[i]
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
return isOk
|
|
|
|
|
},
|
|
|
|
|
paymentitemExist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
let isOk = true
|
|
|
|
|
for (let i = 0; i < this.dataForm.paymentitemList.length; i++) {
|
|
|
|
|
const e = this.dataForm.paymentitemList[i];
|
|
|
|
|
const e = this.dataForm.paymentitemList[i]
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
return isOk
|
|
|
|
|
},
|
|
|
|
|
purchasebackitemExist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
let isOk = true
|
|
|
|
|
for (let i = 0; i < this.dataForm.purchasebackitemList.length; i++) {
|
|
|
|
|
const e = this.dataForm.purchasebackitemList[i];
|
|
|
|
|
const e = this.dataForm.purchasebackitemList[i]
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
return isOk
|
|
|
|
|
},
|
|
|
|
|
collectionitemExist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
let isOk = true
|
|
|
|
|
for (let i = 0; i < this.dataForm.collectionitemList.length; i++) {
|
|
|
|
|
const e = this.dataForm.collectionitemList[i];
|
|
|
|
|
const e = this.dataForm.collectionitemList[i]
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
return isOk
|
|
|
|
|
},
|
|
|
|
|
clearData(data) {
|
|
|
|
|
for (let key in data) {
|
|
|
|
|
if (data[key] instanceof Array) {
|
|
|
|
|
data[key] = [];
|
|
|
|
|
data[key] = []
|
|
|
|
|
} else if (data[key] instanceof Object) {
|
|
|
|
|
this.clearData(data[key]);
|
|
|
|
|
this.clearData(data[key])
|
|
|
|
|
} else {
|
|
|
|
|
data[key] = "";
|
|
|
|
|
data[key] = ''
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
init(id, isDetail) {
|
|
|
|
|
this.dataForm.id = id || 0;
|
|
|
|
|
this.visible = true;
|
|
|
|
|
this.isDetail = isDetail || false;
|
|
|
|
|
this.dataForm.id = id || 0
|
|
|
|
|
this.visible = true
|
|
|
|
|
this.isDetail = isDetail || false
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs['elForm'].resetFields();
|
|
|
|
|
this.$refs['elForm'].resetFields()
|
|
|
|
|
if (this.dataForm.id) {
|
|
|
|
|
this.loading = true
|
|
|
|
|
request({
|
|
|
|
@ -771,11 +848,11 @@
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.dataInfo(res.data)
|
|
|
|
|
this.loading = false
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.clearData(this.dataForm)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
this.$store.commit('generator/UPDATE_RELATION_DATA', {})
|
|
|
|
|
},
|
|
|
|
|
// 表单提交
|
|
|
|
@ -842,12 +919,12 @@
|
|
|
|
|
notAmount: undefined,
|
|
|
|
|
remark: undefined,
|
|
|
|
|
poundPictures: undefined,
|
|
|
|
|
vehiclePictures:undefined,
|
|
|
|
|
vehiclePictures: undefined
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.purchaseorder_item0List.push(item)
|
|
|
|
|
},
|
|
|
|
|
delpurchaseorder_item0List(index) {
|
|
|
|
|
this.dataForm.purchaseorder_item0List.splice(index, 1);
|
|
|
|
|
this.dataForm.purchaseorder_item0List.splice(index, 1)
|
|
|
|
|
},
|
|
|
|
|
addinvoices_item0itemList() {
|
|
|
|
|
let item = {
|
|
|
|
@ -860,12 +937,12 @@
|
|
|
|
|
invoiceStatus: undefined,
|
|
|
|
|
invoicingDate: undefined,
|
|
|
|
|
creatorUserName: undefined,
|
|
|
|
|
invoiceAttachment:undefined,
|
|
|
|
|
invoiceAttachment: undefined
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.invoices_item0itemList.push(item)
|
|
|
|
|
},
|
|
|
|
|
delinvoices_item0itemList(index) {
|
|
|
|
|
this.dataForm.invoices_item0itemList.splice(index, 1);
|
|
|
|
|
this.dataForm.invoices_item0itemList.splice(index, 1)
|
|
|
|
|
},
|
|
|
|
|
addpaymentitemList() {
|
|
|
|
|
let item = {
|
|
|
|
@ -874,12 +951,12 @@
|
|
|
|
|
paymentamount: undefined,
|
|
|
|
|
settlementtype: undefined,
|
|
|
|
|
remark: undefined,
|
|
|
|
|
creatorUserName:undefined,
|
|
|
|
|
creatorUserName: undefined
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.paymentitemList.push(item)
|
|
|
|
|
},
|
|
|
|
|
delpaymentitemList(index) {
|
|
|
|
|
this.dataForm.paymentitemList.splice(index, 1);
|
|
|
|
|
this.dataForm.paymentitemList.splice(index, 1)
|
|
|
|
|
},
|
|
|
|
|
addpurchasebackitemList() {
|
|
|
|
|
let item = {
|
|
|
|
@ -887,12 +964,12 @@
|
|
|
|
|
creatorTime: undefined,
|
|
|
|
|
refundNum: undefined,
|
|
|
|
|
refundAmount: undefined,
|
|
|
|
|
creatorUserName:undefined,
|
|
|
|
|
creatorUserName: undefined
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.purchasebackitemList.push(item)
|
|
|
|
|
},
|
|
|
|
|
delpurchasebackitemList(index) {
|
|
|
|
|
this.dataForm.purchasebackitemList.splice(index, 1);
|
|
|
|
|
this.dataForm.purchasebackitemList.splice(index, 1)
|
|
|
|
|
},
|
|
|
|
|
addcollectionitemList() {
|
|
|
|
|
let item = {
|
|
|
|
@ -901,52 +978,52 @@
|
|
|
|
|
creatorTime: undefined,
|
|
|
|
|
amountCollected: undefined,
|
|
|
|
|
settlementType: undefined,
|
|
|
|
|
remark:undefined,
|
|
|
|
|
remark: undefined
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.collectionitemList.push(item)
|
|
|
|
|
},
|
|
|
|
|
delcollectionitemList(index) {
|
|
|
|
|
this.dataForm.collectionitemList.splice(index, 1);
|
|
|
|
|
this.dataForm.collectionitemList.splice(index, 1)
|
|
|
|
|
},
|
|
|
|
|
dataList() {
|
|
|
|
|
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
|
|
|
|
var _data = JSON.parse(JSON.stringify(this.dataForm))
|
|
|
|
|
for (let i = 0; i < _data.purchaseorder_item0List.length; i++) {
|
|
|
|
|
var _list = _data.purchaseorder_item0List[i];
|
|
|
|
|
var _list = _data.purchaseorder_item0List[i]
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < _data.invoices_item0itemList.length; i++) {
|
|
|
|
|
var _list = _data.invoices_item0itemList[i];
|
|
|
|
|
var _list = _data.invoices_item0itemList[i]
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < _data.paymentitemList.length; i++) {
|
|
|
|
|
var _list = _data.paymentitemList[i];
|
|
|
|
|
var _list = _data.paymentitemList[i]
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < _data.purchasebackitemList.length; i++) {
|
|
|
|
|
var _list = _data.purchasebackitemList[i];
|
|
|
|
|
var _list = _data.purchasebackitemList[i]
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < _data.collectionitemList.length; i++) {
|
|
|
|
|
var _list = _data.collectionitemList[i];
|
|
|
|
|
var _list = _data.collectionitemList[i]
|
|
|
|
|
}
|
|
|
|
|
return _data;
|
|
|
|
|
return _data
|
|
|
|
|
},
|
|
|
|
|
dataInfo(dataAll) {
|
|
|
|
|
let _dataAll = dataAll
|
|
|
|
|
for (let i = 0; i < _dataAll.purchaseorder_item0List.length; i++) {
|
|
|
|
|
var _list = _dataAll.purchaseorder_item0List[i];
|
|
|
|
|
var _list = _dataAll.purchaseorder_item0List[i]
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < _dataAll.invoices_item0itemList.length; i++) {
|
|
|
|
|
var _list = _dataAll.invoices_item0itemList[i];
|
|
|
|
|
var _list = _dataAll.invoices_item0itemList[i]
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < _dataAll.paymentitemList.length; i++) {
|
|
|
|
|
var _list = _dataAll.paymentitemList[i];
|
|
|
|
|
var _list = _dataAll.paymentitemList[i]
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < _dataAll.purchasebackitemList.length; i++) {
|
|
|
|
|
var _list = _dataAll.purchasebackitemList[i];
|
|
|
|
|
var _list = _dataAll.purchasebackitemList[i]
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < _dataAll.collectionitemList.length; i++) {
|
|
|
|
|
var _list = _dataAll.collectionitemList[i];
|
|
|
|
|
var _list = _dataAll.collectionitemList[i]
|
|
|
|
|
}
|
|
|
|
|
this.dataForm = _dataAll
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|