Commit a81d99d4 authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/dev' into dev

parents 56796bc1 86ac0e37
......@@ -46,6 +46,9 @@ export default {
align-items: center;
justify-content: center;
}
.items-center{
align-items: center;
}
.empty-placeholder{
padding: 50px;
text-align: center;
......
......@@ -748,4 +748,58 @@ export function splitItemUpdate(data){
data
})
}
// 可出订单列表
export function canShipmentPage(params){
return request({
url: '/air/order/can/shipment/page',
method: 'get',
params
})
}
// 待出订单列表
export function waitingShipmentPage(params){
return request({
url: '/air/order/waiting/shipment/page',
method: 'get',
params
})
}
// 备货订单列表
export function canReadyStockShipmentPage(params){
return request({
url: '/air/order/can-ready-stock/shipment/page',
method: 'get',
params
})
}
// 确认订单可出
export function setCanShipment(orderId){
return request({
url: '/air/order/can/shipment/' + orderId,
method: 'put',
})
}
// 批量可出
export function batchCanShipment(orderIdList){
return request({
url: '/air/order/can/shipment/',
method: 'put',
data: {orderIdList}
})
}
// 批量转异
export function batchException(ids){
throw new Error('接口未出,待完善,以下代码是copilot生成')
}
// 导出备货订单
export function exportReadyStock(params){
return request({
url: '/ecw/order/export/ready-stock/search',
method: 'get',
params,
responseType: 'blob'
})
}
......@@ -106,4 +106,13 @@ export function getProductPriceGetPrice(query) {
method: 'get',
params: query
})
}
\ No newline at end of file
}
// 更新单询
export function updateOrderInquiry(data) {
return request({
url: '/ecw/product-price/updateOrderInquiry',
method: 'put',
data: data
})
}
......@@ -57,8 +57,11 @@ export default {
}
},
computed:{
dicts(){
return this.getList(this.type)
},
dictList(){
return this.getList(this.type).filter(this.filter)
return this.dicts.filter(this.filter)
},
formattedList(){
let arr = []
......@@ -104,7 +107,7 @@ export default {
},
setValueSync(){
if(this.value === null || this.value === undefined || this.value === ''){
return this.valueSync = this.multiple ? [] : this.value
return this.valueSync = this.multiple ? [] : this.value
}
if(this.multiple){
let value = this.value || []
......
......@@ -2,8 +2,8 @@
<div>
<div class="filters mb-10">
{{$t('运输方式')}}
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" style="width:150px" />
<dict-selector :type='DICT_TYPE.ECW_TRANSPORT_TYPE' v-model="transportType" :placeholder="$t('请选择运输方式')" :filter="transportFilter" style="width:150px" />
{{$t('始发地')}}
<el-select :placeholder="$t('请选择始发地')" v-model="exportCity" clearable>
<el-option v-for="item in exportCityList" :key="item.id" :label="item.titleZh" :value="item.id" />
......@@ -50,6 +50,11 @@
{{$l(row.channel, 'name')}}
</template>
</el-table-column>
<el-table-column v-if="showAttr" :label="$t('商品特性')" prop="startTitleZh">
<template slot-scope="{row}">
{{ getAttrNames(row.attrId) }}
</template>
</el-table-column>
<el-table-column :label="$t('操作')" prop="">
<template slot="header">
<el-checkbox @change="toggleGroupChecker(index, $event)" v-model="groupChecker[item.value]"></el-checkbox>
......@@ -69,12 +74,15 @@
import {getChannelList} from '@/api/ecw/channel'
import {getTradeCityList} from '@/api/ecw/region'
import {openedRouterList} from '@/api/ecw/warehouse'
import {getProductAttrList} from "@/api/ecw/productAttr";
export default {
props:{
value: {
type: Array
},
option: Object
value: {
type: Array
},
option: Object,
// 类型,sea海运,air空运
type: String
},
data(){
return {
......@@ -90,7 +98,7 @@ export default {
hideMap: {}, // 折叠状态
checkAll: null,
groupChecker: {}, // 分组全选状态
attrList:[], // 商品特性
}
},
computed:{
......@@ -114,12 +122,14 @@ export default {
})
return ids
},
// 根据选择的渠道筛选
availChannelList(){
return this.channelList.filter(item => !this.channelId || this.channelId == item.channelId)
return this.channelList.filter(item => !this.channelId || this.channelId == item.channelId)
},
filteredRouterList(){
let transportTypeList = []
this.transportTypeDicts
.filter(this.transportFilter)
.filter(transport => !this.channelId || transport.cssClass == 'channel')
.forEach(item => {
if(this.transportType === null || this.transportType == '' || this.transportType == item.value){
......@@ -151,6 +161,25 @@ export default {
}
})
return transportTypeList
},
// 是否显示商品特性(渠道)
showAttr(){
return this.type == 'air'
},
// 显示产品特性
getAttrName(){
return (id) => {
let item = this.attrList.find(item => item.id == id)
if(!item) return ''
return this.$l(item, 'attrName')
}
},
// 显示多个商品特性
getAttrNames(){
return (ids) => {
if(!ids) return ''
return ids.split(',').filter( item => !!item).map(id => this.getAttrName(id)).join(',')
}
}
},
watch:{
......@@ -188,7 +217,7 @@ export default {
if(option){
this.changeOption()
}
}
},
created(){
......@@ -200,7 +229,7 @@ export default {
// 路线需要过滤失效的进出口城市,所以在程序加载后再加载路线
this.getOpenedRouterList()
})
if(this.value && this.value.length){
this.selectedRoutes = this.value
}
......@@ -208,9 +237,19 @@ export default {
if(this.option){
this.changeOption()
}
// 如果显示特性,则需要查询特数据备用
if(this.showAttr){
this.getAttrList()
}
},
methods:{
getAttrList(){
getProductAttrList().then(res => {
this.attrList = res.data
})
},
changeOption(){
if(!this.option) return
this.importCity = +this.option.importCity || null
......@@ -258,22 +297,13 @@ export default {
if(index > -1){
this.selectedRoutes.splice(index, 1)
}
}
},
getSelectedIndex(router){
return this.selectedRoutes.findIndex(item => {
return item.lineId == router.id && item.channelId == router.channel.channelId
})
/* let index = null
this.selectedRoutes.forEach((item, i)=>{
if(item.lineId == router.id && item.shippingChannelId == router.channel.channelId){
index = i
// break
}
})
return index */
},
SpanMethod({ row, column, rowIndex, columnIndex }){
if (columnIndex < 2 ) {
......@@ -290,7 +320,11 @@ export default {
// 折叠,展开
toggleHide(value){
this.$set(this.hideMap, value, !this.hideMap[value])
}
},
// 运输方式筛选
transportFilter(item){
return (this.type == 'sea' ? ['1','2'] : ['3', '4']).indexOf(item.value) > -1
},
}
}
</script>
......@@ -298,4 +332,4 @@ export default {
.mb-10{
margin-bottom: 10px
}
</style>
\ No newline at end of file
</style>
......@@ -188,6 +188,8 @@ export const DICT_TYPE = {
WAREHOUSING_SPECIFICATION_TYPE: 'warehousing_specification_type',
ECW_AUTH_TYPE:'auth_type',//品牌授权
NEED_ORDER_INQUIRY: 'need_order_inquiry', // 是否需要単询
ECASH_INIT:'ecash_init', //e-cash
FEE_TYPE:'receivable_fee_type',
// PAY_TYPE:'payment_type',
......
<template>
<div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-position="left" inline :disabled="updateChannel">
<!--初始化过程中不渲染页面,利用此特性在新建订单后重新初始化表单(字典选择组件默认值)-->
<el-form v-if="!initing" ref="form" :model="form" :rules="rules" label-position="left" inline :disabled="updateChannel">
<el-card v-if="form.applyStatus == 1" class="mb-10">
<div slot="header" class="card-title">{{$t('以下信息修改审核中')}}</div>
<el-table :data="form.applyInfoList">
......@@ -1256,14 +1256,17 @@ export default {
// 添加的提交
createOrder(data).then(response => {
this.$modal.msgSuccess(this.$t("新增成功"));
this.initing = true
// 重置数据
this.form = {...makeDefaultFormData()}
this.routerList = []
this.addProduct()
this.$nextTick(() =>{
this.$refs.form.clearValidate()
this.$redirect('success?orderId=' + response.data)
this.initing = false
this.$nextTick(() => {
this.$refs.form.clearValidate
this.$redirect('success?orderId=' + response.data)
})
})
......
......@@ -427,6 +427,19 @@
<el-dropdown-item @click.native="$router.push({path:'/order/transfer-to-warehouse/' + scope.row.orderId + '/' + 2 })" v-hasPermi="['ecw:order:warehouse_arrive']">{{$t('调拨到仓')}}</el-dropdown-item>
</template>
<!--开始备货-->
<template v-if="
include(scope.row.airShipment, [2])
">
<el-dropdown-item @click.native="$router.push({path:'/order/stocking?id=' + scope.row.orderId})" v-hasPermi="['ecw:order:stocking']">{{$t('开始备货')}}</el-dropdown-item>
</template>
<!--修改备货-->
<template v-if="
include(scope.row.airShipment, [3, 4, 10])
">
<el-dropdown-item @click.native="$router.push({path:'/order/stocking?action=update&id=' + scope.row.orderId})" v-hasPermi="['ecw:order:stocking_update']">{{$t('修改备货')}}</el-dropdown-item>
</template>
</el-dropdown-menu>
</el-dropdown>
</template>
......@@ -511,7 +524,7 @@ import {
exportCustomsDatas,
exportShippingDatas,
exportShipFee,
exportUnload, splitCancelApply, orderSplitRevoke
exportUnload, splitCancelApply, orderSplitRevoke, setCanShipment
} from "@/api/ecw/order";
/* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */
import PrintTag from './components/PrintTag'
......
......@@ -104,8 +104,8 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button :disabled="!multipleSelection.length" type="primary" plain size="mini" @click="$alert('//TODO')" v-hasPermi="['ecw:order:peddingList:batch_avail4shpiing']">{{$t('批量可出')}}</el-button>
<el-button :disabled="!multipleSelection.length" type="primary" plain size="mini" @click="$alert('//TODO')" v-hasPermi="['ecw:order:peddingList:batch_exception']">{{$t('批量转异')}}</el-button>
<el-button :disabled="!multipleSelection.length" type="primary" plain size="mini" @click="batchCanShipment" v-hasPermi="['ecw:order:peddingList:batch_can_shipment']">{{$t('批量可出')}}</el-button>
<el-button :disabled="!multipleSelection.length" type="primary" plain size="mini" @click="batchException" v-hasPermi="['ecw:order:peddingList:batch_exception']">{{$t('批量转异')}}</el-button>
</el-col>
</el-row>
......@@ -172,7 +172,7 @@
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width actions" width="150px">
<template slot-scope="scope">
<el-button type="text" @click="$alert('// TODO')" v-hasPermi="['ecw:order:peddingList:avail4shpiing']">{{$t('可出')}}</el-button>
<el-button type="text" @click="setCanShipment(scope.row)" v-hasPermi="['ecw:order:peddingList:can_shipment']">{{$t('可出')}}</el-button>
<el-button type="text" @click="printTagOrderId=scope.row.orderId" v-hasPermi="['ecw:order:peddingList:print_tag']">{{$t('打印标签')}}</el-button>
</template>
</el-table-column>
......@@ -182,6 +182,27 @@
@pagination="getList" />
<print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" />
<el-dialog :title="$t('订单转异')" center :visible.sync="showBatchException">
<el-form label-position="top" label-width="200" ref="batchExceptionForm" :model="batchExceptionForm" :rules="exceptionRules">
<el-form-item :label="$t('订单号')" prop="manualExceptionType">
{{multipleSelection.map(item => item.orderNo).join(',')}}
</el-form-item>
<el-form-item :label="$t('原因类型')" prop="manualExceptionType">
<dict-selector v-model="batchExceptionForm.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector>
</el-form-item>
<el-form-item :label="$t('附件')">
<image-upload v-model="batchExceptionForm.exceptionUrls"></image-upload>
</el-form-item>
<el-form-item :label="$t('详细信息')">
<el-input v-model="batchExceptionForm.descZh" type="textarea"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleBatchException">{{$t('确认转异')}}</el-button>
<el-button @click="showBatchException = false">{{$t('取消')}}</el-button>
</span>
</el-dialog>
</div>
</template>
......@@ -216,7 +237,7 @@ import {
exportCustomsDatas,
exportShippingDatas,
exportShipFee,
exportUnload
exportUnload, setCanShipment, canShipmentPage, batchCanShipment, batchException, waitingShipmentPage
} from "@/api/ecw/order";
import PrintTag from './components/PrintTag'
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
......@@ -278,7 +299,25 @@ export default {
rows: 20,
},
currencyList:[],
channelList:[]
channelList:[],
// 是否显示批量转异弹层
showBatchException: false,
// 批量转异表单
batchExceptionForm: {},
// 批量转异表单验证规则
exceptionRules: {
manualExceptionType: [
{ required: true, message: '请勾选原因类型', trigger: 'change' },
{
validator: (rule, value, callback) => {
if (value.length <= 0) {
callback(new Error('请勾选原因类型'))
}
callback()
}, trigger: 'change'
}
]
}
};
},
watch:{
......@@ -323,7 +362,7 @@ export default {
getList() {
this.loading = true;
// 执行查询
getOrderPage(this.combinedQueryParams).then(response => {
waitingShipmentPage(this.combinedQueryParams).then(response => {
// 部分情况下,订单后面的操作下拉菜单会显示按钮,但是下来没有选项,在elTable组件更新的时候会导致渲染错误,所以要在更新渲染前清空一次list让table彻底重新渲染,避免部分更新导致异常
this.list = []
this.$nextTick(() => {
......@@ -361,6 +400,45 @@ export default {
this.ids = selection.map(item => item.orderId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
// 设置可出
setCanShipment(row){
this.$confirm(this.$t(`您确定要将订单{orderNo}设置为可出吗?`, {orderNo: row.orderNo})).then(() =>{
return setCanShipment(row.orderId)
}).then(res =>{
this.$message.success(res.message || this.$t('操作成功'))
this.getList()
})
},
// 批量可出
batchCanShipment(){
let orderNos = this.multipleSelection.map(item => item.orderNo).join(',')
this.$confirm(this.$t(`您确定要将订单{orderNos}设置为可出吗?`, {orderNos})).then(() =>{
return batchCanShipment(this.ids)
}).then(res =>{
this.$message.success(res.message || this.$t('操作成功'))
this.getList()
})
},
// 批量转异
batchException(){
if(!this.multipleSelection.length){
return this.$message.error("暂无选择订单")
}
this.showBatchException = true
},
handleBatchException(){
// 以下代码是copilot生成,暂无接口,回头在改
this.$refs.batchExceptionForm.validate(valid => {
if (valid) {
let params = Object.assign({}, this.batchExceptionForm, {orderIds: this.ids})
batchException(params).then(res =>{
this.$message.success(res.message || this.$t('操作成功'))
this.showBatchException = false
this.getList()
})
}
})
}
}
};
......
<template>
<el-dialog visible :close-on-click-modal="false" :before-close="closeDialog" :title="title">
<el-form ref="form" :model="form" label-width="120px" :rules="rules">
<!-- 海运是重货,空运是泡货 -->
<template v-if="order.transportId === 1 || order.transportId === 2">
<template v-if="applyType == 4">
<el-form-item :label="$t('原重货标准')">
{{form.orgWVolume}} kg/cbm
</el-form-item>
......@@ -11,7 +11,7 @@
<el-input v-model="form.wvolume" type="number" class="w-100" /> kg/cbm
</el-form-item>
</template>
<template v-else>
<template v-else-if="applyType == 5">
<el-form-item :label="$t('原泡货标准')">
{{form.orgVWeight}} kg
</el-form-item>
......@@ -19,9 +19,17 @@
<el-input v-model="form.vweight" type="number" class="w-100" /> kg
</el-form-item>
</template>
<template v-else-if="applyType == 29">
<el-form-item :label="$t('现订单泡重')">
{{form.orgVWeight}} kg
</el-form-item>
<el-form-item :label="$t('新订单泡重')" style="width: 400px" prop="clearanceFreight">
<el-input v-model="form.vweight" type="number" class="w-100" /> kg
</el-form-item>
</template>
</el-form>
<div class="page-title">{{ $t('审批流程') }}</div>
<work-flow xmlkey="special_apply" v-model="ccIdArr" />
<work-flow :xmlkey="workFlowKey" v-model="ccIdArr" />
<div v-if="form.applyStatus != 1">
<el-button type="primary" @click="handleSubmit">{{ $t('提交') }}</el-button>
</div>
......@@ -29,7 +37,7 @@
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">
<dict-tag :type="DICT_TYPE.APPLY_STATUS" :value="form.applyStatus" />
</el-button>
<el-button type="primary" @click="cancelAudit">{{ $t('取消审核') }}</el-button>
<el-button type="default" @click="closeDialog">{{ $t('返回') }}</el-button>
</div>
......@@ -50,7 +58,7 @@ export default {
props: {
order: Object,
orderItem: Object,
applyType: Number // 4是重货优惠5是泡货优惠
applyType: Number // 4是重货标准优惠5是泡货标准优惠,29泡货优惠
},
components: {
WorkFlow
......@@ -65,7 +73,7 @@ export default {
// applyType: 2, //1是优惠申请2是管理折扣3是佣金设置4是重货优惠5是泡货优惠
ccIdArr: [],
form: {
},
rules:{
......@@ -79,7 +87,21 @@ export default {
},
computed:{
title(){
return this.applyType == 4 ? this.$t('重货优惠申请') : this.$t('泡货优惠申请')
return {
4: this.$t('重货标准优惠申请'),
5: this.$t('泡货标准优惠申请'),
29: this.$t('泡货优惠申请')
}[this.applyType]
// return this.applyType == 4 ? this.$t('重货优惠申请') : this.$t('泡货优惠申请')
},
// 流程key
workFlowKey(){
// 泡货优惠申请审核
if(this.applyType == 29){
return 'shipment_bulky_cargo'
}
// 订单特价审核
return 'special_apply'
}
},
methods: {
......
......@@ -48,7 +48,7 @@
:formatter="(_, __, v) => parseTime(v)"
:label="$t('最后操作时间')">
</el-table-column>
<el-table-column
:label="$t('原价')">
<template v-slot="{row}">
......@@ -111,7 +111,10 @@
2.空运专线、海空联运显示泡货优惠 3,4
-->
<el-button v-hasPermi="['ecw:order:heavy']" type="primary" @click="showPreferentialType=4" v-if="order.transportId === 1 || order.transportId === 2">{{$t('申请重货优惠')}}</el-button>
<el-button v-hasPermi="['ecw:order:bulky']" type="primary" @click="showPreferentialType=5" v-else>{{$t('申请泡货优惠')}}</el-button>
<template v-else>
<el-button v-hasPermi="['ecw:order:bulky2']" type="primary" @click="showPreferentialType=29">{{$t('申请泡货优惠')}}</el-button>
<el-button v-hasPermi="['ecw:order:bulky']" type="primary" @click="showPreferentialType=5">{{$t('申请泡货标准优惠')}}</el-button>
</template>
<el-button type="primary" @click="$tab.closePage()">{{$t('关闭窗口')}}</el-button>
</div>
</el-card>
......@@ -122,7 +125,7 @@
<discount v-if="!!showAllowanceItem" :order="order" :orderItem="showAllowanceItem" @close="showAllowanceItem=null" :applyType="2" @success="onDiscountSuccess" />
<!-- 佣金规则 -->
<commission v-if="!!showCommissionItem" :order="order" :orderItem="showCommissionItem" @close="showCommissionItem=null" @success="onCommissionSuccess" />
<!-- 重泡货优惠 -->
<!-- 重泡货(标准)优惠 -->
<preferential v-if="!!showPreferentialType" :applyType="showPreferentialType" :order="order" @close="showPreferentialType=null" @success="onPreferentialSuccess" />
</div>
</template>
......
......@@ -104,8 +104,8 @@
<!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button :disabled="!multipleSelection.length" type="primary" plain size="mini" @click="$alert('//TODO')" v-hasPermi="['ecw:order:stockingList:export_selected']">{{$t('导出所选')}}</el-button>
<el-button :disabled="!multipleSelection.length" type="primary" plain size="mini" @click="$alert('//TODO')" v-hasPermi="['ecw:order:stockingList:export_search']">{{$t('导出搜索')}}</el-button>
<el-button :disabled="!multipleSelection.length" type="primary" :loading="exporting" plain size="mini" @click="exportXls(ids)" v-hasPermi="['ecw:order:stockingList:export_selected']">{{$t('导出所选')}}</el-button>
<el-button type="primary" :loading="exporting" plain size="mini" @click="exportXls(queryParams)" v-hasPermi="['ecw:order:stockingList:export_search']">{{$t('导出搜索')}}</el-button>
</el-col>
</el-row>
......@@ -192,7 +192,7 @@ import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import specialNeeds from '@/views/ecw/order/components/specialNeeds';
import { getOrderPage } from "@/api/ecw/order";
import {canReadyStockShipmentPage, exportReadyStock, getOrderPage} from "@/api/ecw/order";
import PrintTag from './components/PrintTag'
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
......@@ -298,7 +298,7 @@ export default {
getList() {
this.loading = true;
// 执行查询
getOrderPage(this.combinedQueryParams).then(response => {
canReadyStockShipmentPage(this.combinedQueryParams).then(response => {
// 部分情况下,订单后面的操作下拉菜单会显示按钮,但是下来没有选项,在elTable组件更新的时候会导致渲染错误,所以要在更新渲染前清空一次list让table彻底重新渲染,避免部分更新导致异常
this.list = []
this.$nextTick(() => {
......@@ -336,6 +336,15 @@ export default {
this.ids = selection.map(item => item.orderId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
// 导出
exportXls(params){
this.exporting = true
exportReadyStock(params).then(res => {
this.$download.excel(res, this.$t('备货订单') + '.xls');
}).finally(() => {
this.exporting = false
})
}
}
};
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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