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

完善订单,控货权转移

parent b8695a51
......@@ -17,3 +17,18 @@ export default {
}
}
</script>
<style lang="scss">
.page-title{
font-size:16px;
margin:20px 0;
display:flex;
align-items:center;
&:before{
content: '';
width:5px;
height: 15px;
background:#666;
margin-right:10px;
}
}
</style>
......@@ -249,15 +249,6 @@ export function feeApplicationGet(params){
})
}
// 获得控货分页
export function getCargoControlOrderPage(params){
return request({
url:'ecw/order-cargo-control/cargo/control/order',
method:'get',
params
})
}
//获得调仓明细
export function orderWarehouseInGetAdjustInfo(params){
return request({
......
import request from '@/utils/request'
// 获得控货分页
export function getCargoControlOrderPage(params){
return request({
url:'ecw/order-cargo-control/cargo/control/order',
method:'get',
params
})
}
// 发送手机验证码
export function sendSmsCode(data){
return request({
url: '/ecw/order-cargo-control/send-sms-code',
method: 'post',
data
})
}
// 创建订单控货人信息
export function create(data){
return request({
url: '/ecw/order-cargo-control/create',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -103,6 +103,7 @@ export const DICT_TYPE = {
ECW_BEGINTIME_TYPE_ENDTIME: 'begintime_type_endtime', // 时间筛选字段(订单)
ECW_CUSTOM_DRAWEE: 'custom_drawee', // 自定义付款人费用类型
ECW_IS_DRAFT: 'is_draft', // 草稿发布状态
ECW_PRICE_TYPE: 'price_type',
//--------ecw---------
CUSTOMER_STATUS: 'customer_status',
CUSTOMER_SOURCE: 'customer_source',
......
......@@ -113,7 +113,7 @@
<el-button type="text" size="mini" @click="$router.push('detail?id=' + scope.row.orderId)" >查看</el-button>
<el-button type="text" size="mini" >调货</el-button>
<el-button type="text" size="mini" >反复核</el-button>
<el-button type="text" size="mini" @click="showTransferOrderId = scope.row.orderId" >控货权转移</el-button>
<el-button type="text" size="mini" @click="showTransferOrder = scope.row" >控货权转移</el-button>
</template>
</el-table-column>
</el-table>
......@@ -121,7 +121,7 @@
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList" />
<transfer v-if="showTransferOrderId" :order-id="showTransferOrderId" @close="showTransferOrderId=null" />
<transfer v-if="showTransferOrder" v-bind="showTransferOrder" @close="showTransferOrder=null" />
<release v-if="showReleaseOrderId" :order-id="showReleaseOrderId" @close="showReleaseOrderId=null" />
<release v-if="showEditOrderId" :order-id="showEditOrderId" @close="showEditOrderId=null" />
</div>
......@@ -132,17 +132,11 @@ 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 { getTradeCityList } from '@/api/ecw/region'
import Transfer from '@/views/ecw/order/components/Transfer'
import Release from './components/Release'
import CargoControlEdit from './components/CargoControlEdit'
import {
getOrder,
getOrderPage,
exportOrderExcel,
getCargoControlOrderPage
} from "@/api/ecw/order";
import { getCargoControlOrderPage } from "@/api/ecw/orderCargoControl"
export default {
......@@ -181,7 +175,7 @@ export default {
denominator: '', //重货比分母
dateFilterType: '', //日期筛选类别
dateFilter: [], //筛选日期
showTransferOrderId: null, // 控制权转移操作订单
showTransferOrder: null, // 控制权转移操作订单
showReleaseOrderId: null, // 放货ID
showEditOrderId: null, // 修改ID
};
......
<template>
<div class="app-container">
<div class="title">控货订单</div>
<div class="page-title">控货订单</div>
<el-form ref="elForm" :model="formData" :rules="rules" size="small" label-width="100px" >
<el-row>
<el-col :span="6">
......@@ -36,7 +36,7 @@
</el-row>
</el-form>
<div class="title">放货详情</div>
<div class="page-title">放货详情</div>
<el-table :data="[1]" border>
<el-table-column label="序号" width="50px">
......@@ -77,7 +77,7 @@
</el-table-column>
</el-table>
<div class="title">历史放货记录</div>
<div class="page-title">历史放货记录</div>
<el-table :data="[1]" border>
<el-table-column label="序号" width="50px">
......@@ -131,18 +131,3 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.title{
font-size:16px;
margin:20px 0;
display:flex;
align-items:center;
&:before{
content: '';
width:5px;
height: 15px;
background:#666;
margin-right:10px;
}
}
</style>
<template>
<span @click="send">{{text}}</span>
</template>
<script>
import {sendSmsCode} from '@/api/ecw/orderCargoControl'
const timeout = null
export default {
props:{
orderId: [String, Number],
scene: [String, Number]
},
data(){
return {
leftTime: 60,
loading: false
}
},
computed:{
text(){
if(this.leftTime === 60){
return '发送验证码'
}
if(this.leftTime > 0){
return this.leftTime + ''
}
return '重新发送'
}
},
destroyed(){
if(timeout)clearTimeout(timeout)
},
methods:{
send(){
if(this.loading || (this.leftTime > 0 && this.leftTime < 60)) return false
this.loading = true
sendSmsCode({
orderId: this.orderId,
scene: this.scene
}).then(res => {
this.$message.success('发送成功')
this.countDown()
}).finally(res => {
this.loading = false
})
},
countDown(){
this.leftTime --
if(this.leftTime <= 0){
return false
}
timeout = setTimeout(this.countDown, 1000)
}
}
}
</script>
\ No newline at end of file
<template>
<el-dialog :title="title" visible :before-close="closeDialog">
<el-dialog :title="title" visible :before-close="closeDialog" :close-on-click-modal="false">
<div class="" v-if="agreement">
<el-form ref="form" :model="form" label-position="left" label-width="120px">
<el-form-item v-if="detail" label="原控货人">
<el-input v-model="detail.orderNo" readonly></el-input>
<el-form ref="form" :model="form" :rules="rules" label-position="left" label-width="120px">
<el-form-item label="原控货人">
<el-input v-model="cargoControlName" readonly></el-input>
</el-form-item>
<el-form-item label="原控货手机号" prop="start" required>
<el-input v-model.number="form.start" type="number"></el-input>
<el-form-item label="原控货手机号">
<el-input v-model="cargoControlPhone" readonly></el-input>
</el-form-item>
<el-form-item label="新控货人" prop="end" required>
<el-input v-model.number="form.end" type="number" :max="detail ? detail.num : 1"></el-input>
<el-form-item label="新控货人" prop="name">
<el-input v-model="form.name"></el-input>
</el-form-item>
<el-form-item label="新控货手机号" prop="start" required>
<el-input v-model.number="form.start" type="number">
<el-select slot="prepend" v-model="form.areaCode" placeholder="">
<el-option :label="1" :value="1"></el-option>
<el-form-item label="新控货手机号" prop="phone">
<el-input v-model="form.phone" type="tel">
<el-select slot="prepend" v-model="form.dialCode" placeholder="" style="width:200px">
<el-option v-for="item in countryList" :key="item.id" :label="item.nameZh + item.tel" :value="item.tel.replace('+', '')"></el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="新控货人邮箱" prop="end" required>
<el-input v-model.number="form.end" type="number" :max="detail ? detail.num : 1"></el-input>
<el-form-item label="新控货人邮箱" prop="email">
<el-input v-model="form.email" type="email"></el-input>
</el-form-item>
<el-form-item label="手机验证码" prop="end" required>
<el-input v-model.number="form.end" type="number">
<span slot="append">获取验证码</span>
<el-form-item label="手机验证码" prop="code">
<el-input v-model.number="form.code" type="number">
<send-sms-code slot="append" :order-id="orderId" scene="4" />
</el-input>
</el-form-item>
<el-form-item label="">
<el-button type="primary" @click="showPreview">确定转移</el-button>
<el-button type="primary" @click="submit">确定转移</el-button>
</el-form-item>
</el-form>
</div>
......@@ -42,41 +43,72 @@
</template>
<script>
import TransferAgreement from "./TransferAgreement"
import {getCountryListAll} from '@/api/ecw/country'
import SendSmsCode from './SendSmsCode'
import {create} from '@/api/ecw/orderCargoControl'
export default {
props:{
orderId: [String, Number]
orderId: [String, Number],
cargoControlName: String,
cargoControlPhone: String,
orderNo: String
},
components: {TransferAgreement},
components: {TransferAgreement, SendSmsCode},
data(){
return {
show: false,
detail: null,
// detail: null,
form:{},
agreement: false, // 是否同意协议
countryList: [],
rules:{
name: [{required: true, message: '请输入控货人'}],
phone: [{required: true, message: '请输入控货人手机'}],
// email: [{required: true, message: '请输入控货人'}],
code: [{required: true, message: '验证码不能为空'}]
}
}
},
computed:{
title(){
let t = '控货权转移'
if(this.detail){
t += '-' + this.detail.orderNo
}
return t
return this.orderNo
}
},
watch:{
countryList(){
if(this.countryList.length){
this.$set(this.form, 'dialCode', this.countryList[0].tel.replace('+', ''))
}
}
},
created(){
this.show = true
this.loadData()
getCountryListAll().then(res => {
this.countryList = res.data
})
},
methods:{
loadData(){
},
closeDialog(){
this.show = false
this.$emit('close');
},
submit(){
this.$refs.form.validate(valid => {
if(!valid){
return false
}
let data = Object.assign({
orderId: this.orderId,
orderNo: this.orderNo
}, this.form)
create(data)
.then(res => {
this.$message.success(res.message || '操作成功')
this.closeDialog()
})
})
}
}
}
</script>
\ No newline at end of file
......@@ -278,7 +278,7 @@
<el-input v-model="form.marks" placeholder=""></el-input>
</el-descriptions-item>
<el-descriptions-item label="是否控货">
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.control" form-type="radio" />
<dict-selector :type="DICT_TYPE.INFRA_BOOLEAN_STRING" formatter="bool" v-model="form.isCargoControl" form-type="radio" />
</el-descriptions-item>
<!--代收货款,只有非控货订单、并且线路开通了代收货款后,才显示是否代收货款选项-->
<el-descriptions-item label="是否代收货款">
......@@ -527,7 +527,13 @@ export default {
this.getOpenedRouterList()
},
'form.transportId'(){
this.getOpenedRouterList
this.getOpenedRouterList()
},
'form.lineId'(lineId){
let router = this.routerList.find(item => item.id == lineId)
this.$set(this.form, 'departureId', router.startCityId)
this.$set(this.form, 'objectiveId', router.destCityId)
// TODO 还需要回填渠道信息,暂时缺少渠道ID
},
/* // 发货联系人发生变化获取发货客户
consignorContact(){
......
......@@ -3,12 +3,12 @@
<!-- 搜索工作栏 -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form-item label="订单编号" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="订单编号" clearable @keyup.enter.native="handleQuery" />
<el-form-item label="编号" prop="orderNo">
<el-input v-model="queryParams.orderNo" placeholder="请输入订单号、唛头、提单号" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="唛头" prop="marks">
<!-- <el-form-item label="唛头" prop="marks">
<el-input v-model="queryParams.marks" placeholder="唛头" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
</el-form-item> -->
<el-form-item label="发货人" prop="consignorId">
<el-input v-model="queryParams.consignorId" placeholder="发货人" clearable @keyup.enter.native="handleQuery" />
......@@ -17,8 +17,8 @@
<el-form-item label="收货人" prop="consigneeId">
<el-input v-model="queryParams.consigneeId" placeholder="收货人" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="日期筛选">
<dict-selector :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" style="width: 150px; margin-right: 5px" />
<el-form-item label="">
<dict-selector :type="DICT_TYPE.ECW_BEGINTIME_TYPE_ENDTIME" v-model="dateFilterType" defaultable style="width: 150px; margin-right: 5px" />
<el-date-picker v-model="dateFilter" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
......@@ -37,7 +37,7 @@
<dict-selector :type="DICT_TYPE.ECW_TRANSPORT_TYPE" v-model="queryParams.transportId" formatter="number" />
</el-form-item>
<el-form-item label="商品分类" prop="goodsType">
<!-- <el-form-item label="商品分类" prop="goodsType">
<selector v-model="queryParams.goodsType" :options="productAttrList" label-field="attrName" value-field="id">
</selector>
</el-form-item>
......@@ -47,9 +47,10 @@
<el-form-item label="品牌" prop="brand">
<dict-selector v-model="queryParams.brand" :type="DICT_TYPE.ECW_IS_BRAND" formatter="bool" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="提单号" prop="tidanNo">
<el-input v-model="queryParams.tidanNo" placeholder="提单号" clearable @keyup.enter.native="handleQuery" />
</el-form-item> -->
<el-form-item label="商品" prop="tidanNo">
<el-input v-model="queryParams.product" placeholder="请输入商品类型、品名或品牌" clearable @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="控货" prop="isCargoControl">
......@@ -58,11 +59,12 @@
<el-form-item label="入仓类型" prop="warehouseType">
<dict-selector :type="DICT_TYPE.ECW_WAREHOUSING_TYPE" v-model="queryParams.warehousingType" />
</el-form-item>
<el-form-item label="跟进客服" >
<customer-selector />
<el-form-item label="客户经理" >
<!-- <customer-selector /> -->
// TODO
</el-form-item>
<el-form-item label="订单状态" prop="status">
<dict-selector :type="DICT_TYPE.PAY_ORDER_STATUS" v-model="queryParams.status"
<dict-selector :type="DICT_TYPE.ORDER_STATUS" v-model="queryParams.status"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="报关方式" prop="customsType">
......@@ -70,15 +72,16 @@
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="是否齐货" >
<!--// 字段存疑-->
<dict-selector v-model="queryParams.isCargoControl" :type="DICT_TYPE.INFRA_BOOLEAN_STRING" fomatter="bool" />
</el-form-item>
<el-form-item label="重货比" prop="weightRatio">
<!-- <el-form-item label="重货比" prop="weightRatio">
<el-input style="width: 100px;" v-model="molecule" placeholder="" clearable @change="moleculeChange"
@keyup.enter.native="handleQuery" />
-
<el-input style="width: 100px;" v-model="denominator" placeholder="" clearable @change="denominatorChange"
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-form-item> -->
<el-form-item label="备案属性" prop="productRecord">
<dict-selector :type="DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE" v-model="queryParams.productRecord" clearable
@keyup.enter.native="handleQuery" />
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment