|
|
@ -1,232 +1,282 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'" :close-on-click-modal="false" append-to-body
|
|
|
|
<el-dialog :title="!dataForm.id ? '新建' : isDetail ? '详情':'编辑'"
|
|
|
|
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll width="1200px">
|
|
|
|
:close-on-click-modal="false" append-to-body
|
|
|
|
<el-row :gutter="15" class="">
|
|
|
|
:visible.sync="visible" class="JNPF-dialog JNPF-dialog_center" lock-scroll
|
|
|
|
<el-form ref="elForm" :model="dataForm" :rules="rules" size="small" label-width="100px" label-position="right">
|
|
|
|
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">
|
|
|
|
<template v-if="!loading">
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="24" >
|
|
|
|
<el-form-item label="物料编码" prop="materialCode">
|
|
|
|
<el-form-item label="磅单上传"
|
|
|
|
<popup-select v-model="dataForm.materialCode" placeholder="请选择" clearable field="materialCode"
|
|
|
|
prop="poundPictures" >
|
|
|
|
interfaceId="381037852907038533" :columnOptions="materialCodecolumnOptions" propsValue="item_code"
|
|
|
|
<el-upload class="avatar-uploader" :action="action" :show-file-list="false"
|
|
|
|
relationField="item_code" popupType="dialog" popupTitle="选择数据" popupWidth="800px">
|
|
|
|
:on-success="handleAvatarSuccess">
|
|
|
|
|
|
|
|
<img v-if="imageUrl" :src="imageUrl" class="avatar">
|
|
|
|
</popup-select>
|
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
|
</el-form-item>
|
|
|
|
</el-upload>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
|
|
|
|
<el-input v-model="dataForm.materialName" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="销售合同" prop="salesName">
|
|
|
|
<el-form-item label="物料名称"
|
|
|
|
<popup-select v-model="dataForm.salesName" placeholder="请选择" clearable field="salesName"
|
|
|
|
prop="materialId" >
|
|
|
|
interfaceId="381038993740949317" :columnOptions="salesNamecolumnOptions" propsValue="contract_name"
|
|
|
|
<popupSelect v-model="dataForm.materialId"
|
|
|
|
relationField="contract_name" popupType="dialog" popupTitle="选择数据" popupWidth="800px">
|
|
|
|
placeholder="请选择物料编码" clearable field="materialId" interfaceId="381037852907038533" :columnOptions="materialIdcolumnOptions" propsValue="id" relationField="item_name" popupType="dialog"
|
|
|
|
|
|
|
|
popupTitle="选择数据" popupWidth="800px"
|
|
|
|
</popup-select>
|
|
|
|
>
|
|
|
|
</el-form-item>
|
|
|
|
</popupSelect>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
|
|
|
<el-form-item label="客户名称" prop="customerName">
|
|
|
|
|
|
|
|
<el-input v-model="dataForm.customerName" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="是否垫资" prop="advance">
|
|
|
|
<el-form-item label="客户名称"
|
|
|
|
<el-select v-model="dataForm.advance" placeholder="请选择" clearable :style='{"width":"100%"}'>
|
|
|
|
prop="customerId" >
|
|
|
|
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id"
|
|
|
|
<popupSelect v-model="dataForm.customerId"
|
|
|
|
:disabled="item.disabled"></el-option>
|
|
|
|
placeholder="请选择客户名称" clearable field="customerId" interfaceId="395936123471343749" :columnOptions="customerIdcolumnOptions" propsValue="id" relationField="supplier_nm" popupType="dialog"
|
|
|
|
|
|
|
|
popupTitle="选择数据" popupWidth="800px"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
</popupSelect>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="销售价格" prop="salesPrice">
|
|
|
|
<el-form-item label="销售合同"
|
|
|
|
<el-input-number v-model="dataForm.salesPrice" placeholder="数字文本" :step="1">
|
|
|
|
prop="salesId" >
|
|
|
|
|
|
|
|
<popupSelect v-model="dataForm.salesId"
|
|
|
|
|
|
|
|
placeholder="请选择销售合同" clearable field="salesId" interfaceId="381038993740949317" :columnOptions="salesIdcolumnOptions" propsValue="id" relationField="contract_name" popupType="dialog"
|
|
|
|
|
|
|
|
popupTitle="选择数据" popupWidth="800px"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
</el-input-number>
|
|
|
|
</popupSelect>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="运输方式" prop="transportType">
|
|
|
|
<el-form-item label="车牌号"
|
|
|
|
<el-select v-model="dataForm.transportType" placeholder="请选择" clearable :style='{"width":"100%"}'>
|
|
|
|
prop="vehicleId" >
|
|
|
|
<el-option v-for="(item, index) in transportTypeOptions" :key="index" :label="item.fullName"
|
|
|
|
<popupSelect v-model="dataForm.vehicleId"
|
|
|
|
:value="item.id" :disabled="item.disabled"></el-option>
|
|
|
|
placeholder="请选择" clearable field="vehicleId" interfaceId="381432451370615173" :columnOptions="vehicleIdcolumnOptions" propsValue="id" relationField="ticketno" popupType="dialog"
|
|
|
|
|
|
|
|
popupTitle="选择数据" popupWidth="800px" @change="changePicture"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
</popupSelect>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="24" >
|
|
|
|
<el-form-item label="运费" prop="departmentId">
|
|
|
|
<el-form-item label="车辆图片"
|
|
|
|
<el-input-number v-model="dataForm.departmentId" placeholder="数字文本" :step="1">
|
|
|
|
prop="vehiclePictures" >
|
|
|
|
|
|
|
|
<JNPF-UploadImg v-model="dataForm.vehiclePictures"
|
|
|
|
|
|
|
|
:fileSize="500" sizeUnit="MB" :limit="9" >
|
|
|
|
|
|
|
|
|
|
|
|
</el-input-number>
|
|
|
|
</JNPF-UploadImg>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="车号" prop="licenseNo">
|
|
|
|
<el-form-item label="磅单日期"
|
|
|
|
<popupSelect v-model="dataForm.licenseNo" placeholder="请选择" clearable field="licenseNo"
|
|
|
|
prop="poundDate" >
|
|
|
|
interfaceId="381432451370615173" :columnOptions="licenseNocolumnOptions" propsValue="ticketno"
|
|
|
|
<el-date-picker v-model="dataForm.poundDate"
|
|
|
|
relationField="ticketno" popupType="dialog" popupTitle="选择数据" popupWidth="800px">
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
|
|
|
|
|
|
|
|
|
|
|
|
</popupSelect>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="业务员名称" prop="businessName">
|
|
|
|
<el-form-item label="磅单号"
|
|
|
|
<el-input v-model="dataForm.businessName" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
prop="poundlistNo" >
|
|
|
|
|
|
|
|
<el-input v-model="dataForm.poundlistNo"
|
|
|
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="磅单图片" prop="poundPictures">
|
|
|
|
<el-form-item label="皮重"
|
|
|
|
<JNPF-UploadImg v-model="dataForm.poundPictures" :fileSize="500" sizeUnit="MB" :limit="9">
|
|
|
|
prop="tareWeight" >
|
|
|
|
|
|
|
|
<el-input-number v-model="dataForm.tareWeight"
|
|
|
|
|
|
|
|
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
</JNPF-UploadImg>
|
|
|
|
</el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="皮重" prop="tareWeight">
|
|
|
|
<el-form-item label="毛重"
|
|
|
|
<el-input-number v-model="dataForm.tareWeight" placeholder="数字文本" :step="1">
|
|
|
|
prop="grossWeight" >
|
|
|
|
|
|
|
|
<el-input-number v-model="dataForm.grossWeight"
|
|
|
|
|
|
|
|
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
</el-input-number>
|
|
|
|
</el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="毛重" prop="grossWeight">
|
|
|
|
<el-form-item label="扣重"
|
|
|
|
<el-input-number v-model="dataForm.grossWeight" placeholder="数字文本" :step="1">
|
|
|
|
prop="buckleWeight" >
|
|
|
|
|
|
|
|
<el-input-number v-model="dataForm.buckleWeight"
|
|
|
|
|
|
|
|
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
</el-input-number>
|
|
|
|
</el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="扣重" prop="buckleWeight">
|
|
|
|
<el-form-item label="净重"
|
|
|
|
<el-input-number v-model="dataForm.buckleWeight" placeholder="数字文本" :step="1">
|
|
|
|
prop="netWeight" >
|
|
|
|
|
|
|
|
<el-input-number v-model="dataForm.netWeight"
|
|
|
|
|
|
|
|
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
</el-input-number>
|
|
|
|
</el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="净重" prop="netWeight">
|
|
|
|
<el-form-item label="单位"
|
|
|
|
<el-input-number v-model="dataForm.netWeight" placeholder="数字文本" :step="1">
|
|
|
|
prop="unit" >
|
|
|
|
|
|
|
|
<el-select v-model="dataForm.unit"
|
|
|
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' @change="unitChange">
|
|
|
|
|
|
|
|
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
|
|
|
|
|
|
|
|
|
|
|
</el-input-number>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
<el-form-item label="运输类型"
|
|
|
|
<el-input v-model="dataForm.remark" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
prop="transportType" >
|
|
|
|
|
|
|
|
<el-select v-model="dataForm.transportType"
|
|
|
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' @change="transportTypeChange">
|
|
|
|
|
|
|
|
<el-option v-for="(item, index) in transportTypeOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
|
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="司机名称" prop="driverName">
|
|
|
|
<el-form-item label="是否垫资"
|
|
|
|
<el-input v-model="dataForm.driverName" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
prop="advance" >
|
|
|
|
|
|
|
|
<el-select v-model="dataForm.advance"
|
|
|
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' @change="advanceChange">
|
|
|
|
|
|
|
|
<el-option v-for="(item, index) in advanceOptions" :key="index" :label="item.fullName" :value="item.id" :disabled="item.disabled" ></el-option>
|
|
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="车辆图片" prop="vehiclePictures">
|
|
|
|
<el-form-item label="运费"
|
|
|
|
<JNPF-UploadImg v-model="dataForm.vehiclePictures" :fileSize="500" sizeUnit="MB" :limit="9">
|
|
|
|
prop="transportPrice" >
|
|
|
|
|
|
|
|
<el-input-number v-model="dataForm.transportPrice"
|
|
|
|
|
|
|
|
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
</JNPF-UploadImg>
|
|
|
|
</el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="制单人" prop="creatorusername">
|
|
|
|
<el-form-item label="销售价格"
|
|
|
|
<el-input v-model="dataForm.creatorusername" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
prop="salesPrice" >
|
|
|
|
|
|
|
|
<el-input-number v-model="dataForm.salesPrice"
|
|
|
|
|
|
|
|
placeholder="数字文本" :step="1" :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
</el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="供应商名称" prop="supplierName">
|
|
|
|
<el-form-item label="业务员"
|
|
|
|
<el-input v-model="dataForm.supplierName" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
prop="businessId" >
|
|
|
|
|
|
|
|
<popupSelect v-model="dataForm.businessId"
|
|
|
|
|
|
|
|
placeholder="请选择" clearable field="businessId" interfaceId="ebcc44be142e43b795c0d769abd6d25a" :columnOptions="businessIdcolumnOptions" propsValue="F_Id" relationField="F_RealName" popupType="dialog"
|
|
|
|
|
|
|
|
popupTitle="选择数据" popupWidth="800px"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
</popupSelect>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="采购合同" prop="purchaseName">
|
|
|
|
<el-form-item label="自然人"
|
|
|
|
<relationForm v-model="dataForm.purchaseName" placeholder="请选择" clearable field="purchaseName"
|
|
|
|
prop="naturalId" >
|
|
|
|
modelId="294090217084722181" :columnOptions="purchaseNamecolumnOptions" relationField="selectField121">
|
|
|
|
<popupSelect v-model="dataForm.naturalId"
|
|
|
|
|
|
|
|
placeholder="请选择" clearable field="naturalId" interfaceId="395933800510599301" :columnOptions="naturalIdcolumnOptions" propsValue="id" relationField="name" popupType="dialog"
|
|
|
|
|
|
|
|
popupTitle="选择数据" popupWidth="800px"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
</relationForm>
|
|
|
|
</popupSelect>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="单位" prop="unit">
|
|
|
|
<el-form-item label="采购合同"
|
|
|
|
<el-select v-model="dataForm.unit" placeholder="请选择" clearable :style='{"width":"100%"}'>
|
|
|
|
prop="purchaseId" >
|
|
|
|
<el-option v-for="(item, index) in unitOptions" :key="index" :label="item.fullName" :value="item.id"
|
|
|
|
<popupSelect v-model="dataForm.purchaseId"
|
|
|
|
:disabled="item.disabled"></el-option>
|
|
|
|
placeholder="请选择" clearable field="purchaseId" interfaceId="397408984857931205" :columnOptions="purchaseIdcolumnOptions" propsValue="id" relationField="contract_name" popupType="dialog"
|
|
|
|
|
|
|
|
popupTitle="选择数据" popupWidth="800px" @change="purchaseSelect"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
</popupSelect>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="结算重量" prop="settlement">
|
|
|
|
<el-form-item label="供应商名称"
|
|
|
|
<el-input v-model="dataForm.settlement" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
prop="supplierName" >
|
|
|
|
|
|
|
|
<el-input v-model="dataForm.supplierName"
|
|
|
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="采购单价" prop="purchasePrice">
|
|
|
|
<el-form-item label="结算重量"
|
|
|
|
<el-input v-model="dataForm.purchasePrice" placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
prop="settlement" >
|
|
|
|
|
|
|
|
<el-input v-model="dataForm.settlement"
|
|
|
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="进项票日期" prop="inputDate">
|
|
|
|
<el-form-item label="采购单价"
|
|
|
|
<el-date-picker v-model="dataForm.inputDate" placeholder="请选择" clearable :style='{"width":"100%"}'
|
|
|
|
prop="purchasePrice" >
|
|
|
|
type="datetime" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
<el-input-number v-model="dataForm.purchasePrice"
|
|
|
|
|
|
|
|
placeholder="请输入" :step="1" :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
</el-input-number>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="销项票日期" prop="outputDate">
|
|
|
|
<el-form-item label="进项票日期"
|
|
|
|
<el-date-picker v-model="dataForm.outputDate" placeholder="请选择" clearable :style='{"width":"100%"}'
|
|
|
|
prop="inputDate" >
|
|
|
|
type="datetime" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
<el-date-picker v-model="dataForm.inputDate"
|
|
|
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
|
|
|
|
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="付款日期" prop="payDate">
|
|
|
|
<el-form-item label="销项票日期"
|
|
|
|
<el-date-picker v-model="dataForm.payDate" placeholder="请选择" clearable :style='{"width":"100%"}'
|
|
|
|
prop="outputDate" >
|
|
|
|
type="datetime" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
<el-date-picker v-model="dataForm.outputDate"
|
|
|
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
|
|
|
|
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="回款日期" prop="paymentDate">
|
|
|
|
<el-form-item label="付款日期"
|
|
|
|
<el-date-picker v-model="dataForm.paymentDate" placeholder="请选择" clearable :style='{"width":"100%"}'
|
|
|
|
prop="payDate" >
|
|
|
|
type="datetime" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
<el-date-picker v-model="dataForm.payDate"
|
|
|
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
|
|
|
|
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="12">
|
|
|
|
<el-col :span="12" >
|
|
|
|
<el-form-item label="磅单日期" prop="poundDate">
|
|
|
|
<el-form-item label="回款日期"
|
|
|
|
<el-date-picker v-model="dataForm.poundDate" placeholder="请选择" clearable :style='{"width":"100%"}'
|
|
|
|
prop="paymentDate" >
|
|
|
|
type="datetime" format="yyyy-MM-dd" value-format="timestamp">
|
|
|
|
<el-date-picker v-model="dataForm.paymentDate"
|
|
|
|
|
|
|
|
placeholder="请选择" clearable :style='{"width":"100%"}' type="date" format="yyyy-MM-dd" value-format="timestamp" >
|
|
|
|
|
|
|
|
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
<el-col :span="12" >
|
|
|
|
|
|
|
|
<el-form-item label="备注"
|
|
|
|
|
|
|
|
prop="remark" >
|
|
|
|
|
|
|
|
<el-input v-model="dataForm.remark"
|
|
|
|
|
|
|
|
placeholder="请输入" clearable :style='{"width":"100%"}'>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-input>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
<el-button @click="visible = false"> 取 消</el-button>
|
|
|
|
<el-button @click="visible = false"> 取 消</el-button>
|
|
|
@ -236,189 +286,210 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import request from '@/utils/request'
|
|
|
|
import request from '@/utils/request'
|
|
|
|
import {
|
|
|
|
import { getDataInterfaceRes } from '@/api/systemData/dataInterface'
|
|
|
|
getDataInterfaceRes
|
|
|
|
import { getDictionaryDataSelector } from '@/api/systemData/dictionary'
|
|
|
|
} from '@/api/systemData/dataInterface'
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
getDictionaryDataSelector
|
|
|
|
|
|
|
|
} from '@/api/systemData/dictionary'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {},
|
|
|
|
components: {},
|
|
|
|
props: [],
|
|
|
|
props: [],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
unit: "0",
|
|
|
|
|
|
|
|
transportType: "0",
|
|
|
|
|
|
|
|
advance: "0",
|
|
|
|
|
|
|
|
action: this.define.APIURl + '/api/tradeupload/Tradeupload/UploaderPondList/annexpic',
|
|
|
|
|
|
|
|
imageUrl: '',
|
|
|
|
visible: false,
|
|
|
|
visible: false,
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
|
isDetail: false,
|
|
|
|
isDetail: false,
|
|
|
|
dataForm: {
|
|
|
|
dataForm: {
|
|
|
|
materialCode: "",
|
|
|
|
poundPictures : [],
|
|
|
|
materialName: '',
|
|
|
|
materialId : "",
|
|
|
|
salesName: "",
|
|
|
|
customerId : "",
|
|
|
|
customerName: '',
|
|
|
|
salesId : "",
|
|
|
|
advance: "",
|
|
|
|
vehicleId : "",
|
|
|
|
salesPrice: '',
|
|
|
|
vehiclePictures : [],
|
|
|
|
transportType: "",
|
|
|
|
poundDate : '',
|
|
|
|
departmentId: 11.225,
|
|
|
|
poundlistNo : '',
|
|
|
|
licenseNo: "",
|
|
|
|
tareWeight : 0,
|
|
|
|
businessName: '',
|
|
|
|
grossWeight : 0,
|
|
|
|
poundPictures: [],
|
|
|
|
buckleWeight : 0,
|
|
|
|
tareWeight: '',
|
|
|
|
netWeight : 0,
|
|
|
|
grossWeight: '',
|
|
|
|
unit : "0",
|
|
|
|
buckleWeight: '',
|
|
|
|
transportType : "0",
|
|
|
|
netWeight: '',
|
|
|
|
advance : "0",
|
|
|
|
remark: '',
|
|
|
|
transportPrice : 0,
|
|
|
|
driverName: '',
|
|
|
|
salesPrice : 0,
|
|
|
|
vehiclePictures: [],
|
|
|
|
businessId : "",
|
|
|
|
creatorusername: '',
|
|
|
|
naturalId : "",
|
|
|
|
supplierName: '',
|
|
|
|
purchaseId : "",
|
|
|
|
purchaseName: "",
|
|
|
|
supplierName : '',
|
|
|
|
unit: "",
|
|
|
|
settlement : '',
|
|
|
|
settlement: '',
|
|
|
|
purchasePrice : 0,
|
|
|
|
purchasePrice: '',
|
|
|
|
inputDate : '',
|
|
|
|
inputDate: '',
|
|
|
|
outputDate : '',
|
|
|
|
outputDate: '',
|
|
|
|
payDate : '',
|
|
|
|
payDate: '',
|
|
|
|
paymentDate : '',
|
|
|
|
paymentDate: '',
|
|
|
|
remark : '',
|
|
|
|
poundDate: '',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
rules:
|
|
|
|
rules: {
|
|
|
|
{
|
|
|
|
materialCode: [{
|
|
|
|
// poundPictures: [
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// required: true,
|
|
|
|
|
|
|
|
// message: '请至少选择一个',
|
|
|
|
|
|
|
|
// trigger: 'click'
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// ],
|
|
|
|
|
|
|
|
materialId: [
|
|
|
|
|
|
|
|
{
|
|
|
|
required: true,
|
|
|
|
required: true,
|
|
|
|
message: '请选择',
|
|
|
|
message: '请选择物料编码',
|
|
|
|
trigger: 'change'
|
|
|
|
trigger: 'change'
|
|
|
|
}, ],
|
|
|
|
},
|
|
|
|
salesName: [{
|
|
|
|
],
|
|
|
|
|
|
|
|
customerId: [
|
|
|
|
|
|
|
|
{
|
|
|
|
required: true,
|
|
|
|
required: true,
|
|
|
|
message: '请选择',
|
|
|
|
message: '请选择客户名称',
|
|
|
|
trigger: 'change'
|
|
|
|
trigger: 'change'
|
|
|
|
}, ],
|
|
|
|
},
|
|
|
|
licenseNo: [{
|
|
|
|
],
|
|
|
|
|
|
|
|
salesId: [
|
|
|
|
|
|
|
|
{
|
|
|
|
required: true,
|
|
|
|
required: true,
|
|
|
|
message: '请选择',
|
|
|
|
message: '请选择销售合同',
|
|
|
|
trigger: 'change'
|
|
|
|
trigger: 'change'
|
|
|
|
}, ],
|
|
|
|
|
|
|
|
poundPictures: [{
|
|
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
|
|
message: '请至少选择一个',
|
|
|
|
|
|
|
|
trigger: 'click'
|
|
|
|
|
|
|
|
}, ],
|
|
|
|
|
|
|
|
tareWeight: [{
|
|
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
|
|
message: '数字文本',
|
|
|
|
|
|
|
|
trigger: ["blur", "change"]
|
|
|
|
|
|
|
|
}, ],
|
|
|
|
|
|
|
|
grossWeight: [{
|
|
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
|
|
message: '数字文本',
|
|
|
|
|
|
|
|
trigger: ["blur", "change"]
|
|
|
|
|
|
|
|
}, ],
|
|
|
|
|
|
|
|
buckleWeight: [{
|
|
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
|
|
message: '数字文本',
|
|
|
|
|
|
|
|
trigger: ["blur", "change"]
|
|
|
|
|
|
|
|
}, ],
|
|
|
|
|
|
|
|
netWeight: [{
|
|
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
|
|
message: '数字文本',
|
|
|
|
|
|
|
|
trigger: ["blur", "change"]
|
|
|
|
|
|
|
|
}, ],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
materialCodecolumnOptions: [{
|
|
|
|
|
|
|
|
"label": "物料编码",
|
|
|
|
|
|
|
|
"value": "item_code"
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
vehicleId: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"label": "物料名称",
|
|
|
|
required: true,
|
|
|
|
"value": "description"
|
|
|
|
message: '请选择',
|
|
|
|
|
|
|
|
trigger: 'change'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
vehiclePictures: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"label": "库存组织",
|
|
|
|
required: true,
|
|
|
|
"value": "organization_id"
|
|
|
|
message: '请至少选择一个',
|
|
|
|
|
|
|
|
trigger: 'click'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
poundDate: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"label": "默认库区",
|
|
|
|
required: true,
|
|
|
|
"value": "areaname"
|
|
|
|
message: '请选择',
|
|
|
|
|
|
|
|
trigger: 'change'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
salesNamecolumnOptions: [{
|
|
|
|
poundlistNo: [
|
|
|
|
"label": "合同编码",
|
|
|
|
|
|
|
|
"value": "contract_code"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"label": "合同名称",
|
|
|
|
required: true,
|
|
|
|
"value": "contract_name"
|
|
|
|
message: '请输入',
|
|
|
|
|
|
|
|
trigger: 'blur'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
tareWeight: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"label": "合同类型",
|
|
|
|
required: true,
|
|
|
|
"value": "contract_type"
|
|
|
|
message: '数字文本',
|
|
|
|
|
|
|
|
trigger: ["blur","change"]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
grossWeight: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"label": "供应商/客户名称",
|
|
|
|
required: true,
|
|
|
|
"value": "name"
|
|
|
|
message: '数字文本',
|
|
|
|
|
|
|
|
trigger: ["blur","change"]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
advanceOptions: [{
|
|
|
|
buckleWeight: [
|
|
|
|
"fullName": "是",
|
|
|
|
|
|
|
|
"id": "1"
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
"fullName": "否",
|
|
|
|
|
|
|
|
"id": "0"
|
|
|
|
|
|
|
|
}],
|
|
|
|
|
|
|
|
transportTypeOptions: [{
|
|
|
|
|
|
|
|
"fullName": "汽运",
|
|
|
|
|
|
|
|
"id": "0"
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
"fullName": "船运",
|
|
|
|
|
|
|
|
"id": "1"
|
|
|
|
|
|
|
|
}, {
|
|
|
|
|
|
|
|
"fullName": "火车",
|
|
|
|
|
|
|
|
"id": "2"
|
|
|
|
|
|
|
|
}],
|
|
|
|
|
|
|
|
licenseNocolumnOptions: [{
|
|
|
|
|
|
|
|
"label": "车牌号",
|
|
|
|
|
|
|
|
"value": "ticketno"
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"label": "司机",
|
|
|
|
required: true,
|
|
|
|
"value": "drivername"
|
|
|
|
message: '数字文本',
|
|
|
|
|
|
|
|
trigger: ["blur","change"]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
netWeight: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"label": "车辆照片",
|
|
|
|
required: true,
|
|
|
|
"value": "vehiclephotos"
|
|
|
|
message: '数字文本',
|
|
|
|
|
|
|
|
trigger: ["blur","change"]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
salesPrice: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"label": "手机号",
|
|
|
|
required: true,
|
|
|
|
"value": "contact"
|
|
|
|
message: '数字文本',
|
|
|
|
|
|
|
|
trigger: ["blur","change"]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
businessId: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"label": "创建人",
|
|
|
|
required: true,
|
|
|
|
"value": "f_creatorusername"
|
|
|
|
message: '请选择',
|
|
|
|
|
|
|
|
trigger: 'change'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
purchaseId: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
"label": "创建时间",
|
|
|
|
required: true,
|
|
|
|
"value": "f_creatortime"
|
|
|
|
message: '请选择',
|
|
|
|
|
|
|
|
trigger: 'change'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
purchaseNamecolumnOptions: [{
|
|
|
|
},
|
|
|
|
"label": "事件等级",
|
|
|
|
materialIdcolumnOptions:[ {"label":"物料编码","value":"item_code"}, {"label":"物料名称","value":"item_name"}, {"label":"单位","value":"primary_unit_of_measure"}, {"label":"默认入库区","value":"in_area"}, {"label":"默认出库区","value":"out_area"},],
|
|
|
|
"value": "selectField121"
|
|
|
|
customerIdcolumnOptions:[ {"label":"客户编码","value":"supplier_cd"}, {"label":"客户名称","value":"supplier_nm"}, {"label":"地址","value":"address"}, {"label":"银行账号","value":"bank_account"},],
|
|
|
|
}, ],
|
|
|
|
salesIdcolumnOptions:[ {"label":"合同编码","value":"contract_code"}, {"label":"合同名称","value":"contract_name"}, {"label":"合同类型","value":"contract_type"}, {"label":"供应商/客户名称","value":"name"},],
|
|
|
|
unitOptions: [{
|
|
|
|
vehicleIdcolumnOptions:[ {"label":"车牌号","value":"ticketno"}, {"label":"司机","value":"drivername"}, {"label":"车辆照片","value":"vehiclephotos"}, {"label":"手机号","value":"contact"},],
|
|
|
|
"fullName": "吨",
|
|
|
|
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
|
|
|
|
"id": "0"
|
|
|
|
transportTypeOptions:[{"fullName":"汽运","id":"0"},{"fullName":"船运","id":"1"},{"fullName":"火车","id":"2"}],
|
|
|
|
}, {
|
|
|
|
advanceOptions:[{"fullName":"否","id":"0"},{"fullName":"是","id":"1"}],
|
|
|
|
"fullName": "千克",
|
|
|
|
businessIdcolumnOptions:[ {"label":"人员名称","value":"F_RealName"}, {"label":"人员职位","value":"F_FullName"},],
|
|
|
|
"id": "1"
|
|
|
|
naturalIdcolumnOptions:[ {"label":"自然人名称","value":"name"}, {"label":"自然人手机号","value":"contact"}, {"label":"自然人地址","value":"adress"},],
|
|
|
|
}],
|
|
|
|
purchaseIdcolumnOptions:[ {"label":"合同编码","value":"contract_code"}, {"label":"合同名称","value":"contract_name"}, {"label":"合同类型","value":"contract_type"}, {"label":"供应商ID","value":"code"}, {"label":"供应商名称","value":"name"},],
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {},
|
|
|
|
computed: {},
|
|
|
|
watch: {},
|
|
|
|
watch: {},
|
|
|
|
created() {},
|
|
|
|
created() {
|
|
|
|
|
|
|
|
},
|
|
|
|
mounted() {},
|
|
|
|
mounted() {},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
clearData(data) {
|
|
|
|
unitChange(e){
|
|
|
|
|
|
|
|
this.dataForm.unit = e;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
transportTypeChange(e){
|
|
|
|
|
|
|
|
this.dataForm.transportType = e;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
advanceChange(e){
|
|
|
|
|
|
|
|
this.dataForm.advance = e;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
purchaseSelect(j,k){
|
|
|
|
|
|
|
|
this.dataForm.supplierName = k.name;
|
|
|
|
|
|
|
|
this.dataForm.supplierId = k.code;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
handleAvatarSuccess(res, file) {
|
|
|
|
|
|
|
|
this.imageUrl = URL.createObjectURL(file.raw);
|
|
|
|
|
|
|
|
this.dataForm.customerId = res.data.customerId;
|
|
|
|
|
|
|
|
this.dataForm.customerName = res.data.customerName;
|
|
|
|
|
|
|
|
this.dataForm.salesId = res.data.salesId;
|
|
|
|
|
|
|
|
this.dataForm.salesName = res.data.salesName;
|
|
|
|
|
|
|
|
this.dataForm.vehicleId = res.data.vehicleId;
|
|
|
|
|
|
|
|
this.dataForm.poundDate = res.data.poundDate;
|
|
|
|
|
|
|
|
this.dataForm.poundlistNo = res.data.poundlistNo;
|
|
|
|
|
|
|
|
this.dataForm.tareWeight = res.data.tareWeight;
|
|
|
|
|
|
|
|
this.dataForm.grossWeight = res.data.grossWeight;
|
|
|
|
|
|
|
|
this.dataForm.buckleWeight = res.data.buckleWeight;
|
|
|
|
|
|
|
|
this.dataForm.netWeight = res.data.netWeight;
|
|
|
|
|
|
|
|
this.dataForm.vehiclePictures = JSON.parse(res.data.vehiclePictures);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
changePicture(a, b) {
|
|
|
|
|
|
|
|
this.dataForm.vehiclePictures = JSON.parse(b.vehiclephotos);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
clearData(data){
|
|
|
|
for (let key in data) {
|
|
|
|
for (let key in data) {
|
|
|
|
if (data[key] instanceof Array) {
|
|
|
|
if (data[key] instanceof Array) {
|
|
|
|
data[key] = [];
|
|
|
|
data[key] = [];
|
|
|
@ -435,16 +506,16 @@
|
|
|
|
this.isDetail = isDetail || false;
|
|
|
|
this.isDetail = isDetail || false;
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$refs['elForm'].resetFields();
|
|
|
|
this.$refs['elForm'].resetFields();
|
|
|
|
if (this.dataForm.id) {
|
|
|
|
if(this.dataForm.id){
|
|
|
|
this.loading = true
|
|
|
|
this.loading = true
|
|
|
|
request({
|
|
|
|
request({
|
|
|
|
url: '/api/poundlist/Poundlist/' + this.dataForm.id,
|
|
|
|
url: '/api/poundlist/Poundlist/'+this.dataForm.id,
|
|
|
|
method: 'get'
|
|
|
|
method: 'get'
|
|
|
|
}).then(res => {
|
|
|
|
}).then(res => {
|
|
|
|
this.dataInfo(res.data)
|
|
|
|
this.dataInfo(res.data)
|
|
|
|
this.loading = false
|
|
|
|
this.loading = false
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
}else{
|
|
|
|
this.clearData(this.dataForm)
|
|
|
|
this.clearData(this.dataForm)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -452,17 +523,48 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单提交
|
|
|
|
// 表单提交
|
|
|
|
dataFormSubmit() {
|
|
|
|
dataFormSubmit() {
|
|
|
|
|
|
|
|
var tareWeight = this.dataForm.tareWeight;//皮重
|
|
|
|
|
|
|
|
var grossWeight = this.dataForm.grossWeight;//毛重
|
|
|
|
|
|
|
|
var buckleWeight = this.dataForm.buckleWeight;//扣重
|
|
|
|
|
|
|
|
var netWeight = this.dataForm.netWeight;//净重
|
|
|
|
|
|
|
|
this.dataForm.unit = this.dataForm.unit ? this.dataForm.unit : 0;
|
|
|
|
|
|
|
|
this.dataForm.transportType = this.dataForm.transportType ? this.dataForm.transportType : 0;
|
|
|
|
|
|
|
|
this.dataForm.advance = this.dataForm.advance ? this.dataForm.advance : 0;
|
|
|
|
|
|
|
|
if(grossWeight < tareWeight + buckleWeight + netWeight){
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '毛重不得小于皮重+扣重+净重',
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(buckleWeight >= netWeight){
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '扣重不得大于净重',
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(buckleWeight >= grossWeight){
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: '扣重不得大于毛重',
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
duration: 1000
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
this.$refs['elForm'].validate((valid) => {
|
|
|
|
this.$refs['elForm'].validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
this.request()
|
|
|
|
this.request2()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
request() {
|
|
|
|
request2() {
|
|
|
|
var _data = this.dataList()
|
|
|
|
var _data = this.dataList()
|
|
|
|
if (!this.dataForm.id) {
|
|
|
|
if (!this.dataForm.id) {
|
|
|
|
request({
|
|
|
|
request({
|
|
|
|
url: '/api/poundlist/Poundlist',
|
|
|
|
url: '/api/tradeupload/Tradeupload',
|
|
|
|
method: 'post',
|
|
|
|
method: 'post',
|
|
|
|
data: _data
|
|
|
|
data: _data
|
|
|
|
}).then((res) => {
|
|
|
|
}).then((res) => {
|
|
|
@ -478,7 +580,7 @@
|
|
|
|
})
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
request({
|
|
|
|
request({
|
|
|
|
url: '/api/poundlist/Poundlist/' + this.dataForm.id,
|
|
|
|
url: '/api/tradeupload/Tradeupload/' + this.dataForm.id,
|
|
|
|
method: 'PUT',
|
|
|
|
method: 'PUT',
|
|
|
|
data: _data
|
|
|
|
data: _data
|
|
|
|
}).then((res) => {
|
|
|
|
}).then((res) => {
|
|
|
@ -494,18 +596,80 @@
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dataList() {
|
|
|
|
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));
|
|
|
|
var _data = JSON.parse(JSON.stringify(this.dataForm));
|
|
|
|
_data.poundPictures = JSON.stringify(_data.poundPictures)
|
|
|
|
_data.poundPictures = JSON.stringify(_data.poundPictures)
|
|
|
|
_data.vehiclePictures = JSON.stringify(_data.vehiclePictures)
|
|
|
|
_data.vehiclePictures = JSON.stringify(_data.vehiclePictures)
|
|
|
|
return _data;
|
|
|
|
return _data;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
dataInfo(dataAll) {
|
|
|
|
dataInfo(dataAll){
|
|
|
|
let _dataAll = dataAll
|
|
|
|
let _dataAll =dataAll
|
|
|
|
_dataAll.poundPictures = JSON.parse(_dataAll.poundPictures)
|
|
|
|
_dataAll.poundPictures = JSON.parse( _dataAll.poundPictures)
|
|
|
|
_dataAll.vehiclePictures = JSON.parse(_dataAll.vehiclePictures)
|
|
|
|
_dataAll.vehiclePictures = JSON.parse( _dataAll.vehiclePictures)
|
|
|
|
this.dataForm = _dataAll
|
|
|
|
this.dataForm = _dataAll
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
.avatar-uploader .el-upload {
|
|
|
|
|
|
|
|
border: 1px dashed #d9d9d9;
|
|
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-uploader .el-upload:hover {
|
|
|
|
|
|
|
|
border-color: #409EFF;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar-uploader-icon {
|
|
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
|
|
color: #8c939d;
|
|
|
|
|
|
|
|
width: 120px;
|
|
|
|
|
|
|
|
height: 120px;
|
|
|
|
|
|
|
|
line-height: 120px;
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.avatar {
|
|
|
|
|
|
|
|
width: 120px;
|
|
|
|
|
|
|
|
height: 120px;
|
|
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|