Commit 74c57922 authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/dev1.6' into dev1.6

parents 2a8c21b0 5f108ca7
......@@ -448,32 +448,53 @@ export default {
this.isQuantity = false;
},
async changeProdTitleZh() {
const data = await this.getSelectData("zhId");
this.shopForm.enId = data.id;
const item = this.setShopForm("zhId");
this.shopForm.enId = item.id;
this.shopForm = { ...this.shopForm };
await this.getSelectData(item);
},
async changeProdTitleEn() {
const data = await this.getSelectData("enId");
this.shopForm.zhId = data.id;
const item = this.setShopForm("enId");
this.shopForm.zhId = item.id;
this.shopForm = { ...this.shopForm };
await this.getSelectData(item);
},
async getSelectData(key) {
setShopForm(key) {
let list = [];
list = this.orderItems.filter((item) => item.id == this.shopForm[key]);
this.shopForm.num = this.currRow.num - this.currRow.installNum;
const data = list[0];
const itemNum = data.num ?? 0;
// 获取拆单项的总num
const total = this.totalSplitNum();
// 订单的剩余
const orderNum = this.currRow.num - this.currRow.installNum;
// 剩余可装
const remainNum = Decimal.sub(orderNum, total).toNumber();
this.shopForm.num = 0;
this.shopForm.putNum = 0;
// 剩余可装大于等于订单项剩余,显示订单剩余
if (remainNum >= itemNum) {
this.shopForm.num = remainNum;
this.shopForm.putNum = itemNum;
}
// 订单剩余小于订单项剩余,显示订单项剩余
if (remainNum < itemNum) {
this.shopForm.num = this.shopForm.putNum = remainNum;
}
this.shopForm.orderItemId = data.orderItemId;
this.shopForm.putNum = data.num ?? 0;
this.shopForm.quantity = data.quantity ?? 0;
this.shopForm.putQuantity = Decimal.div(
data.quantity ?? 0,
this.shopForm.num
).toFixed(0);
return data;
},
async getSelectData(item) {
await quantitycheck({
seaFreightVolume: data.seaFreightVolume,
clearanceFreightVolume: data.clearanceFreightVolume,
seaFreightVolume: item.seaFreightVolume,
clearanceFreightVolume: item.clearanceFreightVolume,
}).then((res) => {
if (res.data) {
this.isQuantity = true;
......@@ -489,7 +510,6 @@ export default {
delete this.shopRules.putQuantity;
}
});
return data;
},
shopAdd() {
this.$refs["shopForm"].validate((valid) => {
......
......@@ -20,7 +20,7 @@
</el-form-item>
<el-form-item :label="$t('创建时间')">
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss"
<el-date-picker v-model="dateRangeCreateTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" label-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange" range-separator="-" :start-placeholder="$t('开始日期')" :end-placeholder="$t('结束日期')" />
</el-form-item>
<el-form-item>
......
......@@ -200,9 +200,21 @@
</template>
</template>
</el-table-column>
<el-table-column prop="" :label="$t('填单快递单号')">
<el-table-column prop="" :label="$t('储位')">
<template slot-scope="{row}">
{{ row.expressNo }}
<!-- <warehouse-area-select
v-if="row.warehouseInInfoVO"
v-model="row.warehouseInInfoVO.orderLocationBackVOList"
readonly
:order-id="orderId"></warehouse-area-select> -->
<template v-if="row.warehouseInInfoVO">
{{getLocationName(row.warehouseInInfoVO.orderLocationMergeVOSet)}}
</template>
</template>
</el-table-column>
<el-table-column prop="" :label="$t('快递单号')">
<template slot-scope="{row}">
{{ row.warehouseInInfoVO.expressNo }}
</template>
</el-table-column>
</el-table>
......@@ -270,6 +282,34 @@
</el-table-column>
</el-table>
</el-tab-pane>
<!-- 这个地方v-hasPermi不生效,所以换checkPermi函数检查 -->
<el-tab-pane :label="$t('操作日志')" name="five" v-if="checkPermi(['ecw:order:logs'])">
<el-table :data="logs">
<el-table-column :label="$t('时间')" width="150">
<template slot-scope="{row}">{{ parseTime(row.createTime) }}</template>
</el-table-column>
<el-table-column :label="$t('操作人')" prop="creatorName" width="150"> </el-table-column>
<el-table-column :label="$t('操作人类型')" width="100">
<template slot-scope="{row}">{{ row.userType == 1 ? $t('会员') : $t('管理员') }}</template>
</el-table-column>
<el-table-column :label="$t('操作类型')" prop="type" width="150"></el-table-column>
<el-table-column :label="$t('操作描述')" prop="msg" width="300"></el-table-column>
<el-table-column :label="$t('备注')" prop="note">
<template slot-scope="{row}">
<div v-if="row.note">
<div v-for="item in parseLogNote(row.note)">
<template v-if="item.orgValue">
{{$t('【{name}】从【{orgValue}】修改为【{newValue}', item)}}
</template>
<template v-else>
{{$t('【{name}】设置为【{newValue}', item)}}
</template>
</div>
</div>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</el-card>
......@@ -312,7 +352,7 @@
</div>
</el-col>
</el-row>
<div v-if="feeDetail && feeDetail.coupons && feeDetail.coupons.length" class="page-title">优惠详情</div>
<el-table v-if="feeDetail && feeDetail.coupons && feeDetail.coupons.length" :data="feeDetail.coupons">
<el-table-column label="优惠ID" prop="couponId"></el-table-column>
......@@ -344,7 +384,7 @@
</template>
<script>
import { getOrder } from '@/api/ecw/order'
import { getOrder, operateLogPage } from '@/api/ecw/order'
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
......@@ -356,11 +396,12 @@ import {listByIds} from '@/api/ecw/region'
import WarehouseDetail from './components/WarehouseDetail';
import {getProductBrank} from '@/api/ecw/productBrank'
import { parseTime } from '@/utils/ruoyi';
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {checkPermi} from '@/utils/permission'
export default {
name: "detail",
components: {
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail
PrintWarehouseReceipt, PrintLadingBill, WarehouseDetail, WarehouseAreaSelect
},
filters: {
customsTypeFilter(e, customsTypeList) {
......@@ -398,6 +439,8 @@ export default {
showWarehouseInItemId: null, // 当前显示的入仓
showFeeDetailDialog: null, // 是否显示费用详情弹层
feeDetail: null, // 费用详情
logs: [], // 操作日志
}
},
computed:{
......@@ -433,6 +476,9 @@ export default {
if(!this.feeList.length && val == 'four'){
this.loadFeeList()
}
if(!this.logs.length && val == 'five'){
this.loadLogs()
}
},
'order.channelId'(){
this.getChannel()
......@@ -457,10 +503,18 @@ export default {
getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data)
console.log('2023-01-14 23:23 看到此消息则表示代码最新')
},
methods: {
checkPermi, // 检查权限
// 获取储位名称
getLocationName(locationArr){
if(!locationArr || !locationArr.length) return ''
let arr = []
locationArr.forEach(item => {
arr.push(`${item.areaName}${item.locationName || ''}`)
})
return Array.from(new Set(arr)).join(",")
},
// 显示费用详情
showFeeDetail(row, type){
this.showFeeDetailDialog = true
......@@ -582,6 +636,12 @@ export default {
this.feeList = res.data
})
},
// 加载操作日志
loadLogs(){
operateLogPage({orderId: this.orderId, page: 1, rows: 10000}).then(res => {
this.logs = res.data.list
})
},
downloadPackingList(){
window.open(this.order.packingListUrl)
},
......@@ -593,6 +653,11 @@ export default {
getOrderWarehouseIn(this.order.id).then(res => {
this.orderWarehouseIn = res.data
})
},
// 解析日志node字段
parseLogNote(note){
if(!note) return []
return JSON.parse(note)
}
}
};
......
......@@ -356,7 +356,7 @@
<!-- 入仓修改 -->
<template v-if="
(
include(scope.row.inWarehouseState, [202, 207, 202, 209, 210, 202, 211, 212, 202, 213, 214, 215, 216, 204, 205]) &&
include(scope.row.inWarehouseState, [201, 202, 207, 202, 209, 210, 202, 211, 212, 202, 213, 214, 215, 216, 204, 205]) &&
scope.row.status != 11 && exclude(scope.row.shipmentState, [314,315,317,318])
)
">
......
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