Commit 7892bfbe authored by Smile's avatar Smile

需求 后台-集运-追加包裹

parent 653fc0a9
......@@ -53,6 +53,14 @@ export function getOrderPage(query) {
params: query
})
}
// 获得客户集运订单分页
export function getConsOrderPage(query) {
return request({
url: "/ecw/order/cons/page",
method: "get",
params: query
})
}
// 获得订单列表
export function getOrderList(query) {
......
......@@ -5,6 +5,11 @@
<el-form-item :label="$t('订单编号')" prop="orderNo">
<el-input v-model.trim="queryParams.orderNo" :placeholder="$t('订单编号')" clearable @keyup.enter.native="handleQuery" @input="replaceSpace(queryParams, 'orderNo')" class="w-200" />
</el-form-item>
<el-form-item :label="$t('始发仓')" prop="startWarehouseIds">
<el-select v-model="queryParams.startWarehouseIds" multiple :placeholder="$t('请选择始发仓')" clearable @change="handleQuery" class="w-200">
<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="consigneeKey">
<el-input v-model.trim="queryParams.consigneeKey" :placeholder="$t('收货人')" clearable @keyup.enter.native="handleQuery" class="w-200" />
</el-form-item>
......@@ -43,44 +48,53 @@
</el-row>
<!-- 列表 -->
<el-table v-loading="loading" border :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" fixed>
<el-table v-loading="loading" border :data="list" >
<el-table-column label="选择" align="center" width="65">
<template scope="scope">
<el-radio :label="scope.$index" v-model="radio"
@change.native="getCurrentRow(scope.row)">&nbsp; </el-radio>
</template>
</el-table-column>
<el-table-column :label="$t('订单编号')" width="120px" align="center" prop="orderNo">
<template slot-scope="scope">
<router-link :to="`detail?orderId=` + scope.row.orderId">{{ scope.row.orderNo }}</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('唛头')" align="center" prop="marks" fixed />
<el-table-column :label="$t('箱数')" align="center" prop="sumNum">
<template v-slot="{ row }">
{{ row.sumNum > 0 ? row.sumNum : row.totalNum }}
<el-table-column :label="$t('唛头')" align="center" prop="marks" />
<el-table-column :label="$t('始发仓')" align="left" prop="startWarehouseName" />
<el-table-column :label="$t('运输方式-渠道/目的地')" align="center" prop="transportId" width="200px">
<template slot-scope="{ row }">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" />
<template v-if="row.channelName"> - {{ row.channelName }} </template>
/ {{ row.dstWarehouseName }}
</template>
</el-table-column>
<el-table-column :label="$t('已放箱数')" align="center" prop="sumWeight">
<template slot-scope="{ row }">{{ row.releaseNum }}</template>
</el-table-column>
<el-table-column :label="$t('订单状态')" align="left" prop="status">
<el-table-column :label="$t('状态')" align="left" prop="status">
<template slot-scope="{ row }">
{{ row.statusMsg }}
</template>
</el-table-column>
<el-table-column :label="$t('已卸柜/已到仓时间')" align="center" prop="unloadTime" />
<el-table-column :label="$t('提单号')" align="center" prop="status">
<template slot-scope="scope">
{{ scope.row.tidanNo }}
<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="sumWeight">
<template slot-scope="{ row }">{{ row.cargoControlName }}</template>
</el-table-column>
<el-table-column :label="$t('控货状态')" align="center" prop="transportId">
<el-table-column :label="$t('发货人编号')" align="center">
<template slot-scope="{ row }">
<template v-if="row.cargoControlStatus == 1 && row.isToReview">{{ $t("放货中") }}</template>
<dict-tag v-else :type="DICT_TYPE.CONTROL_GOODS_STATUS" :value="row.cargoControlStatus" />
<router-link :to="`/customer/query/${row.consignorCustomerId}`" class="link-type">
{{ row.consignorCustomerNumber }}
</router-link>
</template>
</el-table-column>
<el-table-column :label="$t('操作')" align="center" class-name="small-padding fixed-width" width="150px">
<el-table-column :label="$t('收货人编号')" align="center" prop="consigneeCustomerNumber">
<template slot-scope="{ row }">
<router-link :to="`/customer/query/${row.consigneeCustomerId}`" class="link-type">
{{ row.consigneeCustomerNumber }}
</router-link>
</template>
</el-table-column>
</el-table>
</el-dialog>
......@@ -89,16 +103,35 @@
<script>
import {getChannelList} from "@/api/ecw/channel";
import {getRegionList} from "@/api/ecw/order";
import {getWarningCargoControlOrderPage} from "@/api/ecw/orderCargoControl";
import { getConsOrderPage, getRegionList } from "@/api/ecw/order"
import Selector from "@/components/Selector"
import Template from "@/views/cms/template/index.vue"
import { getWarehouseList } from "@/api/ecw/warehouse"
import { getCons } from "@/api/ecw/cons"
export default {
name: 'addForOrder',
computed: {
combinedQueryParams() {
let queryParams = {}
//目的国
if (this.destCountryId != null && this.destCountryId != "") {
queryParams.destCountryIds = this.destCountryId;
}
//目的城市
if (this.objectiveId != null && this.objectiveId != "") {
queryParams.objectiveIds = this.objectiveId;
}
//目的仓
if (this.destWarehouseId != null && this.destWarehouseId != "") {
queryParams.destWarehouseIds = this.destWarehouseId;
}
return Object.assign({}, this.queryParams, queryParams)
},
},
components: {
Template,
Selector
},
props: {
......@@ -112,6 +145,7 @@ export default {
},
data() {
return {
radio: '',
showSearch: true,
destCountryId: null,
objectiveId: null,
......@@ -120,9 +154,12 @@ export default {
AddressProvince: [],
AddressTown: [],
channelList: [],
exportWarehouseList: [],
loading: true,
customerId:null,
// 订单列表
list: [],
order:{},
// 查询参数
queryParams: {
page: 1,
......@@ -135,15 +172,29 @@ export default {
this.getList()
},
created() {
this.getList()
getCons(this.consId).then(({ data }) => {
this.customerId=data.customerId
this.getList()
})
getChannelList().then((res) => (this.channelList = res.data))
this.getAddressProvince()
this.getAddressCity()
this.getAddressTown()
getWarehouseList().then(({ data }) => {
this.exportWarehouseList = data.filter((item) => item.tradeType == '2' || item.type == '3')
})
},
watch:{
},
methods: {
getCurrentRow(row){
// 获取选中数据 row表示选中这一行的数据,可以从里面提取所需要的值
this.order = row
},
// 自动去除空格
replaceSpace(obj, field) {
obj[field] = obj[field].replace(/\s+/g, "")
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm")
......@@ -167,8 +218,9 @@ export default {
/** 查询列表 */
getList() {
this.loading = true
this.combinedQueryParams.customerId=this.customerId
// 执行查询
getWarningCargoControlOrderPage(this.combinedQueryParams).then((response) => {
getConsOrderPage(this.combinedQueryParams).then((response) => {
this.list = []
// 直接更细数据,可能因为elTable的部分渲染产生bug,比如权限控制异常
this.$nextTick(() => {
......
......@@ -390,6 +390,7 @@
@click.native="
openAdd = true
addForm.consNum = scope.row.consNum
addForm.consId = scope.row.id
"
v-hasPermi="['ecw:order:warehouse_exit']"
>{{ $t("包裹追加") }}
......@@ -534,7 +535,7 @@
<cons-withdrawal v-if="show" :dialog-visible="show" :consId="consId"></cons-withdrawal>
<cons-withdrawal-exit v-if="showExit" :dialog-visible="showExit" :consId="consId"></cons-withdrawal-exit>
<cons-withdrawal-deal v-if="showReturnWarehouse" :dialog-visible="showReturnWarehouse" :consId="consId" ></cons-withdrawal-deal>
<add-for-order :showAddForOrder.sync="showAddForOrder" :consId="id" @determine="getList"></add-for-order>
<add-for-order v-if="showAddForOrder" :showAddForOrder.sync="showAddForOrder" :consId="addForm.consId" @determine="getList"></add-for-order>
</div>
</template>
......@@ -659,6 +660,7 @@ export default {
},
// 追加表单参数
addForm: {
consId: null,
orderId: null,
orderStatus: null,
},
......
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