Commit 7a164ebd authored by zhoutong's avatar zhoutong

Merge branch 'dev' into zhto/air

parents 33211bf4 6095b166
<!--批量加价-->
<template>
<div class="app-container">
<div class="page-title">批量加价</div>
<div>
运费或全包加价
<!--货币-->
<selector v-model="form.reduceCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w-100 ml-10" />
<!--金额-->
<el-input type="number" v-model="form.cashCondition" @keyup.native="checkPositive(form, 'cashCondition')" class="w-100 ml-10" />
<!--单位-->
<selector v-model="form.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable class="w-100 ml-10" />
</div>
<div class="mt-10">
清关费加价价
<!--货币-->
<selector v-model="form.reduceCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable class="w-100 ml-10" />
<!--金额-->
<el-input type="number" v-model="form.cashCondition" @keyup.native="checkPositive(form, 'cashCondition')" class="w-100 ml-10" />
<!--单位-->
<selector v-model="form.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable class="w-100 ml-10" />
</div>
<el-card class="mt-20" v-if="shipmentObj">
<el-descriptions :column="4" border>
<el-descriptions-item :label="$t('自编号')">
{{shipmentObj.selfNo}}
</el-descriptions-item>
<el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="shipmentObj.transportType" />
</el-descriptions-item>
<!-- <el-descriptions-item :label="$t('出货渠道')">
{{getShipChannelName(shipmentObj.shippingChannelId)}}
</el-descriptions-item> -->
<el-descriptions-item :label="$t('柜型')">
{{getCabinetLabel(shipmentObj.cabinetId)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('状态')">
{{shipmentObj.shipmentStatusText}}
</el-descriptions-item>
<el-descriptions-item :label="$t('总计')">
{{getBoxSum(shipmentObj.boxStatistics)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('始发地')">
{{getCityName(shipmentObj.startWarehouseId)}}
</el-descriptions-item>
<el-descriptions-item :label="$t('目的地')">
{{getCityName(shipmentObj.destWarehouseId)}}
</el-descriptions-item>
<el-descriptions-item label="SO NO">
{{shipmentObj.bookSeaInfo ? shipmentObj.bookSeaInfo.sono : '' }}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="mt-20">
<div slot="header">
明细
</div>
<div>
当前部分:
<el-select :placeholder="$t('请选择')" v-model="sectionId" @change="sectionChange">
<el-option key="0" :label="$t('全部')" value="0"></el-option>
<el-option v-for="item in sectionList" :key="item.id" :label="item.title" :value="item.id"></el-option>
</el-select>
</div>
<el-table border :data="orderList" @selection-change="handleSelectionChange" class="mt-10">
<el-table-column type="selection" width="50"></el-table-column>>
<el-table-column align="center" :label="$t('序号')" width="50" prop="tidanNum" />
<el-table-column prop="orderNo" :label="$t('订单号')" align="center">
<template v-slot="scope">
<a href="javascript:void(0)" @click="jumpOrderDetail(scope.row)">{{ scope.row.orderNo }}</a>
</template>
</el-table-column>
<el-table-column prop="goodsList" :label="$t('货物信息')" width="230px" align="center">
<template v-slot="{row}">
<section>
<div v-for="(item, index) in row.goodsList" :key="index">
{{index+1}}{{item.prodTitleZh}}
</div>
</section>
</template>
</el-table-column>
<el-table-column prop="num" :label="$t('计划箱数')" align="center"></el-table-column>
<el-table-column prop="installNum" :label="$t('实装箱数')" align="center"></el-table-column>
<el-table-column prop="unloadNum" :label="$t('卸柜箱数')" align="center"></el-table-column>
<el-table-column prop="destWarehouseName" :label="$t('提货点')" align="center"></el-table-column>
<el-table-column prop="volume" :label="$t('体积')" align="center"></el-table-column>
<el-table-column prop="weight" :label="$t('重量')" align="center"></el-table-column>
<el-table-column prop="totalWorth" :label="$t('货值')" align="center"></el-table-column>
<el-table-column prop="customsType" :label="$t('报关方式')" align="center">
<template slot-scope="scope">
<div :class="scope.row.customsType !== 1 ? 'customsType-red' : ''">
<dict-tag :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="scope.row.customsType" />
</div>
</template>
</el-table-column>
<el-table-column prop="customsFee" :label="$t('报关费用')" align="center"></el-table-column>
<el-table-column prop="" :label="$t('当前成交价')" align="center" width="120px">
<template slot-scope="scope">
// TODO
</template>
</el-table-column>
<el-table-column prop="" :label="$t('加价后成交价')" align="center" width="120px">
<template slot-scope="scope">
// TODO
</template>
</el-table-column>
</el-table>
</el-card>
<el-card class="mt-20">
<work-flow xmlkey="todo"></work-flow>
</el-card>
<div class="mt-20">
<el-button type="primary" @click="$alert('TODO')">提交审核</el-button>
<el-button type="primary" @click="$alert('TODO')">审核中</el-button>
<el-button type="default" @click="$alert('TODO')">取消审核</el-button>
</div>
</div>
</template>
<script>
import {getCurrencyList} from "@/api/ecw/currency";
import {getUnitList} from "@/api/ecw/unit";
import selector from '@/components/Selector'
import {getChannelList} from "@/api/ecw/channel";
import {getCabinetPage} from "@/api/ecw/cabinet";
import {getWarehouseList} from "@/api/ecw/warehouse";
import {getSupplierPage} from "@/api/ecw/supplier";
import {boxGoodsDetail, getSectionList} from "@/api/ecw/boxSea";
import {getAbnormalList, getbox, getLogList} from "@/api/ecw/box";
import {getTotlContent} from "@/views/ecw/box/shippingSea/utils";
import WorkFlow from "@/components/WorkFlow";
export default {
name: "batchMarkup",
components: {selector, WorkFlow},
data(){
return {
unitList:[],
currencyList:[],
form:{},
orderList:[],
// 表格多选
multipleSelection: [],
// 选择的id
ids: [],
channelList:[],
cabinetList:[],
sectionList:[],
// warehouseList:[],
// allSupplier:[]
shipmentObj: null,
shipmentId: null,
// 当前选择的部分
sectionId: 0
}
},
computed:{
/* 渠道 */
getShipChannelName() {
return (shippingChannelId) => {
let item = this.channelList.find(item => item.channelId == shippingChannelId)
if(!item) return ''
return this.$l(item, "name");
};
},
/* 获取柜型 */
getCabinetLabel() {
return (cabinetId) => {
return this.cabinetList.find(item => item.id == cabinetId)?.name
};
},
/* 总计 */
getBoxSum() {
return (boxStatistics) => {
if (boxStatistics) {
return this.$t("{num}箱 {volume}m³ {weight}kg", {
num: boxStatistics.num ?? 0,
volume: boxStatistics.volume ?? 0,
weight: boxStatistics.weight ?? 0,
});
}
return;
};
},
/* 获取仓库 */
getCityName() {
return (id) => {
let arr = this.warehouseList.filter((item) => item.id == id);
return arr.length > 0 ? this.$l(arr[0], "title") : this.$t("");
};
},
// 部分信息
getSectionInfo() {
const { totalStatistics, secStatistics } = this.sectionObj;
if (!this.sectionId) {
return getTotlContent(totalStatistics);
} else {
return getTotlContent(secStatistics);
}
},
},
created() {
getUnitList().then(res => this.unitList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
this.shipmentId = this.$route.query.shipmentId
if(!this.shipmentId){
return this.$message.error('请求参数错误')
}
this.initData()
this.getSectionList()
this.getBoxDetail()
},
methods:{
// 检查正数
checkPositive(object, field){
const lastChar = object[field].split('').pop()
object[field] = parseFloat(object[field])
if(isNaN(object[field]) || object[field] < 0) object[field] = ''
else object[field] = object[field].toString()
// 如果最后一位是.且没有其他点则补上
if(object[field] != '' && object[field].indexOf('.') == -1 && lastChar == '.') object[field] += '.'
},
// 表格多选
handleSelectionChange(selection) {
this.multipleSelection = selection
this.ids = selection.map(item => item.orderId)
},
// 初始化字典数据
initData() {
// 查询渠道
getChannelList().then((res) => (this.channelList = res.data));
// 查询柜型
getCabinetPage(null).then(
(response) => (this.cabinetList = response.data.list)
);
// 仓库
getWarehouseList().then((r) => {
this.warehouseList = r.data;
});
/*// 供应商
getSupplierPage({ pageNo: "1", pageSize: "10000" }).then((res) => {
const { data } = res;
this.allSupplier = data.list;
});*/
},
// 出货信息
getBoxDetail() {
getbox(this.shipmentId).then((res) => {
const { data } = res;
this.shipmentObj = data ?? {};
});
},
// 查询详情页所有数据
getSectionList() {
let param = { shipmentId: this.shipmentId };
// 部分
getSectionList(param).then((res) => {
this.sectionList = res.data.map((item, index) => {
return {
...item,
title: this.$t("第{index}部分", { index: index + 1 }),
};
});
});
},
/* 跳转订单详情 */
jumpOrderDetail(row) {
this.$router.push({
path: "/order/detail",
query: { orderId: row.orderId },
});
},
// 部分切换
sectionChange() {
this.getBoxGoodsDetail();
},
// 获取部分详情以及物品
getBoxGoodsDetail() {
boxGoodsDetail({
shipmentId: this.shipmentId,
secId: this.sectionId,
}).then((res) => {
this.sectionObj = res.data;
});
},
}
}
</script>
<style scoped>
</style>
...@@ -94,11 +94,13 @@ ...@@ -94,11 +94,13 @@
<el-dropdown trigger="click" @command="(command) => handleCommand(scope.row, command)"> <el-dropdown trigger="click" @command="(command) => handleCommand(scope.row, command)">
<el-button type="primary"> {{ $t('操作') }}<i class="el-icon-arrow-down el-icon--right"></i> </el-button> <el-button type="primary"> {{ $t('操作') }}<i class="el-icon-arrow-down el-icon--right"></i> </el-button>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item command="edit">{{ $t('编辑') }}</el-dropdown-item> <el-dropdown-item command="edit">{{$t('编辑')}}</el-dropdown-item>
<el-dropdown-item command="air">{{ $t('操作') }}-{{ $t('空运') }}</el-dropdown-item> <el-dropdown-item command="air">{{$t('操作')}}-{{$t('空运')}}</el-dropdown-item>
<el-dropdown-item command="error">{{ $t('异常登记') }}</el-dropdown-item> <el-dropdown-item command="error">{{$t('异常登记')}}</el-dropdown-item>
<el-dropdown-item command="cost">{{ $t('费用登记') }}</el-dropdown-item> <el-dropdown-item command="cost">{{$t('费用登记')}}</el-dropdown-item>
<el-dropdown-item command="delete">{{ $t('删除') }}</el-dropdown-item> <el-dropdown-item command="batchMarkup">{{$t('批量加价')}}</el-dropdown-item>
<el-dropdown-item command="delete">{{$t('删除')}}</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</template> </template>
...@@ -402,12 +404,15 @@ export default { ...@@ -402,12 +404,15 @@ export default {
break break
case 'delete': case 'delete':
this.handleDelete(row) this.handleDelete(row);
break break;
case 'batchMarkup':
this.$router.push('batch_markup?shipmentId=' + row.id)
} }
},
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -145,6 +145,34 @@ ...@@ -145,6 +145,34 @@
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-card class="card" v-if="[3].indexOf(+order.transportId) > -1">
<el-descriptions class="mr-10" border :title="$t('空运专线')" :column="2" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
<el-descriptions-item :label="$t('是否双清')">
<dict-tag :type="DICT_TYPE.ECW_DOUBLE_CLEAR" :value="order.doubleClear" />
</el-descriptions-item>
<el-descriptions-item :label="$t('航空公司')">
{{ order.airlineCompany }}
</el-descriptions-item>
<el-descriptions-item :label="$t('清关证书')">
{{order.isSingleTicketTransport? this.$t('是'):this.$t('否')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('清关证书备注')">
{{ order.clearCertRemark }}
</el-descriptions-item>
<el-descriptions-item :label="$t('是否拆包')">
{{order.isUnpack? this.$t('是'):this.$t('否')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('单票立刻转运')">
{{order.isSingleTicketTransport? this.$t('是'):this.$t('否')}}
</el-descriptions-item>
<el-descriptions-item :label="$t('特殊要求')">
<dict-tag :type="DICT_TYPE.ORDER_SPECIAL_NEEDS" :value="order.packageTypeArr" />
</el-descriptions-item>
<el-descriptions-item :label="$t('特殊要求备注')">
{{order.packageRemarks}}
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card class="card"> <el-card class="card">
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane :label="$t('货物详情')" name="first"> <el-tab-pane :label="$t('货物详情')" name="first">
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="form" :model="form" :rules="rules" label-position="left" inline> <el-form ref="form" :model="form" :rules="rules" label-position="left" inline :disabled="updateChannel">
<el-card v-if="form.applyStatus == 1" class="mb-10"> <el-card v-if="form.applyStatus == 1" class="mb-10">
<div slot="header" class="card-title">{{$t('以下信息修改审核中')}}</div> <div slot="header" class="card-title">{{$t('以下信息修改审核中')}}</div>
<el-table :data="form.applyInfoList"> <el-table :data="form.applyInfoList">
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> --> <!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact"> <div class="contact">
<el-input v-model="form.consignorName" placeholder="" :disabled2="inWarehouse"/> <el-input v-model="form.consignorName" placeholder="" :disabled2="inWarehouse"/>
<img src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignor'" /> <img v-if="!updateChannel" src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignor'" />
<img src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='0'" /> <img v-if="!updateChannel" src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='0'" />
</div> </div>
</el-form-item> </el-form-item>
<!-- v1.7新增 --> <!-- v1.7新增 -->
...@@ -57,8 +57,8 @@ ...@@ -57,8 +57,8 @@
<!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> --> <!-- <customer-contact-selector v-model="form.consignorContactsId" @change="consignorContact = $event" type="1" /> -->
<div class="contact"> <div class="contact">
<el-input v-model="form.consigneeName" placeholder="" :disabled2="inWarehouse"/> <el-input v-model="form.consigneeName" placeholder="" :disabled2="inWarehouse"/>
<img src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignee'" /> <img v-if="!updateChannel" src="@/assets/images/phonebook.png" class="phonebook" @click="contactChooseType='consignee'" />
<img src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='1'" /> <img v-if="!updateChannel" src="@/assets/images/new_customer.png" class="phonebook" @click="quickCreateType='1'" />
</div> </div>
</el-form-item> </el-form-item>
<!-- v1.7新增 --> <!-- v1.7新增 -->
...@@ -89,18 +89,20 @@ ...@@ -89,18 +89,20 @@
</el-form-item> </el-form-item>
<el-form-item :label="$t('出货渠道')" prop="channelId" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'"> <el-form-item :label="$t('出货渠道')" prop="channelId" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass == 'channel'">
<!--嵌套一个form来脱离disabled控制-->
<el-form>
<selector <selector
:disabled2="inWarehouse || getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, form.transportId).cssClass != 'channel'"
v-model="form.channelId" v-model="form.channelId"
:options="channelList" :options="channelList"
value-field="channelId" value-field="channelId"
:label-field="$l(null, 'name')" :label-field="$l(null, 'name')"
></selector> ></selector>
</el-form>
</el-form-item> </el-form-item>
</div> </div>
<div class="form-section"> <div class="form-section">
<el-form-item :label="$t('始发城市')" prop="departureId"> <el-form-item :label="$t('始发城市')" prop="departureId" :disabled="false">
<el-select v-model="form.departureId" :placeholder="$t('请选择始发地')" :disabled2="inWarehouse"> <el-select v-model="form.departureId" :placeholder="$t('请选择始发地')" :disabled="false">
<el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option> <el-option v-for="item in exportCityList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -114,16 +116,39 @@ ...@@ -114,16 +116,39 @@
<el-form-item :label="$t('选择线路')" prop="lineId"> <el-form-item :label="$t('选择线路')" prop="lineId">
<el-input :value="selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''" disabled :placeholder="$t('请在右侧选择线路')"></el-input> <el-input :value="selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''" disabled :placeholder="$t('请在右侧选择线路')"></el-input>
</el-form-item> </el-form-item>
<select size="5" v-model="form.lineId" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px" :disabled2="inWarehouse"> <!--select是原生组件,不受el-form的disabled控制-->
<option v-for="item in routerList" :value="item.id" :key="item.id">{{$l(item, 'startTitle')}} >> {{$l(item, 'destTitle')}}</option> <select size="5" v-model="form.lineId" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px">
<option v-for="item in routerList" :value="item.id" :key="item.id">
{{$l(item, 'startTitle')}} >> {{$l(item, 'destTitle')}}
(<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportType"></dict-tag>)
</option>
</select> </select>
</div> </div>
<!--目的港清关:选择专线空运才显示,默认选中我司
我司选中后,按钮下方显示“多票”和“单票”的操作,默认选中多票。
客户选中后,按钮下方显示“单票”的操作,默认选中,无需点击-->
<div class="form-section" v-if="form.transportId == 3">
<el-form-item :label="$t('目的港清关')">
<el-radio-group v-model="form.portDestCustomsClear">
<el-radio :label="1">{{$t('我司')}}</el-radio>
<el-radio :label="2">{{$t('客户')}}</el-radio>
</el-radio-group>
</el-form-item>
</div>
<div class="form-section" v-if="form.transportId == 3">
<el-form-item :label="$t('发货方式')">
<el-radio-group v-model="form.deliveryWay">
<el-radio :label="1" v-if="form.portDestCustomsClear == 1">{{$t('多票')}}</el-radio>
<el-radio :label="2">{{$t('单票')}}</el-radio>
</el-radio-group>
</el-form-item>
</div>
</el-card> </el-card>
<el-card class="mt-10"> <el-card class="mt-10">
<div slot="header" class="card-title"> <div slot="header" class="card-title">
<div class="card-name">{{$t('商品信息')}}</div> <div class="card-name">{{$t('商品信息')}}</div>
<el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!canAddProduct || !productEditable">{{$t('添加货物')}}</el-button> <el-button type="primary" size="mini" @click="addProduct(null)" :disabled="!canAddProduct || !productEditable || updateChannel">{{$t('添加货物')}}</el-button>
<el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!canAddProduct || !productEditable">{{$t('批量添加货物')}}</el-button> <el-button type="primary" size="mini" @click="showBatchImportDialog=true" :disabled="!canAddProduct || !productEditable || updateChannel">{{$t('批量添加货物')}}</el-button>
</div> </div>
<el-table :data="form.orderItemVOList" border class="product-list" v-if="!initing"> <el-table :data="form.orderItemVOList" border class="product-list" v-if="!initing">
<el-table-column :label="$t('序号')" width="60px" fixed> <el-table-column :label="$t('序号')" width="60px" fixed>
...@@ -275,7 +300,7 @@ ...@@ -275,7 +300,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')" width="80px" fixed="right"> <el-table-column :label="$t('操作')" width="80px" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="danger" @click="delProduct(scope.$index)" :disabled="!productEditable">{{$t('删除')}}</el-button> <el-button size="mini" type="danger" @click="delProduct(scope.$index)" :disabled="!productEditable || updateChannel">{{$t('删除')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -443,7 +468,7 @@ ...@@ -443,7 +468,7 @@
<dict-selector v-model="form.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" defaultable :disabled="false" /> <dict-selector v-model="form.customsClearCert" form-type="radio" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" defaultable :disabled="false" />
</el-form-item> </el-form-item>
<el-form-item :label="$t('清关证书备注')" > <el-form-item :label="$t('清关证书备注')" >
<el-input v-model="form.remarks" :disabled="false"></el-input> <el-input v-model="form.customsClearCertRemarks" :disabled="false"></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div v-if="[3,4].indexOf(+form.transportId) > -1"> <div v-if="[3,4].indexOf(+form.transportId) > -1">
...@@ -472,7 +497,7 @@ ...@@ -472,7 +497,7 @@
<work-flow xmlkey="order_modify" v-model="ccIdArr" /> <work-flow xmlkey="order_modify" v-model="ccIdArr" />
</el-card> </el-card>
<el-form-item label="" style="margin: 30px 0"> <el-form label="" style="margin: 30px 0">
<template v-if="form.applyStatus == 1"> <template v-if="form.applyStatus == 1">
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">{{$t('审核中')}}</el-button> <el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + form.formId)">{{$t('审核中')}}</el-button>
</template> </template>
...@@ -482,7 +507,7 @@ ...@@ -482,7 +507,7 @@
<el-button type="primary" @click="submitForm(2)" v-else>{{$t('编辑订单')}}</el-button> <!--修改--> <el-button type="primary" @click="submitForm(2)" v-else>{{$t('编辑订单')}}</el-button> <!--修改-->
</template> </template>
<el-button @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button> <el-button @click="$store.dispatch('tagsView/delCurrentView')">{{$t('返回')}}</el-button>
</el-form-item> </el-form>
</el-form> </el-form>
<el-dialog :title="$t('批量导入')" :visible.sync="showBatchImportDialog" width="1000px" :close-on-click-modal="false"> <el-dialog :title="$t('批量导入')" :visible.sync="showBatchImportDialog" width="1000px" :close-on-click-modal="false">
...@@ -615,7 +640,8 @@ export default { ...@@ -615,7 +640,8 @@ export default {
quickCreateType: null, // 快速新建客户类型,1发货人,2收货人 quickCreateType: null, // 快速新建客户类型,1发货人,2收货人
showWorkFlow: false, // 是否显示工作流表单 showWorkFlow: false, // 是否显示工作流表单
calculating: false, // 是否正在计算费用,防止频繁重新请求 calculating: false, // 是否正在计算费用,防止频繁重新请求
initing: true, // 初始化中 initing: true, // 初始化中,
updateChannel: false // 是否更新渠道
}; };
}, },
computed:{ computed:{
...@@ -819,6 +845,11 @@ export default { ...@@ -819,6 +845,11 @@ export default {
this.$set(this.form, 'channelId', null) this.$set(this.form, 'channelId', null)
} }
// 如果是专线空运默认目的港清关选择我司
if(transportId == 3){
this.$set(this.form, 'portDestCustomsClear', 1)
}
this.getOpenedRouterList() this.getOpenedRouterList()
}, },
'form.channelId'(){ 'form.channelId'(){
...@@ -831,6 +862,7 @@ export default { ...@@ -831,6 +862,7 @@ export default {
} }
this.$set(this.form, 'departureId', router.startCityId) this.$set(this.form, 'departureId', router.startCityId)
this.$set(this.form, 'objectiveId', router.destCityId) this.$set(this.form, 'objectiveId', router.destCityId)
this.$set(this.form, 'transportId', router.transportType)
this.calculationPrice() this.calculationPrice()
}, },
...@@ -862,6 +894,17 @@ export default { ...@@ -862,6 +894,17 @@ export default {
this.$set(this.form, 'drawee', isCargoControl ? 2 : 2) this.$set(this.form, 'drawee', isCargoControl ? 2 : 2)
} }
}, },
// 目的港清关,1我司,2客户
'form.portDestCustomsClear'(portDestCustomsClear){
// 我司默认多票
if(portDestCustomsClear == 1){
this.$set(this.form, 'deliveryWay', 1)
}
// 客户默认单票
if(portDestCustomsClear == 2){
this.$set(this.form, 'deliveryWay', 2)
}
},
/* 'form.orderItemVOList'(){ /* 'form.orderItemVOList'(){
console.log('form.orderItemVOList', this.form.orderItemVOList.length, this.form.orderItemVOList) console.log('form.orderItemVOList', this.form.orderItemVOList.length, this.form.orderItemVOList)
}, */ }, */
...@@ -882,12 +925,24 @@ export default { ...@@ -882,12 +925,24 @@ export default {
if(!enable && this.form.harvestMethod != 1){ if(!enable && this.form.harvestMethod != 1){
this.form.harvestMethod = 1 this.form.harvestMethod = 1
} }
},
// 变更渠道需要显示工作流组件
updateChannel(updateChannel){
if(updateChannel){
this.$set(this, 'showWorkFlow', true)
}
} }
}, },
activated(){ activated(){
if(this.$route.query.id != this.form.id){ if(this.$route.query.id != this.form.id){
this.getOrder() this.getOrder()
} }
if(this.$route.query.transportType != this.transportId){
this.set(this.form.transportId, +this.$route.query.transportType)
}
// 变更出货渠道
this.updateChannel = this.$route.query.updateChannel == 1
}, },
async created() { async created() {
...@@ -904,7 +959,13 @@ export default { ...@@ -904,7 +959,13 @@ export default {
value: 2 // 1 发货人,2收货人,默认收货人,可修改 value: 2 // 1 发货人,2收货人,默认收货人,可修改
}) })
}) })
if(this.$route.query.transportType){
this.$set(this.form, 'transportId', +this.$route.query.transportType)
}
// 变更出货渠道
if(this.$route.query.updateChannel){
this.updateChannel = true
}
if(this.$route.query.id){ if(this.$route.query.id){
this.getOrder() this.getOrder()
}else{ }else{
......
...@@ -112,6 +112,10 @@ ...@@ -112,6 +112,10 @@
<el-option :label="$t('海外仓')" :value="2"></el-option> <el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!--空运多一个出货渠道筛选-->
<el-form-item :label="$t('出货渠道')" prop="channelId" v-if="channelList.length">
<selector :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelId"></selector>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">{{$t('搜索')}}</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-button icon="el-icon-refresh" @click="resetQuery">{{$t('重置')}}</el-button>
...@@ -120,7 +124,7 @@ ...@@ -120,7 +124,7 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5" v-if="transportId">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
v-hasPermi="['ecw:order:create']">{{$t('新增')}}</el-button> v-hasPermi="['ecw:order:create']">{{$t('新增')}}</el-button>
</el-col> </el-col>
...@@ -335,6 +339,13 @@ ...@@ -335,6 +339,13 @@
<el-dropdown-item @click.native="showMergedLogOrderNo=scope.row.orderNo" v-hasPermi="['ecw:order:merge_log']">{{$t('合单日志')}}</el-dropdown-item> <el-dropdown-item @click.native="showMergedLogOrderNo=scope.row.orderNo" v-hasPermi="['ecw:order:merge_log']">{{$t('合单日志')}}</el-dropdown-item>
<el-dropdown-item @click.native="showPickupLogOrderNo=scope.row.orderNo" v-hasPermi="['ecw:order:split_log']">{{$t('提货日志')}}</el-dropdown-item> <el-dropdown-item @click.native="showPickupLogOrderNo=scope.row.orderNo" v-hasPermi="['ecw:order:split_log']">{{$t('提货日志')}}</el-dropdown-item>
</template> </template>
<!--变更出货渠道-->
<template v-if="(
scope.row.transportId == 3
)">
<el-dropdown-item @click.native="handleUpdate(scope.row, true)" v-hasPermi="['ecw:order:update_channel']">{{$t('变更出货渠道')}}</el-dropdown-item>
</template>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
...@@ -516,6 +527,7 @@ import PickupLog from './components/PickupLog' ...@@ -516,6 +527,7 @@ import PickupLog from './components/PickupLog'
import {getWarehouseList} from '@/api/ecw/warehouse' import {getWarehouseList} from '@/api/ecw/warehouse'
import { getCurrencyPage } from "@/api/ecw/currency"; import { getCurrencyPage } from "@/api/ecw/currency";
import SplitRevoke from "@/views/ecw/order/components/SplitRevoke"; import SplitRevoke from "@/views/ecw/order/components/SplitRevoke";
import {getChannelList} from "@/api/ecw/channel";
export default { export default {
name: "EcwOrderIndex", name: "EcwOrderIndex",
components: { components: {
...@@ -590,6 +602,8 @@ export default { ...@@ -590,6 +602,8 @@ export default {
statistics: null ,// 统计数据 statistics: null ,// 统计数据
splitRevokeOrderId: null, // 撤销拆单的订单ID splitRevokeOrderId: null, // 撤销拆单的订单ID
// 渠道列表,空运需要渠道筛选
channelList:[]
}; };
}, },
watch:{ watch:{
...@@ -638,9 +652,9 @@ export default { ...@@ -638,9 +652,9 @@ export default {
} }
return queryParams return queryParams
}, },
batchWarehouseAdjustment(){ /*batchWarehouseAdjustment(){
return this.multipleSelection.length > 0 && this.multipleSelection.every(e => e.status === 5) return this.multipleSelection.length > 0 && this.multipleSelection.every(e => e.status === 5)
}, },*/
include(){ include(){
return (state, arr) => { return (state, arr) => {
return arr.indexOf(state) > -1 return arr.indexOf(state) > -1
...@@ -663,8 +677,13 @@ export default { ...@@ -663,8 +677,13 @@ export default {
getWarehouseList().then(res => this.warehouseList = res.data) getWarehouseList().then(res => this.warehouseList = res.data)
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list) getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
// 如果是空运(专线空运和海空联运)则获取渠道
if(this.transportId == 3 || this.transportId == 4){
getChannelList().then(res => this.channelList = res.data)
}
}, },
methods: { methods: {
// 取消拆单申请 // 取消拆单申请
splitRevoke(row){ splitRevoke(row){
this.splitRevokeOrderId = row.orderId this.splitRevokeOrderId = row.orderId
...@@ -826,11 +845,15 @@ export default { ...@@ -826,11 +845,15 @@ export default {
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.$router.push('create') this.$router.push('create?transportType=' + this.transportId)
}, },
/** 修改按钮操作 */ /** 修改按钮操作, updateChannel表示变更出货渠道 */
handleUpdate(row) { handleUpdate(row, updateChannel = false) {
this.$router.push('edit?id=' + row.orderId) let url = 'edit?id=' + row.orderId
if(updateChannel){
url += "&updateChannel=1"
}
this.$router.push(url)
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
......
<!--空运待出列表-->
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item :label="$t('编号')" prop="orderNo">
<el-input v-model="queryParams.numberKey" :placeholder="$t('请输入订单号、唛头、提单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('发货人')" prop="consignorKey">
<el-input v-model="queryParams.consignorKey" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('收货人')" prop="consigneeKey">
<el-input v-model="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="">
<dict-selector :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" :filter="(item) => item.value != 'PickTime'" v-model="dateFilterType" defaultable style="width: 150px; margin-right: 5px" />
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
value-format="yyyy-MM-dd HH:mm:ss"
@change="handleQuery"
>
</el-date-picker>
</el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发仓')" clearable @change="handleQuery">
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的仓')" clearable @change="handleQuery">
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<!--<el-form-item :label="$t('运输方式')" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model.number="queryParams.transportId" clearable @change="handleQuery"/>
</el-form-item>-->
<el-form-item :label="$t('商品')" prop="tidanNo">
<el-input v-model="queryParams.prodKey" :placeholder="$t('请输入商品类型、品名或品牌')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('控货')" prop="isCargoControl">
<dict-selector v-model="queryParams.isCargoControl" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" clearable />
</el-form-item>
<el-form-item :label="$t('入仓类型')" prop="warehouseType">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="queryParams.warehouseType" clearable/>
</el-form-item>
<el-form-item :label="$t('客户经理')" >
<user-selector manage v-model="queryParams.salesmanId" clearable @change="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('订单状态')" prop="status">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"
@keyup.enter.native="handleQuery" clearable />
</el-form-item>
<el-form-item :label="$t('报关方式')" prop="customsType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('是否齐货')" >
<!--// 字段存疑-->
<dict-selector v-model="queryParams.isNeat" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" clearable @change="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('备案属性')" prop="productRecord">
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" v-model="queryParams.productRecord" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('快递单号')" prop="number">
<el-input v-model="queryParams.number" :placeholder="$t('快递单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('外部仓')" prop="number">
<el-select v-model="queryParams.isExternalWarehouse" :placeholder="$t('请选择')" clearable @change="handleQuery">
<el-option :label="$t('外部仓')" :value="1"></el-option>
<el-option :label="$t('自有仓')" :value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('异常状态')" prop="status">
<dict-selector :type="DICT_TYPE.ORDER_ABNORMAL_STATE" v-model="queryParams.abnormalState"
@keyup.enter.native="handleQuery" clearable />
</el-form-item>
<el-form-item :label="$t('审核状态')" prop="status">
<dict-selector :type="DICT_TYPE.ECW_ORDER_APPROVAL_TYPE" v-model="queryParams.auditType"
@keyup.enter.native="handleQuery" clearable />
</el-form-item>
<el-form-item :label="$t('订单类型')" prop="number">
<el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable >
<el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="number">
<selector :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelId"></selector>
</el-form-item>
<el-form-item>
<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 :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-col>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo" >
<template slot-scope="scope">
<router-link :to="{path: '/order/detail',query: {orderId: scope.row.orderId}}" class="link-type">
<span>{{ scope.row.orderNo }}</span>
</router-link>
<div style="display: flex;flex-wrap: wrap;" v-if="scope.row.advanceType">
<el-button @click="deleteSpecial(item.value,scope.row.orderId)" size="mini" style="margin-left: 20px" type="danger" circle v-for="(item,index) in specialRendering(scope.row.advanceType)" :key="index">{{item.label[0]}}</el-button>
</div>
</template>
</el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('总箱数/入仓箱数')" align="center" prop="sumNum">
<template slot-scope="{row}">
<div :style="{color:row.customsType != 1 ? 'red' : null}">{{row.totalNum}}{{$t('')}}/{{row.sumNum}}{{$t('')}}</div>
<dict-tag v-if="row.customsType != 1" style="color:red" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="row.customsType"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('体积/重量')" align="center" prop="sumWeight">
<template slot-scope="{row}">
<!--入仓前是填单数据,入仓后是入仓数据,装柜审核通过等状态inwarehouseState会变成0,所以只能通过sumNum来判断-->
<component
:is="row.orderType == 2 ? 'el-tooltip' : 'div'"
class="item"
:style="{
color: row.orderType == 2 ? 'red' : null
}"
effect="dark"
:content="(row.wvolume||0)+'m³'"
placement="bottom">
<div v-if="row.sumNum > 0">{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</div>
<div v-else>{{row.costVO.totalVolume}}m³ /{{row.costVO.totalWeight}}Kg</div>
</component>
</template>
</el-table-column>
<el-table-column :label="$t('始发仓')" align="center" prop="startWarehouseName">
<template slot-scope="{row}">
{{row.startWarehouseName}}
<span style="color:red" v-if="row.isExternalWarehouse">({{$t('外部仓')}})</span>
</template>
</el-table-column>
<el-table-column :label="$t('运输方式/目的地')" align="center" prop="transportId">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" /> / {{row.dstWarehouseName}}
</template>
</el-table-column>
<el-table-column :label="$t('控货')" align="center" prop="isCargoControl">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="row.isCargoControl" />
</template>
</el-table-column>
<el-table-column :label="$t('订单状态')" align="center" prop="status">
<template slot-scope="scope">
<!-- <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" /> -->
{{scope.row.statusMsg}}
</template>
</el-table-column>
<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="printTagOrderId=scope.row.orderId" v-hasPermi="['ecw:order:peddingList:print_tag']">{{$t('打印标签')}}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList" />
<print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" />
</div>
</template>
<script>
import Selector from '@/components/Selector'
import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import specialNeeds from '@/views/ecw/order/components/specialNeeds';
import {
createOrder,
updateOrder,
deleteOrder,
getOrder,
getOrderPage,
exportOrderExcel,
orderSpecialNeed,
cancelOrder,
recoveryOrder,
getMyOrderPage,
deptOrderPage,
orderStatistics,
orderMyStatistics,
orderDeptStatistics,
orderExportSearch,
orderExportMySearch,
orderExportDeptSearch,
exportAbnormal,
exportHeavyOrder,
exportReturnOrder,
exportSaleRepay,
exportCustomsDatas,
exportShippingDatas,
exportShipFee,
exportUnload
} from "@/api/ecw/order";
import PrintTag from './components/PrintTag'
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
import BatchPickup from './components/BatchPickup'
import withdrawal from "@/views/ecw/order/withdrawal";
import UserSelector from '@/components/UserSelector'
import BatchSingleApplication from "@/views/ecw/order/batchSingleApplication";
import FeeApplication from "@/views/ecw/order/feeApplication";
import MergeLog from '@/views/ecw/order/components/MergeLog'
import PickupLog from './components/PickupLog'
import {getWarehouseList} from '@/api/ecw/warehouse'
import { getCurrencyPage } from "@/api/ecw/currency";
import SplitRevoke from "@/views/ecw/order/components/SplitRevoke";
import {getChannelList} from "@/api/ecw/channel";
export default {
name: "EcwPeddingList",
components: {
UserSelector,
FeeApplication,
BatchSingleApplication,
MergeLog,
PickupLog,
SplitRevoke,
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill, BatchPickup,withdrawal
},
data() {
return {
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 遮罩层
loading: true,
// 总条数
total: 0,
// 订单列表
list: [],
// 查询参数
queryParams: {
page: 1,
rows: 10
},
warehouseList:[],
productAttrList: [], // 商品属性
molecule: '', //重货比分子
denominator: '', //重货比分母
dateFilterType: '', //日期筛选类别
dateFilter: [], //筛选日期
printTagOrderId: null, // 显示打印标签的订单ID
isShow:false,//特殊显示
multipleSelection:[],
params: {
page: 1,
rows: 20,
},
currencyList:[],
channelList:[]
};
},
watch:{
isChinese(){
this.getList()
}
},
computed: {
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
exportWarehouseList(){
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
combinedQueryParams(){
let timeParams = {}
if(this.dateFilterType && this.dateFilter){
timeParams['begin' + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1]
}
let queryParams = Object.assign({}, this.queryParams, timeParams)
return queryParams
}
},
activated(){
this.getList()
},
created() {
this.getList();
getProductAttrList().then(res => this.productAttrList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data)
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
getChannelList().then(res => this.channelList = res.data)
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 执行查询
getOrderPage(this.combinedQueryParams).then(response => {
// 部分情况下,订单后面的操作下拉菜单会显示按钮,但是下来没有选项,在elTable组件更新的时候会导致渲染错误,所以要在更新渲染前清空一次list让table彻底重新渲染,避免部分更新导致异常
this.list = []
this.$nextTick(() => {
this.list = response.data.list
})
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.$nextTick(this.getList)
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
page: 1,
rows: 10
}
this.dateFilter = []
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.$router.push('create')
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$router.push('edit?id=' + row.orderId)
},
// 表格多选
handleSelectionChange(selection) {
this.multipleSelection = selection
this.ids = selection.map(item => item.orderId)
this.single = selection.length !== 1
this.multiple = !selection.length
}
}
};
</script>
<style lang="scss" scoped>
::v-deep .actions{
.el-dropdown{
margin-right: 10px;
&:last-child {
margin-right: 0;
}
}
}
</style>
...@@ -290,9 +290,9 @@ ...@@ -290,9 +290,9 @@
<el-form-item v-if="mainOrderItem.orderItemId"> <el-form-item v-if="mainOrderItem.orderItemId">
<div>{{$t('剩余货值')}}:{{ mainOrderItem.worth || 0 }}{{ $t('美元') }}</div> <div>{{$t('剩余货值')}}:{{ mainOrderItem.worth || 0 }}{{ $t('美元') }}</div>
</el-form-item> </el-form-item>
<el-form-item :label="$t('放货值')"> <el-form-item :label="$t('放货值')">
<el-input-number v-model="shopForm.worth" controls-position="right" :min="0" :max="mainOrderItem.worth"> <el-input-number v-model="shopForm.worth" controls-position="right" :min="0" :max="mainOrderItem.worth">
<template slot="append">{{ $t('') }}</template> <template slot="append">{{ $t('') }}</template>
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
<el-form-item :label="$t('备注信息')+':'"> <el-form-item :label="$t('备注信息')+':'">
......
<template>
<div style="display: inline-block;margin-right: 10px">
<el-button size="mini" @click="visible = true" type="text">{{ title }}</el-button>
<el-dialog
:title="title + ' - ' + warehousing.orderNo"
:visible.sync="visible"
width="1280px"
>
<el-tabs v-model="activeName" type="card">
<el-tab-pane :label="edit ? $t('货物修改') : $t('货物入仓')" name="first">
<el-form ref="form" :model="form" :rules="formRules" label-width="80px">
<el-descriptions border :column="2">
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<span style="min-width: 200px;margin-right: 15px;display: inline-block">
<product-selector v-if="!order.parentOrderId && !isAdd" v-model="form.prodId" @change="onProductChange" determined/>
<span v-else>{{ warehousing.prodTitleZh }}</span>
</span>
<el-button v-if="!order.parentOrderId && !isAdd" type="text" @click="isShowProduct = true">添加新商品</el-button>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
<product-selector v-if="!order.parentOrderId && !isAdd" lang="En" v-model="form.prodId" @change="onProductChange" determined/>
<span v-else>{{ warehousing.prodTitleEn }}</span>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template>
<el-form-item required label="" prop="brand" label-width="0">
<el-select
v-model="form.brand"
:placeholder="$t('可修改')"
filterable
remote
@change="handleBrandChange"
:remote-method="getProductBrandPage"
clearable>
<el-option
v-for="item in brandList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('是否备案')">
<template slot="label"><span style="color: red">*</span>{{ $t('是否备案') }}</template>
{{ isBeian }}
</el-descriptions-item>
<el-descriptions-item :label="$t('收费模式')">
<template slot="label"><span style="color: red">*</span>{{ $t('收费模式') }}</template>
{{ feeType }}
</el-descriptions-item>
<el-descriptions-item :label="$t('填单参数')">{{ $t('箱数:') }}<el-input size="mini" v-if="edit" v-model="warehousing.num" style="display: inline-block;width: 100px"></el-input>
<span v-else>{{ warehousing.num }}</span><br>{{ $t('体积:') }}<el-input size="mini" v-if="edit" v-model="warehousing.volume" style="display: inline-block;width: 100px"></el-input>
<span v-else>{{ warehousing.volume }}</span><br>{{ $t('重量:') }}<el-input size="mini" v-if="edit" v-model="warehousing.weight" style="display: inline-block;width: 100px"></el-input>
<span v-else>{{ warehousing.weight }}</span>Kg
</el-descriptions-item>
</el-descriptions>
<el-row>
<el-col :span="8">
<el-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material" clearable></dict-selector>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('入仓特性')" style="margin-top: 20px">
<el-checkbox-group v-model="form.prodAttrIds">
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('入仓时间')" v-if="!edit">
<el-date-picker v-model="form.inTime" type="datetime" :placeholder="$t('请选择入仓时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{ $t('入仓记录') }}</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete" :disabled="form.table.length < protectRowCount"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button>
</div>
<el-form ref="tableForm" :rules="tableFormRules" :model="form" size="mini">
<el-table
:data="form.table"
style="width: 100%">
<el-table-column :label="$t('箱数')" width="150px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('箱数') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.cartonsNum">
<el-input v-model="form.table[$index].cartonsNum" placeholder="" @blur="handleVolume($index)" :disabled="$index < protectRowCount">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, form.table[$index].specificationType) }}</span>
</el-input>
<dict-selector :disabled="$index < protectRowCount" :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="form.table[$index].specificationType" @change="handleVolume($index)"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" width="100px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('包装类型') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<dict-selector :disabled="$index < protectRowCount" :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form.table[$index].unit"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge1">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge2">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge3">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.volume">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].volume" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.weight">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].weight" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('数量')" width="130px">
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.quantityAll">
<el-input :disabled="$index < protectRowCount" v-model.number="form.table[$index].quantityAll" placeholder="">
<template slot="append">{{ $t('') }}</template>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')">
<template v-slot="{r,c,$index}">
<el-form-item>
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].expressNo" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }">
<warehouse-area-select
v-if="visible"
v-model="form.table[$index].orderLocationBackVOList"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="form.table[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<el-popconfirm
v-if="$index >= protectRowCount"
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
<el-tab-pane :label="$t('添加新品名')" name="second" v-if="!edit">
<el-form ref="form1" :model="form1" :rules="formRules" label-width="80px">
<el-descriptions border :column="2">
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<el-form-item required label="" prop="prodId" label-width="0">
<product-selector v-model="form1.prodId" @change="onProductChange1"/>
<el-button type="text" @click="isShowProduct = true" style="margin-left: 15px">添加新商品</el-button>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
<el-form-item required label="" prop="prodId" label-width="0">
<product-selector lang="En" v-model="form1.prodId" @change="onProductChange1"/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template>
<el-form-item required label="" prop="brand" label-width="0">
<el-select
v-model="form1.brand"
:placeholder="$t('可修改')"
filterable
remote
@change="handleBrandChange"
:remote-method="getProductBrandPage1"
clearable>
<el-option
v-for="item in brandList1"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('是否备案')">
<template slot="label"><span style="color: red">*</span>{{ $t('是否备案') }}</template>
{{ isBeian1 }}
</el-descriptions-item>
<el-descriptions-item :label="$t('收费模式')">
<template slot="label"><span style="color: red">*</span>{{ $t('收费模式') }}</template>
{{ feeType1 }}
</el-descriptions-item>
<el-descriptions-item :label="$t('填单参数')">{{ $t('非填单货物') }}</el-descriptions-item>
</el-descriptions>
<el-row>
<el-col :span="8">
<el-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form1.material" clearable></dict-selector>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('入仓特性')" style="margin-top: 20px">
<el-checkbox-group v-model="form1.prodAttrIds">
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('入仓时间')">
<el-date-picker v-model="form1.inTime" type="datetime" :placeholder="$t('请选择入仓时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{ $t('入仓记录') }}</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete(1)"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd(1)"></el-button>
</div>
<el-form ref="tableForm1" :model="form1" :rules="tableFormRules" size="mini">
<el-table
:data="form1.table"
style="width: 100%">
<el-table-column :label="$t('箱数')" width="150px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('箱数') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">
{{ form1.table[$index].cartonsNum }}
{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}
</span>
<el-input v-else v-model="form1.table[$index].cartonsNum" placeholder="">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}</span>
</el-input>
<dict-selector :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="form1.table[$index].specificationType" @change="handleVolume($index, 1)"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" width="100px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('包装类型') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}</span>
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form1.table[$index].unit"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].volume }}</span>
<el-input v-else type="number" v-model="form1.table[$index].volume" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].weight }}</span>
<el-input v-else type="number" v-model="form1.table[$index].weight" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('数量')" width="130px">
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].quantityAll }}</span>
<el-input v-else v-model.number="form1.table[$index].quantityAll" placeholder="">
<template slot="append">{{ $t('') }}</template>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')">
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].expressNo }}</span>
<el-input v-else v-model="form1.table[$index].expressNo" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }">
<warehouse-area-select
v-model="form1.table[$index].orderLocationBackVOList"
:readonly="form1.table[$index].id && !edit"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="form1.table[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<el-popconfirm
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index, 1)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
</el-tabs>
<div v-if="edit && order.status !== 3">
<h2>{{ $t('审批流程') }}</h2>
<work-flow xmlkey="free_apply" v-model="selectedUsers" />
<!-- <div>选择的用户:{{selectedUsers}}</div>-->
</div>
<span slot="footer">
<template v-if="!isEditing">
<el-button @click="handleClose">{{ $t('关 闭') }}</el-button>
<el-button type="primary" @click="handleSubmit()">{{ edit ? $t('确认修改') : $t('提 交') }}</el-button>
</template>
<template v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + formId)">{{ $t('审核中') }}</el-button>
<el-button type="primary" @click="handleCancelProcessInstance">{{ $t('取消审核') }}</el-button>
<el-button @click="handleClose">{{ $t('返回') }}</el-button>
</template>
<template v-else>
</template>
</span>
</el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog title="添加商品" :visible.sync="isShowProduct" width="550px" append-to-body>
<el-form ref="productForm" :model="productForm" :rules="productRules" label-width="110px">
<el-form-item :label="$t('商品类型')" prop="typeId">
<el-select v-model="productForm.typeId" :placeholder="$t('选择商品类型')" clearable>
<el-option v-for="types in typeList" :key="types.id" :label="types.titleZh" :value="types.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('中文标题')" prop="titleZh">
<el-input v-model="productForm.titleZh" :placeholder="$t('请输入中文标题')" />
</el-form-item>
<el-form-item :label="$t('英文标题')" prop="titleEn">
<el-input v-model="productForm.titleEn" :placeholder="$t('请输入英文标题')" />
</el-form-item>
<el-form-item :label="$t('商品特性')" prop="attrArray">
<el-select v-model="productForm.attrArray" :placeholder="$t('选择商品特性')" clearable multiple>
<el-option v-for="attr in attrList" :key="attr.id" :label="attr.attrName" :value="attr.id" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="productSubmit">{{$t('确定')}}</el-button>
<el-button @click="productCancel">{{$t('取消')}}</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import ProductSelector from "@/components/ProductSelector"
import WarehouseAreaSelect from "@/components/WarehouseAreaSelect"
import {getFeeTypeByOrderProduct, getProductBrankPage} from "@/api/ecw/productBrank"
import {cancelProcessInstance} from "@/api/bpm/processInstance"
import WorkFlow from "@/components/WorkFlow"
import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
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"
export default {
name: "Warehouse",
components: {
ProductSelector,
WarehouseAreaSelect,
WorkFlow
},
props: {
title: {
type: String,
default: undefined
},
order: {
type: Object,
default: undefined
},
isJiyun: {
type: Boolean,
default: false
},
// 入仓修改
edit: {
type: Boolean,
default: false
},
orderItemA: {
type: Object,
default: () => {
return {
material: undefined,
inTime: undefined,
orderWarehouseInBackItemDoList: []
}
}
},
orderItemB: {
type: Object,
default: () => {
return {
material: undefined,
inTime: undefined,
orderWarehouseInBackItemDoList: []
}
}
}
},
mounted() {
this.getAttrList()
this.getTypeList()
},
computed: {
isAdd() {
return this.$route.path === "/order/warehousing-add"
},
warehousing(){
return {...this.orderItemA, ...this.orderItemB}
},
orderId(){
return this.order.orderId
},
brandObject(){
return this.brandList.find(e => e.id === this.form.brand) || ''
},
brandObject1(){
return this.brandList.find(e => e.id === this.form1.brand) || ''
},
isBeian(){
if (this.form.recordMode !== undefined){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.form.recordMode]
}
if (this.brandObject.filing){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.brandObject.filing]
} else {
return ''
}
},
isBeian1(){
if (this.form1.recordMode !== undefined){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.form1.recordMode]
}
if (this.brandObject1.filing){
return [this.$t('无备案'), this.$t('有备案'), this.$t('中性')][this.brandObject1.filing]
} else {
return ''
}
},
/**
* 收费模式
* @returns {string} 无牌价0,有牌价1,中性品牌价2
*/
feeType(){
const feeType = this.form.feeType
if (feeType >= 0 && feeType < 3) {
return [this.$t('无牌价'), this.$t('有牌价'), this.$t('中性品牌价')][feeType]
}
return ''
},
feeType1(){
const feeType = parseInt(this.form1.feeType)
if (feeType >= 0 && feeType < 3) {
return [this.$t('无牌价'), this.$t('有牌价'), this.$t('中性品牌价')][feeType]
}
return ''
},
warehouseId(){
return this.order.adjustToDestWarehouseId || this.order?.logisticsInfoDto?.startWarehouseId
}
},
watch: {
visible(val){
if (val) {
this.init()
this.getProductBrandPage(this.warehousing.brandName)
this.getProductBrandPage1()
this.handleBrandChange(parseInt(this.form.brand))
} else {
this.$emit('close')
}
}
},
data(){
return {
DICT_TYPE,
getDictDataLabel,
getDictDatas,
activeName: 'first',
visible: false,
form: {
table: [],
brandType: undefined,
orderId: undefined,
orderNo: undefined,
brand: undefined,
inTime: undefined,
material: undefined,
orderItemId: undefined,
prodAttrIds: [],
prodId: undefined,
prodTitleEn: undefined,
prodTitleZh: undefined,
prodType: undefined,
type: undefined,
feeType: undefined,
recordMode: undefined
},
form1: {
table: [],
brandType: undefined,
orderId: undefined,
orderNo: undefined,
brand: undefined,
inTime: undefined,
material: undefined,
orderItemId: undefined,
prodAttrIds: [],
prodId: undefined,
prodTitleEn: undefined,
prodTitleZh: undefined,
prodType: undefined,
type: 1,
feeType: undefined,
recordMode: undefined
},
brandList: [],
brandList1: [],
formRules: {
prodId: [{required: true, message: this.$t("请选择品名"), trigger: "change"}],
brand: [{required: true, message: this.$t("请选择品牌"), trigger: "change"}],
},
tableFormRules: {
// cartonsNum: [{required: true, message: this.$t("箱数不能为空"), trigger: "change"}],
// boxGauge1: [{required: true, message: this.$t("货物长不能为空"), trigger: "change"}],
// boxGauge2: [{required: true, message: this.$t("货物宽不能为空"), trigger: "change"}],
// boxGauge3: [{required: true, message: this.$t("货物高不能为空"), trigger: "change"}],
// volume: [{required: true, message: this.$t("体积不能为空"), trigger: "change"}],
// weight: [{required: true, message: this.$t("重量不能为空"), trigger: "change"}],
// // quantityAll: [{required: true, message: this.$t("数量不能为空"), trigger: "change"}]
},
selectedUsers: undefined,
// 入仓修改正在审核中
isEditing: false,
// 审批业务id
formId: '',
// 追加时被保护的行数
protectRowCount: -1,
// 添加商品弹窗
isShowProduct: false,
productForm: {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
},
productRules: {
typeId: [{ required: true, message: this.$t("商品类型不能为空"), trigger: "change" }],
// attrArray: [{ required: true, message: this.$t("商品特性不能为空"), trigger: "change" }],
titleZh: [{ required: true, message: this.$t("中文标题不能为空"), trigger: "blur" }],
titleEn: [{ required: true, message: this.$t("英文标题不能为空"), trigger: "blur" }],
},
//类型列表
typeList: [],
// 特性列表
attrList: []
}
},
methods: {
init(){
this.form.brandType = this.warehousing.brandType
this.form.orderId = this.warehousing.orderId
this.form.orderItemId = this.warehousing.orderNo
this.form.orderNo = this.warehousing.orderNo
this.form.brand = this.warehousing.brand
this.form.brandType = this.warehousing.brandType
this.form.inTime = this.warehousing.inTime
this.form.material = this.warehousing.material
this.form.orderId = this.warehousing.orderId
this.form.orderItemId = this.warehousing.orderItemId
this.form.orderNo = this.warehousing.orderNo
this.form.prodAttrIds = this.warehousing.prodAttrIds?.split(',').map(e => +e) || []
this.form.prodId = this.warehousing.prodId
this.form.prodTitleEn = this.warehousing.prodTitleEn
this.form.prodTitleZh = this.warehousing.prodTitleZh
this.form.prodType = this.warehousing.prodType
this.form.type = this.warehousing.type
this.form.feeType = this.warehousing.feeType
this.warehousing.orderWarehouseInBackItemDoList.forEach(e => {
let bg = {}
if (e.boxGauge) {
const boxGauge = e.boxGauge.split('*')
// e.boxGauge1 = boxGauge[0]
// e.boxGauge2 = boxGauge[1]
// e.boxGauge3 = boxGauge[2]
bg = {
boxGauge1: boxGauge[0],
boxGauge2: boxGauge[1],
boxGauge3: boxGauge[2]
}
}
this.form.table.push({...e, ...bg})
})
if (!this.edit){
let protectRowCount = 0
this.protectRowCount = this.form.table.map(e => {
if (e.id){
protectRowCount++
}
})
this.protectRowCount = protectRowCount
this.handleAdd()
this.handleAdd(1)
}
},
handleClose() {
this.visible = false
},
handleVolume(index, val){
setTimeout(() => {
const {boxGauge1, boxGauge2, boxGauge3, specificationType, cartonsNum} = (val === 1 ? this.form1.table : this.form.table)[index]
let result = ''
if (boxGauge1 && boxGauge2 && boxGauge3 && specificationType && cartonsNum) {
result = (((specificationType === 1 || specificationType === '1') ? cartonsNum : 1) * (boxGauge1 * boxGauge2 * boxGauge3) / 1000000 + 0.000001)?.toFixed(2) || ''
} else {
result = ''
}
if (result === '0.00') result = '0.01';
(val === 1 ? this.form1.table : this.form.table)[index].volume = result
}, 0)
},
handleSubmit() {
if (this.activeName !== "first"){
// 添加非填单货物
if (this.form1.prodAttrIds.indexOf(4) !== -1) {
return this.$notify({
title: this.$t('提示'),
message: this.$t("订单包含不接受货物,请检查"),
type: 'warning'
})
}
this.$refs['form1'].validate(valid => {
this.$refs['tableForm1'].validate(valid1 => {
if (!valid || !valid1) {
return
}
return orderWarehouseIn({
...this.form1,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: undefined,
orderNo: this.warehousing.orderNo,
prodAttrIds: this.form.prodAttrIds.join(','),
orderWarehouseInItemDoList: this.form1.table.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
})
}).then(r => {
if (r.data) {
this.$message.success('新增入仓成功')
this.handleClose()
} else {
this.$message.success('新增入仓失败')
}
})
})
})
} else {
if (this.form.prodAttrIds.indexOf(4) !== -1) {
return this.$notify({
title: this.$t('提示'),
message: this.$t("订单包含不接受货物,请检查"),
type: 'warning'
})
}
this.$refs['form'].validate(valid => {
this.$refs['tableForm'].validate(valid1 => {
if (!valid || !valid1) {
return
}
if (this.edit) {
// 入仓修改
return orderWarehouseInUpdateApply({
...this.form,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
num: this.warehousing.num,
volume: (+this.warehousing.volume)?.toFixed(2) || '',
weight: (+this.warehousing.weight)?.toFixed(2) || '',
prodId: this.form.prodId,
prodAttrIds: this.form.prodAttrIds.join(','),
"orderWarehouseInUpdateItemDoList": this.form.table.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
}),
copyUserId: this.selectedUsers
}).then(r => {
if (r.data) {
this.$message.success(r.msg || '入仓修改发起成功')
this.handleClose()
} else {
this.$message.success(r.msg || '入仓修改发起失败')
}
})
} else {
// 首次入仓、入仓补充
return orderWarehouseIn({
...this.form,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
isAppend: this.isAdd ? true : undefined,
prodAttrIds: this.form.prodAttrIds.join(','),
orderWarehouseInItemDoList: this.form.table.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
}),
}).then(r => {
if (r.data) {
this.$message.success('入仓成功')
this.handleClose()
} else {
this.$message.success('入仓失败')
}
})
}
})
})
}
},
handleCancelProcessInstance(){
this.$prompt('请输入取消原因?', this.$t("取消流程"), {
type: 'warning',
confirmButtonText: this.$t("确定"),
cancelButtonText: this.$t("取消"),
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
inputErrorMessage: this.$t("取消原因不能为空"),
}).then(({ value }) => {
cancelProcessInstance(this.formId, value).then(() => {
this.opened = false
this.$modal.msgSuccess("取消成功");
})
})
},
onProductChange(product){
this.form.prodTitleZh = product.titleZh
this.form.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form.brand))
this.form.prodAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : []
},
onProductChange1(product){
this.form1.prodTitleZh = product.titleZh
this.form1.prodTitleEn = product.titleEn
this.handleBrandChange(parseInt(this.form1.brand))
this.form1.prodAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : []
},
getProductBrandPage(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => {
this.brandList = r.data.list
})
},
getProductBrandPage1(titleZh = undefined) {
getProductBrankPage({pageSize: 20, titleZh}).then(r => {
this.brandList1 = r.data.list
})
},
handleBrandChange(v){
getFeeTypeByOrderProduct({
brandId: parseInt(v),
productId: this.warehousing.prodId,
orderId: this.orderId
}).then(r => {
if(r.code === 0){
(this.activeName === "first" ? this.form : this.form1).feeType = parseInt(r.data.feeType);
(this.activeName === "first" ? this.form : this.form1).recordMode = parseInt(r.data.recordMode)
}
})
},
handleDelete(val) {
if (val === 1) {
this.form1.table.pop()
} else if (this.form.table.length > this.protectRowCount) {
this.form.table.pop()
}
},
handleDeleteRow(index, val) {
if (val === 1) {
this.form1.table.splice(index, 1)
} else if (this.form.table.length > this.protectRowCount) {
this.form.table.splice(index, 1)
}
},
handleAdd(val = 0) {
let cartonsNum = ''
if (val !== 1) { // 货物入仓
let hasCartonsNum = 0
this.form.table.forEach(e => {
hasCartonsNum += e.cartonsNum
})
cartonsNum = this.warehousing.num - hasCartonsNum
}
const form = val === 1 ? this.form1 : this.form
const formLength = form.table.length
let orderLocationBackVOList = []
/* // 不默认使用上一条记录的储位 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 : '',
"boxGauge3": this.isJiyun ? 0 : '',
"cartonsNum": cartonsNum > 0 ? cartonsNum : '',
"expressNo": "",
"quantityAll": undefined,
"unit": "1",
"volume": '',
"weight": '',
specificationType: '1',
table: [],
orderLocationBackVOList
})
},
/** 获取产品属性列表 */
getAttrList() {
getProductAttrList().then(response => {
this.attrList = response.data;
})
},
/** 获取产品类型列表 */
getTypeList() {
getProductTypeList().then(response => {
this.typeList = response.data;
})
},
productSubmit(){
this.$refs["productForm"].validate(valid => {
if (!valid) {
return;
}
//商品特性转字符串
this.productForm.attrId = this.productForm.attrArray.join(',')
// 添加的提交
addProduct(this.productForm).then(response => {
this.$modal.msgSuccess(this.$t("新增成功"))
if (this.activeName === 'first') {
this.form.prodId = response.data
this.form.prodAttrIds = this.productForm.attrArray
} else {
this.form1.prodId = response.data
this.form1.prodAttrIds = this.productForm.attrArray
}
this.productCancel()
})
})
},
productCancel(){
this.isShowProduct = false
this.productForm = {
typeId: undefined,
attrArray: [],
titleZh: undefined,
titleEn: undefined
}
}
}
}
</script>
<style scoped>
</style>
<!--备货-->
<template>
<div class="app-container">
<h2>{{ title }}-{{ order.orderNo }}</h2>
<order-base-info :order="order"></order-base-info>
<h2>{{$t('货物信息')}}</h2>
<el-table
v-if="order.orderItemVOList && order.orderItemVOList.length > 0 && orderItemList && orderItemList.length > 0"
:data="order.orderItemVOList || []"
style="width: 100%">
<el-table-column
type="index"
width="50"
:label="$t('序号')">
</el-table-column>
<el-table-column
prop="prodTitleZh"
:label="$t('品名')">
<template v-slot="{row}">
{{ row.prodTitleZh }}<br>
{{ row.prodTitleEn }}
</template>
</el-table-column>
<el-table-column
:label="$t('填单货物属性')">
<template v-slot="{row}">
<span v-if="row.isWarehouseInAdd">{{$t('非填单货物信息')}}</span>
<template v-else>
{{$t('品牌')}}{{ [$t('无牌'), $t('有牌'), $t('中性')][row.brandType] }}<br>
{{$t('箱数')}}{{ row.num }}<br>
{{$t('体积')}}{{ row.volume }}<br>
{{$t('重量')}}{{ row.weight }}Kg
</template>
</template>
</el-table-column>
<el-table-column
:label="$t('入库货物属性')">
<template v-slot="{row}">
<template v-if="row.warehouseInInfoVO">
{{$t('品牌')}}{{ row.brandName }}<br>
{{$t('箱数')}}{{ row.warehouseInInfoVO.cartonsNum }}<br>
{{$t('体积')}}{{ row.warehouseInInfoVO.volume }}<br>
{{$t('重量')}}{{ row.warehouseInInfoVO.weight }}Kg
</template>
<span v-else>{{$t('暂无入仓信息')}}</span>
</template>
</el-table-column>
<el-table-column
prop="expressNo"
v-slot="{row}"
:label="$t('快递单号')">
{{ row.expressNo || (row.warehouseInInfoVO ? row.warehouseInInfoVO.expressNo : '') }}
</el-table-column>
<el-table-column
prop="createTime"
:label="$t('最后操作时间')">
<template v-slot="{row}">
{{ parseTime(row.updateTime) }}
</template>
</el-table-column>
<el-table-column
prop="diffType"
v-slot="{row}"
:label="$t('状态')">
<dict-tag
v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.diffType"
:type="DICT_TYPE.ORDER_WAREHOUSE_IN_STATUS"
:value="row.warehouseInInfoVO.diffType"
class="red"
:class="{green: row.warehouseInInfoVO.diffType === 4}"
/>
<span :class="{red: row.itemStatus === 3}" v-else>{{ row.itemStatus === 3 ? ($t('少了') + row.num + $t('箱')) : $t('待入仓') }}</span>
<span class="red" v-if="row.warehouseInInfoVO && row.warehouseInInfoVO.cartonsNumDiff">{{ row.warehouseInInfoVO.cartonsNumDiff }}{{$t('箱')}}</span>
</el-table-column>
<el-table-column
prop="createTime"
:label="$t('打包状态')">
<template v-slot="{row}">
待完善
</template>
</el-table-column>
<el-table-column
prop="address"
:label="$t('操作')">
<template v-slot="{ row, column, $index }">
<el-button size="mini" type="warning" @click="$alert('TODO')">{{$t('无需打包')}}</el-button>
<el-button size="mini" type="primary" @click="$router.push(`package?orderId=${row.orderId}&orderItemId=${row.orderItemId}`)">{{$t('打包')}}</el-button>
<el-button size="mini" type="primary" @click="$router.push(`package?orderId=${row.orderId}&orderItemId=${row.orderItemId}`)">{{$t('修改打包')}}</el-button>
</template>
</el-table-column>
</el-table>
<h2 v-if="orderSpecialNeeds.length > 0">{{$t('特殊需求')}}</h2>
<el-form ref="form" :model="form" label-width="200px">
<el-form-item :label="$i18n.locale === 'en_US' ? item.labelEn : item.label" v-for="(item, index) in orderSpecialNeeds" :key="item.value" style="width: 600px">
<el-input v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoney" :placeholder="$t('请输入') + ($i18n.locale === 'en_US' ? item.labelEn : item.label)">
<el-select v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoneyCurrency" :placeholder="$t('请选择')" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="$i18n.locale === 'en_US' ? item.titleEn : item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<h2>{{$t('订单数据')}}</h2>
<el-form-item :label="$t('总方数')" style="width: 380px">
<el-input v-model="form.sumVolume" :placeholder="$t('请输入总方数')" readonly>
<span slot="append"></span>
</el-input>
</el-form-item>
<el-form-item :label="$t('总重量')" style="width: 380px">
<el-input v-model="form.sumWeight" :placeholder="$t('请输入总重量')" readonly>
<span slot="append">kg</span>
</el-input>
</el-form-item>
<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.urls" ></image-and-video-upload>
</div>
</el-card>
<div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)">
<el-button @click="escapeBol = true;" type="primary">{{$t('转异')}}</el-button>
<el-button type="primary" @click="finishVisible = true">{{$t('完成备货')}}</el-button>
</div>
</el-form>
<el-dialog :title="order.orderNo + $t('订单转异')" center :visible.sync="escapeBol">
<el-form label-position="top" label-width="200" ref="exceptionForm" :model="form" :rules="exceptionRules">
<el-form-item :label="$t('原因类型')" prop="manualExceptionType">
<dict-selector v-model="form.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="form.exceptionUrls"></image-upload>
</el-form-item>
<el-form-item :label="$t('详细信息')">
<el-input v-model="form.descZh" type="textarea"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleException">{{$t('确认并完成打包')}}</el-button>
<el-button @click="escapeBol = false">{{$t('取消')}}</el-button>
</span>
</el-dialog>
<print-tag v-if="isShowPrintTag" :order-id="orderId" @close="isShowPrintTag = false"></print-tag>
</div>
</template>
<script>
import {getCurrencyList} from "@/api/ecw/currency"
import {
getLabelByOrder, getLabelWaitInByOrder,
getOrder,
getOrderWarehouseIn,
getSpecialListByOrderId, listByOrderId,
orderWarehouseInFinish, orderWarehouseInUpdateLabel,
rollbackDelete, warehousePictureList
} from '@/api/ecw/order'
import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
import {DICT_TYPE} from "@/utils/dict"
import PrintTag from "@/views/ecw/order/components/PrintTag"
import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseReceipt"
import imageUpload from "@/components/ImageUpload";
import {parseTime} from "@/utils/ruoyi"
import ImageAndVideoUpload from '@/components/ImageAndVideoUpload'
import Package from './components/Package'
export default {
name: "Stocking",
components: {
orderBaseInfo,
WarehouseAreaDialog,
PrintTag,
PrintWarehouseReceipt,
imageUpload,
ImageAndVideoUpload,
Package
},
mounted() {
if(this.$route.query.id){
this.orderId = parseInt(this.$route.query.id || undefined)
this.getOrderItemList()
getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data)
Promise.all([
this.getOrder(),
listByOrderId({ orderId: this.orderId }).then(r => {
this.form.orderLocationCreateReqVOList = r.data
})
]).then(() => {
/*// 等待仓库id和已选的储位后初始化储位信息
this.$nextTick(() => {
this.$refs.area.updateArea()
})*/
})
}
getCurrencyList().then(res => this.currencyList = res.data)
},
data() {
return {
parseTime,
DICT_TYPE,
areaVisible: false,
finishVisible: false,
warehousingVisible: false,
form: {
orderSpecialNeedReceivableReqVoList: [],
orderLocationCreateReqVOList: [],
exceptionUrls:[],
descZh:'',
manualExceptionType:[],
urls: [],
sumVolume: '',
sumWeight: '',
},
currencyList:[],
order: {},
orderId: undefined,
orderItemList: [],
specialList: [],
warehousing: undefined,
isShowPrintTag: false,
isShowPrint: false,
escapeBol:false,
label: {
"orderId": 0,
"orderLabelDtoList": [
{
"end": 0,
"start": 0
}
]
},
exceptionRules: {
manualExceptionType: [
{ required: true, message: '请勾选原因类型', trigger: 'change' },
{
validator: (rule, value, callback) => {
if (value.length <= 0) {
callback(new Error('请勾选原因类型'))
}
callback()
}, trigger: 'change'
}
]
}
}
},
methods: {
getOrderItemList(){
this.orderItemList = []
return getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
},
getList(){
this.getOrder()
this.getOrderItemList()
},
getWarehousePictureList(){
return warehousePictureList({
bizId: this.order.orderId,
type: 1
}).then(r =>{
this.form.urls = r.data.map(i =>i.url)
})
},
include(){
return (state, arr) => {
return arr.indexOf(state) > -1
}
},
exclude(){
return (state, arr) => {
return arr.indexOf(state) == -1
}
},
handleLabelSubmit(){
orderWarehouseInUpdateLabel({
...this.label,
orderId: this.orderId
}).then(r => {
if (r.code === 0){
this.$message.success(r.msg || this.$t('修改标签箱号成功'))
}
})
},
// 箱号标签回显
getLabelByOrder(){
getLabelByOrder(this.orderId).then(r => {
if (r.code === 0 && !! r.data && r.data.length > 0) {
this.label.orderLabelDtoList = r.data
} else {
// 没有历史数据,查默认值
getLabelWaitInByOrder(this.orderId).then(r => {
console.log(r)
if (r.code === 0 && !! r.data) {
this.label.orderLabelDtoList = [r.data]
}
})
}
})
},
handleLabelAdd(index){
this.label.orderLabelDtoList.splice(index + 1, 0, {
"end": '',
"start": ''
})
},
getTowSum(){
// let sumVolume = 0
// let sumWeight = 0
// this.order.orderItemVOList.forEach(e => {
// if (e?.warehouseInInfoVO?.volume) sumVolume += e.warehouseInInfoVO.volume
// if (e?.warehouseInInfoVO?.weight) sumWeight += e.warehouseInInfoVO.weight
// })
this.form.sumVolume = this.order.sumVolume// || sumVolume
this.form.sumWeight = this.order.sumWeight// || sumWeight
},
getOrder(){
return getOrder(this.orderId).then(r => {
this.order = r.data
this.getTowSum()
}).then(() => {
this.getLabelByOrder()
this.getWarehousePictureList()
})
},
specialHas0(){
let result = false
this.form.orderSpecialNeedReceivableReqVoList.forEach(e => {
if (e.receivableMoney === '0' || e.receivableMoney === ''){
result = true
}
})
return result
},
handleException() {
this.$refs.exceptionForm.validate((valid) => {
if (valid) {
this.handleSubmit()
} else {
this.$message.warning('请勾选原因类型')
}
})
},
async handleSubmit() {
if (this.specialHas0()) {
const confirm = await this.$confirm(this.$t('有特需费用为0或未填写,请问是否继续?'), this.$t('注意'), {
confirmButtonText: this.$t('继续'),
cancelButtonText: this.$t('取消'),
type: 'warning'
})
if (confirm !== 'confirm'){
return
}
}
let form = {
orderSpecialNeedReceivableReqVoList: this.form.orderSpecialNeedReceivableReqVoList,
"orderLocationCreateReqVOList": this.form.orderLocationCreateReqVOList,
"orderId": this.order.orderId,
urls: this.form.urls,
sumVolume: this.form.sumVolume,
sumWeight: this.form.sumWeight,
isAppend: this.isAdd
}
// 标签箱号
if (this.order.parentOrderId) {
form.labelList = this.label.orderLabelDtoList || []
}
if (this.escapeBol) {
form.exceptionUrls = this.form.exceptionUrls.length !== 0 ? this.form.exceptionUrls?.split(',') : []
form.descZh = this.form.descZh;
form.manualExceptionType = this.form.manualExceptionType.join(',')
}
orderWarehouseInFinish(form).then(r => {
if (r.code === 0) {
this.escapeBol = false;
this.finishVisible = false
const message = !r.data ? this.$t('该订单已成功入仓,是否打印?') : `<h3>${this.$t('货物已入仓,存在异常')}</h3>${this.$t('该订单已成功入仓,是否打印?')}`
this.$confirm(
message,
this.$t('货物已入仓'),
{
confirmButtonText: this.$t(''),
cancelButtonText: this.$t(''),
dangerouslyUseHTMLString: true
}
).then(() => {
this.isShowPrint = true
}).catch(() => {
// this.$store.dispatch('tagsView/delVisitedView')
this.$message.success(this.$t('入仓成功'))
this.$tab.closePage()
})
}
})
},
handleWarehousingReturn(item){
this.$confirm(item.prodTitleZh + this.$t('退仓后不可恢复,是否确认退仓?'), this.$t('确定要退仓?'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
}).then(() => {
rollbackDelete({
"orderId": item.orderId,
"orderItemId": item.orderItemId
}).then(() => {
this.$message({
type: 'success',
message: this.$t('货物退仓成功!')
});
this.getOrderItemList()
this.getOrder()
})
}).catch(e => {
});
}
},
watch: {
orderSpecialNeeds(val){
val.forEach(e => {
this.form.orderSpecialNeedReceivableReqVoList.push({
"id": e.id,
"receivableMoney": e.transFee || '',
"receivableMoneyCurrency": e.transCurrency || 3
})
})
}
},
computed: {
// 根据orderItemId获取入仓item
wareItem(){
return orderItemId => {
return this.orderItemList.find(item => item.orderItemId == orderItemId)
}
},
isAdd() {
return this.$route.path === "/order/warehousing-add"
},
isEdit() {
return this.$route.path === "/order/warehousing-update"
},
title() {
return this.$i18n.locale === 'en_US' ? this.$route.meta.titleEn : this.$route.name
},
orderSpecialNeedsDict() {
return this.$store.state.dict.dictDatas.order_special_needs
},
orderSpecialNeeds(){
const result = []
this.specialList.forEach(e => {
const t = this.orderSpecialNeedsDict.find(f => f.value === e.advanceType)
if(t) {
result.push({...e, label: t.label, labelEn: t.labelEn})
}
})
return result
},
warehouseId(){
return this.order?.logisticsInfoDto?.startWarehouseId
}
}
}
</script>
<style scoped lang="scss">
@import "src/assets/styles/element-variables";
.red{
color: $--color-danger;
}
.green{
color: $--color-success;
}
</style>
<!--空运备货列表-->
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
<el-form-item :label="$t('编号')" prop="orderNo">
<el-input v-model="queryParams.numberKey" :placeholder="$t('请输入订单号、唛头、提单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('发货人')" prop="consignorKey">
<el-input v-model="queryParams.consignorKey" :placeholder="$t('发货人')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('收货人')" prop="consigneeKey">
<el-input v-model="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="">
<dict-selector :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" :filter="(item) => item.value != 'PickTime'" v-model="dateFilterType" defaultable style="width: 150px; margin-right: 5px" />
<el-date-picker v-model="dateFilter" type="datetimerange" range-separator="-"
:start-placeholder="$t('开始日期')"
:end-placeholder="$t('结束日期')"
value-format="yyyy-MM-dd HH:mm:ss"
@change="handleQuery"
>
</el-date-picker>
</el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseId">
<el-select v-model="queryParams.startWarehouseId" :placeholder="$t('请选择始发仓')" clearable @change="handleQuery">
<el-option v-for="item in exportWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('目的仓')" prop="destWarehouseId">
<el-select v-model="queryParams.destWarehouseId" :placeholder="$t('请选择目的仓')" clearable @change="handleQuery">
<el-option v-for="item in importWarehouseList" :label="$l(item, 'title')" :value="item.id" :key="item.id"></el-option>
</el-select>
</el-form-item>
<!--<el-form-item :label="$t('运输方式')" prop="transportId">
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model.number="queryParams.transportId" clearable @change="handleQuery"/>
</el-form-item>-->
<el-form-item :label="$t('商品')" prop="tidanNo">
<el-input v-model="queryParams.prodKey" :placeholder="$t('请输入商品类型、品名或品牌')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('控货')" prop="isCargoControl">
<dict-selector v-model="queryParams.isCargoControl" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" clearable />
</el-form-item>
<el-form-item :label="$t('入仓类型')" prop="warehouseType">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="queryParams.warehouseType" clearable/>
</el-form-item>
<el-form-item :label="$t('客户经理')" >
<user-selector manage v-model="queryParams.salesmanId" clearable @change="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('订单状态')" prop="status">
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"
@keyup.enter.native="handleQuery" clearable />
</el-form-item>
<el-form-item :label="$t('报关方式')" prop="customsType">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="queryParams.customsType" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('是否齐货')" >
<!--// 字段存疑-->
<dict-selector v-model="queryParams.isNeat" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" clearable @change="handleQuery"/>
</el-form-item>
<el-form-item :label="$t('备案属性')" prop="productRecord">
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" v-model="queryParams.productRecord" clearable @change="handleQuery" />
</el-form-item>
<el-form-item :label="$t('快递单号')" prop="number">
<el-input v-model="queryParams.number" :placeholder="$t('快递单号')" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item :label="$t('外部仓')" prop="number">
<el-select v-model="queryParams.isExternalWarehouse" :placeholder="$t('请选择')" clearable @change="handleQuery">
<el-option :label="$t('外部仓')" :value="1"></el-option>
<el-option :label="$t('自有仓')" :value="0"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('异常状态')" prop="status">
<dict-selector :type="DICT_TYPE.ORDER_ABNORMAL_STATE" v-model="queryParams.abnormalState"
@keyup.enter.native="handleQuery" clearable />
</el-form-item>
<el-form-item :label="$t('审核状态')" prop="status">
<dict-selector :type="DICT_TYPE.ECW_ORDER_APPROVAL_TYPE" v-model="queryParams.auditType"
@keyup.enter.native="handleQuery" clearable />
</el-form-item>
<el-form-item :label="$t('订单类型')" prop="number">
<el-select v-model="queryParams.type" :placeholder="$t('请选择')" clearable >
<el-option :label="$t('普通订单')" :value="0"></el-option>
<el-option :label="$t('集运服务')" :value="1"></el-option>
<el-option :label="$t('海外仓')" :value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('出货渠道')" prop="number">
<selector :options="channelList" :label-field="$l('name')" value-field="channelId" v-model="queryParams.channelId"></selector>
</el-form-item>
<el-form-item>
<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 :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-col>
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo" >
<template slot-scope="scope">
<router-link :to="{path: '/order/detail',query: {orderId: scope.row.orderId}}" class="link-type">
<span>{{ scope.row.orderNo }}</span>
</router-link>
<div style="display: flex;flex-wrap: wrap;" v-if="scope.row.advanceType">
<el-button @click="deleteSpecial(item.value,scope.row.orderId)" size="mini" style="margin-left: 20px" type="danger" circle v-for="(item,index) in specialRendering(scope.row.advanceType)" :key="index">{{item.label[0]}}</el-button>
</div>
</template>
</el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('总箱数/入仓箱数')" align="center" prop="sumNum">
<template slot-scope="{row}">
<div :style="{color:row.customsType != 1 ? 'red' : null}">{{row.totalNum}}{{$t('')}}/{{row.sumNum}}{{$t('')}}</div>
<dict-tag v-if="row.customsType != 1" style="color:red" :type="DICT_TYPE.ECW_CUSTOMS_TYPE" :value="row.customsType"></dict-tag>
</template>
</el-table-column>
<el-table-column :label="$t('体积/重量')" align="center" prop="sumWeight">
<template slot-scope="{row}">
<!--入仓前是填单数据,入仓后是入仓数据,装柜审核通过等状态inwarehouseState会变成0,所以只能通过sumNum来判断-->
<component
:is="row.orderType == 2 ? 'el-tooltip' : 'div'"
class="item"
:style="{
color: row.orderType == 2 ? 'red' : null
}"
effect="dark"
:content="(row.wvolume||0)+'m³'"
placement="bottom">
<div v-if="row.sumNum > 0">{{row.sumVolume}}m³ /{{row.sumWeight}}Kg</div>
<div v-else>{{row.costVO.totalVolume}}m³ /{{row.costVO.totalWeight}}Kg</div>
</component>
</template>
</el-table-column>
<el-table-column :label="$t('始发仓')" align="center" prop="startWarehouseName">
<template slot-scope="{row}">
{{row.startWarehouseName}}
<span style="color:red" v-if="row.isExternalWarehouse">({{$t('外部仓')}})</span>
</template>
</el-table-column>
<el-table-column :label="$t('运输方式/目的地')" align="center" prop="transportId">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" /> / {{row.dstWarehouseName}}
</template>
</el-table-column>
<el-table-column :label="$t('控货')" align="center" prop="isCargoControl">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="row.isCargoControl" />
</template>
</el-table-column>
<el-table-column :label="$t('订单状态')" align="center" prop="status">
<template slot-scope="scope">
<!-- <dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" /> -->
{{scope.row.statusMsg}}
</template>
</el-table-column>
<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="$router.push('stocking?id=' + scope.row.orderId)" v-hasPermi="['ecw:order:stockingList:stocking']">{{$t('备货')}}</el-button>
<el-button type="text" @click="printTagOrderId=scope.row.orderId" v-hasPermi="['ecw:order:stockingList:print_tag']">{{$t('打印标签')}}</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList" />
<print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" />
</div>
</template>
<script>
import Selector from '@/components/Selector'
import ProductSelector from '@/components/ProductSelector'
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 PrintTag from './components/PrintTag'
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
import BatchPickup from './components/BatchPickup'
import withdrawal from "@/views/ecw/order/withdrawal";
import UserSelector from '@/components/UserSelector'
import BatchSingleApplication from "@/views/ecw/order/batchSingleApplication";
import FeeApplication from "@/views/ecw/order/feeApplication";
import MergeLog from '@/views/ecw/order/components/MergeLog'
import PickupLog from './components/PickupLog'
import {getWarehouseList} from '@/api/ecw/warehouse'
import { getCurrencyPage } from "@/api/ecw/currency";
import SplitRevoke from "@/views/ecw/order/components/SplitRevoke";
import {getChannelList} from "@/api/ecw/channel";
export default {
name: "EcwOrderStockinglist",
components: {
UserSelector,
FeeApplication,
BatchSingleApplication,
MergeLog,
PickupLog,
SplitRevoke,
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill, BatchPickup,withdrawal
},
data() {
return {
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 遮罩层
loading: true,
// 总条数
total: 0,
// 订单列表
list: [],
// 查询参数
queryParams: {
page: 1,
rows: 10
},
warehouseList:[],
productAttrList: [], // 商品属性
molecule: '', //重货比分子
denominator: '', //重货比分母
dateFilterType: '', //日期筛选类别
dateFilter: [], //筛选日期
printTagOrderId: null, // 显示打印标签的订单ID
isShow:false,//特殊显示
multipleSelection:[],
params: {
page: 1,
rows: 20,
},
currencyList:[],
channelList:[]
};
},
watch:{
isChinese(){
this.getList()
}
},
computed: {
isChinese(){
return this.$i18n.locale === 'zh_CN'
},
exportWarehouseList(){
/* tradeType 1 进口,2出口,3进出口 */
return this.warehouseList.filter(item => item.tradeType == 2 || item.tradeType == 3)
},
importWarehouseList(){
return this.warehouseList.filter(item => item.tradeType == 1 || item.tradeType == 3)
},
combinedQueryParams(){
let timeParams = {}
if(this.dateFilterType && this.dateFilter){
timeParams['begin' + this.dateFilterType] = this.dateFilter[0]
timeParams['end' + this.dateFilterType] = this.dateFilter[1]
}
let queryParams = Object.assign({}, this.queryParams, timeParams)
return queryParams
}
},
activated(){
this.getList()
},
created() {
this.getList();
getProductAttrList().then(res => this.productAttrList = res.data)
getWarehouseList().then(res => this.warehouseList = res.data)
getCurrencyPage(this.params).then(res => this.currencyList = res.data.list)
getChannelList().then(res => this.channelList = res.data)
},
methods: {
/** 查询列表 */
getList() {
this.loading = true;
// 执行查询
getOrderPage(this.combinedQueryParams).then(response => {
// 部分情况下,订单后面的操作下拉菜单会显示按钮,但是下来没有选项,在elTable组件更新的时候会导致渲染错误,所以要在更新渲染前清空一次list让table彻底重新渲染,避免部分更新导致异常
this.list = []
this.$nextTick(() => {
this.list = response.data.list
})
this.total = response.data.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.page = 1;
this.$nextTick(this.getList)
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
page: 1,
rows: 10
}
this.dateFilter = []
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.$router.push('create')
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$router.push('edit?id=' + row.orderId)
},
// 表格多选
handleSelectionChange(selection) {
this.multipleSelection = selection
this.ids = selection.map(item => item.orderId)
this.single = selection.length !== 1
this.multiple = !selection.length
}
}
};
</script>
<style lang="scss" scoped>
::v-deep .actions{
.el-dropdown{
margin-right: 10px;
&:last-child {
margin-right: 0;
}
}
}
</style>
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<div class="title">{{$t('新增订单生成成功')}}</div> <div class="title">{{$t('新增订单生成成功')}}</div>
<div class="line">{{$t('订单号')}}{{order.orderNo}}</div> <div class="line">{{$t('订单号')}}{{order.orderNo}}</div>
<div class="line">{{$t('运输方式')}}<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" /></div> <div class="line">{{$t('运输方式')}}<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.transportId" /></div>
<div class="line" v-if="order.channelName">{{$t('出货渠道')}}{{order.channelName}}</div>
<div class="line">{{$t('路线')}}{{$l(order.logisticsInfoDto, 'startTitle')}} >> {{$l(order.logisticsInfoDto, 'destTitle')}}</div> <div class="line">{{$t('路线')}}{{$l(order.logisticsInfoDto, 'startTitle')}} >> {{$l(order.logisticsInfoDto, 'destTitle')}}</div>
<div class="line">{{$t('商品列表')}} <div class="line">{{$t('商品列表')}}
<span v-for="(item, index) in order.orderItemVOList" :key="index"> <span v-for="(item, index) in order.orderItemVOList" :key="index">
......
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