Commit ff6bdc85 authored by dragondean@qq.com's avatar dragondean@qq.com

价格日志和预装不显示仓库操作

parent 37797482
...@@ -89,3 +89,10 @@ export function batchOff(query) { ...@@ -89,3 +89,10 @@ export function batchOff(query) {
}) })
} }
export function getPriceSnapshotList(priceId){
return request({
url: '/ecw/product-price/priceSnapshotList',
method: 'get',
params: {priceId}
})
}
\ No newline at end of file
...@@ -122,7 +122,8 @@ ...@@ -122,7 +122,8 @@
<el-table-column prop="prodTitleEn" :label="$t('英文品名')" /> <el-table-column prop="prodTitleEn" :label="$t('英文品名')" />
<el-table-column prop="brand" :label="$t('品牌')" width="90px"> <el-table-column prop="brand" :label="$t('品牌')" width="90px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" /> <template v-if="row.brandName">{{row.brandName}}</template>
<dict-tagv-else :type="DICT_TYPE.ECW_IS_BRAND" :value="row.brandType" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="num" :label="$t('填单件数')" width="90px"/> <el-table-column prop="num" :label="$t('填单件数')" width="90px"/>
...@@ -173,12 +174,12 @@ ...@@ -173,12 +174,12 @@
</template> </template>
<template v-else-if="!row.seaFreight && !row.clearanceFreight">未报价</template> <template v-else-if="!row.seaFreight && !row.clearanceFreight">未报价</template>
<template v-else> <template v-else>
<div> <el-link type="primary" @click="showFeeDetail(row, 'freight')">
{{$t('运费')}}{{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}} {{$t('运费')}}{{row.oneSeaFreight}} {{currencyMap[row.seaFreightCurrency]}} / {{unitMap[row.seaFreightVolume]}}
</div> </el-link>
<div> <el-link type="primary" @click="showFeeDetail(row, 'clearance')">
{{$t('清关费')}}{{row.oneClearanceFreight}} {{currencyMap[row.clearanceFreightCurrency]}} / {{unitMap[row.clearanceFreightVolume]}} {{$t('清关费')}}{{row.oneClearanceFreight}} {{currencyMap[row.clearanceFreightCurrency]}} / {{unitMap[row.clearanceFreightVolume]}}
</div> </el-link >
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
...@@ -252,20 +253,43 @@ ...@@ -252,20 +253,43 @@
<print-warehouse-receipt v-if="showWarehouseReceipt" :order-id="order.orderId" @close="showWarehouseReceipt=false" /> <print-warehouse-receipt v-if="showWarehouseReceipt" :order-id="order.orderId" @close="showWarehouseReceipt=false" />
<print-lading-bill v-if="showLadingBill" :order-id="order.orderId" :transport-type="order.transportId" @close="showLadingBill=false" /> <print-lading-bill v-if="showLadingBill" :order-id="order.orderId" :transport-type="order.transportId" @close="showLadingBill=false" />
<warehouse-detail :order="order" :orderItemId="showWarehouseInItemId" v-if="showWarehouseInItemId" @close="showWarehouseInItemId=null" /> <warehouse-detail :order="order" :orderItemId="showWarehouseInItemId" v-if="showWarehouseInItemId" @close="showWarehouseInItemId=null" />
<el-dialog title="付款人" :visible.sync="showDarweeDialog" v-if="order && order.customDraweeVOList"> <el-dialog :title="$t('付款人')" :visible.sync="showDarweeDialog" v-if="order && order.customDraweeVOList">
<el-table :data="order.customDraweeVOList" v-if="order.drawee==3" > <el-table :data="order.customDraweeVOList" v-if="order.drawee==3" >
<el-table-column label="费用类型" prop="label" width="200px"> <el-table-column :label="$t('费用类型')" prop="label" width="200px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_CUSTOM_DRAWEE" :value="row.name"/> <dict-tag :type="DICT_TYPE.ECW_CUSTOM_DRAWEE" :value="row.name"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="付款人" width="300px"> <el-table-column :label="$t('付款人')" width="300px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.DRAWEE" :value="row.value" /> <dict-tag :type="DICT_TYPE.DRAWEE" :value="row.value" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-dialog> </el-dialog>
<el-dialog :title="$t('费用详情')" :visible="!!showFeeDetailDialog" :before-close="closeFeeDetail">
<el-row v-if="feeDetail">
<el-col :span="12">
<div>{{$t('运费')}}</div>
<div v-for="item in feeDetail.freight">
{{item.label}}: {{item.value}}
<template v-if="item.currency">
{{currencyMap[item.currency]}} / {{unitMap[item.volume]}} <span v-if="item.remark">{{item.remark}}</span>
</template>
</div>
</el-col>
<el-col :span="12">
<div>{{$t('清关费')}}</div>
<div v-for="item in feeDetail.clearance">
{{item.label}}: {{item.value}}
<template v-if="item.currency">
{{currencyMap[item.currency]}} / {{unitMap[item.volume]}} <span v-if="item.remark">{{item.remark}}</span>
</template>
</div>
</el-col>
</el-row>
</el-dialog>
</div> </div>
</template> </template>
...@@ -280,6 +304,8 @@ import {getReceivableListByOrderId} from '@/api/ecw/receipt' ...@@ -280,6 +304,8 @@ import {getReceivableListByOrderId} from '@/api/ecw/receipt'
import { getChannel } from '@/api/ecw/channel'; import { getChannel } from '@/api/ecw/channel';
import {listByIds} from '@/api/ecw/region' import {listByIds} from '@/api/ecw/region'
import WarehouseDetail from './components/WarehouseDetail'; import WarehouseDetail from './components/WarehouseDetail';
import {getProductBrank} from '@/api/ecw/productBrank'
import { parseTime } from '@/utils/ruoyi';
export default { export default {
name: "detail", name: "detail",
...@@ -319,6 +345,8 @@ export default { ...@@ -319,6 +345,8 @@ export default {
region: '', region: '',
orderWarehouseIn: null, // 入仓详情 orderWarehouseIn: null, // 入仓详情
showWarehouseInItemId: null, // 当前显示的入仓 showWarehouseInItemId: null, // 当前显示的入仓
showFeeDetailDialog: null, // 是否显示费用详情弹层
feeDetail: null, // 费用详情
} }
}, },
computed:{ computed:{
...@@ -380,6 +408,70 @@ export default { ...@@ -380,6 +408,70 @@ export default {
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
}, },
methods: { methods: {
// 显示费用详情
showFeeDetail(row, type){
this.showFeeDetailDialog = true
const freight = [], clearance = []
let freightFields = [{field: 'oneSeaFreight', label: this.$t('成交单价')}]
let clearanceFields = [{field: 'oneClearanceFreight', label: this.$t('成交单价')}]
// 不是特价则显示其他字段
if(!row.specialPriceType){
freightFields = freightFields.concat([
// {field: 'oneSeaFreight', label: '成交单价'},
{field: 'originalSeaFreight', label: this.$t('默认单价(无牌无液无电)')},
{field: 'brandFreightPrice', label: this.$t('品牌加价')},
{field: 'liquidFreightPrice', label: this.$t('液体加价')},
{field: 'electrifiedFreightPrice', label: this.$t('带电加价')},
{field: 'discountFreightPrice', label: this.$t('优惠活动减免')},
{field: 'plainCommission', label: this.$t('明佣')},
{field: 'afterDiscountSeaFreight', label: this.$t('优惠后单价')}
]).forEach(item => {
if(row[item.field]){
freight.push({
label: item.label,
value: row[item.field],
currency: row.seaFreightCurrency,
volume: row.seaFreightVolume,
remark: row.specialPriceType && item.field == 'oneSeaFreight' ? this.$t('特价') : null
})
}
})
clearanceFields = clearanceFields.concat([
{field: 'originalClearanceFreight', label: this.$t('默认单价(无牌无液无电)')},
{field: 'brandClearanceFeePrice', label: this.$t('品牌加价')},
{field: 'liquidClearanceFeePrice', label: this.$t('液体加价')},
{field: 'electrifiedClearanceFeePrice', label: this.$t('带电加价')},
{field: 'discountClearanceFeePrice', label: this.$t('优惠活动减免')},
{field: 'afterDiscountClearanceFreight', label: this.$t('优惠后单价')}
]).forEach(item => {
if(row[item.field]){
clearance.push({
label: item.label,
value: row[item.field],
currency: row.clearanceFreightCurrency,
volume: row.clearanceFreightVolume,
remark: row.specialPriceType && item.field == 'oneClearanceFreight' ? this.$t('特价') : null
})
}
})
}
freight.push({
label: '价格更新时间',
value: parseTime(row.updateTime)
})
clearance.push({
label: '价格更新时间',
value: parseTime(row.updateTime)
})
this.feeDetail = {freight, clearance}
},
closeFeeDetail(){
this.showFeeDetailDialog = null
},
/** 查询列表 */ /** 查询列表 */
getOrder() { getOrder() {
let that = this let that = this
...@@ -387,8 +479,23 @@ export default { ...@@ -387,8 +479,23 @@ export default {
// 执行查询 // 执行查询
getOrder(that.orderId).then(response => { getOrder(that.orderId).then(response => {
that.order = response.data; that.order = response.data;
// this.loadBrand()
}); });
}, },
/* loadBrands(){
let brandIds = []
this.form.orderItemVOList.forEach(item => {
if(item.brand){
brandIds.push(item.brand)
}
})
if(!brandIds.length) return
Array.form(new Set(brandIds)).forEach(brandId => {
getProductBrank(brandId).then(res => {
this.brands.push(res.dat)
})
})
}, */
getChannel(){ getChannel(){
if(!this.order || !this.order.channelId || this.order.transportId == 1 || this.order.transportId == 2) return if(!this.order || !this.order.channelId || this.order.transportId == 1 || this.order.transportId == 2) return
getChannel(this.order.channelId).then(res => { getChannel(this.order.channelId).then(res => {
......
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
<template v-if="scope.row.status != 0 && [204,205,206].indexOf(scope.row.inWarehouseState) < 0"> <template v-if="exclude(scope.row.status, [0, 11,12,13,14,15,17,18]) && exclude(scope.row.inWarehouseState, [204,205,206])">
<!-- <el-divider direction="vertical"></el-divider> --> <!-- <el-divider direction="vertical"></el-divider> -->
<!--仓库相关的--> <!--仓库相关的-->
<el-dropdown> <el-dropdown>
...@@ -292,7 +292,8 @@ ...@@ -292,7 +292,8 @@
</template> </template>
<!-- 入仓修改 --> <!-- 入仓修改 -->
<template v-if=" <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, [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])
"> ">
<el-dropdown-item @click.native="$router.push('/order/warehousing-update?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓修改')}}</el-dropdown-item> <el-dropdown-item @click.native="$router.push('/order/warehousing-update?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:update']">{{$t('入仓修改')}}</el-dropdown-item>
</template> </template>
......
...@@ -218,15 +218,99 @@ ...@@ -218,15 +218,99 @@
</el-card> </el-card>
</el-form> </el-form>
<el-card class="mt-10" v-if="readonly">
<el-descriptions :column="1">
<el-descriptions-item :label="$t('创建时间')">{{form.createTime|parseTime}}</el-descriptions-item>
<el-descriptions-item :label="$t('创建人')">{{form.creatorName}}</el-descriptions-item>
<el-descriptions-item :label="$t('最新修改时间')">{{form.updateTime|parseTime}}</el-descriptions-item>
<el-descriptions-item :label="$t('最新修改人')">{{form.updaterName}}</el-descriptions-item>
</el-descriptions>
</el-card>
<div style="margin: 20px 0"> <div style="margin: 20px 0">
<el-button @click="submitForm" type="primary" v-if="!readonly" :loading="loading">{{$t('确认提交')}}</el-button> <el-button @click="submitForm" type="primary" v-if="!readonly" :loading="loading">{{$t('确认提交')}}</el-button>
<el-button type="default" @click="$router.back()">{{$t('返回上一页')}}</el-button> <el-button type="default" @click="$router.back()">{{$t('返回上一页')}}</el-button>
<el-button @click="showLogsDialog=true" type="primary" v-if="readonly">{{$t('查看价格日志')}}</el-button>
</div> </div>
<el-dialog title="查看价格日志" :visible="showLogsDialog" :before-close="closeLogsDialog" width="1000px">
<el-table :data="logs">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="修改人" prop="creatorName"></el-table-column>
<el-table-column label="修改时间">
<template slot-scope="{row}">{{row.createTime|parseTime}}</template>
</el-table-column>
<el-table-column label="修改前">
<template slot-scope="{row}">
<div>预付:<dict-tag :type="DICT_TYPE.ECW_PAY_ADVANCE" :value="row.detail.needPay" /></div>
<div>单价模式:<dict-tag :type="DICT_TYPE.ECW_PRICE_TYPE" :value="row.detail.priceType" /></div>
<!----阶梯定价-->
<template v-if="row.detail.stepPrice == 1">
<template v-for="(item, index) in row.detail.priceStepList">
<div class="mt-10">
{{index+1}}阶段
{{item.startNum}} - {{item.endNum}} {{unitMap[item.weightUnit]}}
</div>
<template v-if="row.detail.priceType != 1">
<div :key="index + '_freight'" class="pl-10" >
运费:
{{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
</div>
<div :key="item.specialDictType + '_clearance'" class="pl-10">
清关费:
{{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}}
</div>
</template>
<div v-else class="pl-10">
全包价:
{{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}}
</div>
</template>
</template>
<template v-else>
<template v-if="row.detail.priceType != 1">
<div>
默认运费:
{{row.detail.transportPrice}} {{currencyMap[row.detail.transportPriceUnit]}} / {{unitMap[row.detail.transportVolumeUnit]}}
</div>
<div>
默认清关费:
{{row.detail.clearancePrice}} {{currencyMap[row.detail.clearancePriceUnit]}} / {{unitMap[row.detail.clearanceVolumeUnit]}}
</div>
</template>
<div v-else>
全包价:
{{row.detail.allPrice}} {{currencyMap[row.detail.allPriceUnit]}} / {{unitMap[row.detail.allVolumeUnit]}}
</div>
<template v-for="(item, index) in row.detail.specialList">
<template v-if="row.detail.priceType != 1">
<div :key="item.specialDictType + '_freight'" >
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} 运费:
{{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
</div>
<div :key="item.specialDictType + '_clearance'" >
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} 清关费:
{{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}}
</div>
</template>
<div v-else>
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} 全包价:
{{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}}
</div>
</template>
</template>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import RoutersSelector from '@/components/RoutersSelector' import RoutersSelector from '@/components/RoutersSelector'
import { createProductPrice, updateProductPrice, batchUpdateProductPrice, deleteProductPrice, getProductPrice, getProductPriceList, getProductPricePage, exportProductPriceExcel } from "@/api/ecw/productPrice"; import { createProductPrice, updateProductPrice, batchUpdateProductPrice, getProductPrice, getProductPriceList, getPriceSnapshotList } from "@/api/ecw/productPrice";
import { getProductType, getProductTypeList } from '@/api/ecw/productType' import { getProductType, getProductTypeList } from '@/api/ecw/productType'
import { getCurrencyList } from '@/api/ecw/currency'; import { getCurrencyList } from '@/api/ecw/currency';
import { getUnitList } from '@/api/ecw/unit'; import { getUnitList } from '@/api/ecw/unit';
...@@ -238,6 +322,7 @@ import {parseTime} from '@/utils/ruoyi' ...@@ -238,6 +322,7 @@ import {parseTime} from '@/utils/ruoyi'
import {openedRouterList} from '@/api/ecw/warehouse' import {openedRouterList} from '@/api/ecw/warehouse'
export default { export default {
components: { RoutersSelector, ProductSelector, Selector, Inputor }, components: { RoutersSelector, ProductSelector, Selector, Inputor },
filters: {parseTime},
data() { data() {
return { return {
checkList: [], checkList: [],
...@@ -264,15 +349,37 @@ export default { ...@@ -264,15 +349,37 @@ export default {
productDisabled: true, productDisabled: true,
readonly: false, readonly: false,
lineList: [], //路线数组 lineList: [], //路线数组
loading: false loading: false,
showLogsDialog: false, // 显示价格日志弹层
logs: []
} }
}, },
computed: { computed: {
routerOption(){ routerOption(){
return this.$route.query return this.$route.query
},
currencyMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
} }
}, },
watch: { watch: {
showLogsDialog(showLogsDialog){
if(showLogsDialog){
this.laodLogs()
}
},
checkList() { //选择路线 checkList() { //选择路线
if (this.checkList.length > 0) { if (this.checkList.length > 0) {
this.form.lineChannelList = this.checkList.map(item => { this.form.lineChannelList = this.checkList.map(item => {
...@@ -608,6 +715,17 @@ export default { ...@@ -608,6 +715,17 @@ export default {
}).finally(res => this.loading = false); }).finally(res => this.loading = false);
}); });
}, },
closeLogsDialog(){
this.showLogsDialog = false
},
laodLogs(){
getPriceSnapshotList(this.form.id).then(res => {
this.logs = res.data
this.logs.forEach(item => {
item.detail = JSON.parse(item.content)
})
})
}
} }
} }
</script> </script>
......
...@@ -178,7 +178,13 @@ ...@@ -178,7 +178,13 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('最后修改时间')">
<template slot-scope="{row}">
<div>
{{ row.updateTime|parseTime }}
</div>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="140"> <el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="140">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row, true)" <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row, true)"
...@@ -216,8 +222,10 @@ import { getChannelList } from '@/api/ecw/channel'; ...@@ -216,8 +222,10 @@ import { getChannelList } from '@/api/ecw/channel';
import DictTag from '@/components/DictTag' import DictTag from '@/components/DictTag'
import {arrryToKeyedObjectBy} from '@/utils/index' import {arrryToKeyedObjectBy} from '@/utils/index'
import { getProduct } from '@/api/ecw/product'; import { getProduct } from '@/api/ecw/product';
import {parseTime} from '@/utils/ruoyi'
export default { export default {
name: "ProductPrice", name: "ProductPrice",
filters: {parseTime},
components: { components: {
DictTag DictTag
}, },
......
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