|
|
|
@ -1,117 +1,55 @@
|
|
|
|
|
<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" >
|
|
|
|
|
<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%"}'>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="单据编号" prop="documentNo">
|
|
|
|
|
<el-input v-model="dataForm.documentNo" placeholder="请输入" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="采购订单"
|
|
|
|
|
prop="purchaseOrderId" >
|
|
|
|
|
<popupSelect v-model="dataForm.purchaseOrderId"
|
|
|
|
|
placeholder="请选择" clearable field="purchaseOrderId" interfaceId="383149471917185157" :columnOptions="purchaseOrderIdcolumnOptions" propsValue="id" relationField="document_no" popupType="dialog"
|
|
|
|
|
popupTitle="选择数据" popupWidth="800px"
|
|
|
|
|
>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="采购订单" prop="purchaseOrderId">
|
|
|
|
|
<popupSelect v-model="dataForm.purchaseOrderId" placeholder="请选择" clearable
|
|
|
|
|
field="purchaseOrderId" interfaceId="383149471917185157"
|
|
|
|
|
:columnOptions="purchaseOrderIdcolumnOptions" 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-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"
|
|
|
|
|
clearable :style='{"width":"100%"}'>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="退货金额" prop="refundAmount">
|
|
|
|
|
<el-input v-model="dataForm.refundAmount" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="退货数量"
|
|
|
|
|
prop="refundNum" >
|
|
|
|
|
<el-input v-model="dataForm.refundNum"
|
|
|
|
|
clearable :style='{"width":"100%"}'>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="退货数量" prop="refundNum">
|
|
|
|
|
<el-input v-model="dataForm.refundNum" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
</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="8" >
|
|
|
|
|
<el-form-item label="合同名称"
|
|
|
|
|
prop="jnpf_jg_purchaseorder_jnpf_contractName" >
|
|
|
|
|
<el-input v-model=" dataForm.jnpf_jg_purchaseorder_jnpf_contractName"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="供应商名称"
|
|
|
|
|
prop="jnpf_jg_purchaseorder_jnpf_supplierName" >
|
|
|
|
|
<el-input v-model=" dataForm.jnpf_jg_purchaseorder_jnpf_supplierName"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="实退金额"
|
|
|
|
|
prop="actualAmount" >
|
|
|
|
|
<el-input v-model="dataForm.actualAmount"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="单据状态 "
|
|
|
|
|
prop="status" >
|
|
|
|
|
<el-select v-model="dataForm.status"
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}'>
|
|
|
|
|
<el-option v-for="(item, index) in statusOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
|
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="创建时间"
|
|
|
|
|
prop="creatorTime" >
|
|
|
|
|
<el-input v-model="dataForm.creatorTime"
|
|
|
|
|
placeholder="系统自动生成" readonly >
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-form-item label="创建人"
|
|
|
|
|
prop="creatorUserName" >
|
|
|
|
|
<el-input v-model="dataForm.creatorUserName"
|
|
|
|
|
placeholder="系统自动生成" readonly >
|
|
|
|
|
<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>
|
|
|
|
@ -119,91 +57,101 @@
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-tabs v-model="activeyrmekt" tab-position="top" class="mb-20">
|
|
|
|
|
<el-tab-pane label="磅单明细">
|
|
|
|
|
<el-col :span="24" >
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-form-item label-width="0">
|
|
|
|
|
<div class="JNPF-common-title">
|
|
|
|
|
<h2></h2>
|
|
|
|
|
</div>
|
|
|
|
|
<el-table :data="dataForm.purchaseback_item0List" size='mini' >
|
|
|
|
|
<el-table :data="dataForm.purchaseback_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="383214061812227333" :bissId="dataForm.purchaseOrderId" :columnOptions="purchaseback_item0licenseNumcolumnOptions" propsValue="license_num" relationField="license_num" popupType="dialog"
|
|
|
|
|
popupWidth="800px"
|
|
|
|
|
>
|
|
|
|
|
<popupSelect v-model="scope.row.licenseNum" placeholder="请选择"
|
|
|
|
|
clearable :field="'licenseNum'+scope.$index"
|
|
|
|
|
interfaceId="383214061812227333"
|
|
|
|
|
:bissId="dataForm.purchaseOrderId"
|
|
|
|
|
:columnOptions="purchaseback_item0licenseNumcolumnOptions"
|
|
|
|
|
propsValue="license_num" relationField="license_num"
|
|
|
|
|
popupType="dialog" popupWidth="800px" @change="popupSelectChange2">
|
|
|
|
|
</popupSelect>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column prop="materialName" label="物料名称">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-input v-model="scope.row.materialName"
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
<el-input v-model="scope.row.materialName" placeholder="请输入"
|
|
|
|
|
clearable :style='{"width":"100%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</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%"}'>
|
|
|
|
|
<el-input v-model="scope.row.settlement" 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 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 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 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 v-model="scope.row.amount" placeholder="请输入" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
</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%"}'>
|
|
|
|
|
<el-input v-model="scope.row.notAmount" placeholder="请输入" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
</el-input>
|
|
|
|
|
</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 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 :style='{"width":"100%"}'>
|
|
|
|
|
<el-option v-for="(item, index) in pountTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
|
|
|
|
<el-select v-model="scope.row.pountType" placeholder="请选择" clearable
|
|
|
|
|
:style='{"width":"100%"}'>
|
|
|
|
|
<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" >
|
|
|
|
|
<el-table-column label="操作" width="50">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" type="text" class="JNPF-table-delBtn" @click="delpurchaseback_item0List(scope.$index)">删除</el-button>
|
|
|
|
|
<el-button size="mini" type="text" class="JNPF-table-delBtn"
|
|
|
|
|
@click="delpurchaseback_item0List(scope.$index)">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -212,11 +160,12 @@
|
|
|
|
|
</div>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-tab-pane >
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
</el-col>
|
|
|
|
|
</template>
|
|
|
|
|
</el-form>
|
|
|
|
|
<Form v-if="formVisible" ref="form" />
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-row>
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="visible = false"> 取 消</el-button>
|
|
|
|
@ -226,65 +175,180 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import request from '@/utils/request'
|
|
|
|
|
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
|
|
|
|
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
|
|
|
|
import {
|
|
|
|
|
getDataInterfaceRes
|
|
|
|
|
} from '@/api/systemData/dataInterface'
|
|
|
|
|
import {
|
|
|
|
|
getDictionaryDataSelector
|
|
|
|
|
} from '@/api/systemData/dictionary'
|
|
|
|
|
export default {
|
|
|
|
|
components: {},
|
|
|
|
|
components: { },
|
|
|
|
|
props: [],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
bissId: '380716763022647941',
|
|
|
|
|
formVisible: false,
|
|
|
|
|
visible: false,
|
|
|
|
|
loading: false,
|
|
|
|
|
isDetail: false,
|
|
|
|
|
dataForm: {
|
|
|
|
|
documentNo : '',
|
|
|
|
|
purchaseOrderId : "",
|
|
|
|
|
currency : "0",
|
|
|
|
|
refundAmount : '',
|
|
|
|
|
refundNum : '',
|
|
|
|
|
remark : '',
|
|
|
|
|
actualAmount : '',
|
|
|
|
|
status : "0",
|
|
|
|
|
creatorTime : "",
|
|
|
|
|
creatorUserName : "",
|
|
|
|
|
purchaseback_item0List:[],
|
|
|
|
|
jg_purchaseorder:
|
|
|
|
|
{
|
|
|
|
|
contractName:'',
|
|
|
|
|
supplierName:'',
|
|
|
|
|
},
|
|
|
|
|
jnpf_jg_purchaseorder_jnpf_contractName:'',
|
|
|
|
|
jnpf_jg_purchaseorder_jnpf_supplierName:'',
|
|
|
|
|
documentNo: '',
|
|
|
|
|
purchaseOrderId: "",
|
|
|
|
|
currency: "0",
|
|
|
|
|
refundAmount: '',
|
|
|
|
|
refundNum: '',
|
|
|
|
|
remark: '',
|
|
|
|
|
actualAmount: '',
|
|
|
|
|
status: "0",
|
|
|
|
|
creatorTime: "",
|
|
|
|
|
creatorUserName: "",
|
|
|
|
|
purchaseback_item0List: [],
|
|
|
|
|
jg_purchaseorder: {
|
|
|
|
|
contractName: '',
|
|
|
|
|
supplierName: '',
|
|
|
|
|
},
|
|
|
|
|
activeyrmekt:'0',
|
|
|
|
|
rules:
|
|
|
|
|
{
|
|
|
|
|
jnpf_jg_purchaseorder_jnpf_contractName: '',
|
|
|
|
|
jnpf_jg_purchaseorder_jnpf_supplierName: '',
|
|
|
|
|
},
|
|
|
|
|
purchaseOrderIdcolumnOptions:[ {"label":"ID","value":"id"}, {"label":"采购订单号","value":"document_no"}, {"label":"合同名称","value":"contract_name"}, {"label":"供应商名称","value":"supplier_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"}],
|
|
|
|
|
activeyrmekt: '0',
|
|
|
|
|
rules: {},
|
|
|
|
|
purchaseOrderIdcolumnOptions: [{
|
|
|
|
|
"label": "ID",
|
|
|
|
|
"value": "id"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "采购订单号",
|
|
|
|
|
"value": "document_no"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "合同名称",
|
|
|
|
|
"value": "contract_name"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "供应商名称",
|
|
|
|
|
"value": "supplier_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"
|
|
|
|
|
}],
|
|
|
|
|
|
|
|
|
|
purchaseback_item0licenseNumcolumnOptions:[ {"label":"车牌号","value":"license_num"}, {"label":"物料名称","value":"material_name"}, {"label":"结算重量","value":"settlement"}, {"label":"计量单位","value":"unit"}, {"label":"采购单价","value":"price"}, {"label":"税率","value":"rate"}, {"label":"应退金额","value":"amount"}, {"label":"税额","value":"not_amount"}, {"label":"业务员","value":"pount_user"}, {"label":"磅单类型","value":"pount_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"}],
|
|
|
|
|
purchaseback_item0licenseNumcolumnOptions: [{
|
|
|
|
|
"label": "车牌号",
|
|
|
|
|
"value": "license_num"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "物料名称",
|
|
|
|
|
"value": "material_name"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "结算重量",
|
|
|
|
|
"value": "settlement"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "计量单位",
|
|
|
|
|
"value": "unit"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "采购单价",
|
|
|
|
|
"value": "price"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "税率",
|
|
|
|
|
"value": "rate"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "应退金额",
|
|
|
|
|
"value": "amount"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "税额",
|
|
|
|
|
"value": "not_amount"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "业务员",
|
|
|
|
|
"value": "pount_user"
|
|
|
|
|
}, {
|
|
|
|
|
"label": "磅单类型",
|
|
|
|
|
"value": "pount_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"
|
|
|
|
|
}],
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {},
|
|
|
|
|
watch: {},
|
|
|
|
|
created() {
|
|
|
|
|
},
|
|
|
|
|
created() {},
|
|
|
|
|
mounted() {},
|
|
|
|
|
methods: {
|
|
|
|
|
popupSelectChange2(a, b){
|
|
|
|
|
for (let i = 0; i < this.dataForm.purchaseback_item0List.length; i++) {
|
|
|
|
|
if(a == this.dataForm.purchaseback_item0List[i].licenseNum){
|
|
|
|
|
this.dataForm.purchaseback_item0List[i].materialName = b.material_name;
|
|
|
|
|
this.dataForm.purchaseback_item0List[i].settlement = b.settlement;
|
|
|
|
|
this.dataForm.purchaseback_item0List[i].unit = b.unit;
|
|
|
|
|
this.dataForm.purchaseback_item0List[i].price = b.price;
|
|
|
|
|
this.dataForm.purchaseback_item0List[i].rate = b.rate;
|
|
|
|
|
this.dataForm.purchaseback_item0List[i].amount = b.amount;
|
|
|
|
|
this.dataForm.purchaseback_item0List[i].notAmount = b.not_amount;
|
|
|
|
|
this.dataForm.purchaseback_item0List[i].pountUser = b.pount_user;
|
|
|
|
|
this.dataForm.purchaseback_item0List[i].pountType = b.pount_type;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
popupSelectChange(e,d){
|
|
|
|
|
this.dataForm.currency = d.currency;
|
|
|
|
|
},
|
|
|
|
|
purchaseback_item0Exist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
for(let i=0;i<this.dataForm.purchaseback_item0List.length;i++){
|
|
|
|
|
for (let i = 0; i < this.dataForm.purchaseback_item0List.length; i++) {
|
|
|
|
|
const e = this.dataForm.purchaseback_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
},
|
|
|
|
|
clearData(data){
|
|
|
|
|
clearData(data) {
|
|
|
|
|
for (let key in data) {
|
|
|
|
|
if (data[key] instanceof Array) {
|
|
|
|
|
data[key] = [];
|
|
|
|
@ -301,16 +365,16 @@
|
|
|
|
|
this.isDetail = isDetail || false;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs['elForm'].resetFields();
|
|
|
|
|
if(this.dataForm.id){
|
|
|
|
|
if (this.dataForm.id) {
|
|
|
|
|
this.loading = true
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/purchaseback/Purchaseback/'+this.dataForm.id,
|
|
|
|
|
url: '/api/purchaseback/Purchaseback/' + this.dataForm.id,
|
|
|
|
|
method: 'get'
|
|
|
|
|
}).then(res => {
|
|
|
|
|
this.dataInfo(res.data)
|
|
|
|
|
this.loading = false
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
this.clearData(this.dataForm)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -326,7 +390,7 @@
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
request() {
|
|
|
|
|
var _data =this.dataList()
|
|
|
|
|
var _data = this.dataList()
|
|
|
|
|
if (!this.dataForm.id) {
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/purchaseback/Purchaseback',
|
|
|
|
@ -343,9 +407,9 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/purchaseback/Purchaseback/'+this.dataForm.id,
|
|
|
|
|
url: '/api/purchaseback/Purchaseback/' + this.dataForm.id,
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data: _data
|
|
|
|
|
}).then((res) => {
|
|
|
|
@ -361,43 +425,42 @@
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
addpurchaseback_item0List(){
|
|
|
|
|
addpurchaseback_item0List() {
|
|
|
|
|
let item = {
|
|
|
|
|
licenseNum:undefined,
|
|
|
|
|
materialName:undefined,
|
|
|
|
|
settlement:undefined,
|
|
|
|
|
unit:undefined,
|
|
|
|
|
price:undefined,
|
|
|
|
|
rate:undefined,
|
|
|
|
|
amount:undefined,
|
|
|
|
|
notAmount:undefined,
|
|
|
|
|
pountUser:undefined,
|
|
|
|
|
pountType:undefined,
|
|
|
|
|
licenseNum: undefined,
|
|
|
|
|
materialName: undefined,
|
|
|
|
|
settlement: undefined,
|
|
|
|
|
unit: undefined,
|
|
|
|
|
price: undefined,
|
|
|
|
|
rate: undefined,
|
|
|
|
|
amount: undefined,
|
|
|
|
|
notAmount: undefined,
|
|
|
|
|
pountUser: undefined,
|
|
|
|
|
pountType: undefined,
|
|
|
|
|
}
|
|
|
|
|
this.dataForm.purchaseback_item0List.push(item)
|
|
|
|
|
},
|
|
|
|
|
delpurchaseback_item0List(index) {
|
|
|
|
|
this.dataForm.purchaseback_item0List.splice(index, 1);
|
|
|
|
|
},
|
|
|
|
|
dataList(){
|
|
|
|
|
dataList() {
|
|
|
|
|
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
|
|
|
|
_data.jg_purchaseorder.contractName = _data.jnpf_jg_purchaseorder_jnpf_contractName
|
|
|
|
|
_data.jg_purchaseorder.supplierName = _data.jnpf_jg_purchaseorder_jnpf_supplierName
|
|
|
|
|
for(let i=0;i<_data.purchaseback_item0List.length;i++){
|
|
|
|
|
for (let i = 0; i < _data.purchaseback_item0List.length; i++) {
|
|
|
|
|
var _list = _data.purchaseback_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
return _data;
|
|
|
|
|
},
|
|
|
|
|
dataInfo(dataAll){
|
|
|
|
|
let _dataAll =dataAll
|
|
|
|
|
dataInfo(dataAll) {
|
|
|
|
|
let _dataAll = dataAll
|
|
|
|
|
_dataAll.jnpf_jg_purchaseorder_jnpf_contractName = _dataAll.jg_purchaseorder.contractName
|
|
|
|
|
_dataAll.jnpf_jg_purchaseorder_jnpf_supplierName = _dataAll.jg_purchaseorder.supplierName
|
|
|
|
|
for(let i=0;i<_dataAll.purchaseback_item0List.length;i++){
|
|
|
|
|
for (let i = 0; i < _dataAll.purchaseback_item0List.length; i++) {
|
|
|
|
|
var _list = _dataAll.purchaseback_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
this.dataForm = _dataAll
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|