This commit is contained in:
linfso 2024-05-11 16:32:24 +08:00
parent 3b2ebeba1b
commit 861d9ff907
8 changed files with 128 additions and 37 deletions

View File

@ -70,6 +70,15 @@ export function calcSetteldWeight(data) {
})
}
// 体积重量计算
export function calcVolumeWeight(data) {
return request({
url: '/emis/emisWaybill/calcVolumeWeight',
method: 'post',
data: data
})
}
// 修改运单列表

View File

@ -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);

View File

@ -1,6 +1,6 @@
<template>
<el-select
style="width:100%"
filterable
clearable
v-model="svalue"

View File

@ -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" }
],

View File

@ -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: {
// 根据名称筛选部门树

View File

@ -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" }

View File

@ -21,14 +21,14 @@
@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> -->
<el-form-item label="" prop="agingDesc">
<el-input
v-model="queryParams.agingDesc"
@ -72,6 +72,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 +160,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="100" >
<template slot-scope="scope">
<div class="link-type" @click="handleUpdate(scope.row)">{{scope.row.prodName}}</div>
</template>
@ -173,7 +174,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 +183,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 +249,7 @@ export default {
],
data() {
return {
tableHeight: 200,
// 遮罩层
loading: true,
currentId:null,
@ -348,10 +358,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" ? "启用" : "停用";

View File

@ -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 ;
});
}