|
|
|
@ -1,121 +1,133 @@
|
|
|
|
|
<template>
|
|
|
|
|
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
|
|
|
|
|
<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" >
|
|
|
|
|
<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-col :span="8">
|
|
|
|
|
<el-form-item label="单据编号"
|
|
|
|
|
prop="documentNo" >
|
|
|
|
|
prop="documentNo">
|
|
|
|
|
<el-input v-model="dataForm.documentNo"
|
|
|
|
|
placeholder="系统自动生成" readonly >
|
|
|
|
|
placeholder="系统自动生成" readonly>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="业务类型"
|
|
|
|
|
prop="type" >
|
|
|
|
|
prop="type">
|
|
|
|
|
<el-select v-model="dataForm.type"
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
|
|
|
|
|
<el-option v-for="(item, index) in typeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
|
|
|
|
<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-col :span="8">
|
|
|
|
|
<el-form-item label="来源单号"
|
|
|
|
|
prop="sourceNo" >
|
|
|
|
|
prop="sourceNo">
|
|
|
|
|
<popupSelect v-model="dataForm.sourceNo"
|
|
|
|
|
placeholder="请选择" clearable field="salesId" interfaceId="392956668264114117" :columnOptions="salesIdcolumnOptions" propsValue="id" relationField="document_no" popupType="dialog"
|
|
|
|
|
placeholder="请选择" clearable field="salesId" interfaceId="392956668264114117"
|
|
|
|
|
:columnOptions="salesIdcolumnOptions" propsValue="id" relationField="document_no"
|
|
|
|
|
popupType="dialog"
|
|
|
|
|
popupTitle="选择数据" popupWidth="800px" disabled
|
|
|
|
|
hasPage :pageSize="20" >
|
|
|
|
|
hasPage :pageSize="20">
|
|
|
|
|
|
|
|
|
|
</popupSelect>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="出库金额"
|
|
|
|
|
prop="amount" >
|
|
|
|
|
prop="amount">
|
|
|
|
|
<el-input v-model="dataForm.amount"
|
|
|
|
|
placeholder="请输入出库金额" readonly clearable :style='{"width":"100%"}' disabled>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="币别"
|
|
|
|
|
prop="currency" >
|
|
|
|
|
prop="currency">
|
|
|
|
|
<el-select v-model="dataForm.currency"
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' disabled>
|
|
|
|
|
<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>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="出库数量"
|
|
|
|
|
prop="num" >
|
|
|
|
|
prop="num">
|
|
|
|
|
<el-input v-model="dataForm.num"
|
|
|
|
|
placeholder="请输入出库数量" readonly clearable :style='{"width":"100%"}' disabled>
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8" >
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="客户"
|
|
|
|
|
prop="customerId" >
|
|
|
|
|
prop="customerId">
|
|
|
|
|
<popupSelect v-model="dataForm.customerId"
|
|
|
|
|
placeholder="请选择" clearable field="customerId" interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id" relationField="supplier_nm" popupType="dialog"
|
|
|
|
|
placeholder="请选择" clearable field="customerId" interfaceId="395936123471343749"
|
|
|
|
|
:columnOptions="customerIdcolumnOptions" propsValue="id" relationField="supplier_nm"
|
|
|
|
|
popupType="dialog"
|
|
|
|
|
popupTitle="选择数据" popupWidth="800px" disabled
|
|
|
|
|
hasPage :pageSize="20" >
|
|
|
|
|
hasPage :pageSize="20">
|
|
|
|
|
</popupSelect>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="16" >
|
|
|
|
|
<el-col :span="16">
|
|
|
|
|
<el-form-item label="备注"
|
|
|
|
|
prop="remark" >
|
|
|
|
|
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="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-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 :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="vehicleId" label="车牌号" align="center" width="130">
|
|
|
|
|
<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"
|
|
|
|
|
placeholder="请选择" clearable :field="'vehicleId'+scope.$index"
|
|
|
|
|
interfaceId="398732963950472005"
|
|
|
|
|
:columnOptions="receiptout_item0vehicleIdcolumnOptions" propsValue="id"
|
|
|
|
|
relationField="ticketno" popupType="dialog"
|
|
|
|
|
popupWidth="800px"
|
|
|
|
|
hasPage :pageSize="20" disabled>
|
|
|
|
|
</popupSelect>
|
|
|
|
@ -124,7 +136,10 @@
|
|
|
|
|
<el-table-column prop="materialId" label="物料名称" align="center" width="180">
|
|
|
|
|
<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"
|
|
|
|
|
placeholder="请选择" clearable :field="'materialId'+scope.$index"
|
|
|
|
|
interfaceId="398719564478785669"
|
|
|
|
|
:columnOptions="receiptout_item0materialIdcolumnOptions" propsValue="id"
|
|
|
|
|
relationField="item_name" popupType="dialog"
|
|
|
|
|
popupWidth="800px" disabled
|
|
|
|
|
>
|
|
|
|
|
</popupSelect>
|
|
|
|
@ -133,7 +148,10 @@
|
|
|
|
|
<el-table-column prop="reservoirareaId" label="库区名称" align="center" width="130">
|
|
|
|
|
<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"
|
|
|
|
|
placeholder="请选择" clearable :field="'reservoirareaId'+scope.$index"
|
|
|
|
|
interfaceId="381404161809350213"
|
|
|
|
|
:columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id"
|
|
|
|
|
relationField="areaname" popupType="dialog"
|
|
|
|
|
popupWidth="800px" @change="areaSelect"
|
|
|
|
|
>
|
|
|
|
|
</popupSelect>
|
|
|
|
@ -142,7 +160,10 @@
|
|
|
|
|
<el-table-column prop="warehouseId" label="仓库名称" align="center" width="130">
|
|
|
|
|
<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"
|
|
|
|
|
placeholder="请选择" clearable :field="'reservoirareaId'+scope.$index"
|
|
|
|
|
interfaceId="399117969575232581"
|
|
|
|
|
:columnOptions="receiptout_item0reservoirareaIdcolumnOptions" propsValue="id"
|
|
|
|
|
relationField="name" popupType="dialog"
|
|
|
|
|
popupWidth="800px" disabled>
|
|
|
|
|
</popupSelect>
|
|
|
|
|
</template>
|
|
|
|
@ -165,7 +186,8 @@
|
|
|
|
|
<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-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>
|
|
|
|
@ -180,7 +202,8 @@
|
|
|
|
|
<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-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>
|
|
|
|
@ -202,26 +225,27 @@
|
|
|
|
|
<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-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-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>-->
|
|
|
|
|
<!-- <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-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
</el-col>
|
|
|
|
|
</template>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-row>
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="visible = false"> 取 消</el-button>
|
|
|
|
@ -231,8 +255,9 @@
|
|
|
|
|
</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: {},
|
|
|
|
|
props: [],
|
|
|
|
@ -242,23 +267,23 @@
|
|
|
|
|
loading: false,
|
|
|
|
|
isDetail: false,
|
|
|
|
|
dataForm: {
|
|
|
|
|
documentNo : '',
|
|
|
|
|
type : "0",
|
|
|
|
|
salesId : "",
|
|
|
|
|
amount : '',
|
|
|
|
|
currency : "0",
|
|
|
|
|
num : '',
|
|
|
|
|
customerId : '',
|
|
|
|
|
remark : '',
|
|
|
|
|
issueDate : '',
|
|
|
|
|
status : "0",
|
|
|
|
|
creatorTime : "",
|
|
|
|
|
creatorUserName : "",
|
|
|
|
|
lastModifyTime : "",
|
|
|
|
|
lastModifyUserName : "",
|
|
|
|
|
receiptout_item0List:[],
|
|
|
|
|
documentNo: '',
|
|
|
|
|
type: "0",
|
|
|
|
|
salesId: "",
|
|
|
|
|
amount: '',
|
|
|
|
|
currency: "0",
|
|
|
|
|
num: '',
|
|
|
|
|
customerId: '',
|
|
|
|
|
remark: '',
|
|
|
|
|
issueDate: '',
|
|
|
|
|
status: "0",
|
|
|
|
|
creatorTime: "",
|
|
|
|
|
creatorUserName: "",
|
|
|
|
|
lastModifyTime: "",
|
|
|
|
|
lastModifyUserName: "",
|
|
|
|
|
receiptout_item0List: [],
|
|
|
|
|
},
|
|
|
|
|
activezlqlfb:'0',
|
|
|
|
|
activezlqlfb: '0',
|
|
|
|
|
rules:
|
|
|
|
|
{
|
|
|
|
|
type: [
|
|
|
|
@ -276,27 +301,52 @@
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
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"}],
|
|
|
|
|
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() {},
|
|
|
|
|
mounted() {
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
getSummaries(param) {
|
|
|
|
|
const { columns, data } = param;
|
|
|
|
|
const {columns, data} = param;
|
|
|
|
|
const sums = [];
|
|
|
|
|
columns.forEach((column, index) => {
|
|
|
|
|
if (index === 0) {
|
|
|
|
@ -304,7 +354,7 @@
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
const values = data.map(item => Number(item[column.property]));
|
|
|
|
|
if (!values.every(value => isNaN(value)) && (index === 6 || index === 8 || index === 10 || index === 11 )) {
|
|
|
|
|
if (!values.every(value => isNaN(value)) && (index === 6 || index === 8 || index === 10 || index === 11)) {
|
|
|
|
|
sums[index] = values.reduce((prev, curr) => {
|
|
|
|
|
const value = Number(curr);
|
|
|
|
|
if (!isNaN(value)) {
|
|
|
|
@ -319,8 +369,8 @@
|
|
|
|
|
});
|
|
|
|
|
return sums;
|
|
|
|
|
},
|
|
|
|
|
areaSelect(a,b){
|
|
|
|
|
for (let i = 0;i<this.dataForm.receiptout_item0List.length;i++) {
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
@ -328,12 +378,12 @@
|
|
|
|
|
},
|
|
|
|
|
receiptout_item0Exist() {
|
|
|
|
|
let isOk = true;
|
|
|
|
|
for(let i=0;i<this.dataForm.receiptout_item0List.length;i++){
|
|
|
|
|
for (let i = 0; i < this.dataForm.receiptout_item0List.length; i++) {
|
|
|
|
|
const e = this.dataForm.receiptout_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
return isOk;
|
|
|
|
|
},
|
|
|
|
|
clearData(data){
|
|
|
|
|
clearData(data) {
|
|
|
|
|
for (let key in data) {
|
|
|
|
|
if (data[key] instanceof Array) {
|
|
|
|
|
data[key] = [];
|
|
|
|
@ -353,7 +403,7 @@
|
|
|
|
|
this.dataForm.customerId = list[0].customerId;
|
|
|
|
|
debugger
|
|
|
|
|
this.dataForm.receiptout_item0List = list[0].list;
|
|
|
|
|
for (let i = 0;i<list[0].list.length;i++){
|
|
|
|
|
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;
|
|
|
|
@ -362,7 +412,7 @@
|
|
|
|
|
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
|
|
|
|
|
this.dataForm.receiptout_item0List[i].rateAmount = this.dataForm.receiptout_item0List[i].amount * item.fullName / 100
|
|
|
|
|
debugger
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -379,7 +429,7 @@
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
request() {
|
|
|
|
|
var _data =this.dataList()
|
|
|
|
|
var _data = this.dataList()
|
|
|
|
|
if (!this.dataForm.id) {
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/receipout/Receiptout/saleordercreate',
|
|
|
|
@ -396,9 +446,9 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
request({
|
|
|
|
|
url: '/api/receipout/Receiptout/'+this.dataForm.id,
|
|
|
|
|
url: '/api/receipout/Receiptout/' + this.dataForm.id,
|
|
|
|
|
method: 'PUT',
|
|
|
|
|
data: _data
|
|
|
|
|
}).then((res) => {
|
|
|
|
@ -414,36 +464,36 @@
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
addreceiptout_item0List(){
|
|
|
|
|
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,
|
|
|
|
|
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(){
|
|
|
|
|
dataList() {
|
|
|
|
|
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
|
|
|
|
for(let i=0;i<_data.receiptout_item0List.length;i++){
|
|
|
|
|
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++){
|
|
|
|
|
dataInfo(dataAll) {
|
|
|
|
|
let _dataAll = dataAll
|
|
|
|
|
for (let i = 0; i < _dataAll.receiptout_item0List.length; i++) {
|
|
|
|
|
var _list = _dataAll.receiptout_item0List[i];
|
|
|
|
|
}
|
|
|
|
|
this.dataForm = _dataAll
|
|
|
|
|