Commit 4840b7f6 authored by 我在何方's avatar 我在何方

Merge branch 'release2.2' of...

Merge branch 'release2.2' of http://gitlab.jdshangmen.com/jiedao-app/jiedao-app-operator into release2.2
parents a284728f 44f41b72
......@@ -6,6 +6,7 @@ import errorCode from '@/utils/errorCode'
import Cookies from "js-cookie";
import {getTenantEnable} from "@/utils/ruoyi";
import { getLocale } from '@/utils/db';
import i18n from "@/i18n";
// 是否显示重新登录
export let isRelogin = { show: false };
......@@ -114,9 +115,15 @@ service.interceptors.response.use(res => {
// 额外情况
return Promise.reject(res.data)
} else if (code !== 200) {
Notification.error({
title: msg
})
// 如果内容很长则用alert提示,不然可能显示不全,自动隐藏也会导致看不完整就消失了
if(msg.length > 300){
MessageBox.alert(msg, i18n.t('错误提示'), i18n.t('确定'))
}else{
Notification.error({
title: msg
})
}
return Promise.reject(msg || 'error')
} else {
return res.data
......
......@@ -22,8 +22,8 @@
/>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的国')">
<el-select v-model="queryParams.destCountryId" :placeholder="$t('请选择')" clearable filterable >
<el-form-item :label="$t('目的国')" :rules="{required: true}">
<el-select v-model="queryParams.destCountryId" :placeholder="$t('请选择')" filterable default-first-option>
<el-option
v-for="item in countryList"
:key="item.id"
......@@ -33,7 +33,7 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择')" clearable>
<el-select v-model="queryParams.destWarehouseId" :placeholder="queryParams.destCountryId ? $t('请选择') : $t('请先选择目的国')" clearable>
<el-option
v-for="item in importWarehouseList"
:key="item.id"
......@@ -169,7 +169,11 @@ export default {
return this.warehouseList.filter(item => +item.tradeType === 2 || +item.tradeType === 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => +item.tradeType === 1 || +item.tradeType === 3)
// 目的仓根据选择的目的国过滤
if(!this.queryParams.destCountryId) return []
return this.warehouseList.filter(item => {
return this.queryParams.destCountryId === item.guojia && ( +item.tradeType === 1 || +item.tradeType === 3)
})
},
},
methods: {
......
......@@ -2,6 +2,9 @@
<div class="app-container">
<!-- 搜索 -->
<el-card>
<div slot="header">
<div class="card-title">{{$route.query.containerNumber}} - {{ $t('订单费用报表') }}</div>
</div>
<el-form
:model="queryParams"
ref="queryForm"
......@@ -92,8 +95,11 @@
</el-table-column>
<el-table-column :label="$t('是否重泡货')">
<template slot-scope="{row}">
<!--1 普货 2 重货 3 泡货-->
<dict-tag :type="DICT_TYPE.ECW_YESNO" :value="row.itemType != 1 ? '1' : '0'"></dict-tag>
<el-tooltip v-if="row.orderType != 1" effect="dark" content="111" placement="top-start">
<!--1 普货 2 重货 3 泡货-->
<span>{{$t('')}}</span>
</el-tooltip>
<span v-else>{{$t('')}}</span>
</template>
</el-table-column>
<el-table-column :label="$t('收费数据')">
......
......@@ -33,7 +33,7 @@
</el-tab-pane>
</el-tabs>
<el-form-item label="">
<el-button type="primary" @click="submit">{{$t('提交')}}</el-button>
<el-button type="primary" @click="submit" :loading="loading">{{$t('提交')}}</el-button>
</el-form-item>
</el-form>
</el-dialog>
......@@ -47,6 +47,8 @@ export default {
},
data(){
return {
// 提交中状态
loading: false,
current: 'createBatch',
show: false,
form:{
......@@ -94,10 +96,12 @@ export default {
})
}
}
this.loading = true;
({createBatch, createSplitBatch}[this.current])(data).then(res => {
this.$message.success(this.$t("操作成功"));
this.$emit('success')
}).finally(() => {
this.loading = false
})
})
},
......
......@@ -732,14 +732,20 @@ export default {
}else{
// 全包价 的阶段 设置和运费(全包价)不能为空
let stepPriceEmpty = false
this.form.priceStepList.forEach(item => {
this.form.priceStepList.forEach((item, index) => {
let notEmptyFields = ['startNum', 'endNum', 'weightUnit']
notEmptyFields.forEach(field => {
// 第一个阶梯的起始值不判断0
if(index === 0 && field == 'startNum' && item[field] == 0) return
if(!item[field] || item[field].toString().trim() == ''){
console.warn('notEmptyFields', field, item[field])
stepPriceEmpty = true
}
})
if((this.form.priceType == 0 && !item.transportPrice) || (this.form.priceType == 1 && !item.allPrice)){
console.warn('运费或者全包价未设置', index, item.transportPrice, item.allPrice)
stepPriceEmpty = true
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment