Commit 06ec585a 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 6a452859 0a973667
......@@ -42,7 +42,14 @@ export function getExchangeRatePage(query) {
params: query
})
}
// 汇率日志查询
export function getExchangeRateLogList(params){
return request({
url:'/ecw/exchange-rate-log/list',
method:'get',
params,
})
}
// 导出汇率管理 Excel
export function exportExchangeRateExcel(query) {
return request({
......
......@@ -5,10 +5,11 @@
<el-image @click="dialogImageUrl = item.url; dialogVisible = true; " style="height: 148px; width:148px;" fit="fit" :src="item.url">
<video controls width="148px" height="148px" slot="error" :src="item.url" ></video>
</el-image>
<div @click="handleRemove(index)" class="el-icon-error" style="font-size: 25px;cursor: pointer;position: absolute;right: -10px; top: -10px" ></div>
<div v-if="!readonly" @click="handleRemove(index)" class="el-icon-error" style="font-size: 25px;cursor: pointer;position: absolute;right: -10px; top: -10px" ></div>
</div>
<div>
<el-upload
v-if="!readonly"
multiple
:action="uploadImgUrl"
list-type="picture-card"
......@@ -23,7 +24,7 @@
<i class="el-icon-plus"></i>
</el-upload>
<!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip">
<div class="el-upload__tip" slot="tip" v-if="showTip && !readonly">
{{ $t('请上传') }}
<template v-if="fileSize">{{ $t('大小不超过') }}<b style="color: #f56c6c">{{ fileSize }}MB</b> </template> <br>
<template v-if="fileType">{{ $t('格式为') }}<b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>{{ $t('的文件') }}</div>
......@@ -63,6 +64,10 @@ export default {
isShowTip: {
type: Boolean,
default: true
},
readonly: {
type: Boolean,
default: false
}
},
data() {
......
......@@ -288,7 +288,10 @@ export default {
},
// 用于储位回显选中
isSelected(warehouse, area, position = 0){
return !!this.value.find(e => warehouse === e.wareId && area === e.areaId && (position === e.locationId || undefined === e.locationId))
return !!this.value.find(e => {
// 最后一个条件不能用!e.locationId来判断,会导致选择了没有locationId的全部被选中,上次改这里忘记什么原因了,下次复现再来调整
return warehouse === e.wareId && area === e.areaId && (position === e.locationId || e.locationId == undefined)
})
},
}
}
......
......@@ -10,7 +10,7 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('装柜时间')" prop="ldBoxTime">
{{cabinetObj.ldBoxTime?new Date(scope.row.createTime).format('yyyy-MM-dd hh:mm:ss'):new Date().format('yyyy-MM-dd hh:mm:ss')}}
{{cabinetObj.ldBoxTime?new Date(cabinetObj.ldBoxTime).format('yyyy-MM-dd hh:mm:ss'):new Date().format('yyyy-MM-dd hh:mm:ss')}}
<!-- <el-date-picker type="datetime" :placeholder="$t('请选择日期')" v-model="cabinetObj.ldBoxTime" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> -->
</el-form-item>
<el-form-item :label="$t('出仓时间')">
......
......@@ -899,6 +899,7 @@ export default {
deleteRow(index){
const spliceIndex = typeof index !== 'number' ? this.shopForm.specsRecordVOList.length - 1 : index
this.shopForm.specsRecordVOList.splice(spliceIndex, 1)
this.calcDefaultData()
},
// 计算体积
calcVolume(row){
......@@ -947,18 +948,23 @@ export default {
})
this.currentPutIn = null
// 根据比例计算默认的收费方数和收费重量
const orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
const rate = this.putin.num / orderItem.warehouseInInfoVO.cartonsNum
this.$set(this.shopForm, 'chargeVolume', (orderItem.chargeVolume*rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (orderItem.chargeWeight*rate).toFixed(2))
this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2))
this.calcDefaultData()
},
// 清空放入记录
clearAll(){
this.$confirm(this.$t("确定要清空放入数据么?")).then(res => {
this.shopForm.specsRecordVOList = []
this.calcDefaultData()
})
},
// 计算默认的收费数据
calcDefaultData() {
// 根据比例计算默认的收费方数和收费重量
const orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
const rate = this.putin.num / orderItem.warehouseInInfoVO.cartonsNum
this.$set(this.shopForm, 'chargeVolume', (orderItem.chargeVolume*rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (orderItem.chargeWeight*rate).toFixed(2))
this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2))
}
},
};
......
......@@ -47,7 +47,7 @@
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
100外币兑人民币(CNY)汇率表
<!-- 100外币兑人民币(CNY)汇率表-->
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="" align="center" prop="id" />
......@@ -59,8 +59,8 @@
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)" />
</template>
</el-table-column>
<el-table-column label="100外币兑人民币汇率" align="center" prop="huilv" />
<el-table-column label="100人民币兑外币汇率" align="center" prop="exchangeToFc" />
<!-- <el-table-column label="100外币兑人民币汇率" align="center" prop="huilv" />-->
<!-- <el-table-column label="100人民币兑外币汇率" align="center" prop="exchangeToFc" />-->
<el-table-column :label="$t('排序')" align="center" prop="aorder" />
<!-- <el-table-column label="" align="center" prop="createAt" width="180">-->
<!-- <template slot-scope="scope">-->
......@@ -100,12 +100,12 @@
<!-- <el-form-item :label="$t('状态')" prop="show">-->
<!-- <el-input v-model="form.show" :placeholder="$t('请输入状态')" />-->
<!-- </el-form-item>-->
<el-form-item label="100外币兑人民币汇率" prop="huilv">
<el-input v-model="form.huilv" placeholder="请输入100外币兑人民币汇率" />
</el-form-item>
<el-form-item label="100人民币兑外币汇率" prop="exchangeToFc">
<el-input v-model="form.exchangeToFc" placeholder="请输入100人民币兑外币汇率" />
</el-form-item>
<!-- <el-form-item label="100外币兑人民币汇率" prop="huilv">-->
<!-- <el-input v-model="form.huilv" placeholder="请输入100外币兑人民币汇率" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="100人民币兑外币汇率" prop="exchangeToFc">-->
<!-- <el-input v-model="form.exchangeToFc" placeholder="请输入100人民币兑外币汇率" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="100人民币兑外币汇率" prop="huilv">
{{ form.huilv ? (10000 / form.huilv).toFixed(6) : ''}}
</el-form-item> -->
......
......@@ -3,22 +3,18 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="原币种" prop="sourceCurrencyId">
<el-select v-model="queryParams.sourceCurrencyId" placeholder="请选择币种" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.SYSTEM_USER_SEX)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
<el-form-item label="币种1" prop="sourceCurrencyId">
<el-select v-model="queryParams.sourceCurrencyId" placeholder="请选择币种" 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="目标币种" prop="targetCurrencyId">
<el-select v-model="queryParams.targetCurrencyId" placeholder="请选择目标币种" clearable size="small">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.SYSTEM_USER_SEX)"
:key="dict.value" :label="dict.label" :value="dict.value"/>
<el-form-item label="币种2" prop="targetCurrencyId">
<el-select v-model="queryParams.targetCurrencyId" placeholder="请选择币种" 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="创建时间">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd"
type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" />
</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>
......@@ -28,43 +24,62 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['ecw:exchange-rate:create']">新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
v-hasPermi="['ecw:exchange-rate:export']">导出</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
<!-- v-hasPermi="['ecw:exchange-rate:create']"-->
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"-->
<!-- v-hasPermi="['ecw:exchange-rate:export']">导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="" align="center" prop="id" />
<el-table-column label="原币种" align="center" prop="sourceCurrencyId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="scope.row.sourceCurrencyId" />
</template>
</el-table-column>
<el-table-column label="原币种代码" align="center" prop="sourceCurrencyCode" />
<el-table-column label="目标币种" align="center" prop="targetCurrencyId">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="scope.row.targetCurrencyId" />
<el-table-column label="序号" align="center" >
<template v-slot="{row, $index}">
{{(queryParams.pageNo - 1) * queryParams.pageSize + ($index + 1)}}
</template>
</el-table-column>
<el-table-column label="目标种代码" align="center" prop="targetCurrencyCode" />
<el-table-column label="汇率" align="center" prop="currencyRate" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<el-table-column label="币种1" align="center" prop="sourceCurrencyId">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
{{getCurrency(scope.row.sourceCurrencyId)}}
</template>
</el-table-column>
<el-table-column label="币种2">
<template v-slot="{row}">
{{getCurrency(row.targetCurrencyId)}}
</template>
</el-table-column>
<el-table-column label="币种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金额">
<template v-slot="{row}">
{{1 * row.currencyRate}}{{getCurrency(row.targetCurrencyId, true)}}
</template>
</el-table-column>
<el-table-column label="最后修改时间">
<template v-slot="{row}">
{{parseTime(row.updateTime)}}
</template>
</el-table-column>
<el-table-column label="最后修改人">
<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">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
v-hasPermi="['ecw:exchange-rate:update']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
v-hasPermi="['ecw:exchange-rate:delete']">删除</el-button>
<!-- 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']"-->
</template>
</el-table-column>
</el-table>
......@@ -74,48 +89,90 @@
<!-- 对话框(添加 / 修改) -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="原币种" prop="sourceCurrencyId">
<el-select v-model="form.sourceCurrencyId" placeholder="请选择原币种">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.SYSTEM_USER_SEX)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
<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-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="原币种代码" prop="sourceCurrencyCode">
<el-input v-model="form.sourceCurrencyCode" placeholder="请输入原币种代码" />
</el-form-item>
<el-form-item label="目标币种" prop="targetCurrencyId">
<el-select v-model="form.targetCurrencyId" placeholder="请选择目标币种">
<el-option v-for="dict in this.getDictDatas(DICT_TYPE.SYSTEM_USER_SEX)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
<el-form-item label="币种2" prop="targetCurrencyId">
<el-select v-model="form.targetCurrencyId" placeholder="请选择币种">
<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="targetCurrencyCode">
<el-input v-model="form.targetCurrencyCode" placeholder="请输入目标种代码" />
</el-form-item>
<el-form-item label="汇率" prop="currencyRate">
<el-input v-model="form.currencyRate" placeholder="请输入汇率" />
<el-input-number class="el-input-number" :controls="false" v-model="form.currencyRate" placeholder="请输入汇率" />
<p v-if="form.sourceCurrencyId && form.currencyRate && form.targetCurrencyCode" style="margin: 0;">
例子:1{{getCurrency(form.sourceCurrencyId, true)}} = {{ 1 * form.currencyRate}} {{getCurrency(form.targetCurrencyId, true)}}
</p>
<p v-else style="margin: 0;">
例子:1RMB = 0.138611USD
</p>
</el-form-item>
<el-form-item label="备注">
<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>
</template>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</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="修改时间">
<template v-slot="{row}">
{{parseTime(row.createTime)}}
</template>
</el-table-column>
<el-table-column label="修改前内容">
<template v-slot="{row}">
币种1:【{{ getCurrency(row.beforeChangeSourceValue, true, 'fuhao')}}<br/>
币种2:【{{getCurrency(row.beforeChangeTargetValue, true, 'fuhao')}}<br/>
汇率:【{{row.beforeChangeValue}}<br/>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import { createExchangeRate, updateExchangeRate, deleteExchangeRate, getExchangeRate, getExchangeRatePage, exportExchangeRateExcel } from "@/api/ecw/exchangeRate";
import {
createExchangeRate,
updateExchangeRate,
deleteExchangeRate,
getExchangeRate,
getExchangeRatePage,
exportExchangeRateExcel,
getExchangeRateLogList
} from "@/api/ecw/exchangeRate";
import {getCurrencyPage} from "@/api/ecw/currency";
import {listAllSimpl} from "@/api/system/user";
import Template from "@/views/cms/template/index.vue";
export default {
name: "ExchangeRate",
components: {
Template
},
data() {
return {
currencyList:[],
allSimplList:[],
listLog:[],
openLog:false,
// 遮罩层
loading: true,
loading:false,
// 导出遮罩层
exportLoading: false,
// 显示搜索条件
......@@ -140,24 +197,55 @@ export default {
form: {},
// 表单校验
rules: {
sourceCurrencyId: [{ required: true, message: "原币种不能为空", trigger: "change" }],
sourceCurrencyId: [{ required: true, message: "币种1不能为空", trigger: "change" }],
sourceCurrencyCode: [{ required: true, message: "原币种代码不能为空", trigger: "blur" }],
targetCurrencyId: [{ required: true, message: "目标币种不能为空", trigger: "change" }],
targetCurrencyId: [{ required: true, message: "币种2不能为空", trigger: "change" }],
targetCurrencyCode: [{ required: true, message: "目标种代码不能为空", trigger: "blur" }],
currencyRate: [{ required: true, message: "汇率不能为空", trigger: "blur" }],
}
};
},
created() {
listAllSimpl().then(r => {
this.allSimplList = r.data
})
getCurrencyPage({ pageNo: 1, pageSize: 1000,}).then(res => this.currencyList = res.data.list)
this.getList();
},
methods: {
change(val){
console.log(val,'val')
},
handleLog(row){
this.openLog = true;
getExchangeRateLogList({ids:row.id}).then(r => {
this.listLog = r.data;
})
},
getOperator(val){
if (val){
let n = this.allSimplList.find(i => i.id == val)
return n?.nickname
}
return ''
},
getCurrency(val, isEn = false , value = 'id'){
if (val){
let r = this.currencyList.find(i => i[value] === val)
if(isEn){
return r?.titleEn
}else {
return r?.titleZh + `(${r?.titleEn})`
}
}
return ''
},
/** 查询列表 */
getList() {
this.loading = true;
// 处理查询参数
let params = {...this.queryParams};
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行查询
getExchangeRatePage(params).then(response => {
this.list = response.data.list;
......@@ -173,12 +261,13 @@ export default {
/** 表单重置 */
reset() {
this.form = {
id: undefined,
sourceCurrencyId: undefined,
sourceCurrencyCode: undefined,
targetCurrencyId: undefined,
targetCurrencyCode: undefined,
currencyRate: undefined,
"currencyRate": "",
"note": "",
"sourceCurrencyCode": "",
"sourceCurrencyId":'' ,
"targetCurrencyCode": "",
"targetCurrencyId": '',
id: null,
};
this.resetForm("form");
},
......@@ -197,7 +286,7 @@ export default {
handleAdd() {
this.reset();
this.open = true;
this.title = "添加汇率管理";
this.title = "新增";
},
/** 修改按钮操作 */
handleUpdate(row) {
......@@ -206,7 +295,7 @@ export default {
getExchangeRate(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改汇率管理";
this.title = "修改";
});
},
/** 提交按钮 */
......@@ -217,7 +306,16 @@ export default {
}
// 修改的提交
if (this.form.id != null) {
updateExchangeRate(this.form).then(response => {
let p = {
currencyRate: Number(this.form.currencyRate),
id: this.form.id,
note: this.form.no,
sourceCurrencyCode: this.form.sourceCurrencyCode,
sourceCurrencyId: this.form.sourceCurrencyId ,
targetCurrencyCode: this.form.targetCurrencyCode,
targetCurrencyId: this.form.targetCurrencyId
}
updateExchangeRate(p).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
......@@ -261,3 +359,10 @@ export default {
}
};
</script>
<style lang="scss" scoped>
::v-deep.el-input-number{
.el-input__inner{
text-align: left;
}
}
</style>
......@@ -1012,6 +1012,7 @@ export default {
volume: this.putin.volume,
chargeVolume: this.shopForm.chargeVolume,
weight: this.putin.weight,
quantity: this.putin.quantity,
chargeWeight: this.shopForm.chargeWeight,
worth: this.shopForm.worth || 0,
specsRecordVOList:this.shopForm.specsRecordVOList
......@@ -1079,26 +1080,11 @@ export default {
})
})
},
// 添加一行
/*addRow(){
if(!this.shopForm.specsRecordVOList){
this.$set(this.shopForm,'specsRecordVOList',[])
}
if(!this.currentWarehouseItem){
return this.$message.info(this.$t("请选择入仓记录"))
}
let { specificationType, boxGauge1, boxGauge2, boxGauge3, volume, weight } = this.currentWarehouseItem
let num = this.currentWarehouseItem.cartonsNum
// 根据入仓记录添加一行
this.shopForm.specsRecordVOList.push({
specificationType, boxGauge1, boxGauge2, boxGauge3, volume, weight,num,
orderLocationList: this.currentWarehouseItem.orderLocationBackVOList
})
},*/
// 删除一行,可选参数index表上行号,参数不是数字则删除最后一行
deleteRow(index){
const spliceIndex = typeof index !== 'number' ? this.shopForm.specsRecordVOList.length - 1 : index
this.shopForm.specsRecordVOList.splice(spliceIndex, 1)
this.calcDefaultData()
},
// 计算体积
calcVolume(row){
......@@ -1147,20 +1133,31 @@ export default {
this.shopForm.specsRecordVOList.push({...item})
})
this.currentPutIn = null
// 根据比例计算默认的收费方数和收费重量
const orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
const rate = this.putin.num / orderItem.warehouseInInfoVO.cartonsNum
this.$set(this.shopForm, 'chargeVolume', (orderItem.chargeVolume*rate).toFixed(2))
this.$set(this.shopForm, 'chargeWeight', (orderItem.chargeWeight*rate).toFixed(2))
this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2))
this.calcDefaultData()
},
// 清空放入记录
clearAll(){
this.$confirm(this.$t("确定要清空放入数据么?")).then(res => {
this.shopForm.specsRecordVOList = []
this.calcDefaultData()
})
},
// 计算放入的默认值
calcDefaultData(){
const orderItem = this.orderData.orderItemVOList.find(item => item.orderItemId == this.shopForm.orderItemId)
const rate = this.putin.num / orderItem.warehouseInInfoVO.cartonsNum
/*
* 1 普货 2 重货 3 泡货
* 普货 收费数据=入仓数据
* 泡货 收费方数=入仓方数 收费重量 = 品名收费重量*比例
* 重货 收费方数=品名收费方数*比例 收费重量 = 入仓重量
* */
const chargeVolume = orderItem.itemType === 2 ? (orderItem.chargeVolume*rate).toFixed(2) : this.putin.volume
const chargeWeight = orderItem.itemType === 3 ? (orderItem.chargeWeight*rate).toFixed(2) : this.putin.weight
this.$set(this.shopForm, 'chargeVolume', chargeVolume)
this.$set(this.shopForm, 'chargeWeight', chargeWeight)
this.$set(this.shopForm, 'worth', (orderItem.worth*rate).toFixed(2))
},
// 重置
reset(){
return deleteAllSplit(this.queryParams.orderId).then(res => {
......
......@@ -202,6 +202,16 @@
</el-form>
</el-card>
<el-card style="margin-top: 15px;">
<div slot="header" class="clearfix">
<span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div>
<div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.pictureUrls" ></image-and-video-upload>
</div>
</el-card>
</el-tab-pane>
......@@ -407,6 +417,15 @@
</el-form>
</el-card>
<el-card style="margin-top: 15px;">
<div slot="header" class="clearfix">
<span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div>
<div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form1.pictureUrls" ></image-and-video-upload>
</div>
</el-card>
</el-tab-pane>
</el-tabs>
......@@ -474,11 +493,13 @@ import {orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order"
import {getProductAttrList} from "@/api/ecw/productAttr"
import {getProductTypeList} from "@/api/ecw/productType"
import {addProduct} from "@/api/ecw/product"
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue"
export default {
name: "Warehouse",
components: {
ImageAndVideoUpload,
ProductSelector,
WarehouseAreaSelect,
WorkFlow
......@@ -624,7 +645,8 @@ export default {
prodType: undefined,
type: undefined,
feeType: undefined,
recordMode: undefined
recordMode: undefined,
pictureUrls: []
},
form1: {
table: [],
......@@ -642,7 +664,8 @@ export default {
prodType: undefined,
type: 1,
feeType: undefined,
recordMode: undefined
recordMode: undefined,
pictureUrls: []
},
brandList: [],
brandList1: [],
......@@ -712,6 +735,7 @@ export default {
this.form.prodType = this.warehousing.prodType
this.form.type = this.warehousing.type
this.form.feeType = this.warehousing.feeType
this.form.pictureUrls = this.warehousing.pictureUrls
this.warehousing.orderWarehouseInBackItemDoList.forEach(e => {
let bg = {}
......@@ -943,11 +967,10 @@ export default {
const form = val === 1 ? this.form1 : this.form
const formLength = form.table.length
let orderLocationBackVOList = []
// 不默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3344.html
// 上面弄错了,默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3484.html
/* // 不默认使用上一条记录的储位 https://zentao.test.jdshangmen.com/bug-view-3344.html
if (formLength > 0) {
orderLocationBackVOList = JSON.parse(JSON.stringify(form.table[formLength - 1].orderLocationBackVOList))
}
}*/
form.table.push({
"boxGauge1": this.isJiyun ? 0 : '',
"boxGauge2": this.isJiyun ? 0 : '',
......
......@@ -164,7 +164,7 @@
<span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div>
<div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.urls" ></image-and-video-upload>
<image-and-video-upload readonly :fileSize="50" :isShowTip="true" :value="[...form.urls, ...this.orderItemList.map(e => e.pictureUrls || []).flat()]" ></image-and-video-upload>
</div>
</el-card>
<div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)">
......
......@@ -323,7 +323,8 @@
</el-select>
</el-form-item>
<el-form-item :label="$t('是否支持控货')">
<el-radio-group v-model="lineform.controlstatus">
<el-radio-group v-model="lineform.controlStatus">
<el-radio :label="0">支持</el-radio>
<el-radio :label="1">不支持</el-radio>
</el-radio-group>
......@@ -548,7 +549,7 @@ export default {
// 表单参数
form: {checkList:[],},
ladingform: {prefixCounter:null,titleZh:null,contentZh:null,account:null,acctArr:[]},
lineform: {otherService:[],isClientShow:1,makeBillNode:'2',controlstatus:0,currencyUnit:''},
lineform: {otherService:[],isClientShow:1,makeBillNode:'2',controlStatus:'',currencyUnit:''},
startName:'',
destName:'',
......@@ -874,17 +875,18 @@ export default {
otherService: otherService.join(','),
makeBillNode:this.lineform.makeBillNode,
isClientShow:this.lineform.isClientShow,
controlstatus:this.lineform.controlstatus,
controlStatus:this.lineform.controlStatus,
currencyUnit:this.lineform.currencyUnit
}).then(res => {
this.$modal.msgSuccess(this.$t("操作成功"));
for(let index in this.routeList) {
let routeItem = this.routeList[index];
if(routeItem.lineId && routeItem.lineId == this.lineform.lineId) {
// routeItem.otherService = otherService;
this.$set(routeItem, 'otherService', otherService);
}
}
// for(let index in this.routeList) {
// let routeItem = this.routeList[index];
// if(routeItem.lineId && routeItem.lineId == this.lineform.lineId) {
// // routeItem.otherService = otherService;
// this.$set(routeItem, 'otherService', otherService);
// }
// }
this.getRouteList()
this.serviceOpen = false;
})
},
......
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