Merge branch 'master' of http://git.xdadan.com/tanex/emis-frontend
This commit is contained in:
commit
6fef532234
@ -70,6 +70,15 @@ export function calcSetteldWeight(data) {
|
||||
})
|
||||
}
|
||||
|
||||
// 体积重量计算
|
||||
export function calcVolumeWeight(data) {
|
||||
return request({
|
||||
url: '/emis/emisWaybill/calcVolumeWeight',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 修改运单列表
|
||||
|
||||
@ -43,14 +43,18 @@ const permission = {
|
||||
const rdata = JSON.parse(JSON.stringify(res.data))
|
||||
const sidebarRoutes = filterAsyncRouter(sdata)
|
||||
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
||||
|
||||
const indexUrl=getFirstUrl(res.data)
|
||||
const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
|
||||
|
||||
if(asyncRoutes.length>0){
|
||||
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
|
||||
}else{
|
||||
// 无路由,则退出登录
|
||||
}
|
||||
|
||||
if(sidebarRoutes.length==0){
|
||||
// 无左侧菜单路由,则退出登录
|
||||
dispatch('FedLogOut', { }, { root: true })
|
||||
rewriteRoutes.push({ path: '*', redirect: '/401', hidden: true })
|
||||
// rewriteRoutes.push({ path: '*', redirect: '/401', hidden: true })
|
||||
}
|
||||
|
||||
router.addRoutes(asyncRoutes);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-select
|
||||
|
||||
style="width:100%"
|
||||
filterable
|
||||
clearable
|
||||
v-model="svalue"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-select
|
||||
|
||||
style="width:100%"
|
||||
filterable
|
||||
clearable
|
||||
v-model="svalue"
|
||||
|
||||
@ -2,9 +2,19 @@
|
||||
<div >
|
||||
<el-row :gutter="0">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属国家" prop="country">
|
||||
<CountryPicker :placeholder="$t('所属国家')" v-model="form.country" ></CountryPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属线路" prop="lineCode">
|
||||
<TransLinePicker v-model="form.lineCode" :countryCode="form.country"></TransLinePicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品类型" prop="prodCode">
|
||||
<TransProductPicker placeholder="产品类型" v-model="form.prodCode" @onChange="onProdChange"></TransProductPicker>
|
||||
<TransProductPicker placeholder="产品类型" v-model="form.prodCode" :transLineCode="form.lineCode" @onChange="onProdChange"></TransProductPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -77,6 +87,8 @@
|
||||
<script>
|
||||
import { listEmisSpecialCalcWeight, getEmisSpecialCalcWeight, delEmisSpecialCalcWeight, addEmisSpecialCalcWeight, updateEmisSpecialCalcWeight } from "@/api/emis/emisSpecialCalcWeight";
|
||||
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
|
||||
import CountryPicker from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
||||
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
|
||||
|
||||
export default {
|
||||
name: "emisSpecialCalcWeightForm",
|
||||
@ -85,7 +97,7 @@ export default {
|
||||
type:Number,
|
||||
}
|
||||
},
|
||||
components: { TransProductPicker },
|
||||
components: { CountryPicker,TransLinePicker,TransProductPicker },
|
||||
dicts: [
|
||||
'sys_normal_disable',
|
||||
'emis_take_weight_method',
|
||||
@ -161,6 +173,8 @@ export default {
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
country: null,
|
||||
lineCode: null,
|
||||
prodCode: null,
|
||||
prodName: null,
|
||||
status: null,
|
||||
|
||||
@ -13,11 +13,11 @@
|
||||
<el-input v-model="form.lineNameEn" placeholder="请输入英文名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="线路编号" prop="lineCode">
|
||||
<el-input v-model="form.lineCode" placeholder="请输入线路代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起始国" prop="fromCountry">
|
||||
<CountryPickerStart :placeholder="$t('起始国')" v-model="form.fromCountry" ></CountryPickerStart>
|
||||
@ -62,14 +62,24 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio :label="1">启用</el-radio>
|
||||
<el-radio :label="0">未启用</el-radio>
|
||||
<el-radio :label="0">停用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="排序" prop="orderNum">
|
||||
<el-input v-model="form.orderNum" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :span="24">
|
||||
<el-form-item label="进仓模板" prop="applyScope">
|
||||
@ -122,10 +132,10 @@ export default {
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
lineCode: [
|
||||
{ required: true, message: "线路代码不能为空", trigger: "blur" },
|
||||
{ validator: this.validateCode, trigger: "blur" }
|
||||
],
|
||||
// lineCode: [
|
||||
// { required: true, message: "线路代码不能为空", trigger: "blur" },
|
||||
// { validator: this.validateCode, trigger: "blur" }
|
||||
// ],
|
||||
lineName: [
|
||||
{ required: true, message: "线路名称不能为空", trigger: "blur" }
|
||||
],
|
||||
@ -134,30 +144,28 @@ export default {
|
||||
{ pattern: /^-?\d+\.?\d*$/, message: '请输入正确泡重比', trigger: 'blur' }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "启用状态不能为空", trigger: "blur" }
|
||||
{ required: true, message: "启用状态不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
fromCountry: [
|
||||
{ required: true, message: "起始国不能为空", trigger: "blur" }
|
||||
{ required: true, message: "起始国不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
country: [
|
||||
{ required: true, message: "目的国家不能为空", trigger: "blur" }
|
||||
{ required: true, message: "目的国家不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
applyScope: [
|
||||
{ required: true, message: "适用范围不能为空", trigger: "blur" }
|
||||
{ required: true, message: "适用范围不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
logoType: [
|
||||
{ required: true, message: "品牌类型不能为空", trigger: "blur" }
|
||||
{ required: true, message: "品牌类型不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
transType: [
|
||||
{ required: true, message: "运输方式不能为空", trigger: "blur" }
|
||||
{ required: true, message: "运输方式不能为空", trigger:["blur",'change'] }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
id(newVal){
|
||||
console.log("====>"+newVal)
|
||||
console.log("====>"+this.id)
|
||||
this.initData();
|
||||
}
|
||||
},
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-select v-model="queryParams.status" no-match-text filterable placeholder="启用状态" @change="handleQuery">
|
||||
<el-option key="0" label="未启用" :value="0" />
|
||||
<el-option key="0" label="停用" :value="0" />
|
||||
<el-option key="1" label="启用" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -54,6 +54,7 @@
|
||||
:queryParams="queryParams"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
v-if="tableHeight" :max-height="tableHeight + 'px'"
|
||||
>
|
||||
|
||||
<div slot="toolbar">
|
||||
@ -105,11 +106,11 @@
|
||||
</div>
|
||||
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="线路编号" align="left" prop="lineCode" :sort-orders="['descending','ascending']" sortable="custom" width="110">
|
||||
<!-- <el-table-column label="线路编号" align="left" prop="lineCode" :sort-orders="['descending','ascending']" sortable="custom" width="110">
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.lineCode}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="线路名称" align="left" prop="lineName" :sort-orders="['descending','ascending']" sortable="custom" min-width="130">
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.lineName}}</div>
|
||||
@ -124,7 +125,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="品牌" align="center" prop="logoType" width="80" />
|
||||
<el-table-column label="泡重比" align="center" prop="meterRate" width="80" />
|
||||
<el-table-column label="启用状态" align="center" prop="status" width="80" >
|
||||
<!-- <el-table-column label="启用状态" align="center" prop="status" width="80" >
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
@ -133,7 +134,15 @@
|
||||
@change="handleStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="启用状态" align="center" prop="status" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status==1" type="success">启用</el-tag>
|
||||
<el-tag v-if="scope.row.status==0" type="danger">停用</el-tag>
|
||||
<!-- <dict-tag :options="dict.type.sys_biz_enable_status" :value="scope.row.status"/> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序" align="center" prop="orderNum" width="100" :sort-orders="['descending','ascending']" sortable="custom" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -179,6 +188,7 @@ export default {
|
||||
dicts: ['sys_normal_disable','emis_biz_shipping_method','emis_affiliate_type'],
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 200,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
@ -249,6 +259,12 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
this.$nextTick(function() {
|
||||
let queryFormEl = this.$refs.queryForm.$el;
|
||||
let tableH = queryFormEl.offsetHeight+190;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
},
|
||||
watch: {
|
||||
// 根据名称筛选部门树
|
||||
|
||||
@ -12,11 +12,11 @@
|
||||
<el-input v-model="form.prodNameEn" placeholder="请输入英文名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<!-- <el-col :span="12">
|
||||
<el-form-item label="类型代码" prop="prodCode">
|
||||
<el-input v-model="form.prodCode" placeholder="请输入产品代码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属国家" prop="country">
|
||||
<CountryPicker :placeholder="$t('所属国家')" v-model="form.country" ></CountryPicker>
|
||||
@ -68,6 +68,19 @@
|
||||
<el-input v-model="form.maxAging" placeholder="请输入最大时效" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio :label="1">启用</el-radio>
|
||||
<el-radio :label="0">停用</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="排序" prop="orderNum">
|
||||
<el-input v-model="form.orderNum" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
@ -111,10 +124,10 @@ export default {
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
prodCode: [
|
||||
{ required: true, message: "产品代码不能为空", trigger: "blur" },
|
||||
{ validator: this.validateCode, trigger: "blur" }
|
||||
],
|
||||
// prodCode: [
|
||||
// { required: true, message: "产品代码不能为空", trigger: "blur" },
|
||||
// { validator: this.validateCode, trigger: "blur" }
|
||||
// ],
|
||||
prodName: [
|
||||
{ required: true, message: "名称不能为空", trigger: "blur" },
|
||||
{ validator: this.validateName, trigger: "blur" }
|
||||
@ -123,17 +136,17 @@ export default {
|
||||
{ required: true, message: "英文名称不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "启用状态不能为空", trigger: "blur" }
|
||||
{ required: true, message: "启用状态不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
country: [
|
||||
{ required: true, message: "所属国家不能为空", trigger: "blur" }
|
||||
{ required: true, message: "所属国家不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
transLineCode: [
|
||||
{ required: true, message: "所属线路不能为空", trigger: "blur" }
|
||||
],
|
||||
transLine: [
|
||||
{ required: true, message: "所属线路名称不能为空", trigger: "blur" }
|
||||
{ required: true, message: "所属线路不能为空", trigger: ["blur",'change'] }
|
||||
],
|
||||
// transLine: [
|
||||
// { required: true, message: "所属线路名称不能为空", trigger: "blur" }
|
||||
// ],
|
||||
carryType: [
|
||||
{ required: true, message: "取重方式不能为空", trigger: "change" }
|
||||
],
|
||||
|
||||
@ -6,14 +6,14 @@
|
||||
</el-col> -->
|
||||
<el-col :span="24" :xs="24">
|
||||
<SearchForm :model="queryParams" ref="queryForm" size="small" :maxShow="10" label-width="68px" v-show="showSearch" @search="handleQuery" @reset="resetQuery">
|
||||
<el-form-item label="" prop="country">
|
||||
<el-form-item :label="$t('国家')" prop="country">
|
||||
<CountryPicker :placeholder="$t('国家')" v-model="queryParams.country" @onChange="handleQuery"></CountryPicker>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="transLineCode">
|
||||
<el-form-item :label="$t('所属线路')" prop="transLineCode">
|
||||
<TransLinePicker :placeholder="$t('所属线路')" v-model="queryParams.transLineCode" :countryCode="queryParams.country" @onChange="handleQuery"></TransLinePicker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="" prop="prodName">
|
||||
<el-form-item :label="$t('类型名称')" prop="prodName">
|
||||
<el-input
|
||||
v-model="queryParams.prodName"
|
||||
placeholder="类型名称"
|
||||
@ -21,15 +21,15 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="prodCode">
|
||||
<!-- <el-form-item label="" prop="prodCode">
|
||||
<el-input
|
||||
v-model="queryParams.prodCode"
|
||||
placeholder="类型编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="agingDesc">
|
||||
</el-form-item> -->
|
||||
<el-form-item label="时效描述" prop="agingDesc">
|
||||
<el-input
|
||||
v-model="queryParams.agingDesc"
|
||||
placeholder="时效描述"
|
||||
@ -37,7 +37,7 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="carryType">
|
||||
<el-form-item label="取重方式" prop="carryType">
|
||||
<el-select v-model="queryParams.carrType" placeholder="取重方式" clearable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="dict in dict.type.emis_take_weight_method"
|
||||
@ -47,7 +47,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" prop="transType">
|
||||
<el-form-item label="承运方式" prop="transType">
|
||||
<el-select v-model="queryParams.transType" placeholder="承运方式" clearable @change="handleQuery">
|
||||
<el-option
|
||||
v-for="dict in dict.type.emis_biz_shipping_method"
|
||||
@ -57,6 +57,12 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-select v-model="queryParams.status" no-match-text filterable placeholder="启用状态" @change="handleQuery">
|
||||
<el-option key="0" label="停用" :value="0" />
|
||||
<el-option key="1" label="启用" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
</SearchForm>
|
||||
|
||||
@ -72,6 +78,7 @@
|
||||
:queryParams="queryParams"
|
||||
@selection-change="handleSelectionChange"
|
||||
@sort-change="handleSortChange"
|
||||
v-if="tableHeight" :max-height="tableHeight + 'px'"
|
||||
>
|
||||
<div slot="toolbar">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
@ -159,12 +166,12 @@
|
||||
</el-table-column>
|
||||
-->
|
||||
|
||||
<el-table-column label="类型代码" align="center" prop="prodCode" min-width="100" >
|
||||
<!-- <el-table-column label="类型代码" align="center" prop="prodCode" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.prodCode}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型名称" align="center" prop="prodName" min-width="100" >
|
||||
</el-table-column> -->
|
||||
<el-table-column label="类型名称" align="left" prop="prodName" min-width="150" >
|
||||
<template slot-scope="scope">
|
||||
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.prodName}}</div>
|
||||
</template>
|
||||
@ -173,7 +180,7 @@
|
||||
<el-table-column label="时效标识" align="center" prop="agingDesc" min-width="100" />
|
||||
<el-table-column label="所属路线" align="center" prop="transLine" min-width="100" />
|
||||
<el-table-column label="所属国家" align="center" prop="countryName" min-width="100" />
|
||||
<el-table-column label="启用状态" align="center" prop="status" min-width="100" >
|
||||
<!-- <el-table-column label="启用状态" align="center" prop="status" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
@ -182,12 +189,20 @@
|
||||
@change="handleStatusChange(scope.row)"
|
||||
></el-switch>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="启用状态" align="center" prop="status" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status==1" type="success">启用</el-tag>
|
||||
<el-tag v-if="scope.row.status==0" type="danger">停用</el-tag>
|
||||
<!-- <dict-tag :options="dict.type.sys_biz_enable_status" :value="scope.row.status"/> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="取重方式" align="center" prop="carryType" min-width="100" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.emis_take_weight_method" :value="scope.row.carryType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序" align="center" prop="orderNum" width="100" :sort-orders="['descending','ascending']" sortable="custom" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" min-width="100" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
@ -240,6 +255,7 @@ export default {
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
tableHeight: 200,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
currentId:null,
|
||||
@ -348,10 +364,18 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
|
||||
this.$nextTick(function() {
|
||||
let queryFormEl = this.$refs.queryForm.$el;
|
||||
let tableH = queryFormEl.offsetHeight+190;
|
||||
this.tableHeight = window.innerHeight - tableH;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
handleSortChange(){
|
||||
|
||||
handleSortChange(column) {
|
||||
this.queryParams.orderByColumn = column.prop;//查询字段是表格中字段名字
|
||||
this.queryParams.isAsc = column.order;//动态取值排序顺序
|
||||
this.getList();
|
||||
},
|
||||
handleStatusChange(row) {
|
||||
let text = row.status === "0" ? "启用" : "停用";
|
||||
|
||||
@ -321,7 +321,7 @@
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="实际重量" prop="billWeight">
|
||||
<el-input v-model="form.billWeight" @blur="calcWeight()" style="text-align: right;min-width: 80px" placeholder="请输入实际重量" >
|
||||
<el-input v-model="form.billWeight" @blur="calcSettlementWeightByRemote()" style="text-align: right;min-width: 80px" placeholder="请输入实际重量" >
|
||||
<span slot="suffix">(kg)</span>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -340,7 +340,7 @@
|
||||
</el-input>
|
||||
</div>
|
||||
<div style="">
|
||||
<el-input v-model="form.totalVolume" @blur="calcWeight()" style="text-align: right;width: 120px" placeholder="体积" >
|
||||
<el-input v-model="form.totalVolume" @blur="calcSettlementWeightByRemote()" style="text-align: right;width: 120px" placeholder="体积" >
|
||||
<span slot="suffix">(m³)</span>
|
||||
</el-input>
|
||||
</div>
|
||||
@ -510,7 +510,7 @@
|
||||
|
||||
<script>
|
||||
import { realMatchWaybill } from "@/api/emis/emisElectronicPag";
|
||||
import { listEmisWaybill, getEmisWaybill, delEmisWaybill,getWaybillDetail,realSubmitOrder,calcWaybillFee,calcSetteldWeight} from "@/api/emis/emisWaybill";
|
||||
import { getWaybillDetail,realSubmitOrder,calcWaybillFee,calcSetteldWeight,calcVolumeWeight} from "@/api/emis/emisWaybill";
|
||||
import { parseTime } from "@/utils/custom";
|
||||
import { getDestSite } from "@/api/emis/emisDestination";
|
||||
|
||||
@ -766,16 +766,24 @@ data() {
|
||||
"form.totalVolume":{
|
||||
handler (newValue, oldValue) {
|
||||
if(newValue!= oldValue){
|
||||
this.calcWeight();
|
||||
this.calcVolumeWeightByTotalVolume();
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
"form.volumeWeight":{
|
||||
handler (newValue, oldValue) {
|
||||
if(newValue!= oldValue){
|
||||
this.calcSettlementWeightByRemote();
|
||||
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
"form.billWeight":{
|
||||
handler (newValue, oldValue) {
|
||||
if(newValue!= oldValue){
|
||||
this.calcWeight();
|
||||
this.calcSettlementWeightByRemote();
|
||||
|
||||
}
|
||||
},
|
||||
@ -1000,9 +1008,22 @@ methods: {
|
||||
if(this.form.length && this.form.width && this.form.height){
|
||||
let totalVolume=parseFloat(this.form.length)*parseFloat(this.form.width)*parseFloat(this.form.height);
|
||||
this.form.totalVolume = totalVolume/1000000;
|
||||
this.calcVolumeWeightByTotalVolume();
|
||||
}
|
||||
},
|
||||
calcWeight(){
|
||||
calcVolumeWeightByTotalVolume(){
|
||||
let postData={
|
||||
productType: this.form.productType,
|
||||
totalVolume: this.form.totalVolume,
|
||||
}
|
||||
|
||||
calcVolumeWeight(postData).then(response => {
|
||||
console.log(response);
|
||||
this.form.volumeWeight = response.data.volumeWeight;
|
||||
});
|
||||
|
||||
},
|
||||
calcSettlementWeightByRemote(){
|
||||
|
||||
if(this.form.billWeight
|
||||
&& this.form.totalVolume
|
||||
@ -1016,9 +1037,9 @@ methods: {
|
||||
// console.log(postData);
|
||||
calcSetteldWeight(postData).then(response => {
|
||||
console.log(response);
|
||||
this.form.volumeWeight = response.data.volumeWeight;
|
||||
// this.form.volumeWeight = response.data.volumeWeight;
|
||||
this.form.settlementWeight = response.data.settlementWeight;
|
||||
this.form.feeWeight = this.form.settlementWeight ;
|
||||
// this.form.feeWeight = this.form.settlementWeight ;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user