Commit 4502d104 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 287dce52 260d00ae
......@@ -50,16 +50,16 @@
<el-form-item :label="$t('始发地')">
<p>{{importCityName(queryParams.startWarehouseId)}}</p>
</el-form-item>
<el-form-item :label="$t('国家')" prop="destination">
<el-select v-model="queryParams.destCountryId" :placeholder="$t('请选择国家')" @change="clearDestWarehouseIdList">
<el-option v-for="item in countryList" :key="item.id" :label="$l(item, 'title')" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('目的地')" prop="destination">
<el-select v-model="queryParams.destWarehouseIdList" :placeholder="$t('请选择目的地')" multiple>
<el-option v-for="item in importWarehouseList" :label="item.titleZh" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('国家')" prop="destination">
<el-select v-model="queryParams.destCountryId" :placeholder="$t('请选择国家')">
<el-option v-for="item in countryList" :key="item.id" :label="$l(item, 'name')" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('订单号')" prop="orderNo">
<el-input v-model="queryParams.orderNo" :placeholder="$t('请输入订单号')" clearable />
</el-form-item>
......@@ -159,6 +159,7 @@ import {
createGoods,
remove,
} from "@/api/ecw/boxSea";
import { getWarehouseList } from "@/api/ecw/warehouse"
import {
formatDate,
getTotlContent,
......@@ -166,7 +167,7 @@ import {
getCapacity,
sumStatistics,
} from "../../utils";
import {getCountryListAll} from "@/api/ecw/country";
import { getListTree } from "@/api/ecw/region";
/**
* 补单
*/
......@@ -177,6 +178,8 @@ export default {
return {
//国家列表
countryList:[],
//仓库列表
warehouseList: [],
// 二维码/条码编号
cabinetNo: "",
// 表格数据
......@@ -201,11 +204,21 @@ export default {
},
created() {
this.queryAllData();
getCountryListAll().then(r => {
this.countryList = r.data
})
this.getCountry()
},
methods: {
//获取国家
async getCountry() {
let countryList = await getListTree({treeType: 1})
this.countryList = countryList.data
let warehouseList = await getWarehouseList()
this.warehouseList = warehouseList.data
let warehouse = this.warehouseList.find(item=>item.id == this.$attrs.shipmentObj.destWarehouseId)
console.log(warehouse,'warehouse')
if(warehouse){
this.$set(this.queryParams,'destCountryId', warehouse.guojia)
}
},
/* 查询已预装 */
getSecGoods() {
loadSecGoodsList({ shipmentId: this.$attrs.shipmentObj.id }).then(
......@@ -443,12 +456,16 @@ export default {
formatDate,
getTotlContent,
sumStatistics,
//切换国家时清除目的仓
clearDestWarehouseIdList() {
this.queryParams.destWarehouseIdList = []
}
},
computed: {
/** 目的地 */
importWarehouseList() {
return this.$attrs.warehouseList.filter(
(item) => item.tradeType == "1" || item.type == "3"
(item) => (item.tradeType == "1" || item.type == "3") && item.guojia == this.queryParams.destCountryId
);
},
/* 容量 */
......
......@@ -178,7 +178,7 @@ export default {
list.push({
...oItem,
warehouseInInfo,
multiSpecification: item.multiSpecification,
multiSpecification: oItem.multiSpecification,
positionNo: oItem.positionNo,
tallyStatus: item.tallyStatus,
tallyTime: item.tallyTime,
......
......@@ -3,29 +3,28 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="币种1" prop="sourceCurrencyId">
<el-select v-model="queryParams.sourceCurrencyId" placeholder="请选择币种" clearable size="small">
<el-form-item :label="$t('币种1')" prop="sourceCurrencyId">
<el-select v-model="queryParams.sourceCurrencyId" :placeholder="$t('请选择币种')" clearable size="small">
<el-option v-for="dict in currencyList"
:key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select>
</el-form-item>
<el-form-item label="币种2" prop="targetCurrencyId">
<el-select v-model="queryParams.targetCurrencyId" placeholder="请选择币种" clearable size="small">
<el-form-item :label="$t('币种2')" prop="targetCurrencyId">
<el-select v-model="queryParams.targetCurrencyId" :placeholder="$t('请选择币种')" clearable size="small">
<el-option v-for="dict in currencyList"
:key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
</el-form-item>
</el-form>
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
<!-- v-hasPermi="['ecw:exchange-rate:create']"-->
<el-button type="primary" v-hasPermi="['ecw:exchange-rate:create']" plain icon="el-icon-plus" size="mini" @click="handleAdd">{{$t('新增')}}</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"-->
......@@ -36,50 +35,49 @@
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="序号" align="center" >
<el-table-column :label="$t('序号')" align="center" >
<template v-slot="{row, $index}">
{{(queryParams.pageNo - 1) * queryParams.pageSize + ($index + 1)}}
</template>
</el-table-column>
<el-table-column label="币种1" align="center" prop="sourceCurrencyId">
<el-table-column :label="$t('币种1')" align="center" prop="sourceCurrencyId">
<template slot-scope="scope">
{{getCurrency(scope.row.sourceCurrencyId)}}
</template>
</el-table-column>
<el-table-column label="币种2">
<el-table-column :label="$t('币种2')">
<template v-slot="{row}">
{{getCurrency(row.targetCurrencyId)}}
</template>
</el-table-column>
<el-table-column label="币种1 金额">
<el-table-column :label="$t('币种1 金额')">
<template v-slot="{row}">
1 {{getCurrency(row.sourceCurrencyId, true)}}
</template>
</el-table-column>
<el-table-column label="币种1金额兑换币种2汇率" prop="currencyRate"></el-table-column>
<el-table-column label="币种2金额">
<el-table-column :label="$t('币种1金额兑换币种2汇率')" prop="currencyRate"></el-table-column>
<el-table-column :label="$t('币种2金额')">
<template v-slot="{row}">
{{1 * row.currencyRate}}{{getCurrency(row.targetCurrencyId, true)}}
</template>
</el-table-column>
<el-table-column label="最后修改时间">
<el-table-column :label="$t('最后修改时间')">
<template v-slot="{row}">
{{parseTime(row.updateTime)}}
</template>
</el-table-column>
<el-table-column label="最后修改人">
<el-table-column :label="$t('最后修改人')">
<template v-slot="{row}">
{{getOperator(row.updater)}}
</template>
</el-table-column>
<el-table-column label="备注" prop="note"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column :label="$t('备注')" prop="note"></el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- v-hasPermi="['ecw:exchange-rate:update']"-->
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
<el-button size="mini" type="text" @click="handleLog(scope.row)">日志</el-button>
<!-- v-hasPermi="['ecw:exchange-rate:delete']"-->
<el-button v-hasPermi="['ecw:exchange-rate:update']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">{{$t('修改')}}</el-button>
<el-button v-hasPermi="['ecw:exchange-rate:delete']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">{{$t('删除')}}</el-button>
<el-button v-hasPermi="['ecw:exchange-rate:log']" size="mini" type="text" @click="handleLog(scope.row)">{{$t('日志')}}</el-button>
</template>
</el-table-column>
</el-table>
......@@ -90,55 +88,55 @@
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="币种1" prop="sourceCurrencyId">
<el-select v-model="form.sourceCurrencyId" placeholder="请选择币种">
<el-form-item :label="$t('币种1')" prop="sourceCurrencyId">
<el-select v-model="form.sourceCurrencyId" :placeholder="$t('请选择币种')">
<el-option @click.native="() => form.sourceCurrencyCode = dict.fuhao" v-for="dict in currencyList"
:key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select>
</el-form-item>
<el-form-item label="币种2" prop="targetCurrencyId">
<el-select v-model="form.targetCurrencyId" placeholder="请选择币种">
<el-select v-model="form.targetCurrencyId" :placeholder="$t('请选择币种')">
<el-option @click.native="() => form.targetCurrencyCode = dict.fuhao" v-for="dict in currencyList"
:key="dict.id" :label="$l(dict,'title') + dict.fuhao" :value="dict.id" />
</el-select>
</el-form-item>
<el-form-item label="汇率" prop="currencyRate">
<el-input-number class="el-input-number" :controls="false" v-model="form.currencyRate" placeholder="请输入汇率" />
<el-form-item :label="$t('汇率')" prop="currencyRate">
<el-input-number class="el-input-number" :controls="false" v-model="form.currencyRate" :placeholder="$t('请输入汇率')" />
<p v-if="form.sourceCurrencyId && form.currencyRate && form.targetCurrencyCode" style="margin: 0;">
例子:1{{getCurrency(form.sourceCurrencyId, true)}} = {{ 1 * form.currencyRate}} {{getCurrency(form.targetCurrencyId, true)}}
{{$t('例子:')}}1{{getCurrency(form.sourceCurrencyId, true)}} = {{ 1 * form.currencyRate}} {{getCurrency(form.targetCurrencyId, true)}}
</p>
<p v-else style="margin: 0;">
例子:1RMB = 0.138611USD
{{$t('例子:1RMB = 0.138611USD')}}
</p>
</el-form-item>
<el-form-item label="备注">
<el-form-item :label="$t('备注')">
<el-input type="textarea" v-model="form.note"></el-input>
</el-form-item>
<template v-if="form.id">
<el-form-item label="创建人">{{getOperator(form.updater)}}</el-form-item>
<el-form-item label="创建时间">{{parseTime(form.createTime)}}</el-form-item>
<el-form-item label="最后更新人">{{parseTime(form.updateTime)}}</el-form-item>
<el-form-item label="最后更新人">{{getOperator(form.updater)}}</el-form-item>
<el-form-item :label="$t('创建人')">{{getOperator(form.updater)}}</el-form-item>
<el-form-item :label="$t('创建时间')">{{parseTime(form.createTime)}}</el-form-item>
<el-form-item :label="$t('最后更新人')">{{parseTime(form.updateTime)}}</el-form-item>
<el-form-item :label="$t('最后更新人')">{{getOperator(form.updater)}}</el-form-item>
</template>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
<el-button type="primary" @click="submitForm">{{$t('确 定')}}</el-button>
<el-button @click="cancel">{{$t('取 消')}}</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="openLog" >
<el-table :data="listLog">
<el-table-column label="修改人" prop="changeName"></el-table-column>
<el-table-column label="修改时间">
<el-table-column :label="$t('修改人')" prop="changeName"></el-table-column>
<el-table-column :label="$t('修改时间')">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
</template>
</el-table-column>
<el-table-column label="修改前内容">
<el-table-column :label="$t('修改前内容')">
<template v-slot="{row}">
币种1:【{{ getCurrency(row.beforeChangeSourceValue, true, 'fuhao')}}<br/>
币种2:【{{getCurrency(row.beforeChangeTargetValue, true, 'fuhao')}}<br/>
汇率:{{row.beforeChangeValue}}<br/>
{{$t('币种1:')}}{{ getCurrencyLog(row.beforeChangeSourceValue, 'fuhao')}}<br/>
{{$t('币种2:')}}{{getCurrencyLog(row.beforeChangeTargetValue, 'fuhao')}}<br/>
{{$t('汇率:')}}{{row.beforeChangeValue}}<br/>
</template>
</el-table-column>
</el-table>
......@@ -197,11 +195,11 @@ export default {
form: {},
// 表单校验
rules: {
sourceCurrencyId: [{ required: true, message: "币种1不能为空", trigger: "change" }],
sourceCurrencyCode: [{ required: true, message: "原币种代码不能为空", trigger: "blur" }],
targetCurrencyId: [{ required: true, message: "币种2不能为空", trigger: "change" }],
targetCurrencyCode: [{ required: true, message: "目标种代码不能为空", trigger: "blur" }],
currencyRate: [{ required: true, message: "汇率不能为空", trigger: "blur" }],
sourceCurrencyId: [{ required: true, message: this.$t('币种1不能为空'), trigger: "change" }],
sourceCurrencyCode: [{ required: true, message: this.$t('原币种代码不能为空'), trigger: "blur" }],
targetCurrencyId: [{ required: true, message: this.$t('币种2不能为空'), trigger: "change" }],
targetCurrencyCode: [{ required: true, message: this.$t('目标种代码不能为空'), trigger: "blur" }],
currencyRate: [{ required: true, message: this.$t('汇率不能为空'), trigger: "blur" }],
}
};
},
......@@ -241,6 +239,14 @@ export default {
}
return ''
},
getCurrencyLog(val, value = 'fuhao'){
if (val){
let r = this.currencyList.find(i => i[value] === val)
return this.$l(r,'title')
}
return ''
},
/** 查询列表 */
getList() {
this.loading = true;
......@@ -316,7 +322,7 @@ export default {
targetCurrencyId: this.form.targetCurrencyId
}
updateExchangeRate(p).then(response => {
this.$modal.msgSuccess("修改成功");
this.$modal.msgSuccess(this.$t('修改成功'));
this.open = false;
this.getList();
});
......@@ -324,7 +330,7 @@ export default {
}
// 添加的提交
createExchangeRate(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$modal.msgSuccess(this.$t('新增成功'));
this.open = false;
this.getList();
});
......@@ -333,11 +339,11 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id;
this.$modal.confirm('是否确认删除汇率管理编号为"' + id + '"的数据项?').then(function() {
this.$modal.confirm(this.$t('是否确认删除汇率管理编号为"') + id + this.$t('"的数据项?')).then(function() {
return deleteExchangeRate(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
this.$modal.msgSuccess(this.$t('删除成功'));
}).catch(() => {});
},
/** 导出按钮操作 */
......@@ -348,11 +354,11 @@ export default {
params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出
this.$modal.confirm('是否确认导出所有汇率管理数据项?').then(() => {
this.$modal.confirm(this.$t('是否确认导出所有汇率管理数据项?')).then(() => {
this.exportLoading = true;
return exportExchangeRateExcel(params);
}).then(response => {
this.$download.excel(response, '${table.classComment}.xls');
// this.$download.excel(response, '${table.classComment}.xls');
this.exportLoading = false;
}).catch(() => {});
}
......
<template>
<div style="display: inline-block">
<div @click="visible = true">
<slot></slot>
</div>
<el-dialog
append-to-body
title="提示"
:visible.sync="visible"
width="80%">
<div style="display: flex;flex-wrap: wrap;">
<el-image style="width: 200px;height: 200px;margin-right: 10px;margin-bottom: 10px" v-for="(item) in list" :src="item.url"></el-image>
</div>
</el-dialog>
</div>
</template>
<script>
import {warehousePictureList} from "@/api/ecw/order";
export default {
props:{
bizId:[String, Number],
type:[Number],
},
name: "imageDisplay",
data(){
return {
visible:false,
list:[],
}
},
created() {
},
methods:{
getList(){
warehousePictureList({bizId:this.bizId,type:this.type}).then(r =>{
this.list = r.data
;
})
}
},
watch:{
visible(val){
if(val){
this.getList()
}
}
}
}
</script>
<style scoped>
</style>
......@@ -245,6 +245,9 @@
<el-tab-pane :label="$t('运单资料/提货单')" name="three">
<!--inWarehouseState 1待入库,2多了,3少了,4到齐-->
<el-button v-hasPermi="['ecw:order:show_receipt']" type="text" @click="showWarehouseReceipt=true" :disabled="order.inWarehouseState == 0 && order.shipmentState == 0">{{$t('查看入仓单')}}</el-button>
<image-display :type="6" :biz-id="order.orderId">
<el-button style="margin: 0 15px" type="text">{{$t('入仓影像')}}</el-button>
</image-display>
<el-button v-hasPermi="['ecw:order:show_landing']" type="text" @click.native="showLadingBill=true" :disabled="!order.ladingState">{{$t('查看提货单')}}</el-button>
<el-button v-hasPermi="['ecw:order:show_packing']" :disabled="!order.packingListUrl" type="text" @click="downloadPackingList">{{$t('装箱单')}}</el-button>
<el-button v-hasPermi="['ecw:order:show_customs']" type="text" @click="showDeclaration=true">{{$t('查看报关资料')}}</el-button>
......@@ -440,9 +443,11 @@ import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {checkPermi} from '@/utils/permission'
import OperateLogDetail from "@/views/ecw/order/components/OprateLogDetail";
import DeclarationDocuments from './components/DeclarationDocuments';
import ImageDisplay from "@/views/ecw/order/components/imageDisplay.vue";
export default {
name: "detail",
components: {
ImageDisplay,
OperateLogDetail,
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect,DeclarationDocuments
},
......
......@@ -301,7 +301,8 @@
{{sum.totalWorth.toFixed() || 0}}元
</el-descriptions-item>
<el-descriptions-item :label="$t('保价费')">
{{fee.insuranceFee || 0}} {{$t('美元')}}
{{fee.insuranceFee || 0}}
{{ selectedRouter ? currentcyMap[selectedRouter.currencyUnit || 1] : '' }}
</el-descriptions-item>
</el-descriptions>
</el-card>
......@@ -313,7 +314,14 @@
<el-input v-model="form.marks" ></el-input>
</el-form-item>
<el-form-item :label="$t('是否控货')" prop="isCargoControl" class="ml-20">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCargoControl" form-type="radio"/>
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING"
v-model="form.isCargoControl"
formatter="bool"
form-type="radio"
:filter="(item) => {
return selectedRouter && selectedRouter.controlStatus === 1 && item.value === 'true' ? false : true
}"
/>
</el-form-item>
</div>
<div class="form-section" v-if="collectionProxy">
......@@ -833,6 +841,17 @@ export default {
this.$set(this.form, 'objectiveId', router.destCityId)
this.calculationPrice()
this.$nextTick(() => {
// 如果开启了默认送货上门,则默认选择送货上门,2是送货上门,10是默认送货上门
this.$set(this.form, 'harvestMethod', this.routeOtherServices.indexOf('2') > -1 && this.routeOtherServices.indexOf('10') > -1 ? '2' : '1')
// controlStatus 0 支持控货,1不支持控货
// 如果不支持控货,则控货不能选择是
if (router.controlStatus === 1) {
this.$set(this.form, 'isCargoControl', false)
}
})
},
/* 'form.packageTypeArr'(val){
console.log('packageType', val, val.length)
......@@ -1129,7 +1148,7 @@ export default {
/** 提交按钮 */
// type 在新建的时候表示状态,0草稿,2带入仓
submitForm(submitType) {
this.$refs["form"].validate((valid, errors) => {
this.$refs["form"].validate(async (valid, errors) => {
if (!valid) {
return this.$showFormValidateErrors(errors)
}
......@@ -1165,6 +1184,13 @@ export default {
}
})
this.form.packageType = this.form.packageTypeArr.join(',')
// 付款人=发货人提示
if (+this.form.drawee === 1) {
await this.$confirm(this.$t('请再次确认运费由您支付还是收货人支付?'))
}
// 修改的提交
if (this.form.orderNo != null) {
let data = Object.assign({}, this.form, {
......
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